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 |
|---|---|---|---|
6,100 | Orthogonal Random Features Felix Xinnan Yu Ananda Theertha Suresh Krzysztof Choromanski Daniel Holtmann-Rice Sanjiv Kumar Google Research, New York {felixyu, theertha, kchoro, dhr, sanjivk}@google.com Abstract We present an intriguing discovery related to Random Fourier Features: in Gaussian kernel approximation, replacing the random Gaussian matrix by a properly scaled random orthogonal matrix significantly decreases kernel approximation error. We call this technique Orthogonal Random Features (ORF), and provide theoretical and empirical justification for this behavior. Motivated by this discovery, we further propose Structured Orthogonal Random Features (SORF), which uses a class of structured discrete orthogonal matrices to speed up the computation. The method reduces the time cost from O(d2) to O(d log d), where d is the data dimensionality, with almost no compromise in kernel approximation quality compared to ORF. Experiments on several datasets verify the effectiveness of ORF and SORF over the existing methods. We also provide discussions on using the same type of discrete orthogonal structure for a broader range of applications. 1 Introduction Kernel methods are widely used in nonlinear learning [8], but they are computationally expensive for large datasets. Kernel approximation is a powerful technique to make kernel methods scalable, by mapping input features into a new space where dot products approximate the kernel well [19]. With accurate kernel approximation, efficient linear classifiers can be trained in the transformed space while retaining the expressive power of nonlinear methods [10, 21]. Formally, given a kernel K(·, ·) : Rd ⇥Rd ! R, kernel approximation methods seek to find a nonlinear transformation φ(·) : Rd ! Rd0 such that, for any x, y 2 Rd K(x, y) ⇡ˆK(x, y) = φ(x)T φ(y). Random Fourier Features [19] are used widely in approximating smooth, shift-invariant kernels. This technique requires the kernel to exhibit two properties: 1) shift-invariance, i.e. K(x, y) = K(∆) where ∆= x−y; and 2) positive semi-definiteness of K(∆) on Rd. The second property guarantees that the Fourier transform of K(∆) is a nonnegative function [3]. Let p(w) be the Fourier transform of K(z). Then, K(x −y) = Z Rd p(w)ejwT (x−y)dw. This means that one can treat p(w) as a density function and use Monte-Carlo sampling to derive the following nonlinear map for a real-valued kernel: φ(x) = p 1/D ⇥ sin(wT 1 x), · · · , sin(wT Dx), cos(wT 1 x), · · · , cos(wT Dx) ⇤T , where wi is sampled i.i.d. from a probability distribution with density p(w). Let W = ⇥ w1, · · · , wD ⇤T . The linear transformation Wx is central to the above computation since, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 2 x 10 −3 MSE D / d RFF (Random Gaussian) ORF (Random Orthogonal) (a) USPS 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 x 10 −4 MSE D / d RFF (Random Gaussian) ORF (Random Orthogonal) (b) MNIST 1 2 3 4 5 6 7 8 9 10 0 2 4 6 8 x 10 −4 MSE D / d RFF (Random Gaussian) ORF (Random Orthogonal) (c) CIFAR Figure 1: Kernel approximation mean squared error (MSE) for the Gaussian kernel K(x, y) = e−||x−y||2/2σ2. D: number of rows in the linear transformation W. d: input dimension. ORF imposes orthogonality on W (Section 3). • The choice of matrix W determines how well the estimated kernel converges to the actual kernel; • The computation of Wx has space and time costs of O(Dd). This is expensive for highdimensional data, especially since D is often required to be larger than d to achieve low approximation error. In this work, we address both of the above issues. We first show an intriguing discovery (Figure 1): by enforcing orthogonality on the rows of W, the kernel approximation error can be significantly reduced. We call this method Orthogonal Random Features (ORF). Section 3 describes the method and provides theoretical explanation for the improved performance. Since both generating a d ⇥d orthogonal matrix (O(d3) time and O(d2) space) and computing the transformation (O(d2) time and space) are prohibitively expensive for high-dimensional data, we further propose Structured Orthogonal Random Features (SORF) in Section 4. The idea is to replace random orthogonal matrices by a class of special structured matrices consisting of products of binary diagonal matrices and Walsh-Hadamard matrices. SORF has fast computation time, O(D log d), and almost no extra memory cost (with efficient in-place implementation). We show extensive experiments in Section 5. We also provide theoretical discussions in Section 6 of applying the structured matrices in a broader range of applications where random Gaussian matrix is used. 2 Related Works Explicit nonlinear random feature maps have been constructed for many types of kernels, such as intersection kernels [15], generalized RBF kernels [22], skewed multiplicative histogram kernels [14], additive kernels [24], and polynomial kernels [11, 18]. In this paper, we focus on approximating Gaussian kernels following the seminal Random Fourier Features (RFF) framework [19], which has been extensively studied both theoretically and empirically [26, 20, 23]. Key to the RFF technique is Monte-Carlo sampling. It is well known that the convergence of MonteCarlo can be largely improved by carefully choosing a deterministic sequence instead of random samples [17]. Following this line of reasoning, Yang et al. [25] proposed to use low-displacement rank sequences in RFF. Yu et al. [28] studied optimizing the sequences in a data-dependent fashion to achieve more compact maps. In contrast to the above works, this paper is motivated by an intriguing new discovery that using orthogonal random samples provides much faster convergence. Compared to [25], the proposed SORF method achieves both lower kernel approximation error and greatly reduced computation and memory costs. Furthermore, unlike [28], the results in this paper are data independent. Structured matrices have been used for speeding up dimensionality reduction [1], binary embedding [27], deep neural networks [5] and kernel approximation [13, 28, 7]. For the kernel approximation works, in particular, the “structured randomness” leads to a minor loss of accuracy, but allows faster computation since the structured matrices enable the use of FFT-like algorithms. Furthermore, these matrices provide substantial model compression since they require subquadratic (usually only linear) 2 Method Extra Memory Time Lower error than RFF? Random Fourier Feature (RFF) [19] O(Dd) O(Dd) Compact Nonlinear Map (CNM) [28] O(Dd) O(Dd) Yes (data-dependent) Quasi-Monte Carlo (QMC) [25] O(Dd) O(Dd) Yes Structured (fastfood/circulant) [28, 13] O(D) O(D log d) No Orthogonal Random Feature (ORF) O(Dd) O(Dd) Yes Structured ORF (SORF) O(D) or O(1) O(D log d) Yes Table 1: Comparison of different kernel approximation methods under the framework of Random Fourier Features [19]. We assume D ≥d. The proposed SORF method have O(D) degrees of freedom. The computations can be efficiently implemented as in-place operations with fixed random seeds. Therefore it can cost O(1) in extra space. space. In comparison with the above works, our proposed methods SORF and ORF are more effective than RFF. In particular SORF demonstrates both lower approximation error and better efficiency than RFF. Table 1 compares the space and time costs of different techniques. 3 Orthogonal Random Features Our goal is to approximate a Gaussian kernel of the form K(x, y) = e−||x−y||2/2σ2. In the paragraph below, we assume a square linear transformation matrix W 2 RD⇥d, D = d. When D < d, we simply use the first D dimensions of the result. When D > d, we use multiple independently generated random features and concatenate the results. We comment on this setting at the end of this section. Recall that the linear transformation matrix of RFF can be written as WRFF = 1 σ G, (1) where G 2 Rd⇥d is a random Gaussian matrix, with every entry sampled independently from the standard normal distribution. Denote the approximate kernel based on the above WRFF as KRFF(x, y). For completeness, we first show the expectation and variance of KRFF(x, y). Lemma 1. (Appendix A.2) KRFF(x, y) is an unbiased estimator of the Gaussian kernel, i.e., E(KRFF(x, y)) = e−||x−y||2/2σ2. Let z = ||x −y||/σ. The variance of KRFF(x, y) is Var (KRFF(x, y)) = 1 2D ⇣ 1 −e−z2⌘2 . The idea of Orthogonal Random Features (ORF) is to impose orthogonality on the matrix on the linear transformation matrix G. Note that one cannot achieve unbiased kernel estimation by simply replacing G by an orthogonal matrix, since the norms of the rows of G follow the χ-distribution, while rows of an orthogonal matrix have the unit norm. The linear transformation matrix of ORF has the following form WORF = 1 σ SQ, (2) where Q is a uniformly distributed random orthogonal matrix1. The set of rows of Q forms a bases in Rd. S is a diagonal matrix, with diagonal entries sampled i.i.d. from the χ-distribution with d degrees of freedom. S makes the norms of the rows of SQ and G identically distributed. Denote the approximate kernel based on the above WORF as KORF(x, y). The following shows that KORF(x, y) is an unbiased estimator of the kernel, and it has lower variance in comparison to RFF. Theorem 1. KORF(x, y) is an unbiased estimator of the Gaussian kernel, i.e., E(KORF(x, y)) = e−||x−y||2/2σ2. 1We first generate the random Gaussian matrix G in (1). Q is the orthogonal matrix obtained from the QR decomposition of G. Q is distributed uniformly on the Stiefel manifold (the space of all orthogonal matrices) based on the Bartlett decomposition theorem [16]. 3 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 z variance ratio d=∞ (a) Variance ratio (when d is large) 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 z variance ratio d=2 d=4 d=8 d=16 d=32 d=∞ (b) Variance ratio (simulation) 0 1 2 3 4 0 1 2 3 4 5 z count letter forest usps cifar mnist gisette (c) Empirical distribution of z Figure 2: (a) Var(KORF(x, y))/Var(KRFF(x, y)) when d is large and d = D. z = ||x −y||/σ. (b) Simulation of Var(KORF(x, y))/Var(KRFF(x, y)) when D = d. Note that the empirical variance is the Mean Squared Error (MSE). (c) Distribution of z for several datasets, when we set σ as the mean distance to 50th-nearest neighbor for samples from the dataset. The count is normalized such that the area under curve for each dataset is 1. Observe that most points in all the datasets have z < 2. As shown in (a), for these values of z, ORF has much smaller variance compared to the standard RFF. Let D d, and z = ||x −y||/σ. There exists a function f such that for all z, the variance of KORF(x, y) is bounded by Var (KORF(x, y)) 1 2D ✓⇣ 1 −e−z2⌘2 −D −1 d e−z2z4 ◆ + f(z) d2 . Proof. We first show the proof of the unbiasedness. Let z = x−y σ , and z = ||z||, then E(KORF (x, y)) = E ⇣ 1 D PD i=1 cos(wT i z) ⌘ = 1 D PD i=1 E * cos(wT i z) + . Based on the definition of ORF, w1, w2, . . . , wD are D random vectors given by wi = siui, with u1, u2, . . . , ud a uniformly chosen random orthonormal basis for Rd, and si’s are independent χ-distributed random variables with d degrees of freedom. It is easy to show that for each i, wi is distributed according to N(0, Id), and hence by Bochner’s theorem, E[cos(wT z)] = e−z2/2. We now show a proof sketch of the variance. Suppose, ai = cos(wT i z). Var 1 D D X i=1 ai ! = E " PD i=1 ai D !2# −E " PD i=1 ai D !#2 = 1 D2 X i ' E[a2 i ] −E[ai]2( + 1 D2 X i X j6=i (E[aiaj] −E[ai]E[aj]) = ⇣ 1 −e−z2⌘2 2D + D(D −1) D2 ⇣ E[a1a2] −e−z2⌘ , where the last equality follows from symmetry. The first term in the resulting expression is exactly the variance of RFF. In order to have lower variance, E[a1a2] −e−z2 must be negative. We use the following lemma to quantify this term. Lemma 2. (Appendix A.3) There is a function f such that for any z, E[aiaj] e−z2 −e−z2 z4 2d + f(z) d2 . Therefore, for a large d, and D d, the ratio of the variance of ORF and RFF is Var(KORF(x, y)) Var(KRFF(x, y)) ⇡1 −(D −1)e−z2z4 d(1 −e−z2)2 . (3) Figure 2(a) shows the ratio of the variance of ORF to that of RFF when D = d and d is large. First notice that this ratio is always smaller than 1, and hence ORF always provides improvement over 4 0 2 4 6 8 10 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 z bias d=2 d=4 d=8 d=16 d=32 (a) Bias of ORF0 0 2 4 6 8 10 −1 −0.5 0 0.5 1 z bias d=2 d=4 d=8 d=16 d=32 (b) Bias of SORF 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 z variance ratio d=2 d=4 d=8 d=16 d=32 d=∞ (c) Variance ratio of ORF0 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 1.2 z variance ratio d=16 d=32 d=64 d=∞ (d) Variance ratio of SORF Figure 3: Simulations of bias and variance of ORF0and SORF. z = ||x −y||/σ. (a) E(KORF0(x, y)) −e−z2/2. (b) E(KSORF(x, y)) −e−z2/2. (c) Var(KORF0(x, y))/Var(KRFF(x, y)). (d) Var(KSORF(x, y))/Var(KRFF(x, y)). Each point on the curve is based on 20,000 choices of the random matrices and two fixed points with distance z. For both ORF and ORF0, even at d = 32, the bias is close to 0 and the variance is close to that of d = 1 (Figure 2(a)). the conventional RFF. Interestingly, we gain significantly for small values of z. In fact, when z ! 0 and d ! 1, the ratio is roughly z2 (note ex ⇡1 + x when x ! 0), and ORF exhibits infinitely lower error relative to RFF. Figure 2(b) shows empirical simulations of this ratio. We can see that the variance ratio is close to that of d = 1 (3), even when d = 32, a fairly low-dimensional setting in real-world cases. Recall that z = ||x −y||/σ. This means that ORF preserves the kernel value especially well for data points that are close, thereby retaining the local structure of the dataset. Furthermore, empirically σ is typically not set too small in order to prevent overfitting—a common rule of thumb is to set σ to be the average distance of 50th-nearest neighbors in a dataset. In Figure 2(c), we plot the distribution of z for several datasets with this choice of σ. These distributions are all concentrated in the regime where ORF yields substantial variance reduction. The above analysis is under the assumption that D d. Empirically, for RFF, D needs to be larger than d in order to achieve low approximation error. In that case, we independently generate and apply the transformation (2) multiple times. The next lemma bounds the variance for this case. Corollary 1. Let D = m · d, for an integer m and z = ||x −y||/σ. There exists a function f such that for all z, the variance of KORF(x, y) is bounded by Var (KORF(x, y)) 1 2D ✓⇣ 1 −e−z2⌘2 −d −1 d e−z2z4 ◆ + f(z) dD . 4 Structured Orthogonal Random Features In the previous section, we presented Orthogonal Random Features (ORF) and provided a theoretical explanation for their effectiveness. Since generating orthogonal matrices in high dimensions can be expensive, here we propose a fast version of ORF by imposing structure on the orthogonal matrices. This method can provide drastic memory and time savings with minimal compromise on kernel approximation quality. Note that the previous works on fast kernel approximation using structured matrices do not use structured orthogonal matrices [13, 28, 7]. Let us first introduce a simplified version of ORF: replace S in (2) by a scalar p d. Let us call this method ORF0. The transformation matrix thus has the following form: WORF0 = p d σ Q. (4) Theorem 2. (Appendix B) Let KORF0(x, y) be the approximate kernel computed with linear transformation matrix (4). Let D d and z = ||x −y||/σ. There exists a function f such that the bias of KORF0(x, y) satisfies ,,,E(KORF0(x, y)) −e−z2/2,,, e−z2/2 z4 4d + f(z) d2 , 5 1 2 3 4 5 6 7 8 9 10 0 0.01 0.02 0.03 0.04 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (a) LETTER (d = 16) 1 2 3 4 5 6 7 8 9 10 0 2 4 6 8 x 10 −3 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (b) FOREST (d = 64) 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 2 2.5 3 x 10 −3 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (c) USPS (d = 256) 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 1.2 x 10 −3 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (d) CIFAR (d = 512) 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 x 10 −4 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (e) MNIST (d = 1024) 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 1.2 x 10 −4 MSE D / d RFF ORF SORF QMC(digitalnet) circulant fastfood (f) GISETTE (d = 4096) Figure 4: Kernel approximation mean squared error (MSE) for the Gaussian kernel K(x, y) = e−||x−y||2/2σ2. D: number of transformations. d: input feature dimension. For each dataset, σ is chosen to be the mean distance of the 50th `2 nearest neighbor for 1,000 sampled datapoints. Empirically, this yields good classification results. The curves for SORF and ORF overlap. and the variance satisfies Var (KORF0(x, y)) 1 2D ✓ (1 −e−z2)2 −D −1 d e−z2z4 ◆ + f(z) d2 . The above implies that when d is large KORF0(x, y) is a good estimation of the kernel with low variance. Figure 3(a) shows that even for relatively small d, the estimation is almost unbiased. Figure 3(c) shows that when d ≥32, the variance ratio is very close to that of d = 1. We find empirically that ORF0also provides very similar MSE in comparison with ORF in real-world datasets. We now introduce Structured Orthogonal Random Features (SORF). It replaces the random orthogonal matrix Q of ORF0in (4) by a special type of structured matrix HD1HD2HD3: WSORF = p d σ HD1HD2HD3, (5) where Di 2 Rd⇥d, i = 1, 2, 3 are diagonal “sign-flipping” matrices, with each diagonal entry sampled from the Rademacher distribution. H is the normalized Walsh-Hadamard matrix. Computing WSORFx has the time cost O(d log d), since multiplication with D takes O(d) time and multiplication with H takes O(d log d) time using fast Hadamard transformation. The computation of SORF can also be carried out with almost no extra memory due to the fact that both sign flipping and the Walsh-Hadamard transformation can be efficiently implemented as in-place operations [9]. Figures 3(b)(d) show the bias and variance of SORF. Note that although the curves for small d are different from those of ORF, when d is large (d > 32 in practice), the kernel estimation is almost unbiased, and the variance ratio converges to that of ORF. In other words, it is clear that SORF can provide almost identical kernel approximation quality as that of ORF. This is also confirmed by the experiments in Section 5. In Section 6, we provide theoretical discussions to show that the structure of (5) can also be generally applied to many scenarios where random Gaussian matrices are used. 6 Dataset Method D = 2d D = 4d D = 6d D = 8d D = 10d Exact letter d = 16 RFF 76.44 ± 1.04 81.61 ± 0.46 85.46 ± 0.56 86.58 ± 0.99 87.84 ± 0.59 90.10 ORF 77.49 ± 0.95 82.49 ± 1.16 85.41 ± 0.60 87.17 ± 0.40 87.73 ± 0.63 SORF 76.18 ± 1.20 81.63 ± 0.77 84.43 ± 0.92 85.71 ± 0.52 86.78 ± 0.53 forest d = 64 RFF 77.61 ± 0.23 78.92 ± 0.30 79.29 ± 0.24 79.57 ± 0.21 79.85 ± 0.10 80.43 ORF 77.88 ± 0.24 78.71 ± 0.19 79.38 ± 0.19 79.63 ± 0.21 79.54 ± 0.15 SORF 77.64 ± 0.20 78.88 ± 0.14 79.31 ± 0.12 79.50 ± 0.14 79.56 ± 0.09 usps d = 256 RFF 94.27 ± 0.38 94.98 ± 0.10 95.43 ± 0.22 95.66 ± 0.25 95.71 ± 0.18 95.57 ORF 94.21 ± 0.51 95.26 ± 0.25 96.46 ± 0.18 95.52 ± 0.20 95.76 ± 0.17 SORF 94.45 ± 0.39 95.20 ± 0.43 95.51 ± 0.34 95.46 ± 0.34 95.67 ± 0.15 cifar d = 512 RFF 73.19 ± 0.23 75.06 ± 0.33 75.85 ± 0.30 76.28 ± 0.30 76.54 ± 0.31 78.71 ORF 73.59 ± 0.44 75.06 ± 0.28 76.00 ± 0.26 76.29 ± 0.26 76.69 ± 0.09 SORF 73.54 ± 0.26 75.11 ± 0.21 75.76 ± 0.21 76.48 ± 0.24 76.47 ± 0.28 mnist d = 1024 RFF 94.83 ± 0.13 95.48 ± 0.10 95.85 ± 0.07 96.02 ± 0.06 95.98 ± 0.05 97.14 ORF 94.95 ± 0.25 95.64 ± 0.06 95.85 ± 0.09 95.95 ± 0.08 96.06 ± 0.07 SORF 94.98 ± 0.18 95.48 ± 0.08 95.77 ± 0.09 95.98 ± 0.05 96.02 ± 0.07 gisette d = 4096 RFF 97.68 ± 0.28 97.74 ± 0.11 97.66 ± 0.25 97.70 ± 0.16 97.74 ± 0.05 97.60 ORF 97.56 ± 0.17 97.72 ± 0.15 97.80 ± 0.07 97.64 ± 0.09 97.68 ± 0.04 SORF 97.64 ± 0.17 97.62 ± 0.04 97.64 ± 0.11 97.68 ± 0.08 97.70 ± 0.14 Table 2: Classification Accuracy based on SVM. ORF and SORF provide competitive classification accuracy for a given D. Exact is based on kernel-SVM trained on the Gaussian kernel. Note that in all the settings SORF is faster than RFF and ORF by a factor of O(d/ log d). For example, on gisette with D = 2d, SORF provides 10 times speedup in comparison with RFF and ORF. 5 Experiments Kernel Approximation. We first show kernel approximation performance on six datasets. The input feature dimension d is set to be power of 2 by padding zeros or subsampling. Figure 4 compares the mean squared error (MSE) of all methods. For fixed D, the kernel approximation MSE exhibits the following ordering: SORF ' ORF < QMC [25] < RFF [19] < Other fast kernel approximations [13, 28]. By imposing orthogonality on the linear transformation matrix, Orthogonal Random Features (ORF) achieves significantly lower approximation error than Random Fourier Features (RFF). The Structured Orthogonal Random Features (SORF) have almost identical MSE to that of ORF. All other fast kernel approximation methods, such as circulant [28] and FastFood [13] have higher MSE. We also include DigitalNet, the best performing method among Quasi-Monte Carlo techniques [25]. Its MSE is lower than that of RFF, but still higher than that of ORF and SORF. The order of time cost for a fixed D is SORF ' Other fast kernel approximations [13, 28] ⌧ORF = QMC [25] = RFF [19]. Remarkably, SORF has both better computational efficiency and higher kernel approximation quality compared to other methods. We also apply ORF and SORF on classification tasks. Table 2 shows classification accuracy for different kernel approximation techniques with a (linear) SVM classifier. SORF is competitive with or better than RFF, and has greatly reduced time and space costs. The Role of σ. Note that a very small σ will lead to overfitting, and a very large σ provides no discriminative power for classification. Throughout the experiments, σ for each dataset is chosen to be the mean distance of the 50th `2 nearest neighbor, which empirically yields good classification results [28]. As shown in Section 3, the relative improvement over RFF is positively correlated with σ. Figure 5(a)(b) verify this on the mnist dataset. Notice that the proposed methods (ORF and SORF) consistently improve over RFF. Simplifying SORF. The SORF transformation consists of three Hadamard-Diagonal blocks. A natural question is whether using fewer computations and randomness can achieve similar empirical performance. Figure 5(c) shows that reducing the number of blocks to two (HDHD) provides similar performance, while reducing to one block (HD) leads to large error. 6 Analysis and General Applicability of the Hadamard-Diagonal Structure We provide theoretical discussions of SORF in this section. We first show that for large d, SORF is an unbiased estimator of the Gaussian kernel. 7 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 x 10 −4 MSE D / d RFF ORF SORF (a) σ = 0.5⇥50NN distance 1 2 3 4 5 6 7 8 9 10 0 1 2 x 10 −4 MSE D / d RFF ORF SORF (b) σ = 2⇥50NN distance 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 x 10 −3 MSE D / d HDHDHD HDHD HD (c) Variants of SORF Figure 5: (a) (b) MSE on mnist with different σ. (c) Effect of using less randomness on mnist. HDHDHD is the the proposed SORF method. HDHD reduces the number of Hadamard-Diagonal blocks to two, and HD uses only one such block. Theorem 3. (Appendix C) Let KSORF(x, y) be the approximate kernel computed with linear transformation matrix p dHD1HD2HD3. Let z = ||x −y||/σ. Then ,,,E(KSORF(x, y)) −e−z2/2,,, 6z p d . Even though SORF is nearly-unbiased, proving tight variance and concentration guarantees similar to ORF remains an open question. The following discussion provides a sketch in that direction. We first show a lemma of RFF. Lemma 3. Let W be a random Gaussian matrix as in RFF, for a given z, the distribution of Wz is N(0, ||z||2Id). Note that Wz in RFF can be written as Rg, where R is a scaled orthogonal matrix such that each row has norm ||z||2 and g is distributed according to N(0, Id). Hence the distribution of Rg is N(0, ||z||2Id), identical to Wz. The concentration results of RFF use the fact that the projections of a Gaussian vector g onto orthogonal directions R are independent. We show that p dHD1HD2HD3z has similar properties. In particular, we show that it can be written as ˜R˜g, where rows of ˜R are “near-orthogonal” (with high probability) and have norm ||z||2, and the vector ˜g is close to Gaussian (˜g has independent sub-Gaussian elements), and hence the projections behave “near-independently”. Specifically, ˜g = vec(D1) (vector of diagonal entries of D1), and ˜R is a function of D2, D3 and z. Theorem 4. (Appendix D) For a given z, there exists a ˜R (function of D2, D3, z), such that p dHD1HD2HD3z = ˜Rvec(D1). Each row of ˜R has norm ||z||2 and for any t ≥1/d, with probability 1 −de−c·t2/3d1/3, the inner product between any two rows of ˜R is at most t||z||2, where c is a constant. The above result can also be applied to settings not limited to kernel approximation. In the appendix, we show empirically that the same scheme can be successfully applied to angle estimation where the nonlinear map f is a non-smooth sign(·) function [4]. We note that the HD1HD2HD3 structure has also been recently used in fast cross-polytope LSH [2, 12, 6]. 7 Conclusions We have demonstrated that imposing orthogonality on the transformation matrix can greatly reduce the kernel approximation MSE of Random Fourier Features when approximating Gaussian kernels. We further proposed a type of structured orthogonal matrices with substantially lower computation and memory cost. We provided theoretical insights indicating that the Hadamard-Diagonal block structure can be generally used to replace random Gaussian matrices in a broader range of applications. Our method can also be generalized to other types of kernels such as general shift-invariant kernels and polynomial kernels based on Schoenberg’s characterization as in [18]. 8 References [1] N. Ailon and B. Chazelle. Approximate nearest neighbors and the fast Johnson-Lindenstrauss transform. In STOC, 2006. [2] A. Andoni, P. Indyk, T. Laarhoven, I. Razenshteyn, and L. Schmidt. Practical and optimal lsh for angular distance. In NIPS, 2015. [3] S. Bochner. Harmonic analysis and the theory of probability. Dover Publications, 1955. [4] M. S. Charikar. Similarity estimation techniques from rounding algorithms. In STOC, 2002. [5] Y. Cheng, F. X. Yu, R. S. Feris, S. Kumar, A. Choudhary, and S.-F. Chang. An exploration of parameter redundancy in deep networks with circulant projections. In ICCV, 2015. [6] K. Choromanski, F. Fagan, C. Gouy-Pailler, A. Morvan, T. Sarlos, and J. Atif. Triplespin-a generic compact paradigm for fast machine learning computations. arXiv, 2016. [7] K. Choromanski and V. Sindhwani. Recycling randomness with structure for sublinear time kernel expansions. ICML, 2015. [8] C. Cortes and V. Vapnik. Support-vector networks. Machine Learning, 20(3):273–297, 1995. [9] B. J. Fino and V. R. Algazi. Unified matrix treatment of the fast walsh-hadamard transform. IEEE Transactions on Computers, (11):1142–1146, 1976. [10] T. Joachims. Training linear SVMs in linear time. In KDD, 2006. [11] P. Kar and H. Karnick. Random feature maps for dot product kernels. In AISTATS, 2012. [12] C. Kennedy and R. Ward. Fast cross-polytope locality-sensitive hashing. arXiv, 2016. [13] Q. Le, T. Sarlós, and A. Smola. Fastfood – approximating kernel expansions in loglinear time. In ICML, 2013. [14] F. Li, C. Ionescu, and C. Sminchisescu. Random fourier approximations for skewed multiplicative histogram kernels. Pattern Recognition, pages 262–271, 2010. [15] S. Maji and A. C. Berg. Max-margin additive classifiers for detection. In ICCV, 2009. [16] R. J. Muirhead. Aspects of multivariate statistical theory, volume 197. John Wiley & Sons, 2009. [17] H. Niederreiter. Quasi-Monte Carlo Methods. Wiley Online Library, 2010. [18] J. Pennington, F. Yu, and S. Kumar. Spherical random features for polynomial kernels. In NIPS, 2015. [19] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [20] A. Rudi, R. Camoriano, and L. Rosasco. Generalization properties of learning with random features. arXiv:1602.04474, 2016. [21] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter. Pegasos: Primal estimated sub-gradient solver for SVM, volume = 127, year = 2011. Mathematical Programming, (1):3–30. [22] V. Sreekanth, A. Vedaldi, A. Zisserman, and C. Jawahar. Generalized RBF feature maps for efficient detection. In BMVC, 2010. [23] B. Sriperumbudur and Z. Szabó. Optimal rates for random fourier features. In NIPS, 2015. [24] A. Vedaldi and A. Zisserman. Efficient additive kernels via explicit feature maps. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(3):480–492, 2012. [25] J. Yang, V. Sindhwani, H. Avron, and M. Mahoney. Quasi-monte carlo feature maps for shift-invariant kernels. In ICML, 2014. [26] 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 NIPS, 2012. [27] F. X. Yu, S. Kumar, Y. Gong, and S.-F. Chang. Circulant binary embedding. In ICML, 2014. [28] F. X. Yu, S. Kumar, H. Rowley, and S.-F. Chang. Compact nonlinear maps and circulant extensions. arXiv:1503.03893, 2015. [29] X. Zhang, F. X. Yu, R. Guo, S. Kumar, S. Wang, and S.-F. Chang. Fast orthogonal projection based on kronecker product. In ICCV, 2015. 9 | 2016 | 196 |
6,101 | Coevolutionary Latent Feature Processes for Continuous-Time User-Item Interactions Yichen Wang⇧, Nan Du⇤, Rakshit Trivedi⇧, Le Song⇧ ⇤Google Research ⇧College of Computing, Georgia Institute of Technology {yichen.wang, rstrivedi}@gatech.edu, dunan@google.com lsong@cc.gatech.edu Abstract Matching users to the right items at the right time is a fundamental task in recommendation systems. As users interact with different items over time, users’ and items’ feature may evolve and co-evolve over time. Traditional models based on static latent features or discretizing time into epochs can become ineffective for capturing the fine-grained temporal dynamics in the user-item interactions. We propose a coevolutionary latent feature process model that accurately captures the coevolving nature of users’ and items’ feature. To learn parameters, we design an efficient convex optimization algorithm with a novel low rank space sharing constraints. Extensive experiments on diverse real-world datasets demonstrate significant improvements in user behavior prediction compared to state-of-the-arts. 1 Introduction Online social platforms and service websites, such as Reddit, Netflix and Amazon, are attracting thousands of users every minute. Effectively recommending the appropriate service items is a fundamentally important task for these online services. By understanding the needs of users and serving them with potentially interesting items, these online platforms can improve the satisfaction of users, and boost the activities or revenue of the sites due to increased user postings, product purchases, virtual transactions, and/or advertisement clicks [30, 9]. As the famous saying goes “You are what you eat and you think what you read”, both users’ interests and items’ semantic features are dynamic and can evolve over time [18, 4]. The interactions between users and service items play a critical role in driving the evolution of user interests and item features. For example, for movie streaming services, a long-time fan of comedy watches an interesting science fiction movie one day, and starts to watch more science fiction movies in place of comedies. Likewise, a single movie may also serve different segment of audiences at different times. For example, a movie initially targeted for an older generation may become popular among the younger generation, and the features of this movie need to be redefined. Another important aspect is that users’ interests and items’ features can co-evolve over time, that is, their evolutions are intertwined and can influence each other. For instance, in online discussion forums, such as Reddit, although a group (item) is initially created for political topics, users with very different interest profiles can join this group (user ! item). Therefore, the participants can shape the actual direction (or features) of the group through their postings and responses. It is not unlikely that this group can eventually become one about education simply because most users here concern about education (item ! user). As the group is evolving towards topics on education, some users may become more attracted to education topics, and to the extent that they even participate in other dedicated groups on education. On the opposite side, some users may gradually gain interests in sports groups, lose interests in political topics and become inactive in this group. Such coevolutionary nature of user-item interactions raises very interesting questions on how to model them elegantly and how to learn them from observed interaction data. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Nowadays, user-item interaction data are archived in increasing temporal resolution and becoming increasingly available. Each individual user-item iteration is typically logged in the database with the precise time-stamp of the interaction, together with additional context of that interaction, such as tag, text, image, audio and video. Furthermore, the user-item interaction data are generated in an asynchronous fashion in a sense that any user can interact with any item at any time and there may not be any coordination or synchronization between two interaction events. These types of event data call for new representations, models, learning and inference algorithms. Despite the temporal and asynchronous nature of such event data, for a long-time, the data has been treated predominantly as a static graph, and fixed latent features have been assigned to each user and item [21, 5, 2, 10, 29, 30, 25]. In more sophisticated methods, the time is divided into epochs, and static latent feature models are applied to each epoch to capture some temporal aspects of the data [18, 17, 28, 6, 13, 4, 20, 17, 28, 12, 15, 24, 23]. For such epoch-based methods, it is not clear how to choose the epoch length parameter due to the asynchronous nature of the user-item interactions. First, different users may have very different time-scale when they interact with those service items, making it very difficult to choose a unified epoch length. Second, it is not easy for the learned model to answer fine-grained time-sensitive queries such as when a user will come back for a particular service item. It can only make such predictions down to the resolution of the chosen epoch length. Most recently, [9] proposed an efficient low-rank point process model for time-sensitive recommendations from recurrent user activities. However, it still fails to capture the heterogeneous coevolutionary properties of user-item interactions with much more limited model flexibility. Furthermore, it is difficult for this approach to incorporate observed context features. In this paper, we propose a coevolutionary latent feature process for continuous-time user-item interactions, which is designed specifically to take into account the asynchronous nature of event data, and the co-evolution nature of users’ and items’ latent features. Our model assigns an evolving latent feature process for each user and item, and the co-evolution of these latent feature processes is considered using two parallel components: • (Item ! User) A user’s latent feature is determined by the latent features of the items he interacted with. Furthermore, the contributions of these items’ features are temporally discounted by an exponential decaying kernel function, which we call the Hawkes [14] feature averaging process. • (User ! Item) Conversely, an item’s latent features are determined by the latent features of the users who interact with the item. Similarly, the contribution of these users’ features is also modeled as a Hawkes feature averaging process. Besides the two sets of intertwined latent feature processes, our model can also take into account the presence of potentially high dimensional observed context features and links the latent features to the observed context features using a low dimensional projection. Despite the sophistication of our model, we show that the model parameter estimation, a seemingly non-convex problem, can be transformed into a convex optimization problem, which can be efficiently solved by the latest conditional gradient-like algorithm. Finally, the coevolutionary latent feature processes can be used for down-streaming inference tasks such as the next-item and the return-time prediction. We evaluate our method over a variety of datasets, verifying that our method can lead to significant improvements in user behavior prediction compared to the state-of-the-arts. 2 Background on Temporal Point Processes This section provides necessary concepts of the temporal point process [7]. It is a random process whose realization consists of a list of events localized in time, {ti} with ti 2 R+. Equivalently, a given temporal point process can be represented as a counting process, N(t), which records the number of events before time t. An important way to characterize temporal point processes is via the conditional intensity function λ(t), a stochastic model for the time of the next event given all the previous events. Formally, λ(t)dt is the conditional probability of observing an event in a small window [t, t+dt) given the history T (t) up to t, i.e., λ(t)dt := P {event in [t, t + dt)|T (t)} = E[dN(t)|T (t)], where one typically assumes that only one event can happen in a small window of size dt, i.e., dN(t) 2 {0, 1}. The function form of the intensity is often designed to capture the phenomena of interests. One commonly used form is the Hawkes process [14, 11, 27, 26], whose intensity models the excitation between events, i.e., λ(t) = µ + ↵P ti2T (t) !(t −ti), where !(t) := exp(−!t) is an exponential triggering kernel, µ > 0 is a baseline intensity independent of the history. Here, the occurrence of each historical event increases the intensity by a certain amount determined by the kernel ! and the weight ↵> 0, making the intensity history dependent and a stochastic process by itself. From 2 1 K 2 1 K 2 Christine Alice David Jacob 1 K 2 1 K 2 1 K 2 Item feature !"($) User feature &'($) 1 K 2 1 K 2 1 2 ( 1 2 ( 1 2 ( Interaction feature )($) 1 2 ( (a) Data as a bipartite graph Alice 1 K 2 1 K 2 1 2 ! (#,%&,'(,)() (#,%+,'+,)+) #, ) = / ⋅1, ) Interaction feature Coevolution: Item feature Base drift 1 2 ! +3 ⋅ 45 ) −)( '( +45 ) −)+ '+ + 45 ) −)( %78()() +45 ) −)+ %79()+) (b) User latent feature process 1 K 2 Alice David Jacob 1 K 2 1 K 2 1 K 2 1 2 ! 1 2 ! 1 2 ! (#$,&, '$,($) (#*,&,'*,(*) (#+,&,'+,(+) + -. ( −($ #01(($) +-. ( −($ #02((*) +-. ( −($ #03((+) &4 ( = 6 84 ( Interaction feature Coevolution: User feature Base drift (c) Item latent feature process Figure 1: Model illustration. (a) User-item interaction events data. Each edge contains user, item, time, and interaction feature. (b) Alice’s latent feature consists of three components: the drift of baseline feature, the time-weighted average of interaction feature, and the weighted average of item feature. (c) The symmetric item latent feature process. A, B, C, D are embedding matrices from high dimension feature space to latent space. !(t) = exp(−!t) is an exponential decaying kernel. the survival analysis theory [1], given the history T = {t1, . . . , tn}, for any t > tn, we characterize the conditional probability that no event happens during [tn, t) as S(t|T ) = exp " − R t tn λ(⌧) d⌧ $ . Moreover, the conditional density that an event occurs at time t is f(t|T ) = λ(t) S(t|T ). 3 Coevolutionary Latent Feature Processes In this section, we present the framework to model the temporal dynamics of user-item interactions. We first explicitly capture the co-evolving nature of users’ and items’ latent features. Then, based on the compatibility between a user’ and item’s latent feature, we model the user-item interaction by a temporal point process and parametrize the intensity function by the feature compatibility. 3.1 Event Representation Given m users and n items, the input consists of all users’ history events: T = {ek}, where ek = (uk, ik, tk, qk) means that user uk interacts with item ik at time tk and generates an interaction feature vector qk 2 RD. For instance, the interaction feature can be a textual message delivered from the user to the chatting-group in Reddit or a review of the business in Yelp. It can also be unobservable if the data only contains the temporal information. 3.2 Latent Feature Processes We associate a latent feature vector uu(t) 2 RK with a user u and ii(t) 2 RK with an item i. These features represent the subtle properties which cannot be directly observed, such as the interests of a user and the semantic topics of an item. Specifically, we model uu(t) and ii(t) as follows: User latent feature process. For each user u, we formulate uu(t) as: uu(t) = A φu(t) | {z } base drift +B X {ek|uk=u,tk<t} !(t −tk)qk | {z } Hawkes interaction feature averaging + X {ek|uk=u,tk<t} !(t −tk)iik(tk) | {z } co-evolution: Hawkes item feature averaging , (1) Item latent feature process. For each item i, we specify ii(t) as: ii(t) = C φi(t) | {z } base drift +D X {ek|ik=i,tk<t} !(t −tk)qk | {z } Hawkes interaction feature averaging + X {ek|ik=i,tk<t} !(t −tk)uuk(tk) | {z } co-evolution: Hawkes user feature averaging , (2) where A, B, C, D 2 RK⇥D are the embedding matrices mapping from the explicit high-dimensional feature space into the low-rank latent feature space. Figure 1 highlights the basic setting of our model. Next we discuss the rationale of each term in detail. Drift of base features. φu(t) 2 RD and φi(t) 2 RD are the explicitly observed properties of user u and item i, which allows the basic features of users (e.g., a user’s self-crafted interests) and items (e.g., textual categories and descriptions) to smoothly drift through time. Such changes of basic features normally are caused by external influences. One can parametrize φu(t) and φi(t) in many different ways, e.g., the exponential decaying basis to interpolate these features observed at different times. 3 Evolution with interaction feature. Users’ and items’ features can evolve and be influenced by the characteristics of their interactions. For instance, the genre changes of movies indicate the changing tastes of users. The theme of a chatting-group can be easily shifted to certain topics of the involved discussions. In consequence, this term captures the cumulative influence of the past interaction features to the changes of the latent user (item) features. The triggering kernel !(t −tk) associated with each past interaction at tk quantifies how such influence can change through time. Its parametrization depends on the phenomena of interest. Without loss of generality, we choose the exponential kernel !(t) = exp (−!t) to reduce the influence of each past event. In other words, only the most recent interaction events will have bigger influences. Finally, the embedding B, D map the observable high dimension interaction feature to the latent space. Coevolution with Hawkes feature averaging processes. Users’ and items’ latent features can mutually influence each other. This term captures the two parallel processes: • Item ! User. A user’s latent feature is determined by the latent features of the items he interacted with. At each time tk, the latent item feature is iik(tk). Furthermore, the contributions of these items’ features are temporally discounted by a kernel function !(t), which we call the Hawkes feature averaging process. The name comes from the fact that Hawkes process captures the temporal influence of history events in its intensity function. In our model, we capture both the temporal influence and feature of each history item as a latent process. • User ! Item. Conversely, an item’s latent features are determined by the latent features of all the users who interact with the item. At each time tk, the latent feature is uuk(tk). Similarly, the contribution of these users’ features is also modeled as a Hawkes feature averaging process. Note that to compute the third co-evolution term, we need to keep track of the user’s and item’s latent features after each interaction event, i.e., at tk, we need to compute uuk(tk) and iik(tk) in (1) and (2), respectively. Set I(·) to be the indicator function, we can show by induction that uuk(tk) = A h Xk j=1 I[uj = uk]!(tk −tj)φuj(tj) i + B h Xk j=1 I[uj = uk]!(tk −tj)qj i + C h Xk−1 j=1 I[uj = uk]!(tk −tj)φij(tj) i + D h Xk−1 j=1 I[uj = uk]!(tk −tj)qj i iik(tk) = C h Xk j=1 I[ij = ik]!(tk −tj)φij(tj) i + D h Xk j=1 I[ij = ik]!(tk −tj)qj i + A h Xk−1 j=1 I[ij = ik]!(tk −tj)φuj(tj) i + B h Xk−1 j=1 I[ij = ik]!(tk −tj)qj i In summary, we have incorporated both of the exogenous and endogenous influences into a single model. First, each process evolves according to the respective exogenous base temporal user (item) features φu(t) (φi(t)). Second, the two processes also inter-depend on each other due to the endogenous influences from the interaction features and the entangled latent features. We present our model in the most general form and the specific choices of uu(t), ii(t) are dependent on applications. For example, if no interaction feature is observed, we drop the second term in (1) and (2). 3.3 User-Item Interactions as Temporal Point Processes For each user, we model the recurrent occurrences of user u’s interaction with all items as a multidimensional temporal point process. In particular, the intensity in the i-th dimension (item i) is: λu,i(t) = ⌘u,i |{z} long-term preference + uu(t)>ii(t) | {z } short-term preference , (3) where ⌘= (⌘u,i) is a baseline preference matrix. The rationale of this formulation is threefold. First, instead of discretizing the time, we explicitly model the timing of each event occurrence as a continuous random variable, which naturally captures the heterogeneity of the temporal interactions between users and items. Second, the base intensity ⌘u,i represents the long-term preference of user u to item i, independent of the history. Third, the tendency for user u to interact with item i at time t depends on the compatibility of their instantaneous latent features. Such compatibility is evaluated through the inner product of their time-varying latent features. Our model inherits the merits from classic content filtering, collaborative filtering, and the most recent temporal models. For the cold-start users having few interactions with the items, the model adaptively utilizes the purely observed user (item) base properties and interaction features to adjust its predictions, which incorporates the key idea of feature-based algorithms. When the observed 4 features are missing and non-informative, the model makes use of the user-item interaction patterns to make predictions, which is the strength of collaborative filtering algorithms. However, being different from the conventional matrix-factorization models, the latent user and item features in our model are entangled and able to co-evolve over time. Finally, the general temporal point process ingredient of the model makes it possible to capture the dynamic preferences of users to items and their recurrent interactions, which is more flexible and expressive. 4 Parameter Estimation In this section, we propose an efficient framework to learn the parameters. A key challenge is that the objective function is non-convex in the parameters. However, we reformulate it as a convex optimization by creating new parameters. Finally, we present the generalized conditional gradient algorithm to efficiently solve the objective function. Given a collection of events T recorded within a time window [0, T), we estimate the parameters using maximum likelihood estimation of all events. The joint negative log-likelihood [1] is: ` = − X ek log " λuk,ik(tk) $ + m X u=1 n X i=1 Z T 0 λu,i(⌧) d⌧ (4) The objective function is non-convex in variables {A, B, C, D} due to the inner product term in (3). To learn these parameters, one way is to fix the matrix rank and update each matrix using gradient based methods. However, it is easily trapped in local optima and one needs to tune the rank for the best performance. However, with the observation that the product of two low rank matrices yields a low rank matrix, we will optimize over the new matrices and obtain a convex objective function. 4.1 Convex Objective Function We will create new parameters such that the intensity function is convex. Since uu(t) contains the averaging of iik(tk) in (1), C, D will appear in uu(t). Similarly, A, B will appear in ii(t). Hence these matrices X = A>A, B>B, C>C, D>D, A>B, A>C, A>D, B>C, B>D, C>D will appear in (3) after expansion, due to the inner product ii(t)>uu(t). For each matrix product in X, we denote it as a new variable Xi and optimize the objective function over the these variables. We denote the corresponding coefficient of Xi as xi(t), which can be exactly computed. Denote ⇤(t) = (λu,i(t)), we can rewrite the intensity in (3) in the matrix form as: ⇤(t) = ⌘+ X10 i=1 xi(t)Xi (5) The intensity is convex in each new variable Xi, hence the objective function. We will optimize over the new set of variables X subject to the constraints that i) some of them share the same low rank space, e.g., A> is shared as the column space in A>A, A>B, A>C, A>D and ii) new variables are low rank (the product of low rank matrices is low rank). Next, we show how to incorporate the space sharing constraint for general objective function with an efficient algorithm. First, we create a symmetric block matrix X 2 R4D⇥4D and place each Xi as follows: X = 0 B @ X1 X2 X3 X4 X> 2 X5 X6 X7 X> 3 X> 6 X8 X9 X> 4 X> 7 X> 9 X10 1 C A = 0 B @ A>A A>B A>C A>D B>A B>B B>C B>D C>A C>B C>C C>D D>A D>B D>C D>D 1 C A (6) Intuitively, minimizing the nuclear norm of X ensures all the low rank space sharing constraints. First, nuclear norm k · k⇤is a summation of all singular values, and is commonly used as a convex surrogate for the matrix rank function [22], hence minimizing kXk⇤ensures it to be low rank and gives the unique low rank factorization of X. Second, since X1, X2, X3, X4 are in the same row and share A>, the space sharing constraints are naturally satisfied. Finally, since it is typically believed that users’ long-time preference to items can be categorized into a limited number of prototypical types, we set ⌘to be low rank. Hence the objective is: min ⌘>0,X>0 `(X, ⌘) + ↵k⌘k⇤+ βkXk⇤+ γkX −X>k2 F (7) where ` is defined in (4) and k · kF is the Frobenius norm and the associated constraint ensures X to be symmetric. {↵, β, γ} control the trade-off between the constraints. After obtaining X, one can directly apply (5) to compute the intensity and make predictions. 5 4.2 Generalized Conditional Gradient Algorithm We use the latest generalized conditional gradient algorithm [9] to solve the optimization problem (7). We provide details in the appendix. It has an alternating updates scheme and efficiently handles the nonnegative constraint using the proximal gradient descent and the the nuclear norm constraint using conditional gradient descent. It is guaranteed to converge in O( 1 t + 1 t2 ), where t is the number of iterations. For both the proximal and the conditional gradient parts, the algorithm achieves the corresponding optimal convergence rates. If there is no nuclear norm constraint, the results recover the well-known optimal O( 1 t2 ) rate achieved by proximal gradient method for smooth convex optimization. If there is no nonnegative constraints, the results recover the well-known O( 1 t ) rate attained by conditional gradient method for smooth convex minimization. Moreover, the per-iteration complexity is linear in the total number of events with O(mnk), where m is the number of users, n is the number of items and k is the number of events per user-item pair. 5 Experiments We evaluate our framework, COEVOLVE, on synthetic and real-world datasets. We use all the events up to time T · p as the training data, and the rest as testing data, where T is the length of the observation window. We tune hyper-parameters and the latent rank of other baselines using 10-fold cross validation with grid search. We vary the proportion p 2 {0.7, 0.72, 0.74, 0.76, 0.78} and report the averaged results over five runs on two tasks: (a) Item recommendation: for each user u, at every testing time t, we compute the survival probability Su,i(t) = exp " − R t tu,i n λu,i(⌧)d⌧ $ of each item i up to time t, where tu,i n is the last training event time of (u, i). We then rank all the items in the ascending order of Su,i(t) to produce a recommendation list. Ideally, the item associated with the testing time t should rank one, hence smaller value indicates better predictive performance. We repeat the evaluation on each testing moment and report the Mean Average Rank (MAR) of the respective testing items across all users. (b) Time prediction: we predict the time when a testing event will occur between a given user-item pair (u, i) by calculating the density of the next event time as f(t) = λu,i(t)Su,i(t). With the density, we compute the expected time of next event by sampling future events as in [9]. We report the Mean Absolute Error (MAE) between the predicted and true time. Furthermore, we also report the relative percentage of the prediction error with respect to the entire testing time window. 5.1 Competitors TimeSVD++ is the classic matrix factorization method [18]. The latent factors of users and items are designed as decay functions of time and also linked to each other based on time. FIP is a static low rank latent factor model to uncover the compatibility between user and item features [29]. TSVD++ and FIP are only designed for data with explicit ratings. We convert the series of user-item interaction events into an explicit rating using the frequency of a user’s item consumptions [3]. STIC fits a semi-hidden markov model to each observed user-item pair [16] and is only designed for time prediction. PoissonTensor uses Poisson regression as the loss function [6] and has been shown to outperform factorization methods based on squared loss [17, 28] on recommendation tasks. There are two choices of reporting performance: i) use the parameters fitted only in the last time interval and ii) use the average parameters over all intervals. We report the best performance between these two choices. LowRankHawkes is a Hawkes process based model and it assumes user-item interactions are independent [9]. 5.2 Experiments on Synthetic Data We simulate 1,000 users and 1,000 items. For each user, we further generate 10,000 events by Ogata’s thinning algorithm [19]. We compute the MAE by comparing estimated ⌘, X with the ground-truth. The baseline drift feature is set to be constant. Figure 2 (a) shows that it only requires a few hundred iterations to descend to a decent error, and (b) indicates that it only requires a modest number of events to achieve a good estimation. Finally, (c) demonstrates that our method scales linearly as the total number of training events grows. Figure 2 (d-f) show that COEVOLVE achieves the best predictive performance. Because POISSONTENSOR applies an extra time dimension and fits each time interval as a Poisson regression, it outperforms TIMESVD++ by capturing the fine-grained temporal dynamics. Finally, our method automatically adapts different contributions of each past item factors to better capture the users’ current latent features, hence it can achieve the best prediction performance overall. 6 0.10 0.15 0.20 0.25 0.30 0 100 200 300 400 500 #iterations MAE Parameters X η 0.1 0.2 0.3 0.4 2000 4000 6000 8000 10000 #events MAE Parameters X η 101 102 103 104 105 106 #events time(s) (a) MAE by iterations (b) MAE by events (c) Scalability 23.3 42.8 347.2 410.3 415.2 425.3 1 10 100 1000 Methods MAR Methods Coevolving DynamicPoisson LowRankHawkes PoissonTensor TimeSVD++ FIP 10 340 810 900 1 10 100 1000 Methods MAE Methods Coevolving LowRankHawkes PoissonTensor STIC 0.2 6.8 16.2 18 0.2 0 5 10 15 Methods Err % Methods Coevolving LowRankHawkes PoissonTensor STIC (d) Item recommendation (e) Time prediction (MAE) (f) Time prediction (relative) Figure 2: Estimation error (a) vs. #iterations and (b) vs. #events per user; (c) scalability vs. #events per user; (d) average rank of the recommended items; (e) and (f) time prediction error. 5.3 Experiments on Real-World Data Datasets. Our datasets are obtained from three different domains from the TV streaming services (IPTV), the commercial review website (Yelp) and the online media services (Reddit). IPTV contains 7,100 users’ watching history of 436 TV programs in 11 months, with 2,392,010 events, and 1,420 movie features, including 1,073 actors, 312 directors, 22 genres, 8 countries and 5 years. Yelp is available from Yelp Dataset challenge Round 7. It contains reviews for various businesses from October, 2004 to December, 2015. We filter users with more than 100 posts and it contains 100 users and 17,213 businesses with around 35,093 reviews. Reddit contains the discussions events in January 2014. Furthermore, we randomly selected 1,000 users and collect 1,403 groups that these users have discussion in, with a total of 10,000 discussion events. For item base feature, IPTV has movie feature, Yelp has business description, and Reddit does not have it. In experiments we fix the baseline features. There is no base feature for user. For interaction feature, Reddit and Yelp have reviews in bag-of-words, and no such feature in IPTV. Figure 3 shows the predictive performance. For time prediction, COEVOLVE outperforms the baselines significantly, since we explicitly reason and model the effect that past consumption behaviors change users’ interests and items’ features. In particular, compared with LOWRANKHAWKES, our model captures the interactions of each user-item pair with a multi-dimensional temporal point processes. It is more expressive than the respective one-dimensional Hawkes process used by LOWRANKHAWKES, which ignores the mutual influence among items. Furthermore, since the unit time is hour, the improvement over the state-of-art on IPTV is around two weeks and on Reddit is around two days. Hence our method significantly helps online services make better demand predictions. For item recommendation, COEVOLVE also achieves competitive performance comparable with LOWRANKHAWKES on IPTV and Reddit. The reason behind the phenomena is that one needs to compute the rank of the intensity function for the item prediction task, and the value of intensity function for time prediction. LOWRANKHAWKES might be good at differentiating the rank of intensity better than COEVOLVE. However, it may not be able to learn the actual value of the intensity accurately. Hence our method has the order of magnitude improvement in the time prediction task. In addition to the superb predictive performance, COEVOLVE also learns the time-varying latent features of users and items. Figure 4 (a) shows that the user is initially interested in TV programs of adventures, but then the interest changes to Sitcom, Family and Comedy and finally switches to the Romance TV programs. Figure 4 (b) shows that Facebook and Apple are the two hot topics in the month of January 2014. The discussions about Apple suddenly increased on 01/21/2014, which 7 IPTV 10.4 1.8 150.3 177.2 191.3 1 10 100 Methods MAR Methods Coevolving LowRankHawkes PoissonTensor TimeSVD++ FIP 34.5 356 830.2 901.1 10 1000 Methods MAE Methods Coevolving LowRankHawkes PoissonTensor STIC 0.4 4.4 10.3 11.2 0.4 0 3 6 9 12 Methods Err % Methods Coevolving LowRankHawkes PoissonTensor STIC Reddit 13.2 2.5 450.1 510.7 540.7 1 10 100 Methods MAR Methods Coevolving LowRankHawkes PoissonTensor TimeSVD++ FIP 8.1 67.2 186.4 203 1 10 100 Methods MAE Methods Coevolving LowRankHawkes PoissonTensor STIC 1.1 9.1 25.1 27.2 1.1 0 10 20 Methods Err % Methods Coevolving LowRankHawkes PoissonTensor STIC Yelp 80.1 90.1 7800.1 8100.3 8320.5 10 1000 Methods MAR Methods Coevolving LowRankHawkes PoissonTensor TimeSVD++ FIP 125.9 724.3 768.4 883 10 1000 Methods MAE Methods Coevolving LowRankHawkes PoissonTensor STIC 1.82 17 18.8 21.6 0 5 10 15 20 Methods Err % Methods Coevolving LowRankHawkes PoissonTensor STIC (a) Item recommendation (b) Time prediction (MAE) (c) Time prediction (relative) Figure 3: Prediction results on IPTV, Reddit and Yelp. Results are averaged over five runs with different portions of training data and error bar represents the variance. 0.00 0.25 0.50 0.75 1.00 01/01 01/21 02/10 03/01 03/21 04/10 04/30 05/20 06/09 06/29 07/19 08/08 08/28 09/17 10/07 10/27 11/16 Category Action Horror Modern History Child Idol Drama Adventure Costume Carton Sitcom Comedy Crime Romance Suspense Thriller Family Fantasy Fiction Kung.fu Mystery War 0.00 0.25 0.50 0.75 1.00 01/01 01/03 01/05 01/07 01/09 01/11 01/13 01/15 01/17 01/19 01/21 01/23 01/25 01/27 01/29 Category Macbook Antivirus Intel Camera Interface Samsung Bill Privacy Twitter Cable Wikipedia Desktop Watch Price Software Computer Power Youtube Network Service Facebook Apple (a) Feature for a user in IPTV (b) Feature for the Technology group in Reddit Figure 4: Learned time-varying features of a user in IPTV and a group in Reddit. can be traced to the news that Apple won lawsuit against Samsung1. It further demonstrates that our model can better explain and capture the user behavior in the real world. 6 Conclusion We have proposed an efficient framework for modeling the co-evolution nature of users’ and items’ latent features. Empirical evaluations on large synthetic and real-world datasets demonstrate its scalability and superior predictive performance. Future work includes extending it to other applications such as modeling dynamics of social groups, and understanding peoples’ behaviors on Q&A sites. Acknowledge. This project was supported in part by NSF/NIH BIGDATA 1R01GM108341, ONR N00014-15-1-2340, NSF IIS-1218749, and NSF CAREER IIS-1350983. 1http://techcrunch.com/2014/01/22/apple-wins-big-against-samsung-in-court/ 8 References [1] O. Aalen, O. Borgan, and H. Gjessing. Survival and event history analysis: a process point of view. Springer, 2008. [2] D. Agarwal and B.-C. Chen. Regression-based latent factor models. In J. Elder, F. Fogelman-Soulié, P. Flach, and M. Zaki, editors, KDD, 2009. [3] L. Baltrunas and X. Amatriain. Towards time-dependant recommendation based on implicit feedback, 2009. [4] L. Charlin, R. Ranganath, J. McInerney, and D. M. Blei. Dynamic poisson factorization. In RecSys, 2015. [5] Y. Chen, D. Pavlov, and J. Canny. Large-scale behavioral targeting. In J. Elder, F. Fogelman-Soulié, P. Flach, and M. J. Zaki, editors, KDD, 2009. [6] E. C. Chi and T. G. Kolda. On tensors, sparsity, and nonnegative factorizations. SIAM Journal on Matrix Analysis and Applications, 33(4):1272–1299, 2012. [7] D. Cox and P. Lewis. Multivariate point processes. Selected Statistical Papers of Sir David Cox: Volume 1, Design of Investigations, Statistical Methods and Applications, 1:159, 2006. [8] J. K. Cullum and R. A. Willoughby. Lanczos Algorithms for Large Symmetric Eigenvalue Computations: Vol. 1: Theory, volume 41. SIAM, 2002. [9] N. Du, Y. Wang, N. He, and L. Song. Time sensitive recommendation from recurrent user activities. In NIPS, 2015. [10] M. D. Ekstrand, J. T. Riedl, and J. A. Konstan. Collaborative filtering recommender systems. Foundations and Trends in Human-Computer Interaction, 4(2):81–173, 2011. [11] M. Farajtabar, Y. Wang, M. Gomez-Rodriguez, S. Li, H. Zha, and L. Song. Coevolve: A joint point process model for information diffusion and network co-evolution. In NIPS, 2015. [12] P. Gopalan, J. M. Hofman, and D. M. Blei. Scalable recommendation with hierarchical poisson factorization. UAI, 2015. [13] S. Gultekin and J. Paisley. A collaborative kalman filter for time-evolving dyadic processes. In ICDM, pages 140–149, 2014. [14] A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83– 90, 1971. [15] B. Hidasi and D. Tikk. General factorization framework for context-aware recommendations. Data Mining and Knowledge Discovery, pages 1–30, 2015. [16] K. Kapoor, K. Subbian, J. Srivastava, and P. Schrater. Just in time recommendations: Modeling the dynamics of boredom in activity streams. In WSDM, 2015. [17] A. Karatzoglou, X. Amatriain, L. Baltrunas, and N. Oliver. Multiverse recommendation: n-dimensional tensor factorization for context-aware collaborative filtering. In Recsys, 2010. [18] Y. Koren. Collaborative filtering with temporal dynamics. In KDD, 2009. [19] Y. Ogata. On lewis’ simulation method for point processes. IEEE Transactions on Information Theory, 27(1):23–31, 1981. [20] J. Z. J. L. Preeti Bhargava, Thomas Phan. Who, what, when, and where: Multi-dimensional collaborative recommendations using tensor factorization on sparse user-generated data. In WWW, 2015. [21] R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using markov chain monte carlo. In ICML, 2008. [22] S. Sastry. Some np-complete problems in linear algebra. Honors Projects, 1990. [23] X. Wang, R. Donaldson, C. Nell, P. Gorniak, M. Ester, and J. Bu. Recommending groups to users using user-group engagement and time-dependent matrix factorization. In AAAI, 2016. [24] Y. Wang, R. Chen, J. Ghosh, J. C. Denny, A. Kho, Y. Chen, B. A. Malin, and J. Sun. Rubik: Knowledge guided tensor factorization and completion for health data analytics. In KDD, 2015. [25] Y. Wang and A. Pal. Detecting emotions in social media: A constrained optimization approach. In IJCAI, 2015. [26] Y. Wang, E. Theodorou, A. Verma, and L. Song. A stochastic differential equation framework for guiding information diffusion. arXiv preprint arXiv:1603.09021, 2016. [27] Y. Wang, B. Xie, N. Du, and L. Song. Isotonic hawkes processes. In ICML, 2016. [28] L. Xiong, X. Chen, T.-K. Huang, J. G. Schneider, and J. G. Carbonell. Temporal collaborative filtering with bayesian probabilistic tensor factorization. In SDM, 2010. [29] S.-H. Yang, B. Long, A. Smola, N. Sadagopan, Z. Zheng, and H. Zha. Like like alike: joint friendship and interest propagation in social networks. In WWW, 2011. [30] X. Yi, L. Hong, E. Zhong, N. N. Liu, and S. Rajan. Beyond clicks: Dwell time for personalization. In RecSys, 2014. 9 | 2016 | 197 |
6,102 | Convex Two-Layer Modeling with Latent Structure Vignesh Ganapathiraman†, Xinhua Zhang†, Yaoliang Yu∗, Junfeng Wen♯ †University of Illinois at Chicago, Chicago, IL, USA ∗University of Waterloo, Waterloo, ON, Canada, ♯University of Alberta, Edmonton, AB, Canada {vganap2, zhangx}@uic.edu, yaoliang.yu@uwaterloo.ca, junfengwen@gmail.com Abstract Unsupervised learning of structured predictors has been a long standing pursuit in machine learning. Recently a conditional random field auto-encoder has been proposed in a two-layer setting, allowing latent structured representation to be automatically inferred. Aside from being nonconvex, it also requires the demanding inference of normalization. In this paper, we develop a convex relaxation of two-layer conditional model which captures latent structure and estimates model parameters, jointly and optimally. We further expand its applicability by resorting to a weaker form of inference—maximum a-posteriori. The flexibility of the model is demonstrated on two structures based on total unimodularity—graph matching and linear chain. Experimental results confirm the promise of the method. 1 Introduction Over the past decade deep learning has achieved significant advances in many application areas [1]. By automating the acquisition of latent descriptive and predictive representation, they provide highly effective models to capture the relationships between observed variables. Recently more refined deep models have been proposed for structured output prediction, where several random variables for prediction are statistically correlated [2–4]. Improved performance has been achieved in applications such as image recognition and segmentation [5] and natural language parsing [6], amongst others. So far, most deep models for structured output are designed for supervised learning where structured labels are available. Recently an extension has been made to the unsupervised learning. [7] proposed a conditional random field auto-encoder (CRF-AE)—a two-layer conditional model—where given the observed data x, the latent structure y is first generated based on p(y|x), and then applied to reconstruct the observations using p(x|y). The motivation is to find the predictive and discriminative (rather than common but irrelevant) latent structure in the data. Along similar lines, several other discriminative unsupervised learning methods are also available [8–11]. Extending auto-encoders X →Y →X to general two-layer models X →Y →Z is not hard. [12, 13] addressed transliteration between two languages, where Z is the observed binary label indicating if two words match, and higher accuracy can be achieved if we faithfully recover a letter-wise matching represented by the unobserved structure Y . In essence, their model optimizes p(z|arg maxy p(y|x)), uncovering the latent y via its mode under the first layer model. This is known as bi-level optimization because the arg max of inner optimization is used. A soft variant adopts the mean of y [14]. In general, conditional models yield more accurate predictions than generative models X−Y −Z (e.g. multi-wing harmoniums/RBMs), unless the latter is trained in a discriminative fashion [15]. In computation, all methods require certain forms of tractability in inference. CRF-AE leverages marginal inference on p(y|x)p(x|y) (over y) for EM. Contrastive divergence, instead, samples from p(y|x) [11]. For some structures like graph matching, neither of them is tractable [16, 17] (unless assuming first-order Markovian). In single-layer models, this challenge has been resolved by max-margin estimation, which relies only on the MAP of p(y|x) [18]. This oracle is much less demanding than sampling or normalization, as finding the most likely state can be much easier than summarizing over all possible y. For example, MAP for graph matching can be solved by max-flow. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Unfortunately a direct extension of max-margin estimation to two-layer modeling meets with immediate obstacles, because here one has to solve maxy p(y|x)p(z|y). In general, p(z|y) depends on y in a highly nonlinear form, making this augmented MAP inference intractable. This seems to leave the aforementioned bi-level optimization the only option that retains the sole dependency on MAP. However, solving this optimization poses substantial challenge when y is discrete, because the mode of p(y|x) is almost always invariant to small perturbations of model parameters (i.e. zero gradient). In this paper we demonstrate that this optimization can be relaxed into a convex formulation while still preserving sufficient regularities to recover a non-trivial, nonlinear predictive model that supports structured latent representations. Recently a growing body of research has investigated globally trainable deep models. But they remain limited. [19] formulated convex conditional models using layer-wise kernels, connected through nonlinear losses. However these losses are data dependent, necessitating a transductive setting to retain the context. [20] used boosting but the underlying oracle is generally intractable. Specific global methods were also proposed for polynomial networks [21] and sum-product networks [22]. None of these methods accommodate structures in latent layers. Our convex formulation is achieved by enforcing the first-order optimality conditions of inner level optimization via sublinear constraints. Using a semi-definite relaxation, we amount to the first two-layer model that allows latent structures to be inferred concurrently with model optimization while still admitting globally optimal solutions (§3). To the best of our knowledge, this is the first algorithm in machine learning that directly constructs a convex relaxation for a bi-level optimization based on the inner optimality conditions. Unlike [19], it results in a truly inductive model, and its flexibility is demonstrated with two example structures in the framework of total unimodularity (§4). The only inference required is MAP on p(y|x), and the overall scalability is further improved by a refined optimization algorithm (§5). Experimental results demonstrate its useful potentials in practice. 2 Preliminaries and Background We consider a two-layer latent conditional model X →Y →Z, where X is the input, Z is the output, and Y is a latent layer composed of h random variables: {Yi}h i=1. Instead of assuming no interdependency between Yi as in [19], our major goal here is to model the structure in the latent layer Y . Specifically, we assume a conditional model for the first layer based on an exponential family p(y|x) = q0(y) exp(−y′Ux −Ω(Ux)), where q0(y) = Jy ∈YK . (1) Here U is the first layer weight matrix, and Ωis the log-partition function. q0(y) is the base measure, with JxK = 1 if x is true, and 0 otherwise. The correlation among Yi is instilled by the support set Y, which plays a central role here. For example, when Y consists of all h-dimensional canonical vectors, p(y|x) recovers the logistic multiclass model. In general, to achieve a tradeoff between computational efficiency and representational flexibility, we make the following assumptions on Y: Assumption 1 (PO-tractable). We assume Y is bounded, and admits an efficient polar operator. That is, for any vector d ∈Rh, miny∈Y d′y is efficiently solvable. Note the support set Y (hence the base measure q0) is fixed and does not contain any more parameter. PO-tractability is available in a variety of applications, and we give two examples here. Graph matching. In a bipartite graph with two sets of vertices {ai}n i=1 and {bj}n j=1, each edge between ai and bj has a weight Tij. The task is to find a one-to-one mapping (can be extended) between {ai} and {bj}, such that the sum of weights on the edges is maximized. Denote the matching by Y ∈{0, 1}n×n where Yij = 1 iff the edge (ai, bj) is selected. So the optimal matching is the mode of p(Y ) ∝JY ∈YK exp(tr(Y ′T)) where the support is Y = {Y ∈{0, 1}n×n : Y 1 = Y ′1 = 1}. Graphical models. For simplicity, consider a linear chain model V1 −V2 −· · · −Vp. Here each Vi can take one of C possible values, which we encode using the C-dimensional canonical basis vi. Suppose there is a node potential mi ∈RC for each Vi, and each edge (Vi, Vi+1) has an edge potential Mi ∈RC×C. Then we could directly define a distribution on {Vi}. Unfortunately, it will involve quadratic terms such as v′ iMivi+1, and so a different parameterization is in order. Let Yi ∈{0, 1}C×C encode the values of (Vi, Vi+1) via row and column indices of Yi respectively. Then the distribution on {Vi} can be equivalently represented by a distribution on {Yi}: p({Yi}) ∝J{Yi} ∈YK exp Xp i=1 m′ iYi1 + Xp−1 i=1 tr(M ′ iYi) , (2) where Y = {Yi} : Yi ∈{0, 1}C×C ∩H, with H := {{Yi} : 1′Yi1 = 1, Y ′ i 1 = Yi+11} . (3) 2 The constraints in H encode the obvious consistency constraints between overlapping edges. This model ultimately falls into our framework in (1). In both examples, the constraints in Y are totally unimodular (TUM), and therefore the polar operator can be computed by solving a linear programming (LP), with the {0, 1} constraints relaxed to [0, 1]. In §4.1 and 4.2 we will generalize y′Ux to y′d(Ux), where d is an affine function of Ux that allows for homogeneity in temporal models. For clarity, we first develop a general framework using y′Ux. Output layer As for the output layer, we assume a conditional model from an exponential family p(z|y) = exp(z′R′y −G(R′y))q1(z) = exp(−DG∗(z||∇G(R′y)) + G∗(z))q1(z), (4) where G is a smooth and strictly convex function, and DG∗is the Bregman divergence induced by the Fenchel dual G∗. Such a parameterization is justified by the equivalence between regular Bregman divergence and regular exponential family [23]. Thanks to the convexity of G, it is trivial to extend p(z|y) to y ∈convY (the convex hull of Y), and G(R′y) will still be convex over convY (fixing R). Finally we highlight the assumptions we make and do not make. First we only assume PO-tractability of Y, hence tractability in MAP inference of p(y|x). We do not assume it is tractable to compute the normalizer Ωor its gradient (marginal distributions). We also do not assume that unbiased samples of y can be drawn efficiently from p(y|x). In general, PO-tractability is a weaker assumption. For example, in graph matching MAP inference is tractable while marginalization is NP-hard [16] and sampling requires MCMC [24]. Finally, we do not assume tractability of any sort for p(y|x)p(z|y) (in y), and so it may be hard to solve miny∈Y{d′y + G(R′y) −z′R′y}, as G is generally not affine. 2.1 Training principles At training time, we are provided with a set of feature-label pairs (x, z) ∼˜p, where ˜p is the empirical distribution. In the special case of auto-encoder, z is tied with x. The “bootstrapping" style estimation [25] optimizes the joint likelihood with the latent y imputed in an optimistic fashion min U,R E (x,z)∼˜p min y∈Y −log p(y|x)p(z|y) = min U,R E (x,z)∼˜p min y∈Y y′Ux + Ω(Ux) −z′R′y + G(R′y) . This results in a hard EM estimation, and a soft version can be achieved by adding entropic regularizers on y. Regularization can be imposed on U and R which we will make explicit later (e.g. bounding the L2 norm). Since the log-partition function Ωin p(y|x) is hard to compute, the max-margin approach is introduced which replaces Ω(Ux) by an upper bound maxˆy∈Y −ˆy′Ux, leading to a surrogate loss min U,R E (x,z)∼˜p min y∈Y −z′R′y + G(R′y) + y′Ux −min ˆy∈Y ˆy′Ux . (5) However, the key disadvantage of this method is the augmented inference on y, because we have only assumed the tractability of miny∈Y d′y for all d, not miny∈Y{y′d + G(R′y) −z′R′y}. In addition, this principle intrinsically determines the latent y as a function of both the input and the output, while at test time the output itself is unknown and is the subject of prediction. The common practice therefore requires a joint optimization over y and z at test time, which is costly in computation. The goal of this paper is to design a convex formulation in which the latent y is completely determined by the input x, and both the prediction and estimation rely only on the polar operator: arg miny∈Y y′Ux. As a consequence of this goal, it is natural to postulate that the y found this way renders an accurate prediction of z, or a faithful recovery of x in auto-encoders. This idea, which has been employed by [e.g., 9, 26], leads to the following bi-level optimization problem max U,R E (x,z)∼˜p log p z arg max y∈Y p(y|x) ⇔ max U,R E (x,z)∼˜p log p z arg min y∈Y y′Ux (6) ⇔min U,R E (x,z)∼˜p [−z′R′y∗ x + G(R′y∗ x)] , where y∗ x = arg min y∈Y y′Ux. (7) Directly solving this optimization problem is challenging, because the optimal y∗ x is almost surely invariant to small perturbations of U (e.g. when Y is discrete). So a zero valued gradient is witnessed almost everywhere. Therefore a more carefully designed optimization algorithm is in demand. 3 A General Framework of Convexification We propose addressing this bi-level optimization by convex relaxation, and it is built upon the first-order optimality conditions of the inner-level optimization. First notice that the set Y participates 3 in the problem (7) only via the polar operator at Ux: arg miny∈Y y′Ux. If Y is discrete, this problem is equivalent to optimizing over S := convY, because a linear function on a convex set is always optimized on its extreme points. Clearly, S is convex, bounded, closed, and is PO-tractable. It is important to note that the origin is not necessarily contained in S. To remove the potential non-uniqueness of the minimizer in (7), we next add a small proximal term to the polar operator problem (σ is a small positive number): min w∈S w′Ux + σ 2 ∥w∥2 . (8) This leads to a small change in the problem and makes sure that the minimizer is unique.1 Adding strongly convex terms to the primal and dual objectives is a commonly used technique for accelerated optimization [27], and has been used in graphical model inference [e.g., 28]. We intentionally changed the symbol y into w, because here the optimal w is not necessarily in Y. By the convexity of the problem (8) and noting that the gradient of the objective is Ux + σw, w is optimal if and only if w ∈S, and (Ux + σw)′(ˆθ −w) ≥0, ∀ˆθ ∈S. (9) These optimality conditions can be plugged into the bi-level optimization problem (7). Introducing “Lagrange multipliers” (γ, ˆθ) to enforce the latter condition via a mini-max formulation, we obtain min ∥U∥≤1 min ∥R∥≤1 E (x,z)∼˜p h min w max γ≥0, ˆθ∈S max v −z′R′w + v′R′w −G∗(v) (10) + ιS(w) + γ(Ux + σw)′(w −ˆθ) i , (11) where ιS is the {0, ∞}-valued indicator function of the set S. Here we dualized G via G(R′w) = maxv v′R′w −G∗(v), and made explicit the Frobenius norm constraints (∥·∥) on U and R.2 Applying change of variable θ = γ ˆθ, the constraints γ ≥0 and ˆθ ∈S (a convex set) become (θ, γ) ∈N := cone{(ˆθ, 1) : ˆθ ∈S}, where cone stands for the conic hull (convex). Similarly we can dualize ιS(w) = maxπ π′w−σS(π), where σS(π) := maxw∈S π′w is the support function on S. Now swap minw with all the subsequent max (strong duality), we arrive at a form where w can be minimized out analytically min ∥U∥≤1 min ∥R∥≤1 E (x,z)∼˜p h max π max (θ,γ)∈N max v min w −z′R′w + v′R′w −G∗(v) (12) + π′w −σS(π) + (Ux + σw)′(γw −θ) i (13) = min ∥U∥≤1 min ∥R∥≤1 E (x,z)∼˜p h max π max (θ,γ)∈N max v −G∗(v) −σS(π) −θ′Ux (14) − 1 4σγ ∥R(v −z) + γUx + π −σθ∥2 . (15) Given (U, R), the optimal (v, π, θ, γ) can be efficiently solved through a concave maximization. However the overall objective is not convex in (U, R) because the quadratic term in (15) is subtracted. Fortunately it turns out not hard to tackle this issue by using semi-definite programming (SDP) relaxation which linearizes the quadratic terms. In particular, let I be the identity matrix, and define M := M(U, R) := I U ′ R′ ! (I, U, R) = I U R U ′ U ′U U ′R R′ R′U R′R ! =: M1 Mu Mr M ′ u Mu,u M ′ r,u M ′ r Mr,u Mr,r . (16) Then θ′Ux can be replaced by θ′Mux and the quadratic term in (15) can be expanded as f(M, π, θ, γ, v; x, z) := tr(Mr,r(v −z)(v −z)′) + γ2 tr(Mu,uxx′) + 2γ tr(Mr,ux(v −z)′) + 2(π −σθ)′(Mr(v −z) + γMux) + ∥π −σθ∥2 . (17) Since given (π, θ, γ, v) the objective function becomes linear in M, so after maximizing out these variables the overall objective is convex in M. Although this change of variable turns the objective into convex, it indeed shifts the intractability into the feasible region of M: M0 := {M ⪰0 : M1 = I, tr(Mu,u) ≤1, tr(Mr,r) ≤1} | {z } =:M1 ∩{M : rank(M) = h} . (18) 1If p(y|x) ∝p0(y) exp(−y′Ux −σ 2 ∥y∥2) (for any σ > 0), then there is no need to add this σ 2 ∥w∥2 term. In this case, all our subsequent developments apply directly. Therefore our approach applies to a broader setting where L2 projection to S is tractable, but here we focus on PO-tractability just for the clarity of presentation. 2To simplify the presentation, we bound the radius by 1 while in practice it is a hyperparameter to be tuned. 4 Here M ⪰0 means M is real symmetric and positive semi-definite. Due to the rank constraint, M0 is not convex. So a natural relaxation—the only relaxation we introduce besides the proximal term in (8)—is to drop this rank constraint and optimize with the resulting convex set M1. This leads to the final convex formulation: min M∈M1 E (x,z)∼˜p h max π max (θ,γ)∈N max v −G∗(v) −σS(π) −θ′Mux − 1 4σγ f(M, π, θ, γ, v; x, z) i . (19) To summarize, we have achieved a convex model for two-layer conditional models in which the latent structured representation is determined by a polar operator. Instead of bypassing this bi-level optimization via the normal loss based approach [e.g., 19, 29], we addressed it directly by leveraging the optimality conditions of the inner optimization. A convex relaxation is then achieved via SDP. 3.1 Inducing low-rank solutions of relaxation Although it is generally hard to provide a theoretical guarantee for nonlinear SDP relaxations, it is interesting to note that the constraint set M1 effectively encourages low-rank solutions (hence tighter relaxations). As a key technical result, we next show that all extreme points of M1 are rank h (the number of hidden nodes) for all h ≥2. Recall that in sparse coding, the atomic norm framework [30] induces low-complexity solutions by setting up the optimization over the convex hull of atoms, or penalize via its gauge function. Therefore the characterization of the extreme points of M1 might open up the possibility of analyzing our relaxation by leveraging the results in sparse coding. Lemma 1. Let Ai be symmetric matrices. Consider the set of R := {X : X ⪰0, tr(AiX) ⪋bi, i = 1, . . . , m}, (20) where m is the number of linear (in)equality constraints. ⪋means it can be any one of ≤, =, or ≥. Then the rank r of all extreme points of R is upper bounded by r ≤ 1 2( √ 8m + 1 −1) . (21) This result extends [31] by accommodating inequalities in (20), and its proof is given in Appendix A. Now we show that the feasible region M1 as defined by (18) has all extreme points with rank h. Theorem 1. If h ≥2, then all extreme points of M1 have rank h, and M1 is the convex hull of M0. Proof. Let M be an extreme point of M1. Noting that M ⪰0 already encodes the symmetry of M, the linear constraints for M1 in (18) can be written as 1 2h(h + 1) linear equality constraints and two linear inequality constraints. In total m = 1 2h(h + 1) + 2. Plug it into (21) in the above lemma rank(M) ≤ 1 2( √ 8m + 1 −1) = j 1 2( p 4h(h + 1) + 17 −1) k = h + Jh = 1K. (22) Finally, the identity matrix in the top-left corner of M forces rank(M) ≥h. So rank(M) = h for all h ≥2. It then follows that M1 = convM0. 4 Application in Machine Learning Problems The framework developed above is generic. For example, when Y represents classification for h classes by canonical vectors, S = convY is the h dimensional probability simplex (sum up to 1). Clearly σS(π) = maxi πi, and N = {(x, t) ∈Rh+1 + : 1′x = t}. In many applications, Y can be characterized as {y ∈{0, 1}h : Ay ≤c}, where A is TUM and all entries of c are in {−1, 1, 0}.3 In this case, the convex hull S has all extreme points being integral, and S employs an explicit form: Y = {y ∈{0, 1}h : Ay ≤c} =⇒ S = convY = {w ∈[0, 1]h : Aw ≤c}, (23) replacing all binary constraints {0, 1} by intervals [0, 1]. Clearly TUM is a sufficient condition for PO-tractability, because miny∈Y d′y is equivalent to minw∈S d′w, an LP. Examples include the above graph matching and linear chain model. We will refer to Aw ≤c as the non-box constraint. 4.1 Graph matching As the first concrete example, we consider convex relaxation for latent graph matching. One task in natural language is transliteration [12, 32]. Suppose we are given an English word e with m letters, and a corresponding Hebrew word h with n letters. The goal is to predict whether e and h are phonetically similar, a binary classification problem with z ∈{−1, 1}. However it obviously helps to 3For simplicity, we write equality constraints (handled separately in practice) using two inequality constraints. 5 find, as an intermediate step, the letter-wise matching between e and h. The underlying assumption is that each letter corresponds to at most one letter in the word of the other language. So if we augment both e and h with a sink symbol * at the end (hence making their length ˆm := m + 1 and ˆn := n + 1 respectively), we would like to find a matching y ∈{0, 1} ˆmˆn that minimizes the following cost min Y ∈Y ˆm X i=1 ˆn X j=1 Yiju′φij, where Y = {0, 1} ˆm׈n ∩{Y : Yi,:1 = 1, ∀i ≤m, 1′Y:,j = 1, ∀j ≤n} | {z } =:G . (24) Here Yi,: is the i-th row of Y . φij ∈Rp is a feature vector associated with the pair of i-th letter in e and j-th letter in h, including the dummy *. Our notation omits its dependency on e and h. u is a discriminative weight vector that will be learned from data. After finding the optimal Y ∗, [12] uses the maximal objective value of (24) to make the final binary prediction: −sign(P ij Y ∗ iju′φij). To pose the problem in our framework, we first notice that the non-box constraints G in (24) are TUM. Therefore, S is simply [0, 1] ˆm׈n ∩G. Given the decoded w, the output labeling principle above essentially duplicates u as the output layer weight. A key advantage of our method is to allow the weights of the two layers to be decoupled. By using a weight vector r ∈Rp, we define the output score as r′Φw, where Φ is a p-by- ˆmˆn matrix whose (i, j)-th column is φij. So Φ depends on e and h. Overall, our model follows by instantiating (12) as: min ∥U∥≤1 min ∥R∥≤1 E (e,h,z)∼˜p h max π max (θ,γ)∈N max v∈R min w −zr′Φw + vr′Φw −G∗(v) + π′w (25) −σS(π) + X ij(u′φij + σwij)(γwij −θij) i . (26) Once more we can minimize out w, which gives rise to a quadratic ∥(v −z)Φ′r + γΦ′u + π −σθ∥2. It is again amenable to SDP relaxation, where (Mu,u, Mr,u, Mr,r) correspond to (uu′, ru′, rr′) resp. 4.2 Homogeneous temporal models A variety of structured output problems are formulated with graphical models. We highlight the gist of our technique by using a concrete example: unsupervised structured learning for inpainting. Suppose we are given images of handwritten words, each segmented into p letters, and the latent representation is the corresponding letters. Since letters are correlated in their appearance in words, the recognition problem has long been addressed using linear chain conditional random fields. However imagine no ground truth letter label is available, and instead of predicting labels, we are given images in which a random small patch is occluded. So our goal will be inpainting the patches. To cast the problem in our two-layer latent structure model, let each letter image in the word be denoted as a vector xi ∈Rn, and the reconstructed image be zi ∈Rm (m = n here). Let Yi ∈{0, 1}h×h (h = 26) encode the labels of the letter pair at position i and i + 1 (as rows and columns of Yi respectively). Let Uv ∈Rh×n be the letter-wise discriminative weights, and Ue ∈Rh×h be the pairwise weights. Then by (2), the MAP inference can be reformulated as (ref. definition of H in (3)) min {Yi}∈Y Xp i=1 1′Y ′ i Uvxi + Xp−1 i=1 tr(U ′ eYi) where Y = {Yi} : Yi ∈{0, 1}C×C ∩H. (27) Since the non-box constraints in H are TUM, the problem can be cast in our framework with S = convY = {Yi} : Yi ∈[0, 1]C×C ∩H. Finally to reconstruct the image for each letter, we assume that each letter j has a basis vector rj ∈Rm. So given Wi, the output of reconstruction is R′Wi1, where R = (r1, . . . , rh)′. To summarize, our model can be instantiated from (12) as min ∥U∥≤1 min ∥R∥≤1 E (x,z)∼˜p h max Π max (Θ,γ)∈N max v min W Xp i=1(vi −zi)′R′Wi1 −G∗(vi) (28) + tr(Π′W) −σS(Π) + Xp i=1 tr((Uvxi1′ + Ji ̸= pK Ue + σWi)′(γWi −Θi)) i . Here zi is the inpainted images in the training set. If no training image is occluded, then just set zi to xi. The constraints on U and R can be refined, e.g. bounding ∥Uv∥, ∥Ue∥, and ∥rj∥separately. As before, we can derive a quadratic term ∥R(vi −zi)1′ + γUvxi1′ + γUe + Πi −σΘi∥2 by minimizing out Wi, which again leads to SDP relaxations. Even further, we may allow each letter to employ a set of principal components, whose combination yields the reconstruction (Appendix B). Besides modeling flexibility, our method also accommodates problem-specific simplification. For example, the dimension of w is often much higher than the number of non-box constraints. Appendix C shows that for linear chain, the dimension of w can be reduced from C2 to C via partial Lagrangian. 6 5 Optimization The key advantage of our convex relaxation (19) is that the inference depends on S (or equivalently Y) only through the polar operator. Our overall optimization scheme is to perform projected SGD over the function of M. This requires: a) given M, compute its objective value and gradient; and b) project to M1. We next detail the solution to the former, relegating the latter to Appendix D. Given M, we optimize over (π, θ, γ, v) by projected LBFGS [33]. The objective is easy to compute thanks to PO-tractability (for the σS(π) term). The only nontrivial part is to project a point (θ0, γ0) to N, which is actually amenable to conditional gradient (CG). Formally it requires solving minθ,γ 1 2 ∥θ −θ0∥2 + 1 2(γ −γ0)2, s.t. θ = γs, γ ∈[0, C], s ∈S. (29) W.l.o.g., we manually introduced an upper bound4 C := γ0 + p ∥θ0∥2 + γ2 0 on γ. At each iteration, CG queries the gradient gθ in θ and gγ in γ, and solves the polar operator problem on N: minθ∈γS,γ∈[0,C] θ′gθ+γgγ = mins∈S,γ∈[0,C] γs′gθ + γgγ = min{0, C mins∈S(s′gθ+gγ)}. (30) So it boils down to the polar operator on S, and is hence tractable. If the optimal value in (30) is nonnegative, then the current iterate is already optimal. Otherwise we add a basis (s∗, 1) to the ensemble and a totally corrective update can be performed by CG. More details are available in [34]. After finding the optimal ˆ M, we recover the optimal w for each training example based on the optimal w in (12). Using it as the initial point, we locally optimize the two layer models U and R based on (14). 6 Experimental Results To empirically evaluate our convex method (henceforth referred to as CVX), we compared it with the state-of-the-art methods on two prediction problems with latent structure. Transliteration The first experiment is based on the English-Hebrew corpus [35]. It consists of 250 positive transliteration pairs for training, and 300 pairs for testing. On average there are 6 characters per word in each of the languages. All these pairs are considered “positive examples", and for negative examples we followed [12] and randomly sampled t−∈{50, 75, 100} pairs from 2502 −250 mismatched pairings (which are 20%, 30%, and 40% of 250, resp). We did not use many negative examples because, as per [12], our test performance measure will depend mainly on the highest few discriminative values, which are learned largely from the positive examples. Given a pair of words (e, h), the feature representation φij for the i-th letter in e and j-th letter in h is defined as the unigram feature: an n-dimensional vector with all 0’s except a single one in the (ei, hj)-th coordinate. In this dataset, there are n = 655 possible letter pairs (* included). Since our primary objective is to determine whether the convex relaxation of a two-layer model with latent structure can outperform locally trained models, we adopted this simple but effective feature representation (rather than delving into heuristic feature engineering). Our test evaluation measurement is the Mean Reciprocal Rank (MRR), which is the average of the reciprocal of the rank of the correct answer. In particular, for each English word e, we calculated the discriminative score of respective methods when e is paired with each Hebrew word in the test set, and then found the rank of the correct word (1 for the highest). The reciprocal of the rank is averaged over all test pairs, giving the MRR. So a higher value is preferred, and 50% means on average the true Hebrew word is the runner-up. For our method, the discriminative score is simply f := r′Φw (using the symbols in (25)), and that for [12] is f := maxY ∈Y u′Φvec(Y ) (vectorization of Y ). We compared our method (with σ = 0.1) against the state-of-the-art approach in [12]. It is a special case of our model with the second-layer weight r tied with the first-layer weight u. They trained it using a local optimization method, and we will refer to it as Local. Both methods employ an output loss function max{0, yf}2 with y ∈{+1, −1}, and both contain only one parameter—the bound on ∥u∥(and ∥r∥). We simply tuned it to optimize the performance of Local. The test MRR is shown in Figure 1, where the number of negative examples was varied in 50, 75, and 100. Local was trained with random initialization, and we repeated the random selection of the negative examples for 10 times, yielding 10 dots in each scatter plot. It is clear that CVX in general delivers significantly higher MRR than Local, with the dots lying above or close to the diagonal. Since this dataset is not big, the randomness of the negative set leads to notable variations in the performance (for both methods). 4For γ to be optimal, we require (γ −γ0)2 ≤∥θ −θ0∥2 +(γ −γ0)2 ≤∥0−θ0∥2 +(0−γ0)2, i.e., γ ≤C. 7 50 60 70 80 MRR of Local 50 60 70 80 MRR of CVX (a) 50 negative examples 50 60 70 80 MRR of Local 50 60 70 80 MRR of CVX (b) 75 negative examples 70 80 90 MRR of Local 70 80 90 MRR of CVX (c) 100 negative examples Figure 1: MRR of Local versus CVX over 50, 75, and 100 negative examples. SIZE OF OCCLUDED PATCH (k × k) k = 2 k = 3 k = 4 CRF-AE 0.29±0.01 0.80±0.01 1.31±0.02 CVX 0.27±0.01 0.79±0.01 1.28±0.02 Table 1: Total inpainting error as a function of the size of occluded patch (p = 8). LENGTH OF SEQUENCE p = 4 p = 6 p = 8 CRF-AE 1.33±0.04 1.30±0.02 1.31±0.03 CVX 1.29±0.04 1.27±0.02 1.28±0.03 Table 2: Total inpainting error as a function of the length of sequences (k = 4). Inpainting for occluded image Our second experiment used structured latent model to inpaint images. We generated 200 sequences of images for training, each with p ∈{4, 6, 8} digits. In order to introduce structure, each sequence can be either odd (i.e. all digits are either 1 or 3) or even (all digits are 2 or 4). So C = 4. Given the digit label, the corresponding image (x ∈[0, 1]196) was sampled from the MNIST dataset, downsampled to 14-by-14. 200 test sequences were also generated. In the test data, we randomly set a k × k patch of each image to 0 as occluded (k ∈{2, 3, 4}), and the task is to inpaint it. This setting is entirely unsupervised, with no digit label available for training. It falls in the framework of X →Y →Z, where X is the occluded input, Y is the latent digit sequence, and Z is the recovered image. In our convex method, we tied Uv with R and so we still have a 3-by-3 block matrix M, corresponding to I, Uv and Ue. We set σ to 10−1 and G(·) = 1 2 ∥·∥2 (Gaussian). Y was predicted using the polar operator, based on which Z was predicted with the Gaussian mean. For comparison, we used CRF-AE, which was proposed very recently by [7]. Although it ties X and Z, extension to our setting is trivial by computing the expected value of Z given X. Here P(Z|Y ) is assumed a Gaussian whose mean is learned by maximizing P(Z = x|X = x), and we initialized all model parameters by unit Gaussian. For the ease of comparison, we introduced regularization by constraining model parameters to L2 norm balls rather than penalizing the squared L2 norm. For both methods, the radius bound was simply chosen as the maximum L2 norm of the images, which produced consistently good results. We did not use higher k because the images are sized 14-by-14. The error of inpainting given by the two methods is shown in Table 1 where we varied the size of the occluded patch with p fixed to 6, and in Table 2 where the length of the sequence p was varied while k was fixed to 4. Each number is the sum of squared error in the occluded patch, averaged over 5 random generations of training and test data (hence producing the mean and standard deviation). Here we can see that CVX gives lower error than CRF-AE. With no surprise, the error grows almost quadratically in k. When the length of sequence grows, the error of both CVX and CRF-AE fluctuates nonmonotonically. This is probably because with more images in each node, the total error is summed over more images, but the error per image decays thanks to the structure. 7 Conclusion We have presented a new formulation of two-layer models with latent structure, while maintaining a jointly convex training objective. Its effectiveness is demonstrated by the superior empirical performance over local training, along with low-rank characterization of the extreme points of the feasible region. An interesting extension for future investigation is when the latent layer employs submodularity, with its base polytope mirroring the support set S. 8 References [1] G. E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18:1527–1554, 2006. [2] L.-C. Chen, A. Schwing, A. Yuille, and R. Urtasun. Learning deep structured models. In ICML. 2015. [3] V. Mnih, H. Larochelle, and G. E. Hinton. Conditional restricted Boltzmann machines for structured output prediction. In AISTATS. 2011. [4] M. Ratajczak, S. Tschiatschek, and F. Pernkopf. Sum-product networks for structured prediction: Contextspecific deep conditional random fields. In Workshop on Learning Tractable Probabilistic Models. 2014. [5] K. Sohn, X. Yan, and H. Lee. Learning structured output representation using deep conditional generative models. In NIPS. 2015. [6] R. Collobert. Deep learning for efficient discriminative parsing. In ICML. 2011. [7] W. Ammar, C. Dyer, and N. A. Smith. Conditional random field autoencoders for unsupervised structured prediction. In NIPS. 2014. [8] L. Xu, D. Wilkinson, F. Southey, and D. Schuurmans. Discriminative unsupervised learning of structured predictors. In ICML. 2006. [9] H. Daumé III. Unsupervised search-based structured prediction. In ICML. 2009. [10] N. Smith and J. Eisner. Contrastive estimation: training log-linear models on unlabeled data. In ACL. 2005. [11] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [12] M.-W. Chang, D. Goldwasser, D. Roth, and V. Srikumar. Discriminative learning over constrained latent representations. In NAACL. 2010. [13] M.-W. Chang, V. Srikumar, D. Goldwasser, and D. Roth. Structured output learning with indirect supervision. In ICML. 2010. [14] N. Chen, J. Zhu, F. Sun, and E. P. Xing. Large-margin predictive latent subspace learning for multiview data analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(12):2365–2378, 2012. [15] H. Larochelle and Y. Bengio. Classification using discriminative restricted Boltzmann machines. In ICML. 2008. [16] T. Hazan and T. Jaakkola. On the partition function and random maximum a-posteriori perturbations. In ICML. 2012. [17] A. Gane, T. Hazan, and T. Jaakkola. Learning with random maximum a-posteriori perturbation models. In AISTATS. 2014. [18] B. Taskar, V. Chatalbashev, D. Koller, and C. Guestrin. Learning structured prediction models: A large margin approach. In ICML. 2005. [19] O. Aslan, X. Zhang, and D. Schuurmans. Convex deep learning via normalized kernels. In NIPS. 2014. [20] Y. Bengio, N. L. Roux, P. Vincent, O. Delalleau, and P. Marcotte. Convex neural networks. In NIPS. 2005. [21] S. Arora, A. Bhaskara, R. Ge, and T. Ma. Provable bounds for learning some deep representations. In ICML. 2014. [22] R. Livni, S. Shalev-Shwartz, and O. Shamir. An algorithm for training polynomial networks, 2014. ArXiv:1304.7045v2. [23] A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with Bregman divergences. Journal of Machine Learning Research, 6:1705–1749, 2005. [24] A. Gotovos, H. Hassani, and A. Krause. Sampling from probabilistic submodular models. In NIPS. 2015. [25] G. Haffari and A. Sarkar. Analysis of semi-supervised learning with Yarowsky algorithm. In UAI. 2007. [26] L. Xu, M. White, and D. Schuurmans. Optimal reverse prediction: a unified perspective on supervised, unsupervised and semi-supervised learning. In ICML. 2009. [27] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Program., 103(1):127–152, 2005. [28] O. Meshi, M. Mahdavi, and A. G. Schwing. Smooth and strong: Map inference with linear convergence. In NIPS. 2015. [29] G. Druck, C. Pal, X. Zhu, and A. McCallum. Semi-supervised classification with hybrid generative/discriminative methods. In KDD. 2007. [30] 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. [31] G. Pataki. On the rank of extreme matrices in semidefinite programs and the multiplicity of optimal eigenvalues. Mathematics of Operations Research, 23(2):339–358, 1998. [32] D. Goldwasser and D. Roth. Transliteration as constrained optimization. In EMNLP. 2008. [33] http://www.cs.ubc.ca/~schmidtm/Software/minConf.html. [34] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML. 2013. [35] https://cogcomp.cs.illinois.edu/page/resource_view/2. 9 | 2016 | 198 |
6,103 | Online Convex Optimization with Unconstrained Domains and Losses Ashok Cutkosky Department of Computer Science Stanford University ashokc@cs.stanford.edu Kwabena Boahen Department of Bioengineering Stanford University boahen@stanford.edu Abstract We propose an online convex optimization algorithm (RESCALEDEXP) that achieves optimal regret in the unconstrained setting without prior knowledge of any bounds on the loss functions. We prove a lower bound showing an exponential separation between the regret of existing algorithms that require a known bound on the loss functions and any algorithm that does not require such knowledge. RESCALEDEXP matches this lower bound asymptotically in the number of iterations. RESCALEDEXP is naturally hyperparameter-free and we demonstrate empirically that it matches prior optimization algorithms that require hyperparameter optimization. 1 Online Convex Optimization Online Convex Optimization (OCO) [1, 2] provides an elegant framework for modeling noisy, antagonistic or changing environments. The problem can be stated formally with the help of the following definitions: Convex Set: A set W is convex if W is contained in some real vector space and tw+(1−t)w′ ∈W for all w, w′ ∈W and t ∈[0, 1]. Convex Function: f : W →R is a convex function if f(tw + (1 −t)w′) ≤tf(w) + (1 −t)f(w′) for all w, w′ ∈W and t ∈[0, 1]. An OCO problem is a game of repeated rounds in which on round t a learner first chooses an element wt in some convex space W, then receives a convex loss function ℓt, and suffers loss ℓt(wt). The regret of the learner with respect to some other u ∈W is defined by RT (u) = T X t=1 ℓt(wt) −ℓt(u) The objective is to design an algorithm that can achieve low regret with respect to any u, even in the face of adversarially chosen ℓt. Many practical problems can be formulated as OCO problems. For example, the stochastic optimization problems found widely throughout machine learning have exactly the same form, but with i.i.d. loss functions, a subset of the OCO problems. In this setting the goal is to identify a vector w⋆with low generalization error (E[ℓ(w⋆) −ℓ(u)]). We can solve this by running an OCO algorithm for T rounds and setting w⋆to be the average value of wt. By online-to-batch conversion results [3, 4], the generalization error is bounded by the expectation of the regret over the ℓt divided by T. Thus, OCO algorithms can be used to solve stochastic optimization problems while also performing well in non-i.i.d. settings. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. The regret of an OCO problem is upper-bounded by the regret on a corresponding Online Linear Optimization (OLO) problem, in which each ℓt is further constrained to be a linear function: ℓt(w) = gt · wt for some gt. The reduction follows, with the help of one more definition: Subgradient: g ∈W is a subgradient of f at w, denoted g ∈∂f(w), if and only if f(w) + g · (w′ − w) ≤f(w′) for all w′. Note that ∂f(w) ̸= ∅if f is convex.1 To reduce OCO to OLO, suppose gt ∈∂ℓt(wt), and consider replacing ℓt(w) with the linear approximation gt · w. Then using the definition of subgradient, RT (u) = T X t=1 ℓt(wt) −ℓt(u) ≤ T X t=1 gt(wt −u) = T X t=1 gtwt −gtu so that replacing ℓt(w) with gt · w can only make the problem more difficult. All of the analysis in this paper therefore addresses OLO, accessing convex losses functions only through subgradients. There are two major factors that influence the regret of OLO algorithms: the size of the space W and the size of the subgradients gt. When W is a bounded set (the “constrained” case), then given B = maxw∈W ∥w∥, there exist OLO algorithms [5, 6] that can achieve RT (u) ≤O BLmax √ T without knowing Lmax = maxt ∥gt∥. When W is unbounded (the “unconstrained” case), then given Lmax, there exist algorithms [7, 8, 9] that achieve RT (u) ≤˜O(∥u∥log(∥u∥)Lmax √ T) or Rt(u) ≤˜O(∥u∥ p log(∥u∥)Lmax √ T), where ˜O hides factors that depend logarithmically on Lmax and T. These algorithms are known to be optimal (up to constants) for their respective regimes [10, 7]. All algorithms for the unconstrained setting to-date require knowledge of Lmax to achieve these optimal bounds.2 Thus a natural question is: can we achieve O(∥u∥log(∥u∥)) regret in the unconstrained, unknown-Lmax setting? This problem has been posed as a COLT 2016 open problem [12], and is solved in this paper. A simple approach is to maintain an estimate of Lmax and double it whenever we see a new gt that violates the assumed bound (the so-called “doubling trick”), thereby turning a known-Lmax algorithm into an unknown-Lmax algorithm. This strategy fails for previous known-Lmax algorithms because their analysis makes strong use of the assumption that each and every ∥gt∥is bounded by Lmax. The existence of even a small number of bound-violating gt can throw off the entire analysis. In this paper, we prove that it is actually impossible to achieve regret O ∥u∥log(∥u∥)Lmax √ T + Lmax exp maxt ∥gt∥ L(t) 1/2−ϵ for any ϵ > 0 where Lmax and L(t) = maxt′<t ∥gt′∥are unknown in advance (Section 2). This immediately rules out the “ideal” bound of ˜O(∥u∥ p log(∥u∥)Lmax √ T) which is possible in the known-Lmax case. Secondly, we provide an algorithm, RESCALEDEXP, that matches our lower bound without prior knowledge of Lmax, leading to a naturally hyperparameter-free algorithm (Section 3). To our knowledge, this is the first algorithm to address the unknown-Lmax issue while maintaining O(∥u∥log ∥u∥) dependence on u. Finally, we present empirical results showing that RESCALEDEXP performs well in practice (Section 4). 2 Lower Bound with Unknown Lmax The following theorem rules out algorithms that achieve regret O(u log(u)Lmax √ T) without prior knowledge of Lmax. In fact, any such algorithm must pay an up-front penalty that is exponential in T. This lower bound resolves a COLT 2016 open problem (Parameter-Free and Scale-Free Online Algorithms) [12] in the negative. 1In full generality, a subgradient is an element of the dual space W ∗. However, we will only consider cases where the subgradient is naturally identified with an element in the original space W (e.g. W is finite dimensional) so that the definition in terms of dot-products suffices. 2There are algorithms that do not require Lmax, but achieve only regret O(∥u∥2) [11] 2 Theorem 1. For any constants c, k, ϵ > 0, there exists a T and an adversarial strategy picking gt ∈R in response to wt ∈R such that regret is: RT (u) = T X t=1 gtwt −gtu ≥(k + c∥u∥log ∥u∥)Lmax √ T log(Lmax + 1) + kLmax exp((2T)1/2−ϵ) ≥(k + c∥u∥log ∥u∥)Lmax √ T log(Lmax + 1) + kLmax exp " max t ∥gt∥ L(t) 1/2−ϵ# for some u ∈R where Lmax = maxt≤T ∥gt∥and L(t) = maxt′<t ∥gt′∥. Proof. We prove the theorem by showing that for sufficiently large T, the adversary can “checkmate” the learner by presenting it only with the subgradient gt = −1. If the learner fails to have wt increase quickly, then there is a u ≫1 against which the learner has high regret. On the other hand, if the learner ever does make wt higher than a particular threshold, the adversary immediately punishes the learner with a subgradient gt = 2T, again resulting in high regret. Let T be large enough such that both of the following hold: T 4 exp( T 1/2 4 log(2)c) > k log(2) √ T + k exp((2T)1/2−ϵ) (1) T 2 exp( T 1/2 4 log(2)c) > 2kT exp((2T)1/2−ϵ) + 2kT √ T log(2T + 1) (2) The adversary plays the following strategy: for all t ≤T, so long as wt < 1 2 exp(T 1/2/4 log(2)c), give gt = −1. As soon as wt ≥1 2 exp(T 1/2/4 log(2)c), give gt = 2T and gt = 0 for all subsequent t. Let’s analyze the regret at time T in these two cases. Case 1: wt < 1 2 exp(T 1/2/4 log(2)c) for all t: In this case, let u = exp(T 1/2/4 log(2)c). Then Lmax = 1, maxt ∥gt∥ L(t) = 1, and using (1) the learner’s regret is at least RT (u) ≥Tu −T 1 2 exp( T 1/2 4 log(2)c) = 1 2Tu = cu log(u) √ T log(2) + T 4 exp( T 1/2 4 log(2)c) > cu log(u)Lmax √ T log(Lmax + 1) + kLmax √ T log(Lmax + 1) + kLmax exp((2T)1/2−ϵ) = (k + cu log u)Lmax √ T log(Lmax + 1) + kLmax exp h max t (2T)1/2−ϵi Case 2: wt ≥1 2 exp(T 1/2/4 log(2)c) for some t: In this case, Lmax = 2T and maxt ∥gt∥ L(t) = 2T. For u = 0, using (2), the regret is at least RT (u) ≥T 2 exp( T 1/2 4 log(2)c) ≥2kT exp((2T)1/2−ϵ) + 2kT √ T log(2T + 1) = kLmax exp((2T)1/2−ϵ) + kLmax √ T log(Lmax + 1) = (k + cu log u)Lmax √ T log(Lmax + 1) + kLmax exp h max t (2T)1/2−ϵi The exponential lower-bound arises because the learner has to move exponentially fast in order to deal with exponentially far away u, but then experiences exponential regret if the adversary provides a gradient of unprecedented magnitude in the opposite direction. However, if we play against an adversary that is constrained to give loss vectors ∥gt∥≤Lmax for some Lmax that does not grow with time, or if the losses do not grow too quickly, then we can still achieve RT (u) = O(∥u∥log(∥u∥)Lmax √ T) asymptotically without knowing Lmax. In the following sections we describe an algorithm that accomplishes this. 3 3 RESCALEDEXP Our algorithm, RESCALEDEXP, adapts to the unknown Lmax using a guess-and-double strategy that is robust to a small number of bound-violating gts. We initialize a guess L for Lmax to ∥g1∥. Then we run a novel known-Lmax algorithm that can achieve good regret in the unconstrained u setting. As soon as we see a gt with ∥gt∥> 2L, we update our guess to ∥gt∥and restart the known-Lmax algorithm. To prove that this scheme is effective, we show (Lemma 3) that our known-Lmax algorithm does not suffer too much regret when it sees a gt that violates its assumed bound. Our known-Lmax algorithm uses the Follow-the-Regularized-Leader (FTRL) framework. FTRL is an intuitive way to design OCO algorithms [13]: Given functions ψt : W →R, at time T we play wT = argmin h ψT −1(w) + PT −1 t=1 ℓt(w) i . The functions ψt are called regularizers. A large number of OCO algorithms (e.g. gradient descent) can be cleanly formulated as instances of this framework. Our known-Lmax algorithm is FTRL with regularizers ψt(w) = ψ(w)/ηt, where ψ(w) = (∥w∥+ 1) log(∥w∥+ 1) −∥w∥and ηt is a scale-factor that we adapt over time. Specifically, we set η−1 t = k √ 2 p Mt + ∥g∥2 1:t, where we use the compressed sum notations g1:T = PT t=1 gt and ∥g∥2 1:T = PT t=1 ∥gt∥2. Mt is defined recursively by M0 = 0 and Mt = max(Mt−1, ∥g1:t∥/p −∥g∥2 1:t), so that Mt ≥Mt−1, and Mt + ∥g∥2 1:t ≥∥g1:t∥/p. k and p are constants: k = √ 2 and p = L−1 max. RESCALEDEXP’s strategy is to maintain an estimate Lt of Lmax at all time steps. Whenever it observes ∥gt∥≥2Lt, it updates Lt+1 = ∥gt∥. We call periods during which Lt is constant epochs. Every time it updates Lt, it restarts our known-Lmax algorithm with p = 1 Lt , beginning a new epoch. Notice that since Lt at least doubles every epoch, there will be at most log2(Lmax/L1) + 1 total epochs. To address edge cases, we set wt = 0 until we suffer a non-constant loss function, and we set the initial value of Lt to be the first non-zero gt. Pseudo-code is given in Algorithm 1, and Theorem 2 states our regret bound. For simplicity, we re-index so that that g1 is the first non-zero gradient received. No regret is suffered when gt = 0 so this does not affect our analysis. Algorithm 1 RESCALEDEXP Initialize: k ← √ 2, M0 ←0, w1 ←0, t⋆←1 // t⋆is the start-time of the current epoch. for t = 1 to T do Play wt, receive subgradient gt ∈∂ℓt(wt). if t = 1 then L1 ←∥g1∥ p ←1/L1 end if Mt ←max(Mt−1, ∥gt⋆:t∥/p −∥g∥2 t⋆:t). ηt ← 1 k√ 2(Mt+∥g∥2 t⋆:t) //Set wt+1 using FTRL update wt+1 ←−gt⋆:t ∥gt⋆:t∥[exp(ηt∥gt⋆:t∥) −1] // = argminw h ψ(w) ηt + gt⋆:tw i if ∥gt∥> 2Lt then //Begin a new epoch: update L and restart FTRL Lt+1 ←∥gt∥ p ←1/Lt+1 t⋆←t + 1 Mt ←0 wt+1 ←0 else Lt+1 ←Lt end if end for Theorem 2. Let W be a separable real inner-product space with corresponding norm ∥· ∥and suppose (with mild abuse of notation) every loss function ℓt : W →R has some subgradient gt ∈W ∗ at wt such that gt(w) = gt · w for some gt ∈W. Let Mmax = maxt Mt. Then if Lmax = maxt ∥gt∥ 4 and L(t) = maxt′<t ∥gt∥, rescaledexp achieves regret: RT (u) ≤(2ψ(u) + 96) log2 Lmax L1 + 1 q Mmax + ∥g∥2 1:T + 8Lmax log2 Lmax L1 + 1 min exp 8 max t ∥gt∥2 L(t)2 , exp( p T/2) = O Lmax log Lmax L1 (∥u∥log(∥u∥) + 2) √ T + exp 8 max t ∥gt∥2 L(t)2 The conditions on W in Theorem 2 are fairly mild. In particular they are satisfied whenever W is finite-dimensional and in most kernel method settings [14]. In the kernel method setting, W is an RKHS of functions X →R and our losses take the form ℓt(w) = ℓt(⟨w, kxt⟩) where kxt is the representing element in W of some xt ∈X, so that gt = gtkxt where gt ∈∂ℓt(⟨w, kxt⟩). Although we nearly match our lower-bound exponential term of exp((2T)1/2−ϵ), in order to have a practical algorithm we need to do much better. Fortunately, the maxt ∥gt∥2 L(t)2 term may be significantly smaller when the losses are not fully adversarial. For example, if the loss vectors gt satisfy ∥gt∥= t2, then the exponential term in our bound reduces to a manageable constant even though ∥gt∥is growing quickly without bound. To prove Theorem 2, we bound the regret of RESCALEDEXP during each epoch. Recall that during an epoch, RESCALEDEXP is running FTRL with ψt(w) = ψ(w)/ηt. Therefore our first order of business is to analyze the regret of FTRL across one of these epochs, which we do in Lemma 3 (proved in appendix): Lemma 3. Set k = √ 2. Suppose ∥gt∥≤L for t < T, 1/L ≤p ≤2/L, gT ≤Lmax and Lmax ≥L. Let Wmax = maxt∈[1,T ] ∥wt∥. Then the regret of FTRL with regularizers ψt(w) = ψ(w)/ηt is: RT (u) ≤ψ(u)/ηT + 96 q MT + ∥g∥2 1:T + 2Lmax min Wmax, 4 exp 4L2 max L2 , exp( p T/2) ≤(2ψ(u) + 96) v u u t T −1 X t=1 L|gt| + L2max + 8Lmax min exp 4L2 max L2 , exp( p T/2) ≤Lmax(2((∥u∥+ 1) log(∥u∥+ 1) −∥u∥) + 96) √ T + 8Lmax min e 4L2 max L2 , e √ T/2 Lemma 3 requires us to know the value of L in order to set p. However, the crucial point is that it encompasses the case in which L is misspecified on the last loss vector. This allows us to show that RESCALEDEXP does not suffer too much by updating p on-the-fly. Proof of Theorem 2. The theorem follows by applying Lemma 3 to each epoch in which Lt is constant. Let 1 = t1, t2, t3, · · · , tn be the various increasing values of t⋆(as defined in Algorithm 1), and we define tn+1 = T + 1. Then define Ra:b(u) = b−1 X t=a gt(wt −u) so that RT (u) ≤Pn j=1 Rtj:tj+1(u). We will bound Rtj:tj+1(u) for each j. Fix a particular j < n. Then Rtj:tj+1(u) is simply the regret of FTRL with k = √ 2, p = 1 Ltj , ηt = 1 k q 2(Mt+∥g∥2 tj :t) and regularizers ψ(w)/ηt. By definition of Lt, for t ∈[1, tj+1 −2] we have ∥gt∥≤2Ltj. Further, if L = maxt∈[1,tj+1−2] ∥gt∥we have L ≥Ltj. Therefore, Ltj ≤L ≤2Ltj so that 1 L ≤p ≤2 L. Further, we have ∥gtj+1−1∥/Ltj ≤2 maxt ∥gt∥/L(t). Thus by Lemma 3 we 5 have Rtj:tj+1(u) ≤ψ(u)/ηtj+1−1 + 96 q Mtj+1−1 + ∥g∥2 tj:tj+1−1 + 2Lmax min " Wmax, 4 exp 4∥gtj+1−1∥2 L2 tj ! , exp √tj+1 −tj √ 2 # ≤ψ(u)/ηtj+1−1 + 96 q Mmax + ∥g∥2 tj:tj+1−1 + 8Lmax min e 8 maxt ∥gt∥2 L(t)2 , e √ T/2 ≤(2ψ(u) + 96) q Mmax + ∥g∥2 1:T + 8Lmax min exp 8 max t ∥gt∥2 L(t)2 , exp( p T/2) Summing across epochs, we have RT (u) = n X j=1 Rtj:tj+1(u) ≤n (2ψ(u) + 96) q Mmax + ∥g∥2 1:T + 8Lmax min exp 8 max t ∥gt∥2 L(t)2 , exp p T/2 Observe that n ≤log2(Lmax/L1) + 1 to prove the first line of the theorem. The big-Oh expression follows from the inequality: Mtj+1−1 ≤Ltj Ptj+1−1 t=tj ∥gt∥≤Lmax PT t=1 ∥gt∥. Our specific choices for k and p are somewhat arbitrary. We suspect (although we do not prove) that the preceding theorems are true for larger values of k and any p inversely proportional to Lt, albeit with differing constants. In Section 4 we perform experiments using the values for k, p and Lt described in Algorithm 1. In keeping with the spirit of designing a hyperparameter-free algorithm, no attempt was made to empirically optimize these values at any time. 4 Experiments 4.1 Linear Classification To validate our theoretical results in practice, we evaluated RESCALEDEXP on 8 classification datasets. The data for each task was pulled from the libsvm website [15], and can be found individually in a variety of sources [16, 17, 18, 19, 20, 21, 22]. We use linear classifiers with hinge-loss for each task and we compare RESCALEDEXP to five other optimization algorithms: ADAGRAD [5], SCALEINVARIANT [23], PISTOL [24], ADAM [25], and ADADELTA [26]. Each of these algorithms requires tuning of some hyperparameter for unconstrained problems with unknown Lmax (usually a scale-factor on a learning rate). In contrast, our RESCALEDEXP requires no such tuning. We evaluate each algorithm with the average loss after one pass through the data, computing a prediction, an error, and an update to model parameters for each example in the dataset. Note that this is not the same as a cross-validated error, but is closer to the notion of regret addressed in our theorems. We plot this average loss versus hyperparameter setting for each dataset in Figures 1 and 2. These data bear out the effectiveness of RESCALEDEXP: while it is not unilaterally the highest performer on all datasets, it shows remarkable robustness across datasets with zero manual tuning. 4.2 Convolutional Neural Networks We also evaluated RESCALEDEXP on two convolutional neural network models. These models have demonstrated remarkable success in computer vision tasks and are becoming increasingly more popular in a variety of areas, but can require significant hyperparameter tuning to train. We consider the MNIST [18] and CIFAR-10 [27] image classification tasks. Our MNIST architecture consisted of two consecutive 5×5 convolution and 2×2 max-pooling layers followed by a 512-neuron fully-connected layer. Our CIFAR-10 architecture was two consecutive 5 × 5 convolution and 3 × 3 max-pooling layers followed by a 384-neuron fully-connected layer and a 192-neuron fully-connected layer. 6 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-2 10-1 100 101 average loss covtype PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-2 10-1 100 average loss gisette_scale PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 0.30 0.35 0.40 0.45 0.50 0.55 0.60 average loss madelon PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-2 10-1 100 average loss mnist PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp Figure 1: Average loss vs hyperparameter setting for each algorithm across each dataset. RESCALEDEXP has no hyperparameters and so is represented by a flat yellow line. Many of the other algorithms display large sensitivity to hyperparameter setting. These models are highly non-convex, so that none of our theoretical analysis applies. Our use of RESCALEDEXP is motivated by the fact that in practice convex methods are used to train these models. We found that RESCALEDEXP can match the performance of other popular algorithms (see Figure 3). In order to achieve this performance, we made a slight modification to RESCALEDEXP: when we update Lt, instead of resetting wt to zero, we re-center the algorithm about the previous prediction point. We provide no theoretical justification for this modification, but only note that it makes intuitive sense in stochastic optimization problems, where one can reasonably expect that the previous prediction vector is closer to the optimal value than zero. 5 Conclusions We have presented RESCALEDEXP, an Online Convex Optimization algorithm that achieves regret ˜O(∥u∥log(∥u∥)Lmax √ T + exp(8 maxt ∥gt∥2/L(t)2)) where Lmax = maxt ∥gt∥is unknown in advance. Since RESCALEDEXP does not use any prior-knowledge about the losses or comparison vector u, it is hyperparameter free and so does not require any tuning of learning rates. We also prove a lower-bound showing that any algorithm that addresses the unknown-Lmax scenario must suffer an exponential penalty in the regret. We compare RESCALEDEXP to prior optimization algorithms empirically and show that it matches their performance. While our lower-bound matches our regret bound for RESCALEDEXP in terms of T, clearly there is much work to be done. For example, when RESCALEDEXP is run on the adversarial loss sequence presented in Theorem 1, its regret matches the lower-bound, suggesting that the optimality gap could be improved with superior analysis. We also hope that our lower-bound inspires work in algorithms that adapt to non-adversarial properties of the losses to avoid the exponential penalty. 7 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-2 10-1 100 average loss ijcnn1 PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-1 100 average loss epsilon_normalized PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-1 100 average loss rcv1_train.multiclass PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp 10-5 10-4 10-3 10-2 10-1 100 101 102 103 hyperparameter setting 10-1 100 average loss SenseIT Vehicle Combined PiSTOL Scale Invariant ADAM AdaDelta AdaGrad RescaledExp Figure 2: Average loss vs hyperparameter setting, continued from Figure 1. Figure 3: We compare RESCALEDEXP to ADAM, ADAGRAD, and stochastic gradient descent (SGD), with learning-rate hyperparameter optimization for the latter three algorithms. All algorithms achieve a final validation accuracy of 99% on MNIST and 84%, 84%, 83% and 85% respectively on CIFAR-10 (after 40000 iterations). References [1] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 928–936, 2003. [2] Shai Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. [3] Nick Littlestone. From on-line to batch learning. In Proceedings of the second annual workshop on Computational learning theory, pages 269–284, 2014. 8 [4] Nicolo Cesa-Bianchi, Alex Conconi, and Claudio Gentile. On the generalization ability of on-line learning algorithms. Information Theory, IEEE Transactions on, 50(9):2050–2057, 2004. [5] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. In Conference on Learning Theory (COLT), 2010. [6] H. Brendan McMahan and Matthew Streeter. Adaptive bound optimization for online convex optimization. In Proceedings of the 23rd Annual Conference on Learning Theory (COLT), 2010. [7] Brendan Mcmahan and Matthew Streeter. No-regret algorithms for unconstrained online convex optimization. In Advances in neural information processing systems, pages 2402–2410, 2012. [8] Francesco Orabona. Dimension-free exponentiated gradient. In Advances in Neural Information Processing Systems, pages 1806–1814, 2013. [9] Brendan McMahan and Jacob Abernethy. Minimax optimal algorithms for unconstrained linear optimization. In Advances in Neural Information Processing Systems, pages 2724–2732, 2013. [10] Jacob Abernethy, Peter L Bartlett, Alexander Rakhlin, and Ambuj Tewari. Optimal strategies and minimax lower bounds for online convex games. In Proceedings of the nineteenth annual conference on computational learning theory, 2008. [11] Francesco Orabona and Dávid Pál. Scale-free online learning. arXiv preprint arXiv:1601.01974, 2016. [12] Francesco Orabona and Dávid Pál. Open problem: Parameter-free and scale-free online algorithms. In Conference on Learning Theory, 2016. [13] S. Shalev-Shwartz. Online Learning: Theory, Algorithms, and Applications. PhD thesis, The Hebrew University of Jerusalem, 2007. [14] Thomas Hofmann, Bernhard Schölkopf, and Alexander J Smola. Kernel methods in machine learning. The annals of statistics, pages 1171–1220, 2008. [15] Chih-Chung Chang and Chih-Jen Lin. Libsvm: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology (TIST), 2(3):27, 2011. [16] Isabelle Guyon, Steve Gunn, Asa Ben-Hur, and Gideon Dror. Result analysis of the nips 2003 feature selection challenge. In Advances in Neural Information Processing Systems, pages 545–552, 2004. [17] Chih-chung Chang and Chih-Jen Lin. Ijcnn 2001 challenge: Generalization ability and text decoding. In In Proceedings of IJCNN. IEEE. Citeseer, 2001. [18] 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. [19] David D Lewis, Yiming Yang, Tony G Rose, and Fan Li. Rcv1: A new benchmark collection for text categorization research. The Journal of Machine Learning Research, 5:361–397, 2004. [20] Marco F Duarte and Yu Hen Hu. Vehicle classification in distributed sensor networks. Journal of Parallel and Distributed Computing, 64(7):826–838, 2004. [21] M. Lichman. UCI machine learning repository, 2013. [22] Shimon Kogan, Dimitry Levin, Bryan R Routledge, Jacob S Sagi, and Noah A Smith. Predicting risk from financial reports with regression. In Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 272–280. Association for Computational Linguistics, 2009. [23] Francesco Orabona, Koby Crammer, and Nicolo Cesa-Bianchi. A generalized online mirror descent with applications to classification and regression. Machine Learning, 99(3):411–435, 2014. [24] Francesco Orabona. Simultaneous model selection and optimization through parameter-free stochastic learning. In Advances in Neural Information Processing Systems, pages 1116–1124, 2014. [25] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [26] Matthew D Zeiler. Adadelta: An adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. [27] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. [28] H. Brendan McMahan. A survey of algorithms and analysis for adaptive online learning. arXiv preprint arXiv:1403.3465, 2014. 9 | 2016 | 199 |
6,104 | A Locally Adaptive Normal Distribution Georgios Arvanitidis, Lars Kai Hansen and Søren Hauberg Technical University of Denmark, Lyngby, Denmark DTU Compute, Section for Cognitive Systems {gear,lkai,sohau}@dtu.dk Abstract The multivariate normal density is a monotonic function of the distance to the mean, and its ellipsoidal shape is due to the underlying Euclidean metric. We suggest to replace this metric with a locally adaptive, smoothly changing (Riemannian) metric that favors regions of high local density. The resulting locally adaptive normal distribution (LAND) is a generalization of the normal distribution to the “manifold” setting, where data is assumed to lie near a potentially low-dimensional manifold embedded in RD. The LAND is parametric, depending only on a mean and a covariance, and is the maximum entropy distribution under the given metric. The underlying metric is, however, non-parametric. We develop a maximum likelihood algorithm to infer the distribution parameters that relies on a combination of gradient descent and Monte Carlo integration. We further extend the LAND to mixture models, and provide the corresponding EM algorithm. We demonstrate the efficiency of the LAND to fit non-trivial probability distributions over both synthetic data, and EEG measurements of human sleep. 1 Introduction The multivariate normal distribution is a fundamental building block in many machine learning algorithms, and its well-known density can compactly be written as p(x | µ, Σ) ∝exp −1 2dist2 Σ(µ, x) , (1) where dist2 Σ(µ, x) denotes the Mahalanobis distance for covariance matrix Σ. This distance measure corresponds to the length of the straight line connecting µ and x, and consequently the normal distribution is often used to model linear phenomena. When data lies near a nonlinear manifold embedded in RD the normal distribution becomes inadequate due to its linear metric. We investigate if a useful distribution can be constructed by replacing the linear distance function with a nonlinear counterpart. This is similar in spirit to Isomap [21] that famously replace the linear distance with a geodesic distance measured over a neighborhood graph spanned by the data, thereby allowing for a nonlinear model. This is, however, a discrete distance measure that is only well-defined over the training data. For a generative model, we need a continuously defined metric over the entire RD. Following Hauberg et al. [9] we learn a smoothly changing metric that favors regions of high density i.e., geodesics tend to move near the data. Under this metric, the data space is interpreted as a D-dimensional Riemannian manifold. This “manifold learning” does not change dimensionality, but merely provides a local description of the data. The Riemannian view-point, however, gives a strong mathematical foundation upon which the proposed distribution can be developed. Our work, thus, bridges work on statistics on Riemannian manifolds [15, 23] with manifold learning [21]. We develop a locally adaptive normal distribution (LAND) as follows: First, we construct a metric that captures the nonlinear structure of the data and enables us to compute geodesics; from this, an 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Geodesics Data LAND mean Linear Geodesic LAND model LAND mean Linear model Linear mean Figure 1: Illustration of the LAND using MNIST images of the digit 1 projected onto the first 2 principal components. Left: comparison of the geodesic and the linear distance. Center: the proposed locally adaptive normal distribution. Right: the Euclidean normal distribution. unnormalized density is trivially defined. Second, we propose a scalable Monte Carlo integration scheme for normalizing the density with respect to the measure induced by the metric. Third, we develop a gradient-based algorithm for maximum likelihood estimation on the learned manifold. We further consider a mixture of LANDs and provide the corresponding EM algorithm. The usefulness of the model is verified on both synthetic data and EEG measurements of human sleep stages. Notation: all points x ∈RD are considered as column vectors, and they are denoted with bold lowercase characters. SD ++ represents the set of symmetric D × D positive definite matrices. The learned Riemannian manifold is denoted M, and its tangent space at x ∈M is denoted TxM. 2 A Brief Summary of Riemannian Geometry We start our exposition with a brief review of Riemannian manifolds [6]. These smooth manifolds are naturally equipped with a distance measure, and are commonly used to model physical phenomena such as dynamical or periodic systems, and many problems that have a smooth behavior. Definition 1. A smooth manifold M together with a Riemannian metric M : M →SD ++ is called a Riemannian manifold. The Riemannian metric M encodes a smoothly changing inner product ⟨u, M(x)v⟩on the tangent space u, v ∈TxM of each point x ∈M. Remark 1. The Riemannian metric M(x) acts on tangent vectors, and may, thus, be interpreted as a standard Mahalanobis metric restricted to an infinitesimal region around x. The local inner product based on M is a suitable model for capturing local behavior of data, i.e. manifold learning. From the inner product, we can define geodesics as length-minimizing curves connecting two points x, y ∈M, i.e. ˆγ = argmin γ Z 1 0 p ⟨γ′(t), M(γ(t))γ′(t)⟩dt, s.t. γ(0) = x, γ(1) = y. (2) Here M(γ(t)) is the metric tensor at γ(t), and the tangent vector γ′ denotes the derivative (velocity) of γ. The distance between x and y is defined as the length of the geodesic. A standard result from differential geometry is that the geodesic can be found as the solution to a system of 2nd order ordinary differential equations (ODEs) [6, 9]: x y = Expx(v) v = Logx(y) γ(t) Figure 2: An illustration of the exponential and logarithmic maps. γ′′(t) = −1 2M−1(γ(t)) ∂vec[M(γ(t))] ∂γ(t) ⊺ (γ′(t) ⊗γ′(t)) (3) subject to γ(0) = x, γ(1) = y. Here vec[·] stacks the columns of a matrix into a vector and ⊗is the Kronecker product. This differential equation allows us to define basic operations on the manifold. The exponential map at a point x takes a tangent vector v ∈TxM to y = Expx(v) ∈M such that the curve γ(t) = Expx(t · v) is a geodesic originating at x with initial 2 velocity v and length ∥v∥. The inverse mapping, which takes y to TxM is known as the logarithm map and is denoted Logx(y). By definition ∥Logx(y)∥corresponds to the geodesic distance from x to y. These operations are illustrated in Fig. 2. The exponential and the logarithmic map can be computed by solving Eq. 3 numerically, as an initial value problem (IVP) or a boundary value problem (BVP) respectively. In practice the IVPs are substantially faster to compute than the BVPs. The Mahalanobis distance is naturally extended to Riemannian manifolds as dist2 Σ(x, y) = ⟨Logx(y), Σ−1Logx(y)⟩. From this, Pennec [15] considered the Riemannian normal distribution pM(x | µ, Σ) = 1 C exp −1 2⟨Logµ(x), Σ−1Logµ(x)⟩ , x ∈M (4) and showed that it is the manifold-valued distribution with maximum entropy subject to a known mean and covariance. This distribution is an instance of Eq. 1 and is the distribution we consider in this paper. Next, we consider standard “intrinsic least squares” estimates of µ and Σ. 2.1 Intrinsic Least Squares Estimators Let the data be generated from an unknown probability distribution qM(x) on a manifold. Then it is common [15] to define the intrinsic mean of the distribution as the point that minimize the variance ˆµ = argmin µ∈M Z M dist2(µ, x)qM(x)dM(x), (5) where dM(x) is the measure (or infinitesimal volume element) induced by the metric. Based on the mean, a covariance matrix can be defined ˆΣ = Z D(ˆµ) Logˆµ(x)Logˆµ(x)⊺qM(x)dM(x), (6) where D(ˆµ) is the domain over which TˆµM is well-defined. For the manifolds we consider, the domain D(ˆµ) is RD. Practical estimators of ˆµ rely on gradient-based optimization to find a local minimizer of Eq. 5, which is well-defined [12]. For finite data {xn}N n=1, the descent direction is proportional to ˆv = PN n=1 Logµ(xn) ∈TµM, and the updated mean is a point on the geodesic curve γ(t) = Expµ(t · ˆv). After estimating the mean, the empirical covariance matrix is estimated as ˆΣ = 1 N−1 PN n=1 Logˆµ(xn)Logˆµ(xn)⊺. It is worth noting that even though these estimators are natural, they are not maximum likelihood estimates for the Riemannian normal distribution (4). In practice, the intrinsic mean often falls in regions of low data density [8]. For instance, consider data distributed uniformly on the equator of a sphere, then the optima of Eq. 5 is either of the poles. Consequently, the empirical covariance is often overestimated. 3 A Locally Adaptive Normal Distribution We now have the tools to define a locally adaptive normal distribution (LAND): we replace the linear Euclidean distance with a locally adaptive Riemannian distance and study the corresponding Riemannian normal distribution (4). By learning a Riemannian manifold and using its structure to estimate distributions of the data, we provide a new and useful link between Riemannian statistics and manifold learning. 3.1 Constructing a Metric In the context of manifold learning, Hauberg et al. [9] suggest to model the local behavior of the data manifold via a locally-defined Riemannian metric. Here we propose to use a local covariance matrix to represent the local structure of the data. We only consider diagonal covariances for computational efficiency and to prevent the overfitting. The locality of the covariance is defined via an isotropic Gaussian kernel of size σ. Thus, the metric tensor at x ∈M is defined as the inverse of a local diagonal covariance matrix with entries Mdd(x) = N X n=1 wn(x)(xnd −xd)2 + ρ !−1 , with wn(x) = exp −∥xn −x∥2 2 2σ2 ! . (7) 3 Here xnd is the dth dimension of the nth observation, and ρ a regularization parameter to avoid singular covariances. This defines a smoothly changing (hence Riemannian) metric that captures the local structure of the data. It is easy to see that if x is outside of the support of the data, then the metric tensor is large. Thus, geodesics are “pulled” towards the data where the metric is small. Note that the proposed metric is not invariant to linear transformations.While we restrict our attention to this particular choice, other learned metrics are equally applicable, c.f. [22, 9]. 3.2 Estimating the Normalization Constant The normalization constant of Eq. 4 is by definition C(µ, Σ) = Z M exp −1 2⟨Logµ(x), Σ−1Logµ(x)⟩ dM(x), (8) where dM(x) denotes the measure induced by the Riemannian metric. The constant C(µ, Σ) depends not only on the covariance matrix, but also on the mean of the distribution, and the curvature of the manifold (captured by the logarithm map). For a general learned manifold, C(µ, Σ) is inaccessible in closed-form and we resort to numerical techniques. We start by rewriting Eq. 8 as C(µ, Σ) = Z TµM qM(Expµ(v)) exp −1 2⟨v, Σ−1v⟩ dv. (9) In effect, we integrate the distribution over the tangent space TµM instead of directly over the manifold. This transformation relies on the fact that the volume of an infinitely small area on the manifold can be computed in the tangent space if we take the deformation of the metric into account [15]. This deformation is captured by the measure which, in the tangent space, is dM(x) = qM(Expµ(v)) dv. For notational simplicity we define the function m(µ, v) = qM(Expµ(v)) , which intuitively captures the cost for a point to be outside the data support (m is large in low density areas and small where the density is high). Intrinsic Least Squares LAND Figure 3: Comparison of LAND and intrinsic least squares means. We estimate the normalization constant (9) using Monte Carlo integration. We first multiply and divide the integral with the normalization constant of the Euclidean normal distribution Z = p (2π)D |Σ|. Then, the integral becomes an expectation estimation problem C(µ, Σ) = Z · EN (0,Σ)[m(µ, v)], which can be estimated numerically as C(µ, Σ) ≃Z S S X s=1 m(µ, vs), where vs ∼N(0, Σ) (10) and S is the number of samples on TµM. The computationally expensive element is to evaluate m, which in turn requires evaluating Expµ(v). This amounts to solving an IVP numerically, which is fairly fast. Had we performed the integration directly on the manifold (8) we would have had to evaluate the logarithm map, which is a much more expensive BVP. The tangent space integration, thus, scales better. 3.3 Inferring Parameters Assuming an independent and identically distributed dataset {xn}N n=1, we can write their joint distribution as pM(x1, . . . , xN) = QN n=1 pM(xn | µ, Σ). We find parameters µ and Σ by maximum likelihood, which we implement by minimizing the mean negative log-likelihood {ˆµ, ˆΣ} = argmin µ∈M Σ∈SD ++ φ (µ, Σ) = argmin µ∈M Σ∈SD ++ 1 2N N X n=1 ⟨Logµ(xn), Σ−1Logµ(xn)⟩+ log (C(µ, Σ)) . (11) The first term of the objective function φ : M × SD ++ is a data-fitting term, while the second can be seen as a force that both pulls the mean closer to the high density areas and shrinks the covariance. Specifically, when the mean is in low density areas, as well as when the covariance gives significant 4 Algorithm 1 LAND maximum likelihood Input: the data {xn}N n=1, stepsizes αµ, αA Output: the estimated ˆµ, ˆΣ, ˆC(ˆµ, ˆΣ) 1: initialize µ0, Σ0 and t ←0 2: repeat 3: estimate C(µt, Σt) using Eq. 10 4: compute dµφ(µt, Σt) using Eq. 12 5: µt+1 ←Expµt(αµdµφ(µt, Σt)) 6: estimate C(µt+1, Σt) using Eq. 10 7: compute ∇Aφ(µt+1, Σt) using Eq. 13 8: At+1 ←At −αA∇Aφ(µt+1, Σt) 9: Σt+1 ←[(At+1)⊺At+1]−1 10: t ←t + 1 11: until
φ(µt+1, Σt+1) −φ(µt, Σt)
2 2 ≤ϵ probability to those areas, the value of m(µ, v) will by construction be large. Consequently, C(µ, Σ) will increase and these solutions will be penalized. In practice, we find that the maximum likelihood LAND mean generally avoids low density regions, which is in contrast to the standard intrinsic least squares mean (5), see Fig. 3. In practice we optimize φ using block coordinate descent: we optimize the mean keeping the covariance fixed and vice versa. Unfortunately, both of the sub-problems are non-convex, and unlike the linear normal distribution, they lack a closedform solution. Since the logarithm map is a differentiable function, we can use gradient-based techniques to infer µ and Σ. Below we give the descent direction for µ and Σ and the corresponding optimization scheme is given in Algorithm 1. Initialization is discussed in the supplements. Optimizing µ: the objective function is differentiable with respect to µ [6], and using that ∂ ∂µ⟨Logµ(x), Σ−1Logµ(x)⟩= −2Σ−1Logµ(x), we get the gradient ∇µφ(µ, Σ) = −Σ−1 " 1 N N X n=1 Logµ(xn) − Z C(µ, Σ) · S S X s=1 m(µ, vs)vs # . (12) It is easy to see that this gradient is highly dependent on the condition number of Σ. We find that this, at times, makes the gradient unstable, and choose to use the steepest descent direction instead of the gradient direction. This is equal to dµφ(µ, Σ) = −Σ∇µφ(µ, Σ) (see supplements). Optimizing Σ: since the covariance matrix by definition is constrained to be in the space SD ++, a common trick is to decompose the matrix as Σ−1 = A⊺A, and optimize the objective with respect to A. The gradient of this factor is (see supplements for derivation) ∇Aφ(µ, Σ) = A " 1 N N X n=1 Logµ(xn)Logµ(xn)⊺− Z C(µ, Σ) · S S X s=1 m(µ, vs)vsv⊺ s # . (13) Here the first term fits the given data by increasing the size of the covariance matrix, while the second term regularizes the covariance towards a small matrix. 3.4 Mixture of LANDs At this point we can find maximum likelihood estimates of the LAND model. We can easily extend this to mixtures of LANDs: Following the derivation of the standard Gaussian mixture model [3], our objective function for inferring the parameters of the LAND mixture model is formulated as follows ψ(Θ) = K X k=1 N X n=1 rnk 1 2⟨Logµk(xn), Σ−1 k Logµk(xn)⟩+ log(C(µk, Σk)) −log(πk) , (14) where Θ = {µk, Σk}K k=1 , rnk = πkpM(xn | µk,Σk) PK l=1 πlpM(xn | µl,Σl) is the probability that xn is generated by the kth component, and PK k=1 πk = 1, πk ≥0. The corresponding EM algorithm is in the supplements. 4 Experiments In this section we present both synthetic and real experiments to demonstrate the advantages of the LAND. We compare our model with both the Gaussian mixture model (GMM), and a mixture of LANDs using least squares (LS) estimators (5, 6). Since the latter are not maximum likelihood estimates we use a Riemannian K-means algorithm to find cluster centers. In all experiments we use S = 3000 samples in the Monte Carlo integration. This choice is investigated empirically in the supplements. Furthermore, we choose σ as small as possible, while ensuring that the manifold is smooth enough that geodesics can be computed numerically. 5 4.1 Synthetic Data Experiments 1 2 3 4 Number of mixture components 0 1 2 3 4 5 6 7 Mean negative log-likelihood GMM LS LAND True Figure 4: The mean negative loglikelihood experiment. As a first experiment, we generate a nonlinear data-manifold by sampling from a mixture of 20 Gaussians positioned along a half-ellipsoidal curve (see left panel of Fig. 5). We generate 10 datasets with 300 points each, and fit for each dataset the three models with K = 1, . . . , 4 number of components. Then, we generate 10000 samples from each fitted model, and we compute the mean negative log-likelihood of the true generative distribution using these samples. Fig. 4 shows that the LAND learns faster the underlying true distribution, than the GMM. Moreover, the LAND perform better than the least squares estimators, which overestimates the covariance. In the supplements we show, using the standard AIC and BIC criteria, that the optimal LAND is achieved for K = 1, while for the least squares estimators and the GMM, the optimal is achieved for K = 3 and K = 4 respectively. In addition, in Fig. 5 we show the contours for the LAND and the GMM for K = 2. There, we can observe that indeed, the LAND adapts locally to the data and reveals their underlying nonlinear structure. This is particularly evident near the “boundaries” of the data-manifold. Geodesics Data LAND means Geodesics, cluster 1 Geodesics, cluster 2 LAND mixture model LAND mean Gaussian mixture model GMM mean Figure 5: Synthetic data and the fitted models. Left: the given data, the intensity of the geodesics represent the responsibility of the point to the corresponding cluster. Center: the contours of the LAND mixture model. Right: the contours of the Gaussian mixture model. We extend this experiment to a clustering task (see left panel of Fig. 6 for data). The center and right panels of Fig. 6 show the contours of the LAND and Gaussian mixtures, and it is evident that the LAND is substantially better at capturing non-ellipsoidal clusters. Due to space limitations, we move further illustrative experiments to the supplementary material and continue with real data. 4.2 Modeling Sleep Stages We consider electro-encephalography (EEG) measurements of human sleep from 10 subjects, part of the PhysioNet database [11, 7, 5]. For each subject we get EEG measurements during sleep from two electrodes on the front and the back of the head, respectively. Measurements are sampled at fs = 100Hz, and for each 30 second window a so-called sleep stage label is assigned from the set {1, 2, 3, 4, REM, awake}. Rapid eye movement (REM) sleep is particularly interesting, characterized by having EEG patterns similar to the awake state but with a complex physiological pattern, involving e.g., reduced muscle tone, rolling eye movements and erection [16]. Recent evidence points to the importance of REM sleep for memory consolidation [4]. Periods in which the sleeper is awake are typically happening in or near REM intervals. Thus we here consider the characterization of sleep in terms of three categories REM, awake, and non-REM, the latter a merger of sleep stages 1 −4. We extract features from EEG measurements as follows: for each subject we subdivide the 30 second windows to 10 seconds, and apply a short-time-Fourier-transform to the EEG signal of the frontal electrode with 50% overlapping windows. From this we compute the log magnitude of the spectrum log(1 + |f|) of each window. The resulting data matrix is decomposed using Non-Negative Matrix Factorization (10 random starts) into five factors, and we use the coefficients as 5D features. In Fig. 7 we illustrate the nonlinear manifold structure based on a three factor analysis. 6 Geodesics Data LAND means Geodesics, cluster 1 Geodesics, cluster 2 LAND mixture model LAND mean Gaussian mixture model GMM mean Geodesics Data LAND means Geodesics, cluster 1 Geodesics, cluster 2 LAND mixture model LAND mean Gaussian mixture model GMM mean Figure 6: The clustering problem for two synthetic datasets. Left: the given data, the intensity of the geodesics represent the responsibility of the point to the corresponding cluster. Center: the LAND mixture model. Right: the Gaussian mixture model. 1-4 R.E.M. awake Figure 7: The 3 leading factors for subject “s151”. We perform clustering on the data and evaluate the alignment between cluster labels and sleep stages using the F-measure [14]. The LAND depends on the parameter σ to construct the metric tensor, and in this experiment it is less straightforward to select σ because of significant intersubject variability. First, we fixed σ = 1 for all the subjects. From the results in Table 1 we observe that for σ = 1 the LAND(1) generally outperforms the GMM and achieves much better alignment. To further illustrate the effect of σ we fitted a LAND for σ = [0.5, 0.6, . . . , 1.5] and present the best result achieved by the LAND. Selecting σ this way leads indeed to higher degrees of alignment further underlining that the conspicuous manifold structure and the rather compact sleep stage distributions in Fig. 7 are both captured better with the LAND representation than with a linear GMM. Table 1: The F-measure result for 10 subjects (the closer to 1 the better). s001 s011 s042 s062 s081 s141 s151 s161 s162 s191 LAND(1) 0.831 0.701 0.670 0.740 0.804 0.870 0.820 0.780 0.747 0.786 GMM 0.812 0.690 0.675 0.651 0.798 0.870 0.794 0.775 0.747 0.776 LAND 0.831 0.716 0.695 0.740 0.818 0.874 0.830 0.783 0.750 0.787 5 Related Work We are not the first to consider Riemannian normal distributions, e.g. Pennec [15] gives a theoretical analysis of the distribution, and Zhang and Fletcher [23] consider the Riemannian counterpart of probabilistic PCA. Both consider the scenario where the manifold is known a priori. We adapt the distribution to the “manifold learning” setting by constructing a Riemannian metric that adapts to the data. This is our overarching contribution. Traditionally, manifold learning is seen as an embedding problem where a low-dimensional representation of the data is sought. This is useful for visualization [21, 17, 18, 1], clustering [13], semi-supervised learning [2] and more. However, in embedding approaches, the relation between a 7 new point and the embedded points are less well-defined, and consequently these approaches are less suited for building generative models. In contrast, the Riemannian approach gives the ability to measure continuous geodesics that follow the structure of the data. This makes the learned Riemannian manifold a suitable space for a generative model. Simo-Serra et al. [19] consider mixtures of Riemannian normal distributions on manifolds that are known a priori. Structurally, their EM algorithm is similar to ours, but they do not account for the normalization constants for different mixture components. Consequently, their approach is inconsistent with the probabilistic formulation. Straub et al. [20] consider data on spherical manifolds, and further consider a Dirichlet process prior for determining the number of components. Such a prior could also be incorporated in our model. The key difference to our work is that we consider learned manifolds as well as the following complications. 6 Discussion In this paper we have introduced a parametric locally adaptive normal distribution. The idea is to replace the Euclidean distance in the ordinary normal distribution with a locally adaptive nonlinear distance measure. In principle, we learn a non-parametric metric space, by constructing a smoothly changing metric that induces a Riemannian manifold, where we build our model. As such, we propose a parametric model over a non-parametric space. The non-parametric space is constructed using a local metric that is the inverse of a local covariance matrix. Here locality is defined via a Gaussian kernel, such that the manifold learning can be seen as a form of kernel smoothing. This indicates that our scheme for learning a manifold might not scale to high-dimensional input spaces. In these cases it may be more practical to learn the manifold probabilistically [22] or as a mixture of metrics [9]. This is feasible as the LAND estimation procedure is agnostic to the details of the learned manifold as long as exponential and logarithm maps can be evaluated. Once a manifold is learned, the LAND is simply a Riemannian normal distribution. This is a natural model, but more intriguing, it is a theoretical interesting model since it is the maximum entropy distribution for a fixed mean and covariance [15]. It is generally difficult to build locally adaptive distributions with maximum entropy properties, yet the LAND does this in a fairly straight-forward manner. This is, however, only a partial truth as the distribution depends on the non-parametric space. The natural question, to which we currently do not have an answer, is whether a suitable maximum entropy manifold exist? Algorithmically, we have proposed a maximum likelihood estimation scheme for the LAND. This combines a gradient-based optimization with a scalable Monte Carlo integration method. Once exponential and logarithm maps are available, this procedure is surprisingly simple to implement. We have demonstrated the algorithm on both real and synthetic data and results are encouraging. We almost always improve upon a standard Gaussian mixture model as the LAND is better at capturing the local properties of the data. We note that both the manifold learning aspect and the algorithmic aspect of our work can be improved. It would be of great value to learn the parameter σ used for smoothing the Riemannian metric, and in general, more adaptive learning schemes are of interest. Computationally, the bottleneck of our work is evaluating the logarithm maps. This may be improved by specialized solvers, e.g. probabilistic solvers [10], or manifold-specific heuristics. The ordinary normal distribution is a key element in many machine learning algorithms. We expect that many fundamental generative models can be extended to the “manifold” setting simply by replacing the normal distribution with a LAND. Examples of this idea include Naïve Bayes, Linear Discriminant Analysis, Principal Component Analysis and more. Finally we note that standard hypothesis tests also extend to Riemannian normal distributions [15] and hence also to the LAND. Acknowledgements. LKH was funded in part by the Novo Nordisk Foundation Interdisciplinary Synergy Program 2014, ’Biophysically adjusted state-informed cortex stimulation (BASICS)’. SH was funded in part by the Danish Council for Independent Research, Natural Sciences. 8 References [1] M. Belkin and P. Niyogi. Laplacian Eigenmaps for Dimensionality Reduction and Data Representation. Neural Computation, 15(6):1373–1396, June 2003. [2] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold Regularization: A Geometric Framework for Learning from Labeled and Unlabeled Examples. JMLR, 7:2399–2434, Dec. 2006. [3] C. M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). SpringerVerlag New York, Inc., Secaucus, NJ, USA, 2006. [4] R. Boyce, S. D. Glasgow, S. Williams, and A. Adamantidis. Causal evidence for the role of REM sleep theta rhythm in contextual memory consolidation. Science, 352(6287):812–816, 2016. [5] A. Delorme and S. Makeig. EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. J. Neurosci. Methods, page 21, 2004. [6] M. do Carmo. Riemannian Geometry. Mathematics (Boston, Mass.). Birkhäuser, 1992. [7] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation, 101(23):e215–e220, 2000 (June 13). [8] S. Hauberg. Principal Curves on Riemannian Manifolds. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2016. [9] S. Hauberg, O. Freifeld, and M. J. Black. A Geometric Take on Metric Learning. In Advances in Neural Information Processing Systems (NIPS) 25, pages 2033–2041, 2012. [10] P. Hennig and S. Hauberg. Probabilistic Solutions to Differential Equations and their Application to Riemannian Statistics. In Proceedings of the 17th international Conference on Artificial Intelligence and Statistics (AISTATS), volume 33, 2014. [11] S. A. Imtiaz and E. Rodriguez-Villegas. An open-source toolbox for standardized use of PhysioNet Sleep EDF Expanded Database. In 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pages 6014–6017, Aug 2015. [12] H. Karcher. Riemannian center of mass and mollifier smoothing. Communications on Pure and Applied Mathematics, 30(5):509–541, 1977. [13] U. Luxburg. A Tutorial on Spectral Clustering. Statistics and Computing, 17(4):395–416, Dec. 2007. [14] R. Marxer, H. Purwins, and A. Hazan. An f-measure for evaluation of unsupervised clustering with non-determined number of clusters. Report of the EmCAP project (European Commission FP6-IST), pages 1–3, 2008. [15] X. Pennec. Intrinsic Statistics on Riemannian Manifolds: Basic Tools for Geometric Measurements. Journal of Mathematical Imaging and Vision, 25(1):127–154, July 2006. [16] D. Purves, G. Augustine, D. Fitzpatrick, W. Hall, A. LaMantia, J. McNamara, and L. White. Neuroscience, 2008. De Boeck, Sinauer, Sunderland, Mass. [17] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000. [18] B. Schölkopf, A. Smola, and K.-R. Müller. Kernel principal component analysis. In Advances in Kernel Methods - Support Vector Learning, pages 327–352, 1999. [19] E. Simo-Serra, C. Torras, and F. Moreno-Noguer. Geodesic Finite Mixture Models. In Proceedings of the British Machine Vision Conference. BMVA Press, 2014. [20] J. Straub, J. Chang, O. Freifeld, and J. W. Fisher III. A Dirichlet Process Mixture Model for Spherical Data. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [21] J. B. Tenenbaum, V. de Silva, and J. C. Langford. A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science, 290(5500):2319, 2000. [22] A. Tosi, S. Hauberg, A. Vellido, and N. D. Lawrence. Metrics for Probabilistic Geometries. In The Conference on Uncertainty in Artificial Intelligence (UAI), July 2014. [23] M. Zhang and P. Fletcher. Probabilistic Principal Geodesic Analysis. In Advances in Neural Information Processing Systems (NIPS) 26, pages 1178–1186, 2013. 9 | 2016 | 2 |
6,105 | Automatic Neuron Detection in Calcium Imaging Data Using Convolutional Networks Noah J. Apthorpe1∗ Alexander J. Riordan2∗ Rob E. Aguilar1 Jan Homann2 Yi Gu2 David W. Tank2 H. Sebastian Seung12 1Computer Science Department 2Princeton Neuroscience Institute Princeton University {apthorpe, ariordan, dwtank, sseung}@princeton.edu ∗These authors contributed equally to this work Abstract Calcium imaging is an important technique for monitoring the activity of thousands of neurons simultaneously. As calcium imaging datasets grow in size, automated detection of individual neurons is becoming important. Here we apply a supervised learning approach to this problem and show that convolutional networks can achieve near-human accuracy and superhuman speed. Accuracy is superior to the popular PCA/ICA method based on precision and recall relative to ground truth annotation by a human expert. These results suggest that convolutional networks are an efficient and flexible tool for the analysis of large-scale calcium imaging data. 1 Introduction Two-photon calcium imaging is a powerful technique for monitoring the activity of thousands of individual neurons simultaneously in awake, behaving animals [1, 2]. Action potentials cause transient changes in the intracellular concentration of calcium ions. Such changes are detected by observing the fluorescence of calcium indicator molecules, typically using two-photon microscopy in the mammalian brain [3]. Repeatedly scanning a single image plane yields a time series of 2D images. This is effectively a video in which neurons blink whenever they are active [4, 5]. In the traditional workflow for extracting neural activities from the video, a human expert manually annotates regions of interest (ROIs) corresponding to individual neurons [5, 1, 2]. Within each ROI, pixel values are summed for each frame of the video, which yields the calcium signal of the corresponding neuron versus time. A subsequent step may deconvolve the temporal filtering of the intracellular calcium dynamics for an estimate of neural activity with better time resolution. The traditional workflow has the deficiency that manual annotation becomes laborious and timeconsuming for very large datasets. Furthermore, manual annotation does not de-mix the signals from spatially overlapping neurons. Unsupervised basis learning methods (PCA/ICA [6], CNMF [7], dictionary learning [8], and sparse space-time deconvolution [9]) express the video as a time-varying superposition of basis images. The basis images play a similar role as ROIs in the traditional workflow, and their time-varying coefficients are intended to correspond to neural activities. While basis learning methods are useful for finding active neurons, they do not detect low-activity cells—making these methods inappropriate for studies involving neurons that may be temporarily inactive depending on context or learning [10]. Such subtle difficulties may explain the lasting popularity of manual annotation. At first glance, the videos produced by calcium imaging seem simple (neurons blinking on and off). Yet automating image analysis has not been trivial. One difficulty is that images are corrupted by noise and artifacts due to brain motion. Another difficulty is variability in the appearance of cell bodies, which vary 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. in shape, size, spacing, and resting-level fluorescence. Additionally, different neuroscience studies may require differing ROI selection criteria. Some may require only cell bodies [5, 11], while others involve dendrites [6]. Some may require only active cells, while others necessitate both active and inactive cells [10]. Some neuroscientists may wish to reject slightly out-of-focus neurons. For all of these reasons, a neuroscientist may spend hours or days tuning the parameters of nominally automated methods, or may never succeed in finding a set of parameters that produces satisfactory results. As a way of dealing with these difficulties, we focus here on a supervised learning approach to automated ROI detection. An automated ROI detector could be used to replace manual ROI detection by a human expert in the traditional workflow, or could be used to make the basis learning algorithms more reliable by providing good initial conditions for basis images. However, the usability of an automated algorithm strongly depends on it attaining high accuracy. A supervised learning method can adapt to different ROI selection criteria and generalize them to new datasets. Supervised learning has become the dominant approach for attaining high accuracy in many computer vision problems [12]. We assemble ground truth datasets consisting of calcium imaging videos along with ROIs drawn by human experts and employ a precision-recall formalism for quantifying accuracy. We train a sliding window convolutional network (ConvNet) to take a calcium video as input and output a 2D image that matches the human-drawn ROIs as well as possible. The ConvNet achieves near-human accuracy and exceeds that of PCA/ICA [6]. The prior work most similar to ours used supervised learning based on boosting with hand-designed features [13]. Other previous attempts to automate ROI detection did not employ supervised machine learning. For example, hand-designed filtering operations [14] and normalized cuts [15] were applied to image pixel correlations. The major cost of supervised learning is the human effort required to create the training set. As a rough guide, our results suggest that on the order of 10 hours of effort or 1000 annotated cells are sufficient to yield a ConvNet with usable accuracy. This initial time investment, however, is more than repaid by the speed of a ConvNet at classifying new data. Furthermore, the marginal effort required to create a training set is essentially zero for those neuroscientists who already have annotated data. Neuroscientists can also agree to use the same trained ConvNets for uniformity of ROI selection across labs. From the deep learning perspective, an interesting aspect of our work is that a ConvNet that processes a spatiotemporal (2+1)D image is trained using only spatial (2D) annotations. Full spatiotemporal annotations (spatial locations and times of activation) would have been more laborious to collect. The use of purely spatial annotations is possible because the neurons in our videos are stationary (apart from motion artifacts). This makes our task simpler than other applications of ConvNets to video processing [16]. 2 Neuron detection benchmark We use a precision-recall framework to quantify accuracy of neuron detection. Predicted ROIs are classified as false positives (FP), false negatives (FN), and true positives (TP) relative to ground truth ROIs. Precision and recall are defined by precision = TP TP + FP recall = TP TP + FN (1) Both measures would be equal to 1 if predictions were perfectly accurate, i.e. higher numbers are better. If a single measure of accuracy is required, we use the harmonic mean of precision and recall, 1/F1 = (1/precision + 1/recall) /2. The F1 score favors neither precision nor recall, but in practice a neuroscientist may care more about one measure than the other. For example, some neuroscientists may be satisfied if the algorithm fails to detect many neurons (low recall) so long as it produces few false positives (high precision). Other neuroscientists may want the algorithm to find as many neurons as possible (high recall) even if there are many false positives (low precision). For computing precision and recall, it is helpful to define the overlap between two ROIs R1 and R2 as the Jaccard similarity coefficient |R1 ∩R2|/|R1 ∪R2| where |R| denotes the number of pixels in R. For each predicted ROI, we find the ground truth ROI with maximal overlap. The ground truth ROIs with overlap greater than 0.5 are assigned to the predicted ROIs with which they overlap the most. These assignments are true positives. Leftover ROIs are the false positives and false negatives. 2 We prefer the precision-recall framework over the receiver operating characteristic (ROC), which was previously used as a quantitative measure of neuron detection accuracy [13]. This is because precision and recall do not depend on true negatives, which are less well-defined. (The ROC depends on true negatives through the false positive rate.) Ground truth generation by human annotation The quantitative measures of accuracy proposed above depend on the existence of ground truth. For the vast majority of calcium imaging datasets, no objectively defined ground truth exists, and we must rely on subjective evaluation by human experts. For a dataset with low noise in which the desired ROIs are cell bodies, human experts are typically confident about most of their ROIs, though some are borderline cases that may be ambiguous. Therefore our measures of accuracy should be able to distinguish between algorithms that differ widely in their performance but may not be adequate to distinguish between algorithms that are very similar. Two-photon calcium imaging data were gathered from both the primary visual cortex (V1) and medial entorhinal cortex (MEC) from awake-behaving mice (Supplementary Methods). All experiments were performed according to the Guide for the Care and Use of Laboratory Animals, and procedures were approved by Princeton University’s Animal Care and Use Committee. Each time series of calcium images was corrected for motion artifacts (Supplementary Methods), average-pooled over time with stride 167, and then max-pooled over time with stride 6. This downsampling in time was arbitrarily chosen to reduce noise and make the dataset into a more manageable size. Human experts then annotated ROIs using the ImageJ Cell Magic Wand Tool [17], which automatically generates a region of interest (ROI) based on a single mouse click. The human experts found 4006 neurons in the V1 dataset with an average of 148 neurons per image series and 538 neurons in the MEC dataset with an average of 54 neurons per image series. Human experts used the following criteria to select neurons: 1. the soma was in the focal plane of the image—apparent as a light doughnut-like ring (the soma cytosol) surrounding a dark area (the nucleus), or 2.the area showed significantly changing brightness distinguishable from background and had the same general size and shape expected from a neuron in the given brain region. After motion correction, downsampling, and human labeling, the V1 dataset consisted of 27 16-bit grayscale multi-page TIFF image series ranging from 28 to 142 frames per series with 512 × 512 pixels per frame. The MEC dataset consisted of 10 image series ranging from 5 to 28 frames in the same format. Human annotation time was estimated at one hour per image series for the V1 dataset and 40 minutes per images series for the MEC dataset. Each human-labeled ROI was represented as a 512 × 512 pixel binary mask. 3 Convolutional network Preprocessing of images and ground truth ROIs. Microscopy image series from the V1 and MEC datasets were preprocessed prior to network training (Figure 1). Image contrast was enhanced by clipping all pixel values above the 99th percentile and below the 3rd percentile. Pixel values were then normalized to [0, 1]. We divided the V1 series into 60% training, 20% validation, and 20% test sets and the MEC series into 50% training, 20% validation, and 30% test sets. Neighboring ground truth ROIs often touched or even overlapped with each other. For the purpose of ConvNet training, we shrank the ground truth ROIs by replacing each one with a 4-pixel radius disk located at the centroid of the ROI. The shrinkage was intended to encourage the ConvNets to separate neighboring neurons. Convolutional network architecture and training. The architecture of the (2+1)D ConvNet is depicted in Figure 2. The input is an image stack containing T time slices. There are four convolutional layers, a max pooling over all time slices, and then two pixelwise fully connected layers. This yields two 2D grayscale images as output, which together represent the softmax probability of each pixel being inside an ROI centroid. The convolutional layers were chosen to contain only 2D kernels, because the temporal downsampling used in the preprocessing (§2) caused most neural activity to last for only a single time frame. Each output pixel depended on a 37 × 37 × T pixel field of view in the input, where T is the number of frames in the input image stack—governed by the length of the imaging experiment and the imaging 3 V1#Dataset MEC#Dataset Initial#Image Contrast#Enhancement Human#Labeled#ROIs ROI#Centroids 20μm Figure 1: Preprocessing steps for calcium images and human-labeled ROIs. Col 1) Calcium imaging stacks were motion-corrected and downsampled in time. Col 2) Image contrast was enhanced by clipping pixel intensities below the 3rd and above the 99th percentile then linearly rescaling pixel intensities between these new bounds. Col 3) Human-labeled ROIs were converted into binary masks. Col 4) Networks were trained to detect 4-pixel radius circular centroids of human-labeled ROIs. Primary visual cortex (V1, Row 1) and medial entorhinal cortex (MEC, Row 2) datasets were preprocessed identically. sampling rate. T was equalized to 50 for all image stacks in the V1 dataset and 5 for all image stacks in the MEC dataset using averaging and bicubic interpolation. In the future, we will consider less temporal downsampling and the use of 3D kernels in the convolutional layers. The ConvNet was applied in a 37 × 37 × T window, sliding in two dimensions over the input image stack to produce an output pixel for every location of the window fully contained within the image bounds. For comparison, we also trained a 2D ConvNet that took as input the time-averaged image stack and did no temporal computation (Figure 2). We used ZNN, an open-source sliding window ConvNet package with multi-core CPU parallelism and FFT-based convolution [18]. ZNN automatically augmented training sets by random rotations (multiples of 90 degrees) and reflections of image patches to facilitate ConvNet learning of invariances. The training sets were also rebalanced by the fraction of pixels in human-labeled ROIs to the total number of pixels. See Supplementary Methods for further details. The (2+1)D network was trained with softmax loss and output patches of size 120 × 120. The learning rate parameter was annealed by hand from 0.01 to 0.002, and the momentum parameter was annealed by hand from 0.9 to 0.5. The network was trained for 16800 stochastic gradient descent (SGD) updates for the V1 dataset, which took approximately 1.2 seconds/update (∼5.5hrs) on an Amazon EC2 c4.8xlarge instance (Supplementary Figure 1). The network was trained for 200000 SGD updates for the MEC dataset, which took approximately 0.1 seconds/update (∼5.5hrs). The 2D network training omitted annealing of the learning rate and momentum parameters. The 2D network was trained for 14000 SGD updates for the V1 dataset, which took approximately 0.9 seconds/update (∼3.75hrs) on an Amazon EC2 c4.8xlarge instance (Supplementary Figure 1). We performed early stopping on the network after 10200 SGD updates based on the validation loss. Network output postprocessing. Network outputs were converted into individual ROIs by: 1. Thresholding out pixels with low probability values, 2. Removing small connected components, 3. Weighting resulting pixels with a normalized distance transform, 4. Performing marker-based watershed labeling with local max markers, 5. Merging small watershed regions, and 6. Automatically applying the ImageJ Cell Magic Wand tool to the original images at the centroids of the watershed regions. Thresholding and minimum size values were optimized using the validation sets (Supplementary Methods). Source code. A ready-to-use pipeline, including pre- and postprocessing, ConvNet training, and precision-recall scoring, will be publicly available for community use (https://github.com/ NoahApthorpe/ConvnetCellDetection). 4 3D'image' input conv 10x10x1 conv 10x10x1 conv 10x10x1 conv 10x10x1 max'filter' 1x1xT conv 1x1x1 10'units/convlayer 2D'output' image 50'unit'FC' layer conv 3x3 conv 3x3 conv 3x3 max'filter' 2x2 conv 3x3 2D'image' input 2D'image' output conv 3x3 conv 1x1 max'filter' 2x2 24 units 48 48 72 96 96 120 A. B. 20'unit'FC' layer Figure 2: A) Schematic of the (2+1)D network architecture. The (2+1)D network transforms 3D calcium imaging stacks – stacks of 2D calcium images changing over time – into 2D images of predicted neuron locations. All convolutional filters are 2D except for the 1x1xT max filter layer, where T is the number of frames in the image stack. B) The 2D network architecture. The 2D network takes as input calcium imaging stacks that are mean projected over time down to two dimensions. 4 Results ConvNets successfully detect cells in calcium images. A sample image from the V1 test set and ConvNet output is shown in Figure 4. Postprocessing of the ConvNet output yielded predicted ROIs, many of which are the same as the human ROIs (Figure 4c). As described in Section 2, we quantified agreement between ConvNet and human using the precision-recall formalism. Both (2+1)D and 2D networks attained the same F1 score (0.71). Full precision-recall curves are given in Supplementary Figure 1. Inspection of the ConvNet-human disagreements suggested that some were not actually ConvNet errors. To investigate this hypothesis, the original human expert reevaluated all disagreements with the (2+1)D network. After reevaluation, 131 false positives became true positives, and 30 false negatives became true negatives (Figure 4D). Some of these reversals appeared to involve unambiguous human errors in the original annotation, while others were ambiguous cases (Figure 4E– G). After reevaluation, the F1 score of the (2+1)D network increased to 0.82. The F1 score of the human expert’s reevaluation relative to his original annotation was 0.89. These results indicate that the ConvNet is nearing human performance. (2+1)D versus 2D network. The (2+1)D and 2D networks achieved similar precision, recall, and F1 scores on the V1 dataset; however, the (2+1)D network produced raw output with less noise than the 2D network (Figure 3). Qualitative inspection also indicates that the (2+1)D network finds transiently active and transiently in focus neurons missed by the 2D network (Figure 3). Although such neurons occurred infrequently in the V1 dataset and did not noticeably affect network scores, these results suggest that datasets with larger populations of transiently active or variably focused cells will particularly benefit from (2+1)D network architectures. ConvNet segmentation outperforms PCA/ICA. The (2+1)D network was also able to successfully locate neurons in the MEC dataset (Figure 5). For comparison, we also implemented and applied PCA/ICA as described by Ref. [6]. The (2+1)D network achieved an F1 score of 0.51, while PCA/ICA achieved 0.27. Precision and recall numbers are given in Figure 5. 5 Neuron'falls'in'and'out'of'focus Transiently'active'neuron (2+1)D network 2D'network A. B. (2+1)D network 2D'network Overlay C. 20μm 20μm 0 0.2 0.4 0.6 0.8 1 pixel intensity 0 0.5 1 1.5 2 number pixels in image #104 (2+1)D network 2D network Figure 3: A) The (2+1)D network detected neurons that the 2D network failed to locate. The sequence of greyscale images shows a patch of V1 neurons over time. Both transiently active neurons and neurons that wane in and out of the focal plane are visible. The color image shows the output of both networks. The (2+1)D network detects these transiently visible neurons, whereas the 2D network is unable to find these cells using only the mean-flattened image. B) The raw outputs of the (2+1)D and 2D networks. C) Representative histogram of output pixel intensities. The (2+1)D network output has more values clustered around 0 and 1 compared to the 2D network. This suggests that (2+1)D network output has a higher signal to noise ratio than 2D network output. ConvNet accuracy was lower on the MEC dataset than the V1 dataset, probably because the former has more noise and larger motion artifacts. The amount of training data for the MEC dataset was also much smaller. PCA/ICA accuracy was numerically worse, but this result should be interpreted cautiously. PCA/ICA is intended to identify active neurons, while the ground truth included both active and inactive neurons. Furthermore, the ground truth depends on the human expert’s selection criteria, which are not accessible to PCA/ICA. Training and post-processing optimization for ConvNet segmentation took ∼6 hours with a forward pass taking ∼1.2 seconds per image series. Parameter optimization for PCA/ICA performed by a human expert took ∼2.5 hours with a forward pass taking ∼40 minutes. This amounted to ∼6 hours total computation time for the ConvNet and ∼9 hours for the PCA/ICA algorithm. This suggests that ConvNet segmentation is faster than PCA/ICA for all but the smallest datasets. 5 Discussion The lack of quantitative difference between (2+1)D and 2D ConvNet accuracy (same F1 score on the V1 dataset) may be due to limitations of our study, such as imperfect ground truth and temporal downsampling in preprocessing. It may also be because the vast majority of neurons in the V1 dataset are clearly visible in the time-averaged image. We do have qualitative evidence that the (2+1)D architecture may turn out to be superior for other datasets, because its output looks cleaner, and it is able to detect transiently active or transiently in-focus cells (Figure 3). The (2+1)D ConvNet outperformed PCA/ICA in the precision-recall metrics. We are presently working to compare against recently released basis learning methods [7]. ConvNets readily locate inactive neurons and process new images rapidly once trained. ConvNets adapt to the selection criteria of the neuroscientist if they are implicitly contained in the training set. They do not depend on hand-designed features and so require little expertise in computer vision. ConvNet speed could enable novel applications involving online ROI detection, such as computer-guided single-cell optogenetics [11] or real-time neural feedback experiments. 6 Human Human&&&(2+1)D&network&overlay (2+1)D&network Added&by&human&relabeling& Removed&by&human&relabeling& A. B. C. D. 20μm 2D Original Labels Temporal Original Labels 2D Relabeled Temporal Relabeled Human Original to Relabeled A. B. C. E. H. F1&Score F. G. 20μm (2+1)D (2+1)D Figure 4: The (2+1)D network successfully detected neurons in the V1 test set with near-human accuracy. A) Slice from preprocessed calcium imaging stack input to network. B) Network softmax probability output. Brighter regions are considered by the network to have higher probability of being a neuron. C) ROIs found by the (2+1)D network after post-processing, overlaid with human labels. Network output is shown by green outlines, whereas human labels are red. Regions of agreement are indicated by yellow overlays. D) ROI labels added by human reevaluation are shown in blue. ROI labels removed by reevaluation are shown in magenta. Post hoc assessment of network output revealed a sizable portion of ROIs that were initially missed by human labeling. E) Examples of formerly negative ROIs that were reevaluated as positive. F) Initial positive labels that were reevaluated to be false. G) Examples of ROIs that remained negative even after reevaluation. H) F1 scores for (2+1)D and 2D networks before and after ROI reevaluation. Human labels before and after reevaluation were also compared to assess human labeling variability. Boxplots depict the variability of F1 scores around the median score across test images. 7 C. D. Human Human)&)(2+1)D)network)overlay PCA/ICA (2+1)D)network A. B. 20μm Temporal PCA Temporal PCA Temporal PCA E. (2+1)D network (2+1)D network (2+1)D network PCA/ ICA PCA/ ICA PCA/ ICA Figure 5: The (2+1)D network successfully detected neurons in the MEC test set with higher precision and recall than PCA/ICA. A) Slice from preprocessed calcium imaging stack that was input to network. B) Network output, normalized by softmax. C) ROIs found by the (2+1)D network after postprocessing, overlaid with ROIs previously labeled by a human. Network output is shown by red outlines, whereas human labels are green. Regions of agreement are indicated by yellow overlays. D) The ROIs found by PCA/ICA are overlaid in blue. E) Quantitative comparison of F1 score, precision, and recall for (2+1)D network and PCA/ICA on human-labeled MEC data. 8 Acknowledgments We thank Kisuk Lee, Jingpeng Wu, Nicholas Turner, and Jeffrey Gauthier for technical assistance. We also thank Sue Ann Koay, Niranjani Prasad, Cyril Zhang, and Hussein Nagree for discussions. This work was supported by IARPA D16PC00005 (HSS), the Mathers Foundation (HSS), NIH R01 MH083686 (DWT), NIH U01 NS090541 (DWT, HSS), NIH U01 NS090562 (HSS), Simons Foundation SCGB (DWT), and U.S. Army Research Office W911NF-12-1-0594 (HSS). References [1] Daniel Huber, DA Gutnisky, S Peron, DH O’connor, JS Wiegert, Lin Tian, TG Oertner, LL Looger, and K Svoboda. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature, 484(7395):473–478, 2012. [2] Daniel A Dombeck, Anton N Khabbaz, Forrest Collman, Thomas L Adelman, and David W Tank. Imaging large-scale neural activity with cellular resolution in awake, mobile mice. Neuron, 56(1):43–57, 2007. [3] Winfried Denk, James H Strickler, Watt W Webb, et al. Two-photon laser scanning fluorescence microscopy. Science, 248(4951):73–76, 1990. [4] Tsai-Wen Chen, Trevor J Wardill, Yi Sun, Stefan R Pulver, Sabine L Renninger, Amy Baohan, Eric R Schreiter, Rex A Kerr, Michael B Orger, Vivek Jayaraman, et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature, 499(7458):295–300, 2013. [5] Christopher D Harvey, Philip Coen, and David W Tank. Choice-specific sequences in parietal cortex during a virtual-navigation decision task. Nature, 484(7392):62–68, 2012. [6] Eran A Mukamel, Axel Nimmerjahn, and Mark J Schnitzer. Automated analysis of cellular signals from large-scale calcium imaging data. Neuron, 63(6):747–760, 2009. [7] Eftychios A Pnevmatikakis, Daniel Soudry, Yuanjun Gao, Timothy A Machado, Josh Merel, David Pfau, Thomas Reardon, Yu Mu, Clay Lacefield, Weijian Yang, et al. Simultaneous denoising, deconvolution, and demixing of calcium imaging data. Neuron, 89(2):285–299, 2016. [8] Marius Pachitariu, Adam M Packer, Noah Pettit, Henry Dalgleish, Michael Hausser, and Maneesh Sahani. Extracting regions of interest from biological images with convolutional sparse block coding. In Advances in Neural Information Processing Systems, pages 1745–1753, 2013. [9] Ferran Diego Andilla and Fred A Hamprecht. Sparse space-time deconvolution for calcium image analysis. In Advances in Neural Information Processing Systems, pages 64–72, 2014. [10] David S Greenberg, Arthur R Houweling, and Jason ND Kerr. Population imaging of ongoing neuronal activity in the visual cortex of awake rats. Nature neuroscience, 11(7):749–751, 2008. [11] John Peter Rickgauer, Karl Deisseroth, and David W Tank. Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields. Nature neuroscience, 17(12):1816–1824, 2014. [12] Yann LeCun, Koray Kavukcuoglu, Clément Farabet, et al. Convolutional networks and applications in vision. In ISCAS, pages 253–256, 2010. [13] Ilya Valmianski, Andy Y Shih, Jonathan D Driscoll, David W Matthews, Yoav Freund, and David Kleinfeld. Automatic identification of fluorescently labeled brain cells for rapid functional imaging. Journal of neurophysiology, 104(3):1803–1811, 2010. [14] Spencer L Smith and Michael Häusser. Parallel processing of visual space by neighboring neurons in mouse visual cortex. Nature neuroscience, 13(9):1144–1149, 2010. [15] Patrick Kaifosh, Jeffrey D Zaremba, Nathan B Danielson, and Attila Losonczy. Sima: Python software for analysis of dynamic fluorescence imaging data. Frontiers in neuroinformatics, 8, 2014. [16] Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li Fei-Fei. Large-scale video classification with convolutional neural networks. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 1725–1732, 2014. [17] Theo Walker. Cell magic wand tool. http://www.maxplanckflorida.org/fitzpatricklab/ software/cellMagicWand/index.html. 2014. [18] Aleksandar Zlateski, Kisuk Lee, and H Sebastian Seung. ZNN – a fast and scalable algorithm for training 3d convolutional networks on multi-core and many-core shared memory machines. arXiv:1510.06706, 2015. 9 | 2016 | 20 |
6,106 | GAP Safe Screening Rules for Sparse-Group Lasso Eugene Ndiaye, Olivier Fercoq, Alexandre Gramfort, Joseph Salmon LTCI, CNRS, Télécom ParisTech Université Paris-Saclay 75013 Paris, France first.last@telecom-paristech.fr Abstract For statistical learning in high dimension, sparse regularizations have proven useful to boost both computational and statistical efficiency. In some contexts, it is natural to handle more refined structures than pure sparsity, such as for instance group sparsity. Sparse-Group Lasso has recently been introduced in the context of linear regression to enforce sparsity both at the feature and at the group level. We propose the first (provably) safe screening rules for Sparse-Group Lasso, i.e., rules that allow to discard early in the solver features/groups that are inactive at optimal solution. Thanks to efficient dual gap computations relying on the geometric properties of ϵ-norm, safe screening rules for Sparse-Group Lasso lead to significant gains in term of computing time for our coordinate descent implementation. 1 Introduction Sparsity is a critical property for the success of regression methods, especially in high dimension. Often, group (or block) sparsity is helpful when a known group structure needs to be enforced. This is for instance the case in multi-task learning [1] or multinomial logistic regression [5, Chapter 3]. In the multi-task setting, the group structure appears natural since one aims at jointly recovering signals whose supports are shared. In this context, sparsity and group sparsity are generally obtained by adding a regularization term to the data-fitting: ℓ1 norm for sparsity and ℓ1,2 norm for group sparsity. Along with recent works on hierarchical regularization [12, 17] have focused on a specific case: the Sparse-Group Lasso. This method is the solution of a (convex) optimization program with a regularization term that is a convex combination of the two aforementioned norms, enforcing sparsity and group sparsity at the same time. With such advanced regularizations, the computational burden can be particularly heavy in high dimension. Yet, it can be significantly reduced if one can exploit the known sparsity of the solution in the optimization. Following the seminal paper on “safe screening rules” [9], many contributions have investigated such strategies [21, 20, 3]. These so called safe screening rules compute some tests on dual feasible points to eliminate primal variables whose coefficients are guaranteed to be zero in the exact solution. Still, the computation of a dual feasible point can be challenging when the regularization is more complex than ℓ1 or ℓ1,2 norms. This is the case for the Sparse-Group Lasso as it is not straightforward to characterize if a dual point is feasible or not [20]. Here, we propose an efficient computation of the associated dual norm. It is all the more crucial since the naive implementation computes the Sparse-Group Lasso dual norm with a quadratic complexity w.r.t the groups dimensions. We propose here efficient safe screening rules for the Sparse-Group Lasso that combine sequential rules (i.e., rules that perform screening thanks to solutions obtained for a previously processed tuning parameter) and dynamic rules (i.e., rules that perform screening as the algorithm proceeds) in a unified way. We elaborate on GAP safe rules, a strategy relying on dual gap computations introduced 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. for the Lasso [10] and to more general learning tasks in [15]. Note that alternative (unsafe) screening rules, for instance the “strong rules” [19], have been applied to the Lasso and its simple variants. Our contributions are two fold here. First, we introduce the first safe screening rules for this problem, other alleged safe rules [20] for Sparse-Group Lasso were in fact not safe, as explained in detail in [15], and could lead to non-convergent implementation. Second, we link the Sparse-Group Lasso penalties to the ϵ-norm in [6]. This allows to provide a new algorithm to efficiently compute the required dual norms, adapting an algorithm introduced in [7]. We incorporate our proposed GAP Safe rules in a block coordinate descent algorithm and show its practical efficiency in climate prediction tasks. Another strategy leveraging dual gap computations and active sets has recently been proposed under the name Blitz [13]. It could naturally benefit from our fast dual norm evaluations in this context. Notation For any integer d P N, we denote by rds the set t1, . . . , du. The standard Euclidean norm is written ∥¨∥, the ℓ1 norm ∥¨∥1, the ℓ8 norm ∥¨∥8, and the transpose of a matrix Q is denoted by QJ. We also denote ptq` “ maxp0, tq. Our observation vector is y P Rn and the design matrix X “ rX1, . . . , Xps P Rnˆp has p features, stored column-wise. We consider problems where the vector of parameters β “ pβ1, . . . , βpqJ admits a natural group structure. A group of features is a subset g Ă rps and ng is its cardinality. The set of groups is denoted by G and we focus only on non-overlapping groups that form a partition of rps. We denote by βg the vector in Rng which is the restriction of β to the indexes in g. We write rβgsj the j-th coordinate of βg. We also use the notation Xg P Rnˆng for the sub-matrix of X assembled from the columns with indexes j P g; similarly rXgsj is the j-th column of rXgs. For any norm Ω, BΩrefers to the corresponding unit ball, and B (resp. B8) stands for the Euclidean (resp. ℓ8) unit ball. The soft-thresholding operator (at level τ ě 0), Sτ, is defined for any x P Rd by rSτpxqsj “ signpxjqp|xj| ´ τq`, while the group soft-thresholding (at level τ) is Sgp τ pxq “ p1 ´ τ{∥x∥q`x. Denoting ΠC the projection on a closed convex set C, this yields Sτ “ Id ´ΠτB8. The sub-differential of a convex function f : Rd Ñ R at x is defined by Bfpxq “ tz P Rd : @y P Rd, fpxq ´ fpyq ě zJpx ´ yqu. We recall that the sub-differential B∥¨∥1 of the ℓ1 norm is signp¨q, defined element-wise by @j P rds, signpxqj “ "tsignpxjqu , if xj ‰ 0, r´1, 1s, if xj “ 0. Note that the sub-differential B∥¨∥of the Euclidean norm is B∥¨∥pxq “ "tx{∥x∥u , if x ‰ 0, B, if x “ 0. For any norm Ωon Rd, ΩD is the dual norm of Ω, and is defined for any x P Rd by ΩDpxq “ maxvPBΩvJx, e.g., ∥¨∥D 1 “ ∥¨∥8 and ∥¨∥D “ ∥¨∥. We only focus on the Sparse-Group Lasso norm, so we assume that Ω“ Ωτ,w, where Ωτ,wpβq :“ τ∥β∥1 ` p1 ´ τq ř gPG wg∥βg∥, for τ P r0, 1s, w “ pwgqgPG with wg ě 0 for all g P G. The case where wg “ 0 for some g P G together with τ “ 0 is excluded (Ωτ,w is not a norm in such a case). 2 Sparse-Group Lasso regression For λ ą 0 and τ P r0, 1s, the Sparse-Group Lasso estimator denoted by ˆβpλ,Ωq is defined as a minimizer of the primal objective Pλ,Ωdefined by: ˆβpλ,Ωq P arg min βPRp 1 2 ∥y ´ Xβ∥2 ` λΩpβq :“ Pλ,Ωpβq. (1) A dual formulation (see [4, Th. 3.3.5]) of (1) is given by ˆθpλ,Ωq “ arg max θP∆X,Ω 1 2 ∥y∥2 ´ λ2 2
θ ´ y λ
2 :“ Dλpθq, (2) where ∆X,Ω“ tθ P Rn : ΩDpXJθq ď 1u. The parameter λ ą 0 controls the trade-off between data-fitting and sparsity, and τ controls the trade-off between features sparsity and group sparsity. In particular one recovers the Lasso [18] if τ “ 1, and the Group-Lasso [22] if τ “ 0. 2 For the primal problem, Fermat’s rule (cf. Appendix for details) reads: λˆθpλ,Ωq “ y ´ X ˆβpλ,Ωq (link-equation) , (3) XJˆθpλ,Ωq P BΩpˆβpλ,Ωqq (sub-differential inclusion). (4) Remark 1 (Dual uniqueness). The dual solution ˆθpλ,Ωq is unique, while the primal solution ˆβpλ,Ωq might not be. Indeed, the dual formulation (2) is equivalent to ˆθpλ,Ωq “ arg minθP∆X,Ω∥θ ´ y{λ∥, so ˆθpλ,Ωq “ Π∆X,Ωpy{λq is the projection of y{λ over the dual feasible set ∆X,Ω. Remark 2 (Critical parameter: λmax). There is a critical value λmax such that 0 is a primal solution of (1) for all λ ě λmax. Indeed, the Fermat’s rule states 0 P arg minβPRp∥y ´Xβ∥2{2`λΩpβqðñ 0 P tXJyu ` λBΩp0qðñΩDpXJyq ď λ. Hence, the critical parameter is given by: λmax :“ ΩDpXJyq. Note that evaluating λmax highly relies on the ability to (efficiently) compute the dual norm ΩD. 3 GAP safe rule for the Sparse-Group Lasso The safe rule we propose here is an extension to the Sparse-Group Lasso of the GAP safe rules introduced for Lasso and Group-Lasso [10, 15]. For the Sparse-Group Lasso, the geometry of the dual feasible set ∆X,Ωis more complex (an illustration is given in Fig. 1). Hence, computing a dual feasible point is more intricate. As seen in Section 3.2, the computation of a dual feasible point strongly relies on the ability to evaluate the dual norm ΩD. This crucial evaluation is discussed in Section 4. We first detail how GAP safe screening rules can be obtained for the Sparse-Group Lasso. 3.1 Description of the screening rules Safe screening rules exploit the known sparsity of the solutions of problems such as (1). They discard inactive features/groups whose coefficients are guaranteed to be zero for optimal solutions. Then, a significant reduction in computing time can be obtained ignoring “irrelevant” features/groups. The Sparse-Group Lasso benefits from two levels of screening: the safe rules can detect both group-wise zeros in the vector ˆβpλ,Ωq and coordinate-wise zeros in the remaining groups. To obtain useful screening rules one needs a safe region, i.e., a set containing the optimal dual solution ˆθpλ,Ωq. Following [9], when we choose a ball Bpθc, rq with radius r and centered at θc as a safe region, we call it a safe sphere. A safe sphere is all the more useful that r is small and θc close to ˆθpλ,Ωq. The safe rules for the Sparse-Group Lasso work as follows: for any group g in G and any safe sphere Bpθc, rq Group level safe screening rule: max θPBpθc,rq
SτpXJ g θq
ă p1 ´ τqwg ñ ˆβpλ,Ωq g “ 0, (5) Feature level safe screening rule: @j P g, max θPBpθc,rq |XJ j θ| ă τ ñ ˆβpλ,Ωq j “ 0. (6) This means that provided one the last two test is true, the corresponding group or feature can be (safely) discarded. For screening variables, we rely on the following upper-bounds: Proposition 1. For all group g P G and j P g, max θPBpθc,rq |XJ j θ| ď |XJ j θc| ` r ∥Xj∥. (7) and max θPBpθc,rq
SτpXJ g θq
ď Tg :“ #
SτpXJ g θcq
` r ∥Xg∥ if
XJ g θc
8 ą τ, p
XJ g θc
8 ` r ∥Xg∥´ τq` otherwise. (8) Assume now that one has found a safe sphere Bpθc, rq (their creation is deferred to Section 3.2), then the safe screening rules given by (5) and (6) read: Theorem 1 (Safe rules for the Sparse-Group Lasso). Using Tg defined in (8), we can state the following safe screening rules: Group level safe screening: @g P G, if Tg ă p1 ´ τqwg, then ˆβpλ,Ωq g “ 0, Feature level safe screening: @g P G, @j P g, if |XJ j θc| ` r ∥Xj∥ă τ, then ˆβpλ,Ωq j “ 0. 3 (a) Lasso dual ball BΩD for ΩDpθq “ ∥θ∥8. (b) Group-Lasso dual ball BΩD for ΩDpθq “ maxp a θ2 1 ` θ2 2, |θ3|q. (c) Sparse-Group Lasso dual ball BΩD “ ␣ θ : @g P G, ∥Sτpθgq∥ď p1 ´ τqwg ( . Figure 1: Lasso, Group-Lasso and Sparse-Group Lasso dual unit balls BΩD “ tθ : ΩDpθq ď 1u, for the case of G “ tt1, 2u, t3uu (i.e., g1 “ t1, 2u, g2 “ t3u), n “ p “ 3, wg1 “ wg2 “ 1 and τ “ 1{2. The screening rules can detect which coordinates or group of coordinates can be safely set to zero. This allows to remove the corresponding features from the design matrix X during the optimization process. While standard algorithms solve (1) scanning all variables, only active ones, i.e., non screened-out variables (using the terminology from Section 3.3) need to be considered with safe screening strategies. This leads to significant computational speed-ups, especially with a coordinate descent algorithm for which it is natural to ignore features (see Algorithm 2, in Appendix G). 3.2 GAP safe sphere We now show how to compute the safe sphere radius and center using the duality gap. 3.2.1 Computation of the radius With a dual feasible point θ P ∆X,Ωand a primal vector β P Rp at hand, let us construct a safe sphere centered on θ, with radius obtained thanks to dual gap computations. Theorem 2 (Safe radius). For any θ P ∆X,Ωand β P Rp, one has ˆθpλ,Ωq P B pθ, rλ,Ωpβ, θqq , for rλ,Ωpβ, θq “ c 2pPλ,Ωpβq ´ Dλpθqq λ2 , i.e., the aforementioned ball is a safe region for the Sparse-Group Lasso problem. Proof. The result holds thanks to strong concavity of the dual objective, cf. Appendix C. 3.2.2 Computation of the center In GAP safe screening rules, the screening test relies crucially on the ability to compute a vector that belongs to the dual feasible set ∆X,Ω. The geometry of this set is illustrated in Figure 1. Following [3], we leverage the primal/dual link-equation (3) to construct a dual point based on a current approximation β of ˆβpλ,Ωq. When β “ βλ1 is obtained as an approximation for a previous value of λ1 ‰ λ we call such a strategy sequential screening. When β “ βk is the primal value at iteration k obtained by an iterative algorithm, we call this dynamical screening. Starting from a residual ρ “ y ´ Xβ, one can create a dual feasible point by choosing 1: θ “ ρ maxpλ, ΩDpXJρqq. (9) We refer to the sets Bpθ, rλ,Ωpβ, θqq as GAP safe spheres. Note that the generalization to any smooth data fitting term would be straightforward see [15].s Remark 3. Recall that λ ě λmax yields ˆβpλ,Ωq “ 0, in which case ρ :“ y ´ X ˆβpλ,Ωq “ y is the optimal residual and y{λmax is the dual solution. Thus, as for getting λmax “ ΩDpXJyq, the scaling computation in (9) requires a dual norm evaluation. 1We have used a simpler scaling w.r.t. [2] choice’s (without noticing much difference in practice): θ “ sρ where s “ min ” max ´ ρJy λ∥ρ∥2 , ´1 ΩDpXJρq ¯ , 1 ΩDpXJρq ı . 4 Algorithm 1 Computation of Λpx, α, Rq. Input: x “ px1, . . . , xdqJ P Rd, α P r0, 1s, R ě 0 Output: Λpx, α, Rq if α “ 0 and R “ 0 then Λpx, α, Rq “ 8 else if α “ 0 and R ‰ 0 then Λpx, α, Rq “ ∥x∥{R else if R “ 0 then Λpx, α, Rq “ ∥x∥8{α else Get I :“ ! i P rds : |xi| ą α∥x∥8 α`R ) nI :“ CardpIq Sort xp1q ě xp2q ě ¨ ¨ ¨ ě xpnIq S0 “ xp0q, Sp2q 0 “ x2 p0q, a0 “ 0 for k P rnI ´ 1s do Sk “ Sk´1 ` xpkq; Sp2q k “ Sp2q k´1 ` x2 pkq ak`1 “ Sp2q k x2 pk`1q ´ 2 Sk xpk`1q ` k ` 1 if R2 α2 P rak, ak`1r then j0 “ k ` 1 break if α2j0 ´ R2 “ 0 then Λpx, α, Rq “ S2 j0 2αSj0 else Λpx, α, Rq “ αSj0 ´ c α2S2 j0 ´Sp2q j0 pα2j0´R2q α2j0´R2 3.3 Convergence of the active set The next proposition states that the sequence of dual feasible points obtained from (9) converges to the dual solution ˆθpλ,Ωq if pβkqkPN converges to an optimal primal solution ˆβpλ,Ωq (proof in Appendix). It guarantees that the GAP safe spheres Bpθk, rλ,Ωpβk, θkqq are converging safe regions in the sense introduced by [10], since by strong duality limkÑ8 rλ,Ωpβk, θkq “ 0. Proposition 2. If limkÑ8 βk “ ˆβpλ,Ωq, then limkÑ8 θk “ ˆθpλ,Ωq. For any safe region R, i.e., a set containing ˆθpλ,Ωq, we define two levels of active sets, one for the group level and one for the feature level: AgppRq :“ tg P G, max θPR
SτpXJ g θq
ě p1 ´ τqwgu, AftpRq :“ ď gPAgppRq tj P g : max θPR |XJ j θ| ě τu. If one considers sequence of converging regions, then the next proposition (whose proof in Appendix) states that we can identify in finite time the optimal active sets defined as follows: Egp :“ ! g P G :
SτpXJ g ˆθpλ,Ωqq
“ p1 ´ τqwg ) , Eft :“ ď gPEgp ! j P g : |XJ j ˆθpλ,Ωq| ě τ ) . Proposition 3. Let pRkqkPN be a sequence of safe regions whose diameters converge to 0. Then, lim kÑ8 AgppRkq “ Egp and lim kÑ8 AftpRkq “ Eft. 4 Properties of the Sparse-Group Lasso To apply our safe rule, we need to be able to evaluate the dual norm ΩD efficiently. We describe such as step hereafter along with some useful properties of the norm Ω. Such evaluations are performed multiple times during the algorithm, motivating the derivation of an efficient algorithm, as presented in Algorithm 1. 4.1 Connections with ϵ-norms Here, we establish a link between the Sparse-Group Lasso norm Ωand the ϵ-norm (denoted ∥¨∥ϵ) introduced in [6]. For any ϵ P r0, 1s and x P Rd, ∥x∥ϵ is defined as the unique nonnegative solution ν of the equation řd i“1p|xi| ´ p1 ´ ϵqνq2 ` “ pϵνq2, (∥x∥0 :“ ∥x∥8). Using soft-thresholding, this is equivalent to solve in ν the equation řd i“1 Sp1´ϵqνpxiq2 “ ∥Sp1´ϵqνpxq∥2 “ pϵνq2. Moreover, the dual norm of the ϵ-norm is given by2: ∥y∥D ϵ “ ϵ∥y∥D ` p1 ´ ϵq∥y∥D 8 “ ϵ∥y∥` p1 ´ ϵq∥y∥1. Now we can express the Sparse-Group Lasso norm Ωin term of the dual ϵ-norm and derive some basic properties. 2see [7, Eq. (42)] or Appendix 5 Proposition 4. For all groups g in G, let us introduce ϵg :“ p1´τqwg τ`p1´τqwg . Then, the Sparse-Group Lasso norm satisfies the following properties: for any β and ξ in Rp Ωpβq “ ÿ gPG pτ ` p1 ´ τqwgq ∥βg∥D ϵg , and ΩDpξq “ max gPG ∥ξg∥ϵg τ ` p1 ´ τqwg , (10) BΩD “ ␣ ξ P Rp : @g P G, ∥Sτpξgq∥ď p1 ´ τqwg ( . (11) The sub-differential at β reads BΩpβq “ tz P Rp : @g P G, zg P τB∥¨∥1pβgq ` p1 ´ τqwgB∥¨∥pβgqu . We obtain from the characterization of the unit dual ball (11) that for the Sparse-Group Lasso, any dual feasible point θ P ∆X,Ωverifies: @g P G, XJ g θ P p1 ´ τqwgB ` τB8. From the dual norm formulation (10), a vector θ P Rn is feasible if and only if ΩDpXJθq ď 1, i.e., @g P G, ∥XJ g θ∥ϵg ď τ ` p1 ´ τqwg. Hence we deduce from (11) a new characterization of the dual feasible set: ∆X,Ω“ ␣ θ P Rn : @g P G, ∥XJ g θ∥ϵg ď τ ` p1 ´ τqwg ( . 4.2 Efficient computation of the dual norm The following proposition shows how to compute the dual norm of the Sparse-Group Lasso (and the ϵ-norm). This is turned into an efficient procedure in Algorithm 1 (see the Appendix for details). Proposition 5. For α P r0, 1s, R ě 0 and x P Rd, the equation řd i“1 Sναpxiq2 “ pνRq2 has a unique solution ν :“ Λpx, α, Rq P R`, that can be computed in Opd log dq operations in the worst case. With nI “ Card ti P rds : |xi| ą α∥x∥8{pα ` Rqu, the complexity of Algorithm 1 is nI ` nI logpnIq, which is comparable to the ambient dimension d. Thanks to Remark 2, we can explicit the critical parameter λmax for the Sparse-Group Lasso that is λmax “ max gPG ΛpXJ g y, 1 ´ ϵg, ϵgq τ ` p1 ´ τqwg “ ΩDpXJyq, (12) and get a dual feasible point (9), since ΩDpXJρq “ maxgPG ΛpXJ g ρ, 1 ´ ϵg, ϵgq{pτ ` p1 ´ τqwgq. 5 Implementation In this section we provide details on how to solve the Sparse-Group Lasso primal problem, and how we apply the GAP safe screening rules. We focus on the block coordinate iterative soft-thresholding algorithm (ISTA-BC); see [16]. This algorithm requires a block-wise Lipschitz gradient condition on the data fitting term fpβq “ ∥y ´ Xβ∥2{2. For our problem (1), one can show that for all group g in G, Lg “ ∥Xg∥2 2 (where ∥¨∥2 is the spectral norm of a matrix) is a suitable block-wise Lipschitz constant. We define the block coordinate descent algorithm according to the MajorizationMinimization principle: at each iteration l, we choose (e.g., cyclically) a group g and the next iterate βl`1 is defined such that βl`1 g1 “ βl g1 if g1 ‰ g and otherwise βl`1 g “ arg minβgPRng ∥βg ´ ` βl g ´ ∇gfpβlq{Lg ˘ ∥2{2` ` τ∥βg∥1 `p1´τqwg∥βg∥ ˘ λ{Lg, where we denote for all g in G, αg :“ λ{Lg. This can be simplified to βl`1 g “ Sgp p1´τqωgαg ` Sταg ` βl g ´ ∇gfpβlq{Lg ˘˘ . The expensive computation of the dual gap is not performed at each pass over the data, but only every f ce pass (in practice f ce “ 10 in all our experiments). A pseudo code is given in Appendix G. 6 Experiments In this section we present our experiments and illustrate the numerical benefit of screening rules for the Sparse-Group Lasso. 6.1 Experimental settings and methods compared We have run our ISTA-BC algorithm 3 to obtain the Sparse-Group Lasso estimator for a non-increasing sequence of T regularization parameters pλtqtPrT ´1s defined as follows: λt :“ λmax10´δpt´1q{pT ´1q. 3The source code can be found in https://github.com/EugeneNdiaye/GAPSAFE_SGL. 6 Figure 2: Experiments on a synthetic dataset (ρ “ 0.5, γ1 “ 10, γ2 “ 4, τ “ 0.2). (a) Proportion of active variables, i.e., variables not safely eliminated, as a function of parameters pλtq and the number of iterations K. More red, means more variables eliminated and better screening. (b) Time to reach convergence w.r.t the accuracy on the duality gap, using various screening strategies. By default, we choose δ “ 3 and T “ 100, following the standard practice when running crossvalidation using sparse models (see R glmnet package [11]). The weights are always chosen as wg “ ?ng (as in [17]). We also provide a natural extension of the previous safe rules [9, 21, 3] to the Sparse-Group Lasso for comparisons (please refer to Appendix D for more details). The static safe region [9] is given by B py{λ, ∥y{λmax ´ y{λ∥q. The corresponding dynamic safe region [3]) is given by B py{λ, ∥θk ´ y{λ∥q, where pθkqkPN is a sequence of dual feasible points obtained by dual scaling; cf. Equation (9). The DST3, is an improvement of the preceding safe region, see [21, 3], that we adapted to the Sparse-Group Lasso. The GAP safe sequential rules corresponds to using only GAP Safe spheres whose centers are the (last) dual point output by the solver for a former value of λ in the path. The GAP safe rules corresponds to performing our strategy both sequentially and dynamically. Presenting the sequential rule allows to measure the benefits due to sequential rules and to the dynamic rules. We now demonstrate the efficiency of our method in both synthetic (Fig. (2)) and real datasets (Fig. 6.2). For comparison, we report computation times to reach convergence up to a certain tolerance on the duality gap for all the safe rules considered. Synthetic dataset: We use a common framework [19, 20] based on the model y “ Xβ ` 0.01ε where ε „ Np0, Idnq, X P Rnˆp follows a multivariate normal distribution such that @pi, jq P rps2, corrpXi, Xjq “ ρ|i´j|. We fix n “ 100 and break randomly p “ 10000 in 1000 groups of size 10 and select γ1 groups to be active and the others are set to zero. In each selected groups, γ2 coordinates are drawn with rβgsj “ signpξq ˆ U for U is uniform in r0.5, 10sq, ξ uniform in r´1, 1s. Real dataset: NCEP/NCAR Reanalysis 1 [14] The dataset contains monthly means of climate data measurements spread across the globe in a grid of 2.5˝ ˆ 2.5˝ resolutions (longitude and latitude 144ˆ73) from 1948{1{1 to 2015{10{31 . Each grid point constitutes a group of 7 predictive variables (Air Temperature, Precipitable water, Relative humidity, Pressure, Sea Level Pressure, Horizontal Wind Speed and Vertical Wind Speed) whose concatenation across time constitutes our design matrix X P R814ˆ73577. Such data have therefore a natural group structure. In our experiments, we considered as target variable y P R814, the values of Air Temperature in a neighborhood of Dakar. Seasonality and trend are first removed, as usually done in climate analysis for bias reduction in the regression estimates. Similar data has been used in [8], showing that the Sparse-Group Lasso estimator is well suited for prediction in climatology. Indeed, thanks to the sparsity structure, the estimates delineate via their support some predictive regions at the group level, as well as predictive features via coordinate-wise screening. We choose τ in the set t0, 0.1, . . . , 0.9, 1u by splitting in 50% the observations and run a training-test validation procedure. For each value of τ, we require a duality gap of 10´8 on the training part 7 a) b) Figure 3: Experiments on NCEP/NCAR Reanalysis 1 pn “ 814, p “ 73577q: (a) Prediction error for the Sparse-Group Lasso path with 100 values of λ and 11 values of τ (best : τ ‹ “ 0.4). (b) Time to reach convergence controlled by duality gap (for whole path pλtqtPrT s with δ “ 2.5 and τ ‹ “ 0.4). (c) Active groups to predict Air Temperature in a neighborhood of Dakar (in blue). Cross validation was run over 100 values for λ’s and 11 for τ’s. At each location, the highest absolute value among the seven coefficients is displayed. and pick the best one in term of prediction accuracy on the test part. The result is displayed in Figure 6.2.(a). We fixed δ “ 2.5 for the computational time benchmark in Figure 6.2.(b) 6.2 Performance of the screening rules In all our experiments, we observe that our proposed GAP Safe rule outperforms the other rules in term of computation time. On Figure 2.(c), we can see that we need 65s to reach convergence whereas others rules need up to 212s at a precision of 10´8. A similar performance is observed on the real dataset (Figure 6.2) where we obtain up to a 5x speed up over the other rules. The key reason behind this performance gain is the convergence of the GAP Safe regions toward the dual optimal point as well as the efficient strategy to compute the screening rule. As shown in the results presented on Figure 2, our method still manages to screen out variables when λ is small. It corresponds to low regularizations which lead to less sparse solutions but need to be explored during cross-validation. In the climate experiments, the support map in Figure 6.2.(c) shows that the most important coefficients are distributed in the vicinity of the target region (in agreement with our intuition). Nevertheless, some active variables with small coefficients remain and cannot be screened out. Note that we do not compare our method to the TLFre [20], since this sequential rule requires the exact knowledge of the dual optimal solution which is not available in practice. As a consequence, one may discard active variables which can prevent the algorithm from converging as shown in [15]. 7 Conclusion The recent GAP safe rules introduced have shown great improvements, for a wide range of regularized regression, in the reduction of computing time, especially in high dimension. To apply such GAP safe rules to the Sparse-Group Lasso, we have proposed a new description of the dual feasible set by establishing connections between the Sparse-Group Lasso norm and ϵ-norms. This geometrical connection has helped providing an efficient algorithm to compute the dual norm and dual feasible points, bottlenecks for applying the GAP Safe rules. Extending GAP safe rules on general hierarchical regularizations, is a possible direction for future research. Acknowledgments: this work was supported by the ANR THALAMEEG ANR-14-NEUC-000201, the NIH R01 MH106174, by ERC Starting Grant SLAB ERC-YStG-676943 and by the Chair Machine Learning for Big Data at Télécom ParisTech. 8 References [1] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] A. Bonnefoy, V. Emiya, L. Ralaivola, and R. Gribonval. A dynamic screening principle for the lasso. In EUSIPCO, 2014. [3] A. Bonnefoy, V. Emiya, L. Ralaivola, and R. Gribonval. Dynamic Screening: Accelerating First-Order Algorithms for the Lasso and Group-Lasso. IEEE Trans. Signal Process., 63(19):20, 2015. [4] J. M. Borwein and A. S. Lewis. Convex analysis and nonlinear optimization. Springer, New York, second edition, 2006. [5] P. Bühlmann and S. van de Geer. Statistics for high-dimensional data. Springer Series in Statistics. Springer, Heidelberg, 2011. Methods, theory and applications. [6] O. Burdakov. A new vector norm for nonlinear curve fitting and some other optimization problems. 33. Int. Wiss. Kolloq. Fortragsreihe "Mathematische Optimierung | Theorie und Anwendungen", pages 15–17, 1988. [7] O. Burdakov and B. Merkulov. On a new norm for data fitting and optimization problems. Linköping University, Linköping, Sweden, Tech. Rep. LiTH-MAT, 2001. [8] S. Chatterjee, K. Steinhaeuser, A. Banerjee, S. Chatterjee, and A. Ganguly. Sparse group lasso: Consistency and climate applications. In SIAM International Conference on Data Mining, pages 47–58, 2012. [9] L. El Ghaoui, V. Viallon, and T. Rabbani. Safe feature elimination in sparse supervised learning. J. Pacific Optim., 8(4):667–698, 2012. [10] O. Fercoq, A. Gramfort, and J. Salmon. Mind the duality gap: safer rules for the lasso. In ICML, pages 333–342, 2015. [11] J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani. Pathwise coordinate optimization. Ann. Appl. Stat., 1(2):302–332, 2007. [12] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for hierarchical sparse coding. J. Mach. Learn. Res., 12:2297–2334, 2011. [13] T. B. Johnson and C. Guestrin. Blitz: A principled meta-algorithm for scaling sparse optimization. In ICML, pages 1171–1179, 2015. [14] E. Kalnay, M. Kanamitsu, R. Kistler, W. Collins, D. Deaven, L. Gandin, M. Iredell, S. Saha, G. White, J. Woollen, et al. The NCEP/NCAR 40-year reanalysis project. Bulletin of the American meteorological Society, 77(3):437–471, 1996. [15] E. Ndiaye, O. Fercoq, A. Gramfort, and J. Salmon. GAP safe screening rules for sparse multi-task and multi-class models. NIPS, pages 811–819, 2015. [16] Z. Qin, K. Scheinberg, and D. Goldfarb. Efficient block-coordinate descent algorithms for the group lasso. Mathematical Programming Computation, 5(2):143–169, 2013. [17] N. Simon, J. Friedman, T. Hastie, and R. Tibshirani. A sparse-group lasso. J. Comput. Graph. Statist., 22(2):231–245, 2013. [18] R. Tibshirani. Regression shrinkage and selection via the lasso. JRSSB, 58(1):267–288, 1996. [19] R. Tibshirani, J. Bien, J. Friedman, T. Hastie, N. Simon, J. Taylor, and R. J. Tibshirani. Strong rules for discarding predictors in lasso-type problems. JRSSB, 74(2):245–266, 2012. [20] J. Wang and J. Ye. Two-layer feature reduction for sparse-group lasso via decomposition of convex sets. arXiv preprint arXiv:1410.4210, 2014. [21] Z. J. Xiang, H. Xu, and P. J. Ramadge. Learning sparse representations of high dimensional data on large scale dictionaries. In NIPS, pages 900–908, 2011. [22] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. JRSSB, 68(1):49–67, 2006. 9 | 2016 | 200 |
6,107 | Local Similarity-Aware Deep Feature Embedding Chen Huang Chen Change Loy Xiaoou Tang Department of Information Engineering, The Chinese University of Hong Kong {chuang,ccloy,xtang}@ie.cuhk.edu.hk Abstract Existing deep embedding methods in vision tasks are capable of learning a compact Euclidean space from images, where Euclidean distances correspond to a similarity metric. To make learning more effective and efficient, hard sample mining is usually employed, with samples identified through computing the Euclidean feature distance. However, the global Euclidean distance cannot faithfully characterize the true feature similarity in a complex visual feature space, where the intraclass distance in a high-density region may be larger than the interclass distance in low-density regions. In this paper, we introduce a Position-Dependent Deep Metric (PDDM) unit, which is capable of learning a similarity metric adaptive to local feature structure. The metric can be used to select genuinely hard samples in a local neighborhood to guide the deep embedding learning in an online and robust manner. The new layer is appealing in that it is pluggable to any convolutional networks and is trained end-to-end. Our local similarity-aware feature embedding not only demonstrates faster convergence and boosted performance on two complex image retrieval datasets, its large margin nature also leads to superior generalization results under the large and open set scenarios of transfer learning and zero-shot learning on ImageNet 2010 and ImageNet-10K datasets. 1 Introduction Deep embedding methods aim at learning a compact feature embedding f(x) ∈Rd from image x using a deep convolutional neural network (CNN). They have been increasingly adopted in a variety of vision tasks such as product visual search [1, 14, 29, 33] and face verification [13, 27]. The embedding objective is usually in a Euclidean sense: the Euclidean distance Di,j = ∥f(xi) −f(xj)∥2 between two feature vectors should preserve their semantic relationship encoded pairwise (by contrastive loss [1]), in triplets [27, 33] or even higher order relationships (e.g., by lifted structured loss [29]). It is widely observed that an effective data sampling strategy is crucial to ensure the quality and learning efficiency of deep embedding, as there are often many more easy examples than those meaningful hard examples. Selecting overly easy samples can in practice lead to slow convergence and poor performance since many of them satisfy the constraint well and give nearly zero loss, without exerting any effect on parameter update during the back-propagation [3]. Hence hard example mining [7] becomes an indispensable step in state-of-the-art deep embedding methods. These methods usually choose hard samples by computing the convenient Euclidean distance in the embedding space. For instance, in [27, 29], hard negatives with small Euclidean distances are found online in a mini-batch. An exception is [33] where an online reservoir importance sampling scheme is proposed to sample discriminative triplets by relevance scores. Nevertheless, these scores are computed offline with different hand-crafted features and distance metrics, which is suboptimal. We question the effectiveness of using a single and global Euclidean distance metric for finding hard samples, especially for real-world vision tasks that exhibit complex feature variations due to pose, lighting, and appearance. As shown in a fine-grained bird image retrieval example in Figure 1(a), the diversity of feature patterns learned for each class throughout the feature space can easily lead 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Deep Euclidean metric Triplet loss [27,33] Position-Dependent Deep Metric Double header hinge loss 0 Similarity 1 0 Similarity 1 Feature embedding space ˆ ( ) i f x ˆ ( ) k f x ˆ ( ) j f x ˆ ( ) l f x ˆ ˆ,i j S ˆ ˆ,i k S ˆ ˆ,j l S ( ) p S Similarity score space PDDM Hard quadruplet mining (b) ( ) i f x Horned Puffin Horned Puffin Nashville Warbler Myrtle Warbler Elegant Tern Yellow Warbler Common Yellowthroat ( ) i f x ( ) j f x Elegant Tern ( ) j f x (c) (a) Mini-batch Positive similarity Negative similarity Figure 1: (a) 2-D feature embedding (by t-SNE [19]) of the CUB-200-2011 [32] test set. The intraclass distance can be larger than the interclass distance under the global Euclidean metric, which can mislead the hard sample mining and consequently deep embedding learning. We propose a PDDM unit that incorporates the absolute position (i.e., feature mean denoted by the red triangle) to adapt metric to the local feature structure. (b) Overlapped similarity distribution by the Euclidean metric (the similarity scores are transformed from distances by a Sigmoid-like function) vs. the well-separated distribution by PDDM. (c) PDDM-guided hard sample mining and embedding learning. to a larger intraclass Euclidean distance than the interclass distance. Such a heterogeneous feature distribution yields a highly overlapped similarity score distribution for the positive and negative pairs, as shown in the left chart of Figure 1(b). We observed similar phenomenon for the global Mahalanobis metric [11, 12, 21, 35, 36] in our experiments. It is not difficult to see that using a single and global metric would easily mislead the hard sample mining. To circumvent this issue, Cui et al. [3] resorted to human intervention for harvesting genuinely hard samples. Mitigating the aforementioned issue demands an improved metric that is adaptive to the local feature structure. In this study we wish to learn a local-adaptive similarity metric online, which will be exploited to search for high-quality hard samples in local neighborhood to facilitate a more effective deep embedding learning. Our key challenges lie in the formulation of a new layer and loss function that jointly consider the similarity metric learning, hard samples selection, and deep embedding learning. Existing studies [13, 14, 27, 29, 33] only consider the two latter objectives but not together with the first. To this end, we propose a new Position-Dependent Deep Metric (PDDM) unit for similarity metric learning. It is readily pluggable to train end-to-end with an existing deep embedding learning CNN. We formulate the PDDM such that it learns locally adaptive metric (unlike the global Euclidean metric), through a non-linear regression on both the absolute feature difference and feature mean (which encodes absolute position) of a data pair. As depicted in the right chart of Figure 1(b), the proposed metric yields a similarity score distribution that is more distinguishable than the conventional Euclidean metric. As shown in Figure 1(c), hard samples are mined from the resulting similarity score space and used to optimize the feature embedding space in a seamless manner. The similarity metric learning in PDDM and embedding learning in the associated CNN are jointly optimized using a novel large-margin double-header hinge loss. Image retrieval experiments on two challenging real-world vision datasets, CUB-200-2011 [32] and CARS196 [15], show that our local similarity-aware feature embedding significantly outperforms state-of-the-art deep embedding methods that come without the online metric learning and associated hard sample mining scheme. Moreover, the proposed approach incurs a far lower computational cost and encourages faster convergence than those structured embedding methods (e.g., [29]), which need to compute a fully connected dense matrix of pairwise distances in a mini-batch. We further demonstrate our learned embedding is generalizable to new classes in large open set scenarios. This is validated in the transfer learning and zero-shot learning (using the ImageNet hierarchy as auxiliary knowledge) tasks on ImageNet 2010 and ImageNet-10K [5] datasets. 2 ˆjx Training data CNN CNN ( ) j ˆ ( ) l f x Double-header hinge loss Feature embedding: (a) PDDM-Net architecture (b) PDDM learning unit ( , ) m m x y ˆlx ( , ) ˆ, ˆ ˆ( , ) ˆ, ˆ ˆ ( , ) ˆ arg max ˆ arg max j i k i k N j l j l N k S l S ... L2 PDDM ˆ ˆ,j l S Doub hin ˆ ( ) i f x ˆ ( ) k f x ˆ ( ) j f x ˆ ( ) l f x ˆ ˆ,i j S ˆ ˆ,i k S ( ) j f x L2 ( ) ( ) 2 i j f x f x L2 score ,i j S Cat ˆjx Mini-batches ... CNN CNN CNN CNN ˆix ˆ ( ) i f x ˆ ( ) j f x ˆ ( ) k f x ˆ ( ) l f x Double-header hinge loss Feature embedding (a) Overall network architecture (b) PDDM unit 1 1 ( , ) x y ( , ) m m x y ˆlx ˆkx Hard quadruplet L2 , ˆ ( , ) ˆ, ˆ ˆ( , ) ˆ, ˆ ˆ ( , ) ˆ ˆ ( , ) arg min ˆ arg max ˆ arg max i j i j P i k i k N j l j l N i j S k S l S L2 L2 L2 PDDM PDDM PDDM ˆ ˆ,i k S ˆ ˆ,i j S ˆ ˆ,j l S Double-header hinge loss Similarity score ( ) i f x L2 ( ) j f x L2 ( ) ( ) i j f x f x L2 ( ) ( ) 2 i j f x f x L2 PDDM ,i j S Cat FC FC FC FC Figure 2: (a) The overall network architecture. All CNNs have shared architectures and parameters. (b) The PDDM unit. 2 Related work Hard sample mining in deep learning: Hard sample mining is a popular technique used in computer vision for training robust classifier. The method aims at augmenting a training set progressively with false positive examples with the model learned so far. It is the core of many successful vision solutions, e.g. pedestrian detection [4, 7]. In a similar spirit, contemporary deep embedding methods [27, 29] choose hard samples in a mini-batch by computing the Euclidean distance in the embedding space. For instance, Schroff et al. [27] selected online the semi-hard negative samples with relatively small Euclidean distances. Wang et al. [33] proposed an online reservoir importance sampling algorithm to sample triplets by relevance scores, which are computed offline with different distance metrics. Similar studies on image descriptor learning [28] and unsupervised feature learning [34] also select hard samples according to the Euclidean distance-based losses in their respective CNNs. We argue in this paper that the global Euclidean distance is a suboptimal similarity metric for hard sample mining, and propose a locally adaptive metric for better mining. Metric learning: An effective similarity metric is at the core of hard sample mining. Euclidean distance is the simplest similarity metric, and it is widely used by current deep embedding methods where Euclidean feature distances directly correspond the similarity. Similarities can be encoded pairwise with a contrastive loss [1] or in more flexible triplets [27, 33]. Song et al. [29] extended to even higher order similarity constraints by lifting the pairwise distances within a mini-batch to the dense matrix of pairwise distances. Beyond Euclidean metric, one can actually turn to the parametric Mahalanobis metric instead. Representative works [12, 36] minimize the Mahalanobis distance between positive sample pairs while maximizing the distance between negative pairs. Alternatives directly optimize the Mahalanobis metric for nearest neighbor classification via the method of Neighbourhood Component Analysis (NCA) [11], Large Margin Nearest Neighbor (LMNN) [35] or Nearest Class Mean (NCM) [21]. However, the common drawback of the Mahalanobis and Euclidean metrics is that they are both global and are far from being ideal in the presence of heterogeneous feature distribution (see Figure 1(a)). An intuitive remedy would be to learn multiple metrics [9], which would be computationally expensive though. Xiong et al. [37] proposed a single adaptive metric using the absolute position information in random forest classifiers. Our approach shares the similar intuition, but incorporates the position information by a deep CNN in a more principled way, and can jointly learn similarity-aware deep features instead of using hand-crafted ones as in [37]. 3 Local similarity-aware deep embedding Let X = {(xi, yi)} be an imagery dataset, where yi is the class label of image xi. Our goal is to jointly learn a deep feature embedding f(x) from image x into a feature space Rd, and a similarity metric Si,j = S(f(xi), f(xj)) ∈R1, such that the metric can robustly select hard samples online to learn a discriminative, similarity-aware feature embedding. Ideally, the learned features (f(xi), f(xj)) from the set of positive pairs P = {(i, j)|yi = yj} should be close to each other with a large similarity score Si,j, while the learned features from the set of negative pairs N = {(i, j)|yi ̸= yj} should be pushed far away with a small similarity score. Importantly, this relationship should hold independent of the (heterogeneous) feature distribution in Rd, where a global metric Si,j can fail. To adapt Si,j to the latent structure of feature embeddings, we propose a Position-Dependent Deep Metric (PDDM) unit that can be trained end-to-end, see Figure 2(b). 3 The overall network architecture is shown in Figure 2(a). First, we use PDDM to compute similarity scores for the mini-batch samples during a particular forward pass. The scores are used to select one hard quadruplet from the local sets of positive pairs ˆP ∈P and negative pairs ˆN ∈N in the batch. Then each sample in the hard quadruplet is separately fed into four identical CNNs with shared parameters W to extract d-dimensional features. Finally, a discriminative double-header hinge loss is applied to both the similarity score and feature embeddings. This enables us to jointly optimize the two that benefit each other. We will provide the details in the following. 3.1 PDDM learning and hard sample mining Given a feature pair (fW (xi), fW (xj)) extracted from images xi and xj by an embedding function fW (·) parameterized by W, we wish to obtain an ideal similarity score yi,j = 1 if (i, j) ∈P, and yi,j = 0 if (i, j) ∈N. Hence, we seek the optimal similarity metric S∗(·, ·) from an appropriate function space H, and also seek the optimal feature embedding parameters W ∗: (S∗(·, ·), W ∗) = argmin S(·,·)∈H,W 1 |P ∪N| X (i,j)∈P ∪N l (S(fW (xi), fW (xj)), yi,j) , (1) where l(·) is some loss function. We will omit the parameters W of f(·) in the following for brevity. Adapting to local feature structure. The standard Euclidean or Mahalanobis metric can be seen as a special form of function S(·, ·) that is based solely on the feature difference vector u = |f(xi)−f(xj)| or its linearly transformed version. These metrics are suboptimal in a heterogeneous embedding space, thus could easily fail the searching of genuinely hard samples. On the contrary, the proposed PDDM leverages the absolute feature position to adapt the metric throughout the embedding space. Specifically, inspired by [37], apart from the feature difference vector u, we additionally incorporate the feature mean vector v = (f(xi) + f(xj))/2 to encode the absolute position. Unlike [37], we formulate a principled learnable similarity metric from u and v in our CNN. Formally, as shown in Figure 2(b), we first normalize the features f(xi) and f(xj) onto the unit hypersphere, i.e., ∥f(x)∥2 = 1, in order to maintain feature comparability. Such normalized features are used to compute their relative and absolute positions encoded in u and v, each followed by a fully connected layer, an elementwise ReLU nonlinear function σ(ξ) = max(0, ξ), and again, ℓ2-normalization r(x) = x/∥x∥2. To treat u and v differently, the fully connected layers applied to them are not shared, parameterized by Wu ∈Rd×d, bu ∈Rd and Wv ∈Rd×d, bv ∈Rd, respectively. The nonlinearities ensure the model is not trivially equivalent to be the mapping from f(xi) and f(xj) themselves. Then we concatenate the mapped u′ and v′ vectors and pass them through another fully connected layer parameterized by Wc ∈R2d×d, bc ∈Rd and the ReLU function, and finally map to a score Si,j = S(f(xi), f(xj)) ∈R1 via Ws ∈Rd×1, bs ∈R1. To summarize: u = |f(xi) −f(xj)| , v = (f(xi) + f(xj)) /2, u′ = r (σ(Wuu + bu)) , v′ = r (σ(Wvv + bv)) , c = σ Wc u′ v′ + bc , Si,j = Wsc + bs. (2) In this way, we transform the seeking of the similarity metric function S(·, ·) into the joint learning of CNN parameters (Wu, Wv, Wc, Ws, bu, bv, bc, bs for the PDDM unit, and W for feature embeddings). The parameters collectively define a flexible nonlinear regression function for the similarity score. Double-header hinge loss. To optimize all these CNN parameters, we can choose a standard regression loss function l(·), e.g., logistic regression loss. Or alternatively, we can cast the problem as a binary classification one as in [37]. However, in both cases the CNN is prone to overfitting, because the supervisory binary similarity labels yi,j ∈{0, 1} tend to independently push the scores towards two single points. While in practice, the similarity scores of positive and negative pairs live on a 1-D manifold following some distribution patterns on heterogeneous data, as illustrated in Figure 1(b). This motivates us to design a loss function l(·) to separate the similarity distributions, instead of in an independent pointwise way that is noise-sensitive. One intuitive option is to impose the Fisher criterion [20] on the similarity scores, i.e., maximizing the ratio between the interclass and intraclass scatters of scores. Similarly, it can be reduced to maximize (µP −µN)2/(VarP + VarN) in our 1-D case, where µ and Var are the mean and variance of each score distribution. Unfortunately, the 4 optimality of Fisher-like criteria relies on the assumption that the data of each class is of a Gaussian distribution, which is obviously not satisfied in our case. Also, a high cost O(m2) is entailed to compute the Fisher loss in a mini-batch with m samples by computing all the pairwise distances. Consequently, we propose a faster-to-compute loss function that approximately maximizes the margin between the positive and negative similarity distributions without making any assumption about the distribution’s shape or pattern. Specifically, we retrieve one hard quadruplet from a random batch during each forward pass. Please see the illustration in Figure 1(c). The quadruplet consists of the most dissimilar positive sample pair in the batch (ˆi, ˆj) = argmin(i,j)∈ˆ P Si,j, which means their similarity score is most likely to cross the “safe margin” towards the negative similarity distribution in this local range. Next, we build a similarity neighborhood graph that links the chosen positive pair with their respective negative neighbors in the batch, and choose the hard negatives as the other two quadruplet members ˆk = argmax(ˆi,k)∈ˆ N Sˆi,k, and ˆl = argmax(ˆj,l)∈ˆ N Sˆj,l. Using this hard quadruplet (ˆi, ˆj, ˆk, ˆl), we can now locally approximate the inter-distribution margin as min(Sˆi,ˆj −Sˆi,ˆk, Sˆi,ˆj −Sˆj,ˆl) in a robust manner. This makes us immediately come to a double-header hinge loss Em to discriminate the target similarity distributions under the large margin criterion: min Em = X ˆi,ˆj(εˆi,ˆj + τˆi,ˆj), (3) s.t. : ∀(ˆi, ˆj), max 0, α + Sˆi,ˆk −Sˆi,ˆj ≤εˆi,ˆj, max 0, α + Sˆj,ˆl −Sˆi,ˆj ≤τˆi,ˆj, (ˆi, ˆj) = argmin (i,j)∈ˆ P Si,j, ˆk = argmax (ˆi,k)∈ˆ N Sˆi,k, ˆl = argmax (ˆj,l)∈ˆ N Sˆj,l, εˆi,ˆj ≥0, τˆi,ˆj ≥0, where εˆi,ˆj, τˆi,ˆj are the slack variables, and α is the enforced margin. The discriminative loss has four main benefits: 1) The discrimination of similarity distributions is assumption-free. 2) Hard samples are simultaneously found during the loss minimization. 3) The loss function incurs a low computational cost and encourages faster convergence. Specifically, the searching cost of the hard positive pair (ˆi, ˆj) is very small since the positive pair set ˆP is usually much smaller than the negative pair set ˆN in an m-sized mini-batch. While the hard negative mining only incurs an O(m) complexity. 4) Eqs. (2, 3) can be easily optimized through the standard stochastic gradient descent to adjust the CNN parameters. 3.2 Joint metric and embedding optimization Given the learned PDDM and mined hard samples in a mini-batch, we can use them to solve for a better, local similarity-aware feature embedding at the same time. For computational efficiency, we reuse the hard quadruplet’s features for metric optimization (Eq. (3)) in the same forward pass. What follows is to use the double-header hinge loss again, but to constrain the deep features this time, see Figure 2. The objective is to ensure the Euclidean distance between hard negative features (Dˆi,ˆk or Dˆj,ˆl) is larger than that between hard positive features Dˆi,ˆj by a large margin. Combining the embedding loss Ee and metric loss Em (Eq. (3)) gives our final joint loss function: min Em + λEe + γ∥f W∥2, where Ee = X ˆi,ˆj(oˆi,ˆj + ρˆi,ˆj), (4) s.t. : ∀(ˆi, ˆj), max 0, β + Dˆi,ˆj −Dˆi,ˆk ≤oˆi,ˆj, max 0, β + Dˆi,ˆj −Dˆj,ˆl ≤ρˆi,ˆj, Dˆi,ˆj = ∥f(xˆi) −f(xˆj)∥2, oˆi,ˆj ≥0, ρˆi,ˆj ≥0, where f W are the CNN parameters for both the PDDM and feature embedding, and oˆi,ˆj, ρˆi,ˆj and β are the slack variables and enforced margin for Ee, and λ, γ are the regularization parameters. Since all features are ℓ2-normalized (see Figure 2), we have β+Dˆi,ˆj−Dˆi,ˆk = β−2f(xˆi)f(xˆj)+2f(xˆi)f(xˆk), and can conveniently derive the gradients as those in triplet-based methods [27, 33]. This joint objective provides effective supervision in two domains, respectively at the score level and feature level that are mutually informed. Although the score level supervision by Em alone is already capable of optimizing both our metric and feature embedding, we will show the benefits of adding the feature level supervision by Ee in experiments. Note we can still enforce the large margin relations of quadruple features in Ee using the simple Euclidean metric. This is because the quadruple features are selected by our PDDM that is learned in the local Euclidean space as well. 5 ( ) i f x ( ) j f x Class1 Class2 Class3 Class4 Contrastive embedding ( ) a f x ( ) n f x Class1 Class2 Class3 Class4 Triplet embedding ( ) p f x ( ) i f x ( ) k f x Class1 Class2 Class3 Class4 Lifted structured embedding ( ) j f x ˆ ( ) i f x ˆ ( ) j f x Class1 Class2 Class3 Class4 Local similarity-aware embedding ˆ ( ) k f x ( ) l f x ... ... ˆ ( ) l f x Figure 3: Illustrative comparison of different feature embeddings. Pairwise similarities in classes 1-3 are effortlessly distinguishable in a heterogeneous feature space because there is always a relative safe margin between any two involved classes w.r.t. their class bounds. However, it is not the case for class 4. The contrastive [1], triplet [27, 33] and lifted structured [29] embeddings select hard samples by the Euclidean distance that is not adaptive to the local feature structure. They may thus select inappropriate hard samples and the negative pairs get misled towards the wrong gradient direction (red arrow). In contrast, our local similarity-aware embedding is correctly updated by the genuinely hard examples in class 4. Figure 3 compares our local similarity-aware feature embedding with existing works. Contrastive [1] embedding is trained on pairwise data {(xi, xj, yi,j)}, and tries to minimize the distance between the positive feature pair and penalize the distance between negative feature pair for being smaller than a margin α. Triplet embedding [27, 33] samples the triplet data {(xa, xp, xn)} where xa is an anchor point and xp, xn are from the same and different class, respectively. The objective is to separate the intraclass distance between (f(xa), f(xp)) and interclass distance between (f(xa), f(xn)) by margin α. While lifted structured embedding [29] considers all the positive feature pairs (e.g., (f(xi), f(xj)) in Figure 3) and all their linked negative pairs (e.g., (f(xi), f(xk)), (f(xj), f(xl)) and so on), and enforces a margin α between positive and negative distances. The common drawback of the above-mentioned embedding methods is that they sample pairwise or triplet (i.e., anchor) data randomly and rely on simplistic Euclidean metric. They are thus very likely to update from inappropriate hard samples and push the negative pairs towards the already well-separated embedding space (see the red arrow in Figure 3). While our method can use PDDM to find the genuinely hard feature quadruplet (f(xˆi), f(xˆj), f(xˆk), f(xˆl)), thus can update feature embedding in the correct direction. Also, our method is more efficient than the lifted structured embedding [29] that requires computing dense pairwise distances within a mini-batch. 3.3 Implementation details We use GoogLeNet [31] (feature dimension d = 128) and CaffeNet [16] (d = 4096) as our base network architectures for retrieval and transfer learning tasks respectively. They are initialized with their pretrained parameters on ImageNet classification. The fully-connected layers of our PDDM unit are initialized with random weights and followed by dropout [30] with p = 0.5. For all experiments, we choose by grid search the mini-batch size m = 64, initial learning rate 1 × 10−4, momentum 0.9, margin parameters α = 0.5, β = 1 in Eqs. (3, 4), and regularization parameters λ = 0.5, γ = 5 × 10−4 (λ balances the metric loss Em against the embedding loss Ee). To find meaningful hard positives in our hard quadruplets, we ensure that any one class in a mini-batch has at least 4 samples. And, we always scale Sˆi,ˆj into the range [0, 1] by the similarity graph in the batch. The entire network is trained for a maximum of 400 epochs until convergence. 4 Results Image retrieval. The task of image retrieval is a perfect testbed for our method, where both the learned PDDM and feature embedding (under the Euclidean feature distance) can be used to find similar images for a query. Ideally, a good similarity metric should be query-adapted (i.e., positiondependent), and both the metric and features should be able to generalize. We test these properties of our method on two popular fine-grained datasets with complex feature distribution. We deliberately make the evaluation more challenging by preparing training and testing sets that are disjoint in terms of class labels. Specifically, we use the CUB-200-2011 [32] dataset with 200 bird classes and 11,788 6 (0.87,0.11) (0.87,0.09) (0.96,0.04) (0.86,0.16) (0.87,0.19) (0.96,0.04) (0.84,0.25) (0.85,0.23) (0.96,0.07) (0.96,0.08) (0.84,0.29) (0.84,0.31) (0.82,0.35) (0.83,0.34) (0.95,0.10) (0.83,0.27) (0.81,0.41) (0.95,0.11) (0.79,0.49) (0.81,0.41) (0.95,0.12) (0.75,0.71) (0.80,0.59) (0.94,0.13) CUB-200-2011 CARS196 0 200 400 30 40 50 60 Loss 0 200 400 40 50 60 70 Epoch Quadruplet+Euclidean Quadruplet+PDDM Loss Epoch CUB-200-2011 Figure 4: Top: a comparison of the training convergence curves of our method with Euclidean- and PDDM-based hard quadruplet mining on the test sets of CUB-200-2011 [32] and CARS196 [15] datasets. Bottom: top 8 images retrieved by PDDM (similarity score and feature distance are shown underneath) and the corresponding feature embeddings (black dots) on CUB-200-2011. Table 1: Recall@K (%) on the test sets of CUB-200-2011 [32] and CARS196 [15] datasets. CUB-200-2011 CARS196 K 1 2 4 8 16 32 1 2 4 8 16 32 Contrastive [1] 26.4 37.7 49.8 62.3 76.4 85.3 21.7 32.3 46.1 58.9 72.2 83.4 Triplet [27, 33] 36.1 48.6 59.3 70.0 80.2 88.4 39.1 50.4 63.3 74.5 84.1 89.8 LiftedStruct [29] 47.2 58.9 70.2 80.2 89.3 93.2 49.0 60.3 72.1 81.5 89.2 92.8 LMDM score 49.5 61.1 72.1 81.8 90.5 94.1 50.9 61.9 73.5 82.5 89.8 93.1 PDDM score 55.0 67.1 77.4 86.9 92.2 95.0 55.2 66.5 78.0 88.2 91.5 94.3 PDDM+Triplet 50.9 62.1 73.2 82.5 91.1 94.4 46.4 58.2 70.3 80.1 88.6 92.6 PDDM+Quadruplet 58.3 69.2 79.0 88.4 93.1 95.7 57.4 68.6 80.1 89.4 92.3 94.9 images. We employ the first 100 classes (5,864 images) for training, and the remaining 100 classes (5,924 images) for testing. Another used dataset is CARS196 [15] with 196 car classes and 16,185 images. The first 98 classes (8,054 images) are used for training, and the other 98 classes are retained for testing (8,131 images). We use the standard Recall@K as the retrieval evaluation metric. Figure 4-(top) shows that the proposed PDDM leads to 2× faster convergence in 200 epochs (28 hours on a Titan X GPU) and lower converged loss than the regular Euclidean metric, when both are used to mine hard quadruplets for embedding learning. Note the two resulting approaches both incur lower computational costs than [29], with a near linear rather than quadratic [29] complexity in mini-batches. As observed from the retrieval results and their feature distributions in Figure 4-(bottom), our PDDM copes comfortably with large intraclass variations, and generates stable similarity scores for those differently scattered features positioned around a particular query. These results also demonstrate the successful generalization of PDDM on a test set with disjoint class labels. Table 1 quantifies the advantages of both of our similarity metric (PDDM) and similarity-aware feature embedding (dubbed ‘PDDM+Quadruplet’ for short). In the middle rows, we compare the results from using the metrics of Large Margin Deep Metric (LMDM) and our PDDM, both jointly trained with our quadruplet embedding. The LMDM is implemented by deeply regressing the similarity score from the feature difference only, without using the absolute feature position. Although it is also optimized under the large margin rule, it performs worse than our PDDM due to the lack of position information for metric adaptation. In the bottom rows, we test using the learned features under the Euclidean distance. We observed PDDM significantly improves the performance of both triplet and quadruplet embeddings. In particular, our full ‘PDDM+Quadruplet’ method yields large gains (8%+ Recall@K=1) over previous works [1, 27, 29, 33] all using the Euclidean distance for hard sample mining. Indeed, as visualized in Figure 4, our learned features are typically well-clustered, with sharp boundaries and large margins between many classes. 7 Table 2: The flat top-1 accuracy (%) of transfer learning on ImageNet-10K [5] and flat top-5 accuracy (%) of zero-shot learning on ImageNet 2010. Transfer learning on ImageNet-10K Zero-shot learning on ImageNet 2010 [5] [26] [23] [18] [21] Ours ConSE [22] DeViSE [8] PST [24] [25] [21] AMP [10] Ours 6.4 16.7 18.1 19.2 21.9 28.4 28.5 31.8 34.0 34.8 35.7 41.0 48.2 Discussion. We previously mentioned that our PDDM and feature embedding can be learned by only optimizing the metric loss Em in Eq. (3). Here we experimentally prove the necessity of extra supervision from the embedding loss Ee in Eq. (4). Without it, the Recall@K=1 of image retrieval by our ‘PDDM score’ and ‘PDDM+Quadruplet’ methods drop by 3.4%+ and 6.5%+, respectively. Another important parameter is the batch size m. When we set it to be smaller than 64, say 32, Recall@K=1 on CUB-200-2011 drops to 55.7% and worse with even smaller m. This is because the chosen hard quadruplet from a small batch makes little sense for learning. When we use large m=132, we have marginal gains but need many more epochs (than 400) to use enough training quadruplets. Transfer learning. Considering the good performance of our fully learned features, here we evaluate their generalization ability under the scenarios of transfer learning and zero-shot learning. Transfer learning aims to transfer knowledge from the source classes to new ones. Existing methods explored the knowledge of part detectors [6] or attribute classifiers [17] across classes. Zero-shot learning is an extreme case of transfer learning, but differs in that for a new class only a description rather than labeled training samples is provided. The description can be in terms of attributes [17], WordNet hierarchy [21, 25], semantic class label graph [10, 24], or text data [8, 22]. These learning scenarios are also related to the open set one [2] where new classes grow continuously. For transfer learning, we follow [21] to train our feature embeddings and a Nearest Class Mean (NCM) classifier [21] on the large-scale ImageNet 20101 dataset, which contains 1,000 classes and more than 1.2 million images. Then we apply the NCM classifier to the larger ImageNet-10K [5] dataset with 10,000 classes, thus do not use any auxiliary knowledge such as parts and attributes. We use the standard flat top-1 accuracy as the classification evaluation metric. Table 2 shows that our features outperform state-of-the-art methods by a large margin, including the deep feature-based ones [18, 21]. We attribute this advantage to our end-to-end feature embedding learning and its large margin nature, which directly translates to good generalization ability. For zero-shot learning, we follow the standard settings in [21, 25] on ImageNet 2010: we learn our feature embeddings on 800 classes, and test on the remaining 200 classes. For simplicity, we also use the ImageNet hierarchy to estimate the mean of new testing classes from the means of related training classes. The flat top-5 accuracy is used as the classification evaluation metric. As can be seen from Table 2, our features achieve top results again among many competing deep CNN-based methods. Considering our PDDM and local similarity-aware feature embedding are both well learned with safe margins between classes, in this zero-shot task, they would be naturally resistent to class boundary confusion between known and unseen classes. 5 Conclusion In this paper, we developed a method of learning local similarity-aware deep feature embeddings in an end-to-end manner. The PDDM is proposed to adaptively measure the local feature similarity in a heterogeneous space, thus it is valuable for high quality online hard sample mining that can better guide the embedding learning. The double-header hinge loss on both the similarity metric and feature embedding is optimized under the large margin criterion. Experiments show the efficacy of our learned feature embedding in challenging image retrieval tasks, and point to its potential of generalizing to new classes in the large and open set scenarios such as transfer learning and zero-shot learning. In the future, it is interesting to study the generalization performance when using the shared attributes or visual-semantic embedding instead of ImageNet hierarchy for zero-shot learning. Acknowledgments. This work is supported by SenseTime Group Limited and the Hong Kong Innovation and Technology Support Programme. 1See http://www.image-net.org/challenges/LSVRC/2010/index. 8 References [1] S. Bell and K. Bala. Learning visual similarity for product design with convolutional neural networks. TOG, 34(4):98:1–98:10, 2015. [2] A. Bendale and T. Boult. Towards open world recognition. In CVPR, 2015. [3] Y. Cui, F. Zhou, Y. Lin, and S. Belongie. Fine-grained categorization and dataset bootstrapping using deep metric learning with humans in the loop. In CVPR, 2016. [4] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. [5] J. Deng, A. C. Berg, K. Li, and L. Fei-Fei. What does classifying more than 10,000 image categories tell us? In ECCV, 2010. [6] L. Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. TPAMI, 28(4):594–611, 2006. [7] P. F. Felzenszwalb, R. B. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part-based models. TPAMI, 32(9):1627–1645, 2010. [8] A. Frome, G. S. Corrado, J. Shlens, S. Bengio, J. Dean, M. A. Ranzato, and T. Mikolov. DeViSE: A deep visual-semantic embedding model. In NIPS, 2013. [9] A. Frome, Y. Singer, F. Sha, and J. Malik. Learning globally-consistent local distance functions for shape-based image retrieval and classification. In ICCV, 2007. [10] Z. Fu, T. A. Xiang, E. Kodirov, and S. Gong. Zero-shot object recognition by semantic manifold distance. In CVPR, 2015. [11] J. Goldberger, G. E. Hinton, S. T. Roweis, and R. R. Salakhutdinov. Neighbourhood components analysis. In NIPS, 2005. [12] S. C. H. Hoi, W. Liu, M. R. Lyu, and W.-Y. Ma. Learning distance metrics with contextual constraints for image retrieval. In CVPR, 2006. [13] C. Huang, Y. Li, C. C. Loy, and X. Tang. Learning deep representation for imbalanced classification. In CVPR, 2016. [14] C. Huang, C. C. Loy, and X. Tang. Unsupervised learning of discriminative attributes and visual representations. In CVPR, 2016. [15] J. Krause, M. Stark, J. Deng, and L. Fei-Fei. 3D object representations for fine-grained categorization. In ICCVW, 2013. [16] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [17] C. H. Lampert, H. Nickisch, and S. Harmeling. Attribute-based classification for zero-shot visual object categorization. TPAMI, 36(3):453–465, 2014. [18] Q. Le, M. Ranzato, R. Monga, M. Devin, K. Chen, G. Corrado, J. Dean, and A. Ng. Building high-level features using large scale unsupervised learning. In ICML, 2012. [19] L. Maaten and G. E. Hinton. Visualizing high-dimensional data using t-SNE. JMLR, 9:2579–2605, 2008. [20] A. M. Martinez and A. C. Kak. PCA versus LDA. TPAMI, 23(2):228–233, 2001. [21] T. Mensink, J. Verbeek, F. Perronnin, and G. Csurka. Distance-based image classification: Generalizing to new classes at near-zero cost. TPAMI, 35(11):2624–2637, 2013. [22] M. Norouzi, T. Mikolov, S. Bengio, Y. Singer, J. Shlens, A. Frome, G. Corrado, and J. Dean. Zero-shot learning by convex combination of semantic embeddings. In ICLR, 2014. [23] F. Perronnin, Z. Akata, Z. Harchaoui, and C. Schmid. Towards good practice in large-scale learning for image classification. In CVPR, 2012. [24] M. Rohrbach, S. Ebert, and B. Schiele. Transfer learning in a transductive setting. In NIPS, 2013. [25] M. Rohrbach, M. Stark, and B. Schiele. Evaluating knowledge transfer and zero-shot learning in a large-scale setting. In CVPR, 2011. [26] J. Sanchez and F. Perronnin. High-dimensional signature compression for large-scale image classification. In CVPR, 2011. [27] F. Schroff, D. Kalenichenko, and J. Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. [28] E. Simo-Serra, E. Trulls, L. Ferraz, I. Kokkinos, and F. Moreno-Noguer. Fracking deep convolutional image descriptors. arXiv preprint, arXiv:1412.6537v2, 2015. [29] H. O. Song, Y. Xiang, S. Jegelka, and S. Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, 2016. [30] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15(1):1929–1958, 2014. [31] 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. [32] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. [33] J. Wang, Y. Song, T. Leung, C. Rosenberg, J. Wang, J. Philbin, B. Chen, and Y. Wu. Learning fine-grained image similarity with deep ranking. In CVPR, 2014. [34] X. Wang and A. Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. [35] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. JMLR, 10:207–244, 2009. [36] E. P. Xing, M. I. Jordan, S. J. Russell, and A. Y. Ng. Distance metric learning with application to clustering with side-information. In NIPS, 2003. [37] C. Xiong, D. Johnson, R. Xu, and J. J. Corso. Random forests for metric learning with implicit pairwise position dependence. In SIGKDD, 2012. 9 | 2016 | 201 |
6,108 | Following the Leader and Fast Rates in Linear Prediction: Curved Constraint Sets and Other Regularities Ruitong Huang Department of Computing Science University of Alberta, AB, Canada ruitong@ualberta.ca Tor Lattimore School of Informatics and Computing Indiana University, IN, USA tor.lattimore@gmail.com András György Dept. of Electrical & Electronic Engineering Imperial College London, UK a.gyorgy@imperial.ac.uk Csaba Szepesvári Department of Computing Science University of Alberta, AB, Canada szepesva@ualberta.ca Abstract The follow the leader (FTL) algorithm, perhaps the simplest of all online learning algorithms, is known to perform well when the loss functions it is used on are positively curved. In this paper we ask whether there are other “lucky” settings when FTL achieves sublinear, “small” regret. In particular, we study the fundamental problem of linear prediction over a non-empty convex, compact domain. Amongst other results, we prove that the curvature of the boundary of the domain can act as if the losses were curved: In this case, we prove that as long as the mean of the loss vectors have positive lengths bounded away from zero, FTL enjoys a logarithmic growth rate of regret, while, e.g., for polyhedral domains and stochastic data it enjoys finite expected regret. Building on a previously known meta-algorithm, we also get an algorithm that simultaneously enjoys the worst-case guarantees and the bound available for FTL. 1 Introduction Learning theory traditionally has been studied in a statistical framework, discussed at length, for example, by Shalev-Shwartz and Ben-David [2014]. The issue with this approach is that the analysis of the performance of learning methods seems to critically depend on whether the data generating mechanism satisfies some probabilistic assumptions. Realizing that these assumptions are not necessarily critical, much work has been devoted recently to studying learning algorithms in the socalled online learning framework [Cesa-Bianchi and Lugosi, 2006]. The online learning framework makes minimal assumptions about the data generating mechanism, while allowing one to replicate results of the statistical framework through online-to-batch conversions [Cesa-Bianchi et al., 2004]. By following a minimax approach, however, results proven in the online learning setting, at least initially, led to rather conservative results and algorithm designs, failing to capture how more regular, “easier” data, may give rise to faster learning speed. This is problematic as it may suggest overly conservative learning strategies, missing opportunities to extract more information when the data is nicer. Also, it is hard to argue that data resulting from passive data collection, such as weather data, would ever be adversarially generated (though it is equally hard to defend that such data satisfies precise stochastic assumptions). Realizing this issue, during recent years much work has been devoted to understanding what regularities and how can lead to faster learning speed. For example, much work has been devoted to showing that faster learning speed (smaller “regret”) can be achieved in 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the online convex optimization setting when the loss functions are “curved”, such as when the loss functions are strongly convex or exp-concave, or when the losses show small variations, or the best prediction in hindsight has a small total loss, and that these properties can be exploited in an adaptive manner (e.g., Merhav and Feder 1992, Freund and Schapire 1997, Gaivoronski and Stella 2000, Cesa-Bianchi and Lugosi 2006, Hazan et al. 2007, Bartlett et al. 2007, Kakade and Shalev-Shwartz 2009, Orabona et al. 2012, Rakhlin and Sridharan 2013, van Erven et al. 2015, Foster et al. 2015). In this paper we contribute to this growing literature by studying online linear prediction and the follow the leader (FTL) algorithm. Online linear prediction is arguably the simplest of all the learning settings, and lies at the heart of online convex optimization, while it also serves as an abstraction of core learning problems such as prediction with expert advice. FTL, the online analogue of empirical risk minimization of statistical learning, is the simplest learning strategy, one can think of. Although the linear setting of course removes the possibility of exploiting the curvature of losses, as we will see, there are multiple ways online learning problems can present data that allows for small regret, even for FTL. As is it well known, in the worst case, FTL suffers a linear regret (e.g., Example 2.2 of Shalev-Shwartz [2012]). However, for “curved” losses (e.g., exp-concave losses), FTL was shown to achieve small (logarithmic) regret (see, e.g., Merhav and Feder [1992], Cesa-Bianchi and Lugosi [2006], Gaivoronski and Stella [2000], Hazan et al. [2007]). In this paper we take a thorough look at FTL in the case when the losses are linear, but the problem perhaps exhibits other regularities. The motivation comes from the simple observation that, for prediction over the simplex, when the loss vectors are selected independently of each other from a distribution with a bounded support with a nonzero mean, FTL quickly locks onto selecting the loss-minimizing vertex of the simplex, achieving finite expected regret. In this case, FTL is arguably an excellent algorithm. In fact, FTL is shown to be the minimax optimizer for the binary losses in the stochastic expert setting in the paper of Kotłowski [2016]. Thus, we ask the question of whether there are other regularities that allow FTL to achieve nontrivial performance guarantees. Our main result shows that when the decision set (or constraint set) has a sufficiently “curved” boundary and the linear loss is bounded away from 0, FTL is able to achieve logarithmic regret even in the adversarial setting, thus opening up a new way to prove fast rates based on not on the curvature of losses, but on that of the boundary of the constraint set and non-singularity of the linear loss. In a matching lower bound we show that this regret bound is essentially unimprovable. We also show an alternate bound for polyhedral constraint sets, which allows us to prove that (under certain technical conditions) for stochastic problems the expected regret of FTL will be finite. To finish, we use (A, B)-prod of Sani et al. [2014] to design an algorithm that adaptively interpolates between the worst case O(√n) regret and the smaller regret bounds, which we prove here for “easy data.” Simulation results on artificial data to illustrate the theory complement the theoretical findings, though due to lack of space these are presented only in the long version of the paper [Huang et al., 2016]. While we believe that we are the first to point out that the curvature of the constraint set W can help in speeding up learning, this effect is known in convex optimization since at least the work of Levitin and Polyak [1966], who showed that exponential rates are attainable for strongly convex constraint sets if the norm of the gradients of the objective function admit a uniform lower bound. More recently, Garber and Hazan [2015] proved an O(1/n2) optimization error bound (with problem-dependent constants) for the Frank-Wolfe algorithm for strongly convex and smooth objectives and strongly convex constraint sets. The effect of the shape of the constraint set was also discussed by AbbasiYadkori [2010] who demonstrated O(√n) regret in the linear bandit setting. While these results at a high level are similar to ours, our proof technique is rather different than that used there. 2 Preliminaries, online learning and the follow the leader algorithm We consider the standard framework of online convex optimization, where a learner and an environment interact in a sequential manner in n rounds: In round every round t = 1, . . . , n, first the learner predicts wt ∈W. Then the environment picks a loss function ℓt ∈L, and the learner suffers loss ℓt(wt) and observes ℓt. Here, W is a non-empty, compact convex subset of Rd and L is a set of convex functions, mapping W to the reals. The elements of L are called loss functions. The performance of the learner is measured in terms of its regret, Rn = n X t=1 ℓt(wt) −min w∈W n X t=1 ℓt(w) . 2 The simplest possible case, which will be the focus of this paper, is when the losses are linear, i.e., when ℓt(w) = ⟨ft, w⟩for some ft ∈F ⊂Rd. In fact, the linear case is not only simple, but is also fundamental since the case of nonlinear loss functions can be reduced to it: Indeed, even if the losses are nonlinear, defining ft ∈∂ℓt(wt) to be a subgradient1 of ℓt at wt and letting ˜ℓt(u) = ⟨ft, u⟩, by the definition of subgradients, ℓt(wt) −ℓt(u) ≤ℓt(wt) −(ℓt(wt) + ⟨ft, u −wt⟩) = ˜ℓt(wt) −˜ℓt(u), hence for any u ∈W, X t ℓt(wt) − X t ℓt(u) ≤ X t ˜ℓt(wt) − X t ˜ℓt(u) . In particular, if an algorithm keeps the regret small no matter how the linear losses are selected (even when allowing the environment to pick losses based on the choices of the learner), the algorithm can also be used to keep the regret small in the nonlinear case. Hence, in what follows we will study the linear case ℓt(w) = ⟨ft, w⟩and, in particular, we will study the regret of the so-called “Follow The Leader” (FTL) learner, which, in round t ≥2 picks wt = argmin w∈W t−1 X i=1 ℓi(w) . For the first round, w1 ∈W is picked in an arbitrary manner. When W is compact, the optimal w of minw∈W Pt−1 i=1⟨w, ft⟩is attainable, which we will assume henceforth. If multiple minimizers exist, we simply fix one of them as wt. We will also assume that F is non-empty, compact and convex. 2.1 Support functions Let Θt = −1 t Pt i=1 fi be the negative average of the first t vectors in (ft)n t=1, ft ∈F. For convenience, we define Θ0 := 0. Thus, for t ≥2, wt = argmin w∈W t−1 X i=1 ⟨w, fi⟩= argmin w∈W ⟨w, −Θt−1⟩= argmax w∈W ⟨w, Θt−1⟩. Denote by Φ(Θ) = maxw∈W⟨w, Θ⟩the so-called support function of W. The support function, being the maximum of linear and hence convex functions, is itself convex. Further Φ is positive homogenous: for a ≥0 and θ ∈Rd, Φ(aθ) = aΦ(θ). It follows then that the epigraph epi(Φ) = (θ, z) | z ≥Φ(θ), z ∈R, θ ∈Rd of Φ is a cone, since for any (θ, z) ∈epi(Φ) and a ≥0, az ≥ aΦ(θ) = Φ(aθ), (aθ, az) ∈epi(Φ) also holds. The differentiability of the support function is closely tied to whether in the FTL algorithm the choice of wt is uniquely determined: Proposition 2.1. Let W ̸= ∅be convex and closed. Fix Θ and let Z := {w ∈W | ⟨w, Θ⟩= Φ(Θ)}. Then, ∂Φ(Θ) = Z and, in particular, Φ(Θ) is differentiable at Θ if and only if maxw∈W⟨w, Θ⟩has a unique optimizer. In this case, ∇Φ(Θ) = argmaxw∈W⟨w, Θ⟩. The proposition follows from Danskin’s theorem when W is compact (e.g., Proposition B.25 of Bertsekas 1999), but a simple direct argument can also be used to show that it also remains true even when W is unbounded.2 By Proposition 2.1, when Φ is differentiable at Θt−1, wt = ∇Φ(Θt−1). 3 Non-stochastic analysis of FTL We start by rewriting the regret of FTL in an equivalent form, which shows that we can expect FTL to enjoy a small regret when successive weight vectors move little. A noteworthy feature of the next proposition is that rather than bounding the regret from above, it gives an equivalent expression for it. Proposition 3.1. The regret Rn of FTL satisfies Rn = n X t=1 t ⟨wt+1 −wt, Θt⟩. 1 We let ∂g(x) denote the subdifferential of a convex function g : dom(g) →R at x, i.e., ∂g(x) = θ ∈Rd | g(x′) ≥g(x) + ⟨θ, x′ −x⟩∀x′ ∈dom(g) , where dom(g) ⊂Rd is the domain of g. 2 The proofs not given in the main text can be found in the long version of the paper [Huang et al., 2016]. 3 The result is a direct corollary of Lemma 9 of McMahan [2010], which holds for any sequence of losses, even in the lack of convexity. It is also a tightening of the well-known inequality Rn ≤ Pn t=1 ℓt(wt) −ℓt(wt+1), which again holds for arbitrary loss sequences (e.g., Lemma 2.1 of ShalevShwartz [2012]). To keep the paper self-contained, we give an elegant, short direct proof, based on the summation by parts formula: Proof. The summation by parts formula states that for any u1, v1, . . . , un+1, vn+1 reals, Pn t=1 ut (vt+1 −vt) = (ut+1vt+1 −u1v1) −Pn t=1(ut+1 −ut) vt+1. Applying this to the definition of regret with ut := wt,· and vt+1 := tΘt, we get Rn = −Pn t=1⟨wt, tΘt −(t −1)Θt−1⟩+ ⟨wn+1, nΘn⟩= −{hhhhhh ⟨wn+1, nΘn⟩−0 −Pn t=1⟨wt+1 −wt, tΘt⟩} +hhhhhh ⟨wn+1, nΘn⟩. Our next proposition gives another formula that is equal to the regret. As opposed to the previous result, this formula is appealing as it is independent of wt; but it directly connects the sequence (Θt)t to the geometric properties of W through the support function Φ. For this proposition we will momentarily assume that Φ is differentiable at (Θt)t≥1; a more general statement will follow later. Proposition 3.2. If Φ is differentiable at Θ1, . . . , Θn, Rn = n X t=1 t DΦ(Θt, Θt−1) , (1) where DΦ(θ′, θ) = Φ(θ′) −Φ(θ) −⟨∇Φ(θ), θ′ −θ⟩is the Bregman divergence of Φ and we use the convention that ∇Φ(0) = w1. Proof. Let v = argmaxw∈W⟨w, θ⟩, v′ = argmaxw∈W⟨w, θ′⟩. When Φ is differentiable at θ, DΦ(θ′, θ) = Φ(θ′) −Φ(θ) −⟨∇Φ(θ), θ′−θ⟩= ⟨v′, θ′⟩−⟨v, θ⟩−⟨v, θ′−θ⟩= ⟨v′−v, θ′⟩. (2) Therefore, by Proposition 3.1, Rn = Pn t=1 t⟨wt+1 −wt, Θt⟩= Pn t=1 t DΦ(Θt, Θt−1). When Φ is non-differentiable at some of the points Θ1, . . . , Θn, the equality in the above proposition can be replaced with inequalities. Defining the upper Bregman divergence DΦ(θ′, θ) = supw∈∂Φ(θ) Φ(θ′) −Φ(θ) −⟨w, θ′ −θ⟩and the lower Bregman divergence DΦ(θ′, θ) similarly with inf instead of sup, similarly to Proposition 3.2, we obtain n X t=1 t DΦ(Θt, Θt−1) ≤Rn ≤ n X t=1 t DΦ(Θt, Θt−1) . (3) 3.1 Constraint sets with positive curvature The previous results shows in an implicit fashion that the curvature of W controls the regret. We now present our first main result that makes this connection explicit. Denote the boundary of W by bd(W). For this result, we shall assume that W is C2, that is, bd(W) is a twice continuously differentiable submanifold of Rd. Recall that in this case the principal curvatures of W at w ∈bd(W) are the eigenvalues of ∇uW(w), where uW : bd(W) →Sd−1, the so-called Gauss map, maps a boundary point w ∈bd(W) to the unique outer normal vector to W at w.3 As it is well known, ∇uW(w) is a self-adjoint operator, with nonnegative eigenvalues, thus the principal curvatures are nonnegative. Perhaps a more intuitive, yet equivalent definition, is that the principal eigenvalues are the eigenvalues of the Hessian of f = fw in the parameterization t 7→w +t−fw(t)uW(w) of bd(W) which is valid in a small open neighborhood of w, where fw : TwW →[0, ∞) is a suitable convex, nonnegative valued function that also satisfies fw(0) = 0 and where TwW, a hyperplane of Rd, denotes the tangent space of W at w, obtained by taking the support plane H of W at w and shifting it by −w. Thus, the principal curvatures at some point w ∈bd(W) describe the local shape of bd(W) up to the second order. A related concept that has been used in convex optimization to show fast rates is that of a strongly convex constraint set [Levitin and Polyak, 1966, Garber and Hazan, 2015]: W is λ-strongly convex 3Sd−1 = x ∈Rd | ∥x∥2 = 1 denotes the unit sphere in d-dimensions. All differential geometry concept and results that we need can be found in Section 2.5 of [Schneider, 2014]. 4 with respect to the norm ∥·∥if, for any x, y ∈W and γ ∈[0, 1], the ∥·∥-ball with origin γx+(1−γ)y and radius γ(1 −γ)λ ∥x −y∥2 /2 is included in W. One can show that a closed convex set W is λ-strongly convex with respect to ∥·∥2 if and only if the principal curvatures of the surface bdW are all at least λ. Our next result connects the principal curvatures of bd(W) to the regret of FTL and shows that FTL enjoys logarithmic regret for highly curved surfaces, as long as ∥Θt∥2 is bounded away from zero. Theorem 3.3. Let W ⊂Rd be a C2 convex body with d ≥2.4 Let M = maxf∈F ∥f∥2 and assume that Φ is differentiable at (Θt)t. Assume that the principal curvatures of the surface bd(W) are all at least λ0 for some constant λ0 > 0 and Ln := min1≤t≤n ∥Θt∥2 > 0. Choose w1 ∈bd(W). Then Rn ≤2M 2 λ0Ln (1 + log(n)) . w(1) fθ1 w(2) fθ2 cθ2 P γ(s) Figure 1: Illustration of the construction used in the proof of (4). As we will show later in an essentially matching lower bound, this bound is tight, showing that the forte of FTL is when Ln is bounded away from zero and λ0 is large. Note that the bound is vacuous as soon as Ln = O(log(n)/n) and is worse than the minimax bound of O(√n) when Ln = o(log(n)/√n). One possibility to reduce the bound’s sensitivity to Ln is to use the trivial bound ⟨wt+1 −wt, Θt⟩≤LW = L supw,w′∈W ∥w −w′∥2 for indices t when ∥Θt∥≤L. Then, by optimizing the bound over L, one gets a data-dependent bound of the form infL>0 2M 2 λ0L (1 + log(n)) + LW Pn t=1 t I (∥Θt∥≤L) , which is more complex, but is free of Ln and thus reflects the nature of FTL better. Note that in the case of stochastic problems, where f1, . . . , fn are independent and identically distributed (i.i.d.) with µ := −E [Θt] ̸= 0, the probability that ∥Θt∥2 < ∥µ∥2 /2 is exponentially small in t. Thus, selecting L = ∥µ∥2 /2 in the previous bound, the contribution of the expectation of the second term is O(∥µ∥2 W), giving an overall bound of the form O( M 2 λ0∥µ∥2 log(n) + ∥µ∥2 W). After the proof we will provide some simple examples that should make it more intuitive how the curvature of W helps keeping the regret of FTL small. Proof. Fix θ1, θ2 ∈Rd and let w(1) = argmaxw∈W⟨w, θ1⟩, w(2) = argmaxw∈W⟨w, θ2⟩. Note that if θ1, θ2 ̸= 0 then w(1), w(2) ∈bd(W). Below we will show that ⟨w(1) −w(2), θ1⟩≤ 1 2λ0 ∥θ2 −θ1∥2 2 ∥θ2∥2 . (4) Proposition 3.1 suggests that it suffices to bound ⟨wt+1 −wt, Θt⟩. By (4), we see that it suffices to bound how much Θt moves. A straightforward calculation shows that Θt cannot move much: Lemma 3.4. For any norm ∥·∥on F, we have ∥Θt −Θt−1∥≤2 t M , where M = maxf∈F ∥f∥is a constant that depends on F and the norm ∥·∥. Combining inequality (4) with Proposition 3.1 and Lemma 3.4, we get Rn = n X t=1 t⟨wt+1 −wt, Θt⟩≤ n X t=1 t 2λ0 ∥Θt −Θt−1∥2 2 ∥Θt−1∥2 ≤2M 2 λ0 n X t=1 1 t∥Θt−1∥2 ≤2M 2 λ0Ln n X t=1 1 t ≤2M 2 λ0Ln (1 + log(n)) . To finish the proof, it thus remains to show (4). The following elementary lemma relates the cosine of the angle between two vectors θ1 and θ2 to the squared normalized distance between the two vectors, thereby reducing our problem to bounding the cosine of this angle. For brevity, we denote by cos(θ1, θ2) the cosine of the angle between θ1 and θ2. 4Following Schneider [2014], a convex body of Rd is any non-empty, compact, convex subset of Rd. 5 Lemma 3.5. For any non-zero vectors θ1, θ2 ∈Rd, 1 −cos(θ1, θ2) ≤1 2 ∥θ1 −θ2∥2 2 ∥θ1∥2∥θ2∥2 . (5) With this result, we see that it suffices to upper bound cos(θ1, θ2) by 1 −λ0⟨w(1) −w(2), θ1 ∥θ1∥2 ⟩. To develop this bound, let ˜θi = θi ∥θi∥2 for i = 1, 2. The angle between θ1 and θ2 is the same as the angle between the normalized vectors ˜θ1 and ˜θ2. To calculate the cosine of the angle between ˜θ1 and ˜θ2, let P be a plane spanned by ˜θ1 and w(1) −w(2) and passing through w(1) (P is uniquely determined if ˜θ1 is not parallel to w(1) −w(2); if there are multiple planes, just pick any of them). Further, let ˆθ2 ∈Sd−1 be the unit vector along the projection of ˜θ2 onto the plane P, as indicated in Fig. 1. Clearly, cos(˜θ1, ˜θ2) ≤cos(˜θ1, ˆθ2). Consider a curve γ(s) on bd(W) connecting w(1) and w(2) that is defined by the intersection of bd(W) and P and is parametrized by its curve length s so that γ(0) = w(1) and γ(l) = w(2), where l is the length of the curve γ between w(1) and w(2). Let uW(w) denote the outer normal vector to W at w as before, and let uγ : [0, l] →Sd−1 be such that uγ(s) = ˆθ where ˆθ is the unit vector parallel to the projection of uW(γ(s)) on the plane P. By definition, uγ(0) = ˜θ1 and uγ(l) = ˆθ2. Note that in fact γ exists in two versions since W is a compact convex body, hence the intersection of P and bd(W) is a closed curve. Of these two versions we choose the one that satisfies that ⟨γ′(s), ˜θ1⟩≤0 for s ∈[0, l].5 Given the above, we have cos(˜θ1, ˆθ2) = ⟨ˆθ2, ˜θ1⟩= 1+ ⟨ˆθ2 −˜θ1, ˜θ1⟩= 1+ D Z l 0 u′ γ(s) ds, ˜θ1 E = 1+ Z l 0 ⟨u′ γ(s), ˜θ1⟩ds. (6) Note that γ is a planar curve on bd(W), thus its curvature λ(s) satisfies λ(s) ≥λ0 for s ∈[0, l]. Also, for any w on the curve γ, γ′(s) is a unit vector parallel to P. Moreover, u′ γ(s) is parallel to γ′(s) and λ(s) = ∥u′ γ(s)∥2. Therefore, ⟨u′ γ(s), ˜θ1⟩= ∥u′ γ(s)∥2⟨γ′(s), ˜θ1⟩≤λ0⟨γ′(s), ˜θ1⟩, where the last inequality holds because ⟨γ′(s), ˜θ1⟩≤0. Plugging this into (6), we get the desired cos(˜θ1, ˆθ2) ≤1 + λ0 Z l 0 ⟨γ′(s), ˜θ1⟩ds = 1 + λ0 D Z l 0 γ′(s) ds, ˜θ1 E = 1 −λ0⟨w(1) −w(2), ˜θ1⟩. Reordering and combining with (5) we obtain ⟨w(1) −w(2), ˜θ1⟩≤1 λ0 1 −cos(˜θ1, ˆθ2) ≤1 λ0 (1 −cos(θ1, θ2)) ≤ 1 2λ0 ∥θ1 −θ2∥2 2 ∥θ1∥2∥θ2∥2 . Multiplying both sides by ∥θ1∥2 gives (4), thus, finishing the proof. Example 3.6. The smallest principal curvature of some common convex bodies are as follows: • The smallest principal curvature λ0 of the Euclidean ball W = {w | ∥w∥2 ≤r} of radius r satisfies λ0 = 1 r. • Let Q be a positive definite matrix. If W = w | w⊤Qw ≤1 then λ0 = λmin/√λmax, where λmin and λmax are the minimal, respectively, maximal eigenvalues of Q. • In general, let φ : Rd →R be a C2 convex function. Then, for W = {w | φ(w) ≤1}, λ0 = minw∈bd(W) minv : ∥v∥2=1,v⊥φ′(w) v⊤∇2φ(w)v ∥φ′(w)∥2 . In the stochastic i.i.d. case, when E [Θt] = −µ, we have ∥Θt + µ∥2 = O(1/ √ t) with high probability. Thus say, for W being the unit ball of Rd, one has wt = Θt/ ∥Θt∥2; therefore, a crude bound suggests that ∥wt −w∗∥2 = O(1/ √ t), overall predicting that E [Rn] = O(√n), while the previous result predicts that Rn is much smaller. In the next example we look at the unit ball, to explain geometrically, what “causes” the smaller regret. 5γ′ and u′ γ denote the derivatives of γ and u, respectively, which exist since W is C2. 6 Example 3.7. Let W = {w | ∥w∥2 ≤1} and consider a stochastic setting where the fi are i.i.d. samples from some underlying distribution with expectation E [fi] = µ = (−1, 0, . . . , 0) and ∥fi∥∞≤M. It is straightforward to see that w∗= (1, 0, . . . , 0), and thus ⟨w∗, µ⟩= −1. Let E = {−θ | ∥θ −µ∥2 ≤ϵ}. As suggested beforehand, we expect −µt ∈E with high probability. As shown in Fig. 2, the excess loss of an estimate # » OA is ⟨ # » O ˜A, # » OD⟩−1 = | ˜BD|. Similarly, the excess loss of an estimate # » OA′ in the figure is |CD|. Therefore, for an estimate −µt ∈E, the point A is where the largest excess loss is incurred. The triangle OAD is similar to the triangle ADB. Thus |BD| |AD| = |AD| |OD|. Therefore, |BD| = ϵ2 and since | ˜BD| ≤|BD|, if ∥µt −µ∥2 ≤ϵ, the excess error is at most ϵ2 = O(1/t), making the regret Rn = O(log n). O D = w∗ A = −µt B ˜B ˜A = dwt C A′ ˜A′ = −µ Figure 2: Illustration of how curvature helps to keep the regret small. Our last result in this section is an asymptotic lower bound for the linear game, showing that FTL achieves the optimal rate under the condition that mint ∥Θt∥2 ≥L > 0. Theorem 3.8. Let h, L ∈ (0, 1). Assume that {(1, −L), (−1, −L)} ⊂ F and let W = (x, y) : x2 + y2/h2 ≤1 be an ellipsoid with principal curvature h. Then, for any learning strategy, there exists a sequence of losses in F such that Rn = Ω(log(n)/(Lh)) and ∥Θt∥2 ≥L for all t. 3.2 Other regularities So far we have looked at the case when FTL achieves a low regret due to the curvature of bd(W). The next result characterizes the regret of FTL when W is a polyhedron, which has a flat, non-smooth boundary and thus Theorem 3.3 is not applicable. For this statement recall that given some norm ∥· ∥, its dual norm is defined by ∥w∥∗= sup∥v∥≤1⟨v, w⟩. Theorem 3.9. Assume that W is a polyhedron and that Φ is differentiable at Θi, i = 1, . . . , n. Let wt = argmaxw∈W⟨w, Θt−1⟩, W = supw1,w2∈W ∥w1 −w2∥∗and F = supf1,f2∈F ∥f1 −f2∥. Then the regret of FTL is Rn ≤W n X t=1 t I(wt+1 ̸= wt)∥Θt −Θt−1∥≤FW n X t=1 I(wt+1 ̸= wt) . Note that when W is a polyhedron, wt is expected to “snap” to some vertex of W. Hence, we expect the regret bound to be non-vacuous, if, e.g., Θt “stabilizes” around some value. Some examples after the proof will illustrate this. Proof. Let v=argmaxw∈W⟨w, θ⟩, v′ =argmaxw∈W⟨w, θ′⟩. Similarly to the proof of Theorem 3.3, ⟨v′ −v, θ′⟩= ⟨v′, θ′⟩−⟨v′, θ⟩+ ⟨v′, θ⟩−⟨v, θ⟩+ ⟨v, θ⟩−⟨v, θ′⟩ ≤⟨v′, θ′⟩−⟨v′, θ⟩+ ⟨v, θ⟩−⟨v, θ′⟩= ⟨v′ −v, θ′ −θ⟩≤W I(v′ ̸= v)∥θ′ −θ∥, where the first inequality holds because ⟨v′, θ⟩≤⟨v, θ⟩. Therefore, by Lemma 3.4, Rn = n X t=1 t ⟨wt+1 −wt, Θt⟩≤W n X t=1 t I(wt+1 ̸=wt)∥Θt −Θt−1∥≤FW n X t=1 I(wt+1 ̸=wt) . As noted before, since W is a polyhedron, wt is (generally) attained at the vertices. In this case, the epigraph of Φ is a polyhedral cone. Then, the event when wt+1 ̸= wt, i.e., when the “leader” switches corresponds to when Θt and Θt−1 belong to different linear regions corresponding to different linear pieces of the graph of Φ. We now spell out a corollary for the stochastic setting. In particular, in this case FTL will often enjoy a constant regret: 7 Corollary 3.10 (Stochastic setting). Assume that (ft)1≤t≤n is an i.i.d. sequence of random variables such that E [fi] = µ and ∥fi∥∞≤M. Let W = supw1,w2∈W ∥w1 −w2∥1. Further assume that there exists a constant r > 0 such that Φ is differentiable for any ν such that ∥ν −µ∥∞≤r. Then, E [Rn] ≤2MW (1 + 4dM 2/r2) . Proof. Let V = {ν | ∥ν −µ∥∞≤r}. Note that the epigraph of the function Φ is a polyhedral cone. Since Φ is differentiable in V , {(θ, Φ(θ)) | θ ∈V } is a subset of a linear subspace. Therefore, for −Θt, −Θt−1 ∈V , wt+1 = wt. Hence, by Theorem 3.9, E [Rn] ≤2MW n X t=1 Pr(−Θt, −Θt−1 /∈V ) ≤4MW 1 + n X t=1 Pr(−Θt /∈V ) ! . On the other hand, note that ∥fi∥∞≤M. Then Pr(−Θt /∈V ) = Pr
1 t t X i=1 fi −µ
∞ ≥r ! ≤ d X j=1 Pr 1 t t X i=1 fi,j −µj ≥r ! ≤2de−tr2 2M2 , where the last inequality is due to Hoeffding’s inequality. Now, using that for α > 0, Pn t=1 exp(−αt) ≤ R n 0 exp(−αt)dt ≤1 α, we get E [Rn] ≤2MW (1 + 4dM 2/r2). The condition that Φ is differentiable for any ν such that ∥ν −µ∥∞≤r is equivalent to that Φ is differentiable at µ. By Proposition 2.1, this condition requires that at µ, maxw∈W⟨w, θ⟩has a unique optimizer. Note that the volume of the set of vectors θ with multiple optimizers is zero. 4 An adaptive algorithm for the linear game While as shown in Theorem 3.3, FTL can exploit the curvature of the surface of the constraint set to achieve O(log n) regret, it requires the curvature condition and mint ∥Θt∥2 ≥L being bounded away from zero, or it may suffer even linear regret. On the other hand, many algorithms, such as the "Follow the regularized leader" (FTRL) algorithm, are known to achieve a regret guarantee of O(√n) even for the worst-case data in the linear setting. This raises the question whether one can have an algorithm that can achieve constant or O(log n) regret in the respective settings of Corollary 3.10 or Theorem 3.3, while it still maintains O(√n) regret for worst-case data. One way to design an adaptive algorithm is to use the (A, B)-prod algorithm of Sani et al. [2014], leading to the following result: Proposition 4.1. Consider (A, B)-prod of Sani et al. [2014], where algorithm A is chosen to be FTRL with an appropriate regularization term, while B is chosen to be FTL. Then the regret of the resulting hybrid algorithm H enjoys the following guarantees: • If FTL achieves constant regret as in the setting of Corollary 3.10, then the regret of H is also constant. • If FTL achieves a regret of O(log n) as in the setting of Theorem 3.3, then the regret of H is also O(log n). • Otherwise, the regret of H is at most O(√n log n). 5 Conclusion FTL is a simple method that is known to perform well in many settings, while existing worst-case results fail to explain its good performance. While taking a thorough look at why and when FTL can be expected to achieve small regret, we discovered that the curvature of the boundary of the constraint and having average loss vectors bounded away from zero help keep the regret of FTL small. These conditions are significantly different from previous conditions on the curvature of the loss functions which have been considered extensively in the literature. It would be interesting to further investigate this phenomenon for other algorithms or in other learning settings. 8 Acknowledgements This work was supported in part by the Alberta Innovates Technology Futures through the Alberta Ingenuity Centre for Machine Learning and by NSERC. During part of this work, T. Lattimore was with the Department of Computing Science, University of Alberta. References Y. Abbasi-Yadkori. Forced-exploration based algorithms for playing in bandits with large action sets. Library and Archives Canada, 2010. J. Abernethy, P.L. Bartlett, A. Rakhlin, and A. Tewari. Optimal strategies and minimax lower bounds for online convex games. In 21st Annual Conference on Learning Theory (COLT), 2008. P.L. Bartlett, E. Hazan, and A. Rakhlin. Adaptive online gradient descent. In Advances in Neural Information Processing Systems (NIPS), pages 65–72, 2007. D. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont, MA, 1999. N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Trans. Information Theory, 50(9):2050–2057, 2004. D.J. Foster, A. Rakhlin, and K. Sridharan. Adaptive online learning. In Advances in Neural Information Processing Systems (NIPS), pages 3357–3365, 2015. Y. Freund and R. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55:119–139, 1997. A.A. Gaivoronski and F. Stella. Stochastic nonstationary optimization for finding universal portfolios. Annals of Operations Research, 100(1–4):165–188, 2000. D. Garber and E. Hazan. Faster rates for the frank-wolfe method over strongly-convex sets. In Proceedings of the 32nd International Conference on Machine Learning (ICML), volume 951, pages 541–549, 2015. E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. R. Huang, T. Lattimore, A. György, and Cs. Szepesvári. Following the leader and fast rates in linear prediction: Curved constraint sets and other regularities. arXiv, 2016. S. M. Kakade and S. Shalev-Shwartz. Mind the duality gap: Logarithmic regret algorithms for online optimization. In Advances in Neural Information Processing Systems (NIPS), pages 1457–1464, 2009. W. Kotłowski. Minimax strategy for prediction with expert advice under stochastic assumptions. Algorithmic Learning Theory (ALT), 2016. E.S. Levitin and B.T. Polyak. Constrained minimization methods. USSR Computational Mathematics and Mathematical Physics, 6(5):1–50, 1966. H.B. McMahan. Follow-the-regularized-leader and mirror descent: Equivalence theorems and implicit updates. arXiv, 2010. URL http://arxiv.org/abs/1009.3240. N. Merhav and M. Feder. Universal sequential learning and decision from individual data sequences. In 5th Annual ACM Workshop on Computational Learning Theory (COLT), pages 413—427. ACM Press, 1992. F. Orabona, N. Cesa-Bianchi, and C. Gentile. Beyond logarithmic bounds in online learning. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics (AISTATS), pages 823–831, 2012. A. Rakhlin and K. Sridharan. Online learning with predictable sequences. In 26th Annual Conference on Learning Theory (COLT), pages 993–1019, 2013. A. Sani, G. Neu, and A. Lazaric. Exploiting easy data in online optimization. In Advances in Neural Information Processing Systems (NIPS), pages 810–818, 2014. R. Schneider. Convex Bodies: The Brunn–Minkowski Theory. Encyclopedia of Mathematics and its Applications. Cambridge Univ. Press, 2nd edition, 2014. S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and trends in Machine Learning, 4(2):107–194, 2012. S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, New York, NY, USA, 2014. T. van Erven, P. Grünwald, N. Mehta, M. Reid, and R. Williamson. Fast rates in statistical and online learning. Journal of Machine Learning Research (JMLR), 16:1793–1861, 2015. Special issue in Memory of Alexey Chervonenkis. 9 | 2016 | 202 |
6,109 | Learning Multiagent Communication with Backpropagation Sainbayar Sukhbaatar Dept. of Computer Science Courant Institute, New York University sainbar@cs.nyu.edu Arthur Szlam Facebook AI Research New York aszlam@fb.com Rob Fergus Facebook AI Research New York robfergus@fb.com Abstract Many tasks in AI require the collaboration of multiple agents. Typically, the communication protocol between agents is manually specified and not altered during training. In this paper we explore a simple neural model, called CommNet, that uses continuous communication for fully cooperative tasks. The model consists of multiple agents and the communication between them is learned alongside their policy. We apply this model to a diverse set of tasks, demonstrating the ability of the agents to learn to communicate amongst themselves, yielding improved performance over non-communicative agents and baselines. In some cases, it is possible to interpret the language devised by the agents, revealing simple but effective strategies for solving the task at hand. 1 Introduction Communication is a fundamental aspect of intelligence, enabling agents to behave as a group, rather than a collection of individuals. It is vital for performing complex tasks in real-world environments where each actor has limited capabilities and/or visibility of the world. Practical examples include elevator control [3] and sensor networks [5]; communication is also important for success in robot soccer [25]. In any partially observed environment, the communication between agents is vital to coordinate the behavior of each individual. While the model controlling each agent is typically learned via reinforcement learning [1, 28], the specification and format of the communication is usually pre-determined. For example, in robot soccer, the bots are designed to communicate at each time step their position and proximity to the ball. In this work, we propose a model where cooperating agents learn to communicate amongst themselves before taking actions. Each agent is controlled by a deep feed-forward network, which additionally has access to a communication channel carrying a continuous vector. Through this channel, they receive the summed transmissions of other agents. However, what each agent transmits on the channel is not specified a-priori, being learned instead. Because the communication is continuous, the model can be trained via back-propagation, and thus can be combined with standard single agent RL algorithms or supervised learning. The model is simple and versatile. This allows it to be applied to a wide range of problems involving partial visibility of the environment, where the agents learn a task-specific communication that aids performance. In addition, the model allows dynamic variation at run time in both the number and type of agents, which is important in applications such as communication between moving cars. We consider the setting where we have J agents, all cooperating to maximize reward R in some environment. We make the simplifying assumption of full cooperation between agents, thus each agent receives R independent of their contribution. In this setting, there is no difference between each agent having its own controller, or viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our controller is a large feed-forward neural network that maps inputs for all agents to their actions, each agent occupying a subset of units. A specific connectivity 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. structure between layers (a) instantiates the broadcast communication channel between agents and (b) propagates the agent state. We explore this model on a range of tasks. In some, supervision is provided for each action while for others it is given sporadically. In the former case, the controller for each agent is trained by backpropagating the error signal through the connectivity structure of the model, enabling the agents to learn how to communicate amongst themselves to maximize the objective. In the latter case, reinforcement learning must be used as an additional outer loop to provide a training signal at each time step (see the supplementary material for details). 2 Communication Model We now describe the model used to compute the distribution over actions p(a(t)|s(t), θ) at a given time t (omitting the time index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. Note that this single controller Φ encompasses the individual controllers for each agents, as well as the communication between agents. 2.1 Controller Structure We now detail our architecture for Φ that is built from modules f i, which take the form of multilayer neural networks. Here i ∈{0, .., K}, where K is the number of communication steps in the network. Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors h0 = [h0 1, h0 2, ..., h0 J], and computes: hi+1 j = f i(hi j, ci j) (1) ci+1 j = 1 J −1 X j′̸=j hi+1 j′ . (2) In the case that f i is a single linear layer followed by a non-linearity σ, we have: hi+1 j = σ(Hihi j + Cici j) and the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi is the concatenation of all hi j and T i takes the block form (where ¯Ci = Ci/(J −1)): T i = Hi ¯Ci ¯Ci ... ¯Ci ¯Ci Hi ¯Ci ... ¯Ci ¯Ci ¯Ci Hi ... ¯Ci ... ... ... ... ... ¯Ci ¯Ci ¯Ci ... Hi , A key point is that T is dynamically sized since the number of agents may vary. This motivates the the normalizing factor J −1 in equation (2), which rescales the communication vector by the number of communicating agents. Note also that T i is permutation invariant, thus the order of the agents does not matter. At the first layer of the model an encoder function h0 j = r(sj) is used. This takes as input state-view sj and outputs feature vector h0 j (in Rd0 for some d0). The form of the encoder is problem dependent, but for most of our tasks it is a single layer neural network. Unless otherwise noted, c0 j = 0 for all j. At the output of the model, a decoder function q(hK j ) is used to output a distribution over the space of actions. q(.) takes the form of a single layer network, followed by a softmax. To produce a discrete action, we sample from this distribution: aj ∼q(hK j ). Thus the entire model (shown in Fig. 1), which we call a Communication Neural Net (CommNet), (i) takes the state-view of all agents s, passes it through the encoder h0 = r(s), (ii) iterates h and c in equations (1) and (2) to obtain hK, (iii) samples actions a for all agents, according to q(hK). 2.2 Model Extensions Local Connectivity: An alternative to the broadcast framework described above is to allow agents to communicate to others within a certain range. Let N(j) be the set of agents present within 2 abstract roduction work we make two contributions. First, we simplify and extend the graph neural network ure of ??. Second, we show how this architecture can be used to control groups of cooperating del plest form of the model consists of multilayer neural networks f i that take as input vectors i and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and s hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; 0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). d, we can take the final hK j and output them directly, so that the model outputs a vector nding to each input vector, or we can feed them into another network to get a single vector or utput. i is a simple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), model can be viewed as a feedforward network with layers Hi+1 = σ(T iHi), is written in block form T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . idea is that T is dynamically sized, and the matrix can be dynamically sized because the re applied by type, rather than by coordinate. d to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. ion make two contributions. First, we simplify and extend the graph neural network . Second, we show how this architecture can be used to control groups of cooperating m of the model consists of multilayer neural networks f i that take as input vectors tput a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; or all j, and i 2 {0, .., K} (we will call K the number of hops in the network). an take the final hK j and output them directly, so that the model outputs a vector each input vector, or we can feed them into another network to get a single vector or mple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), an be viewed as a feedforward network with layers Hi+1 = σ(T iHi), en in block form T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . hat T is dynamically sized, and the matrix can be dynamically sized because the d by type, rather than by coordinate. Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. , p y g p architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 0 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 1 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 2 corresponding to each input vector, or we can feed them into another network to get a single vector or 3 scalar output. 4 If each f i is a simple linear layer followed by a nonlinearity σ: 5 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 6 Hi+1 = σ(T iHi), where T is written in block form 7 T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 8 blocks are applied by type, rather than by coordinate. 9 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. mean ( ), , ( ) g p states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 2 4@ log p(a(t)|s(t), ✓) @✓ T X i=t r(i) −b(s(t), ✓) ! −↵@ @✓ T X i=t r(i) −b(s(t), ✓) !23 5 . Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 0 1, h0 2, ..., h0 J], and computes: hi+1 j = f i(hi j, ci j) (1) ci+1 j = 1 J −1 X j06=j hi+1 j0 . (2) ase that f i is a single linear layer followed by a nonlinearity σ, we have: hi+1 j = σ(Hihi j + nd the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi ncatenation of all hi j and T takes the block form: T i = 0 B B B B @ Hi Ci Ci ... Ci Ci Hi Ci ... Ci Ci Ci Hi ... Ci ... ... ... ... ... Ci Ci Ci ... Hi 1 C C C C A , Abstract First, we simplify and extend the graph neural network his architecture can be used to control groups of cooperating of multilayer neural networks f i that take as input vectors model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) i+1 j = X j06=j hi+1 j0 ; K} (we will call K the number of hops in the network). output them directly, so that the model outputs a vector can feed them into another network to get a single vector or d by a nonlinearity σ: = σ(Aihi j + Bici j), rward network with layers Hi+1 = σ(T iHi), i Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . ed, and the matrix can be dynamically sized because the coordinate. mation Processing Systems (NIPS 2016). Do not distribute. nymous Author(s) Affiliation Address email Abstract First, we simplify and extend the graph neural network s architecture can be used to control groups of cooperating multilayer neural networks f i that take as input vectors odel takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and +1 = f i(hi j, ci j) +1 = X j06=j hi+1 j0 ; } (we will call K the number of hops in the network). utput them directly, so that the model outputs a vector n feed them into another network to get a single vector or by a nonlinearity σ: = σ(Aihi j + Bici j), ard network with layers +1 = σ(T iHi), Bi Bi ... Bi Ai Bi ... Bi Bi Ai ... Bi ... ... ... ... Bi Bi ... Ai 1 C C C C A . d, and the matrix can be dynamically sized because the oordinate. ation Processing Systems (NIPS 2016). Do not distribute. Author(s) on s ct simplify and extend the graph neural network ure can be used to control groups of cooperating er neural networks fi that take as input vectors as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi j, ci j) hi+1 j0 ; l call K the number of hops in the network). m directly, so that the model outputs a vector m into another network to get a single vector or inearity σ: + Bici j), ork with layers T iHi), i ... Bi i ... Bi i ... Bi ... ... i ... Ai 1 C C C C A . matrix can be dynamically sized because the essing Systems (NIPS 2016). Do not distribute. Address email Abstract tributions. First, we simplify and extend the graph neural network how how this architecture can be used to control groups of cooperating consists of multilayer neural networks f i that take as input vectors i+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; 2 {0, .., K} (we will call K the number of hops in the network). al hK j and output them directly, so that the model outputs a vector tor, or we can feed them into another network to get a single vector or er followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), s a feedforward network with layers Hi+1 = σ(T iHi), m T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . mically sized, and the matrix can be dynamically sized because the er than by coordinate. Neural Information Processing Systems (NIPS 2016). Do not distribute. ayer NN Avg. controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 2 4@ log p(a(t)|s(t), ✓) @✓ T X i=t r(i) −b(s(t), ✓) ! −↵@ @✓ T X i=t r(i) −b(s(t), ✓) !23 5 . Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 2 4@ log p(a(t)|s(t), ✓) @✓ T X i=t r(i) −b(s(t), ✓) ! −↵@ @✓ T X i=t r(i) −b(s(t), ✓) !23 5 . Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 Figure 1: Blah. idea is that T is dynamically sized. First, the number of agents may vary. This motivates normalizing factor J −1 in equation (2), which resacles the communication vector by the of communicating agents. Second, the blocks are applied based on category, rather than by ate. In this simple form of the model “category” refers to either “self” or “teammate”; but as see below, the communication architecture can be more complicated than “broadcast to all”, may require more categories. Note also that T i is permutation invariant, thus the order of the oes not matter. rst layer of the model an encoder function h0 j = p(sj) is used. This takes as input state-view utputs feature vector h0 j (in Rd0 for some d0). The form of the encoder is problem dependent, most of our tasks they consist of a lookup-table embedding (or bags of vectors thereof). Unless se noted, c0 j = 0 for all j. utput of the model, a decoder function q(hK j ) is used to output a distribution over the space of q(.) takes the form of a single layer network, followed by a softmax. To produce a discrete we sample from the this distribution. e entire model, which we call a Communication Neural Net (CommNN), (i) takes the stateall agents s, passes it through the encoder h0 = p(s), (ii) iterates h and c in equations (1) to obain hK, (iii) samples actions a for all agents, according to q(hK). odel Extensions onnectivity: An alternative to the broadcast framework described above is to allow agents municate to others within a certain range. Let N(j) be the set of agents present within nication range of agent j. Then (2) becomes: ci+1 j = 1 |N(j)| X j02N(j) hi+1 j0 . (3) 3 h0 = [h0 1, h0 2, ..., h0 J], and computes: hi+1 j = f i(hi j, ci j) (1) ci+1 j = 1 J −1 X j06=j hi+1 j0 . (2) In the case that f i is a single linear layer followed by a nonlinearity σ, we have: hi+1 j = σ(Hihi j + Cici j) and the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi is the concatenation of all hi j and T takes the block form: T i = 0 B B B B @ Hi Ci Ci ... Ci Ci Hi Ci ... Ci Ci Ci Hi ... Ci ... ... ... ... ... Ci Ci Ci ... Hi 1 C C C C A , Abstract tions. First, we simplify and extend the graph neural network how this architecture can be used to control groups of cooperating sists of multilayer neural networks f i that take as input vectors The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; 0, .., K} (we will call K the number of hops in the network). K and output them directly, so that the model outputs a vector or we can feed them into another network to get a single vector or llowed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), eedforward network with layers Hi+1 = σ(T iHi), = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . lly sized, and the matrix can be dynamically sized because the an by coordinate. l Information Processing Systems (NIPS 2016). Do not distribute. Anonymous Author(s) Affiliation Address email Abstract tions. First, we simplify and extend the graph neural network how this architecture can be used to control groups of cooperating sists of multilayer neural networks f i that take as input vectors The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; 0, .., K} (we will call K the number of hops in the network). K and output them directly, so that the model outputs a vector r we can feed them into another network to get a single vector or lowed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), eedforward network with layers Hi+1 = σ(T iHi), = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . ly sized, and the matrix can be dynamically sized because the an by coordinate. l Information Processing Systems (NIPS 2016). Do not distribute. mous Author(s) Affiliation Address email Abstract rst, we simplify and extend the graph neural network architecture can be used to control groups of cooperating multilayer neural networks f i that take as input vectors el takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and = f i(hi j, ci j) = X j06=j hi+1 j0 ; (we will call K the number of hops in the network). tput them directly, so that the model outputs a vector feed them into another network to get a single vector or y a nonlinearity σ: σ(Aihi j + Bici j), rd network with layers 1 = σ(T iHi), Bi Bi ... Bi Ai Bi ... Bi Bi Ai ... Bi ... ... ... ... Bi Bi ... Ai 1 C C C C A . and the matrix can be dynamically sized because the ordinate. ion Processing Systems (NIPS 2016). Do not distribute. email Abstract two contributions. First, we simplify and extend the graph neural network nd, we show how this architecture can be used to control groups of cooperating he model consists of multilayer neural networks f i that take as input vectors vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; j, and i 2 {0, .., K} (we will call K the number of hops in the network). e the final hK j and output them directly, so that the model outputs a vector nput vector, or we can feed them into another network to get a single vector or near layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), viewed as a feedforward network with layers Hi+1 = σ(T iHi), lock form T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . is dynamically sized, and the matrix can be dynamically sized because the ype, rather than by coordinate. ence on Neural Information Processing Systems (NIPS 2016). Do not distribute. multilayer NN Avg. controller is a large feed forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 2 4@ log p(a(t)|s(t), ✓) @✓ T X i=t r(i) −b(s(t), ✓) ! −↵@ @✓ T X i=t r(i) −b(s(t), ✓) !23 5 . Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 2 4@ log p(a(t)|s(t), ✓) @✓ T X i=t r(i) −b(s(t), ✓) ! −↵@ @✓ T X i=t r(i) −b(s(t), ✓) !23 5 . Here r(t) is reward given at time t, and the hyperparameter ↵is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 Figure 1: Blah. The key idea is that T is dynamically sized. First, the number of agents may vary. This motivates the the normalizing factor J −1 in equation (2), which resacles the communication vector by the number of communicating agents. Second, the blocks are applied based on category, rather than by coordinate. In this simple form of the model “category” refers to either “self” or “teammate”; but as we will see below, the communication architecture can be more complicated than “broadcast to all”, and so may require more categories. Note also that T i is permutation invariant, thus the order of the agents does not matter. At the first layer of the model an encoder function h0 j = p(sj) is used. This takes as input state-view sjand outputs feature vector h0 j (in Rd0 for some d0). The form of the encoder is problem dependent, but for most of our tasks they consist of a lookup-table embedding (or bags of vectors thereof). Unless otherwise noted, c0 j = 0 for all j. At the output of the model, a decoder function q(hK j ) is used to output a distribution over the space of actions. q(.) takes the form of a single layer network, followed by a softmax. To produce a discrete action, we sample from the this distribution. Thus the entire model, which we call a Communication Neural Net (CommNN), (i) takes the stateview of all agents s, passes it through the encoder h0 = p(s), (ii) iterates h and c in equations (1) and (2) to obain hK, (iii) samples actions a for all agents, according to q(hK). 3.2 Model Extensions Local Connectivity: An alternative to the broadcast framework described above is to allow agents to communicate to others within a certain range. Let N(j) be the set of agents present within communication range of agent j. Then (2) becomes: ci+1 j = 1 |N(j)| X j02N(j) hi+1 j0 . (3) 3 tanh agents. 2 Model The simplest form of the model consists of multilayer neural networks f i that take as input vectors hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and computes hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). If desired, we can take the final hK j and output them directly, so that the model outputs a vector corresponding to each input vector, or we can feed them into another network to get a single vector or scalar output. If each f i is a simple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers Hi+1 = σ(T iHi), where T is written in block form T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the blocks are applied by type, rather than by coordinate. Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. CommNet model th communication step Module for agent agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = 0 B B B B @ Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai 1 C C C C A . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. their actions, each agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the broadcast communication channel between agents and (b) propagates the agent state. 3 Communication Model We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (omitting the time index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. Note that this single controller Φ encompasses the individual controllers for each agents, as well as the communication between agents. 3.1 Controller Structure We now detail our architecture for Φ that allows communication without losing modularity. Φ is built from modules f i, which take the form of multilayer neural networks. Here i 2 {0, .., K}, where K is the number of communication steps in the network. Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors h0 = [h0 1, h0 2, ..., h0 J], and computes: hi+1 j = f i(hi j, ci j) (1) ci+1 j = 1 J −1 X j06=j hi+1 j0 . (2) In the case that f i is a single linear layer followed by a nonlinearity σ, we have: hi+1 j = σ(Hihi j + Cici j) and the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi is the concatenation of all hi j and T i takes the block form (where ¯Ci = Ci/(J −1)): T i = 0 B B B B B @ Hi ¯Ci ¯Ci ... ¯Ci ¯Ci Hi ¯Ci ... ¯Ci ¯Ci ¯Ci Hi ... ¯Ci ... ... ... ... ... ¯Ci ¯Ci ¯Ci ... Hi 1 C C C C C A , Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. mean 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 h0 = [h0 1, h0 2, ..., h0 J], and computes: 78 hi+1 j = f i(hi j, ci j) (1) 79 ci+1 j = 1 J −1 X j06=j hi+1 j0 . (2) In the case that f i is a single linear layer followed by a nonlinearity σ, we have: hi+1 j = σ(Hihi j + 80 Cici j) and the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi 81 is the concatenation of all hi j and T takes the block form: 82 T i = Hi Ci Ci ... Ci Ci Hi Ci ... Ci Ci Ci Hi ... Ci ... ... ... ... ... Ci Ci Ci ... Hi , Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract wo contributions. First, we simplify and extend the graph neural network d, we show how this architecture can be used to control groups of cooperating model consists of multilayer neural networks f i that take as input vectors ctor hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; and i 2 {0, .., K} (we will call K the number of hops in the network). he final hK j and output them directly, so that the model outputs a vector ut vector, or we can feed them into another network to get a single vector or ear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), ewed as a feedforward network with layers Hi+1 = σ(T iHi), ck form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi Ai . Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract two contributions. First, we simplify and extend the graph neural network ond, we show how this architecture can be used to control groups of cooperating he model consists of multilayer neural networks f i that take as input vectors vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; j, and i 2 {0, .., K} (we will call K the number of hops in the network). e the final hK j and output them directly, so that the model outputs a vector nput vector, or we can feed them into another network to get a single vector or inear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), viewed as a feedforward network with layers Hi+1 = σ(T iHi), lock form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . is dynamically sized and the matrix can be dynamically sized because the nnecting Neural Models Anonymous Author(s) Affiliation Address email Abstract ntributions. First, we simplify and extend the graph neural network show how this architecture can be used to control groups of cooperating el consists of multilayer neural networks fi that take as input vectors hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = fi(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; i 2 {0, .., K} (we will call K the number of hops in the network). nal hK j and output them directly, so that the model outputs a vector ctor, or we can feed them into another network to get a single vector or yer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), as a feedforward network with layers Hi+1 = σ(T iHi), rm T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . i ll i d d th t i b d i ll i d b th Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract troduction work we make two contributions. First, we simplify and extend the graph neural network ture of ??. Second, we show how this architecture can be used to control groups of cooperating odel mplest form of the model consists of multilayer neural networks f i that take as input vectors ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and es hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). ed, we can take the final hK j and output them directly, so that the model outputs a vector onding to each input vector, or we can feed them into another network to get a single vector or utput. f i is a simple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), e model can be viewed as a feedforward network with layers Hi+1 = σ(T iHi), T is written in block form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . y idea is that T is dynamically sized, and the matrix can be dynamically sized because the are applied by type, rather than by coordinate. ed to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. multilayer NN Avg. 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 Figure 1: Blah. The key idea is that T is dynamically sized. First, the number of agents may vary. This motivates 83 the the normalizing factor J −1 in equation (2), which resacles the communication vector by the 84 number of communicating agents. Second, the blocks are applied based on category, rather than by 85 coordinate. In this simple form of the model “category” refers to either “self” or “teammate”; but as 86 we will see below, the communication architecture can be more complicated than “broadcast to all”, 87 and so may require more categories. Note also that T i is permutation invariant, thus the order of the 88 agents does not matter. 89 At the first layer of the model an encoder function h0 j = p(sj) is used. This takes as input state-view 90 sjand outputs feature vector h0 j (in Rd0 for some d0). The form of the encoder is problem dependent, 91 but for most of our tasks they consist of a lookup-table embedding (or bags of vectors thereof). Unless 92 otherwise noted, c0 j = 0 for all j. 93 At the output of the model, a decoder function q(hK j ) is used to output a distribution over the space of 94 actions. q(.) takes the form of a single layer network, followed by a softmax. To produce a discrete 95 action, we sample from the this distribution. 96 Thus the entire model, which we call a Communication Neural Net (CommNN), (i) takes the state97 view of all agents s, passes it through the encoder h0 = p(s), (ii) iterates h and c in equations (1) 98 and (2) to obain hK, (iii) samples actions a for all agents, according to q(hK). 99 3.2 Model Extensions 100 h0 = [h0 1, h0 2, ..., h0 J], and computes: 78 hi+1 j = f i(hi j, ci j) (1) 79 ci+1 j = 1 J −1 X j06=j hi+1 j0 . (2) In the case that f i is a single linear layer followed by a nonlinearity σ, we have: hi+1 j = σ(Hihi j + 80 Cici j) and the model can be viewed as a feedforward network with layers hi+1 = σ(T ihi) where hi 81 is the concatenation of all hi j and T takes the block form: 82 T i = Hi Ci Ci ... Ci Ci Hi Ci ... Ci Ci Ci Hi ... Ci ... ... ... ... ... Ci Ci Ci ... Hi , Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract n ake two contributions. First, we simplify and extend the graph neural network Second, we show how this architecture can be used to control groups of cooperating of the model consists of multilayer neural networks f i that take as input vectors ut a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; all j, and i 2 {0, .., K} (we will call K the number of hops in the network). take the final hK j and output them directly, so that the model outputs a vector ach input vector, or we can feed them into another network to get a single vector or ple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), be viewed as a feedforward network with layers Hi+1 = σ(T iHi), in block form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . at T is dynamically sized, and the matrix can be dynamically sized because the Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract ct ction e make two contributions. First, we simplify and extend the graph neural network ??. Second, we show how this architecture can be used to control groups of cooperating orm of the model consists of multilayer neural networks f i that take as input vectors output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). can take the final hK j and output them directly, so that the model outputs a vector to each input vector, or we can feed them into another network to get a single vector or simple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), can be viewed as a feedforward network with layers Hi+1 = σ(T iHi), tten in block form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . s that T is dynamically sized, and the matrix can be dynamically sized because the ied by type, rather than by coordinate. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract e two contributions. First, we simplify and extend the graph neural network ond, we show how this architecture can be used to control groups of cooperating the model consists of multilayer neural networks f i that take as input vectors a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; l j, and i 2 {0, .., K} (we will call K the number of hops in the network). ke the final hK j and output them directly, so that the model outputs a vector input vector, or we can feed them into another network to get a single vector or linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), viewed as a feedforward network with layers Hi+1 = σ(T iHi), block form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . T is dynamically sized, and the matrix can be dynamically sized because the type, rather than by coordinate. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 Introduction In this work we make two contributions. First, we simplify and extend the graph neural network architecture of ??. Second, we show how this architecture can be used to control groups of cooperating agents. 2 Model The simplest form of the model consists of multilayer neural networks f i that take as input vectors hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and computes hi+1 j = f i(hi j, ci j) ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). If desired, we can take the final hK j and output them directly, so that the model outputs a vector corresponding to each input vector, or we can feed them into another network to get a single vector or scalar output. If each f i is a simple linear layer followed by a nonlinearity σ: hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers Hi+1 = σ(T iHi), where T is written in block form T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the blocks are applied by type, rather than by coordinate. Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. multilayer NN Avg. 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 2 Problem Formulation 33 We consider the setting where we have M agents, all cooperating to maximize reward R in some 34 environment. We make the simplifying assumption that each agent receives R, independent of their 35 contribution. In this setting, there is no difference between each agent having its own controller, or 36 viewing them as pieces of a larger model controlling all agents. Taking the latter perspective, our 37 controller is a large feed-forward neural network that maps inputs for all agents to their actions, each 38 agent occupying a subset of units. A specific connectivity structure between layers (a) instantiates the 39 broadcast communication channel between agents and (b) propagates the agent state in the manner of 40 an RNN. 41 Because the agents will receive reward, but not necessarily supervision for each action, reinforcement 42 learning is used to maximize expected future reward. We explore two forms of communication within 43 the controller: (i) discrete and (ii) continuous. In the former case, communication is an action, and 44 will be treated as such by the reinforcement learning. In the continuous case, the signals passed 45 between agents are no different than hidden states in a neural network; thus credit assignment for the 46 communication can be performed using standard backpropagation (within the outer RL loop). 47 We use policy gradient [33] with a state specific baseline for delivering a gradient to the model. 48 Denote the states in an episode by s(1), ..., s(T), and the actions taken at each of those states 49 as a(1), ..., a(T), where T is the length of the episode. The baseline is a scalar function of the 50 states b(s, ✓), computed via an extra head on the model producing the action probabilities. Beside 51 maximizing the expected reward with policy gradient, the models are also trained to minimize the 52 distance between the baseline value and actual reward. Thus, after finishing an episode, we update 53 the model parameters ✓by 54 ∆✓= T X t=1 ∂log p(a(t)|s(t), ✓) ∂✓ $ T X i=t r(i) −b(s(t), ✓) % −α ∂ ∂✓ $ T X i=t r(i) −b(s(t), ✓) %2 . Here r(t) is reward given at time t, and the hyperparameter α is for balancing the reward and the 55 baseline objectives, set to 0.03 in all experiments. 56 3 Model 57 We now describe the model used to compute p(a(t)|s(t), ✓) at a given time t (ommiting the time 58 index for brevity). Let sj be the jth agent’s view of the state of the environment. The input to the 59 controller is the concatenation of all state-views s = {s1, ..., sJ}, and the controller Φ is a mapping 60 a = Φ(s), where the output a is a concatenation of discrete actions a = {a1, ..., aJ} for each agent. 61 Note that this single controller Φ encompasses the individual controllers for each agents, as well as 62 the communication between agents. 63 One obvious choice for Φ is a fully-connected multi-layer neural network, which could extract 64 features h from s and use them to predict good actions with our RL framework. This model would 65 allow agents to communicate with each other and share views of the environment. However, it 66 is inflexible with respect to the composition and number of agents it controls; cannot deal well 67 with agents joining and leaving the group and even the order of the agents must be fixed. On the 68 other hand, if no communication is used then we can write a = {φ(s1), ..., φ(sJ)}, where φ is a 69 per-agent controller applied independently. This communication-free model satisfies the flexibility 70 requirements1, but is not able to coordinate their actions. 71 3.1 Controller Structure 72 We now detail the architecture for Φ that has the modularity of the communication-free model but 73 still allows communication. Φ is built from modules f i, which take the form of multilayer neural 74 networks. Here i 2 {0, .., K}, where K is the number of communication layers in the network. 75 Each f i takes two input vectors for each agent j: the hidden state hi j and the communication ci j, 76 and outputs a vector hi+1 j . The main body of the model then takes as input the concatenated vectors 77 1Assuming sj includes the identity of agent j. 2 Figure 1: Blah. The key idea is that T is dynamically sized. First, the number of agents may vary. This motivates 83 the the normalizing factor J −1 in equation (2), which resacles the communication vector by the 84 number of communicating agents. Second, the blocks are applied based on category, rather than by 85 coordinate. In this simple form of the model “category” refers to either “self” or “teammate”; but as 86 we will see below, the communication architecture can be more complicated than “broadcast to all”, 87 and so may require more categories. Note also that T i is permutation invariant, thus the order of the 88 agents does not matter. 89 At the first layer of the model an encoder function h0 j = p(sj) is used. This takes as input state-view 90 sjand outputs feature vector h0 j (in Rd0 for some d0). The form of the encoder is problem dependent, 91 but for most of our tasks they consist of a lookup-table embedding (or bags of vectors thereof). Unless 92 otherwise noted, c0 j = 0 for all j. 93 At the output of the model, a decoder function q(hK j ) is used to output a distribution over the space of 94 actions. q(.) takes the form of a single layer network, followed by a softmax. To produce a discrete 95 action, we sample from the this distribution. 96 Thus the entire model, which we call a Communication Neural Net (CommNN), (i) takes the state97 view of all agents s, passes it through the encoder h0 = p(s), (ii) iterates h and c in equations (1) 98 and (2) to obain hK, (iii) samples actions a for all agents, according to q(hK). 99 3.2 Model Extensions 100 Local Connectivity: An alternative to the broadcast framework described above is to allow agents 101 to communicate to others within a certain range. Let N(j) be the set of agents present within 102 i i f j Th (2) b tanh Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. CommNet model th communication step Module for agent Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. Connecting Neural Models Anonymous Author(s) Affiliation Address email Abstract abstract 1 1 Introduction 2 In this work we make two contributions. First, we simplify and extend the graph neural network 3 architecture of ??. Second, we show how this architecture can be used to control groups of cooperating 4 agents. 5 2 Model 6 The simplest form of the model consists of multilayer neural networks f i that take as input vectors 7 hi and ci and output a vector hi+1. The model takes as input a set of vectors {h0 1, h0 2, ..., h0 m}, and 8 computes 9 hi+1 j = f i(hi j, ci j) 10 ci+1 j = X j06=j hi+1 j0 ; We set c0 j = 0 for all j, and i 2 {0, .., K} (we will call K the number of hops in the network). 11 If desired, we can take the final hK j and output them directly, so that the model outputs a vector 12 corresponding to each input vector, or we can feed them into another network to get a single vector or 13 scalar output. 14 If each f i is a simple linear layer followed by a nonlinearity σ: 15 hi+1 j = σ(Aihi j + Bici j), then the model can be viewed as a feedforward network with layers 16 Hi+1 = σ(T iHi), where T is written in block form 17 T i = Ai Bi Bi ... Bi Bi Ai Bi ... Bi Bi Bi Ai ... Bi ... ... ... ... ... Bi Bi Bi ... Ai . The key idea is that T is dynamically sized, and the matrix can be dynamically sized because the 18 blocks are applied by type, rather than by coordinate. 19 Submitted to 29th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. Figure 1: An overview of our CommNet model. Left: view of module f i for a single agent j. Note that the parameters are shared across all agents. Middle: a single communication step, where each agents modules propagate their internal state h, as well as broadcasting a communication vector c on a common channel (shown in red). Right: full model, showing input states s for each agent, two communication steps and the output actions for each agent. A key point is that T is dynamically sized since the number of agents may vary. This motivates the the normalizing factor J −1 in equation (2), which rescales the communication vector by the number of communicating agents. Note also that T i is permutation invariant, thus the order of the agents does not matter. 2 Figure 1: An overview of our CommNet model. Left: view of module f i for a single agent j. Note that the parameters are shared across all agents. Middle: a single communication step, where each agents modules propagate their internal state h, as well as broadcasting a communication vector c on a common channel (shown in red). Right: full model Φ, showing input states s for each agent, two communication steps and the output actions for each agent. communication range of agent j. Then (2) becomes: ci+1 j = 1 |N(j)| X j′∈N(j) hi+1 j′ . (3) As the agents move, enter and exit the environment, N(j) will change over time. In this setting, our model has a natural interpretation as a dynamic graph, with N(j) being the set of vertices connected to vertex j at the current time. The edges within the graph represent the communication channel between agents, with (3) being equivalent to belief propagation [22]. Furthermore, the use of multi-layer nets at each vertex makes our model similar to an instantiation of the GGSNN work of Li et al. [14]. Skip Connections: For some tasks, it is useful to have the input encoding h0 j present as an input for communication steps beyond the first layer. Thus for agent j at step i, we have: hi+1 j = f i(hi j, ci j, h0 j). (4) Temporal Recurrence: We also explore having the network be a recurrent neural network (RNN). This is achieved by simply replacing the communication step i in Eqn. (1) and (2) by a time step t, and using the same module f t for all t. At every time step, actions will be sampled from q(ht j). Note that agents can leave or join the swarm at any time step. If f t is a single layer network, we obtain plain RNNs that communicate with each other. In later experiments, we also use an LSTM as an f t module. 3 Related Work Our model combines a deep network with reinforcement learning [8, 20, 13]. Several recent works have applied these methods to multi-agent domains, such as Go [16, 24] and Atari games [29], but they assume full visibility of the environment and lack communication. There is a rich literature on multi-agent reinforcement learning (MARL) [1], particularly in the robotics domain [18, 25, 5, 21, 2]. Amongst fully cooperative algorithms, many approaches [12, 15, 33] avoid the need for communication by making strong assumptions about visibility of other agents and the environment. Others use communication, but with a pre-determined protocol [30, 19, 37, 17]. A few notable approaches involve learning to communicate between agents under partial visibility: Kasai et al. [10] and Varshavskaya et al. [32], both use distributed tabular-RL approaches for simulated tasks. Giles & Jim [6] use an evolutionary algorithm, rather than reinforcement learning. Guestrin et al. [7] use a single large MDP to control a collection of agents, via a factored message passing framework where the messages are learned. In contrast to these approaches, our model uses a deep network for both agent control and communication. From a MARL perspective, the closest approach to ours is the concurrent work of Foerster et al. [4]. This also uses a deep reinforcement learning in multi-agent partially observable tasks, specifically two riddle problems (similar in spirit to our levers task) which necessitate multi-agent communication. 3 Like our approach, the communication is learned rather than being pre-determined. However, the agents communicate in a discrete manner through their actions. This contrasts with our model where multiple continuous communication cycles are used at each time step to decide the actions of all agents. Furthermore, our approach is amenable to dynamic variation in the number of agents. The Neural GPU [9] has similarities to our model but differs in that a 1-D ordering on the input is assumed and it employs convolution, as opposed to the global pooling in our approach (thus permitting unstructured inputs). Our model can be regarded as an instantiation of the GNN construction of Scarselli et al. [23], as expanded on by Li et al. [14]. In particular, in [23], the output of the model is the fixed point of iterating equations (3) and (1) to convergence, using recurrent models. In [14], these recurrence equations are unrolled a fixed number of steps and the model trained via backprop through time. In this work, we do not require the model to be recurrent, neither do we aim to reach steady state. Additionally, we regard Eqn. (3) as a pooling operation, conceptually making our model a single feed-forward network with local connections. 4 Experiments 4.1 Baselines We describe three baselines models for Φ to compare against our model. Independent controller: A simple baseline is where agents are controlled independently without any communication between them. We can write Φ as a = {φ(s1), ..., φ(sJ)}, where φ is a per-agent controller applied independently. The advantages of this communication-free model is modularity and flexibility1. Thus it can deal well with agents joining and leaving the group, but it is not able to coordinate agents’ actions. Fully-connected: Another obvious choice is to make Φ a fully-connected multi-layer neural network, that takes concatenation of h0 j as an input and outputs actions {a1, ..., aJ} using multiple output softmax heads. It is equivalent to allowing T to be an arbitrary matrix with fixed size. This model would allow agents to communicate with each other and share views of the environment. Unlike our model, however, it is not modular, inflexible with respect to the composition and number of agents it controls, and even the order of the agents must be fixed. Discrete communication: An alternate way for agents to communicate is via discrete symbols, with the meaning of these symbols being learned during training. Since Φ now contains discrete operations and is not differentiable, reinforcement learning is used to train in this setting. However, unlike actions in the environment, an agent has to output a discrete symbol at every communication step. But if these are viewed as internal time steps of the agent, then the communication output can be treated as an action of the agent at a given (internal) time step and we can directly employ policy gradient [35]. At communication step i, agent j will output the index wi j corresponding to a particular symbol, sampled according to: wi j ∼Softmax(Dhi j) (5) where matrix D is the model parameter. Let ˆw be a 1-hot binary vector representation of w. In our broadcast framework, at the next step the agent receives a bag of vectors from all the other agents (where ∧is the element-wise OR operation): ci+1 j = ^ j′̸=j ˆwi j′ (6) 4.2 Simple Demonstration with a Lever Pulling Task We start with a very simple game that requires the agents to communicate in order to win. This consists of m levers and a pool of N agents. At each round, m agents are drawn at random from the total pool of N agents and they must each choose a lever to pull, simultaneously with the other m −1 agents, after which the round ends. The goal is for each of them to pull a different lever. Correspondingly, all agents receive reward proportional to the number of distinct levers pulled. Each agent can see its own identity, and nothing else, thus sj = j. 1Assuming sj includes the identity of agent j. 4 We implement the game with m = 5 and N = 500. We use a CommNet with two communication steps (K = 2) and skip connections from (4). The encoder r is a lookup-table with N entries of 128D. Each f i is a two layer neural net with ReLU non-linearities that takes in the concatenation of (hi, ci, h0), and outputs a 128D vector. The decoder is a linear layer plus softmax, producing a distribution over the m levers, from which we sample to determine the lever to be pulled. We compare it against the independent controller, which has the same architecture as our model except that communication c is zeroed. The results are shown in Table 1. The metric is the number of distinct levers pulled divided by m = 5, averaged over 500 trials, after seeing 50000 batches of size 64 during training. We explore both reinforcement (see the supplementary material) and direct supervision (using the solution given by sorting the agent IDs, and having each agent pull the lever according to its relative order in the current m agents). In both cases, the CommNet performs significantly better than the independent controller. See the supplementary material for an analysis of a trained model. Training method Model Φ Supervised Reinforcement Independent 0.59 0.59 CommNet 0.99 0.94 Table 1: Results of lever game (#distinct levers pulled)/(#levers) for our CommNet and independent controller models, using two different training approaches. Allowing the agents to communicate enables them to succeed at the task. 4.3 Multi-turn Games In this section, we consider two multi-agent tasks using the MazeBase environment [26] that use reward as their training signal. The first task is to control cars passing through a traffic junction to maximize the flow while minimizing collisions. The second task is to control multiple agents in combat against enemy bots. We experimented with several module types. With a feedforward MLP, the module f i is a single layer network and K = 2 communication steps are used. For an RNN module, we also used a single layer network for f t, but shared parameters across time steps. Finally, we used an LSTM for f t. In all modules, the hidden layer size is set to 50. MLP modules use skip-connections. Both tasks are trained for 300 epochs, each epoch being 100 weight updates with RMSProp [31] on mini-batch of 288 game episodes (distributed over multiple CPU cores). In total, the models experience ∼8.6M episodes during training. We repeat all experiments 5 times with different random initializations, and report mean value along with standard deviation. The training time varies from a few hours to a few days depending on task and module type. 4.3.1 Traffic Junction This consists of a 4-way junction on a 14 × 14 grid as shown in Fig. 2(left). At each time step, new cars enter the grid with probability parrive from each of the four directions. However, the total number of cars at any given time is limited to Nmax = 10. Each car occupies a single cell at any given time and is randomly assigned to one of three possible routes (keeping to the right-hand side of the road). At every time step, a car has two possible actions: gas which advances it by one cell on its route or brake to stay at its current location. A car will be removed once it reaches its destination at the edge of the grid. Two cars collide if their locations overlap. A collision incurs a reward rcoll = −10, but does not affect the simulation in any other way. To discourage a traffic jam, each car gets reward of τrtime = −0.01τ at every time step, where τ is the number time steps passed since the car arrived. Therefore, the total reward at time t is: r(t) = Ctrcoll + N t X i=1 τirtime, where Ct is the number of collisions occurring at time t, and N t is number of cars present. The simulation is terminated after 40 steps and is classified as a failure if one or more more collisions have occurred. Each car is represented by one-hot binary vector set {n, l, r}, that encodes its unique ID, current location and assigned route number respectively. Each agent controlling a car can only observe other cars in its vision range (a surrounding 3 × 3 neighborhood), but it can communicate to all other cars. 5 3 possible routes New car arrivals Car exiting Visual range 4 4 1 2 2 4 movement actions Visual range Firing range Attack actions (e.g. attack_4) Enemy bot 5 1 3 3 5 1% 10% 100% 1x1 3x3 5x5 7x7 Failure rate Vision range Independent Discrete comm. CommNet Figure 2: Left: Traffic junction task where agent-controlled cars (colored circles) have to pass the through the junction without colliding. Middle: The combat task, where model controlled agents (red circles) fight against enemy bots (blue circles). In both tasks each agent has limited visibility (orange region), thus is not able to see the location of all other agents. Right: As visibility in the environment decreases, the importance of communication grows in the traffic junction task. The state vector sj for each agent is thus a concatenation of all these vectors, having dimension 32 × |n| × |l| × |r|. In Table 2(left), we show the probability of failure of a variety of different model Φ and module f pairs. Compared to the baseline models, CommNet significantly reduces the failure rate for all module types, achieving the best performance with LSTM module (a video showing this model before and after training can be found at http://cims.nyu.edu/~sainbar/commnet). We also explored how partial visibility within the environment effects the advantage given by communication. As the vision range of each agent decreases, the advantage of communication increases as shown in Fig. 2(right). Impressively, with zero visibility (the cars are driving blind) the CommNet model is still able to succeed 90% of the time. Table 2(right) shows the results on easy and hard versions of the game. The easy version is a junction of two one-way roads, while the harder version consists from four connected junctions of two-way roads. Details of the other game variations can be found in the supplementary material. Discrete communication works well on the easy version, but the CommNet with local connectivity gives the best performance on the hard case. 4.3.2 Analysis of Communication We now attempt to understand what the agents communicate when performing the junction task. We start by recording the hidden state hi j of each agent and the corresponding communication vectors ˜ci+1 j = Ci+1hi j (the contribution agent j at step i + 1 makes to the hidden state of other agents). Fig. 3(left) and Fig. 3(right) show the 2D PCA projections of the communication and hidden state vectors respectively. These plots show a diverse range of hidden states but far more clustered communication vectors, many of which are close to zero. This suggests that while the hidden state carries information, the agent often prefers not to communicate it to the others unless necessary. This is a possible consequence of the broadcast channel: if everyone talks at the same time, no-one can understand. See the supplementary material for norm of communication vectors and brake locations. Module f() type Model Φ MLP RNN LSTM Independent 20.6± 14.1 19.5± 4.5 9.4± 5.6 Fully-connected 12.5± 4.4 34.8± 19.7 4.8± 2.4 Discrete comm. 15.8± 9.3 15.2± 2.1 8.4± 3.4 CommNet 2.2± 0.6 7.6± 1.4 1.6± 1.0 Other game versions Model Φ Easy (MLP) Hard (RNN) Independent 15.8± 12.5 26.9± 6.0 Discrete comm. 1.1± 2.4 28.2± 5.7 CommNet 0.3± 0.1 22.5± 6.1 CommNet local 21.1± 3.4 Table 2: Traffic junction task. Left: failure rates (%) for different types of model and module function f(.). CommNet consistently improves performance, over the baseline models. Right: Game variants. In the easy case, discrete communication does help, but still less than CommNet. On the hard version, local communication (see Section 2.2) does at least as well as broadcasting to all agents. 6 −20 −10 0 10 20 30 40 50 60 70 −40 −30 −20 −10 0 10 20 30 40 A C B STOP A B C1 C2 −4 −3 −2 −1 0 1 2 3 −4 −3 −2 −1 0 1 2 3 Figure 3: Left: First two principal components of communication vectors ˜c from multiple runs on the traffic junction task Fig. 2(left). While the majority are “silent” (i.e. have a small norm), distinct clusters are also present. Middle: for three of these clusters, we probe the model to understand their meaning (see text for details). Right: First two principal components of hidden state vectors h from the same runs as on the left, with corresponding color coding. Note how many of the “silent” communication vectors accompany non-zero hidden state vectors. This shows that the two pathways carry different information. To better understand the meaning behind the communication vectors, we ran the simulation with only two cars and recorded their communication vectors and locations whenever one of them braked. Vectors belonging to the clusters A, B & C in Fig. 3(left) were consistently emitted when one of the cars was in a specific location, shown by the colored circles in Fig. 3(middle) (or pair of locations for cluster C). They also strongly correlated with the other car braking at the locations indicated in red, which happen to be relevant to avoiding collision. 4.3.3 Combat Task We simulate a simple battle involving two opposing teams in a 15×15 grid as shown in Fig. 2(middle). Each team consists of m = 5 agents and their initial positions are sampled uniformly in a 5 × 5 square around the team center, which is picked uniformly in the grid. At each time step, an agent can perform one of the following actions: move one cell in one of four directions; attack another agent by specifying its ID j (there are m attack actions, each corresponding to one enemy agent); or do nothing. If agent A attacks agent B, then B’s health point will be reduced by 1, but only if B is inside the firing range of A (its surrounding 3 × 3 area). Agents need one time step of cooling down after an attack, during which they cannot attack. All agents start with 3 health points, and die when their health reaches 0. A team will win if all agents in the other team die. The simulation ends when one team wins, or neither of teams win within 40 time steps (a draw). The model controls one team during training, and the other team consist of bots that follow a hardcoded policy. The bot policy is to attack the nearest enemy agent if it is within its firing range. If not, it approaches the nearest visible enemy agent within visual range. An agent is visible to all bots if it is inside the visual range of any individual bot. This shared vision gives an advantage to the bot team. When input to a model, each agent is represented by a set of one-hot binary vectors {i, t, l, h, c} encoding its unique ID, team ID, location, health points and cooldown. A model controlling an agent also sees other agents in its visual range (3 × 3 surrounding area). The model gets reward of -1 if the team loses or draws at the end of the game. In addition, it also get reward of −0.1 times the total health points of the enemy team, which encourages it to attack enemy bots. Module f() type Model Φ MLP RNN LSTM Independent 34.2± 1.3 37.3± 4.6 44.3± 0.4 Fully-connected 17.7± 7.1 2.9± 1.8 19.6± 4.2 Discrete comm. 29.1± 6.7 33.4± 9.4 46.4± 0.7 CommNet 44.5± 13.4 44.4± 11.9 49.5± 12.6 Other game variations (MLP) Model Φ m = 3 m = 10 5 × 5 vision Independent 29.2± 5.9 30.5± 8.7 60.5± 2.1 CommNet 51.0± 14.1 45.4± 12.4 73.0± 0.7 Table 3: Win rates (%) on the combat task for different communication approaches and module choices. Continuous consistently outperforms the other approaches. The fully-connected baseline does worse than the independent model without communication. On the right we explore the effect of varying the number of agents m and agent visibility. Even with 10 agents on each team, communication clearly helps. 7 Table 3 shows the win rate of different module choices with various types of model. Among different modules, the LSTM achieved the best performance. Continuous communication with CommNet improved all module types. Relative to the independent controller, the fully-connected model degraded performance, but the discrete communication improved LSTM module type. We also explored several variations of the task: varying the number of agents in each team by setting m = 3, 10, and increasing visual range of agents to 5 × 5 area. The result on those tasks are shown on the right side of Table 3. Using CommNet model consistently improves the win rate, even with the greater environment observability of the 5×5 vision case. 4.4 bAbI Tasks We apply our model to the bAbI [34] toy Q & A dataset, which consists of 20 tasks each requiring different kind of reasoning. The goal is to answer a question after reading a short story. We can formulate this as a multi-agent task by giving each sentence of the story its own agent. Communication among agents allows them to exchange useful information necessary to answer the question. The input is {s1, s2, ..., sJ, q}, where sj is j’th sentence of the story, and q is the question sentence. We use the same encoder representation as [27] to convert them to vectors. The f(.) module consists of a two-layer MLP with ReLU non-linearities. After K = 2 communication steps, we add the final hidden states together and pass it through a softmax decoder layer to sample an output word y. The model is trained in a supervised fashion using a cross-entropy loss between y and the correct answer y∗. The hidden layer size is set to 100 and weights are initialized from N(0, 0.2). We train the model for 100 epochs with learning rate 0.003 and mini-batch size 32 with Adam optimizer [11] (β1 = 0.9, β2 = 0.99, ϵ = 10−6). We used 10% of training data as validation set to find optimal hyper-parameters for the model. Results on the 10K version of the bAbI task are shown in Table 4, along with other baselines (see the supplementary material for a detailed breakdown). Our model outperforms the LSTM baseline, but is worse than the MemN2N model [27], which is specifically designed to solve reasoning over long stories. However, it successfully solves most of the tasks, including ones that require information sharing between two or more agents through communication. Mean error (%) Failed tasks (err. > 5%) LSTM [27] 36.4 16 MemN2N [27] 4.2 3 DMN+ [36] 2.8 1 Independent (MLP module) 15.2 9 CommNet (MLP module) 7.1 3 Table 4: Experimental results on bAbI tasks. 5 Discussion and Future Work We have introduced CommNet, a simple controller for MARL that is able to learn continuous communication between a dynamically changing set of agents. Evaluations on four diverse tasks clearly show the model outperforms models without communication, fully-connected models, and models using discrete communication. Despite the simplicity of the broadcast channel, examination of the traffic task reveals the model to have learned a sparse communication protocol that conveys meaningful information between agents. Code for our model (and baselines) can be found at http://cims.nyu.edu/~sainbar/commnet/. One aspect of our model that we did not fully exploit is its ability to handle heterogenous agent types and we hope to explore this in future work. Furthermore, we believe the model will scale gracefully to large numbers of agents, perhaps requiring more sophisticated connectivity structures; we also leave this to future work. Acknowledgements The authors wish to thank Daniel Lee and Y-Lan Boureau for their advice and guidance. Rob Fergus is grateful for the support of CIFAR. References [1] L. Busoniu, R. Babuska, and B. De Schutter. A comprehensive survey of multiagent reinforcement learning. Systems, Man, and Cybernetics, IEEE Transactions on, 38(2):156–172, 2008. 8 [2] Y. Cao, W. Yu, W. Ren, and G. Chen. An overview of recent progress in the study of distributed multi-agent coordination. IEEE Transactions on Industrial Informatics, 1(9):427–438, 2013. [3] R. H. Crites and A. G. Barto. Elevator group control using multiple reinforcement learning agents. Machine Learning, 33(2):235–262, 1998. [4] J. N. Foerster, Y. M. Assael, N. de Freitas, and S. Whiteson. Learning to communicate to solve riddles with deep distributed recurrent Q-networks. arXiv, abs/1602.02672, 2016. [5] D. Fox, W. Burgard, H. Kruppa, and S. Thrun. Probabilistic approach to collaborative multi-robot localization. Autonomous Robots, 8(3):325––344, 2000. [6] C. L. Giles and K. C. Jim. Learning communication for multi-agent systems. In Innovative Concepts for Agent Based Systems, pages 377—-390. Springer, 2002. [7] C. Guestrin, D. Koller, and R. Parr. Multiagent planning with factored MDPs. In NIPS, 2001. [8] X. Guo, S. Singh, H. Lee, R. L. Lewis, and X. Wang. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In NIPS, 2014. [9] L. Kaiser and I. Sutskever. Neural gpus learn algorithms. In ICLR, 2016. [10] T. Kasai, H. Tenmoto, and A. Kamiya. Learning of communication codes in multi-agent reinforcement learning problem. IEEE Conference on Soft Computing in Industrial Applications, pages 1–6, 2008. [11] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [12] M. Lauer and M. A. Riedmiller. An algorithm for distributed reinforcement learning in cooperative multi-agent systems. In ICML, 2000. [13] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. [14] Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. Gated graph sequence neural networks. In ICLR, 2015. [15] M. L. Littman. Value-function reinforcement learning in markov games. Cognitive Systems Research, 2(1):55–66, 2001. [16] C. J. Maddison, A. Huang, I. Sutskever, and D. Silver. Move evaluation in go using deep convolutional neural networks. In ICLR, 2015. [17] D. Maravall, J. De Lope, and R. Domnguez. Coordination of communication in robot teams by reinforcement learning. Robotics and Autonomous Systems, 61(7):661–666, 2013. [18] M. Matari. Reinforcement learning in the multi-robot domain. Autonomous Robots, 4(1):73–83, 1997. [19] F. S. Melo, M. Spaan, and S. J. Witwicki. Querypomdp: Pomdp-based communication in multiagent systems. In Multi-Agent Systems, pages 189–204, 2011. [20] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [21] R. Olfati-Saber, J. Fax, and R. Murray. Consensus and cooperation in networked multi-agent systems. Proceedings of the IEEE, 95(1):215–233, 2007. [22] J. Pearl. Reverend bayes on inference engines: A distributed hierarchical approach. In AAAI, 1982. [23] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The graph neural network model. IEEE Trans. Neural Networks, 20(1):61–80, 2009. [24] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. [25] P. Stone and M. Veloso. Towards collaborative and adversarial learning: A case study in robotic soccer. International Journal of Human Computer Studies, (48), 1998. [26] S. Sukhbaatar, A. Szlam, G. Synnaeve, S. Chintala, and R. Fergus. Mazebase: A sandbox for learning from games. CoRR, abs/1511.07401, 2015. [27] S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. End-to-end memory networks. NIPS, 2015. [28] R. S. Sutton and A. G. Barto. Introduction to Reinforcement Learning. MIT Press, 1998. [29] A. Tampuu, T. Matiisen, D. Kodelja, I. Kuzovkin, K. Korjus, J. Aru, and R. Vicente. Multiagent cooperation and competition with deep reinforcement learning. arXiv:1511.08779, 2015. [30] M. Tan. Multi-agent reinforcement learning: Independent vs. cooperative agents. In ICML, 1993. [31] T. Tieleman and G. Hinton. Lecture 6.5—RmsProp: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012. [32] P. Varshavskaya, L. P. Kaelbling, and D. Rus. Distributed Autonomous Robotic Systems 8, chapter Efficient Distributed Reinforcement Learning through Agreement, pages 367–378. 2009. [33] X. Wang and T. Sandholm. Reinforcement learning to play an optimal nash equilibrium in team markov games. In NIPS, pages 1571–1578, 2002. [34] J. Weston, A. Bordes, S. Chopra, and T. Mikolov. Towards ai-complete question answering: A set of prerequisite toy tasks. In ICLR, 2016. [35] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Machine Learning, pages 229–256, 1992. [36] C. Xiong, S. Merity, and R. Socher. Dynamic memory networks for visual and textual question answering. ICML, 2016. [37] C. Zhang and V. Lesser. Coordinating multi-agent reinforcement learning with limited communication. In Proc. AAMAS, pages 1101–1108, 2013. 9 | 2016 | 203 |
6,110 | Sub-sampled Newton Methods with Non-uniform Sampling Peng Xu† Jiyan Yang† Farbod Roosta-Khorasani‡ Christopher Ré† Michael W. Mahoney‡ † Stanford University ‡ University of California at Berkeley pengxu@stanford.edu jiyan@stanford.edu farbod@icsi.berkeley.edu chrismre@cs.stanford.edu mmahoney@stat.berkeley.edu Abstract We consider the problem of finding the minimizer of a convex function F : Rd →R of the form F(w) := Pn i=1 fi(w) + R(w) where a low-rank factorization of ∇2fi(w) is readily available. We consider the regime where n ≫d. We propose randomized Newton-type algorithms that exploit non-uniform sub-sampling of {∇2fi(w)}n i=1, as well as inexact updates, as means to reduce the computational complexity, and are applicable to a wide range of problems in machine learning. Two non-uniform sampling distributions based on block norm squares and block partial leverage scores are considered. Under certain assumptions, we show that our algorithms inherit a linear-quadratic convergence rate in w and achieve a lower computational complexity compared to similar existing methods. In addition, we show that our algorithms exhibit more robustness and better dependence on problem specific quantities, such as the condition number. We empirically demonstrate that our methods are at least twice as fast as Newton’s methods on several real datasets. 1 Introduction Many machine learning applications involve finding the minimizer of optimization problems of the form min w∈C F(w) := n X i=1 fi(w) + R(w) (1) where fi(w) is a smooth convex function, R(w) is a regularizer, and C ⊆Rd is a convex constraint set (e.g., ℓ1 ball). Examples include sparse least squares [21], generalized linear models (GLMs) [8], and metric learning problems [12]. First-order optimization algorithms have been the workhorse of machine learning applications and there is a plethora of such methods [3, 17] for solving (1). However, for ill-conditioned problems, it is often the case that first-order methods return a solution far from w∗albeit a low objective value. On the other hand, most second-order algorithms prove to be more robust to such adversarial effects. This is so since, using the curvature information, second order methods properly rescale the gradient, such that it is a more appropriate direction to follow. For example, take the canonical second order method, i.e., Newton’s method, which, in the unconstrained case, has updates of the form wt+1 = wt −[H(wt)]−1g(wt) (here, g(wt) and H(wt) denote the gradient and the Hessian of F at wt, respectively). Classical results indicate that under certain assumptions, Newton’s method can achieve a locally super-linear convergence rate, which can be shown to be problem independent! Nevertheless, the cost of forming and inverting the Hessian is a major drawback in using Newton’s method in practice. In this regard, there has been a long line of work aiming at providing sufficient second-order information more efficiently, e.g., the classical BFGS algorithm and its limited memory version [14, 17]. As the mere evaluation of H(w) grows linearly in n, a natural idea is to use uniform sub-sampling {∇2fi(w)}n i=1 as a way to reduce the cost of such evaluation [7, 19, 20]. However, in the presence of high non-uniformity among {∇2fi(w)}n i=1, the sampling size required to sufficiently capture the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. curvature information of the Hessian can be very large. In such situations, non-uniform sampling can indeed be a much better alternative and is addressed in this work in detail. In this work, we propose novel, robust and highly efficient non-uniformly sub-sampled Newton methods (SSN) for a large sub-class of problem (1), where the Hessian of F(w) in (1) can be written as H(w) = Pn i=1 AT i (w)Ai(w) + Q(w), where Ai(w) ∈Rki×d, i = 1, 2, . . . , n, are readily available and Q(w) is some positive semi-definite matrix. This situation arises very frequently in machine learning problems. For example, take any problem where fi(w) = ℓ(xT i w), ℓ(·) is any convex loss function and xi’s are data points. In such situations, Ai(w) is simply p ℓ′′(xT i w)xT i . Under this setting, non-uniformly sub-sampling the Hessians now boils down to building an appropriate non-uniform distribution to sub-sample the most “relevant” terms among {Ai(w)}n i=1. The approximate Hessian, denoted by eH(wt), is then used to update the current iterate as wt+1 = wt −[ eH(wt)]−1g(wt). Furthermore, in order to improve upon the overall efficiency of our SSN algorithms, we will allow for the linear system in the sub-problem to be solved inexactly, i.e., using only a few iterations of any iterative solver such as Conjugate Gradient (CG). Such inexact updates used in many second-order optimization algorithms have been well studied in [4, 5]. As we shall see (in Section 4), our algorithms converge much faster than other competing methods for a variety of problems. In particular, on several machine learning datasets, our methods are at least twice as fast as Newton’s methods in finding a high-precision solution while other methods converge slowly. Indeed, this phenomenon is well supported by our theoretical findings—the complexity of our algorithms has a lower dependence on the problem condition number and is immune to any non-uniformity among {Ai(w)}n i=1 which may cause a factor of n in the complexity (Table 1). In the following we present details of our main contributions and connections to other prior work. Readers interested in more details should see the technical report version of this conference paper [23] for proofs of our main results, additional theoretical results, as well as a more detailed empirical evaluation. 1.1 Contributions and related work Recently, within the context of randomized second order methods, many algorithms have been proposed that aim at reducing the computational costs involving pure Newton’s method. Among them, algorithms that employ uniform sub-sampling constitute a popular line of work [4, 7, 16, 22]. In particular, [19, 20] consider a more general class of problems and, under a variety of conditions, thoroughly study the local and global convergence properties of sub-sampled Newton methods where the gradient and/or the Hessian are uniformly sub-sampled. Our work here, however, is more closely related to a recent work [18](Newton Sketch), which considers a similar class of problems and proposes sketching the Hessian using random sub-Gaussian matrices or randomized orthonormal systems. Furthermore, [1] proposes a stochastic algorithm (LiSSA) that, for solving the sub-problems, employs some unbiased estimators of the inverse of the Hessian. In light of these prior works, our contributions can be summarized as follows. • For the class of problems considered here, unlike the uniform sampling used in [4, 7, 19, 20], we employ two non-uniform sampling schemes based on block norm squares and a new, and more general, notion of leverage scores named block partial leverage scores (Definition 1). It can be shown that in the case of extreme non-uniformity among {Ai(w)}n i=1, uniform sampling might require Ω(n) samples to capture the Hessian information appropriately. However, we show that our non-uniform sampling schemes result in sample sizes completely independent of n and immune to such non-uniformity. • Within the context of globally convergent randomized second order algorithms, [4, 20] incorporate inexact updates where the sub-problems are solved only approximately. We extend the study of inexactness to our local convergence analysis. • We provide a general structural result (Lemma 2) showing that, as in [7, 18, 19], our main algorithm exhibits a linear-quadratic solution error recursion. However, we show that by using our nonuniform sampling strategies, the factors appearing in such error recursion enjoy a much better dependence on problem specific quantities, e.g., such as the condition number (Table 2). For example, using block partial leverage score sampling, the factor for the linear term of the error recursion (5) is of order O(√κ) as opposed to O(κ) for uniform sampling. • We demonstrate that to achieve a locally problem independent linear convergence rate, i.e., ∥wt+1− w∗∥≤ρ∥wt −w∗∥for some fixed ρ < 1, our algorithms achieve a lower per-iteration complexity compared to [1, 18, 20] (Table 1). In particular, unlike Newton Sketch [18], which employs random 2 Table 1: Complexity per iteration of different methods to obtain a problem independent local linear convergence rate. The quantities κ, ˆκ, and ¯κ are the local condition numbers, defined in (6), satisfying κ ≤ˆκ ≤¯κ, at the optimum w∗. A is defined in Assumption A3 and sr(A) is the stable rank of A satisfying sr(A) ≤d. Here we assume ki = 1, C = Rd, R(w) = 0, and CG is used for solving sub-problems in our algorithms. NAME COMPLEXITY PER ITERATION REFERENCE Newton-CG method ˜O(nnz(A)√κ) [17] SSN (leverage scores) ˜O(nnz(A) log n + d2κ3/2) This paper SSN (row norm squares) ˜O(nnz(A) + sr(A)dκ5/2) This paper Newton Sketch (SRHT) ˜O(nd(log n)4 + d2(log n)4κ3/2) [18] SSN (uniform) ˜O(nnz(A) + dˆκκ3/2) [20] LiSSA ˜O(nnz(A) + dˆκ¯κ2) [1] projections and fails to preserve the sparsity of {Ai(w)}n i=1, our methods indeed take advantage of such sparsity. Also, in the presence of high non-uniformity among {Ai(w)}n i=1, factors ¯κ and ˆκ (see Definition (6)) which appear in SSN (uniform) [19], and LiSSA [1], can potentially be as large as Ω(nκ); see Section 3.5 for detailed discussions. • We numerically demonstrate the effectiveness and robustness of our algorithms in recovering the minimizer of ridge logistic regression on several real datasets (Figures 1 and 2). In particular, our algorithms are at least twice as fast as Newton’s methods in finding a high-precision solution while other methods converge slowly. 1.2 Notation and assumptions Given a function F, the gradient, the exact Hessian and the approximate Hessian are denoted by g, H, and eH, respectively. Iteration counter is denoted by subscript, e.g., wt. Unless stated specifically, ∥·∥ denotes the Euclidean norm for vectors and spectral norm for matrices. Frobenius norm of matrices is written as ∥· ∥F . By a matrix A having n blocks, we mean that A has a block structure and can be viewed as A = AT 1 · · · AT n T , for appropriate size blocks Ai. The tangent cone of constraint set C at the optimum w∗is denoted by K and defined as K = {∆|w∗+ t∆∈C for some t > 0}. Given a symmetric matrix A, the K-restricted minimum and maximum eigenvalues of A are defined, respectively, as λK min(A) = minx∈K\{0} xT Ax/xT x and λK max(A) = maxx∈K\{0} xT Ax/xT x. The stable rank of a matrix A is defined as sr(A) = ∥A∥2 F /∥A∥2 2. We use nnz(A) to denote number of non-zero elements in A. Throughout the paper, we make use of the following assumptions: A.1 Lipschitz Continuity: F(w) is convex and twice differentiable with L-Lipschitz Hessian, i.e., ∥H(u) −H(v)∥≤L∥u −v∥, ∀u, v ∈C. A.2 Local Regularity: F(x) is locally strongly convex and smooth, i.e., µ = λK min(H(w∗)) > 0, ν = λK max(H(w∗)) < ∞. Here we define the local condition number of the problem as κ := ν/µ. A.3 Hessian Decomposition: For each fi(w) in (1), define ∇2fi(w) := Hi(w) := AT i (w)Ai(w). For simplicity, we assume k1 = · · · = kn = k and k is independent of d. Furthermore, we assume that given w, computing Ai(w), Hi(w), and g(w) takes O(d), O(d2), and O(nnz(A)) time, respectively. We call the matrix A(w) = AT 1 , . . . , AT n T ∈Rnk×d the augmented matrix of {Ai(w)}. Note that H(w) = A(w)T A(w) + Q(w). 2 Main Algorithm: SSN with Non-uniform Sampling Our proposed SSN method with non-uniform sampling is given in Algorithm 1. The core of our algorithm is based on choosing a sampling scheme S that, at every iteration, constructs a non-uniform sampling distribution {pi}n i=1 over {Ai(wt)}n i=1 and then samples from {Ai(wt)}n i=1 to form the approximate Hessian, eH(wt). The sampling sizes s needed for different sampling distributions will be discussed in Section 3.2. Since H(w) = Pn i=1 AT i (w)Ai(w) + Q(w), the Hessian approximation essentially boils down to a matrix approximation problem. Here, we generalize the two popular non-uniform sampling strategies, i.e., leverage score sampling and row norm squares sampling, which are commonly used in the field of randomized linear algebra, particularly for matrix approximation 3 problems [10, 15]. With an approximate Hessian constructed via non-uniform sampling, we may choose an appropriate solver A to the solve the sub-problem in Step 11 of Algorithm 1. Below we elaborate on the construction of the two non-uniform sampling schemes. Block Norm Squares Sampling This is done by constructing a sampling distribution based on the Frobenius norm of the blocks Ai, i.e., pi = ∥Ai∥2 F /∥A∥2 F , i = 1, . . . , n. This is an extension to the row norm squares sampling in which the intuition is to capture the importance of the blocks based on the “magnitudes” of the sub-Hessians [10]. Block Partial Leverage Scores Sampling Recall standard leverage scores of a matrix A are defined as diagonal elements of the “hat” matrix A(AT A)−1AT [15] which prove to be very useful in matrix approximation algorithms. However, in contrast to the standard case, there are two major differences in our task. First, blocks, not rows, are being sampled. Second, an additional matrix Q is involved in the target matrix, i.e., H. In light of this, we introduce a new and more general notion of leverage scores, called block partial leverage scores. Definition 1 (Block Partial Leverage Scores). Given a matrix A ∈Rkn×d viewed as having n blocks of size k × d and a SPSD matrix Q ∈Rd×d, let {τi}kn+d i=1 be the (standard) leverage scores of the augmented matrix A Q 1 2 . The block partial leverage score for the i-th block is defined as τ Q i (A) = Pki j=k(i−1)+1 τj. Note that for k = 1 and Q = 0, the block partial leverage score is simply the standard leverage score. The sampling distribution is defined as pi = τ Q i (A)/ Pn j=1 τ Q j (A) , i = 1, . . . , n. Algorithm 1 Sub-sampled Newton method with Non-uniform Sampling 1: Input: Initialization point w0, number of iteration T, sampling scheme S and solver A. 2: Output: wT 3: for t = 0, . . . , T −1 do 4: Construct the non-uniform sampling distribution {pi}n i=1 as described in Section 2. 5: for i = 1, . . . , n do 6: qi = min{s · pi, 1}, where s is the sampling size. 7: eAi(wt) = Ai(wt)/√qi, with probability qi, 0, with probability 1 −qi. 8: end for 9: eH(wt) = Pn i=1 eAT i (wt) eAi(wt) + Q(wt). 10: Compute g(wt) 11: Use solver A to solve the sub-problem inexactly wt+1 ≈arg min w∈C{1 2⟨(w −wt), eH(wt)(w −wt)⟩+ ⟨g(wt), w −wt⟩}. (2) 12: end for 13: return wT . 3 Theoretical Results In this section we provide detailed complexity analysis of our algorithm.1 Different choices of sampling scheme S and the sub-problem solver A lead to different complexities in SSN. More precisely, total complexity is characterized by the following four factors: (i) total number of iterations T determined by the convergence rate which is affected by the choice of S and A; see Lemma 2 in Section 3.1, (ii) the time, tgrad, it takes to compute the full gradient g(wt) (Step 10 in Algorithm 1), (iii) the time tconst, to construct the sampling distribution {pi}n i=1 and sample s terms at each iteration (Steps 4-8 in Algorithm 1), which is determined by S; see Section 3.2 for details, and (iv) the time tsolve needed to (implicitly) form ˜H and (inexactly) solve the sub-problem at each iteration (Steps 9 and 11 in Algorithm 1) which is affected by the choices of both S (manifested in the sampling size s) and A see Section 3.2&3.3 for details. With these, the total complexity can be expressed as T · (tgrad + tconst + tsolve). (3) 1In this work, we only focus on local convergence guarantees for Algorithm 1. To ensure global convergence, one can incorporate an existing globally convergent method, e.g. [20], as initial phase and switch to Algorithm 1 once the iterate is “close enough” to the optimum; see Lemma 2. 4 Below we study these contributing factors. Moreover, the per iteration complexity of our algorithm for achieving a problem independent linear convergence rate is presented in Section 3.4 and comparison to other related work is discussed in Section 3.5. 3.1 Local linear-quadratic error recursion Before diving into details of the complexity analysis, we state a structural lemma that characterizes the local convergence rate of our main algorithm, i.e., Algorithm 1. As discussed earlier, there are two layers of approximation in Algorithm 1, i.e., approximation of the Hessian by sub-sampling and inexactness of solving (2). For the first layer, we require the approximate Hessian to satisfy one of the following two conditions (in Section 3.2 we shall see our construction of approximate Hessian via non-uniform sampling can achieve these conditions with a sampling size independent of n). ∥eH(wt) −H(wt)∥≤ϵ · ∥H(wt)∥, (C1) or |xT ( eH(wt) −H(wt))y| ≤ϵ · q xT H(wt)x · q yT H(wt)y, ∀x, y ∈K. (C2) Note that (C1) and (C2) are two commonly seen guarantees for matrix approximation problems. In particular, (C2) is stronger in the sense that the spectral of the approximated matrix H(wt) is well preserved. Below in Lemma 2, we shall see such a stronger condition ensures a better dependence on the condition number in terms of the convergence rate. For the second layer of approximation, we require the solver to produce an ϵ0-approximate solution wt+1 satisfying ∥wt+1 −w∗ t+1∥≤ϵ0 · ∥wt −w∗ t+1∥, (4) where w∗ t+1 is the exact optimal solution to (2). Note that (4) implies an ϵ0-relative error approximation to the exact update direction, i.e., ∥v −v∗∥≤ϵ∥v∗∥where v = wt+1 −wt, v∗= w∗ t+1 −wt. Lemma 2 (Structural Result). Let ϵ ∈(0, 1/2) and ϵ0 be given and {wt}T i=1 be a sequence generated by (2) which satisfies (4). Also assume that the initial point w0 satisfies ∥w0 −w∗∥≤ µ 4L. Under Assumptions A1 & A2, the solution error satisfies the following recursion ∥wt+1 −w∗∥≤(1 + ϵ0)Cq · ∥wt −w∗∥2 + (ϵ0 + (1 + ϵ0)Cl) · ∥wt −w∗∥, (5) where Cl and Cq are specified as below. • Cq = 2L (1 −2ϵκ)µ and Cl = 4ϵκ 1 −2ϵκ, if condition (C1) is met; • Cq = 2L (1 −ϵ)µ and Cl = 3ϵ√κ 1 −ϵ , if condition (C2) is met. 3.2 Complexities related to the choice of sampling scheme S The following lemma gives the complexity of constructing the sampling distributions used in this paper. Here, we adopt the fast approximation algorithm for standard leverage scores, [6], to obtain an efficient approximation to our block partial leverage scores. Lemma 3 (Construction Complexity). Under Assumption 3, it takes tconst = O(nnz(A)) time to construct a block norm squares sampling distribution, and it takes tconst = O(nnz(A) log n) time to construct, with high probability, a distribution with constant factor approximation to the block partial leverage scores. The following theorem indicates that if the blocks of the augmented matrix of {Ai(w)} (see Assumption 3) are sampled based on block norm squares or block partial leverage scores with large enough sampling size, (C1) or (C2) holds, respectively, with high probability. Theorem 4 (Sufficient Sample Size). Given any ϵ ∈(0, 1), the following statements hold: (i) Let ri = ∥Ai∥2 F , i = 1, . . . , n, set pi = ri/(Pn j=1 rj) and construct eH as in Steps 5-9 of Algorithm 1. Then if s ≥4sr(A) · log (min{4sr(A), d}/δ) /ϵ2, with probability at least 1 −δ, (C1) holds. (ii) Let {ˆτ Q i (A)}n i=1 be some overestimate of the block partial leverage scores, i.e., ˆτ Q i (A) ≥ τ Q i (A), i = 1, . . . , n and set pi = ˆτ Q i (A)/(Pn j=1 ˆτ Q j (A)), i = 1, . . . , n. Construct eH as in Steps 5-9 of Algorithm 1. Then if s ≥4 Pn i=1 ˆτ Q i (A) · log (4d/δ) /ϵ2, with probability at least 1 −δ, (C2) holds. 5 Remarks: Part (i) of Theorem 4 is an extension of [10] to our particular augmented matrix setting. Also, as for the exact block partial leverage scores we have Pn i=1 τ Q i (A) ≤d, part (ii) of Theorem 4 implies that, using exact scores, less than O(d log d/ϵ2) blocks are needed for (C2) to hold. 3.3 Complexities related to the choice of solver A We now discuss how tsolve in (3) is affected by the choice of the solver A in Algorithm 1. The approximate Hessian eH(wt) is of the form ˜AT ˜A+Q where ˜A ∈Rsk×d. As a result, the complexity for solving the sub-problem (2) essentially depends on the choice A, the constraint set C, s and d, i.e., tsolve = T (A, C, s, d). For example, when the problem is unconstrained (C = Rd), CG takes tsolve = O(sd√κt log(1/ϵ)) to return a solution with approximation quality ϵ0 = √κtϵ in (4) where κt = λmax( eH(wt))/λmin( eH(wt)). 3.4 Total complexity per iteration Lemma 2 implies that, by choosing appropriate values for ϵ and ϵ0, SSN inherits a local constant linear convergence rate, i.e., ∥wt+1 −w∗∥≤ρ∥wt −w∗∥with ρ < 1. The following Corollary gives the total complexity per iteration of Algorithm 1 to obtain a locally linear rate. Corollary 5. Suppose C = Rd and CG is used to solve the sub-problem (2). Then under Assumption 3, to obtain a constant local linear convergence rate with a constant probability, the complexity per iteration of Algorithm 1 using the block partial leverage scores sampling and block norm squares sampling is ˜O(nnz(A) log n + d2κ3/2) and ˜O(nnz(A) + sr(A)dκ5/2), respectively. 2 3.5 Comparison with existing similar methods As discussed above, the sampling scheme S plays a crucial role in the overall complexity of SSN. We first compare our proposed non-uniform sampling schemes with the uniform alternative [20], in terms of complexities tconst and tsolve as well as the quality of the locally linear-quadratic error recursion (5), measured by Cq and Cl. Table 2 gives a summary of such comparison where, for simplicity, we assume that k = 1, C = Rd, and a direct solver is used for the linear system subproblem (2). Also, throughout this subsection, for randomized algorithms, we choose parameters such that the failure probability is a constant. One advantage of uniform sampling is its simplicity of construction. However, as shown in Section 3.2, it takes nearly input-sparsity time to construct the proposed non-uniform sampling distribution. In addition, when rows of A are very non-uniform, i.e., maxi ∥Ai∥≊∥A∥, uniform scheme requires Ω(n) samples to achieve (C1). It can also be seen that for a given ϵ, row norm squares sampling requires the smallest sampling size, yielding the smallest tsolve in Table 2. More importantly, although either (C1) or (C2) is sufficient to give (5), having (C2) as in SSN with leverage score sampling yields constants Cq and Cl with much better dependence on the local condition number, κ, than other methods. This fact can drastically improve the performance of SSN for ill-conditioned problems; see Figure 1 in Section 4. Table 2: Comparison between standard Newton’s methods and sub-sampled Newton methods (SSN) with different sampling schemes. Cq and Cl are the constants appearing in (5), A is the augmented matrix of {Ai(w)} with stable rank sr(A), κ = ν/µ is the local condition number and ˜κ = L/µ. Here, we assume that k = 1, C = Rd, and a direct solver is used in Algorithm 1. NAME tconst tsolve = sd2 Cq Cl Newton’s method 0 O(nd2) ˜κ 0 SSN (leverage scores) O(nnz(A) log n) ˜O((P i τ Q i (A))d2/ϵ2) ˜κ 1−ϵ ϵ√κ 1−ϵ SSN (row norm squares) O(nnz(A)) ˜O(sr(A)d2/ϵ2) ˜κ 1−ϵκ ϵκ 1−ϵκ SSN (uniform) [20] O(1) ˜O nd2 maxi ∥Ai∥2 ∥A∥2 /ϵ2 ˜κ 1−ϵκ ϵκ 1−ϵκ Next, recall that in Table 1, we summarize the per-iteration complexity needed by our algorithm and other similar methods [20, 1, 18] to achieve a given local linear convergence rate. Here we provide more details. First, the definition of various notions of condition number used in Table 1 is given below. For any given w ∈Rd, define κ(w) = λmax(Pn i=1 Hi(w)) λmin(Pn i=1 Hi(w)) , ˆκ(w) = n· maxi λmax(Hi(w)) λmin(Pn i=1 Hi(w)), ¯κ(w) = maxi λmax(Hi(w)) mini λmin(Hi(w)) , (6) 2In this paper, ˜O(·) hides logarithmic factors of d, κ and 1/δ. 6 assuming that the denominators are non-zero. It is easy to see that κ(w) ≤ˆκ(w) ≤¯κ(w). However, the degree of the discrepancy among these inequalities depends on the properties of Hi(w). Roughly speaking, when all Hi(w)’s are “similar”, one has that λK max(Pn i=1 Hi(w)) ≈ Pn i=1 λK max(Hi(w)) ≈n·maxi λK max(Hi(w)), and thus κ(w) ≈ˆκ(w) ≈¯κ(w). However, in many real applications, such uniformity doesn’t simply exist. For example, it is not hard to design a matrix A with non-uniform rows such that for H = AT A, ˆκ and ¯κ are larger than κ by a factor of n. This implies although SSN with leverage score sampling has a quadratic dependence on d, its dependence on the condition number is significantly better than all other methods such as SSN (uniform) and LiSSA. Moreover compared to Newton’s method, all these stochastic variants replace the coefficient of the leading term, i.e., O(nd), with some lower order terms that only depend on d and condition numbers (assuming nnz(A) ≈nd). Therefore, one should expect these algorithms to perform well when n ≫d and the problem is moderately conditioned. 4 Numerical Experiments We consider an estimation problem in GLMs with Gaussian prior. Assume X ∈Rn×d, Y ∈Yn are the data matrix and response vector. The problem of minimizing the negative log-likelihood with ridge penalty can be written as min w∈Rd n X i=1 ψ(xT i w, yi) + λ∥w∥2 2, where ψ : R × Y →R is a convex cumulant generating function and λ ≥0 is the ridge penalty parameter. In this case, the Hessian is H(w) = Pn i=1 ψ ′′(xT i w, yi)xixT i +λI := XT D2(w)X+λI, where xi is i-th column of XT and D(w) is a diagonal matrix with the diagonal [D(w)]ii = p ψ ′′(xT i w, yi). The augmented matrix of {Ai(w)} can be written as A(w) = DX ∈Rn×d where Ai(w) = [D(w)]iixT i . For our numerical simulations, we consider a very popular instance of GLMs, namely, logistic regression, where ψ(u, y) = log(1 + exp(−uy)) and Y = {±1}. Table 3 summarizes the datasets used in our experiments. Table 3: Datasets used in ridge logistic regression. In the above, κ and ¯κ are the local condition numbers of ridge logistic regression problem with λ = 0.01 as defined in (6). DATASET CT slices[9] Forest[2] Adult[13] Buzz[11] n 53,500 581,012 32,561 59,535 d 385 55 123 78 κ 368 221 182 37 ˆκ 47,078 322,370 69,359 384,580 We compare the performance of the following five algorithms: (i) Newton: the standard Newton’s method, (ii) Uniform: SSN with uniform sampling, (iii) PLevSS: SSN with partial leverage scores sampling, (iv) RNormSS: SSN with block (row) norm squares sampling, and (v) LBFGS-k is the standard L-BFGS method [14] with history size k. All algorithms are initialized with a zero vector.3 We also use CG to solve the sub-problem approximately to within 10−6 relative residue error. In order to compute the relative error ∥wt −w∗∥/∥w∗∥, an estimate of w∗is obtained by running the standard Newton’s method for sufficiently long time. Note here, in SSN with partial leverage score sampling, we recompute the leverage scores every 10 iterations. Roughly speaking, these “stale” leverage scores can be viewed as approximate leverage scores for the current iteration with approximation quality that can be upper bounded by the change of the Hessian and such quantity is often small in practice. So reusing the leverage scores allows us to further drive down the running time. We first investigate the effect of the condition number, controlled by varying λ, on the performance of different methods, and the results are depicted in Figure 1. It can be seen that in well-conditioned cases, all sampling schemes work equally well. However, as the condition number worsens, the performance of uniform sampling deteriorates, while non-uniform sampling, in particular leverage score sampling, shows a great degree of robustness to such ill-conditioning effect. The experiments shown in Figure 1 are consistent with the theoretical results of Table 2, showing that the theory presented here can indeed be a reliable guide to practice. 3Theoretically, the suitable initial point for all the algorithms is the one with which the standard Newton’s method converges with a unit stepsize. Here, w0 = 0 happens to be one such good starting point. 7 log(lambda) -6 -5 -4 -3 -2 -1 0 condition number 100 102 104 106 108 (a) condition number log(lambda) -6 -5 -4 -3 -2 -1 0 best sampling size ×104 0 0.5 1 1.5 2 2.5 3 3.5 Newton Uniform PLevSS RNormSS (b) sampling size log(lambda) -6 -5 -4 -3 -2 -1 0 running time (s) 0 0.2 0.4 0.6 0.8 1 1.2 Newton Uniform PLevSS RNormSS LBFGS-50 (c) running time Figure 1: Ridge logistic regression on Adult with different λ’s: (a) local condition number κ, (b) sample size for different SSN methods giving the best overall running time, (c) running time for different methods to achieve 10−8 relative error. Next, we compare the performance of various methods as measured by relative-error of the solution vs. running time and the results are shown in Figure 24. It can be seen that, in most cases, SSN with non-uniform sampling schemes outperforms the other algorithms, especially Newton’s method. In particular, uniform sampling scheme performs poorly, e.g., in Figure 2(b), when the problem exhibits a high non-uniformity among data points which is reflected in the difference between κ and ¯κ shown in Table 3. time (s) 0 2 4 6 8 10 ||w - w*||2/||w*||2 10-15 10-10 10-5 100 logistic - lambda=0.01 Newton Uniform (7700) PLevSS (3850) RNormSS (3850) LBFGS-100 LBFGS-50 (a) CT Slice time (s) 0 2 4 6 8 10 ||w - w*||2/||w*||2 10-15 10-10 10-5 100 logistic - lambda=0.01 Newton Uniform (27500) PLevSS (3300) RNormSS (3300) LBFGS-100 LBFGS-50 (b) Forest time (s) 0 0.5 1 1.5 2 ||w - w*||2/||w*||2 10-15 10-10 10-5 100 logistic - lambda=0.01 Newton Uniform (24600) PLevSS (2460) RNormSS (2460) LBFGS-100 LBFGS-50 (c) Adult time (s) 0 2 4 6 8 10 ||w - w*||2/||w*||2 10-15 10-10 10-5 100 logistic - lambda=0.01 Newton Uniform (39000) PLevSS (1560) RNormSS (1560) LBFGS-100 LBFGS-50 (d) Buzz Figure 2: Iterate relative solution error vs. time(s) for various methods on four datasets with ridge penalty parameter λ = 0.01. The values in brackets denote the sample size used for each method. We would like to remind the reader that for the locally strongly convex problems that we consider here, one can provably show that the behavior of the error in the loss function, i.e., F(wk) − F(w∗)/|F(w∗)| follows the same pattern as that of the solution error, i.e., ∥wk −w∗∥/∥w∗∥; see [23] for details. As a result, our algorithms remain to be effective for cases where the primary goal is to reduce the loss (as opposed to the solution error). 5 Conclusions In this paper, we propose non-uniformly sub-sampled Newton methods with inexact update for a class of constrained problems. We show that our algorithms have a better dependence on the condition number and enjoy a lower per-iteration complexity, compared to other similar existing methods. Theoretical advantages are numerically demonstrated. Acknowledgments. We would like to thank the Army Research Office and the Defense Advanced Research Projects Agency as well as Intel, Toshiba and the Moore Foundation for support along with DARPA through MEMEX (FA8750-14-2-0240), SIMPLEX (N66001-15-C-4043), and XDATA (FA8750-12-2-0335) programs, and the Office of Naval Research (N000141410102, N000141210041 and N000141310129). 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, ONR, or the U.S. government. References [1] Naman Agarwal, Brian Bullins, and Elad Hazan. Second order stochastic optimization in linear time. arXiv preprint arXiv:1602.03943, 2016. 4For each sub-sampled Newton method, the sampling size is determined by choosing the best value from {10d, 20d, 30d, ..., 100d, 200d, 300d, ..., 1000d} in the sense that the objective value drops to 1/3 of initial function value first. 8 [2] Jock A Blackard and Denis J Dean. Comparative accuracies of artificial neural networks and discriminant analysis in predicting forest cover types from cartographic variables. Computers and electronics in agriculture, 24(3):131–151, 1999. [3] Sébastien Bubeck. Theory of convex optimization for machine learning. arXiv preprint arXiv:1405.4980, 2014. [4] Richard H Byrd, Gillian M Chin, Will Neveitt, and Jorge Nocedal. On the use of stochastic Hessian information in optimization methods for machine learning. SIAM Journal on Optimization, 21(3):977–995, 2011. [5] Ron S Dembo, Stanley C Eisenstat, and Trond Steihaug. Inexact Newton methods. SIAM Journal on Numerical Analysis, 19(2):400–408, 1982. [6] Petros Drineas, Malik Magdon-Ismail, Michael W Mahoney, and David P Woodruff. Fast approximation of matrix coherence and statistical leverage. The Journal of Machine Learning Research, 13(1):3475–3506, 2012. [7] Murat A Erdogdu and Andrea Montanari. Convergence rates of sub-sampled Newton methods. In Advances in Neural Information Processing Systems, pages 3034–3042, 2015. [8] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics Springer, Berlin, 2001. [9] Franz Graf, Hans-Peter Kriegel, Matthias Schubert, Sebastian Pölsterl, and Alexander Cavallaro. 2d image registration in ct images using radial image descriptors. In Medical Image Computing and ComputerAssisted Intervention–MICCAI 2011, pages 607–614. Springer, 2011. [10] John T. Holodnak and Ilse C. F. Ipsen. Randomized approximation of the Gram matrix: Exact computation and probabilistic bounds. SIAM J. Matrix Analysis Applications, 36(1):110–137, 2015. [11] François Kawala, Ahlame Douzal-Chouakria, Eric Gaussier, and Eustache Dimert. Prédictions d’activité dans les réseaux sociaux en ligne. In 4ième conférence sur les modèles et l’analyse des réseaux: Approches mathématiques et informatiques, page 16, 2013. [12] Brian Kulis. Metric learning: A survey. Foundations and Trends in Machine Learning, 5(4):287–364, 2012. [13] M. Lichman. UCI machine learning repository, 2013. [14] Dong C. Liu and Jorge Nocedal. On the limited memory BFGS method for large scale optimization. 45:503–528, 1989. [15] Michael W Mahoney. Randomized Algorithms for Matrices and Data. Foundations and Trends in Machine Learning. NOW Publishers, Boston, 2011. Also available at arXiv:1104.5557v2. [16] James Martens. Deep learning via Hessian-free optimization. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 735–742, 2010. [17] Jorge Nocedal and Stephen Wright. Numerical optimization. Springer Science & Business Media, 2006. [18] Mert Pilanci and Martin J Wainwright. Newton sketch: A linear-time optimization algorithm with linear-quadratic convergence. arXiv preprint arXiv:1505.02250, 2015. [19] Farbod Roosta-Khorasani and Michael W Mahoney. Sub-Sampled Newton Methods I: Globally Convergent Algorithms. arXiv preprint arXiv:1601.04737, 2016. [20] Farbod Roosta-Khorasani and Michael W Mahoney. Sub-Sampled Newton Methods II: Local Convergence Rates. arXiv preprint arXiv:1601.04738, 2016. [21] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [22] Oriol Vinyals and Daniel Povey. Krylov subspace descent for deep learning. arXiv preprint arXiv:1111.4259, 2011. [23] Peng Xu, Jiyan Yang, Farbod Roosta-Khorasani, Christopher Ré, and Michael W Mahoney. Sub-sampled Newton methods with non-uniform sampling. arXiv preprint arXiv:1607.00559, 2016. 9 | 2016 | 204 |
6,111 | Examples are not Enough, Learn to Criticize! Criticism for Interpretability Been Kim⇤ Allen Institute for AI beenkim@csail.mit.edu Rajiv Khanna UT Austin rajivak@utexas.edu Oluwasanmi Koyejo UIUC sanmi@illinois.edu Abstract Example-based explanations are widely used in the effort to improve the interpretability of highly complex distributions. However, prototypes alone are rarely sufficient to represent the gist of the complexity. In order for users to construct better mental models and understand complex data distributions, we also need criticism to explain what are not captured by prototypes. Motivated by the Bayesian model criticism framework, we develop MMD-critic which efficiently learns prototypes and criticism, designed to aid human interpretability. A human subject pilot study shows that the MMD-critic selects prototypes and criticism that are useful to facilitate human understanding and reasoning. We also evaluate the prototypes selected by MMD-critic via a nearest prototype classifier, showing competitive performance compared to baselines. 1 Introduction and Related Work As machine learning (ML) methods have become ubiquitous in human decision making, their transparency and interpretability have grown in importance (Varshney, 2016). Interpretability is particularity important in domains where decisions can have significant consequences. For example, the pneumonia risk prediction case study in Caruana et al. (2015) showed that a more interpretable model could reveal important but surprising patterns in the data that complex models overlooked. Studies of human reasoning have shown that the use of examples (prototypes) is fundamental to the development of effective strategies for tactical decision-making (Newell and Simon, 1972; Cohen et al., 1996). Example-based explanations are widely used in the effort to improve interpretability. A popular research program along these lines is case-based reasoning (CBR) (Aamodt and Plaza, 1994), which has been successfully applied to real-world problems (Bichindaritz and Marling, 2006). More recently, the Bayesian framework has been combined with CBR-based approaches in the unsupervised-learning setting, leading to improvements in user interpretability (Kim et al., 2014). In a supervised learning setting, example-based classifiers have been is shown to achieve comparable performance to non-interpretable methods, while offering a condensed view of a dataset (Bien and Tibshirani, 2011). However, examples are not enough. Relying only on examples to explain the models’ behavior can lead over-generalization and misunderstanding. Examples alone may be sufficient when the distribution of data points are ‘clean’ – in the sense that there exists a set of prototypical examples which sufficiently represent the data. However, this is rarely the case in real world data. For instance, fitting models to complex datasets often requires the use of regularization. While the regularization adds bias to the model to improve generalization performance, this same bias may conflict with the distribution of the data. Thus, to maintain interpretability, it is important, along with prototypical examples, to deliver insights signifying the parts of the input space where prototypical examples ⇤All authors contributed equally. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. do not provide good explanations. We call the data points that do not quite fit the model criticism samples. Together with prototypes, criticism can help humans build a better mental model of the complex data space. Bayesian model criticism (BMC) is a framework for evaluating fitted Bayesian models, and was developed to to aid model development and selection by helping to identify where and how a particular model may fail to explain the data. It has quickly developed into an important part of model design, and Bayesian statisticians now view model criticism as an important component in the cycle of model construction, inference and criticism (Gelman et al., 2014). Lloyd and Ghahramani (2015) recently proposed an exploratory approach for statistical model criticism using the maximum mean discrepancy (MMD) two sample test, and explored the use of the witness function to identify the portions of the input space the model most misrepresents the data. Instead of using the MMD to compare two models as in classic two sample testing (Gretton et al., 2008), or to compare the model to input data as in the Bayesian model criticism of Lloyd and Ghahramani (2015), we consider a novel application of the MMD, and its associated witness function as a principled approach for selecting prototype and criticism samples. We present the MMD-critic, a scalable framework for prototype and criticism selection to improve the interpretability of machine learning methods. To our best knowledge, ours is the first work which leverages the BMC framework to generate explanations for machine learning methods. MMD-critic uses the MMD statistic as a measure of similarity between points and potential prototypes, and efficiently selects prototypes that maximize the statistic. In addition to prototypes, MMD-critic selects criticism samples i.e. samples that are not well-explained by the prototypes using a regularized witness function score. The scalability follows from our analysis, where we show that under certain conditions, the MMD for prototype selection is a supermodular set function. Our supermodularity proof is general and may be of independent interest. While we are primarily concerned with prototype selection and criticism, we quantitatively evaluate the performance of MMD-critic as a nearest prototype classifier, and show that it achieves comparable performance to existing methods. We also present results from a human subject pilot study which shows that including the criticism together with prototypes is helpful for an end-task that requires the data-distributions to be well-explained. 2 Preliminaries This section includes notation and a few important definitions. Vectors are denoted by lower case x and matrices by capital X. The Euclidean inner product between matrices A and B is given by hA, Bi = P ai,jbi,j. Let det(X) denote the determinant of X. Sets are denoted by sans serif e.g. S. The reals are denoted by R. [n] denotes the set of integers {1, . . . , n}, and 2V denotes the power set of V. The indicator function 1[a] takes the value of 1 if its argument a is true and is 0 otherwise. We denote probability distributions by either P or Q. The notation | · | will denote cardinality when applied to sets, or absolute value when applied to real values. 2.1 Maximum Mean Discrepancy (MMD) The maximum mean discrepancy (MMD) is a measure of the difference between distributions P and Q, given by the suprenum over a function space F of differences between the expectations with respect to two distributions. The MMD is given by: MMD(F, P, Q) = sup f2F ✓ EX⇠P [f(X)] −EY ⇠Q [f(Y )] ◆ . (1) When F is a reproducing kernel Hilbert space (RKHS) with kernel function k : X ⇥X 7! R, the suprenum is achieved at (Gretton et al., 2008): f(x) = EX0⇠P [k(x, X0)] −EX0⇠Q [k(x, X0)] . (2) The function (2) is also known as the witness function as it measures the maximum discrepancy between the two expectations in F. Observe that the witness function is positive whenever Q underfits the density of P, and negative wherever Q overfits P. We can substitute (2) into (1) and square the result, leading to: MMD2(F, P, Q) = EX,X0⇠P [k(X, X0)] −2EX⇠P,y⇠Q [k(X, Y )] + EY,Y 0⇠Q [k(Y, Y 0)] . (3) 2 It is clear that MMD2(F, P, Q) ≥0 and MMD2(F, P, Q) = 0 iff. P is indistinguishable from Q on the RHKS F. This population definition can be approximated using sample expectations. In particular, given n samples from P as X = {xi ⇠P, i 2 [n]}, and m samples from Q as Z = {zi ⇠Q, i 2 [m]}, the following is a finite sample approximation: MMD2 b(F, X, Z) = 1 n2 X i,j2[n] k(xi, xj) − 2 nm X i2[n],j2[m] k(xi, zj) + 1 m2 X i,j2[m] k(zi, zj), (4) and the witness function is approximated as: f(x) = 1 n X i2[n] k(x, xi) −1 m X j2[m] k(x, zj). (5) 3 MMD-critic for Prototype Selection and Criticism Given n samples from a statistical model X = {xi, i 2 [n]}, let S ✓[n] represent a subset of the indices, so that XS = {xi 8i 2 S}. Given a RKHS with the kernel function k(·, ·), we can measure the maximum mean discrepancy between the samples and any selected subset using MMD2(F, X, XS). MMD-critic selects prototype indices S which minimize MMD2(F, X, XS). For our purposes, it will be convenient to pose the problem as a normalized discrete maximization. To this end, consider the following cost function, given by the negation of MMD2(F, X, XS) with an additive bias: Jb(S) = 1 n2 n X i,j=1 k(xi, xj) −MMD2(F, X, XS) = 2 n|S| X i2[n],j2S k(xi, yj) − 1 |S|2 X i,j2S k(yi, xj). (6) Note that the additive bias MMD2(F, X, ;) = 1 n2 Pn i,j=1 k(xi, xj) is a constant with respect to S. Further, Jb(S) is normalized, since, when evaluated on the empty set, we have that: Jb(;) = min S22[n] Jb(S) = 1 n2 n X i,j=1 k(xi, xj) −1 n2 n X i,j=1 k(xi, xj) = 0. MMD-critic selects m⇤prototypes as the subset of indices S ✓[n] which optimize: max S22[n],|S|m⇤ Jb(S). (7) For the purposes of optimizing the cost function (6), it will prove useful to exploit it’s linearity with respect to the kernel entries. The following Lemma is easily shown by enumeration. Lemma 1. Let Jb(·) be defined as in (6), then Jb(·) is a linear function of k(xi, xj). In particular, define K 2 Rn⇥n, with ki,j = k(xi, xj), and A(S) 2 Rn⇥n with entries ai,j(S) = 2 n|S|1[j2S] − 1 |S|2 1[i2S]1[j2S] then: Jb(S) = hA(S), Ki. 3.1 Submodularity and Efficient Prototype Selection While the discrete optimization problem (6) may be quite complicated to optimize, we show that the cost function Jb(S) is monotone submodular under conditions on the kernel matrix which are often satisfied in practice, and which can be easily checked given a kernel matrix. Based on this result, we describe the greedy forward selection algorithm for efficient prototype selection. Let F : 2[n] 7! R represent a set function. F is normalized if F(;) = 0. F is monotonic, if for all subsets u ⇢v ✓2[n] it holds that F(U) F(V). F is submodular, if for all subsets U, V 2 2[n] it holds that F(U [ V) + F(U \ V) F(U) + F(V). Submodular functions have a diminishing returns property (Nemhauser et al., 1978) i.e. the marginal gain of adding elements decreases with the size of the set. When F is submodular, −F is supermodular (and vice versa). 3 We prove submodularity for a larger class of problems, then show submodularity of (6) as a special case. Our proof for the larger class may be of independent interest. In particular, the following Theorem considers general discrete optimization problems which are linear matrix functionals, and shows sufficient conditions on the matrix for the problem to be monotone and/or submodular. Theorem 2 (Monotone Submodularity for Linear Forms). Let H 2 Rn⇥n (not necessarily symmetric) be element-wise non-negative and bounded, with upper bound h⇤= maxi,j2[n] hi,j > 0. Further, construct the binary matrix representation of the indices that achieve the maximum as E 2 [0, 1]n⇥n with ei,j = 1 if hi,j = h⇤and ei,j = 0 otherwise, and its complement E0 = 1 −E with the corresponding set E0 = {(i, j) s.t. ei,j = 0}. Given the ground set S ✓2[n] consider the linear form: F(H, S) = hA(S), Hi 8 S 2 S. Given m = |S|, define the functions: ↵(n, m) = a(S [ {u}) −a(S) b(S) , β(n, m) = a(S [ {u}) + a(S [ v}) −a(S [ {u, v}) −a(S) b(S [ {u, v}) + d(S) , (8) where a(S) = F(E, S), b(S) = F(E0, S) for all u, v 2 S (additional notation suppressed in ↵(·) and β(·) for clarity). Let m⇤= maxS2S |S| be the maximal cardinality of any element in the ground set. 1. If hi,j h⇤↵(n, m) 8 0 m m⇤, 8 (i, j) 2 E0, then F(H, S) is monotone 2. If hi,j h⇤β(n, m) 8 0 m m⇤, 8 (i, j) 2 E0, then F(H, S) is submodular. Finally, we consider a special case of Theorem 2 for the MMD. Corollary 3 (Monotone Submodularity for MMD). Let the kernel matrix K 2 Rn⇥n be element-wise non-negative, with equal diagonal terms ki,i = k⇤> 0 8i 2 [n], and be diagonally dominant. If the off-diagonal terms ki,j 8 i, j 2 [n], i 6= j satisfy 0 ki,j k⇤ n3+2n2−2n−3, then Jb(S) given by (6) is monotone submodular. The diagonal dominance condition expressed by Corollary 3 is easy to check given a kernel matrix. We also note that the conditions can be significantly weakened if one determines the required number of prototypes m⇤= max |S| n a-priori. This is further simplified for the MMD since the bounds (8) are both monotonically decreasing functions of m, so the condition need only be checked for m⇤. Observe that diagonal dominance is not a necessary condition, as the more general approach in Theorem 2 allows arbitrarily indexed maximal entries in the kernel. Diagonal dominance is assumed to simplify the resulting expressions. Perhaps, more important to practice is our observation that the diagonal dominance condition expressed by Corollary 3 is satisfied by parametrized kernels with appropriately selected parameters. We provide an example for radial basis function (RBF) kernels and powers of positive standardized kernels. Further examples and more general conditions are left for future work. Example 4 (Radial basis function Kernel). Consider the radial basis function kernel K with entries ki,j = k(xi, xj) = exp(−γkxi −xjk) evaluated on a sample X with non-duplicate points i.e. xi 6= xj 8 xi, xj 2 X. The off-diagonal kernel entries ki,j i 6= j monotonically decrease with respect to increasing γ. Thus, 9 γ⇤such that Corollary 3 is satisfied for γ ≥γ⇤. Example 5 (Powers of Positive Standardized Kernels). Consider a element-wise positive kernel matrix G standardized to be element-wise bounded 0 gi,j < 1 with unitary diagonal gi,i = 1 8 i 2 [n]. Define the kernel power K with ki,j = gp i,j. The off-diagonal kernel entries ki,j i 6= j monotonically decrease with respect to increasing p. Thus, 9 p⇤such that Corollary 3 is satisfied for p ≥p⇤. Beyond the examples outlined here, similar conditions can be enumerated for a wide range of parametrized kernel functions, and are easily checked for model-based kernels e.g. the Fisher kernel (Jaakkola et al., 1999) – useful for comparing data points based on similarity with respect to a probabilistic model. Our interpretation of from these examples is that the conditions of Corollary 3 are not excessively restrictive. While constrained maximization of submodular functions is generally NP-hard, the simple greedy forward selection heuristic has been shown to perform almost as well as the optimal in practice, and is known to have strong theoretical guarantees. Theorem 6 (Nemhauser et al. (1978)). In the case of any normalized, monotonic submodular function F, the set S⇤obtained by the greedy algorithm achieves at least a constant fraction % 1 −1 e & of the objective value obtained by the optimal solution i.e. F(S⇤) = % 1 −1 e & max |S|m F(s). 4 In addition, no polynomial time algorithm can provide a better approximation guarantee unless P = NP (Feige, 1998). An additional benefit of the greedy approach is that it does not require the decision of the number of prototypes m⇤to be made at training time, so assuming the kernel satisfies appropriate conditions, training can be stopped at any m⇤based on computational constraints, while still returning meaningful results. The greedy algorithm is outlined in Algorithm 1. Algorithm 1 Greedy algorithm, max F(S) s.t. |S| m⇤ Input: m⇤, S = ; while |S| < m⇤do foreach i 2 [n]\S, fi = F(S [ i) −F(S) S = S [ {arg max fi} end while Return: S. 3.2 Model Criticism In addition to selecting prototype samples, MMD-critic characterizes the data points not well explained by the prototypes – which we call the model criticism. These data points are selected as the largest values of the witness function (5) i.e. where the similarity between the dataset and the prototypes deviate the most. Consider the cost function: L(C) = X l2C '''''' 1 n X i2[n] k(xi, xl) −1 m X j2S k(xj, xl) '''''' . (9) The absolute value ensures that we measure both positive deviations f(x) > 0 where the prototypes underfit the density of the samples, and negative deviations f(x) < 0, where the prototypes overfit the density of the samples. Thus, we focus primarily on the magnitude of deviation, rather than its sign. The following theorem shows that (9) is a linear function of C. Theorem 7. The criticism function L(C) is a linear function of C. We found that the addition of a regularizer which encourages a diverse selection of criticism points improved performance. Let r : 2[n] 7! R represent a regularization function. We select the criticism points as the maximizers of this cost function: max C✓[n]\S,|C|c⇤L(C) + r(K, C) (10) Where [n]\S denote all indexes which not include the prototypes, and c⇤is the number of criticism points desired. Fortunately, due to the linearity of (5), the optimization function (10) is submodular when the regularization function is submodular. We encourage the use of regularizers which incorporate diversity into the criticism selection. We found the best qualitative performance using the log-determinant regularizer (Krause et al., 2008). Let KC,C be the sub-matrix of K corresponding to the pair of indexes in C ⇥C, then the log-determinant regularizer is given by: r(K, C) = log det KC,C (11) which is known to be submodular. Further, several researchers have found, both in theory and practice (Sharma et al., 2015), that greedy optimization is an effective strategy for optimization. We apply the greedy algorithm for criticism selection with the function F(C) = L(C) + r(K, C). 4 Related Work There is a large literature on techniques for selecting prototypes that summarize a dataset, and a full literature survey is beyond the scope of this manuscript. Instead, we overview a few of the most relevant references. The K-medoid clustering (Kaufman and Rousseeuw, 1987) is a classic technique for selecting a representative subset of data points, and can be solved using various iterative algorithms. K-medoid clustering is quite similar to K-means clustering, with the additional condition that the presented prototypes must be in the dataset. The ubiquity of large datasets has led to resurgence 5 of interest in the data summarization problem, also known as the set cover problem. Progress has included novel cost functions and algorithms for several domains including image summarization (Simon et al., 2007) and document summarizauion (Lin and Bilmes, 2011). Recent innovations also include highly scalable and distributed algorithms (Badanidiyuru et al., 2014; Mirzasoleiman et al., 2015). There is also a large literature on variations of the set cover problem tuned for classification, such as the cover digraph approach of (Priebe et al., 2003) and prototype selection for interpretable classification (Bien and Tibshirani, 2011), which involves selecting prototypes that maximize the coverage within the class, but minimize the coverage across classes. Submodular / Supermodular functions are well studied in the combinatorial optimization literature, with several scalable algorithms that come with optimization theoretic optimality guarantees (Nemhauser et al., 1978). In the Bayesian modeling literature, submodular optimization has previously been applied for approximate inference by Koyejo et al. (2014). The technical conditions required for submodularity of (6) are due to averaging of the kernel similarity scores – as the average requires a division by the cardinality |S|. In particular, the analogue of (6) which replaces all the averages by sums (i.e. removes all division by |S|) is equivalent to the well known submodular functions previously used for scene (Simon et al., 2007) and document (Lin and Bilmes, 2011) summarization, given by: −2 n P i2[n],j2S k(xi, yj) + λ P i,j2S k(yi, xj), where λ > 0 is a regularization parameter. The function that results is known to be submodular when the kernel is element-wise positive i.e. without the need for additional diagonal dominance conditions. On the other hand, the averaging has a desirable built-in balancing effect. When using the sum, practitioners must tune the additional regularization parameter λ to achieve a similar balance. 5 Results We present results for the proposed technique MMD-critic using USPS hand written digits (Hull, 1994) and Imagenet (Deng et al., 2009) datasets. We quantitatively evaluate the prototypes in terms of predictive quality as compared to related baselines on USPS hand written digits dataset. We also present preliminary results from a human subject pilot study. Our results suggest that the model criticism – which is unique to the proposed MMD-critic is especially useful to facilitate human understanding. For all datasets, we employed the radial basis function (RBF) kernel with entries ki,j = k(xi, xj) = exp(−γkxi −xjk), which satisfies the conditions of Corollary 3 for sufficiently large γ (c.f. Example 4, see Example 5 and following discussion for alternative feasible kernels). The Nearest Prototype Classifier: While our primary interest is in interpretable prototype selection and criticism, prototypes may also be useful for speeding up memory-based machine learning techniques such as the nearest neighbor classifier by restricting the neighbor search to the prototypes, sometimes known as the nearest prototype classifier (Bien and Tibshirani, 2011; Kuncheva and Bezdek, 1998). This classification provides an objective (although indirect) evaluation of the quality of the selected prototypes, and is useful for setting hyperparameters. We employ a 1 nearest neighbor classifier using the Hilbert space distance induced by the kernels. Let yi 2 [k] denote the label associated with each prototype i 2 S, for k classes. As we employ normalized kernels (where the diagonal is 1), it is sufficient to measure the pairwise kernel similarity. Thus, for a test point ˆx, the nearest neighbor classifier reduces to: ˆy = yi⇤, where i⇤= argmin i2S kˆx −xik2 HK = argmax i2S k(ˆx, xi). 5.1 MMD-critic evaluated on USPS Digits Dataset The USPS hand written digits dataset Hull (1994) consists of n = 7291 training (and 2007 test) greyscale images of 10 handwritten digits from 0 to 9. We consider two kinds of RBF kernels (i) global: where the pairwise kernel is computed between all data points, and (ii) local: given by exp(−γkxi −xjk)1[yi=yj], i.e. points in different classes are assigned a similarity score of zero. The local approach has the effect of pushing points in different classes further apart. The kernel hyperparameter γ was chosen based to maximize the average cross-validated classification performance, then fixed for all other experiments. Classification: We evaluated nearest prototype classifiers using MMD-critic, and compared to baselines (and reported performance) from Bien and Tibshirani (2011) (abbreviated as PS) and their 6 0 1000 2000 3000 4000 Number of prototypes 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 Test error MMD-global MMD-local PS K-medoids Figure 1: Classification error vs. number of prototypes m = |S|. MMD-critic shows comparable (or improved) performance as compared to other models (left). Random subset of prototypes and criticism from the USPS dataset (right). implementation of K-medoids. Figure 1(left) compares MMD-critic with global and local kernels, to the baselines for different numbers of selected prototypes m = |S|. Our results show comparable (or improved) performance as compared to other models. In particular, we observe that the global kernels out-perform the local kernels2 by a small margin. We note that MMD is particularly effective at selecting the first few prototypes (i.e. speed of error reduction as number of prototypes increases) suggesting its utility for rapidly summarising the dataset. Selected Prototypes and Criticism: Fig. 1 (right) presents a randomly selected subset of the prototypes and criticism from the MMD-critic using the local kernel. We observe that the prototypes capture many of the common ways of writing digits, while the criticism clearly capture outliers. 5.2 Qualitative Measure: Prototypes and Criticisms of Images In this section, we learn prototypes and criticisms from the Imagenet dataset (Russakovsky et al., 2015) using image embeddings from He et al. (2015). Each image is represented by a 2048 dimensions vector embedding, and each image belongs to one of 1000 categories. We select two breeds of one category (e.g., Blenheim spaniel) and run MMD-critic to learn prototypes and criticism. As shown in Figure 2, MMD-critic learns reasonable prototypes and criticisms for two types of dog breeds. On the left, criticisms picked out the different coloring (second criticism is in black and white picture), as well as pictures capturing movements of dogs (first and third criticisms). Similarly, on the right, criticisms capture the unusual, but potentially frequent pictures of dogs in costumes (first and second criticisms). 5.3 Quantitative measure: Prototypes and Criticisms improve interpretability We conducted a human pilot study to collect objective and subjective measures of interpretability using MMD-critic. The experiment used the same dataset as Section 5.2. We define ‘interpretability’ in this work as the following: a method is interpretable if a user can correctly and efficiently predict the method’s results. Under this definition, we designed a predictive task to quantitatively evaluate the interpretability. Given a randomly sampled data point, we measure how well a human can predict a group it belongs to (accuracy), and how fast they can perform the task (efficiency). We chose this dataset as the task of assigning a new image to a group requires groups to be well-explained but does not require specialized training. We presented four conditions in the experiment. 1) raw images condition (Raw Condition) 2) Prototypes Only (Proto Only Condition) 3) Prototypes and criticisms (Proto and Criticism Condition) 4) Uniformly sampled data points per group (Uniform Condition). Raw Condition contained 100 images per species (e.g., if a group contains 2 species, there are 200 images) Proto Only Condition, Proto and Criticism Condition and Uniform Condition contains the same number of images. 2 Note that the local kernel trivially achieves perfect accuracy. Thus, in order to measure generalization performance, we do not use class labels for local kernel test instances i.e. we use the global kernel instead of local kernel for test instances – regardless of training. 7 Figure 2: Learned prototypes and criticisms from Imagenet dataset (two types of dog breeds) We used within-subject design to minimize the effect of inter-participant variability, with a balanced Latin square to account for a potential learning effect. The four conditions were assigned to four participants (four males) in a balanced manner. Each subject answered 21 questions, where the first three questions are practice questions and not included in the analysis. Each question showed six groups (e.g., red fox, kit fox) of a species (e.g., fox), and a randomly sampled data point that belongs to one of the groups. Subjects were encouraged to answer the questions as quickly and accurately as possible. A break was imposed after each question to mitigate the potential effect of fatigue. We measured the accuracy of answers as well as the time they took to answer each question. Participants were also asked to respond to 10 5-point Likert scale survey questions about their subjective measure of accuracy and efficiency. Each survey question compared a pair of conditions (e.g., Condition A was more helpful than condition B to correctly (or efficiently) assign the image to a group). Subjects performed the best using Proto and Criticism Condition (M=87.5%, SD=20%). The performance with Proto Only Condition was relatively similar (M=75%, SD=41%), while that with Uniform Condition (M=55%, SD=38%, 37% decrease) and Raw Condition (M=56%, SD=33%, 36% decrease) was substantially lower. In terms of speed, subjects were most efficient using Proto Only Condition (M=1.04 mins/question, SD=0.28, 44% decrease compared to Raw Condition), followed by Uniform Condition (M=1.31 mins/question, SD=0.59) and Proto and Criticism Condition (M=1.37 mins/question, SD=0.8). Subjects spent the most time with Raw Condition (M=1.86 mins/question, SD=0.67). Subjects indicated their preference of Proto and Criticism Condition over Raw Condition and Uniform Condition. In a survey question that asks to compare Proto and Criticism Condition and Raw Condition, a subject added that “[Proto and Criticism Condition resulted in] less confusion from trying to discover hidden patterns in a ton of images, more clues indicating what features are important". In particular, in a question that asks to compare Proto and Criticism Condition and Proto Only Condition, a subject said that “The addition of criticisms made it easier to locate the defining features of the cluster within the prototypical images". The humans’ superior performance with prototypes and criticism in this preliminary study shows that providing criticisms together with prototypes is a promising direction to improve the interpretability. 6 Conclusion We present the MMD-critic, a scalable framework for prototype and criticism selection to improve the interpretability of complex data distributions. To our best knowledge, ours is the first work which leverages the BMC framework to generate explanations. Further, MMD-critic shows competitive performance as a nearest prototype classifier compared to to existing methods. When criticism is given together with prototypes, a human pilot study suggests that humans are better able to perform a predictive task that requires the data-distributions to be well-explained. This suggests that criticism and prototypes are a step towards improving interpretability of complex data distributions. For future work, we hope to further explore the properties of MMD-critic such as the effect of the choice of kernel, and weaker conditions on the kernel matrix for submodularity. We plan to explore applications to larger datasets, aided by recent work on distributed algorithms for submodular optimization. We also intend to complete a larger scale user study on how criticism and prototypes presented together affect human understanding. 8 References A. Aamodt and E. Plaza. Case-based reasoning: Foundational issues, methodological variations, and system approaches. AI communications, 1994. A. Badanidiyuru, B. Mirzasoleiman, A. Karbasi, and A. Krause. Streaming submodular maximization: Massive data summarization on the fly. In KDD. ACM, 2014. I. Bichindaritz and C. Marling. Case-based reasoning in the health sciences: What’s next? AI in medicine, 2006. J. Bien and R. Tibshirani. Prototype selection for interpretable classification. The Annals of Applied Statistics, pages 2403–2424, 2011. R. Caruana, Y. Lou, J. Gehrke, P. Koch, M. Sturm, and N. Elhadad. Intelligible models for healthcare: Predicting pneumonia risk and hospital 30-day readmission. In KDD, 2015. M.S. Cohen, J.T. Freeman, and S. Wolf. Metarecognition in time-stressed decision making: Recognizing, critiquing, and correcting. Human Factors, 1996. J. Deng, W. Dong, R. Socher, L.J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. U. Feige. A threshold of ln n for approximating set cover. JACM, 1998. A. Gelman, J.B. Carlin, H.S. Stern, and D.B. Rubin. Bayesian data analysis. Taylor & Francis, 2014. A. Gretton, K.M. Borgwardt, M.J. Rasch, B. Schölkopf, and A. Smola. A kernel method for the two-sample problem. JMLR, 2008. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv:1512.03385, 2015. J.J. Hull. A database for handwritten text recognition research. TPAMI, 1994. T.S. Jaakkola, D. Haussler, et al. Exploiting generative models in discriminative classifiers. In NIPS, pages 487–493, 1999. L. Kaufman and P. Rousseeuw. Clustering by means of medoids. North-Holland, 1987. B. Kim, C. Rudin, and J.A. Shah. The Bayesian Case Model: A generative approach for case-based reasoning and prototype classification. In NIPS, 2014. O.O. Koyejo, R. Khanna, J. Ghosh, and R. Poldrack. On prior distributions and approximate inference for structured variables. In NIPS, 2014. A. Krause, A. Singh, and C. Guestrin. Near-optimal sensor placements in gaussian processes: Theory, efficient algorithms and empirical studies. JMLR, 2008. L. I. Kuncheva and J.C. Bezdek. Nearest prototype classification: clustering, genetic algorithms, or random search? IEEE Transactions on Systems, Man, and Cybernetics, 28(1):160–164, 1998. H. Lin and J. Bilmes. A class of submodular functions for document summarization. In ACL, 2011. J. R. Lloyd and Z. Ghahramani. Statistical model criticism using kernel two sample tests. In NIPS, 2015. B. Mirzasoleiman, A. Karbasi, A. Badanidiyuru, and A. Krause. Distributed submodular cover: Succinctly summarizing massive data. In NIPS, 2015. G. L Nemhauser, L.A. Wolsey, and M.L. Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 1978. A. Newell and H.A. Simon. Human problem solving. Prentice-Hall Englewood Cliffs, 1972. C.E. Priebe, D.J. Marchette, J.G. DeVinney, and D.A. Socolinsky. Classification using class cover catch digraphs. Journal of classification, 2003. 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, 2015. D. Sharma, A. Kapoor, and A. Deshpande. On greedy maximization of entropy. In ICML, 2015. I. Simon, N. Snavely, and S.M. Seitz. Scene summarization for online image collections. In ICCV, 2007. K.R. Varshney. Engineering safety in machine learning. arXiv:1601.04126, 2016. 9 | 2016 | 205 |
6,112 | R-FCN: Object Detection via Region-based Fully Convolutional Networks Jifeng Dai Microsoft Research Asia Yi Li∗ Tsinghua University Kaiming He Microsoft Research Jian Sun Microsoft Research Abstract We present region-based, fully convolutional networks for accurate and efficient object detection. In contrast to previous region-based detectors such as Fast/Faster R-CNN [7, 19] that apply a costly per-region subnetwork hundreds of times, our region-based detector is fully convolutional with almost all computation shared on the entire image. To achieve this goal, we propose position-sensitive score maps to address a dilemma between translation-invariance in image classification and translation-variance in object detection. Our method can thus naturally adopt fully convolutional image classifier backbones, such as the latest Residual Networks (ResNets) [10], for object detection. We show competitive results on the PASCAL VOC datasets (e.g., 83.6% mAP on the 2007 set) with the 101-layer ResNet. Meanwhile, our result is achieved at a test-time speed of 170ms per image, 2.5-20× faster than the Faster R-CNN counterpart. Code is made publicly available at: https://github.com/daijifeng001/r-fcn. 1 Introduction A prevalent family [9, 7, 19] of deep networks for object detection can be divided into two subnetworks by the Region-of-Interest (RoI) pooling layer [7]: (i) a shared, “fully convolutional” subnetwork independent of RoIs, and (ii) an RoI-wise subnetwork that does not share computation. This decomposition [9] was historically resulted from the pioneering classification architectures, such as AlexNet [11] and VGG Nets [24], that consist of two subnetworks by design — a convolutional subnetwork ending with a spatial pooling layer, followed by several fully-connected (fc) layers. Thus the (last) spatial pooling layer in image classification networks is naturally turned into the RoI pooling layer in object detection networks [9, 7, 19]. But recent state-of-the-art image classification networks such as Residual Nets (ResNets) [10] and GoogLeNets [25, 27] are by design fully convolutional2. By analogy, it appears natural to use all convolutional layers to construct the shared, convolutional subnetwork in the object detection architecture, leaving the RoI-wise subnetwork no hidden layer. However, as empirically investigated in this work, this naïve solution turns out to have considerably inferior detection accuracy that does not match the network’s superior classification accuracy. To remedy this issue, in the ResNet paper [10] the RoI pooling layer of the Faster R-CNN detector [19] is unnaturally inserted between two sets of convolutional layers — this creates a deeper RoI-wise subnetwork that improves accuracy, at the cost of lower speed due to the unshared per-RoI computation. We argue that the aforementioned unnatural design is caused by a dilemma of increasing translation invariance for image classification vs. respecting translation variance for object detection. On one hand, the image-level classification task favors translation invariance — shift of an object inside an image should be indiscriminative. Thus, deep (fully) convolutional architectures that are as translation∗This work was done when Yi Li was an intern at Microsoft Research. 2Only the last layer is fully-connected, which is removed and replaced when fine-tuning for object detection. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. image conv position-sensitive score maps feature maps k2(C+1)-d conv k2(C+1) …... bottom-right RoI C+1 pool top-left top-center k k C+1 vote C+1 softmax Figure 1: Key idea of R-FCN for object detection. In this illustration, there are k × k = 3 × 3 position-sensitive score maps generated by a fully convolutional network. For each of the k × k bins in an RoI, pooling is only performed on one of the k2 maps (marked by different colors). Table 1: Methodologies of region-based detectors using ResNet-101 [10]. R-CNN [8] Faster R-CNN [20, 10] R-FCN [ours] depth of shared convolutional subnetwork 0 91 101 depth of RoI-wise subnetwork 101 10 0 invariant as possible are preferable as evidenced by the leading results on ImageNet classification [10, 25, 27]. On the other hand, the object detection task needs localization representations that are translation-variant to an extent. For example, translation of an object inside a candidate box should produce meaningful responses for describing how good the candidate box overlaps the object. We hypothesize that deeper convolutional layers in an image classification network are less sensitive to translation. To address this dilemma, the ResNet paper’s detection pipeline [10] inserts the RoI pooling layer into convolutions — this region-specific operation breaks down translation invariance, and the post-RoI convolutional layers are no longer translation-invariant when evaluated across different regions. However, this design sacrifices training and testing efficiency since it introduces a considerable number of region-wise layers (Table 1). In this paper, we develop a framework called Region-based Fully Convolutional Network (R-FCN) for object detection. Our network consists of shared, fully convolutional architectures as is the case of FCN [16]. To incorporate translation variance into FCN, we construct a set of position-sensitive score maps by using a bank of specialized convolutional layers as the FCN output. Each of these score maps encodes the position information with respect to a relative spatial position (e.g., “to the left of an object”). On top of this FCN, we append a position-sensitive RoI pooling layer that shepherds information from these score maps, with no weight (convolutional/fc) layers following. The entire architecture is learned end-to-end. All learnable layers are convolutional and shared on the entire image, yet encode spatial information required for object detection. Figure 1 illustrates the key idea and Table 1 compares the methodologies among region-based detectors. Using the 101-layer Residual Net (ResNet-101) [10] as the backbone, our R-FCN yields competitive results of 83.6% mAP on the PASCAL VOC 2007 set and 82.0% the 2012 set. Meanwhile, our results are achieved at a test-time speed of 170ms per image using ResNet-101, which is 2.5× to 20× faster than the Faster R-CNN + ResNet-101 counterpart in [10]. These experiments demonstrate that our method manages to address the dilemma between invariance/variance on translation, and fully convolutional image-level classifiers such as ResNets can be effectively converted to fully convolutional object detectors. Code is made publicly available at: https://github.com/daijifeng001/r-fcn. 2 Our approach Overview. Following R-CNN [8], we adopt the popular two-stage object detection strategy [8, 9, 6, 7, 19, 1, 23] that consists of: (i) region proposal, and (ii) region classification. Although methods that do not rely on region proposal do exist (e.g., [18, 15]), region-based systems still possess leading accuracy on several benchmarks [5, 14, 21]. We extract candidate regions by the Region Proposal 2 conv RoI pool conv RoIs conv vote feature maps Figure 2: Overall architecture of R-FCN. A Region Proposal Network (RPN) [19] proposes candidate RoIs, which are then applied on the score maps. All learnable weight layers are convolutional and are computed on the entire image; the per-RoI computational cost is negligible. Network (RPN) [19], which is a fully convolutional architecture in itself. Following [19], we share the features between RPN and R-FCN. Figure 2 shows an overview of the system. Given the proposal regions (RoIs), the R-FCN architecture is designed to classify the RoIs into object categories and background. In R-FCN, all learnable weight layers are convolutional and are computed on the entire image. The last convolutional layer produces a bank of k2 position-sensitive score maps for each category, and thus has a k2(C + 1)-channel output layer with C object categories (+1 for background). The bank of k2 score maps correspond to a k × k spatial grid describing relative positions. For example, with k × k = 3 × 3, the 9 score maps encode the cases of {top-left, top-center, top-right, ..., bottom-right} of an object category. R-FCN ends with a position-sensitive RoI pooling layer. This layer aggregates the outputs of the last convolutional layer and generates scores for each RoI. Unlike [9, 7], our position-sensitive RoI layer conducts selective pooling, and each of the k × k bin aggregates responses from only one score map out of the bank of k × k score maps. With end-to-end training, this RoI layer shepherds the last convolutional layer to learn specialized position-sensitive score maps. Figure 1 illustrates this idea. Figure 3 and 4 visualize an example. The details are introduced as follows. Backbone architecture. The incarnation of R-FCN in this paper is based on ResNet-101 [10], though other networks [11, 24] are applicable. ResNet-101 has 100 convolutional layers followed by global average pooling and a 1000-class fc layer. We remove the average pooling layer and the fc layer and only use the convolutional layers to compute feature maps. We use the ResNet-101 released by the authors of [10], pre-trained on ImageNet [21]. The last convolutional block in ResNet-101 is 2048-d, and we attach a randomly initialized 1024-d 1×1 convolutional layer for reducing dimension (to be precise, this increases the depth in Table 1 by 1). Then we apply the k2(C + 1)-channel convolutional layer to generate score maps, as introduced next. Position-sensitive score maps & Position-sensitive RoI pooling. To explicitly encode position information into each RoI, we divide each RoI rectangle into k × k bins by a regular grid. For an RoI rectangle of a size w ×h, a bin is of a size ≈w k × h k [9, 7]. In our method, the last convolutional layer is constructed to produce k2 score maps for each category. Inside the (i, j)-th bin (0 ≤i, j ≤k −1), we define a position-sensitive RoI pooling operation that pools only over the (i, j)-th score map: rc(i, j | Θ) = X (x,y)∈bin(i,j) zi,j,c(x + x0, y + y0 | Θ)/n. (1) Here rc(i, j) is the pooled response in the (i, j)-th bin for the c-th category, zi,j,c is one score map out of the k2(C + 1) score maps, (x0, y0) denotes the top-left corner of an RoI, n is the number of pixels in the bin, and Θ denotes all learnable parameters of the network. The (i, j)-th bin spans ⌊i w k ⌋≤x < ⌈(i + 1) w k ⌉and ⌊j h k ⌋≤y < ⌈(j + 1) h k ⌉. The operation of Eqn.(1) is illustrated in Figure 1, where a color represents a pair of (i, j). Eqn.(1) performs average pooling (as we use throughout this paper), but max pooling can be conducted as well. 3 The k2 position-sensitive scores then vote on the RoI. In this paper we simply vote by averaging the scores, producing a (C + 1)-dimensional vector for each RoI: rc(Θ) = P i,j rc(i, j | Θ). Then we compute the softmax responses across categories: sc(Θ) = erc(Θ)/ PC c′=0 erc′(Θ). They are used for evaluating the cross-entropy loss during training and for ranking the RoIs during inference. We further address bounding box regression [8, 7] in a similar way. Aside from the above k2(C +1)-d convolutional layer, we append a sibling 4k2-d convolutional layer for bounding box regression. The position-sensitive RoI pooling is performed on this bank of 4k2 maps, producing a 4k2-d vector for each RoI. Then it is aggregated into a 4-d vector by average voting. This 4-d vector parameterizes a bounding box as t = (tx, ty, tw, th) following the parameterization in [7]. We note that we perform class-agnostic bounding box regression for simplicity, but the class-specific counterpart (i.e., with a 4k2C-d output layer) is applicable. The concept of position-sensitive score maps is partially inspired by [3] that develops FCNs for instance-level semantic segmentation. We further introduce the position-sensitive RoI pooling layer that shepherds learning of the score maps for object detection. There is no learnable layer after the RoI layer, enabling nearly cost-free region-wise computation and speeding up both training and inference. Training. With pre-computed region proposals, it is easy to end-to-end train the R-FCN architecture. Following [7], our loss function defined on each RoI is the summation of the cross-entropy loss and the box regression loss: L(s, tx,y,w,h) = Lcls(sc∗) + λ[c∗> 0]Lreg(t, t∗). Here c∗is the RoI’s ground-truth label (c∗= 0 means background). Lcls(sc∗) = −log(sc∗) is the cross-entropy loss for classification, Lreg is the bounding box regression loss as defined in [7], and t∗represents the ground truth box. [c∗> 0] is an indicator which equals to 1 if the argument is true and 0 otherwise. We set the balance weight λ = 1 as in [7]. We define positive examples as the RoIs that have intersection-over-union (IoU) overlap with a ground-truth box of at least 0.5, and negative otherwise. It is easy for our method to adopt online hard example mining (OHEM) [23] during training. Our negligible per-RoI computation enables nearly cost-free example mining. Assuming N proposals per image, in the forward pass, we evaluate the loss of all N proposals. Then we sort all RoIs (positive and negative) by loss and select B RoIs that have the highest loss. Backpropagation [12] is performed based on the selected examples. Because our per-RoI computation is negligible, the forward time is nearly not affected by N, in contrast to OHEM Fast R-CNN in [23] that may double training time. We provide comprehensive timing statistics in Table 3 in the next section. We use a weight decay of 0.0005 and a momentum of 0.9. By default we use single-scale training: images are resized such that the scale (shorter side of image) is 600 pixels [7, 19]. Each GPU holds 1 image and selects B = 128 RoIs for backprop. We train the model with 8 GPUs (so the effective mini-batch size is 8×). We fine-tune R-FCN using a learning rate of 0.001 for 20k mini-batches and 0.0001 for 10k mini-batches on VOC. To have R-FCN share features with RPN (Figure 2), we adopt the 4-step alternating training3 in [19], alternating between training RPN and training R-FCN. Inference. As illustrated in Figure 2, the feature maps shared between RPN and R-FCN are computed (on an image with a single scale of 600). Then the RPN part proposes RoIs, on which the R-FCN part evaluates category-wise scores and regresses bounding boxes. During inference we evaluate 300 RoIs as in [19] for fair comparisons. The results are post-processed by non-maximum suppression (NMS) using a threshold of 0.3 IoU [8], as standard practice. À trous and stride. Our fully convolutional architecture enjoys the benefits of the network modifications that are widely used by FCNs for semantic segmentation [16, 2]. Particularly, we reduce ResNet-101’s effective stride from 32 pixels to 16 pixels, increasing the score map resolution. All layers before and on the conv4 stage [10] (stride=16) are unchanged; the stride=2 operations in the first conv5 block is modified to have stride=1, and all convolutional filters on the conv5 stage are modified by the “hole algorithm” [16, 2] (“Algorithme à trous” [17]) to compensate for the reduced stride. For fair comparisons, the RPN is computed on top of the conv4 stage (that are shared with R-FCN), as is the case in [10] with Faster R-CNN, so the RPN is not affected by the à trous trick. The following table shows the ablation results of R-FCN (k × k = 7 × 7, no hard example mining). The à trous trick improves mAP by 2.6 points. 3Although joint training [19] is applicable, it is not straightforward to perform example mining jointly. 4 image and RoI position-sensitive score maps position-sensitive RoI-pool vote yes Figure 3: Visualization of R-FCN (k × k = 3 × 3) for the person category. no vote image and RoI position-sensitive score maps position-sensitive RoI-pool Figure 4: Visualization when an RoI does not correctly overlap the object. R-FCN with ResNet-101 on: conv4, stride=16 conv5, stride=32 conv5, à trous, stride=16 mAP (%) on VOC 07 test 72.5 74.0 76.6 Visualization. In Figure 3 and 4 we visualize the position-sensitive score maps learned by R-FCN when k × k = 3 × 3. These specialized maps are expected to be strongly activated at a specific relative position of an object. For example, the “top-center-sensitive” score map exhibits high scores roughly near the top-center position of an object. If a candidate box precisely overlaps with a true object (Figure 3), most of the k2 bins in the RoI are strongly activated, and their voting leads to a high score. On the contrary, if a candidate box does not correctly overlaps with a true object (Figure 4), some of the k2 bins in the RoI are not activated, and the voting score is low. 3 Related Work R-CNN [8] has demonstrated the effectiveness of using region proposals [28, 29] with deep networks. R-CNN evaluates convolutional networks on cropped and warped regions, and computation is not shared among regions (Table 1). SPPnet [9], Fast R-CNN [7], and Faster R-CNN [19] are “semiconvolutional”, in which a convolutional subnetwork performs shared computation on the entire image and another subnetwork evaluates individual regions. There have been object detectors that can be thought of as “fully convolutional” models. OverFeat [22] detects objects by sliding multi-scale windows on the shared convolutional feature maps; similarly, in Fast R-CNN [7] and [13], sliding windows that replace region proposals are investigated. In these cases, one can recast a sliding window of a single scale as a single convolutional layer. The RPN component in Faster R-CNN [19] is a fully convolutional detector that predicts bounding boxes with respect to reference boxes (anchors) of multiple sizes. The original RPN is class-agnostic in [19], but its class-specific counterpart is applicable (see also [15]) as we evaluate in the following. 5 Table 2: Comparisons among fully convolutional (or “almost” fully convolutional) strategies using ResNet-101. All competitors in this table use the à trous trick. Hard example mining is not conducted. method RoI output size (k × k) mAP on VOC 07 (%) naïve Faster R-CNN 1 × 1 61.7 7 × 7 68.9 class-specific RPN 67.6 R-FCN (w/o position-sensitivity) 1 × 1 fail R-FCN 3 × 3 75.5 7 × 7 76.6 Another family of object detectors resort to fully-connected (fc) layers for generating holistic object detection results on an entire image, such as [26, 4, 18]. 4 Experiments 4.1 Experiments on PASCAL VOC We perform experiments on PASCAL VOC [5] that has 20 object categories. We train the models on the union set of VOC 2007 trainval and VOC 2012 trainval (“07+12”) following [7], and evaluate on VOC 2007 test set. Object detection accuracy is measured by mean Average Precision (mAP). Comparisons with Other Fully Convolutional Strategies Though fully convolutional detectors are available, experiments show that it is nontrivial for them to achieve good accuracy. We investigate the following fully convolutional strategies (or “almost” fully convolutional strategies that have only one classifier fc layer per RoI), using ResNet-101: Naïve Faster R-CNN. As discussed in the introduction, one may use all convolutional layers in ResNet-101 to compute the shared feature maps, and adopt RoI pooling after the last convolutional layer (after conv5). An inexpensive 21-class fc layer is evaluated on each RoI (so this variant is “almost” fully convolutional). The à trous trick is used for fair comparisons. Class-specific RPN. This RPN is trained following [19], except that the 2-class (object or not) convolutional classifier layer is replaced with a 21-class convolutional classifier layer. For fair comparisons, for this class-specific RPN we use ResNet-101’s conv5 layers with the à trous trick. R-FCN without position-sensitivity. By setting k = 1 we remove the position-sensitivity of the R-FCN. This is equivalent to global pooling within each RoI. Analysis. Table 2 shows the results. We note that the standard (not naïve) Faster R-CNN in the ResNet paper [10] achieves 76.4% mAP with ResNet-101 (see also Table 3), which inserts the RoI pooling layer between conv4 and conv5 [10]. As a comparison, the naïve Faster R-CNN (that applies RoI pooling after conv5) has a drastically lower mAP of 68.9% (Table 2). This comparison empirically justifies the importance of respecting spatial information by inserting RoI pooling between layers for the Faster R-CNN system. Similar observations are reported in [20]. The class-specific RPN has an mAP of 67.6% (Table 2), about 9 points lower than the standard Faster R-CNN’s 76.4%. This comparison is in line with the observations in [7, 13] — in fact, the class-specific RPN is similar to a special form of Fast R-CNN [7] that uses dense sliding windows as proposals, which shows inferior results as reported in [7, 13]. On the other hand, our R-FCN system has significantly better accuracy (Table 2). Its mAP (76.6%) is on par with the standard Faster R-CNN’s (76.4%, Table 3). These results indicate that our positionsensitive strategy manages to encode useful spatial information for locating objects, without using any learnable layer after RoI pooling. The importance of position-sensitivity is further demonstrated by setting k = 1, for which R-FCN is unable to converge. In this degraded case, no spatial information can be explicitly captured within an RoI. Moreover, we report that naïve Faster R-CNN is able to converge if its RoI pooling output resolution is 1 × 1, but the mAP further drops by a large margin to 61.7% (Table 2). 6 Table 3: Comparisons between Faster R-CNN and R-FCN using ResNet-101. Timing is evaluated on a single Nvidia K40 GPU. With OHEM, N RoIs per image are computed in the forward pass, and 128 samples are selected for backpropagation. 300 RoIs are used for testing following [19]. depth of per-RoI subnetwork training w/ OHEM? train time (sec/img) test time (sec/img) mAP (%) on VOC07 Faster R-CNN 10 1.2 0.42 76.4 R-FCN 0 0.45 0.17 76.6 Faster R-CNN 10 ✓(300 RoIs) 1.5 0.42 79.3 R-FCN 0 ✓(300 RoIs) 0.45 0.17 79.5 Faster R-CNN 10 ✓(2000 RoIs) 2.9 0.42 N/A R-FCN 0 ✓(2000 RoIs) 0.46 0.17 79.3 Table 4: Comparisons on PASCAL VOC 2007 test set using ResNet-101. “Faster R-CNN +++” [10] uses iterative box regression, context, and multi-scale testing. training data mAP (%) test time (sec/img) Faster R-CNN [10] 07+12 76.4 0.42 Faster R-CNN +++ [10] 07+12+COCO 85.6 3.36 R-FCN 07+12 79.5 0.17 R-FCN multi-sc train 07+12 80.5 0.17 R-FCN multi-sc train 07+12+COCO 83.6 0.17 Table 5: Comparisons on PASCAL VOC 2012 test set using ResNet-101. “07++12” [7] denotes the union set of 07 trainval+test and 12 trainval. †: http://host.robots.ox.ac.uk:8080/anonymous/44L5HI.html ‡: http://host.robots.ox.ac.uk:8080/anonymous/MVCM2L.html training data mAP (%) test time (sec/img) Faster R-CNN [10] 07++12 73.8 0.42 Faster R-CNN +++ [10] 07++12+COCO 83.8 3.36 R-FCN multi-sc train 07++12 77.6† 0.17 R-FCN multi-sc train 07++12+COCO 82.0‡ 0.17 Comparisons with Faster R-CNN Using ResNet-101 Next we compare with standard “Faster R-CNN + ResNet-101” [10] which is the strongest competitor and the top-performer on the PASCAL VOC, MS COCO, and ImageNet benchmarks. We use k × k = 7 × 7 in the following. Table 3 shows the comparisons. Faster R-CNN evaluates a 10-layer subnetwork for each region to achieve good accuracy, but R-FCN has negligible per-region cost. With 300 RoIs at test time, Faster R-CNN takes 0.42s per image, 2.5× slower than our R-FCN that takes 0.17s per image (on a K40 GPU; this number is 0.11s on a Titan X GPU). R-FCN also trains faster than Faster R-CNN. Moreover, hard example mining [23] adds no cost to R-FCN training (Table 3). It is feasible to train R-FCN when mining from 2000 RoIs, in which case Faster R-CNN is 6× slower (2.9s vs. 0.46s). But experiments show that mining from a larger set of candidates (e.g., 2000) has no benefit (Table 3). So we use 300 RoIs for both training and inference in other parts of this paper. Table 4 shows more comparisons. Following the multi-scale training in [9], we resize the image in each training iteration such that the scale is randomly sampled from {400,500,600,700,800} pixels. We still test a single scale of 600 pixels, so add no test-time cost. The mAP is 80.5%. In addition, we train our model on the MS COCO [14] trainval set and then fine-tune it on the PASCAL VOC set. R-FCN achieves 83.6% mAP (Table 4), close to the “Faster R-CNN +++” system in [10] that uses ResNet-101 as well. We note that our competitive result is obtained at a test speed of 0.17 seconds per image, 20× faster than Faster R-CNN +++ that takes 3.36 seconds as it further incorporates iterative box regression, context, and multi-scale testing [10]. These comparisons are also observed on the PASCAL VOC 2012 test set (Table 5). On the Impact of Depth The following table shows the R-FCN results using ResNets of different depth [10], as well as the VGG-16 model [24]. For VGG-16 model, the fc layers (fc6, fc7) are turned into sliding convolutional layers, and a 1 × 1 convolutional layer is applied on top to generate the position-sensitive score 7 maps. R-FCN with VGG-16 achieves slightly lower than that of ResNet-50. Our detection accuracy increases when the depth is increased from 50 to 101 in ResNet, but gets saturated with a depth of 152. training data test data VGG-16 ResNet-50 ResNet-101 ResNet-152 R-FCN 07+12 07 75.6 77.0 79.5 79.6 R-FCN multi-sc train 07+12 07 76.5 78.7 80.5 80.4 On the Impact of Region Proposals R-FCN can be easily applied with other region proposal methods, such as Selective Search (SS) [28] and Edge Boxes (EB) [29]. The following table shows the results (using ResNet-101) with different proposals. R-FCN performs competitively using SS or EB, showing the generality of our method. training data test data RPN [19] SS [28] EB [29] R-FCN 07+12 07 79.5 77.2 77.8 4.2 Experiments on MS COCO Next we evaluate on the MS COCO dataset [14] that has 80 object categories. Our experiments involve the 80k train set, 40k val set, and 20k test-dev set. We set the learning rate as 0.001 for 90k iterations and 0.0001 for next 30k iterations, with an effective mini-batch size of 8. We extend the alternating training [19] from 4-step to 5-step (i.e., stopping after one more RPN training step), which slightly improves accuracy on this dataset when the features are shared; we also report that 2-step training is sufficient to achieve comparably good accuracy but the features are not shared. The results are in Table 6. Our single-scale trained R-FCN baseline has a val result of 48.9%/27.6%. This is comparable to the Faster R-CNN baseline (48.4%/27.2%), but ours is 2.5× faster testing. It is noteworthy that our method performs better on objects of small sizes (defined by [14]). Our multi-scale trained (yet single-scale tested) R-FCN has a result of 49.1%/27.8% on the val set and 51.5%/29.2% on the test-dev set. Considering COCO’s wide range of object scales, we further evaluate a multi-scale testing variant following [10], and use testing scales of {200,400,600,800,1000}. The mAP is 53.2%/31.5%. This result is close to the 1st-place result (Faster R-CNN +++ with ResNet-101, 55.7%/34.9%) in the MS COCO 2015 competition. Nevertheless, our method is simpler and adds no bells and whistles such as context or iterative box regression that were used by [10], and is faster for both training and testing. Table 6: Comparisons on MS COCO dataset using ResNet-101. The COCO-style AP is evaluated @ IoU ∈[0.5, 0.95]. AP@0.5 is the PASCAL-style AP evaluated @ IoU = 0.5. training data test data AP@0.5 AP AP small AP medium AP large test time (sec/img) Faster R-CNN [10] train val 48.4 27.2 6.6 28.6 45.0 0.42 R-FCN train val 48.9 27.6 8.9 30.5 42.0 0.17 R-FCN multi-sc train train val 49.1 27.8 8.8 30.8 42.2 0.17 Faster R-CNN +++ [10] trainval test-dev 55.7 34.9 15.6 38.7 50.9 3.36 R-FCN trainval test-dev 51.5 29.2 10.3 32.4 43.3 0.17 R-FCN multi-sc train trainval test-dev 51.9 29.9 10.8 32.8 45.0 0.17 R-FCN multi-sc train, test trainval test-dev 53.2 31.5 14.3 35.5 44.2 1.00 5 Conclusion and Future Work We presented Region-based Fully Convolutional Networks, a simple but accurate and efficient framework for object detection. Our system naturally adopts the state-of-the-art image classification backbones, such as ResNets, that are by design fully convolutional. Our method achieves accuracy competitive with the Faster R-CNN counterpart, but is much faster during both training and inference. We intentionally keep the R-FCN system presented in the paper simple. There have been a series of orthogonal extensions of FCNs that were developed for semantic segmentation (e.g., see [2]), as well as extensions of region-based methods for object detection (e.g., see [10, 1, 23]). We expect our system will easily enjoy the benefits of the progress in the field. 8 References [1] S. Bell, C. L. Zitnick, K. Bala, and R. Girshick. Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks. In CVPR, 2016. [2] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [3] J. Dai, K. He, Y. Li, S. Ren, and J. Sun. Instance-sensitive fully convolutional networks. arXiv:1603.08678, 2016. [4] D. Erhan, C. Szegedy, A. Toshev, and D. Anguelov. Scalable object detection using deep neural networks. In CVPR, 2014. [5] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes (VOC) Challenge. IJCV, 2010. [6] S. Gidaris and N. Komodakis. Object detection via a multi-region & semantic segmentation-aware cnn model. In ICCV, 2015. [7] R. Girshick. Fast R-CNN. In ICCV, 2015. [8] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. [9] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In ECCV. 2014. [10] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [11] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [12] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1989. [13] K. Lenc and A. Vedaldi. R-CNN minus R. In BMVC, 2015. [14] 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. [15] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, and S. Reed. SSD: Single shot multibox detector. arXiv:1512.02325v2, 2015. [16] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [17] S. Mallat. A wavelet tour of signal processing. Academic press, 1999. [18] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. In CVPR, 2016. [19] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. [20] S. Ren, K. He, R. Girshick, X. Zhang, and J. Sun. Object detection networks on convolutional feature maps. arXiv:1504.06066, 2015. [21] 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, 2015. [22] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. In ICLR, 2014. [23] A. Shrivastava, A. Gupta, and R. Girshick. Training region-based object detectors with online hard example mining. In CVPR, 2016. [24] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [25] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. [26] C. Szegedy, A. Toshev, and D. Erhan. Deep neural networks for object detection. In NIPS, 2013. [27] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. [28] J. R. Uijlings, K. E. van de Sande, T. Gevers, and A. W. Smeulders. Selective search for object recognition. IJCV, 2013. [29] C. L. Zitnick and P. Dollár. Edge boxes: Locating object proposals from edges. In ECCV, 2014. 9 | 2016 | 206 |
6,113 | Exploiting Tradeoffs for Exact Recovery in Heterogeneous Stochastic Block Models Amin Jalali Department of Electrical Engineering University of Washington Seattle, WA 98195 amjalali@uw.edu Qiyang Han Department of Statistics University of Washington Seattle, WA 98195 royhan@uw.edu Ioana Dumitriu Department of Mathematics University of Washington Seattle, WA 98195 dumitriu@uw.edu Maryam Fazel Department of Electrical Engineering University of Washington Seattle, WA 98195 mfazel@uw.edu Abstract The Stochastic Block Model (SBM) is a widely used random graph model for networks with communities. Despite the recent burst of interest in community detection under the SBM from statistical and computational points of view, there are still gaps in understanding the fundamental limits of recovery. In this paper, we consider the SBM in its full generality, where there is no restriction on the number and sizes of communities or how they grow with the number of nodes, as well as on the connectivity probabilities inside or across communities. For such stochastic block models, we provide guarantees for exact recovery via a semidefinite program as well as upper and lower bounds on SBM parameters for exact recoverability. Our results exploit the tradeoffs among the various parameters of heterogenous SBM and provide recovery guarantees for many new interesting SBM configurations. 1 Introduction A fundamental problem in network science and machine learning is to discover structures in large, complex networks (e.g., biological, social, or information networks). Community or cluster detection underlies many decision tasks, as a basic step that uses pairwise relations between data points in order to understand more global structures in the data. Applications include recommendation systems [27], image segmentation [24, 20], learning gene network structures in bioinformatics, e.g., in protein detection [9] and population genetics [17]. In spite of a long history of heuristic algorithms (see, e.g., [18] for an empirical overview), as well as strong research interest in recent years on the theoretical side as briefly reviewed in the sequel, there are still gaps in understanding the fundamental information theoretic limits of recoverability (i.e., if there is enough information to reveal the communities) and computational tractability (if there are efficient algorithms to recover them). This is particularly true in the case of sparse graphs (that test the limits of recoverability), graphs with heterogeneous communities (communities varying greatly in size and connectivity), graphs with a number of communities that grows with the number of nodes, and partially observed graphs (with various observation models). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 1.1 Exact Recovery for Heterogenous Stochastic Block Model The stochastic block model (SBM), first introduced and studied in mathematical sociology by Holland, Laskey and Leinhardt in 1983 [16], can be described as follows. Consider n vertices partitioned into r communities V1, V2, . . . , Vr , of sizes n1, n2, . . . , nr. We endow the kth community with an Erd˝os-Rényi random graph model G(nk, pk) and draw an edge between pairs of nodes in different communities independently with probability q; i.e., for any pair of nodes i and j , if i, j ∈Vk for some k ∈{1, . . . , r} we draw an edge with probability pk, and draw an edge with probability q if they are in different communities. We assume q < mink pk in order for the idea of communities to make sense. This defines a distribution over random graphs known as the stochastic block model. In this paper, we assume the above model while allowing the number of communities to grow with the number of nodes (similar to [13, 15, 23]). We refer to this model as the heterogeneous stochastic block model to contrast our study of this general setting with previous works on special cases of SBM such as 1) homogenous SBM where the communities are equivalent (they are of the same size and the connectivity probabilities are equal,) e.g., [12], or, 2) SBM with linear-sized communities, where the number of communities is fixed and all community sizes are O(n); e.g., [1]. 1.2 Statistical and Computational Regimes What we can infer about the community structure from a single draw of the random graph varies based on the regime of model parameters. Often, the following scenarios are considered. 1. Recovery, where the proportion of misclassified nodes is negligible; either 0 (corresponding to exact recovery with strong consistency, and considered in [12, 1]) or asymptotically 0 (corresponding to exact recovery with weak consistency as considered in [23, 22, 28]) as the number of nodes grows. 2. Approximation, where a finite fraction (bounded away from 1) of the vertices is recovered. This regime was first introduced in [13, 14], and has been considered in many other works since then; e.g., see [15] and references therein. Both recovery and approximation can be studied from statistical and computational points of view. Statistically, one can ask about the parameter regimes for which the model can be recovered or approximated. Such characterizations are specially important when an information-theoretical lower bound (below which recovery is not possible with high probability) is shown to be achievable with an algorithm (with high probability), hence characterizing a phase transition in model parameters. Recently, there has been significant interest in identifying such sharp thresholds for various parameter regimes. Computationally, one might be interested to study algorithms for recovery or approximation. In the older approach, algorithms were studied to provide upper bounds on the parameter regimes for recovery or approximation. See [10] or [1, Section 5] for a summary of such results. More recently, the paradigm has shifted towards understanding the limitations and strengths of tractable methods (e.g. see [21] on semidefinite programming based methods) and assessing whether successful retrieval can be achieved by tractable algorithms at the sharp statistical thresholds or there is a gap. So far, it is understood that there is no such gap in the case of exact recovery (weak and strong) and approximation of binary SBM as well as the exact recovery of linear-sized communities [1]. However, this is still an open question for more general cases; e.g., see [2] and the list of unresolved conjectures therein. The statistical-computational picture for SBM with only two equivalent communities has been fully characterized in a series of recent papers. Apart from the binary SBM, the best understood cases are where there is a finite number r of equivalent or linear-sized communities. Outside of the settings described above, the full picture has not yet emerged and many questions are unresolved. 1.3 This paper The community detection problem studied in this paper is stated as: given the adjacency matrix of a graph generated by the heterogenous stochastic block model, for what SBM parameters we can recover the labels of all vertices, with high probability, using an algorithm that has been proved to do so. We consider a convex program in (2.4) and an estimator similar to the maximum likelihood 2 estimator in (2.5) and characterize parts of the model space for which exact recovery is possible via these algorithms. Theorems 1 and 2 provide sufficient conditions for the convex recovery program and Theorem 3 provides sufficient conditions for the modified maximum likelihood estimator to exactly recover the underlying model. In Section 2.3, we extend the above bounds to the case of partial observations, i.e., when each entry of the matrix is observed uniformly at random with some probability γ and the results are recorded. We also provide an information-theoretic lower bound, describing an impossibility regime for exact recovery in heterogenous SBM in Theorem 4. All of our results only hold with high probability, as this is the best one can hope for; with tiny probability the model can generate graphs like the complete graph where the partition is unrecoverable. The results of this paper provide a clear improvement in the understanding of stochastic block models by exploiting tradeoffs among SBM parameters. We identify a key parameter (or summary statistic), defined in (2.1) and referred to as relative density, which shows up in our results and provides improvements in the statistical assessment and efficient computational approaches for certain configurations of heterogenous SBM; examples are given in in Section 3 to illustrate a number of such beneficial tradeoffs such as • semidefinite programming can successfully recover communities of size O(√log n) under mild conditions on other communities (see Example 3 for details) while log n has long been believed to be the threshold for the smallest community size. • The sizes of the communities can be very spread, or the inter- and intra-community probabilities can be very close, and the model still be efficiently recoverable, while existing methods (e.g., peeling strategy [3]) providing false negatives. While these results are a step towards understanding the information-computational picture about the heterogenous SBM with a growing number of communities, we cannot comment on phase transitions or a possible information-computational gap (see Section 1.2) in this setup based on the results of this paper. 2 Main Results Consider the heterogenous stochastic block model described above. In the proofs, we can allow for isolated nodes (communities of size 1) which are omitted from the model here to simplify the presentation. Denote by Y the set of admissible adjacency matrices according to a community assignment as above, i.e., Y := {Y ∈{0, 1}n×n : Y is a valid community matrix w.r.t. V1, . . . , Vr where |Vk| = nk} . Define the relative density of community k as ρk = (pk −q)nk (2.1) which can be seen as the increase in the average degree of a node in community k in the SBM, relative to its average degree in an Erd˝os-Rényi model. Define nmin and nmax as the minimum and maximum of n1, . . . , nk respectively. The total variance over the kth community is defined as σ2 k = nkpk(1 −pk) , and we let σ2 0 = nq(1 −q) . Moreover, consider σ2 max = max k=1,...,r σ2 k = max k=1,...,r nkpk(1 −pk) . (2.2) A Bernoulli random variable with parameter p is denoted by Ber(p) , and a Binomial random variable with parameters n and p is denoted by Bin(n, p) . The Neyman Chi-square divergence between the two discrete random variables Ber(p) and Ber(q) is given by eD(p, q) := (p −q)2 q(1 −q) (2.3) and we have eD(p, q) ≥DKL(p, q) := DKL(Ber(p), Ber(q)) . Chi-square divergence is an instance of a more general family of divergence functions called f-divergences or Ali-Silvey distances. This family also has KL-divergence, total variation distance, Hellinger distance and Chernoff distance as special cases. Moreover, the divergence used in [1] is an f-divergence. Lastly, log denotes the natural logarithm (base e), and the notation θ ≳1 is equivalent to θ ≥O(1) . 3 2.1 Convex Recovery Inspired by the success of semidefinite programs in community detection (e.g., see [15, 21]) we consider a natural convex relaxation of the maximum likelihood estimator, similar to the one used in [12], for exact recovery of the heterogeneous SBM with a growing number of communities. Assuming that ζ = Pr k=1 n2 k is known, we solve ˆY = arg max Y P i,j AijYij subject to ∥Y ∥⋆≤n , P i,j Yij = ζ , 0 ≤Yij ≤1 . (2.4) where ∥· ∥⋆denotes the nuclear norm (the sum of singular values of the matrix). We prove two theorems giving conditions under which the above convex program outputs the true community matrix with high probability. In establishing these performance guarantees, we follow the standard dual certificate argument in convex analysis while utilizing strong matrix concentration results from random matrix theory [8, 25, 26, 5]. These results allow us to bound the spectral radius of the matrix A −E[A] where A is an instance of adjacency matrix generated under heterogenous SBM. The proofs for both theorems along with the matrix concentration bounds are given in Appendix A. Theorem 1 Under the heterogenous stochastic block model, the output of the semidefinite program in (2.4) coincides with Y ⋆with high probability, provided that ρ2 k ≳σ2 k log nk , eD(pmin, q) ≳log nmin nmin , ρ2 min ≳max{σ2 max, nq(1 −q), log n} and Pr k=1 n−α k = o(1) for some α > 0 . Proof Sketch. For Y ⋆to be the unique solution of (2.4), we need to show that for any feasible Y ̸= Y ⋆, the following quantity ⟨A, Y ⋆−Y ⟩= ⟨E[A], Y ⋆−Y ⟩+ ⟨A −E[A], Y ⋆−Y ⟩ is strictly positive. In bounding the second term above, we make use of the constraint ∥Y ∥⋆≤n = ∥Y ⋆∥⋆by constructing a dual certificate from A −E[A] . This is where the bounds on the spectral norm (dual norm for the nuclear norm) of A −E[A] enter and we use matrix concentration bounds (see Lemma 7 in Appendix A). The first condition of Theorem 1 is equivalent to each community being connected, second condition ensures that each community is identifiable (pmin −q is large enough), and the third condition requires minimal density to dominate global variability. The assumption Pr k=1 n−α k = o(1) is tantamount to saying that the number of tiny communities cannot be too large (e.g., the number of polylogarithmic-size communities cannot be a power of n). In other words, one needs to have mostly large communities (growing like nǫ, for some ǫ > 0) for this assumption to be satisfied. Note, however, that the condition does not restrict the number of communities of size nǫ for any fixed ǫ > 0 . In fact, Theorem 1 allows us to describe a regime in which tiny communities of size O(√log n) are recoverable provided that they are very dense and that only few tiny or small communities exist; see Example 3. The second theorem imposes more stringent conditions on the relative density, hence only allowing for communities of size down to log n , but relaxes the condition that only a small number of nodes can be in small communities. Theorem 2 Under the heterogenous stochastic block model, the output of the semidefinite program in (2.4) coincides with Y ⋆, with high probability, provided that ρ2 k ≳σ2 k log n , eD(pmin, q) ≳log n nmin , ρ2 min ≳max{σ2 max , nq(1 −q)} . The proof of Theorem 2 is similar to the proof of Theorem 1 except that we use a different matrix concentration bound (see Lemma 10 in Appendix A). 2.2 Recoverability Lower and Upper Bounds Next, we consider an estimator, inspired by maximum likelihood estimation, and identify a subset of the model space which is exactly recoverable via this estimator. The proposed estimation approach 4 is not computationally tractable and is only used to examine the conditions for which exact recovery is possible. For a fixed Y ∈Y and an observed matrix A , the likelihood function is given by PY (A) = Y i<j pAijYij τ(i,j) (1 −pτ(i,j))(1−Aij)YijqAij(1−Yij)(1 −q)(1−Aij)(1−Yij), where τ : {1, . . ., n}2 →{1, . . ., r} and τ(i, j) = k if and only if i, j ∈Vk , and arbitrary in {1, . . . , r} otherwise. The log-likelihood function is given by log PY (A) = X i<j log (1 −q)pτ(i,j) q(1 −pτ(i,j))AijYij + X i<j log 1 −pτ(i,j) 1 −q Yij + terms not involving {Yij}. Maximizing the log-likelihood involves maximizing a weighted sum of {Yij}’s where the weights depend on the (usually unknown) values of q, p1, . . . , pr . To be able to work with less information, we will use the following modification of maximum likelihood estimation, which only uses the knowledge of n1, . . . , nr , ˆY = arg max Y ∈Y n X i,j=1 AijYij . (2.5) Theorem 3 Suppose nmin ≥2 and n ≥8 . Under the heterogenous stochastic block model, if ρmin ≥4(17 + η) 1 3 + pmin(1 −pmin) + q(1 −q) pmin −q log n , for some choice of η > 0 , then the optimal solution ˆY of the non-convex recovery program in (2.5) coincides with Y ⋆, with a probability not less than 1 −7 pmax−q pmin−q n2−η . Notice that ρmin = mink=1,...,r nk(pk −q) and pmin = mink=1,...,r pk do not necessarily correspond to the same community. Similar to the proof of Theorem 1, we establish ⟨A, Y ⋆−Y ⟩> 0 for any Y ∈Y, while this time, we use a counting argument (see Lemma 11 in Appendix B) similar to the one in [12]. The proofs for this Theorem and the next one are given in Appendix B. Finally, to provide a better picture of community detection for heterogenous SBM we provide the following necessary conditions for exact recovery. Notice that Theorems 1 and 2 require eD(q, pk) (in their first condition) and eD(pk, q) (in their second condition) to be bounded from below for recoverability by the SDP. Similarly, the conditions of Theorem 4 can be seen as average-case and worst-case upper bounds on these divergences. Theorem 4 If any of the following conditions holds, (1) 2 ≤nk ≤n/e , and 4 Pr k=1 n2 k eD(pk, q) ≤1 2 P k nk log n nk −r −2 (2) n ≥128 , r ≥2 and maxk nk eD(pk, q) + nk eD(q, pk) ≤ 1 12 log(n −nmin) then inf ˆY supY ⋆∈Y P[ ˆY ̸= Y ⋆] ≥1 2 where the infimum is taken over all measurable estimators ˆY based on the realization A generated according to the heterogenous stochastic block model. 2.3 Partial Observations In the general stochastic block model, we assume that the entries of a symmetric adjacency matrix A ∈{0, 1}n×n have been generated according to a combination of Erd˝os-Rényi models with parameters that depend on the true community matrix. In the case of partial observations, we assume that the entries of A has been observed independently with probability γ . In fact, every entry of the input matrix falls into one of these categories: observed as one denoted by Ω1, observed as zero denoted by Ω0, and unobserved which corresponds to Ωc where Ω= Ω0 ∪Ω1 . If an estimator only takes the observed part of the matrix as the input, one can revise the underlying probabilistic model to incorporate both the stochastic block model and the observation model; i.e. a revised distribution for entries of A as Aij = Ber(γpk) i, j ∈Vk for some k Ber(γq) i ∈Vk and j ∈Vl for k ̸= l . 5 yields the same output from an estimator that only takes in the observed values. Therefore, the estimators in (2.4) and (2.5), as well as the results of Theorems 1, 2, 3, can be easily adapted to the case of partially observed graphs. It is worth mentioning that the above model for partially observed SBM (which is another SBM) is different from another random model known as Censored Block Model (CBM) [4]. In SBM, absence of an edge provides information, whereas in CBM it does not. 3 Tradeoffs in Heterogenous SBM As it can be seen from the results presented in this paper, and the main summary statistics they utilize (the relative densities ρ1, . . . , ρr), the parameters of SBM can vary significantly and still satisfy the same recoverability conditions. In the following, we examine a number of such tradeoffs which leads to recovery guarantees for interesting SBM configurations. Here, a configuration is a list of community sizes nk, their connectivity probabilities pk, and the inter-community connectivity probability q . A triple (m, p, k) represents k communities of size m each, with connectivity parameter p . We do not worry about whether m and k are always integers; if they are not, one can always round up or down as needed so that the total number of vertices is n, without changing the asymptotics. Moreover, when the O(·) notation is used, we mean that appropriate constants can be determined. A detailed list of computations for the examples in this section are given in Appendix D. Table 1: A summary of examples in Section 3. Each row gives the important aspect of the corresponding example as well as whether, under appropriate regimes of parameters, it would satisfy the conditions of the theorems proved in this paper. convex recovery convex recovery recoverability importance by Thm. 1 by Thm. 2 by Thm. 3 Ex. 1 {ρk} instead of (pmin, nmin) × × ✓ Ex. 2 stronger guarantees for convex recovery ✓ ✓ ✓ Ex. 3 nmin = √log n ✓ × × Ex. 4 many small communities, nmax = O(n) ✓ ✓ ✓ Ex. 5 nmin = O(log n), spread in sizes × ✓ ✓ Ex. 6 small pmin −q ✓ ✓ ✓ Better Summary Statistics. It is intuitive that using summary statistics such as (pmin, nmin), for a heterogenous SBM where nk’s and pk’s are allowed to take very different values, can be very limiting. Examples 1 and 2 are intended to give configurations that are guaranteed to be recoverable by our results but fail the existing recoverability conditions in the literature. Example 1 Suppose we have two communities of sizes n1 = n −√n, n2 = √n, with p1 = n−2/3 and p2 = 1/ log n while q = n−2/3−0.01 . The bound we obtain here in Theorem 3 makes it clear that this case is theoretically solvable (the modified maximum likelihood estimator successfully recovers it). By contrast, Theorem 3.1 in [7] (specialized for the case of no outliers), requiring n2 min(pmin −q)2 ≳(√pminnmin + √nq)2 log n , (3.1) would fail and provide no guarantee for recoverability. Example 2 Consider a configuration as (n −n2/3, n−1/3+ǫ, 1) , (√n, O( 1 log n), n1/6) , q = n−2/3+3ǫ where ǫ is a small quantity, e.g., ǫ = 0.1 . Either of Theorems 1 and 2 certify this case as recoverable via the semidefinite program (2.4) with high probability. By contrast, using the pmin = n−1/3+ǫ and nmin = √n heuristic, neither the condition of Theorem 3.1 in [7] (given in (3.1)) nor the condition of Theorem 2.5 in [12] is fulfilled, hence providing no recovery guarantee for this configuration. 3.1 Small communities can be efficiently recovered Most algorithms for clustering the SBM run into the problem of small communities [11, 6, 19], often because the models employed do not allow for enough parameter variation to identify the key quantities involved. The next three examples attempt to provide an idea of how small the community 6 sizes can be, how many small communities are allowed, and how wide the spread of community sizes can be, as characterized by our results. Example 3 (smallest community size for convex recovery) Consider a configuration as ( p log n, O(1), m) , (n2, O( log n √n ), √n) , q = O( log n n ) where n2 = √n −m p log n/n to ensure a total of n vertices. Here, we assume m ≤n/(2√log n) which implies n2 ≥√n/2 . It is straightforward to verify the conditions of Theorem 1. To our knowledge, this is the first example in the literature for which semidefinite programming based recovery works and allows the recovery of (a few) communities of size smaller than log n. Previously, log n was considered to be the standard bound on the community size for exact recovery, as illustrated by Theorem 2.5 of [12] in the case of equivalent communities. We have thus shown that it is possible, in the right circumstances (when sizes are spread and the smaller the community the denser it is), to recover very small communities (up to √log n size), if there are just a few of them (at most polylogarithmic in n). The significant improvement we made in the bound on the size of the smallest community is due to the fact that we were able to perform a closer analysis of the semidefinite program by utilizing stronger matrix concentration bounds, mainly borrowed from [8, 25, 26, 5]. For more details, see Appendix A.2. Notice that the condition of Theorem 3 is not satisfied. This is not an inconsistency (as Theorem 3 gives only an upper bound for the threshold), but indicates the limitation of this theorem in characterizing all recoverable cases. Spreading the sizes. As mentioned before, while Theorem 1 allows for going lower than the standard log n bound on the community size for exact recovery, it requires the number of very small communities to be relatively small. On the other hand, Theorem 2 provides us with the option of having many small communities but requires the smallest community to be of size O(log n) . We explore two cases with many small communities in the following. Example 4 Consider a configuration where small communities are dense and there is one big community, ( 1 2nǫ, O(1), n1−ǫ) , ( 1 2n, n−α log n, 1) , q = O(n−β log n) with 0 < ǫ < 1 and 0 < α < β < 1. We are interested to see how large the number of small communities can be. Then the conditions of Theorems 1 and 2 both require that 1 2(1 −α) < ǫ < 2(1 −α) , ǫ > 2α −β (3.2) and are depicted in Figure 1. Since we have not specified the constants in our results, we only consider strict inequalities. 2α + ǫ = 2 α + 2ǫ = 1 2α = β + ǫ α 0 0.25 0.5 0.75 β 0 1/3 2/3 1 ǫ 0 0.2 0.4 0.6 0.8 1 Figure 1: The space of parameters in Equation (3.2). The face defined by β = α is shown with dotted edges. The three gray faces in the back correspond to β = 1 , α = 0 and ǫ = 1. The green plane (corresponding to the last condition in (3.2)) comes from controlling the intracommunity interactions uniformly (interested reader is referred to Equations (A.8) and (A.9) in the supplement material) which might be only an artifact of our proof and can be possibly improved. Notice that the small communities are as dense as can be, but the large one is not necessarily very dense. By picking ǫ to be just over 1/4, we can make α just shy of 1/2, and β very close to 1. As 7 far as we can tell, there are no results in the literature surveyed that cover such a case, although the clever “peeling” strategy introduced in [3] would recover the largest community. The strongest result in [3] that seems applicable here is Corollary 4 (which works for non-constant probabilities). The algorithm in [3] works to recover a large community (larger than O(√n log2 n)), subject to existence of a gap in the community sizes (roughly, there should be no community sizes between O(√n) and O(√n log2 n)). Therefore, in this example, after a single iteration, the algorithm will stop, despite the continued existence of a gap, as there is no community with size above the gap. Hence the “peeling” strategy on this example would fail to recover all the communities. Example 5 Consider a configuration with many small dense communities of size log n . We are interested to see how large the spread of community sizes can be for the semidefinite program to work. As required by Theorems 1 and 2 and to control σmax (defined in (2.2)), the larger a community the smaller its connectivity probability should be; therefore we choose the largest community at the threshold of connectivity (required for recovery). Consider the community sizes and probabilities: (log n, O(1), n/log n −m p n/log n) , ( p n log n, O( p (log n)/n), m) , q = O((log n)/n) where m is a constant. Again, we round up or down where necessary to make sure the sizes are integers and the total number of vertices is n. All the conditions of Theorem 2 are satisfied and exact convex recovery is possible via the semidefinite program. Note that the last condition of Theorem 1 is not satisfied since there are too many small communities. Also note that alternative methods proposed in the literature surveyed would not be applicable; in particular, the gap condition in [3] is not satisfied for this case from the start. 3.2 Weak communities are efficiently recoverable The following examples illustrate how small pmin −q can be in order for the recovery, respectively, the convex recovery algorithms to still be guaranteed to work. When some pk is very close to q , the Erd˝os-Rényi model G(nk, pk) looks very similar to the ambient edges from G(n, q) . Again, we are going to exploit the possible tradeoffs in the parameters of SBM to guarantee recovery. Note that the difference in pmin −q for the two types of recovery is noticeable, indicating that there is a significant difference between what we know to be recoverable and what we can recover efficiently by our convex method. We consider both dense graphs (where pmin is O(1)) and sparse ones. Example 6 Consider a configuration where all of the probabilities are O(1) and (n1, pmin, 1) , (nmin, p2, 1) , (n3, p3, n−n1−nmin n3 ) , q = O(1) where p2 −q and p3 −q are O(1) . On the other hand, we assume pmin −q = f(n) is small. For recoverability by Theorem 3, we need f(n) ≳(log n)/nmin and f 2(n) ≳(log n)/n1 . Notice that, since n ≳n1 ≳nmin , we should have f(n) ≳ p log n/n . For the convex program to recover this configuration (by Theorem 1 or 2), we need nmin ≳√n and f 2(n) ≳max{n/n2 1 , log n/nmin} , while all the probabilities are O(1) . Note that if all the probabilities, as well as pmin −q , are O(1), then by Theorem 3 all communities down to a logarithmic size should be recoverable. However, the success of convex recovery is guaranteed by Theorems 1 and 2 when nmin ≳√n . For a similar configuration to Example 6, where the probabilities are not O(1) , recoverability by Theorem 3 requires f(n) ≳max{ p pmin(log n)/n , n−c} for some appropriate c > 0 . 4 Discussion We have provided a series of extensions to prior works (especially [12, 1]) by considering the exact recovery for stochastic block model in its full generality with a growing number of communities. By capturing the tradeoffs among the various parameters of SBM, we have identified interesting SBM configurations that are efficiently recoverable via semidefinite programs. However there are still interesting problems that remain open. Sharp thresholds for recovery or approximation of heterogenous SBM, models for partial observation (non-uniform, based on prior information, or adaptive as in [28]), as well as overlapping communities (e.g., [1]) are important future directions. Moreover, other estimators similar to the ones considered in this paper can be analyzed; e.g. when the unknown parameters in the maximum likelihood estimator, or ζ in (2.4), are estimated from the given observations. 8 References [1] E. Abbe and C. Sandon. Community detection in general stochastic block models: fundamental limits and efficient recovery algorithms. arXiv preprint arXiv:1503.00609, 2015. [2] E. Abbe and C. Sandon. Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic bp, and the information-computation gap. arXiv preprint arXiv:1512.09080, 2015. [3] N. Ailon, Y. Chen, and H. Xu. Breaking the small cluster barrier of graph clustering. In ICML, pages 995–1003, 2013. [4] A. S. Bandeira. An efficient algorithm for exact recovery of vertex variables from edge measurements, 2015. [5] A. S. Bandeira and R. van Handel. Sharp nonasymptotic bounds on the norm of random matrices with independent entries. arXiv preprint arXiv:1408.6185, 2014. [6] R. B. Boppana. Eigenvalues and graph bisection: An average-case analysis. In Foundations of Computer Science, 1987., 28th Annual Symposium on, pages 280–285. IEEE, 1987. [7] T. T. Cai and X. Li. Robust and computationally feasible community detection in the presence of arbitrary outlier nodes. Ann. Statist., 43(3):1027–1059, 2015. [8] S. Chatterjee. Matrix estimation by universal singular value thresholding. Ann. Statist., 43(1):177–214, 2015. [9] J. Chen and B. Yuan. Detecting functional modules in the yeast protein–protein interaction network. Bioinformatics, 22(18):2283–2290, 2006. [10] Y. Chen, A. Jalali, S. Sanghavi, and H. Xu. Clustering partially observed graphs via convex optimization. J. Mach. Learn. Res., 15:2213–2238, 2014. [11] Y. Chen, S. Sanghavi, and H. Xu. Clustering sparse graphs. In Advances in neural information processing systems, pages 2204–2212, 2012. [12] Y. Chen and J. Xu. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. J. Mach. Learn. Res., 17(27):1–57, 2016. [13] A. Coja-Oghlan. Graph partitioning via adaptive spectral techniques. Combin. Probab. Comput., 19(2):227–284, 2010. [14] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physical Review E, 84(6):066106, 2011. [15] O. Guédon and R. Vershynin. Community detection in sparse networks via grothendieck’s inequality. Probability Theory and Related Fields, pages 1–25, 2015. [16] P. W. Holland, K. B. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social networks, 5(2):109–137, 1983. [17] D. Jiang, C. Tang, and A. Zhang. Cluster analysis for gene expression data: A survey. Knowledge and Data Engineering, IEEE Transactions on, 16(11):1370–1386, 2004. [18] J. Leskovec, K. J. Lang, and M. Mahoney. Empirical comparison of algorithms for network community detection. In Proceedings of the 19th international conference on World wide web, pages 631–640. ACM, 2010. [19] F. McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537. IEEE, 2001. [20] M. Meila and J. Shi. A random walks view of spectral segmentation. 2001. [21] A. Montanari and S. Sen. Semidefinite programs on sparse random graphs. arXiv preprint arXiv:1504.05910, 2015. [22] 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. [23] K. Rohe, S. Chatterjee, and B. Yu. Spectral clustering and the high-dimensional stochastic blockmodel. The Annals of Statistics, 39(4):1878–1915, 2011. [24] J. Shi and J. Malik. Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(8):888–905, 2000. [25] D.-C. Tomozei and L. Massoulié. Distributed user profiling via spectral methods. Stoch. Syst., 4(1):1–43, 2014. [26] V. Vu. A simple svd algorithm for finding hidden partitions. arXiv:1404.3918, 2014. [27] J. Xu, R. Wu, K. Zhu, B. Hajek, R. Srikant, and L. Ying. Jointly clustering rows and columns of binary matrices: Algorithms and trade-offs. In The 2014 ACM international conference on Measurement and modeling of computer systems, pages 29–41. ACM, 2014. [28] S.-Y. Yun and A. Proutiere. Community detection via random and adaptive sampling. In Proceedings of The 27th Conference on Learning Theory, pages 138–175, 2014. 9 | 2016 | 207 |
6,114 | A Powerful Generative Model Using Random Weights for the Deep Image Representation Kun He∗, Yan Wang † Department of Computer Science and Technology Huazhong University of Science and Technology, Wuhan 430074, China brooklet60@hust.edu.cn, yanwang@hust.edu.cn John Hopcroft Department of Computer Science Cornell University, Ithaca 14850, NY, USA jeh@cs.cornell.edu Abstract To what extent is the success of deep visualization due to the training? Could we do deep visualization using untrained, random weight networks? To address this issue, we explore new and powerful generative models for three popular deep visualization tasks using untrained, random weight convolutional neural networks. First we invert representations in feature spaces and reconstruct images from white noise inputs. The reconstruction quality is statistically higher than that of the same method applied on well trained networks with the same architecture. Next we synthesize textures using scaled correlations of representations in multiple layers and our results are almost indistinguishable with the original natural texture and the synthesized textures based on the trained network. Third, by recasting the content of an image in the style of various artworks, we create artistic images with high perceptual quality, highly competitive to the prior work of Gatys et al. on pretrained networks. To our knowledge this is the first demonstration of image representations using untrained deep neural networks. Our work provides a new and fascinating tool to study the representation of deep network architecture and sheds light on new understandings on deep visualization. It may possibly lead to a way to compare network architectures without training. 1 Introduction In recent years, Deep Neural Networks (DNNs), especially Convolutional Neural Networks (CNNs), have demonstrated highly competitive results on object recognition and image classification [1, 2, 3, 4]. With advances in training, there is a growing trend towards understanding the inner working of these deep networks. By training on a very large image data set, DNNs develop a representation of images that makes object information increasingly explicit at various levels of the hierarchical architecture. Significant visualization techniques have been developed to understand the deep image representations on trained networks [5, 6, 7, 8, 9, 10, 11]. Inversion techniques have been developed to create synthetic images with feature representations similar to the representations of an original image in one or several layers of the network. Feature representations are a function Φ of the source image x0. An approximate inverse Φ−1 is used to ∗The three authors contributing equally. †Corresponding author. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. construct a new image x from the code Φ(x0) by reducing some statistical discrepancy between Φ(x) and Φ(x0). Mahendran et al. [7] use the pretrained CNN AlexNet [2] and define a squared Euclidean loss on the activations to capture the representation differences and reconstruct the image. Gatys et al. [8, 12] define a squared loss on the correlations between feature maps of some layers and synthesize natural textures of high perceptual quality using the pretrained CNN called VGG [3]. Gatys et al. [13] then combine the loss on the correlations as a proxy to the style of a painting and the loss on the activations to represent the content of an image, and successfully create artistic images by converting the artistic style to the content image, inspiring several followups [14, 15]. Another stream of visualization aims to understand what each neuron has learned in a pretrained network and synthesize an image that maximally activates individual features [5, 9] or the class prediction scores [6]. Nguyen et al. further try multifaceted visualization to separate and visualize different features that a neuron learns [16]. Feature inversion and neural activation maximization both start from a white noise image and calculate the gradient via backpropagation to morph the white noise image and output a natural image. In addition, some regularizers are incorporated as a natural image prior to improve the visualization quality, including α−norm [6], total variation [7], jitter [7], Gaussian blur [9], data-driven patch priors [17], etc. The method of visualizing the feature representation on the intermediate layers sheds light on the information represented at each layer of the pretrained CNN. A third set of researchers trains a separate feed-forward CNN with deconvolutional layers using representations or correlations of the feature maps produced in the original network as the input and the source image as the target to learn the inversion of the original network. The philosophy is to train another neural network to inverse the representation and speedup the visualization on image reconstruction [10, 18], texture synthesis [19] or even style transfer [15]. Instead of designing a natural prior, some researchers incorporate adversarial training [20] to improve the realism of the generated images [18]. Their trained deconvolutional network could give similar qualitative results as the inversion technique does and is two or three orders of magnitude faster, as the previous inversion technique needs a forward and backward pass through the pretrained network. This technique is slightly different from the previous two in that it does not focus on understanding representations encoded in the original CNN but on the visualization of original images by training another network. It is well recognized that deep visualization techniques conduct a direct analysis of the visual information contained in image representations, and help us understand the representation encoded at the intermediate layers of the well trained DNNs. In this paper, we raise a fundamental issue that other researchers rarely address: Could we do deep visualization using untrained, random weight DNNs? What kind of deep visualization could be applied on random weight DNNs? This would allow us to separate the contribution of training from the contribution of the network structure. It might even give us a method to evaluate deep network architectures without spending days and significant computing resources in training networks so that we could compare them. Also, it will be useful not to have to store the weights, which can have significant impact for mobile applications. Though Gray et al. demonstrated that the VGG architecture with random weights failed in generating textures and resulted in white noise images in an experiment indicating the trained filters might be crucial for texture generation [8], we conjecture the success of deep visualization mainly originates from the intrinsic nonlinearity and complexity of the deep network hierarchical structure rather than from the training, and that the architecture itself may cause the inversion invariant to the original image. Gatys et al.’s unsuccessful attempt on the texture synthesis using the VGG architecture with random weights may be due to their inappropriate scale of the weighting factors. To verify our hypothesis, we try three popular inversion tasks for visualization using the CNN architecture with random weights. Our results strongly suggest that this is true. Applying inversion techniques on the untrained VGG with random weights, we reconstruct high perceptual quality images. The results are qualitatively better than the reconstructed images produced on the pretrained VGG with the same architecture. Then, we try to synthesize natural textures using the random weight VGG. With automatic normalization to scale the squared correlation loss for different activation layers, we succeed in generating similar textures as the prior work of Gatys et al. [8] on well-trained VGG. Furthermore, we continue the experiments on style transfer, combining the content of an image and the style of an artwork, and create artistic imagery using random weight CNN. 2 To our knowledge this is the first demonstration of image representations using untrained deep neural networks. Our work provides a new and fascinating tool to study the perception and representation of deep network architecture, and shed light on new understandings on deep visualization. Our work will inspire more possibilities of using the generative power of CNNs with random weights, which do not need long training time on multi-GPUs. Furthermore, it is very hard to prove why trained deep neural networks work so well. Based on the networks with random weights, we might be able to prove some properties of the deep networks. Our work using random weights shows a possible way to start developing a theory of deep learning since with well-trained weights, theorems might be impossible. 2 Methods In order to better understand the deep representation in the CNN architecture, we focus on three tasks: inverting the image representation, synthesizing texture, and creating artistic style images. Our methods are similar in spirit to existing methods [7, 8, 13]. The main difference is that we use untrained weights instead of trained weights, and we apply weighting factors determined by a pre-process to normalize the different impact scales of different activation layers on the input layer. Compared with purely random weight CNN, we select a random weight CNN among a set of random weight CNNs to get slightly better results. For the reference network, we choose VGG-19 [3], a convolutional neural network trained on the 1.3 million-image ILSVRC 2012 ImageNet dataset [1] using the Caffe-framework [22]. The VGG architecture has 16 convolutional and 5 pooling layers, followed by 3 fully connected layers. Gatys et al. re-train the VGG-19 network using average pooling instead of maximum pooling, which they suggest could improve the gradient flow and obtain slightly better results [8]. They only consider the convolutional and pooling layers for texture synthesis, and they rescale the weights such that the mean activation of each filter over the images and positions is 1. Their trained network is denoted as VGG in the following discussion. We adopt the same architecture, replacing the weights with purely random values from a Gaussian distribution N(0, σ). The standard deviation, σ, is set to a small number like 0.015 in the experiments. The VGG-based random weight network created as described in the following subsection is used as our reference network, denoted as ranVGG in the following discussion. Inverting deep representations. Given a representation function F l : RH×W ×C →RNl×Ml for the lth layer of a deep network and F l(x0) for an input image x0, we want to reconstruct an image x that minimizes the L2 loss among the representations of x0 and x. x∗= argmin x∈RH×W ×C Lcontent(x, x0, l) = argmin x∈RH×W ×C ωl 2NlMl ∥F l(x) −F l(x0)∥2 2 (1) Here H and W denote the size of the image, C = 3 the color channels, and ωl the weighting factor. We regard the feature map matrix F l as the representation function of the lth layer which has Nl ×Ml dimensions where Nl is the number of distinct feature maps, each of size Ml when vectorised. F l ik denotes the activation of the ith filter at position k. The representations are a chain of non-linear filter banks even if untrained random weights are applied to the network. We initialize the pre_image with white noise, and apply the L_BFGS gradient descent using standard error backpropagation to morph the input pre_image to the target. xt+1 = xt − ∂L(x, x0, l) ∂F l ∂F l ∂x xt (2) ∂L(x, x0, l) ∂F l i,k xt = ωl N lM l (F l(xt) −F l(x0))i,k (3) The weighting factor ωl is applied to normalize the gradient impact on the morphing image x. We use a pre-processing procedure to determine the value of ωl. For the current layer l, we approximately calculate the maximum possible gradient by Equation (4), and back propagate the gradient to the input layer. Then we regard the reciprocal of the absolute mean gradient over all pixels and RGB channels as the value of ωl such that the gradient impact of different layers is approximately of the same scale. This normalization doesn’t affect the reconstruction from the activations of a single layer, 3 but is added for the combination of content and style for the style transfer task. 1 ωl = 1 WHC W X i=1 H X j=1 C X k=1 ∂L(x0, x′, l) ∂xi,j,k F l(x′)=0 (4) To stabilize the reconstruction quality, we apply a greedy approach to build a “stacked" random weight network ranVGG based on the VGG-19 architecture. Select one single image as the reference image and starting from the first convolutional layer, we build the stacked random weight VGG by sampling, selecting and fixing the weights of each layer in forward order. For the current layer l, fix the weights of the previous l −1 layers and sample several sets of random weights connecting the lth layer. Then reconstruct the target image using the rectified representation of layer l, and choose weights yielding the smallest loss. Experiments in the next section show our success on the reconstruction by using the untrained, random weight CNN, ranVGG. Texture synthesis. Can we synthesize natural textures based on the feature space of an untrained deep network? To address this issue, we refer to the method proposed by Gatys et al.[8] and use the correlations between feature responses on each layer as the texture representation. The inner product between pairwise feature maps i and j within each layer l, Gl ij = P k F l ikF l jk, defines a gram matrix Gl = F l(F l)T . We seek a texture image x that minimizes the L2 loss among the correlations of the representations of several candidate layers for x and a groundtruth image x0. x∗= argmin x∈RH×W ×C Ltexture = argmin x∈RH×W ×C X l∈L µlE(x, x0, l), (5) where the contribution of layer l to the total loss is defined as E(x, x0, l) = 1 4N 2 l M 2 l ∥Gl(F l(x)) −Gl(F l(x0))∥2 2. (6) The derivative of E(x, x0, l) with respect to the activations F l in layer l is [8]: ∂E(x, x0, l) ∂F l i,k = 1 N 2 l M 2 l {(F l(x))T [Gl(F l(x)) −Gl(F l(x0))]}i,k (7) The weighting factor µl is defined similarly to ωl, but here we use the loss contribution E(x, x0, l) of layer l to get its gradient impact on the input layer. 1 µl = 1 WHC W X i H X j C X k ∂E(x0, x′, l) ∂xi,j,k F l(x′)=0 (8) We then perform the L_BFGS gradient descent using standard error backpropagation to morph the input image to a synthesized texture image using the untrained ranVGG. Style transfer. Can we use the untrained deep network to create artistic images? Referring to the prior work of Gatys et al.[13] from the feature responses of VGG trained on ImageNet, we use an untrained VGG and succeed in separating and recombining content and style of arbitrary images. The objective requires terms for content and style respectively with suitable combination factors. For content we use the method of reconstruction on medium layer representations, and for style we use the method of synthesising texture on some lower through higher layer representation correlations. Let xc be the content image and xs the style image. We combine the content of the former and the style of the latter by optimizing the following objective: x∗= argmin x∈RH×W ×C αLcontent(x, xc) + βLtexture(x, xs) + γR(x) (9) Here α and β are the contributing factors for content and style respectively. We apply a regularizer R(x), total variation(TV) [7] defined as the squared sum on the adjacent pixel’s difference of x, to encourage the spatial smoothness in the output image. 3 Experiments This section evaluates the results obtained by our model using the untrained network ranVGG 3. 3https://github.com/mileyan/random_weights 4 The input image is required to be of size 256 × 256 if we want to invert the representation of the fully connected layers. Else, the input could be of arbitrary size. Inverting deep representations. We select several source images from the ILSVRC 2012 challenge [1] validation data as examples for the inversion task, and choose a monkey image as the reference image to build the stacked ranVGG (Note that using other image as the reference image also returns similar results). As compared with the inverting technique of Mahendran et al. [7], we only consider the Euclidean loss over the activations and ignore the regularizer they used to capture the natural image prior. ranVGG contains 19 layers of random weights (16 convolutional layers and 3 fully connected layers), plus 5 pooling layers. Mahendran et al. use a reference network AlexNet [2] which contains 8 layers of trained weights (5 convolutional layers and 3 fully connected layers), plus 3 pooling layers. Figure 1 shows that we reach higher perceptive reconstructions. The reason may lie in the fact that the VGG architecture uses filters with a small receptive field of 3 × 3 and we adopt average pooling. Though shallower than VGG, their reference network, AlexNet, adopts larger filters and uses maximum pooling, which makes it harder to get images well inverted and easily leads to spikes. That’s why they used regularizers to polish the reconstructed image. Figure 2 shows more examples (house, flamingo, girl). Figure 3 shows the variations on an example image, the girl. As compared with the VGG with purely random weights, ranVGG (the VGG with stacked random weights) exhibits lower variations and lower reconstruction distances. As compared with the trained VGG, both stacked ranVGG and VGG with purely random weights exhibit lower reconstruction distance with lower variations. ranVGG demonstrates a more stable and high performance for the inversion task and is slightly better than an purely random VGG. So we will use ranVGG for the following experiments. To compare the convergence of ranVGG and VGG, Figure 4 shows the loss (average Euclidean distance) along the gradient descent iterations on an example image, the house. The reconstruction converges much quicker on ranVGG and yields higher perceptual quality results. Note that the reconstruction on VGG remains the same even if we double the iteration limits to 4000 iterations. Texture synthesis. Figure 5 shows the textures synthesized by our model on ranVGG for several natural texture images (fifth row) selected from a texture website4 and an artwork named Starry Night by Vincent van Gohn 1989. Each row of images was generated using an increasing number of convolutional layers to constrain the gradient descent. conv1_1 for the first row, conv1_1 and conv2_1 for the second row, etc (the labels at each row indicate the top-most layer included). The joint matching of conv1_1, conv2_1, and con3_1 (third row) already exhibits high quality texture representations. Adding one more layer of conv4_1 (fourth row) could slightly improve the natural textures. By comparison, results of Gatys et al.[8] on the trained VGG using four convolutional layers up to conv4_1 are as shown at the bottom row. Our experiments show that with suitable weighted factors, calculated automatically by our method, ranVGG could synthesize complex natural textures that are almost indistinguishable with the original texture and the synthesized texture on the trained VGG. Trained VGG generates slightly better textures on neatly arranged original textures (cargo at the second column of Figure 5). Style transfer. We select conv2_2 as the content layer, and use the combination of conv1_1, conv2_1, ..., conv5_1 as the style. We set the ratio of α : β : γ = 100 : 1 : 1000 in the experiments. We first compare our style transfer results with the prior work of Gatys et al.[13] on several wellknown artworks for the style: Starry Night by Vincent van Gohn 1989, Der Schrei by Edward Munch 1893, Picasso by Pablo Picasso 1907, Woman with a Hat by Henri Matisse 1905, Meadow with Poplars by Claude Monet 1875. As shown in Figure 6, the second row, by recasting the content of a university image in the style of the five artworks, we obtain different artistic images based on the untrained ranVGG (second row). Our results are comparable to their work [13] on the pretrained VGG (third row), and are in the same order of magnitude. They have slightly smoother lines and textures which may attributed to the training. We further try the content and style combination on some Chinese paintings and scenery photographs, as shown in Figure 7, and create high perceptual artistic Chinese paintings that well combine the style of the painting and the content of the sceneries. 4http://www.textures.com/ 5 Ours on ranVGG Ours on VGG [7] on AlexNet pool1 pool2 pool3/conv3 pool4/conv4 pool5 Figure 1: Reconstructions from layers of ranVGG (top) and the pretrained VGG (middle) and [7] (bottom). As AlexNet only contains 3 pooling layers, we compare their results on conv3 and conv4 with ours on pool3 and pool4. Our method on ranVGG demonstrates a higher perceptive quality, especially on the higher layers. Note that VGG is much deeper than AlexNet even when we compare on the same pooling layer. pool1 pool3 pool5 ranVGG VGG ranVGG VGG ranVGG VGG Figure 2: Reconstructions from different pooling layers of the untrained ranVGG and the pretrained VGG. ranVGG demonstrates a higher perceptive quality, especially on the higher layers. The pretrained VGG could rarely reconstruct even the contours from representations of the fifth pooling layer. Figure 3: Variations in samples on the girl image, with maximum, minimum, mean and quartiles. Figure 4: Reconstruction qualities of conv5_1 during the gradient descent iterations. 6 conv1_1 conv2_1 conv3_1 conv4_1 original trained conv4_1 Camouflage Cargo Floors Flowers Leaves Nigh Starry Figure 5: Generated textures using random weights. Each row corresponds to a different processing stage in ranVGG. Considering only the lowest layer, conv1_1, the synthesised textures are of lowest granularity, showing very local structure. Increasing the number of layers on which we match the texture representation (conv1_1 plus conv2_1 for the second row, etc), we have higher organizations of the previous local structure. The third row and the fourth row show high-quality synthesized textures of the original images. The lowest row corresponds to the result of using the trained VGG to match the texture representation from conv1_1, conv2_1 conv3_1 and conv4_1. Original Ours on ranVGG [13] on VGG Starry Night Der Schrei Photograph Picasso Woman with a Hat Meadow with Poplars Figure 6: Artistic style images of ours on the untrained ranVGG (medium row) and of Gatys et al.[8] on the pretrained VGG (bottom row). We select a university image (first row, center) and several well-known artworks for the style (first row, others images). The third column under the photograph are for the Picasso. We obtain similar quality results as compared with Gatys et al.[13]. 7 Chinese painting Photograph Created image Figure 7: Style transfer of Chinese paintings on the untrained ranVGG. We select several Chinese paintings for the style (first column), including The Great Wall by Songyan Qian 1975, a painting of anonymous author and Beautiful landscape by Ping Yang. We select the mountain photographs (second column) as the content images. The created images performed on the untrained ranVGG are shown in the third column, which seem to have learned how to paint the rocks and clouds from paintings of the first column and transfer the style to the content to “draw” Chinese landscape paintings. 4 Discussion Our work offers a testable hypothesis about the representation of image appearance based only on the network structure. The success on the untrained, random weight networks on deep visualization raises several fundamental questions in the area of deep learning. Researchers have developed many visualization techniques to understand the representation of well trained deep networks. However, if we could do the same or similar visualization using an untrained network, then the understanding is not for the training but for the network architecture. What is the difference of a trained network and a random weight network with the same architecture, and how could we explore the difference? What else could one do using the generative power of untrained, random weight networks? Explore other visualization tasks in computer vision developed on the well-trained network, such as image morphing [23], would be a promising aspect. Training deep neural networks not only requires a long time but also significant high performance computing resources. The VGG network, which contains 11-19 weight layers depending on the typical architecture [3], takes 2 to 3 weeks on a system equipped with 4 NVIDIA Titan Black GPUs for training a single net. The residual network ResNet, which achieved state-of-the-art results in image classification and detection in 2015 [4], takes 3.5 days for the 18-layer model and 14 days for the 101-layer model using 4 NVIDIA Kepler GPU.5 Could we evaluate a network structure without taking a long time to train it? There are some prior works to deal with this issue but they deal with much shallow networks [21]. In future work, we will address this issue by utilizing the untrained network to attempt to compare networks quickly without having to train them. Acknowledgments This research work was supported by US Army Research Office(W911NF-14-1-0477) and National Science Foundation of China(61472147) and National Science Foundation of Hubei Province(2015CFB566). 5http://torch.ch/blog/2016/02/04/resnets.html 8 References [1] 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. [2] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [3] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [4] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. [5] Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of a deep network. University de Montreal Technical Report 4323, 2009. [6] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. In ICLR, 2014. [7] Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In CVPR, pages 5188–5196, 2015. [8] Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. In NIPS, pages 262–270, May 2015. [9] Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. In Deep Learning Workshop at ICML, 2015. [10] Alexey Dosovitskiy and Thomas Brox. Inverting visual representations with convolutional networks. In CVPR, pages 4829–4837, 2016. [11] Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In CVPR, 2015. [12] L. A. Gatys, A. S. Ecker, and M. Bethge. Texture synthesis and the controlled generation of natural stimuli using convolutional neural networks. arXiv:1505.07376, 2015. [13] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv:1508.06576, 2015. [14] Yaroslav Nikulin and Roman Novak. Exploring the neural algorithm of artistic style. arXiv:1602.07188, 2016. [15] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. [16] Anh Mai Nguyen, Jason Yosinski, and Jeff Clune. Multifaceted feature visualization: Uncovering the different types of features learned by each neuron in deep neural networks. arXiv:1602.03616, 2016. [17] Donglai Wei, Bolei Zhou, Antonio Torralba, and William T. Freeman. Understanding intra-class knowledge inside CNN. arXiv:1507.02379, 2015. [18] Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In NIPS, 2016. [19] Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In ICML, 2016. [20] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pages 2672–2680, 2014. [21] Andrew Saxe, Pang W Koh, Zhenghao Chen, Maneesh Bhand, Bipin Suresh, and Andrew Y Ng. On random weights and unsupervised feature learning. In ICML, pages 1089–1096, 2011. [22] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the ACM International Conference on Multimedia, ACM, pages 675–678, 2014. [23] Jacob R. Gardner, Paul Upchurch, Matt J. Kusner, Yixuan Li, Kilian Q. Weinberger, and John E. Hopcroft. Deep manifold traversal: Changing labels with convolutional features. arXiv:1511.06421, 2015. 9 | 2016 | 208 |
6,115 | Privacy Odometers and Filters: Pay-as-you-Go Composition Ryan Rogers∗ Aaron Roth† Jonathan Ullman‡ Salil Vadhan§ Abstract In this paper we initiate the study of adaptive composition in differential privacy when the length of the composition, and the privacy parameters themselves can be chosen adaptively, as a function of the outcome of previously run analyses. This case is much more delicate than the setting covered by existing composition theorems, in which the algorithms themselves can be chosen adaptively, but the privacy parameters must be fixed up front. Indeed, it isn’t even clear how to define differential privacy in the adaptive parameter setting. We proceed by defining two objects which cover the two main use cases of composition theorems. A privacy filter is a stopping time rule that allows an analyst to halt a computation before his pre-specified privacy budget is exceeded. A privacy odometer allows the analyst to track realized privacy loss as he goes, without needing to pre-specify a privacy budget. We show that unlike the case in which privacy parameters are fixed, in the adaptive parameter setting, these two use cases are distinct. We show that there exist privacy filters with bounds comparable (up to constants) with existing privacy composition theorems. We also give a privacy odometer that nearly matches non-adaptive private composition theorems, but is sometimes worse by a small asymptotic factor. Moreover, we show that this is inherent, and that any valid privacy odometer in the adaptive parameter setting must lose this factor, which shows a formal separation between the filter and odometer use-cases. 1 Introduction Differential privacy [DMNS06] is a stability condition on a randomized algorithm, designed to guarantee individual-level privacy during data analysis. Informally, an algorithm is differentially private if any pair of close inputs map to similar probability distributions over outputs, where similarity is measured by two parameters ε and δ. Informally, ε measures the amount of privacy and δ measures the failure probability that the privacy loss is much worse than ε. A signature property of differential privacy is that it is preserved under composition—combining many differentially private subroutines into a single algorithm preserves differential privacy and the privacy parameters degrade gracefully. Composability is essential for both privacy and for algorithm design. Since differential privacy is composable, we can design a sophisticated algorithm and prove it is private without having to rea∗Department of Applied Mathematics and Computational Science, University of Pennsylvania. ryrogers@sas.upenn.edu. †Department of Computer and Information Sciences, University of Pennsylvania. aaroth@cis.upenn.edu. Supported in part by an NSF CAREER award, NSF grant CNS-1513694, and a grant from the Sloan Foundation. ‡College of Computer and Information Science, Northeastern University. jullman@ccs.neu.edu §Center for Research on Computation & Society and John A. Paulson School of Engineering & Applied Sciences, Harvard University. salil@seas.harvard.edu. Work done while visiting the Department of Applied Mathematics and the Shing-Tung Yau Center at National Chiao-Tung University in Taiwan. Also supported by NSF grant CNS-1237235, a grant from the Sloan Foundation, and a Simons Investigator Award. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. son directly about its output distribution. Instead, we can rely on the differential privacy of the basic building blocks and derive a privacy bound on the whole algorithm using the composition rules. The composition theorem for differential privacy is very strong, and holds even if the choice of which differentially private subroutine to run is adaptive—that is, the choice of the next algorithm may depend on the output of previous algorithms. This property is essential in algorithm design, but also more generally in modeling unstructured sequences of data analyses that might be run by a human data analyst, or even by many data analysts on the same data set, while only loosely coordinating with one another. Even setting aside privacy, it can be very challenging to analyze the statistical properties of general adaptive procedures for analyzing a dataset, and the fact that adaptively chosen differentially private algorithms compose has recently been used to give strong guarantees of statistical validity for adaptive data analysis [DFH+15, BNS+16]. However, all the known composition theorems for differential privacy [DMNS06, DKM+06, DRV10, KOV15, MV16] have an important and generally overlooked caveat. Although the choice of the next subroutine in the composition may be adaptive, the number of subroutines called and choice of the privacy parameters ε and δ for each subroutine must be fixed in advance. Indeed, it is not even clear how to define differential privacy if the privacy parameters are not fixed in advance. This is generally acceptable when designing a single algorithm (that has a worst-case analysis), since worst-case eventualities need to be anticipated and budgeted for in order to prove a theorem. However, it is not acceptable when modeling the unstructured adaptivity of a data analyst, who may not know ahead of time (before seeing the results of intermediate analyses) what he wants to do with the data. When controlling privacy loss across multiple data analysts, the problem is even worse. As a simple stylized example, suppose that A is some algorithm (possibly modeling a human data analyst) for selecting statistical queries5 as a function of the answers to previously selected queries. It is known that for any one statistical query q and any data set x, releasing the perturbed answer ˆa = q(x)+Z where Z ∼Lap(1/ε) is a Laplace random variable, ensures (ε, 0)-differential privacy. Composition theorems allow us to reason about the composition of k such operations, where the queries can be chosen adaptively by A, as in the following simple program. Example1(x): For i = 1 to k: Let qi = A(ˆa1, . . . , ˆai−1) and let ˆai = qi(x) + Lap(1/ε). Output (ˆa1, . . . , ˆak). The “basic” composition theorem [DMNS06] asserts that Example1 is (εk, 0)-differentially private. The “advanced” composition theorem [DRV10] gives a more sophisticated bound and asserts that (provided that ε is sufficiently small), the algorithm satisfies (ε p 8k ln(1/δ), δ)-differential privacy for any δ > 0. There is even an “optimal” composition theorem [KOV15] too complicated to describe here. These analyses crucially assume that both the number of iterations k and the parameter ε are fixed up front, even though it allows for the queries qi to be adaptively chosen.6 Now consider a similar example where the number of iterations is not fixed up front, but actually depends on the answers to previous queries. This is a special case of a more general setting where the privacy parameter εi in every round may be chosen adaptively—halting in our example is equivalent to setting εi = 0 in all future rounds. Example2(x, τ): Let i ←1, ˆa1 ←q1(x) + Lap(1/ε). While ˆai ≤τ: Let i ←i + 1, qi = A(ˆa1, . . . , ˆai−1), and let ˆai = qi(x) + Lap(1/ε). Output (ˆa1, . . . , ˆai). Example2 cannot be said to be differentially private ex ante for any non-trivial fixed values of ε and δ, because the computation might run for an arbitrarily long time and privacy may degrade indefinitely. What can we say about privacy after we run the algorithm? If the algorithm/data-analyst happens to stop after k rounds, can we apply the composition theorem ex post to conclude that it is (εk, 0)- and 5A statistical query is parameterized by a predicate φ, and asks “how many elements of the dataset satisfy φ?” Changing a single element of the dataset can change the answer to the statistical query by at most 1. 6The same analysis holds for hetereogeneous parameters (ε1, . . . , εk) are used in each round as long as they are all fixed in advance. For basic composition εk is replaced with Pk i=1 εi and for advanced composition ε √ k is replaced with qPk i=1 ε2 i . 2 (ε p 8k log(1/δ), δ)-differentially private, as we could if the algorithm were constrained to always run for at most k rounds? In this paper, we study the composition properties of differential privacy when everything—the choice of algorithms, the number of rounds, and the privacy parameters in each round—may be adaptively chosen. We show that this setting is much more delicate than the settings covered by previously known composition theorems, but that these sorts of ex post privacy bounds do hold with only a small (but in some cases unavoidable) loss over the standard setting. We note that the conceptual discussion of differential privacy focuses a lot on the idea of arbitrary composition and our results give more support for this conceptual interpretation. 1.1 Our Results We give a formal framework for reasoning about the adaptive composition of differentially private algorithms when the privacy parameters themselves can be chosen adaptively. When the parameters are chosen non-adaptively, a composition theorem gives a high probability bound on the worst case privacy loss that results from the output of an algorithm. In the adaptive parameter setting, it no longer makes sense to have fixed bounds on the privacy loss. Instead, we propose two kinds of primitives capturing two natural use cases for composition theorems: 1. A privacy odometer takes as input a global failure parameter δg. After every round i in the composition of differentially private algorithms, the odometer outputs a number τi that may depend on the realized privacy parameters εi, δi in the previous rounds. The privacy odometer guarantees that with probability 1 −δg, for every round i, τi is an upper bound on the privacy loss in round i. 2. A privacy filter is a way to cut off access to the dataset when the privacy loss is too large. It takes as input a global privacy “budget” (εg, δg). After every round, it either outputs CONT (“continue”) or HALT depending on the privacy parameters from the previous rounds. The privacy filter guarantees that with probability 1 −δg, it will output HALT before the privacy loss exceeds εg. When used, it guarantees that the resulting interaction is (εg, δg)-DP. A tempting heuristic is to take the realized privacy parameters ε1, δ1, . . . , εi, δi and apply one of the existing composition theorems to those parameters, using that value as a privacy odometer or implementing a privacy filter by halting when getting a value that exceeds the global budget. However this heuristic does not necessarily give valid bounds. We first prove that the heuristic does work for the basic composition theorem [DMNS06] in which the parameters εi and δi add up. We prove that summing the realized privacy parameters yields both a valid privacy odometer and filter. The idea of a privacy filter was also considered in [ES15], who show that basic composition works in the privacy filter application. We then show that the heuristic breaks for the advanced composition theorem [DRV10]. However, we give a valid privacy filter that gives the same asymptotic bound as the advanced composition theorem, albeit with worse constants. On the other hand, we show that, in some parameter regimes, the asymptotic bounds given by our privacy filter cannot be achieved by a privacy odometer. This result gives a formal separation between the two models when the parameters may be chosen adaptively, which does not exist when the privacy parameters are fixed. Finally, we give a valid privacy odometer with a bound that is only slightly worse asymptotically than the bound that the advanced composition theorem would give if it were used (improperly) as a heuristic. Our bound is worse by a factor that is never larger than p log log(n) (here, n is the size of the dataset) and for some parameter regimes is only a constant. 2 Privacy Preliminaries Differential privacy is defined based on the following notion of similarity between two distributions. Definition 2.1 (Indistinguishable). Two random variables X and Y taking values from domain D are (ε, δ)-indistinguishable, denoted as X ≈ε,δ Y , if ∀S ⊆D, P [X ∈S] ≤eεP [Y ∈S] + δ and P [Y ∈S] ≤eεP [X ∈S] + δ. 3 There is a slight variant of indistinguishability, called point-wise indistinguishability, which is nearly equivalent, but will be the more convenient notion for the generalizations we give in this paper. Definition 2.2 (Point-wise Indistinguishable). Two random variables X and Y taking values from D are (ε, δ)-point-wise indistinguishable if with probability at least 1 −δ over either a ∼X or a ∼Y , we have log P[X=a] P[Y =a] ≤ε. Lemma 2.3 ([KS14]). Let X and Y be two random variables taking values from D. If X and Y are (ε, δ)-point-wise indistinguishable, then X ≈ε,δ Y . Also, if X ≈ε,δ Y then X and Y are 2ε, 2δ eεε -point-wise indistinguishable. We say two databases x, x′ ∈X n are neighboring if they differ in at most one entry, i.e. if there exists an index i ∈[n] such that x−i = x′ −i. We can now state differential privacy in terms of indistinguishability. Definition 2.4 (Differential Privacy [DMNS06]). A randomized algorithm M : X n →Y with arbitrary output range Y is (ε, δ)-differentially private (DP) if for every pair of neighboring databases x, x′: M(x) ≈ε,δ M(x′). We then define the privacy loss LossM(a; x, x′) for outcome a ∈Y and neighboring datasets x, x′ ∈ X n as LossM(a; x, x′) = log P[M(x)=a] P[M(x′)=a] . We note that if we can bound LossM(a; x, x′) for any neighboring datasets x, x′ with high probability over a ∼M(x), then Theorem 2.3 tells us that M is differentially private. Moreover, Theorem 2.3 also implies that this approach is without loss of generality (up to a small difference in the parameters). Thus, our composition theorems will focus on bounding the privacy loss with high probability. A useful property of differential privacy is that it is preserved under post-processing without degrading the parameters: Theorem 2.5 (Post-Processing [DMNS06]). Let M : X n →Y be (ε, δ)-DP and f : Y →Y′ be any randomized algorithm. Then f ◦M : X n →Y′ is (ε, δ)-DP. We next recall a useful characterization from [KOV15]: any DP algorithm can be written as the post-processing of a simple, canonical algorithm which is a generalization of randomized response. Definition 2.6. For any ε, δ ≥0, we define the randomized response algorithm RRε,δ : {0, 1} → {0, ⊤, ⊥, 1} as the following (Note that if δ = 0, we will simply write the algorithm RRε,δ as RRε.) P [RRε,δ(0) = 0] = δ P [RRε,δ(1) = 0] = 0 P [RRε,δ(0) = ⊤] = (1 −δ) eε 1+eε P [RRε,δ(1) = ⊤] = (1 −δ) 1 1+eε P [RRε,δ(0) = ⊥] = (1 −δ) 1 1+eε P [RRε,δ(1) = ⊥] = (1 −δ) eε 1+eε P [RRε,δ(0) = 1] = 0 P [RRε,δ(1) = 1] = δ Kairouz, Oh, and Viswanath [KOV15] show that any (ε, δ)–DP algorithm can be viewed as a postprocessing of the output of RRε,δ for an appropriately chosen input. Theorem 2.7 ([KOV15], see also [MV16]). For every (ε, δ)-DP algorithm M and for all neighboring databases x0 and x1, there exists a randomized algorithm T where T(RRε,δ(b)) is identically distributed to M(xb) for b ∈{0, 1}. This theorem will be useful in our analyses, because it allows us to without loss of generality analyze compositions of these simple algorithms RRε,δ with varying privacy parameters. We now define the adaptive composition of differentially private algorithms in the setting introduced by [DRV10] and then extended to heterogenous privacy parameters in [MV16], in which all of the privacy parameters are fixed prior to the start of the computation. The following “composition game” is an abstract model of composition in which an adversary can adaptively select between neighboring datasets at each round, as well as a differentially private algorithm to run at each round – both choices can be a function of the realized outcomes of all previous rounds. However, crucially, the adversary must select at each round an algorithm that satisfies the privacy parameters which have been fixed ahead of time – the choice of parameters cannot itself be a function of the realized outcomes of previous rounds. We define this model of interaction formally in Algorithm 1 where the output is the view of the adversary A which includes any random coins she uses RA and the outcomes A1, · · · , Ak of every round. 4 Algorithm 1 FixedParamComp(A, E = (E1, · · · , Ek), b), where A is a randomized algorithm, E1, · · · , Ek are classes of randomized algorithms, and b ∈{0, 1}. Select coin tosses Rb A for A uniformly at random. for i = 1, · · · , k do A = A(Rb A, Ab 1, · · · , Ab i−1) gives neighboring datasets xi,0, xi,1, and Mi ∈Ei A receives Ab i = Mi(xi,b) return view V b = (Rb A, Ab 1, · · · , Ab k) Definition 2.8 (Adaptive Composition [DRV10], [MV16]). We say that the sequence of parameters ε1, · · · , εk ≥0, δ1, · · · , δk ∈[0, 1) satisfies (εg, δg)-differential privacy under adaptive composition if for every adversary A, and E = (E1, · · · , Ek) where Ei is the class of (εi, δi)-DP algorithms, we have FixedParamComp(A, E, ·) is (εg, δg)-DP in its last argument, i.e. V 0 ≈εg,δg V 1. We first state a basic composition theorem which shows that the adaptive composition satisfies differential privacy where “the parameters just add up.” Theorem 2.9 (Basic Composition [DMNS06], [DKM+06]). The sequence ε1, · · · , εk and δ1, · · · δk satisfies (εg, δg)-differential privacy under adaptive composition where εg = Pk i=1 εi, and δg = Pk i=1 δi. We now state the advanced composition bound from [DRV10] which gives a quadratic improvement to the basic composition bound. Theorem 2.10 (Advanced Composition). For any ˆδ > 0, the sequence ε1, · · · , εk and δ1, · · · δk where ε = εi and δ = δi for all i ∈[k] satisfies (εg, δg)-differential privacy under adaptive composition where εg = ε (eε −1) k + ε q 2k log(1/ˆδ), and δg = kδ + ˆδ. This theorem can be easily generalized to hold for values of εi that are not all equal (as done in [KOV15]). However, this is not as all-encompassing as it would appear at first blush, because this straightforward generalization would not allow for the values of εi and δi to be chosen adaptively by the data analyst. Indeed,the definition of differential privacy itself (Definition 2.4) does not straightforwardly extend to this case. The remainder of this paper is devoted to laying out a framework for sensibly talking about the privacy parameters εi and δi being chosen adaptively by the data analyst, and to prove composition theorems (including an analogue of Theorem 2.10) in this model. 3 Composition with Adaptively Chosen Parameters We now introduce the model of composition with adaptive parameter selection, and define privacy in this setting. We want to model composition as in the previous section, but allow the adversary the ability to also choose the privacy parameters (εi, δi) as a function of previous rounds of interaction. We will define the view of the interaction, similar to the view in FixedParamComp, to be the tuple that includes A’s random coin tosses RA and the outcomes A = (A1, · · · , Ak) of the algorithms she chose. Formally, we define an adaptively chosen privacy parameter composition game in Algorithm 2 which takes as input an adversary A, a number of rounds of interaction k,7 and an experiment parameter b ∈{0, 1}. We then define the privacy loss with respect to AdaptParamComp(A, k, b) in the following way for a fixed view v = (r, a) where r represents the random coin tosses of A and we write v<i = 7Note that in the adaptive parameter composition game, the adversary has the option of effectively stopping the composition early at some round k′ < k by simply setting εi = δi = 0 for all rounds i > k′. Hence, the parameter k will not appear in our composition theorems the way it does when privacy parameters are fixed. This means that we can effectively take k to be infinite. For technical reasons, it is simpler to have a finite parameter k, but the reader should imagine it as being an enormous number. 5 Algorithm 2 AdaptParamComp(A, k, b) Select coin tosses Rb A for A uniformly at random. for i = 1, · · · , k do A = A(Rb A, Ab 1, · · · , Ab i−1) gives neighboring xi,0, xi,1, parameters (εi, δi), Mi that is (εi, δi)-DP A receives Ab i = Mi(xi,b) return view V b = (Rb A, Ab 1, · · · , Ab k) (r, a1, · · · , ai−1): Loss(v) = log P V 0 = v P [V 1 = v] ! = k X i=1 log P Mi(xi,0) = vi|v<i P [Mi(xi,1) = vi|v<i] ! def = k X i=1 Lossi(v≤i). (1) Note that the privacy parameters (εi, δi) depend on the previous outcomes that A receives. We will frequently shorten our notation εt = εt(v<t) and δt = δt(v<t) when the outcome is understood. It no longer makes sense to claim that the privacy loss of the adaptive parameter composition experiment is bounded by any fixed constant, because the privacy parameters (with which we would presumably want to use to bound the privacy loss) are themselves random variables. Instead, we define two objects which can be used by a data analyst to control the privacy loss of an adaptive composition of algorithms. The first object, which we call a privacy odometer will be parameterized by one global parameter δg and will provide a running real valued output that will, with probability 1 −δg, upper bound the privacy loss at each round of any adaptive composition in terms of the realized values of εi and δi selected at each round. Definition 3.1 (Privacy Odometer). A function COMPδg : R2k ≥0 →R ∪{∞} is a valid privacy odometer if for all adversaries in AdaptParamComp(A, k, b), with probability at most δg over v ∼ V 0: |Loss(v)| > COMPδg (ε1, δ1, · · · , εk, δk) . The second object, which we call a privacy filter, is a stopping time rule. It takes two global parameters (εg, δg) and will at each round either output CONT or HALT. Its guarantee is that with probability 1 −δg, it will output HALT if the privacy loss has exceeded εg. Definition 3.2 (Privacy Filter). A function COMPεg,δg : R2k ≥0 → {HALT, CONT} is a valid privacy filter for εg, δg ≥0 if for all adversaries A in AdaptParamComp(A, k, b), the following “bad event” occurs with probability at most δg when v ∼ V 0: |Loss(v)| > εg and COMPεg,δg(ε1, δ1, · · · , εk, δk) = CONT. We note two things about the usage of these objects. First, a valid privacy odometer can be used to provide a running upper bound on the privacy loss at each intermediate round: the privacy loss at round k′ < k must with high probability be upper bounded by COMPδg (ε1, δ1, . . . , εk′, δk′, 0, 0, . . . , 0, 0) – i.e. the bound that results by setting all future privacy parameters to 0. This is because setting all future privacy parameters to zero is equivalent to stopping the computation at round k′, and is a feasible choice for the adaptive adversary A. Second, a privacy filter can be used to guarantee that with high probability, the stated privacy budget εg is never exceeded – the data analyst at each round k′ simply queries COMPεg,δg(ε1, δ1, . . . , εk′, δk′, 0, 0, . . . , 0, 0) before she runs algorithm k′, and runs it only if the filter returns CONT. Again, this is guaranteed because the continuation is a feasible choice of the adversary, and the guarantees of both a filter and an odometer are quantified over all adversaries. We first give an adaptive parameter version of the basic composition in Theorem 2.9. See the full version for the proof. Theorem 3.3. For each nonnegative δg, COMPδg is a valid privacy odometer where COMPδg (ε1, δ1, · · · , εk, δk) = ∞if Pk i=1 δi > δg and otherwise COMPδg (ε1, δ1, · · · , εk, δk) = Pk i=1 εi. Additionally, for any εg, δg ≥ 0, COMPεg,δg is a valid privacy filter where COMPεg,δg (ε1, δ1, · · · , εk, δk) = HALT if Pk t=1 δt > δg or Pk i=1 εi > εg and CONT otherwise. 6 4 Concentration Preliminaries We give a useful concentration bound that will be pivotal in proving an improved valid privacy odometer and filter from that given in Theorem 3.3. To set this up, we present some notation: let (Ω, F, P) be a probability triple where ∅= F0 ⊆F1 ⊆· · · ⊆F is an increasing sequence of σ-algebras. Let Xi be a real-valued Fi-measurable random variable, such that E [Xi|Fi−1] = 0 a.s. for each i. We then consider the martingale where M0 = 0 and Mk = Pk i=1 Xi, ∀k ≥1. We use results from [dlPKLL04] and [vdG02] to prove the following (see supplementary file). Theorem 4.1. For Mk given above, if there exists two random variables Ci < Di which are Fi−1 measurable for i ≥1 such that Ci ≤Xi ≤Di almost surely ∀i ≥1. and we define U 2 0 = 0, and U 2 k = Pk i=1 (Di −Ci)2, ∀k ≥1, then for any fixed k ≥1, β > 0 and δ ≤1/e, we have P |Mk| ≥ r U 2 k 4 + β 2 + log U 2 k 4β + 1 log(1/δ) ≤δ. We will use this martingale inequality in our analysis for deriving composition bounds for both privacy filters and odometers. The martingale we form will be the sum of the privacy loss from a sequence of randomized response algorithms from Definition 2.6. Note that for pure-differential privacy (where δi = 0) the privacy loss at round i is then ±εi, which are fixed given the previous outcomes. See the supplementary file for the case when δi > 0 at each round i. We then use the result from Theorem 2.7 to conclude that every differentially private algorithm is a post processing function of randomized response. Thus determining a high probability bound on the martingale formed from the sum of the privacy losses of a sequence of randomized response algorithms suffices for computing a valid privacy filter or odometer. 5 Advanced Composition for Privacy Filters We next show that we can essentially get the same asymptotic bound as Theorem 2.10 for the privacy filter setting using the bound in Theorem 4.1 for the martingale based on the sum of privacy losses from a sequence of randomized response algorithms (see the supplementary file for more details). Theorem 5.1. COMPεg,δg is a valid privacy filter for δg ∈ (0, 1/e) and εg > 0 where COMPεg,δg (ε1, δ1, · · · , εk, δk) = HALT if Pk i=1 δi > δg/2 or if εg is smaller than k X j=1 εj (eεj −1) /2 + v u u t2 k X i=1 ε2 i + ε2g log(1/δg) ! 1 + 1 2 log log(1/δg) Pk i=1 ε2 i ε2g + 1 !! log(2/δg) (2) and otherwise COMPεg,δg (ε1, δ1, · · · , εk, δk) = CONT. Note that if we have Pk i=1 ε2 i = O (1/ log(1/δg)) and set εg = Θ qPk i=1 ε2 i log(1/δg) in (2), we are then getting the same asymptotic bound on the privacy loss as in [KOV15] and in Theorem 2.10 for the case when εi = ε for i ∈[k]. If kε2 ≤ 1 8 log(1/δg), then Theorem 2.10 gives a bound on the privacy loss of ε p 8k log(1/δg). Note that there may be better choices for the constant 28.04 that we divide ε2 g by in (2), but for the case when εg = ε p 8k log(1/δg) and εi = ε for every i ∈[n], it is nearly optimal. 6 Advanced Composition for Privacy Odometers One might hope to achieve the same sort of bound on the privacy loss from Theorem 2.10 when the privacy parameters may be chosen adversarially. However we show that this cannot be the case for any valid privacy odometer. In particular, even if an adversary selects the same privacy parameter ε = o( p log(log(n)/δg)/k) each round but can adaptively select a time to stop interacting 7 with AdaptParamComp (which is a restricted special case of the power of the general adversary – stopping is equivalent to setting all future εi, δi = 0), then we show that there can be no valid privacy odometer achieving a bound of o(ε p k log (log(n)/δg)). This gives a separation between the achievable bounds for a valid privacy odometers and filters. But for privacy applications, it is worth noting that δg is typically set to be (much) smaller than 1/n, in which case this gap disappears (since log(log(n)/δg) = (1 + o(1)) log(1/δg) ). We prove the following with an anti-concentration bound for random walks from [LT91] (see full version). Theorem 6.1. For any δg ∈ (0, O(1)) there is no valid COMPδg privacy odometer where COMPδg (ε1, 0, · · · , εk, 0) = Pk i=1 εi eεi−1 eεi+1 + o qPk i=1 ε2 i log(log(n)/δg) We now give our main positive result for privacy odometers, which is similar to our privacy filter in Theorem 5.1 except that δg is replaced by δg/ log(n), as is necessary from Theorem 6.1. Note that the bound incurs an additive 1/n2 loss to the P i ε2 i term that is present without privacy. In any reasonable setting of parameters, this translates to at most a constant-factor multiplicative loss, because there is no utility running any differentially private algorithm with εi < 1 10n (we know that if A is (εi, 0)-DP then A(x) and A(x′) for neighboring inputs have statistical distance at most eεin −1 < 0.1, and hence the output is essentially independent of the input - note that a similar statement holds for (εi, δi)-DP.) The proof of the following result uses Theorem 4.1 along with a union bound over log(n2) choices for β, which are discretized values for Pk i=1 ε2 i ∈[1/n2, 1]. See the full version for the complete proof. Theorem 6.2 (Advanced Privacy Odometer). COMPδg is a valid privacy odometer for δg ∈(0, 1/e) where COMPδg (ε1, δ1, · · · , εk, δk) = ∞if Pk i=1 δi > δg/2, otherwise if Pk i=1 ε2 i ∈[1/n2, 1] then COMPδg (ε1, δ1, · · · , εk, δk) = k X i=1 εi eεi −1 2 + 2 v u u t k X i=1 ε2 i 1 + log √ 3 log(4 log2(n)/δg). (3) and if Pk i=1 ε2 i /∈[1/n2, 1] then COMPδg (ε1, δ1, · · · , εk, δk) is equal to k X i=1 εi eεi −1 2 + v u u t2 1/n2 + k X i=1 ε2 i ! 1 + 1 2 log 1 + n2 k X i=1 ε2 i !! log(4 log2(n))/δg). (4) Acknowledgements The authors are grateful Jack Murtagh for his collaboration in the early stages of this work, and for sharing his preliminary results with us. We thank Andreas Haeberlen, Benjamin Pierce, and Daniel Winograd-Cort for helpful discussions about composition. We further thank Daniel Winograd-Cort for catching an incorrectly set constant in an earlier version of Theorem 5.1. 8 References [BNS+16] Raef Bassily, Kobbi Nissim, Adam D. Smith, Thomas Steinke, Uri Stemmer, and Jonathan Ullman. Algorithmic stability for adaptive data analysis. In Proceedings of the 48th Annual ACM on Symposium on Theory of Computing, STOC, 2016. [DFH+15] Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Leon Roth. Preserving statistical validity in adaptive data analysis. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, pages 117–126. ACM, 2015. [DKM+06] Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Advances in Cryptology-EUROCRYPT 2006, pages 486–503. Springer, 2006. [dlPKLL04] Victor H. de la Pea, Michael J. Klass, and Tze Leung Lai. Self-normalized processes: exponential inequalities, moment bounds and iterated logarithm laws. Ann. Probab., 32(3):1902–1933, 07 2004. [DMNS06] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In TCC ’06, pages 265–284, 2006. [DRV10] Cynthia Dwork, Guy N. Rothblum, and Salil P. Vadhan. Boosting and differential privacy. In 51th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, October 23-26, 2010, Las Vegas, Nevada, USA, pages 51–60, 2010. [ES15] Hamid Ebadi and David Sands. Featherweight PINQ. CoRR, abs/1505.02642, 2015. [KOV15] Peter Kairouz, Sewoong Oh, and Pramod Viswanath. The composition theorem for differential privacy. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pages 1376–1385, 2015. [KS14] S.P. Kasiviswanathan and A. Smith. On the ‘Semantics’ of Differential Privacy: A Bayesian Formulation. Journal of Privacy and Confidentiality, Vol. 6: Iss. 1, Article 1, 2014. [LT91] M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. A Series of Modern Surveys in Mathematics Series. Springer, 1991. [MV16] Jack Murtagh and Salil P. Vadhan. The complexity of computing the optimal composition of differential privacy. In Theory of Cryptography - 13th International Conference, TCC 2016-A, Tel Aviv, Israel, January 10-13, 2016, Proceedings, Part I, pages 157–175, 2016. [vdG02] Sara A van de Geer. On Hoeffding’s inequality for dependent random variables. Springer, 2002. 9 | 2016 | 209 |
6,116 | Convolutional Neural Fabrics Shreyas Saxena Jakob Verbeek INRIA Grenoble – Laboratoire Jean Kuntzmann Abstract Despite the success of CNNs, selecting the optimal architecture for a given task remains an open problem. Instead of aiming to select a single optimal architecture, we propose a “fabric” that embeds an exponentially large number of architectures. The fabric consists of a 3D trellis that connects response maps at different layers, scales, and channels with a sparse homogeneous local connectivity pattern. The only hyper-parameters of a fabric are the number of channels and layers. While individual architectures can be recovered as paths, the fabric can in addition ensemble all embedded architectures together, sharing their weights where their paths overlap. Parameters can be learned using standard methods based on backpropagation, at a cost that scales linearly in the fabric size. We present benchmark results competitive with the state of the art for image classification on MNIST and CIFAR10, and for semantic segmentation on the Part Labels dataset. 1 Introduction Convolutional neural networks (CNNs) [15] have proven extremely successful for a wide range of computer vision problems and other applications. In particular, the results of Krizhevsky et al. [13] have caused a major paradigm shift in computer vision from models relying in part on hand-crafted features, to end-to-end trainable systems from the pixels upwards. One of the main problems that holds back further progress using CNNs, as well as deconvolutional variants [24, 26] used for semantic segmentation, is the lack of efficient systematic ways to explore the discrete and exponentially large architecture space. To appreciate the number of possible architectures, consider a standard chain-structured CNN architecture for image classification. The architecture is determined by the following hyper-parameters: (i) number of layers, (ii) number of channels per layer, (iii) filter size per layer, (iv) stride per layer, (v) number of pooling vs. convolutional layers, (vi) type of pooling operator per layer, (vii) size of the pooling regions, (viii) ordering of pooling and convolutional layers, (ix) channel connectivity pattern between layers, and (x) type of activation, e.g. ReLU or MaxOut, per layer. The number of resulting architectures clearly does not allow for (near) exhaustive exploration. We show that all network architectures that can be obtained for various choices of the above ten hyper-parameters are embedded in a “fabric” of convolution and pooling operators. Concretely, the fabric is a three-dimensional trellis of response maps of various resolutions, with only local connections across neighboring layers, scales, and channels. See Figure 1 for a schematic illustration of how fabrics embed different architectures. Each activation in a fabric is computed as a linear function followed by a non-linearity from a multi-dimensional neighborhood (spatial/temporal input dimensions, a scale dimension and a channel dimension) in the previous layer. Setting the only two hyper-parameters, number of layers and channels, is not ciritical as long as they are large enough. We also consider two variants, one in which the channels are fully connected instead of sparsely, and another in which the number of channels doubles if we move to a coarser scale. The latter allows for one to two orders of magnitude more channels, while increasing memory requirements by only 50%. All chain-structured network architectures embedded in the fabric can be recovered by appropriately setting certain connections to zero, so that only a single processing path is active between input and output. General, non-path, weight settings correspond to ensembling many architectures together, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Scales Layers Input Output Figure 1: Fabrics embedding two seven-layer CNNs (red, green) and a ten-layer deconvolutional network (blue). Feature map size of the CNN layers are given by height. Fabric nodes receiving input and producing output are encircled. All edges are oriented to the right, down in the first layer, and towards the output in the last layer. The channel dimension of the 3D fabric is omitted for clarity. which share parameters where the paths overlap. The acyclic trellis structure allows for learning using standard error back-propagation methods. Learning can thus efficiently configure the fabric to implement each one of exponentially many embedded architectures, as well as ensembles of them. Experimental results competitive with the state of the art validate the effectiveness of our approach. The contributions of our work are: (1) Fabrics allow by and large to sidestep the CNN model architecture selection problem. Avoiding explicitly training and evaluating individual architectures using, e.g., local-search strategies [2]. (2) While scaling linearly in terms of computation and memory requirements, our approach leverages exponentially many chain-structured architectures in parallel by massively sharing weights among them. (3) Since our fabric is multi-scale by construction, it can naturally generate output at multiple resolutions, e.g. for image classification and semantic segmentation or multi-scale object detection, within a single non-branching network structure. 2 Related work Several chain-structured CNN architectures, including Alex-net [13] and the VGG-16 and VGG-19 networks [27], are widely used for image classification and related tasks. Although very effective, it is not clear that these architectures are the best ones given their computational and memory requirements. Their widespread adoption is in large part due to the lack of more effective methods to find good architectures than trying them one-by-one, possibly initializing parameters from related ones [2]. CNN architectures for semantic segmentation, as well as other structured prediction tasks such as human pose estimation [25], are often derived from ones developed for image classification, see e.g. [20, 24, 31, 33]. Up-sampling operators are used to increase the resolution of the output, compensating for pooling operators used in earlier layers of the network [24]. Ronneberger et al. [26] present a network with additional links that couple layers with the same resolution near the input and output. Other architectures, see e.g. [3, 7], process the input in parallel across several resolutions, and then fuse all streams by re-sampling to the output resolution. Such architectures induce networks with multiple parallel paths from input to output. We will show that nearly all such networks are embedded in our fabrics, either as paths or other simple sub-graphs. While multi-dimensional networks have been proposed in the past, e.g. to process non-sequential data with recurrent nets [5, 11], to the best of our knowledge they have not been explored as a “basis” to span large classes of convolutional neural networks. Misra et al. [23] propose related cross-stitch networks that exchange information across corresponding layers of two copies of the same architecture that produces two different outputs. Their approach is based on Alex-net [13], and does not address the network architecture selection problem. In related work Zhou et al. [34] interlink CNNs that take input from re-scaled versions of the input image. The structure of their network is related to our fabric, but lacks a sparse connectivity pattern across channels. They consider their networks for semantic segmentation, and set the filter sizes per node manually, and 2 use strided max-pooling for down-sampling and nearest neighbor interpolation for up-sampling. The contribution of our work is to show that a similar network structure suffice to span a vast class of network architectures for both dense prediction and classification tasks. Springenberg et al. [29] experimentally observed that the use of max-pooling in CNN architectures is not always beneficial as opposed to using strided convolutions. In our work we go one step further and show that ReLU units and strided convolutions suffice to implement max-pooling operators in our fabrics. Their work, similar to ours, also strives to simplify architecture design. Our results, however, reach much further than only removing pooling operators from the architectural elements. Lee et al. [17] generalize the max and average pooling operators by computing both max and average pooling, and then fusing the result in a possibly data-driven manner. Our fabrics also generalize max and average pooling, but instead of adding elementary operators, we show that settings weights in a network with fewer elementary operators is enough for this generalization. Kulkarni et al. [14] use ℓ1 regularization to automatically select the number of units in “fullyconnected” layers of CNN architectures for classification. Although their approach does not directly extend to determine more general architectural design choices, it might be possible to use such regularization techniques to select the number of channels and/or layers of our fabrics. Dropout [30] and swapout [28] are stochastic training methods related to our work. They can be understood as approximately averaging over an exponential number of variations of a given architecture. Our approach, on the other hand, allows to leverage an exponentially large class of architectures (ordering of pooling and convolutional layers, type of pooling operator, etc.) by means of continuous optimization. Note that these approaches are orthogonal and can be applied to fabrics. 3 The fabric of convolutional neural networks In this section we give a precise definition of convolutional neural fabrics, and show in Section 3.2 that most architectural network design choices become irrelevant for sufficiently large fabrics. Finally, we analyze the number of response maps, parameters, and activations of fabrics in Section 3.3. 3.1 Weaving the convolutional neural fabric Each node in the fabric represents one response map with the same dimension D as the input signal (D = 1 for audio, D = 2 for images, D = 3 for video). The fabric over the nodes is spanned by three axes. A layer axis along which all edges advance, which rules out any cycles, and which is analogous to the depth axis of a CNN. A scale axis along which response maps of different resolutions are organized from fine to coarse, neighboring resolutions are separated by a factor two. A channel axis along which different response maps of the same scale and layer are organized. We use S = 1 + log2 N scales when we process inputs of size N D, e.g. for 32×32 images we use six scales, so as to obtain a scale pyramid from the full input resolution to the coarsest 1×1 response maps. We now define a sparse and homogeneous edge structure. Each node is connected to a 3×3 scale– channel neighborhood in the previous layer, i.e. activations at channel c, scale s, and layer l are computed as a(s, c, l) = P i,j∈{−1,0,1} conv a(c + i, s + j, l −1), wij scl . Input from a finer scale is obtained via strided convolution, and input from a coarser scale by convolution after upsampling by padding zeros around the activations at the coarser level. All convolutions use kernel size 3. Activations are thus a linear function over multi-dimensional neighborhoods, i.e. a four dimensional 3×3×3×3 neighborhood when processing 2D images. The propagation is, however, only convolutional across the input dimensions, and not across the scale and layer axes. The “fully connected” layers of a CNN correspond to nodes along the coarsest 1×1 scale of the fabric. Rectified linear units (ReLUs) are used at all nodes. Figure 1 illustrates the connectivity pattern in 2D, omitting the channel dimension for clarity. The supplementary material contains an illustration of the 3D fabric structure. All channels in the first layer at the input resolution are connected to all channels of the input signal. The first layer contains additional edges to distribute the signal across coarser scales, see the vertical edges in Figure 1. More precisely, within the first layer, channel c at scale s receives input from channels c + {−1, 0, 1} from scale s −1. Similarly, edges within the last layer collect the signal towards the output. Note that these additional edges do not create any cycles, and that the edge-structure within the first and last layer is reminiscent of the 2D trellis in Figure 1. 3 3.2 Stitching convolutional neural networks on the fabric We now demonstrate how various architectural choices can be “implemented” in fabrics, demonstrating they subsume an exponentially large class of network architectures. Learning will configure a fabric to behave as one architecture or another, but more generally as an ensemble of many of them. For all but the last of the following paragraphs, it is sufficient to consider a 2D trellis, as in Figure 1, where each node contains the response maps of C channels with dense connectivity among channels. Re-sampling operators. A variety of re-sampling operators is available in fabrics, here we discuss ones with small receptive fields, larger ones are obtained by repetition. Stride-two convolutions are used in fabrics on fine-to-coarse edges, larger strides are obtained by repetition. Average pooling is obtained in fabrics by striding a uniform filter. Coarse-to-fine edges in fabrics up-sample by padding zeros around the coarse activations and then applying convolution. For factor-2 bilinear interpolation we use a filter that has 1 in the center, 1/4 on corners, and 1/2 elsewhere. Nearest neighbor interpolation is obtained using a filter that is 1 in the four top-left entries and zero elsewhere. For max-pooling over a 2 × 2 region, let a and b represent the values of two vertically neighboring pixels. Use one layer and three channels to compute (a + b)/2, (a −b)/2, and (b −a)/2. After ReLU, a second layer can compute the sum of the three terms, which equals max(a, b). Each pixel now contains the maximum of its value and that of its vertical neighbor. Repeating the same in the horizontal direction, and sub-sampling by a factor two, gives the output of 2×2 max-pooling. The same process can also be used to show that a network of MaxOut units [4] can be implemented in a network of ReLU units. Although ReLU and MaxOut are thus equivalent in terms of the functions they can implement, for training efficiency it may be more advantageous to use MaxOut networks. Filter sizes. To implement a 5 × 5 filter we first compute nine intermediate channels to obtain a vectorized version of the 3×3 neighborhood at each pixel, using filters that contain a single 1, and are zero elsewhere. A second 3×3 convolution can then aggregate values across the original 5×5 patch, and output the desired convolution. Any 5×5 filter can be implemented exactly in this way, not only approximated by factorization, c.f. [27]. Repetition allows to obtain filters of any desired size. Ordering convolution and re-sampling. As shown in Figure 1, chain-structured networks correspond to paths in our fabrics. If weights on edges outside a path are set to zero, a chain-structured network with a particular sequencing of convolutions and re-sampling operators is obtained. A trellis that spans S + 1 scales and L + 1 layers contains more than L S chain-structured CNNs, since this corresponds to the number of ways to spread S sub-sampling operators across the L steps to go from the first to the last layer. More CNNs are embedded, e.g. by exploiting edges within the first and last layer, or by including intermediate up-sampling operators. Networks beyond chain-structured ones, see e.g. [3, 20, 26], are also embedded in the trellis, by activating a larger subset of edges than a single path, e.g. a tree structure for the multi-scale net of [3]. Channel connectivity pattern. Although most networks in the literature use dense connectivity across channels between successive layers, this is not a necessity. Krizhevsky et al. [13], for example, use a network that is partially split across two independent processing streams. In Figure 2 we demonstrate that a fabric which is sparsely connected along the channel axis, suffices to emulate densely connected convolutional layers. This is achieved by copying channels, convolving them, and then locally aggregating them. Both the copy and sum process are based on local channel interactions and convolutions with filters that are either entirely zero, or identity filters which are all zero except for a single 1 in the center. While more efficient constructions exist to represent the densely connected layer in our trellis, the one presented here is simple to understand and suffices to demonstrate feasibility. Note that in practice learning automatically configures the trellis. Both the copy and sum process generally require more than one layer to execute. In the copying process, intermediate ReLUs do not affect the result since the copied values themselves are non-negative outputs of ReLUs. In the convolve-and-sum process care has to be taken since one convolution might give negative outputs, even if the sum of convolutions is positive. To handle this correctly, it suffices to shift the activations by subtracting from the bias of every convolution i the minimum possible corresponding output amin i (which always exists for a bounded input domain). Using the adjusted bias, the output of the convolution is now guaranteed to be non-negative, and to propagate properly in the copy and sum process. In the last step of summing the convolved channels, we can add back P i amin i to shift the activations back to recover the desired sum of convolved channels. 4 Layers Channels a a a a a a a a a a a b a b b b b b b b b b c b a c c c b c c c . . . c . . . . . . d c c a d d c b d d d e d d d a e d d b e e e e e e a e e e b e —– —– a a a a d c + d + e —– . . . c —– a + b + c + d + e b a + b —– a —– —– . . . ... . . . . . . Figure 2: Representation of a dense-channel-connect layer in a fabric with sparse channel connections using copy and swap operations. The five input channels a, . . . , e are first copied; more copies are generated by repetition. Channels are then convolved and locally aggregated in the last two layers to compute the desired output. Channels in rows, layers in columns, scales are ignored for simplicity. Table 1: Analysis of fabrics with L layers, S scales, C channels. Number of activations given for D = 2 dim. inputs of size N ×N pixels. Channel doubling across scales used in the bottom row. # chan. / scale # resp. maps # parameters (sparse) # parameters (dense) # activations constant C · L · S C · L · 3D+1 · 3 · S C · L · 3D+1 · C · S C · L · N 2 · 4 3 doubling C · L · 2S C · L · 3D+1 · 3 · 2S C · L · 3D+1 · C · 4S · 7 18 C · L · N 2 · 2 3.3 Analysis of the number of parameters and activations For our analysis we ignore border effects, and consider every node to be an internal one. In the top row of Table 1 we state the total number of response maps throughout the fabric, and the number of parameters when channels are sparsely or densely connected. We also state the number of activations, which determines the memory usage of back-propagation during learning. While embedding an exponential number of architectures in the number of layers L and channels C, the number of activations and thus the memory cost during learning grows only linearly in C and L. Since each scale reduces the number of elements by a factor 2D, the total number of elements across scales is bounded by 2D/(2D −1) times the number of elements N D at the input resolution. The number of parameters is linear in the number of layers L, and number of scales S. For sparsely connected channels, the number of parameters grows also linearly with the number of channels C , while it grows quadratically with C in case of dense connectivity. As an example, the largest models we trained for 32×32 input have L = 16 layers and C = 256 channels, resulting in 2M parameters (170M for dense), and 6M activations. For 256×256 input we used upto L = 16 layers and C = 64 channels, resulting in 0.7 M parameters (16M for dense), and 89M activations. For reference, the VGG-19 model has 144M parameters and 14M activations. Channel-doubling fabrics. Doubling the number of channels when moving to coarser scales is used in many well-known architectures, see e.g. [26, 27]. In the second row of Table 1 we analyze fabrics with channel-doubling instead of a constant number of channels per scale. This results in C2S channels throughout the scale pyramid in each layer, instead of CS when using a constant number of channels per scale, where we use C to denote the number of “base channels” at the finest resolution. For 32×32 input images the total number of channels is roughly 11× larger, while for 256×256 images we get roughly 57× more channels. The last column of Table 1 shows that the number of activations, however, grows only by 50% due to the coarsening of the maps. With dense channel connections and 2D data, the amount of computation per node is constant, as at a coarser resolution there are 4× less activations, but interactions among 2×2 more channels. Therefore, in such fabrics the amount of computation grows linearly in the number of scales as compared to a single embedded CNN. For sparse channel connections, we adapt the local connectivity pattern between nodes to accommodate for the varying number channels per scale, see Figure 3 for an illustration. Each node still connects to nine other nodes at the previous layer: two inputs from scale s −1, three from scale s, and four from scale s + 1. The computational cost thus also grows only 5 Channels Scales Figure 3: Diagram of sparse channel connectivity from one layer to another in a channel-doubling fabric. Channels are laid out horizontally and scales vertically. Each internal node, i.e. response map, is connected to nine nodes at the previous layer: four channels at a coarser resolution, two at a finer resolution, and to itself and neighboring channels at the same resolution. by 50% as compared to using a constant number of channels per scale. In this case, the number of parameters grows by the same factor 2S/S as the number of channels. In case of dense connections, however, the number of parameters explodes with a factor 7 184S/S. That is, roughly a factor 265 for 32×32 input, and 11,327 for 256×256 input. Therefore, channel-doubling fabrics appear most useful with sparse channel connectivity. Experiments with channel-doubling fabrics are left for future work. 4 Experimental evaluation results In this section we first present the datasets used in our experiments, followed by evaluation results. 4.1 Datasets and experimental protocol Part Labels dataset. This dataset [10] consists of 2,927 face images from the LFW dataset [8], with pixel-level annotations into the classes hair, skin, and background. We use the standard evaluation protocol which specifies training, validation and test sets of 1,500, 500 and 927 images, respectively. We report accuracy at pixel-level and superpixel-level. For superpixel we average the class probabilities over the contained pixels. We used horizontal flipping for data augmentation. MNIST. This dataset [16] consists of 28×28 pixel images of the handwritten digits 0, . . . , 9. We use the standard split of the dataset into 50k training samples, 10k validation samples and 10k test samples. Pixel values are normalized to [0, 1] by dividing them by 255. We augment the train data by randomly positioning the original image on a 32×32 pixel canvas. CIFAR10. The CIFAR-10 dataset (http://www.cs.toronto.edu/~kriz/cifar.html) consists of 50k 32×32 training images and 10k testing images in 10 classes. We hold out 5k training images as validation set, and use the remaining 45k as the training set. To augment the data, we follow common practice, see e.g. [4, 18], and pad the images with zeros to a 40×40 image and then take a random 32×32 crop, in addition we add horizontally flipped versions of these images. Training. We train our fabrics using SGD with momentum of 0.9. After each node in the trellis we apply batch normalization [9], and regularize the model with weight decay of 10−4, but did not apply dropout [30]. We use the validation set to determine the optimal number of training epochs, and then train a final model from the train and validation data and report performance on the test set. We release our Caffe-based implementation at http://thoth.inrialpes.fr/~verbeek/fabrics. 4.2 Experimental results For all three datasets we trained sparse and dense fabrics with various numbers of channels and layers. In all cases we used a constant number of channels per scale. The results across all these settings can be found in the supplementary material, here we report only the best results from these. On all three datasets, larger trellises perform comparable or better than smaller ones. So in practice the choice of these only two hyper-parameters of our model is not critical, as long as a large enough trellis is used. Part Labels. On this data set we obtained a super-pixel accuracy of 95.6% using both sparse and dense trellises. In Figure 4 we show two examples of predicted segmentation maps. Table 2 compares our results with the state of the art, both in terms of accuracy and the number of parameters. Our results are slightly worse than [31, 33], but the latter are based on the VGG-16 network. That network has roughly 4, 000× more parameters than our sparse trellis, and has been trained from over 1M ImageNet images. We trained our model from scratch using only 2,000 images. Moreover, [10, 19, 31] also include CRF and/or RBM models to encode spatial shape priors. In contrast, our results with convolutional neural fabrics (CNF) are obtained by predicting all pixels independently. 6 Figure 4: Examples form the Part Labels test set: input image (left), ground-truth labels (middle), and superpixel-level labels from our sparse CNF model with 8 layers and 16 channels (right). Table 2: Comparison of our results with the state of the art on Part Labels. Year # Params. SP Acccur. P Accur. Tsogkas et al. [31] 2015 >414 M 96.97 — Zheng et al. [33] 2015 >138 M 96.59 — Liu et al. [19] 2015 >33 M — 95.24 Kae et al. [10] 2013 0.7 M 94.95 — Ours: CNF-sparse (L = 8, C = 16) 0.1 M 95.58 94.60 Ours: CNF-dense (L = 8, C = 64) 8.0 M 95.63 94.82 MNIST. We obtain error rates of 0.48% and 0.33% with sparse and dense fabrics respectively. In Table 3 we compare our results to a selection of recent state-of-the-art work. We excluded several more accurate results reported in the literature, since they are based on significantly more elaborate data augmentation methods. Our result with a densely connected fabric is comparable to those of [32], which use similar data augmentation. Our sparse model, which has 20× less parameters than the dense variant, yields an error of 0.48% which is slightly higher. CIFAR10. In Table 4 we compare our results to the state of the art. Our error rate of 7.43% with a dense fabric is comparable to that reported with MaxOut networks [4]. On this dataset the error of the sparse model, 18.89%, is significantly worse than the dense model. This is either due to a lack of capacity in the sparse model, or due to difficulties in optimization. The best error of 5.84% [22] was obtained using residual connections, without residual connections they report an error of 6.06%. Visualization. In Figure 5 we visualize the connection strengths of learned fabrics with dense channel connectivity. We observe qualitative differences between learned fabrics. The semantic segmentation model (left) immediately distributes the signal across the scale pyramid (first layer/column), and then progressively aggregates the multi-scale signal towards the output. In the CIFAR10 classification model the signal is progressively downsampled, exploiting multiple scales in each layer. The figure shows the result of heuristically pruning (by thresholding) the weakest connections to find a smaller sub-network with good performance. We pruned 67% of the connections while increasing the error only from 7.4% to 8.1% after fine-tuning the fabric with the remaining connections. Notice that all up-sampling connections are deactivated after pruning. Table 3: Comparison of our results with the state of the art on MNIST. Data augmentation with translation and flipping is denoted by T and F respectively, N denotes no data augmentation. Year Augmentation # Params. Error (%) Chang et al. [1] 2015 N 447K 0.24 Lee et al. [17] 2015 N 0.31 Wan et al. (Dropconnect) [32] 2013 T 379K 0.32 CKN [21] 2014 N 43 K 0.39 Goodfellow et al. (MaxOut) [4] 2013 N 420 K 0.45 Lin et al. (Network in Network) [18] 2013 N 0.47 Ours: CNF-sparse (L = 16, C = 32) T 249 K 0.48 Ours: CNF-dense (L = 8, C = 64) T 5.3 M 0.33 7 Table 4: Comparison of our results with the state of the art on CIFAR10. Data augmentation with translation, flipping, scaling and rotation are denoted by T, F, S and R respectively. Year Augmentation # Params. Error (%) Mishkin & Matas [22] 2016 T+F 2.5M 5.84 Lee et al. [17] 2015 T+F 1.8M 6.05 Chang et al. [1] 2015 T+F 1.6M 6.75 Springenberg et al. (All Convolutional Net) [29] 2015 T+F 1.3 M 7.25 Lin et al. (Network in Network) [18] 2013 T+F 1 M 8.81 Wan et al. (Dropconnect) [32] 2013 T+F+S+R 19M 9.32 Goodfellow et al. (MaxOut) [4] 2013 T+F >6 M 9.38 Ours: CNF-sparse (L = 16, C = 64) T+F 2M 18.89 Ours: CNF-dense (L = 8, C = 128) T+F 21.2M 7.43 Figure 5: Visualization of mean-squared filter weights in fabrics learned for Part Labels (left) and CIFAR10 (right, pruned network connections). Layers are laid out horizontally, and scales vertically. 5 Conclusion We presented convolutional neural fabrics: homogeneous and locally connected trellises over response maps. Fabrics subsume a large class of convolutional networks. They allow to sidestep the tedious process of specifying, training, and testing individual network architectures in order to find the best ones. While fabrics use more parameters, memory and computation than needed for each of the individual architectures embedded in them, this is far less costly than the resources required to test all embedded architectures one-by-one. Fabrics have only two main hyper-parameters: the number of layers and the number of channels. In practice their setting is not critical: we just need a large enough fabric with enough capacity. We propose variants with dense channel connectivity, and with channel-doubling over scales. The latter strikes a very attractive capacity/memory trade-off. In our experiments we study performance of fabrics for image classification on MNIST and CIFAR10, and of semantic segmentation on Part Labels. We obtain excellent results that are close to the best reported results in the literature on all three datasets. These results suggest that fabrics are competitive with the best hand-crafted CNN architectures, be it using a larger number of parameters in some cases (but much fewer on Part Labels). We expect that results can be further improved by using better optimization schemes such as Adam [12], using dropout [30] or dropconect [32] regularization, and using MaxOut units [4] or residual units [6] to facilitate training of deep fabrics with many channels. In ongoing work we experiment with channel-doubling fabrics, and fabrics for joint image classification, object detection, and segmentation. We also explore channel connectivity patterns in between the sparse and dense options used here. Finally, we work on variants that are convolutional along the scale-axis so as to obtain a scale invariant processing that generalizes better across scales. 8 Acknowledgment. We would like to thank NVIDIA for the donation of GPUs used in this research. This work has been partially supported by the LabEx PERSYVAL-Lab (ANR-11-LABX-0025-01). References [1] J.-R. Chang and Y.-S. Chen. Batch-normalized maxout network in network. Arxiv preprint, 2015. [2] T. Chen, I. Goodfellow, and J. Shlens. Net2net: Accelerating learning via knowledge transfer. In ICLR, 2016. [3] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Learning hierarchical features for scene labeling. PAMI, 35(8):1915–1929, 2013. [4] I. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In ICML, 2013. [5] A. Graves, S. Fernández, and J. Schmidhuber. Multi-dimensional recurrent neural networks. In ICANN, 2007. [6] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In ECCV, 2016. [7] S. Honari, J. Yosinski, P. Vincent, and C. Pal. Recombinator networks: Learning coarse-to-fine feature aggregation. In CVPR, 2016. [8] G. Huang, M. Ramesh, T. Berg, and E. Learned-Miller. Labeled faces in the wild: a database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, 2007. [9] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. [10] A. Kae, K. Sohn, H. Lee, and E. Learned-Miller. Augmenting CRFs with Boltzmann machine shape priors for image labeling. In CVPR, 2013. [11] N. Kalchbrenner, I. Danihelka, and A. Graves. Grid long short-term memory. In ICLR, 2016. [12] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [13] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [14] P. Kulkarni, J. Zepeda, F. Jurie, P. Pérez, and L. Chevallier. Learning the structure of deep architectures using ℓ1 regularization. In BMVC, 2015. [15] Y. LeCun, B. Boser, J. Denker, D. Henderson, R. Howard, W. Hubbard, and L. Jackel. Handwritten digit recognition with a back-propagation network. In NIPS, 1989. [16] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, pages 2278–2324, 1998. [17] C.-Y. Lee, P. Gallagher, and Z. Tu. Generalizing pooling functions in convolutional neural networks: Mixed, gated, and tree. 2016. [18] M. Lin, Q. Chen, and S. Yan. Network in network. In ICLR, 2014. [19] S. Liu, J. Yang, C. Huang, , and M.-H. Yang. Multi-objective convolutional learning for face labeling. In CVPR, 2015. [20] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [21] J. Mairal, P. Koniusz, Z. Harchaoui, and C. Schmid. Convolutional kernel networks. In NIPS, 2014. [22] D. Mishkin and J. Matas. All you need is a good init. In ICLR, 2016. [23] I. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Cross-stich networks for multi-task learning. In CVPR, 2016. [24] H. Noh, S. Hong, and B. Han. Learning deconvolution network for semantic segmentation. In ICCV, 2015. [25] T. Pfister, J. Charles, and A. Zisserman. Flowing ConvNets for human pose estimation in videos. In CVPR, 2015. [26] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention, 2015. [27] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [28] S. Singh, D. Hoiem, and D. Forsyth. Swapout: learning an ensemble of deep architectures. In NIPS, 2016. [29] J. Springenberg, A. Dosovitskiy andT. Brox, and M. Riedmiller. Striving for simplicity: The all convolutional net. In ICLR, 2015. [30] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014. [31] S. Tsogkas, I. Kokkinos, G. Papandreou, and A. Vedaldi. Deep learning for semantic part segmentation with high-level guidance. Arxiv preprint, 2015. [32] L. Wan, M. Zeiler, S. Zhang, Y. LeCun, and R. Fergus. Regularization of neural networks using DropConnect. In ICML, 2013. [33] H. Zheng, Y. Liu, M. Ji, F. Wu, and L. Fang. Learning high-level prior with convolutional neural networks for semantic segmentation. Arxiv preprint, 2015. [34] Y. Zhou, X. Hu, and B. Zhang. Interlinked convolutional neural networks for face parsing. In International Symposium on Neural Networks, 2015. 9 | 2016 | 21 |
6,117 | More Supervision, Less Computation: Statistical-Computational Tradeoffs in Weakly Supervised Learning Xinyang Yi†∗ Zhaoran Wang‡∗ Zhuoran Yang‡∗ Constantine Caramanis† Han Liu‡ †The University of Texas at Austin ‡Princeton University †{yixy,constantine}@utexas.edu ‡{zhaoran,zy6,hanliu}@princeton.edu {∗: equal contribution} Abstract We consider the weakly supervised binary classification problem where the labels are randomly flipped with probability 1 −α. Although there exist numerous algorithms for this problem, it remains theoretically unexplored how the statistical accuracies and computational efficiency of these algorithms depend on the degree of supervision, which is quantified by α. In this paper, we characterize the effect of α by establishing the information-theoretic and computational boundaries, namely, the minimax-optimal statistical accuracy that can be achieved by all algorithms, and polynomial-time algorithms under an oracle computational model. For small α, our result shows a gap between these two boundaries, which represents the computational price of achieving the information-theoretic boundary due to the lack of supervision. Interestingly, we also show that this gap narrows as α increases. In other words, having more supervision, i.e., more correct labels, not only improves the optimal statistical accuracy as expected, but also enhances the computational efficiency for achieving such accuracy. 1 Introduction Practical classification problems usually involve corrupted labels. Specifically, let {(xi, zi)}n i=1 be n independent data points, where xi ∈Rd is the covariate vector and zi ∈{0, 1} is the uncorrupted label. Instead of observing {(xi, zi)}n i=1, we observe {(xi, yi)}n i=1 in which yi is the corrupted label. In detail, with probability (1−α), yi is chosen uniformly at random over {0, 1}, and with probability α, yi = zi. Here α ∈[0, 1] quantifies the degree of supervision: a larger α indicates more supervision since we have more uncorrupted labels in this case. In this paper, we are particularly interested in the effect of α on the statistical accuracy and computational efficiency for parameter estimation in this problem, particularly in the high dimensional settings where the dimension d is much larger than the sample size n. There exists a vast body of literature on binary classification problems with corrupted labels. In particular, the study of randomly perturbed labels dates back to [1] in the context of random classification noise model. See, e.g., [12, 20] for a survey. Also, classification problems with missing labels are also extensively studied in the context of semi-supervised or weakly supervised learning by [14, 17, 21], among others. Despite the extensive study on this problem, its information-theoretic and computational boundaries remain unexplored in terms of theory. In a nutshell, the informationtheoretic boundary refers to the optimal statistical accuracy achievable by any algorithms, while the computational boundary refers to the optimal statistical accuracy achievable by the algorithms under a computational budget that has a polynomial dependence on the problem scale (d, n). Moreover, it remains unclear how these two boundaries vary along with α. One interesting question to ask is 29th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. how the degree of supervision affects the fundamental statistical and computational difficulties of this problem, especially in the high dimensional regime. In this paper, we sharply characterize both the information-theoretic and computational boundaries of the weakly supervised binary classification problems under the minimax framework. Specifically, we consider the Gaussian generative model where X|Z = z ∼N(µz, Σ) and z ∈{0, 1} is the true label. Suppose {(xi, zi)}n i=1 are n independent samples of (X, Z). We assume that {yi}n i=1 are generated from {zi}n i=1 in the aforementioned manner. We focus on the high dimensional regime, where d n and µ1 −µ0 is s-sparse, i.e., µ1 −µ0 has s nonzero entires. We are interested in estimating µ1 −µ0 from the observed samples {(xi, yi)}n i=1. By a standard reduction argument [24], the fundamental limits of this estimation task are captured by a hypothesis testing problem, namely, H0 : µ1 −µ0 = 0 versus H1 : µ1 −µ0 is s-sparse and (µ1 −µ0)Σ−1(µ1 −µ0) := γn > 0, (1.1) where γn denotes the signal strength that scales with n. Consequently, we focus on studying the fundamental limits of γn for solving this hypothesis testing problem. 1 0 n = s2 n s log d 2n Ecient Impossible n = o s log d n s log d 2n n = o s2 n s log d 2n , n = s log d n s log d 2n Intractable n Figure 1: Computational-statistical phase transitions for weakly supervised binary classification. Here α denotes the degree of supervision, i.e., the label is corrupted to be uniformly random with probability 1 −α, and γn is the signal strength, which is defined in (1.1). Here a ∧b denotes min{a, b}. Our main results are illustrated in Figure 1. Specifically, we identify the impossible, intractable, and efficient regimes for the statistical-computational phase transitions under certain regularity conditions. (i) For γn = o[ s log d/n ∧(1/α2 · s log d/n)], any algorithm is asymptotically powerless in solving the hypothesis testing problem. (ii) For γn = Ω[ s log d/n ∧(1/α2 · s log d/n)] and γn = o[ s2/n ∧(1/α2 · s log d/n)], any tractable algorithm that has a polynomial oracle complexity under an extension of the statistical query model [18] is asymptotically powerless. We will rigorously define the computational model in §2. (iii) For γn = Ω[ s2/n ∧(1/α2 · s log d/n)], there is an efficient algorithm with a polynomial oracle complexity that is asymptotically powerful in solving the testing problem. Here s log d/n ∧(1/α2 · s log d/n) gives the information-theoretic boundary, while s2/n ∧ (1/α2 · s log d/n) gives the computational boundary. Moreover, by a reduction from the estimation problem to the testing problem, these boundaries for testing imply the ones for estimating µ2 −µ1 as well. Consequently, there exists a significant gap between the computational and information-theoretic boundaries for small α. In other word, to achieve the information-theoretic boundary, one has to pay the price of intractable computation. As α tends to one, this gap between computational and information-theoretic boundaries narrows and eventually vanishes. This indicates that, having more supervision not only improves the statistical accuracy, as shown by the decay of information-theoretic boundary in Figure 1, but more importantly, enhances the computational efficiency by reducing the computational price for attaining information-theoretic optimality. This phenomenon — “more supervision, less computation” — is observed for the first time in this paper. 1.1 More Related Work, Our Contribution, and Notation Besides the aforementioned literature on weakly supervised learning and label corruption, our work is also connected to a recent line of work on statistical-computational tradeoffs [2–5, 8, 13, 15, 19, 26–28]. In comparison, we quantify the statistical-computational tradeoffs for weakly supervised learning for the first time. Furthermore, our results are built on an oracle computational model 2 in [8] that slightly extends the statistical query model [18], and hence do not hinge on unproven conjectures on computational hardness like planted clique. Compared with our work, [8] focuses on the computational hardness of learning heterogeneous models, whereas we consider the interplay between supervision and statistical-computational tradeoffs. A similar computational model is used in [27] to study structural normal mean model and principal component analysis, which exhibit different statistical-computational phase transitions. In addition, our work is related to sparse linear discriminant analysis and two-sample testing of sparse means, which correspond to our special cases of α = 1 and α = 0, respectively. See, e.g., [7, 23] for details. In contrast with their results, our results capture the effects of α on statistical and computational tradeoffs. In summary, the contribution of our work is two-fold: (i) We characterize the computational and statistical boundaries of the weakly supervised binary classification problem for the first time. Compared with existing results for other models, our results do not rely on unproven conjectures. (ii) Based on our theoretical characterization, we propose the “more supervision, less computation” phenomenon, which is observed for the first time. Notation. We denote the χ2-divergence between two distributions P, Q by Dχ2(P, Q). For two nonnegative sequences an, bn indexed by n, we use an = o(bn) as a shorthand for limn→∞an/bn = 0. We say an = Ω(bn) if an/bn ≥c for some absolute constant c > 0 when n is sufficiently large. We use a ∨b and a ∧b to denote max{a, b} and min{a, b}, respectively. For any positive integer k, we denote {1, 2, . . . , k} by [k]. For v ∈Rd, we denote by
v
p the p-norm of v. In addition, we denote the operator norm of a matrix A by |||A|||2. 2 Background In this section, we formally define the statistical model for weakly supervised binary classification. Then we follow it with the statistical query model that connects computational complexity and statistical optimality. 2.1 Problem Setup Consider the following Gaussian generative model for binary classification. For a random vector X ∈Rd and a binary random variable Z ∈{0, 1}, we assume X|Z = 0 ∼N(µ0, Σ), X|Z = 1 ∼N(µ1, Σ), (2.1) where P(Z = 0) = P(Z = 1) = 1/2. Under this model, the optimal classifier by Bayes rule corresponds to the Fisher’s linear discriminative analysis (LDA) classifier. In this paper, we focus on the noisy label setting where true label Z is replaced by a uniformly random label in {0, 1} with probability 1−α. Hence, α characterizes the degree of supervision in the model. In specific, if α = 0, we observe the true label Z, thus the problem belongs to supervised learning. Whereas if α = 1, the observed label is completely random, which contains no information of the model in (2.1). This setting is thus equivalent to learning a Gaussian mixture model, which is an unsupervised problem. In the general setting with noisy labels, we denote the observed label by Y , which is linked to the true label Z via P(Y = Z) = (1 + α)/2, P(Y = 1 −Z) = (1 −α)/2. (2.2) We consider the hypothesis testing problem of detecting whether µ0 = µ1 given n i.i.d. samples {yi, xi}n i=1 of (Y, X), namely H0 : µ0 = µ1 versus H1 : µ0 = µ1. (2.3) We focus on the high dimensional and sparse regime, where d n and µ0 −µ1 is s-sparse, i.e., µ0 −µ1 ∈B0(s), where B0(s) := {µ ∈Rd :
µ
0 ≤s}. Throughout this paper, use the sample size n to drive the asymptotics. We introduce a shorthand notation θ := (µ0, µ1, Σ, α) to represent the parameters of the aforementioned model. Let Pθ be the joint distribution of (Y, X) under our statistical model with parameter θ, and Pn θ be the product distribution of n i.i.d. samples accordingly. We denote the parameter spaces of the null and alternative hypotheses by G0 and G1 respectively. For any test function φ : {(yi, xi)}n i=1 →{0, 1}, the classical testing risk is defined as the summation of 3 type-I and type-II errors, namely Rn(φ; G0, G1) := sup θ∈G0 Pn θ(φ = 1) + sup θ∈G1 Pn θ(φ = 0). The minimax risk is defined as the smallest testing risk of all possible test functions, that is, R∗ n(G0, G1) := inf φ Rn(φ; G0, G1), (2.4) where the infimum is taken over all measurable test functions. Intuitively, the separation between two Gaussian components under H1 and the covariance matrix Σ together determine the hardness of detection. To characterize such dependence, we define the signalto-noise ratio (SNR) as ρ(θ) := (µ0 −µ1)Σ−1(µ0 −µ1). For any nonnegative sequence {γn}n≥1, let G1(γn) := {θ : ρ(θ) ≥γn} be a sequence of alternative parameter spaces with minimum separation γn. The following minimax rate characterizes the information-theoretic limits of the detection problem. Definition 2.1 (Minimax rate). We say a sequence {γ∗ n}n≥1 is a minimax rate if • For any sequence {γn}n≥1 satisfying γn = o(γ∗ n), we have limn→∞R∗ n[G0, G1(γn)] = 1; • For any sequence {γn}n≥1 satisfying γn = Ω(γ∗ n), we have limn→∞R∗ n[G0, G1(γn)] = 0. The minimax rate in Definition 2.1 characterizes the statistical difficulty of the testing problem. However, it fails to shed light on the computational efficiency of possible testing algorithms. The reason is that this concept does not make any computational restriction on the test functions. The minimax risk in (2.4) might be attained only by test functions that have exponential computational complexities. This limitation of Definition 2.1 motivates us to study statistical limits under computational constraints. 2.2 Computational Model Statistical query models [8–11, 18, 27] capture computational complexity by characterizing the total number of rounds an algorithm interacts with data. In this paper, we consider the following statistical query model, which admits bounded query functions but allows the responses of query functions to be unbounded. Definition 2.2 (Statistical query model). In the statistical query model, an algorithm A is allowed to query an oracle T rounds, but not to access data {(yi, xi)}n i=1 directly. At each round, A queries the oracle r with a query function q ∈QA , in which QA ⊆{q : {0, 1} × Rd →[−M, M]} denotes the query space of A . The oracle r outputs a realization of a random variable Zq ∈R satisfying P q∈QA |Zq −E[q(Y, X)]| ≤τq ≥1 −2ξ, where τq = [η(QA ) + log(1/ξ)] · M/n 2[η(QA ) + log(1/ξ)] · (M 2 −{E[q(Y, X)]}2) n. (2.5) Here τq > 0 is the tolerance parameter and ξ ∈[0, 1) is the tail probability. The quantity η(QA ) ≥0 in τq measures the capacity of QA in logarithmic scale, e.g., for countable QA , η(QA ) = log(|QA |). The number T is defined as the oracle complexity. We denote by R[ξ, n, T, η(QA )] the set of oracles satisfying (2.5), and by A(T) the family of algorithms that queries an oracle no more than T rounds. This version of statistical query model is used in [8], and reduces to the VSTAT model proposed in [9–11] by the transformation q(y, x) = q(y, x)/(2M) + 1/2 for any q ∈QA . The computational model in Definition 2.2 enables us to handle query functions that are bounded by an unknown and fixed number M. Note that that by incorporating the tail probability ξ, the response Zq is allowed to be unbounded. To understand the intuition behind Definition 2.2, we remark that (2.5) resembles the Bernstein’s inequality for bounded random variables [25] P 1 n n
i=1 q(Yi, Xi) −E[q(Y, X)] ≥t ≤2 exp t2 2Var[q(Y, X)] + Mt . (2.6) We first replace Var [q(Y, X)] by its upper bound M 2 −{E[q(Y, X)]}2, which is tight when q takes values in {−M, M}. Then inequality (2.5) is obtained by replacing n−1 n i=1 q(Yi, Xi) in (2.6) by Zq and then bounding the suprema over the query space QA . In the definition of τq in (2.5), we 4 incorporate the effect of uniform concentration over the query space QA by adding the quantity η(QA ), which measures the capacity of QA . In addition, under the Definition 2.2, the algorithm A does not interact directly with data. Such an restriction characterizes the fact that in statistical problems, the effectiveness of an algorithm only depends on the global statistical properties, not the information of individual data points. For instance, algorithms that only rely on the convergence of the empirical distribution to the population distribution are contained in the statistical query model; whereas algorithms that hinge on the first data point (y1, x1) is not allowed. This restriction captures a vast family of algorithms in statistics and machine learning, including applying gradient method to maximize likelihood function, matrix factorization algorithms, expectation-maximization algorithms, and sampling algorithms [9]. Based on the statistical query model, we study the minimax risk under oracle complexity constraints. For the testing problem (2.3), let A(Tn) be a class of testing algorithms under the statistical query model with query complexity no more than Tn, with {Tn}n≥1 being a sequence of positive integers depending on the sample size n. For any A ∈A(Tn) and any oracle r ∈R[ξ, n, Tn, η(QA )] that responds to A , let H(A , r) be the set of test functions that deterministically depend on A ’s queries to the oracle r and the corresponding responses. We use Pθ to denote the distribution of the random variables returned by oracle r when the model parameter is θ. For a general hypothesis testing problem, namely, H0 : θ ∈G0 versus H1 : θ ∈G1, the minimax testing risk with respect to an algorithm A and a statistical oracle r ∈R[ξ, n, Tn, η(QA )] is defined as R ∗ n(G0, G1; A , r) := inf φ∈H(A ,r) sup θ∈G0 Pθ(φ = 1) + sup θ∈G1 Pθ(φ = 0) . (2.7) Compared with the classical minimax risk in (2.4), the new notion in (2.7) incorporates the computational budgets via oracle complexity. In specific, we only consider the test functions obtained by an algorithm with at most Tn queries to a statistical oracle. If Tn is a polynomial of the dimensionality d, (2.7) characterizes the statistical optimality of computational efficient algorithms. This motivates us to define the computationally tractable minimax rate, which contrasts with Definition 2.1. Definition 2.3 (Computationally tractable minimax rate). Let G1(γn) := {θ : ρ(θ) ≥γn} be a sequence of model spaces with minimum separation γn, where ρ(θ) is the SNR. A sequence {γ∗ n}n≥1 is called a computationally tractable minimax rate if • For any sequence {γn}n≥1 satisfying γn = o(γ∗ n), any constant η > 0, and any A ∈A(dη), there exists an oracle r ∈R[ξ, n, Tn, η(QA )] such that limn→∞R ∗ n[G0, G1(γn); A , r] = 1; • For any sequence {γn}n≥1 satisfying γn = Ω(γ∗ n), there exist a constant η > 0 and an algorithm A ∈A(dη) such that, for any r ∈R[ξ, n, Tn, η(QA )], we have limn→∞R ∗ n[G0, G1(γn); A , r] = 0. 3 Main Results Throughout this paper, we assume that the covariance matrix Σ in (2.1) is known. Specifically, for some positive definite Σ ∈Rd×d, the parameter spaces of the null and alternative hypotheses are defined as G0(Σ) := {θ = (µ, µ, Σ, α) : µ ∈Rd}, (3.1) G1(Σ; γn) := {θ = (µ0, µ1, Σ, α) : µ0, µ1 ∈Rd, µ0 −µ1 ∈B0(s), ρ(θ) ≥γn}. (3.2) Accordingly, the testing problem of detecting whether µ0 = µ1 is to distinguish H0 : θ ∈G0(Σ) versus H1 : θ ∈G1(Σ; γn). (3.3) In §3.1, we present the minimax rate of the detection problem from an information-theoretic perspective. In §3.2, under the statistical query model introduced in §2.2, we provide a computational lower bound and a nearly matching upper bound that is achieved by an efficient testing algorithm. 3.1 Information-theoretic Limits Now we turn to characterize the minimax rate given in Definition 2.1. For parameter spaces (3.1) and (3.2) with known Σ, we show that in highly sparse setting where s = o( √ d), we have γ∗ n = s log d/n ∧(1/α2 · s log d/n), (3.4) 5 To prove (3.4), we first present a lower bound which shows that the hypothesis testing problem in (3.3) is impossible if γn = o(γ∗ n). Theorem 3.1. For the hypothesis testing problem in (3.3) with known Σ, we assume that there exists a small constant δ > 0 such that s = o(d1/2−δ). Let γ∗ n be defined in (3.4). For any sequence {γn}n≥1 such that γn = o(γ∗ n), any hypothesis test is asymptotically powerless, namely, lim n→∞sup Σ R∗ n[G0(Σ), G1(Σ; γn)] = 1. By Theorem 3.1, we observe a phase transition in the necessary SNR for powerful detection when α decreases from one to zero. Starting with rate s log d/n in the supervised setting where α = 1, the required SNR gradually increases as label qualities decrease. Finally, when α reaches zero, which corresponds to the unsupervised setting, powerful detection requires the SNR to be Ω( s log d/n). It is worth noting that when α = (s log d/n)1/4, we still have (n3s log d)1/4 uncorrupted labels. However, our lower bound (along with the upper bound shown in Theorem 3.2) indicates that the information contained in these uncorrupted labels are buried in the noise, and cannot essentially improve the detection quality compared with the unsupervised setting. Next we establish a matching upper bound for the detection problem in (3.3). We denote the condition number of the covariance matrix Σ by κ, i.e., κ := λmax(Σ)/λmin(Σ), where λmax(Σ) and λmin(Σ) are the largest and smallest eigenvalues of Σ, repectively. Note that marginally Y is uniformly distributed over {0, 1}. For ease of presentation, we assume that the sample size is 2n and each class contains exactly n data points. Note that we can always discard some samples in the larger class to make the sample sizes of both classes to be equal. Due to the law of large numbers, this trick will not affect the analysis of sample complexity in the sense of order wise. Given 2n i.i.d. samples {(yi, xi)}2n i=1 of (Y, X) ∈{0, 1} × Rd, we define wi = Σ−1/2(x2i −x2i−1), for all i ∈[n]. (3.5) In addition, we split the dataset {(yi, xi)}2n i=1 into two disjoint parts {(0, x(0) i )}n i=1 and {(1, x(1) i )}n i=1, and define ui = x(1) i −x(0) i , for all i ∈[n]. (3.6) We note that computing sample differences in (3.5) and (3.6) is critical for our problem because we focus on detecting the difference between µ0 and µ1, and computing differences can avoid estimating EPθ(X) that might be dense. For any integer s ∈[d], we define B2(s) := B0(s) ∩Sd−1 as the set of s-sparse vectors on the unit sphere in Rd. With {wi}n i=1 and {ui}n i=1, we introduce two test functions φ1 := 1 sup v∈B2(s) 1 n n
i=1 (vΣ−1wi)2 2vΣ−1v ≥1 + τ1 , (3.7) φ2 := 1 sup v∈B2(1) 1 n n
i=1 v, diag(Σ)−1/2ui ≥τ2 , (3.8) where τ1, τ2 > 0 are algorithmic parameters that will be specified later. To provide some intuitions, we consider the case where Σ = I. Test function φ1 seeks a sparse direction that explains the most variance of wi. Therefore, such a test is closely related to the sparse principal component detection problem [3]. Test function φ2 simply selects the coordinate of n−1 n i=1 ui that has the largest magnitude and compares it with τ2. This test is closely related to detecting sparse normal mean in high dimensions [16]. Based on these two ingredients, we construct our final testing function φ as φ = φ1 ∨φ2, i.e., if any of φ1 and φ2 is true, then φ rejects the null. The following theorem establishes a sufficient condition for test function φ to be asymptotically powerful. Theorem 3.2. Consider the testing problem (3.3) where Σ is known and has condition number κ. For test functions φ1 and φ2 defined in (3.7) and (3.8) with parameters τ1 and τ2 given by τ1 = κ s log(ed/s)/n, τ2 = 8 log d/n. We define the ultimate test function as φ = φ1 ∨φ2. We assume that s ≤C · d for some absolute constant Cs and n ≥64 · s log(ed/s). Then if γn ≥Cκ · [ s log(ed/s)/n ∧(1/α2 · s log d/n)], (3.9) 6 where C is an absolute constant, then test function φ is asymptotically powerful. In specific, we have sup θ∈G0(Σ) Pn θ(φ = 1) + sup θ∈G1(Σ;γn) Pn θ(φ = 0) ≤20/d. (3.10) Theorem 3.2 provides a non-asymptotic guarantee. When n goes to infinity, (3.10) implies that the test function φ is asymptotically powerful. When s = o( √ d) and κ is a constant, (3.9) yields γn = Ω[ s log d/n∧(1/α2·s log d/n)], which matches the lower bound given in Theorem 3.1. Thus we conclude that γ∗ n defined in (3.4) is the minimax rate of testing problem in (3.3). We remark that when s = Ω(d), α = 1, i.e., the standard (low-dimensional) setting of two sample testing, the bound provided in (3.9) is sub-optimal as [22] shows that SNR rate √ d/n is sufficient for asymptotically powerful detection when n = Ω( √ d). It is thus worth noting that we focus on the highly sparse setting s = o( √ d) and provided sharp minimax rate for this regime. In the definition of φ1 in (3.7), we search over the set B2(s). Since B2(s) contains d s distinct sets of supports, computing φ1 requires exponential running time. 3.2 Computational Limits In this section, we characterize the computationally tractable minimax rate γ∗ n given in Definition 2.3. Moreover, we focus on the setting where Σ is known a priori and the parameter spaces for the null and alternative hypotheses are defined in (3.1) and (3.2), respectively. The main result is that, in highly sparse setting where s = o( √ d), we have γ∗ n = s2/n ∧(1/α2 · s log d/n). (3.11) We first present the lower bound in the next result. Theorem 3.3. For the testing problem in (3.3) with Σ known a priori, we make the same assumptions as in Theorem 3.1. For any sequence {γn}n≥1 such that γn = o γ∗ n ∨ s2/n ∧(1/α2 · s/n) , (3.12) where γ∗ n is defined in (3.4), any computationally tractable test is asymptotically powerless under the statistical query model. That is, for any constant η > 0 and any A ∈A(dη), there exists an oracle r ∈R[ξ, n, Tn, η(QA )] such that limn→∞R ∗ n[G0(Σ), G1(Σ, γn); A , r] = 1. We remark that the lower bound in (3.12) differs from γ∗ n in (3.11) by a logarithmic term when 1/n ≤α2 ≤ s log d/n. We expect this gap to be eliminated by more delicate analysis under the statistical query model. Now putting Theorems 3.1 and 3.3 together, we describe the “more supervision, less computation” phenomenon as follows. (i) When 0 ≤α ≤(log2 d/n)1/4, the computational lower bound implies that the uncorrupted labels are unable to improve the quality of computationally tractable detection compared with the unsupervised setting. In addition, in this region, the gap between γ∗ n and γ∗ n remains the same. (ii) When (log2 d/n)1/4 < α ≤(s log d/n)1/4, the information-theoretic lower bound shows that the uncorrupted labels cannot improve the quality of detection compared with unsupervised setting. However, more uncorrupted labels improve the statistical performances of hypothesis tests that are computationally tractable by shrinking the gap between γ∗ n and γ∗ n. (iii) When (s log d/n)1/4 < α ≤1, having more uncorrupted labels improves both statistical optimality and the computational efficiency. In specific, in this case, the gap between γ∗ n and γ∗ n vanishes and we have γ∗ n = γ∗ n = 1/α2 · s log d/n. Now we derive a nearly matching upper bound under the statistical query model, which establishes the computationally tractable minimax rate together with Theorem 3.3. We construct a computationally efficient testing procedure that combines two test functions which yields the two parts in γ∗ n respectively. Similar to φ1 defined in (3.7), the first test function discards the information of labels, which works for the purely unsupervised setting where α = 0. For j ∈[d], we denote by σj the j-th diagonal element of Σ. Under the statistical query model, we consider the 2d query functions qj(y, x) := xj/√σj · 1{|xj/√σj| ≤R · log d}, (3.13) qj(y, x) := (x2 j/σj −1) · 1{|xj/√σj| ≤R · log d}, for all j ∈[d], (3.14) 7 where R > 0 is an absolute constant. Here we apply truncation to the query functions to obtain bounded queries, which is specified by the statistical query model in Definition 2.2. We denote by zqj and zqj the realizations of the random variables output by the statistical oracle for query functions qj and qj, respectively. As for the second test function, similar to (3.8), we consider qv(y, x) = (2y −1) · vdiag(Σ)−1/2x · 1 |vdiag(Σ)−1/2x| ≤R · log d (3.15) for all v ∈B2(1). We denote by Zqv the output of the statistical oracle corresponding to query function qv. With these 4d query functions, we introduce test functions φ1 := 1 sup j∈[d] (zqj −z2 qj) ≥Cτ 1 , φ2 := 1 sup v∈B2(1) zqv ≥2τ 2 , (3.16) where τ 1 and τ2 are positive parameters that will be specified later and C is an absolute constant. Theorem 3.4. For the test functions φ1 and φ2 defined in (3.16) , we define the ultimate test function as φ = φ1 ∨φ2. We set τ 1 = R2 log d · log(4d/ξ)/n, τ 2 = R log d · log(4d/ξ)/n, (3.17) where ξ = o(1). For the hypothesis testing problem in (3.3), we further assume that
µ0
∞∨
µ1
∞≤C0 for some constant C0 > 0. Under the assumption that sup j∈[d] (µ0,j −µ1,j)2/σj = Ω 1/α2 · log2 d · log(d/ξ)/n ∧log d · log(d/ξ)/n , (3.18) the risk of φ satisfies that R ∗ n(φ) = supθ∈G0(Σ) Pθ(φ = 1) + supθ∈G1(Σ,γn) Pθ(φ = 0) ≤5ξ. Here we denote by µ0,j and µ1,j the j-th entry of µ0 and µ1, respectively. If we set the tail probability of the statistical query model to be ξ = 1/d, (3.18) shows that φ is asymptotically powerful if supj∈[d](µ0,j −µ1,j)2/σj = Ω[(1/α2 · log3 d/n) ∧(log3 d/n)1/2]. When the energy of µ0 −µ1 is spread over its support,
µ0 −µ1
∞and
µ0 −µ1
2/√s are close. Under the assumption that the condition number κ of Σ is a constant, (3.18) is implied by γn (s2 log3 d/n)1/2 ∧(1/α2 · s log3 d/n). Compared with Theorem 3.3, the above upper bound matches the computational lower bound up to a logarithmic factor and γ∗ n is between s2/n ∧(1/α2 · s log d/n) and (s2 log3 d/n)1/2 ∧(1/α2 · s log3 d/n). Note that the truncation on query functions in (3.13) and (3.14) yields an additional logarithmic term, which could be reduced to (s2 log d/n)1/2 ∧(1/α2 ·s log d/n) using more delicate analysis. Moreover, the test function φ1 is essentially based on a diagonal thresholding algorithm performed on the covariance matrix of X. The work in [6] provides a more delicate analysis of this algorithm which establishes the s2/n rate. Their algorithm can also be formulated into the statistical query model; we use the simpler version in (3.16) for ease of presentation. Therefore, with more sophicated proof techinique, it can be shown that s2/n ∧(1/α2 · s log d/n) is the critical threshold for asymptotically powerful detection with computational efficiency. 3.3 Implication for Estimation Our aforementioned phase transition in the detection problems directly implies the statistical and computational trade-offs in the problem of estimation. We consider the problem of estimating the parameter ∆µ = µ0 −µ1 of the binary classification model in (2.1) and (2.2), where ∆µ is s-sparse and Σ is known a priori. We assume that the signal to noise ratio is ρ(θ) = ∆µΣ−1∆µ ≥γn = o(γ∗ n). For any constant η > 0 and any A ∈A(T) with T = O(dη), suppose we obtain an estimator ∆µ of ∆µ by algorithm A under the statistical query model. If ∆µ converges to ∆µ in the sense that (∆µ −∆µ)Σ−1(∆µ −∆µ) = o[γ2 n/ρ(θ)], we have |∆µΣ−1∆µ −∆µΣ−1∆µ| = o(γn). Thus the test function φ = 1{∆µΣ∆µ ≥ γn/2} is asymptotically powerful, which contradicts the computational lower bound in Theorem 3.3. Therefore, there exists a constant C such that (∆µ −∆µ)Σ−1(∆µ −∆µ) ≥Cγ2 n/ρ(θ) for any estimator ∆µ constructed from polynomial number of queries. Acknowledgments We would like to thank Vitaly Feldman for valuable discussions. 8 References [1] Angluin, D. and Laird, P. (1988). Learning from noisy examples. Machine Learning, 2 343–370. [2] Berthet, Q. and Rigollet, P. (2013). Computational lower bounds for sparse PCA. In Conference on Learning Theory. [3] Berthet, Q. and Rigollet, P. (2013). Optimal detection of sparse principal components in high dimension. The Annals of Statistics, 41 1780–1815. [4] Chandrasekaran, V. and Jordan, M. I. (2013). Computational and statistical tradeoffs via convex relaxation. Proceedings of the National Academy of Sciences, 110 1181–1190. [5] Chen, Y. and Xu, J. (2014). Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. arXiv preprint arXiv:1402.1267. [6] Deshpande, Y. and Montanari, A. (2014). Sparse PCA via covariance thresholding. In Advances in Neural Information Processing Systems. [7] Fan, J., Feng, Y. and Tong, X. (2012). A road to classification in high dimensional space: The regularized optimal affine discriminant. Journal of the Royal Statistical Society: Series B, 74 745–771. [8] Fan, J., Liu, H., Wang, Z. and Yang, Z. (2016). Curse of heterogeneity: Computational barriers in sparse mixture models and phase retrieval. Manuscript. [9] Feldman, V., Grigorescu, E., Reyzin, L., Vempala, S. and Xiao, Y. (2013). Statistical algorithms and a lower bound for detecting planted cliques. In ACM Symposium on Theory of Computing. [10] Feldman, V., Guzman, C. and Vempala, S. (2015). Statistical query algorithms for stochastic convex optimization. arXiv preprint arXiv:1512.09170. [11] Feldman, V., Perkins, W. and Vempala, S. (2015). On the complexity of random satisfiability problems with planted solutions. In ACM Symposium on Theory of Computing. [12] Frénay, B. and Verleysen, M. (2014). Classification in the presence of label noise: A survey. IEEE Transactions on Neural Networks and Learning Systems, 25 845–869. [13] Gao, C., Ma, Z. and Zhou, H. H. (2014). Sparse CCA: Adaptive estimation and computational barriers. arXiv preprint arXiv:1409.8565. [14] Garcıa-Garcıa, D. and Williamson, R. C. (2011). Degrees of supervision. In Advances in Neural Information Processing Systems. [15] Hajek, B., Wu, Y. and Xu, J. (2014). Computational lower bounds for community detection on random graphs. arXiv preprint arXiv:1406.6625. [16] Johnstone, I. M. (1994). On minimax estimation of a sparse normal mean vector. The Annals of Statistics, 22 271–289. [17] Joulin, A. and Bach, F. R. (2012). A convex relaxation for weakly supervised classifiers. In International Conference on Machine Learning. [18] Kearns, M. (1993). Efficient noise-tolerant learning from statistical queries. In ACM Symposium on Theory of Computing. [19] Ma, Z. and Wu, Y. (2014). Computational barriers in minimax submatrix detection. The Annals of Statistics, 43 1089–1116. [20] Nettleton, D. F., Orriols-Puig, A. and Fornells, A. (2010). A study of the effect of different types of noise on the precision of supervised learning techniques. Artificial Intelligence Review, 33 275–306. [21] Patrini, G., Nielsen, F., Nock, R. and Carioni, M. (2016). Loss factorization, weakly supervised learning and label noise robustness. arXiv preprint arXiv:1602.02450. [22] Ramdas, A., Singh, A. and Wasserman, L. (2016). Classification accuracy as a proxy for two sample testing. arXiv preprint arXiv:1602.02210. [23] Tony Cai, T., Liu, W. and Xia, Y. (2014). Two-sample test of high dimensional means under dependence. Journal of the Royal Statistical Society: Series B, 76 349–372. [24] Tsybakov, A. B. (2008). Introduction to nonparametric estimation. Springer. [25] Vershynin, R. (2010). Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027. [26] Wang, T., Berthet, Q. and Samworth, R. J. (2014). Statistical and computational trade-offs in estimation of sparse principal components. arXiv preprint arXiv:1408.5369. [27] Wang, Z., Gu, Q. and Liu, H. (2015). Sharp computational-statistical phase transitions via oracle computational model. arXiv preprint arXiv:1512.08861. [28] Zhang, Y., Wainwright, M. J. and Jordan, M. I. (2014). Lower bounds on the performance of polynomialtime algorithms for sparse linear regression. In Conference on Learning Theory. 9 | 2016 | 210 |
6,118 | On statistical learning via the lens of compression Ofir David Department of Mathematics Technion - Israel Institute of Technology ofirdav@tx.technion.ac.il Shay Moran Department of Computer Science Technion - Israel Institute of Technology shaymrn@cs.technion.ac.il Amir Yehudayoff Department of Mathematics Technion - Israel Institute of Technology amir.yehudayoff@gmail.com Abstract This work continues the study of the relationship between sample compression schemes and statistical learning, which has been mostly investigated within the framework of binary classification. The central theme of this work is establishing equivalences between learnability and compressibility, and utilizing these equivalences in the study of statistical learning theory. We begin with the setting of multiclass categorization (zero/one loss). We prove that in this case learnability is equivalent to compression of logarithmic sample size, and that uniform convergence implies compression of constant size. We then consider Vapnik’s general learning setting: we show that in order to extend the compressibility-learnability equivalence to this case, it is necessary to consider an approximate variant of compression. Finally, we provide some applications of the compressibility-learnability equivalences. 1 Introduction This work studies statistical learning theory using the point of view of compression. The main theme in this work is establishing equivalences between learnability and compressibility, and making an effective use of these equivalences to study statistical learning theory. In a nutshell, the usefulness of these equivalences stems from that compressibility is a combinatorial notion, while learnability is a statistical notion. These equivalences, therefore, translate statistical statements to combinatorial ones and vice versa. This translation helps to reveal properties that are otherwise difficult to find, and highlights useful guidelines for designing learning algorithms. We first consider the setting of multiclass categorization, which is used to model supervised learning problems using the zero/one loss function, and then move to Vapnik’s general learning setting [23], which models many supervised and unsupervised learning problems. Zero/one loss function (Section 3) This is the setting in which sample compression schemes were defined by Littlestone and Warmuth [16], as an abstraction of a common property of many learning algorithms. For more background on sample compression schemes, see e.g. [16, 8, 9, 22]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. We use an agnostic version of sample compression schemes, and show that learnability is equivalent to some sort of compression. More formally, that any learning algorithm can be transformed to a compression algorithm, compressing a sample of size m to a sub-sample of size roughly log(m), and that such a compression algorithm implies learning. This statement is based on arguments that appear in [16, 10, 11]. We conclude this part by describing some applications: (i) Equivalence between PAC and agnostic PAC learning from a statistical perspective (i.e. in terms of sample complexity). For binary-labelled classes, this equivalence follows from basic arguments in Vapnik-Chervonenkis (VC) theory, but these arguments do not seem to extend when the number of labels is large. (ii) A dichotomy for sample compression - if a non-trivial compression exists (e.g. compressing a sample of size m to a sub-sample of size m0.99), then a compression to logarithmic size exists (i.e. to a sub-sample of size roughly log m). This dichotomy is analogous to the known dichotomy concerning the growth function of binary-labelled classes: the growth function is either polynomial (when the VC dimension is finite), or exponential (when the VC dimension is infinite). (iii) Compression to constant size versus uniform convergence - every class with the uniform convergence property has a compression of constant size. The proof has two parts. The first part, which is based on arguments from [18], shows that finite graph dimension (a generalization of VC dimension for multiclass categorization [19]) implies compression of constant size. The second part, which uses ideas from [1, 24, 7], shows that the uniform convergence rate is captured by the graph dimension. In this part we improve upon the previously known bounds. (iv) Compactness for learning - if finite sub-classes of a given class are learnable, then the class is learnable as well. Again, for binary-labelled classes, such compactness easily follows from known properties of VC dimension. For general multi-labeled classes we derive this statement using a corresponding compactness property for sample compression schemes, based on the work by [2]. General learning setting (Section 4). We continue with investigating general loss functions. This part begins with a simple example in the context of linear regression, showing that for general loss functions, learning is not equivalent to compression. We then consider an approximate variant of compression schemes, which was used by [13, 12] in the context of classification, and observe that learnability is equivalent to possessing an approximate compression scheme, whose size is roughly the statistical sample complexity. This is in contrast to (standard) sample compression schemes, for which the existence of such an equivalence (under the zero/one loss) is a long standing open problem, even in the case of binary classification [25]. We conclude the paper by showing that - unlike for zero/one loss functions - for general loss functions, PAC learnability and agnostic PAC learnability are not equivalent. In fact, this is derived for a loss function that takes just three values. The proof of this non-equivalence uses Ramsey theory for hypergraphs. The combinatorial nature of compression schemes allows to clearly identify the place where Ramsey theory is helpful. More generally, the study of statistical learning theory via the lens of compression may shed light on additional useful connections with different fields of mathematics. We begin our investigation by breaking the definition of sample compression schemes into two parts. The first part (which may seem useless at first sight) is about selection schemes. These are learning algorithms whose output hypothesis depends on a selected small sub-sample of the input sample. The second part of the definition is the sample-consistency guarantee; so, sample compression schemes are selection schemes whose output hypothesis is consistent with the input sample. We then show that selection schemes of small size do not overfit in that their empirical risk is close to their true risk. Roughly speaking, this shows that for selection schemes there are no surprises: “what you see is what you get”. 2 Preliminaries The definitions we use are based on the textbook [22]. Learnability and uniform convergence A learning problem is specified by a set H of hypotheses, a domain Z of examples, and a loss function ℓ: H × Z →R+. To ease the presentation, we shall only discuss loss functions that are bounded 2 from above by 1, although the results presented here can be extended to more general loss functions. A sample S is a finite sequence S = (z1, . . . , zm) ∈Zm. A learning algorithm is a mapping that gets as an input a sample and outputs an hypothesis h. In the context of supervised learning, hypotheses are functions from a domain X to a label set Y, and the examples domain is the cartesian product Z := X × Y. In this context, the loss ℓ(h, (x, y)) depends only on h(x) and y, and therefore in this case we it is modelled as a function ℓ: Y × Y →R+. Given a distribution D on Z, the risk of an hypothesis h : X →Y is its expected loss: LD(h) = Ez∼D [ℓ(h, z)] . Given a sample S = (z1, . . . , zm), the empirical risk of an hypothesis h is LS(h) = 1 m Pm i=1 ℓ(h, z). An hypothesis class H is a set of hypotheses. A distribution D is realizable by H if there exists h ∈H such that LD(h) = 0. A sample S is realizable by H if there exists h ∈H such that LS(h) = 0. A hypothesis class H has the uniform convergence property1 if there exists a rate function d : (0, 1)2 →N such that for every ϵ, δ > 0 and distribution D over Z, if S is a sample of m ≥d(ϵ, δ) i.i.d. pairs generated by D, then with probability at least 1−δ we have: ∀h ∈H |LD(h)−LS(h)| ≤ϵ. The class H is agnostic PAC learnable if there exists a learner A and a rate function d : (0, 1)2 →N such that for every ϵ, δ > 0 and distribution D over Z, if S is a sample of m ≥d(ϵ, δ) i.i.d. pairs generated by D, then with probability at least 1 −δ we have LD(A(S)) ≤infh∈H LD(h) + ϵ. The class H is PAC learnable if this condition holds for every realizable distribution D. The parameter ϵ is referred to as the error parameter and δ as the confidence parameter. Note that the uniform convergence property implies agnostic PAC learnability with the same rate via any learning algorithm which outputs h ∈H that minimizes the empirical risk, and that agnostic PAC learnability implies PAC learnability with the same rate. Selection and compression schemes The variants of sample compression schemes that are discussed in this paper, are based on the following object, which we term selection scheme. We stress here that unlike sample compression schemes, selection schemes are not associated with any hypothesis class. A selection scheme is a pair (κ, ρ) of maps for which the following holds: • κ is called the selection map. It gets as an input a sample S and outputs a pair (S′, b) where S′ is a sub-sample2 of S and b is a finite binary string, which we think of as side information. • ρ is called the reconstruction map. It gets as an input a pair (S′, b) of the same type as the output of κ and outputs an hypothesis h. The size of (κ, ρ) on a given input sample S is defined to be |S′| + |b| where κ(S) = (S′, b). For an input size m, we denote by k(m) the maximum size of the selection scheme on all inputs S of size at most m. The function k(m) is called the size of the selection scheme. If k(m) is uniformly bounded by a constant, which does not depend on m, then we say that the selection scheme has a constant size; otherwise, we say that it has a variable size. The definition of selection schemes is very similar to that of sample compression schemes. The difference is that sample compression schemes are defined relative to a fixed hypothesis class with respect to which they are required to have “correct” reconstructions whereas selection schemes do not provide any correctness guarantee. The distinction between the ‘selection’ part and the ‘correctness’ part is helpful for our presentation, and also provides some more insight into these notions. A selection scheme (κ, ρ) is a sample compression scheme for H if for every sample S that is realizable by H, LS (ρ (κ (S))) = 0. A selection scheme (κ, ρ) is an agnostic sample compression scheme for H if for every sample S, LS (ρ (κ (S))) ≤infh∈H LS(h). In the following sections, we will see different manifestations of the statement “compression ⇒ learning”. An essential part of these statements boils down to a basic property of selection schemes, 1We omit the dependence on the loss function ℓfrom this and similar definitions, since ℓis clear from the context. 2That is, if S = (z1, . . . , zm) then S′ is of the form (zi1, . . . , ziℓ) for 1 ≤i1 < . . . < iℓ≤m. 3 that as long as k(m) is sufficiently smaller than m, a selection scheme based learner does not overfit its training data (the proof appears in the full version of this paper). Theorem 2.1 ([22, Theorem 30.2]). Let (κ, ρ) be a selection scheme of size k = k(m), and let A(S) = ρ (κ (S)). Then, for every distribution D on Z, integer m such that k ≤m/2, and δ > 0, we have Pr S∼Dm h |LD (A (S)) −LS (A (S))| ≥ p ϵ · LS (A (S)) + ϵ i ≤δ, where ϵ = 50 k log(m/k)+log(1/δ) m . 3 Zero/one loss functions In this section we consider the zero/one loss function, which models categorization problems. We study the relationships between uniform convergence, learnability, and sample compression schemes under this loss. Subsection 3.1 establishes equivalence between learnability and compressibility of a sublinear size. In Subsection 3.2 we use this equivalence to study the relationships between the properties of uniform convergence, PAC, and agnostic learnability. In Subsection 3.2.1 we show that agnostic learnability is equivalent to PAC learnability, In Subsection 3.2.2 we observe a dichotomy concerning the size of sample compression schemes, and use it to establish a compactness property of learnability. Finally, in Subsection 3.2.3 we study an extension of the Littlestone-Floyd-Warmuth conjecture concerning an equivalence between learnability and sample compression schemes of fixed size. 3.1 Learning is equivalent to sublinear compressing The following theorem shows that if H has a sample compression scheme of size k = o(m), then it is learnable. Its proof appears in the full version of this paper. Theorem 3.1 (Compressing implies learning [16]). Let (κ, ρ) be a selection scheme of size k, let H be a hypothesis class, and let D be a distribution on Z. 1. If (κ, ρ) is a sample compression scheme for H, and m is such that k(m) ≤m/2, then Pr S∼Dm LD (ρ (κ (S))) > 50k log m k + k + log 1 δ m < δ. 2. If (κ, ρ) is an agnostic sample compression scheme for H, and m is such that k(m) ≤m/2, then Pr S∼Dm LD (ρ (κ (S))) > inf h∈H LD(h) + 100 s k log m k + k + log 1 δ m < δ. The following theorem shows that learning implies compression. We present its proof in the full version of this paper. Theorem 3.2 (Learning implies compressing). Let H be an hypothesis class. 1. If H is agnostic PAC learnable with learning rate d(ϵ, δ), then it is PAC learnable with the same learning rate. 2. If H is PAC learnable with learning rate d(ϵ, δ), then it has a sample compression scheme of size k(m) = O(d0 log(m) log log(m) + d0 log(m) log(d0)), where d0 = d(1/3, 1/3). 3. If H has a sample compression scheme of size k(m), then it has an agnostic sample compression scheme of the same size. Remark. The third part in Theorem 3.2 does not hold when the loss function is general. In Section 4 we show that even if the loss function takes three possible values, then there are instances where a class has a sample compression scheme but not an agnostic sample compression scheme. 4 3.2 Applications 3.2.1 Agnostic and PAC learnability are equivalent Theorems 3.1 and 3.2 imply that if H is PAC learnable, then it is agnostic PAC learnable. Indeed, a summary of the implications between learnability and compression given by Theorems 3.1 and 3.2 gives: • An agnostic learner with rate d (ϵ, δ) implies a PAC learner with rate d (ϵ, δ). • A PAC learner with rate d (ϵ, δ) implies a sample compression scheme of size k (m) = O (d0 · log (m) log (d0 · log (m))) where d0 = d(1/3, 1/3). • A sample compression scheme of size k (m) implies an agnostic sample compression scheme of size k (m). • An agnostic sample compression scheme of size k (m) implies an agnostic learner with error ϵ (d, δ) = 100 q k(d) log d k(d) +k(d)+log 1 δ d . Thus, for multiclass categorization problems, agnostic learnability and PAC learnability are equivalent. When the size of the label set Y is O(1), this equivalence follows from previous works that studied extensions of the VC dimension to multiclass categorization problems [24, 3, 19, 1]. These works show that PAC learnability and agnostic PAC learnability are equivalent to the uniform convergence property, and therefore any ERM algorithm learns the class. Recently, [7] separated PAC learnability and uniform convergence for large label sets by exhibiting PAC learnable hypothesis classes that do not satisfy the uniform convergence property. In contrast, this shows that the equivalence between PAC and agnostic learnability remains valid even when Y is large. 3.2.2 A dichotomy and compactness Let H be an hypothesis class. Assume that H has a sample compression scheme of size, say, m/500 for some large m. Therefore, by Theorem 3.1, H is weakly PAC learnable with confidence 2/3, error 1/3, and O(1) examples. Now, Theorem 3.2 implies that H has a sample compression scheme of size k(m) ≤O(log(m) log log(m)). In other words, the following dichotomy holds: every hypothesis class H either has a sample compression scheme of size k(m) = O(log(m) log log(m)), or any sample compression scheme for it has size Ω(m). This dichotomy implies the following compactness property for learnability under the zero/one loss. Theorem 3.3. Let d ∈N, and let H be an hypothesis class such that each finite subclass of H is learnable with error 1/3, confidence 2/3 and d examples. Then H is learnable with error 1/3, confidence 2/3 and O(d log2(d) log log(d)) examples. When Y = {0, 1}, the theorem follows by the observing that if every subclass of H has VC dimension at most d, then the VC dimension of H is at most d. We are not aware of a similar argument that applies for a general label set. A related challenge, which was posed by [6], is to find a “combinatorial” parameter, which captures multiclass learnability like the VC dimension captures it in the binary-labeled case. A proof of Theorem 3.3 appears in the full version of this paper. It uses an analogous3 compactness property for sample compression schemes proven by [2]. 3.2.3 Uniform convergence versus compression to constant size Since the introduction of sample compression schemes by [16], they were mostly studied in the context of binary-labeled hypothesis classes (the case Y = {0, 1}). In this context, a significant number of works were dedicated to studying the relationship between VC dimension and the minimal size of a compression scheme (e.g. [8, 14, 9, 2, 15, 4, 21, 20, 17]). Recently, [18] proved that any class of VC dimension d has a compression scheme of size exponential in the VC dimension. Establishing whether a compression scheme of size linear (or even polynomial) in the VC dimension remains open [9, 25]. 3Ben-David and Litman proved a compactness result for sample compression schemes when Y = {0, 1}, but their argument generalizes for a general Y. 5 This question has a natural extension to multiclass categorization: Does every hypothesis class H have a sample compression scheme of size O(d), where d = dP AC(1/3, 1/3) is the minimal sample complexity of a weak learner for H? In fact, in the case of multiclass categorization it is open whether there is a sample compression scheme of size depending only on d. We show here that the arguments from [18] generalize to uniform convergence. Theorem 3.4. Let H be an hypothesis class with uniform convergence rate dUC(ϵ, δ). Then H has a sample compression scheme of size exp(d), where d = dUC(1/3, 1/3). The proof of this theorem uses the notion of the graph dimension, which was defined by [19]. Theorem 3.4 is proved using the following two ingredients. First, the construction in [18] yields a sample compression scheme of size exp(dimG(H)). Second, the graph dimension determines the uniform convergence rate, similarly to that the VC dimension does it in the binary-labeled case. Theorem 3.5. Let H be an hypothesis class, let d = dimG(H), and let dUC(ϵ, δ) denote the uniform convergence rate of H. Then, there exist constants C1, C2 such that C1 · d + log(1/δ) −C1 ϵ2 ≤dUC(ϵ, δ) ≤C2 · d log(1/ϵ) + log(1/δ) ϵ2 . Parts of this result are well-known and appear in the literature: The upper bound follows from Theorem 5 of [7], and the core idea of the argument dates back to the articles of [1] and of [24]. A lower bound with a worse dependence on ϵ follows from Theorem 9 of [7]. A proof of Theorem 3.5 appears in the full version of this paper. 4 General loss functions We have seen that in the case of the zero/one loss function, an existence of a sublinear sample compression scheme is equivalent to learnability. It is natural to ask whether this phenomenon extends to other loss functions. The direction “compression =⇒learning” remains valid for general loss functions. In contrast, as will be discussed in this section, the other direction fails for general loss functions. However, a natural adaptation of sample compression schemes, which we term approximate sample compression schemes, allows the extension of the equivalence to arbitrary loss functions. Approximate compression schemes were previously studied in the context of classification (e.g. [13, 12]). In Subsection 4.1 we argue that in general sample compression schemes are not equivalent to learnability; specifically, there is no agnostic sample compression scheme for linear regression. In Subsection 4.2 we define approximate sample compression schemes and establish their equivalence with learnability. Finally, in Subsection 4.3 we use this equivalence to demonstrate classes that are PAC learnable but not agnostic PAC learnable. This manifests a difference with the zero/one loss under which agnostic and PAC learning are equivalent (see 3.2.1). It is worth noting that the loss function we use to break the equivalence takes only three values (compared to the two values of the zero/one loss function). 4.1 No agnostic compression for linear regression We next show that in the setup of linear regression, which is known to be agnostic PAC learnable, there is no agnostic sample compression scheme. For convenience, we shall restrict the discussion to zero-dimensional linear regression. In this setup4, the sample consists of m examples S = (z1, z2, . . . , zm) ∈[0, 1]m, and the loss function is defined by ℓ(h, z) = (h −z)2. The goal is to find h ∈R which minimizes LS(h). The empirical risk minimizer (ERM) is exactly the average h∗= 1 m P i zi, and for every h ̸= h∗we have LS(h) > LS(h∗). Thus, an agnostic sample compression scheme in this setup should compress S to a subsequence and a binary string of side information, from which the average of S can be reconstructed. We prove that there is no such compression. Theorem 4.1. There is no agnostic sample compression scheme for zero-dimensional linear regression with size k(m) ≤m/2. 4One may think of X as a singleton. 6 The proof appears in the full version of this paper. The idea is to restrict our attention to sets Ω⊆[0, 1] for which every subset of Ωhas a distinct average. It follows that any sample compression scheme for samples from Ωmust perform a compression that is information theoretically impossible. 4.2 Approximate sample compression schemes The previous example suggests the question of whether one can generalize the definition of compression to fit problems where the loss function is not zero/one. Taking cues from PAC and agnostic PAC learning, we consider the following definition. We say that the selection scheme (κ, ρ) is an ϵ-approximate sample compression scheme for H if for every sample S that is realizable by H, LS (ρ (κ (S))) ≤ϵ. It is called an ϵ-approximate agnostic sample compression scheme for H if for every sample S, LS (ρ (κ (S))) ≤infh∈H LS(h) + ϵ. Let us start by revisiting the case of zero-dimensional linear regression. Even though it does not have an agnostic compression scheme of sublinear size, it does have an ϵ-approximate agnostic sample compression scheme of size k = O(log(1/ϵ)/ϵ) which we now describe. Given a sample S = (z1, . . . , zm) ∈[0, 1], the average h∗= Pm i=1 zi/m is the ERM of S. Let L∗= L(h∗) = m X i=1 z2 i /m − m X i=1 zi/m !2 . It is enough to show that there exists a sub-sample S′ = (zi1, . . . , ziℓ) of size ℓ= ⌈1/ϵ⌉such that LS Pℓ j=1 zij/ℓ ≤L∗+ ϵ. It turns out that picking S′ at random suffices. Let Z1, . . . , Zℓbe independent random variables that are uniformly distributed over S and let H = 1 ℓ Pℓ i=1 Zi be their average. Thus, E[H] = h∗and E LS(H) = L∗+ Var[H] ≤L∗+ ϵ. In particular, this means that there exists some sub-sample of size ℓwhose average has loss at most L∗+ ϵ. Encoding such a sub-sample requires O(log(1/ϵ)/ϵ) additional bits of side information. We now establish the equivalence between approximate compression and learning (the proof is similar to the proof of Theorem 3.1). Theorem 4.2 (Approximate compressing implies learning). Let (κ, ρ) be a selection scheme of size k, let H be an hypothesis class, and let D be a distribution on Z. 1. If (κ, ρ) is an ϵ-approximate sample compression scheme for H, and m is such that k(m) ≤ m/2, then Pr S∼Dm LD (ρ (κ (S))) > ϵ + 100 s k log m k + log 1 δ m < δ. 2. If (κ, ρ) is an ϵ-approximate agnostic sample compression scheme for H, and m is such that k(m) ≤m/2, then Pr S∼Dm LD (ρ (κ (S))) > inf h∈H LD(h) + ϵ + 100 s k log m k + log 1 δ m < δ. The following Theorem shows that every learnable class has an approximate sample compression scheme. The proof of this theorem is straightforward - in contrast with the proof of the analog statement in the case of zero/one loss functions and compression schemes without error. Theorem 4.3 (Learning implies approximate compressing). Let H be an hypothesis class. 1. If H is PAC learnable with rate d(ϵ, δ), then it has an ϵ-approximate sample compression scheme of size k ≤O(d log(d)) with d = minδ<1 d(ϵ, δ). 2. If H is agnostic PAC learnable with rate d(ϵ, δ), then it has an ϵ-approximate agnostic sample compression scheme of size k ≤O(d log(d)) with d = minδ<1 d(ϵ, δ). The proof appears in the full version of this paper. 7 4.3 A separation between PAC and agnostic learnability Here we establish a separation between PAC and agnostic PAC learning under loss functions which take more than two values: Theorem 4.4. There exist hypothesis classes H ⊆YX and loss function l : Y × Y →{0, 1 2, 1} such that H is PAC learnable and not agnostic PAC learnable. The main challenge in proving this theorem is showing that H is not agnostic PAC learnable. We do this by showing that H does not have an approximate sample compression scheme. The crux of the argument is an application of Ramsey theory; the combinatorial nature of compression allows to identify the place where Ramsey theory is helpful. The proof appears in the full version of this paper. 5 Discussion and further research The compressibility-learnability equivalence is a fundamental link in statistical learning theory. From a theoretical perspective this link can serve as a guideline for proving both negative/impossibility results, and positive/possibility results. From the perspective of positive results, just recently, [5] relied on this paper in showing that every learnable problem is learnable with robust generalization guarantees. Another important example appears in the work of boosting weak learners [11] (see Chapter 4.2). These works follow a similar approach, that may be useful in other scenarios: (i) transform the given learner to a sample compression scheme, and (ii) utilize properties of compression schemes to derive the desired result. The same approach is also used in this paper in Section 3.2.1, where it is shown that PAC learning implies agnostic PAC learning under 0/1 loss; we first transform the PAC learner to a realizable compression scheme, and then use the realizable compression scheme to get an agnostic compression scheme that is also an agnostic learner. We note that we are not aware of a proof that directly transforms the PAC learner to an agnostic learner without using compression. From the perspective of impossibility/hardness results, this link implies that to show that a problem is not learnable, it suffices to show that it is not compressible. In Section 4.3, we follow this approach when showing that PAC and agnostic PAC learnability are not equivalent for general loss functions. This link may also have a practical impact, since it offers a thumb rule for algorithm designers; if a problem is learnable then it can be learned by a compression algorithm, whose design boils down to an intuitive principle “find a small insightful subset of the input data.” For example, in geometrical problems, this insightful subset often appears on the boundary of the data points (see e.g. [12]). References [1] S. Ben-David, N. Cesa-Bianchi, D. Haussler, and P. M. Long. Characterizations of learnability for classes of {0,...,n}-valued functions. J. Comput. Syst. Sci., 50(1):74–86, 1995. 2, 5, 6 [2] Shai Ben-David and Ami Litman. Combinatorial Variability of Vapnik-Chervonenkis Classes with Applications to Sample Compression Schemes. Discrete Applied Mathematics, 86(1):3–25, 1998. 2, 5 [3] Anselm Blumer, Andrzej Ehrenfeucht, David Haussler, and Manfred K. Warmuth. Learnability and the Vapnik-Chervonenkis dimension. J. Assoc. Comput. Mach., 36(4):929–965, 1989. 5 [4] A. Chernikov and P. Simon. Externally definable sets and dependent pairs. Israel Journal of Mathematics, 194(1):409–425, 2013. 5 [5] Rachel Cummings, Katrina Ligett, Kobbi Nissim, Aaron Roth, and Zhiwei Steven Wu. Adaptive learning with robust generalization guarantees. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 772–814, 2016. 8 [6] A. Daniely and S. Shalev-Shwartz. Optimal learners for multiclass problems. In COLT, volume 35, pages 287–316, 2014. 5 [7] Amit Daniely, Sivan Sabato, Shai Ben-David, and Shai Shalev-Shwartz. Multiclass learnability and the ERM principle. Journal of Machine Learning Research, 16:2377–2404, 2015. 2, 5, 6 [8] S. Floyd. Space-Bounded Learning and the Vapnik-Chervonenkis Dimension. In COLT, pages 349–364, 1989. 1, 5 8 [9] Sally Floyd and Manfred K. Warmuth. Sample Compression, Learnability, and the Vapnik-Chervonenkis Dimension. Machine Learning, 21(3):269–304, 1995. 1, 5 [10] Yoav Freund. Boosting a weak learning algorithm by majority. Inf. Comput., 121(2):256–285, 1995. 2 [11] Yoav Freund and Robert E. Schapire. Boosting: Foundations and Algorithms. Adaptive computation and machine learning. MIT Press, 2012. 2, 8 [12] Lee-Ad Gottlieb, Aryeh Kontorovich, and Pinhas Nisnevitch. Nearly optimal classification for semimetrics. CoRR, abs/1502.06208, 2015. 2, 6, 8 [13] Thore Graepel, Ralf Herbrich, and John Shawe-Taylor. PAC-Bayesian Compression Bounds on the Prediction Error of Learning Algorithms for Classification. Machine Learning, 59(1-2):55–76, 2005. 2, 6 [14] D. P. Helmbold, R. H. Sloan, and M. K. Warmuth. Learning integer lattices. SIAM J. Comput., 21(2):240– 266, 1992. 5 [15] Dima Kuzmin and Manfred K. Warmuth. Unlabeled compression schemes for maximum classes. Journal of Machine Learning Research, 8:2047–2081, 2007. 5 [16] Nick Littlestone and Manfred Warmuth. Relating data compression and learnability. Unpublished, 1986. 1, 2, 4, 5 [17] Roi Livni and Pierre Simon. Honest compressions and their application to compression schemes. In COLT, pages 77–92, 2013. 5 [18] Shay Moran and Amir Yehudayoff. Sample compression schemes for VC classes. J. ACM, 63(3):21:1– 21:10, June 2016. 2, 5, 6 [19] B. K. Natarajan. On learning sets and functions. Machine Learning, 4:67–97, 1989. 2, 5, 6 [20] B. I. P. Rubinstein and J. H. Rubinstein. A geometric approach to sample compression. Journal of Machine Learning Research, 13:1221–1261, 2012. 5 [21] Benjamin I. P. Rubinstein, Peter L. Bartlett, and J. H. Rubinstein. Shifting: One-inclusion mistake bounds and sample compression. J. Comput. Syst. Sci., 75(1):37–59, 2009. 5 [22] Shai Shalev-Shwartz and Shai Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, New York, NY, USA, 2014. 1, 2, 4 [23] Vladimir Vapnik. Statistical learning theory. Wiley, 1998. 1 [24] V.N. Vapnik and A.Ya. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl., 16:264–280, 1971. 2, 5, 6 [25] Manfred K. Warmuth. Compressing to VC dimension many points. In COLT/Kernel, pages 743–744, 2003. 2, 5 9 | 2016 | 211 |
6,119 | Sparse Support Recovery with Non-smooth Loss Functions Kévin Degraux ISPGroup/ICTEAM, FNRS Université catholique de Louvain Louvain-la-Neuve, Belgium 1348 kevin.degraux@uclouvain.be Gabriel Peyré CNRS, DMA École Normale Supérieure Paris, France 75775 gabriel.peyre@ens.fr Jalal M. Fadili Normandie Univ, ENSICAEN, CNRS, GREYC, Caen, France 14050 Jalal.Fadili@ensicaen.fr Laurent Jacques ISPGroup/ICTEAM, FNRS Université catholique de Louvain Louvain-la-Neuve, Belgium 1348 laurent.jacques@uclouvain.be Abstract In this paper, we study the support recovery guarantees of underdetermined sparse regression using the ℓ1-norm as a regularizer and a non-smooth loss function for data fidelity. More precisely, we focus in detail on the cases of ℓ1 and ℓ∞losses, and contrast them with the usual ℓ2 loss. While these losses are routinely used to account for either sparse (ℓ1 loss) or uniform (ℓ∞loss) noise models, a theoretical analysis of their performance is still lacking. In this article, we extend the existing theory from the smooth ℓ2 case to these non-smooth cases. We derive a sharp condition which ensures that the support of the vector to recover is stable to small additive noise in the observations, as long as the loss constraint size is tuned proportionally to the noise level. A distinctive feature of our theory is that it also explains what happens when the support is unstable. While the support is not stable anymore, we identify an “extended support” and show that this extended support is stable to small additive noise. To exemplify the usefulness of our theory, we give a detailed numerical analysis of the support stability/instability of compressed sensing recovery with these different losses. This highlights different parameter regimes, ranging from total support stability to progressively increasing support instability. 1 Introduction 1.1 Sparse Regularization This paper studies sparse linear regression problems of the form y = Φx0 + w, where x0 ∈Rn is the unknown vector to estimate, supposed to be non-zero and sparse, w ∈Rm is some additive noise and the design matrix Φm×n is in general rank deficient corresponding to a noisy underdetermined linear system of equations, i.e., typically in the high-dimensional regime where m ≪n. This can also be understood as an inverse problem in imaging sciences, a particular instance of which being the compressed sensing problem [3], where the matrix Φ is drawn from some appropriate random matrix ensemble. In order to recover a sparse vector x0, a popular regularization is the ℓ1-norm, in which case we consider the following constrained sparsity-promoting optimization problem min x∈Rn {||x||1 s.t. ||Φx −y||α ⩽τ} , (Pτ α(y)) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. where for α ∈[1, +∞], ||u||α def. = (P i |ui|α)1/α denotes the ℓα-norm, and the constraint size τ ⩾0 should be adapted to the noise level. To avoid trivialities, through the paper, we assume that problem (Pτ α(y)) is feasible, which is of course the case if τ ⩾||w||α. In the special situation where there is no noise, i.e., w = 0, it makes sense to consider τ = 0 and solve the so-called Lasso [14] or Basis-Pursuit problem [4], which is independent of α, and reads min x {||x||1 s.t. Φx = Φx0} . (P0(Φx0)) The case α = 2 corresponds to the usual ℓ2 loss function, which entails a smooth constraint set, and has been studied in depth in the literature (see Section 1.6 for an overview). In contrast, the cases α ∈{1, +∞} correspond to very different setups, where the loss function || · ||α is polyhedral and non-smooth. They are expected to lead to significantly different estimation results and require to develop novel theoretical results, which is the focus of this paper. The case α = 1 corresponds to a “robust” loss function, and is important to cope with impulse noise or outliers contaminating the data (see for instance [11, 13, 9]). At the extreme opposite, the case α = +∞is typically used to handle uniform noise such as in quantization (see for instance [10]). This paper studies the stability of the support supp(xτ) of minimizers xτ of (Pτ α(y)). In particular, we provide a sharp analysis for the polyhedral cases α ∈{1, +∞} that allows one to control the deviation of supp(xτ) from supp(x0) if ||w||α is not too large and τ is chosen proportionally to ||w||α. The general case is studied numerically in a compressed sensing experiment where we compare supp(xτ) and supp(x0) for α ∈[1, +∞]. 1.2 Notations. The support of x0 is noted I def. = supp(x0) where supp(u) def. = {i | ui ̸= 0}. The saturation support of a vector is defined as sat(u) def. = {i | |ui| = ||u||∞}. The sub-differential of a convex function f is denoted ∂f. The subspace parallel to a nonempty convex set C is par(C) def. = R(C −C). A∗is the transpose of a matrix A and A+ is the Moore-Penrose pseudo-inverse of A. Id is the identity matrix and δi the canonical vector of index i. For a subspace V ⊂Rn, PV is the orthogonal projector onto V . For sets of indices S and I, we denote ΦS,I the submatrix of Φ restricted to the rows indexed by S and the columns indexed by I. When all rows or all columns are kept, a dot replaces the corresponding index set (e.g., Φ·,I). We denote Φ∗ S,I def. = (ΦS,I)∗, i.e. the transposition is applied after the restriction. 1.3 Dual Certificates Before diving into our theoretical contributions, we first give important definitions. Let Dx0 be the set of dual certificates (see, e.g., [17]) defined by Dx0 def. = {p ∈Rm | Φ∗p ∈∂||x0||1 } = p ∈Rm Φ∗ ·,Ip = sign(x0,I), ||Φ∗p||∞⩽1 . (1) The first order optimality condition (see, e.g., [12]) states that x0 is a solution of (P0(Φx0)) if and only if Dx0 ̸= ∅. Assuming this is the case, our main theoretical finding (Theorem 1) states that the stability (and instability) of the support of x0 is characterized by the following specific subset of certificates pβ ∈Argmin p∈Dx0 ||p||β where 1 α + 1 β = 1. (2) We call such a certificate pβ a minimum norm certificate. Note that for 1 < α < +∞, this pβ is actually unique but that for α ∈{1, ∞} it might not be the case. Associated to such a minimal norm certificate, we define the extended support as J def. = sat(Φ∗pβ) = {i ∈{1, . . . , n} | |(Φ∗pβ)i| = 1} . (3) When the certificate pβ from which J is computed is unclear from the context, we write it explicitly as an index Jpβ. Note that, from the definition of Dx0, one always has I ⊆J. Intuitively, J indicates the set of indexes that will be activated in the signal estimate when a small noise w is added to the observation, and thus the situation when I = J corresponds to the case where the support of x0 is stable. 2 • 0 T1 •p1 par(∂||p1||1) ∂||p1||1 {p | ||p||1 ⩽1 } •e1 Fig. 1: Model tangent subspace Tβ in R2 for (α, β) = (∞, 1). 1.4 Lagrange multipliers and restricted injectivity conditions In the case of noiseless observations (w = 0) and when τ > 0, the following general lemma whose proof can be found in Section 2 associate to a given dual certificate pβ an explicit solution of (Pτ α(Φx0)). This formula depends on a so-called Lagrange multiplier vector vβ ∈Rn, which will be instrumental to state our main contribution (Theorem 1). Note that this lemma is valid for any α ∈[1, ∞]. Even though this goes beyond the scope of our main result, one can use the same lemma for an arbitrary ℓα-norm for α ∈[1, ∞] (see Section 3) or for even more general loss functions. Lemma 1 (Noiseless solution). We assume that x0 is identifiable, i.e. it is a solution to (P0(Φx0)), and consider τ > 0. Then there exists a vβ ∈Rn supported on J such that Φ·,Jvβ,J ∈∂||pβ||β and −sign(vβ, ˜ J) = Φ∗ ·, ˜ Jpβ where we denoted ˜J def. = J\I. If τ is such that 0 < τ < x ||vβ,I||∞, with x = mini∈I |x0,I|, then a solution ¯xτ of (Pτ α(Φx0)) with support equal to J is given by ¯xτ,J = x0,J −τvβ,J. Moreover, its entries have the same sign as those of x0 on its support I, i.e., sign(¯xτ,I) = sign(x0,I). An important question that arises is whether vβ can be computed explicitly. For this, let us define the model tangent subspace Tβ def. = par(∂||pβ||β)⊥, i.e., Tβ is the orthogonal to the subspace parallel to ∂||pβ||β, which uniquely defines the model vector, eβ def. = PTβ∂||pβ||β, as shown on Figure 1 (see [17] for details). Using this notation, vβ,J is uniquely defined and expressed in closed-form as vβ,J = (PTβΦ·,J)+eβ (4) if and only if the following restricted injectivity condition holds Ker(PTβΦ·,J) = {0}. (INJα) For the special case (α, β) = (∞, 1), the following lemma, proved in Section 2, gives easily verifiable sufficient conditions, which ensure that (INJ∞) holds. The notation S def. = supp(p1) is used. Lemma 2 (Restricted injectivity for α = ∞). Assume x0 is identifiable and ΦS,J has full rank. If sJ /∈Im(Φ∗ S′,J) ∀S′ ⊆{1, . . . , m}, |S′| < |J| and qS /∈Im(ΦS,J′) ∀J′ ⊆{1, . . . , n}, |J′| < |S|, where sJ = Φ∗ ·,Jp1 ∈{−1, 1}|J|, and qS = sign(p1,S) ∈{−1, 1}|S|, then, |S| = |J| and ΦS,J is invertible, i.e., since PT1Φ·,J = Id·,SΦS,J, (INJ∞) holds. Remark 1. If Φ is randomly drawn from a continuous distribution with i.i.d. entries, e.g., Gaussian, then as soon as x0 is identifiable, the conditions of Lemma 2 hold with probability 1 over the distribution of Φ. For (α, β) = (1, ∞), we define Z def. = sat(p∞), Θ def. = IdZc,· sign(p∗ ∞,Z)IdZ,· and eΦ def. = ΘΦ·,J. Following similar reasoning as in Lemma 2 and Remark 1, we can reasonably assume that |Zc| + 1 = |J| and eΦ is invertible. In that case, (INJ1) holds as Ker(PT∞Φ·,J) = Ker(eΦ). Table 1 summarizes for the three specific cases α ∈{1, 2, +∞} the quantities introduced here. Table 1: Model tangent subspace, restricted injectivity condition and Lagrange multipliers. α Tβ (INJα) (PTβΦ·,J)+ vβ,J 2 Rm Ker(Φ·,J) = {0} Φ+ ·,J Φ+ ·,J p2 ||p2||2 ∞ {u | supp(u) = S } Ker(ΦS,J) = {0} Φ−1 S,JIdS,· Φ−1 S,J sign(p1,S) 1 {u | uZ = ρ sign(p∞,Z), ρ ∈R} Ker(eΦ) = {0} eΦ−1Θ eΦ−1δ|J| 3 ... xτ Φ∗pβ x0 xτ1 xτ2 Jc˜J I 1 1 0 0 −1 −1 Fig. 2: (best observed in color) Simulated compressed sensing example showing xτ (above) for increasing values of τ and random noise w respecting the hypothesis of Theorem 1 and Φ∗pβ (bellow) which predicts the support of xτ when τ > 0. 1.5 Main result Our main contribution is Theorem 1 below. A similar result is known to hold in the case of the smooth ℓ2 loss (α = 2, see Section 1.6). Our paper extends it to the more challenging case of non-smooth losses α ∈{1, +∞}. The proof for α = +∞is detailed in Section 2. It is important to emphasize that the proof strategy is significantly different from the classical approach developed for α = 2, mainly because of the lack of smoothness of the loss function. The proof for α = 1 follows a similar structure, and due to space limitation, it can be found in the supplementary material. Theorem 1. Let α ∈{1, 2, +∞}. Suppose that x0 is identifiable, and let pβ be a minimal norm certificate (see (2)) with associated extended support J (see (3)). Suppose that the restricted injectivity condition (INJα) is satisfied so that vβ,J can be explicitly computed (see (4)). Then there exist constants c1, c2 > 0 depending only on Φ and pβ such that, for any (w, τ) satisfying ||w||α < c1τ and τ ⩽c2x where x def. = min i∈I |x0,I|, (5) a solution xτ of (Pτ α(Φx0 + w)) with support equal to J is given by xτ,J def. = x0,J + (PTβΦ·,J)+w −τvβ,J. (6) This theorem shows that if the signal-to-noise ratio is large enough and τ is chosen in proportion to the noise level ||w||α , then there is a solution supported exactly in the extended support J. Note in particular that this solution (6) has the correct sign pattern sign(xτ,I) = sign(x0,I), but might exhibit outliers if ˜J def. = J\I ̸= ∅. The special case I = J characterizes the exact support stability (“sparsistency”), and in the case α = 2, the assumptions involving the dual certificate correspond to a condition often referred to as “irrepresentable condition” in the literature (see Section 1.6). In Section 3, we propose numerical simulations to illustrate our theoretical findings on a compressed sensing (CS) scenario. Using Theorem 1, we are able to numerically assess the degree of support instability of CS recovery using ℓα fidelity. As a prelude to shed light on this result, we show on Figure 2, a smaller simulated CS example for (α, β) = (∞, 1). The parameters are n = 20, m = 10 and |I| = 4 and x0 and Φ are generated as in the experiment of Section 3 and we use CVX/MOSEK [8, 7] at best precision to solve the optimization programs. First, we observe that x0 is indeed identifiable by solving (P0(Φx0)). Then we solve (2) to compute pβ and predict the extended support J. Finally, we add uniformly distributed noise w with wi ∼i.i.d. U(−δ, δ) and δ chosen appropriately to ensure that the hypotheses hold and we solve (Pτ α(y)). Observe that as we increase τ, new non-zero entries appear in xτ but because w and τ are small enough, as predicted, we have supp(xτ) = J. Let us now comment on the limitations of our analysis. First, this result does not trivially extend to the general case α ∈[1, +∞] as there is, in general, no simple closed form for xτ. A generalization would require more material and is out of the scope of this paper. Nevertheless, our simulations in Section 3 stand for arbitrary α ∈[1, +∞] which is why the general formulation was presented. Second, larger noise regime, though interesting, is also out of the scope. Let us note that no other results in the literature (even for ℓ2) provide any insight about sparsistency in the large noise regime. In that case, we are only able to provide bounds on the distance between x0 and the recovered vector but this is the subject of a forthcoming paper. Finally our work is agnostic with respect to the noise models. Being able to distinguish between different noise models would require further analysis of the constant involved and some additional constraint on Φ. However, our result is a big step towards the understanding of the solutions behavior and can be used in this analysis. 4 1.6 Relation to Prior Works To the best of our knowledge, Theorem 1 is the first to study the support stability guarantees by minimizing the ℓ1-norm with non-smooth loss function, and in particular here the ℓ1 and ℓ∞losses. The smooth case α = 2 is however much more studied, and in particular, the associated support stability results we state here are now well understood. Note that most of the corresponding literature studies in general the penalized form, i.e., minx 1 2||Φx −y||2 + λ||x||1 instead of our constrained formulation (Pτ α(y)). In the case α = 2, since the loss is smooth, this distinction is minor and the proof is almost the same for both settings. However, for α ∈{1, +∞}, it is crucial to study the constrained problems to be able to state our results. The support stability (also called “sparsistency”, corresponding to the special case I = J of our result) of (Pτ α(y)) in the case α = 2 has been proved by several authors in slightly different setups. In the signal processing literature, this result can be traced back to the early work of J-J. Fuchs [6] who showed Theorem 1 when α = 2 and I = J. In the statistics literature, sparsistency is also proved in [19] in the case where Φ is random, the result of support stability being then claimed with high probability. The condition that I = J, i.e., that the minimal norm certificate pβ (for α = β = 2) is saturating only on the support, is often coined the “irrepresentable condition” in the statistics and machine learning literature. These results have been extended recently in [5] to the case where the support I is not stable, i.e. I ⊊J. One could also cite [15], whose results are somewhat connected but are restricted to the ℓ2 loss and do not hold in our case. Note that “sparsistency”-like results have been proved for many “low-complexity” regularizers beyond the ℓ1-norm. Let us quote among others: the group-lasso [1], the nuclear norm [2], the total variation [16] and a very general class of “partly-smooth” regularizers [17]. Let us also point out that one of the main sources of application of these results is the analysis of the performance of compressed sensing problems, where the randomness of Φ allows to derive sharp sample complexity bounds as a function of the sparsity of x0 and n, see for instance [18]. Let us also stress that these support recovery results are different from those obtained using tools such as the Restricted Isometry Property and alike (see for instance [3]) in many respects. For instance, the guarantees they provide are uniform (i.e., they hold for any sparse enough vector x0), though they usually lead to quite pessimistic worst-case bounds, and the stability is measured in ℓ2 sense. 2 Proof of Theorem 1 In this section, we prove the main result of this paper. For the sake of brevity, when part of the proof will become specific to a particular choice of α, we will only write the details for α = ∞. The details of the proof for α = 1 can be found in the supplementary material. It can be shown that the Fenchel-Rockafellar dual problem to (Pτ α(y)) is [12] min p∈Rm {−⟨y, p⟩+ τ||p||β s.t. ||Φ∗p||∞⩽1} . (Dτ β(y)) From the corresponding (primal-dual) extremality relations, one can deduce that (ˆx, ˆp) is an optimal primal-dual Kuhn-Tucker pair if, and only if, Φ∗ ·,ˆI ˆp = sign(ˆxˆI) and ||Φ∗ˆp||∞⩽1. (7) where ˆI = supp(ˆx), and y −Φˆx τ ∈∂||ˆp||β. (8) The first relationship comes from the sub-differential of the ℓ1 regularization term while the second is specific to a particular choice of α for the ℓα-norm data fidelity constraint. We start by proving the Lemma 1 and Lemma 2. Proof of Lemma 1 Let us rewrite the problem (2) by introducing the auxiliary variable η = Φ∗p as min p,η {||p||β + ιB∞(η) | η = Φ∗p, ηI = sign(x0,I)} , (9) where ιB∞is the indicator function of the unit ℓ∞ball. Define the Lagrange multipliers v and zI and the associated Lagrangian function L(p, η, v, zI) = ||p||β + ιB∞(η) + ⟨v, η −Φ∗p⟩+ ⟨zI, ηI −sign(x0,I)⟩. Defining zIc = 0, the first order optimality conditions (generalized KKT conditions) for p and η read Φv ∈∂||p||β and −v −z ∈∂ιB∞(η), 5 From the normal cone of the B∞at η on its boundary, the second condition is −v −z ∈{u | uJc = 0, sign(uJ) = ηJ } , where J = sat(η) = sat(Φ∗p). Since I ⊆J, v is supported on J. Moreover, on ˜J = J\I, we have −sign(v ˜ J) = η ˜ J. As pβ is a solution to (9), we can define a corresponding vector of Lagrange multipliers vβ supported on J such that −sign(vβ, ˜ J) = Φ∗ ·, ˜ Jpβ and Φ·,Jvβ,J ∈∂||pβ||β. To prove the lemma, it remains to show that ¯xτ is indeed a solution to (Pτ α(y)), i.e., it obeys (7) and (8) for some dual variable ˆp. We will show that this is the case with ˆp = pβ. Observe that pβ ̸= 0 as otherwise, it would mean that x0 = 0, which contradicts our initial assumption of non-zero x0. We can then directly see that (8) is satisfied. Indeed, noting y0 def. = Φx0, we can write y0 −Φ·,J ¯xτ,J = τΦ·,Jvβ,J ∈τ∂||pβ||β. By definition of pβ, we have ||Φ∗pβ||∞⩽1. In addition, it must satisfy Φ∗ ·,Jpβ = sign(¯xτ,J). Outside I, the condition is always satisfied since −sign(vβ, ˜ J) = Φ∗ ·, ˜ Jpβ. On I, we know that Φ∗ ·,Ipβ = sign(x0,I). The condition on τ is thus |x0,i| > τ |vβ,i| , ∀i ∈I, or equivalently, τ < x ||vβ,I||∞. Proof of Lemma 2 As established by Lemma 1, the existence of p1 and of v1 are implied by the identifiability of x0. We have the following, ∃p1 ⇒∃pS, Φ∗ S,JpS = sJ ⇔Φ∗ S,J is surjective ⇔|S| ⩾|J| ∃v1 ⇒∃vJ, ΦS,JvJ = qS ⇔ΦS,J is surjective ⇔|J| ⩾|S|, To clarify, we detail the first line. Since Φ∗ S,J is full rank, |S| ⩾|J| is equivalent to surjectivity. Assume Φ∗ S,J is not surjective so that |S| < |J|, then sJ /∈Im(Φ∗ S,J) and the over-determined system Φ∗ S,JpS = sJ has no solution in pS, which contradicts the existence of p1. Now assume Φ∗ S,J is surjective, then we can take pS = Φ∗,† S,JsJ as a solution where Φ∗,† S,J is any right-inverse of Φ∗ S,J. This proves that ΦS,J is invertible. We are now ready to prove the main result in the particular case α = ∞. Proof of Theorem 1 (α = ∞) Our proof consists in constructing a vector supported on J, obeying the implicit relationship (6) and which is indeed a solution to (Pτ ∞(Φx0 + w)) for an appropriate regime of the parameters (τ, ||w||α). Note that we assume that the hypothesis of Lemma 2 on Φ holds and in particular, ΦS,J is invertible. When (α, β) = (∞, 1), the first order condition (8), which holds for any optimal primal-dual pair (x, p), reads, with Sp def. = supp(p), ySp −ΦSp,·x = τ sign(pSp) and ||y −Φx||∞⩽τ. (10) One should then look for a candidate primal-dual pair (ˆx, ˆp) such that supp(ˆx) = J and satisfying ySˆ p −ΦSˆ p,J ˆxJ = τ sign(ˆpSˆ p). (11) We now need to show that the first order conditions (7) and (10) hold for some p = ˆp solution of the “perturbed” dual problem (Dτ 1(Φx0 + w)) with x = ˆx. Actually, we will show that under the conditions of the theorem, this holds for ˆp = p1, i.e., p1 is solution of (Dτ 1(Φx0 + w)) so that ˆxJ = Φ−1 S,JyS −τΦ−1 S,J sign(p1,S) = x0,J + Φ−1 S,JwS −τv1,J. Let us start by proving the equality part of (7), Φ∗ S,J ˆpS = sign(ˆxJ). Since ΦS,J is invertible, we have ˆpS = p1,S if and only if sign(ˆxJ) = Φ∗ S,Jp1,S. Noting IdI,J the restriction from J to I, we have sign x0,I + IdI,JΦ−1 S,JwS −τv1,I = sign (x0,I) as soon as Φ−1 S,JwS i −τv1,i < |x0,I| ∀i ∈I. It is sufficient to require ||IdI,JΦ−1 S,JwS −τv1,I||∞< x ||Φ−1 S,J||∞,∞||w||∞+ τ||v1,I||∞< x, with x = mini∈I |x0,I|. Injecting the fact that ||w||∞< c1τ (the value of c1 will be derived later), we get the condition 6 τ (bc1 + ν) ⩽x, with b = ||Φ−1 S,J||∞,∞and ν = ||v1||∞⩽b. Rearranging the terms, we obtain τ ⩽ x bc1 + ν = c2x, which guarantees sign(ˆxI) = sign(x0,I). Outside I, defining Id ˜ J,J as the restriction from J to ˜J, we must have Φ∗ S, ˜ Jp1,S = sign Id ˜ J,JΦ−1 S,JwS −τv1, ˜ J . From Lemma 1, we know that −sign(v1, ˜ J) = Φ∗ S, ˜ Jp1,S, so that the condition is satisfied as soon as Φ−1 S,JwS j < τ|v1,j| ∀j ∈˜J. Noting v = minj∈˜ J |v1,j|, we get the sufficient condition for (7), ||Φ−1 S,JwS||∞< τv, ||w||∞< τ v b . (c1a) We can now verify (10). From (11) we see that the equality part is satisfied on S. Outside S, we have ySc −ΦSc,·ˆx = wSc −ΦSc,JΦ−1 S,JwS + τΦSc,Jv1,J, which must be smaller than τ, i.e., ||wSc −ΦSc,JΦ−1 S,JwS + τΦSc,Jv1,J||∞⩽τ. It is thus sufficient to have (1 + ||ΦSc,JΦ−1 S,J||∞,∞)||w||∞+ τµ ⩽τ, with µ def. = ||ΦSc,Jv1,J||∞. Noting a = ||ΦSc,JΦ−1 S,J||∞,∞, we get ||w||∞⩽1 −µ 1 + a τ. (c1b) (c1a) and (c1b) together give the value of c1. This ensures that the inequality part of (10) is satisfied for ˆx and with that, that ˆx is solution to (Pτ ∞(Φx0 + w)) and p1 solution to (Dτ 1(Φx0 + w)), which concludes the proof. Remark 2. From Lemma 1, we know that in all generality µ ⩽1. If the inequality was saturated, it would mean that c1 = 0 and no noise would be allowed. Fortunately, it is easy to prove that under a mild assumption on Φ, similar to the one of Lemma 2 (which holds with probability 1 for Gaussian matrices), the inequality is strict, i.e., µ < 1. 3 Numerical experiments In order to illustrate support stability in Lemma 1 and Theorem 1, we address numerically the problem of comparing supp(xτ) and supp(x0) in a compressed sensing setting. Theorem 1 shows that supp(xτ) does not depend on w (as long as it is small enough); simulations thus do not involve noise. All computations are done in Matlab, using CVX [8, 7], with the MOSEK solver at “best” precision setting to solve the convex problems. We set n = 1000, m = 900 and generate 200 times a random sensing matrix Φ ∈Rm×n with Φij ∼i.i.d N(0, 1). For each sensing matrix, we generate 60 different k-sparse vectors x0 with support I where k def. = |I| varies from 10 to 600. The non-zero entries of x0 are randomly picked in {±1} with equal probability. Note that this choice does not impact the result because the definition of Jpβ only depends on sign(x0) (see (1)). It will only affect the bounds in (5). For each case, we verify that x0 is identifiable and for α ∈{1, 2, ∞} (which correspond to β ∈{∞, 2, 1}), we compute the minimum ℓβ-norm certificate pβ, solution to (2) and in particular, the support excess ˜Jpβ def. = sat(Φ∗pβ)\I. It is important to emphasize that there is no noise in these simulations. As long as the hypotheses of the theorem are satisfied, we can predict that supp(xτ) = Jpβ ⊂I without actually computing xτ, or choosing τ, or generating w. 7 k k k P[| ˜Jp∞| ⩽se] P[| ˜Jp2| ⩽se] P[| ˜Jp1| ⩽se] ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ∞ ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2ℓ2 ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1ℓ1 0 0 0 1 1 1 200 200 200 400 400 400 600 600 600 Fig. 3: (best observed in color) Sweep over se ∈{0, 10, ...} of the empirical probability as a function of the sparsity k that x0 is identifiable and | ˜Jp∞| ⩽se (left), | ˜Jp2| ⩽se (middle) or | ˜Jp1| ⩽se (right). The bluest corresponds to se = 0 and the redest to the maximal empirical value of | ˜Jpβ|. k k k 1 α se = 0 se = 50 se = 150 1 0.5 0 125 125 125 250 250 250 375 375 375 500 500 500 Fig. 4: (best observed in color) Sweep over 1 α ∈[0, 1] of the empirical probability as a function of k that x0 is identifiable and | ˜Jpβ| ⩽se for three values of se. The dotted red line indicates α = 2. We define a support excess threshold se ∈N varying from 0 to ∞. On Figure 3 we plot the probability that x0 is identifiable and | ˜Jpβ|, the cardinality of the predicted support excess, is smaller or equal to se. It is interesting to note that the probability that | ˜Jp1| = 0 (the bluest horizontal curve on the right plot) is 0, which means that even for extreme sparsity (k = 10) and a relatively high m/n rate of 0.9, the support is never predicted as perfectly stable for α = ∞in this experiment. We can observe as a rule of thumb, that a support excess of | ˜Jp1| ≈k is much more likely. In comparison, ℓ2 recovery provides a much more likely perfect support stability for k not too large and the expected size of ˜Jp2 increases slower with k. Finally, we can comment that the support stability with ℓ1 data fidelity is in between. It is possible to recover the support perfectly but the requirement on k is a bit more restrictive than with ℓ2 fidelity. As previously noted, Lemma 1 and its proof remain valid for smooth loss functions such as the ℓα-norm when α ∈(1, ∞). Therefore, it makes sense to compare the results with the ones obtained for α ∈(1, ∞) . On Figure 4 we display the result of the same experiment but with 1/α as the vertical axis. To realize the figure, we compute pβ and ˜Jpβ for β corresponding to 41 equispaced values of 1/α ∈[0, 1]. The probability that | ˜Jpβ| ⩽se is represented by the color intensity. The three different plots correspond to three different values for se. On this figure, the yellow to blue transition can be interpreted as the maximal k to ensure, with high probability, that | ˜Jpβ| does not exceeds se. It is always (for all se) further to the right at α = 2. It means that the ℓ2 data fidelity constraint provides the highest support stability. Interestingly, we can observe that this maximal k decreases gracefully as α moves away from 2 in one way or the other. Finally, as already observed on Figure 3, we see that, especially when se is small, the ℓ1 loss function has a small advantage over the ℓ∞loss. 4 Conclusion In this paper, we provided sharp theoretical guarantees for stable support recovery under small enough noise by ℓ1 minimization with non-smooth loss functions. Unlike the classical setting where the data loss is smooth, our analysis reveals the difficulties arising from non-smoothness, which necessitated a novel proof strategy. Though we focused here on the case of ℓα data loss functions, for α ∈{1, 2, ∞}, our analysis can be extended to more general non-smooth losses, including coercive gauges. This will be our next milestone. Acknowledgments KD and LJ are funded by the Belgian F.R.S.-FNRS. JF is partly supported by Institut Universitaire de France. GP is supported by the European Research Council (ERC project SIGMA-Vision). 8 References [1] F.R. Bach. Consistency of the group Lasso and multiple kernel learning. Journal of Machine Learning Research, 9:1179–1225, 2008. [2] F.R. Bach. Consistency of trace norm minimization. Journal of Machine Learning Research, 9:1019–1048, 2008. [3] E. J. Candès, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on pure and . . ., 40698(8):1–15, aug 2006. [4] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic Decomposition by Basis Pursuit. SIAM Journal on Scientific Computing, 20(1):33–61, jan 1998. [5] V. Duval and G. Peyré. Sparse spikes deconvolution on thin grids. Preprint 01135200, HAL, 2015. [6] J.-J. Fuchs. On sparse representations in arbitrary redundant bases. IEEE Transactions on Information Theory, 50(6):1341–1344, 2004. [7] M. Grant and S. Boyd. Graph implementations for nonsmooth convex programs. In V. Blondel, S. Boyd, and H. Kimura, editors, Recent Advances in Learning and Control, Lecture Notes in Control and Information Sciences, pages 95–110. Springer-Verlag Limited, 2008. http://stanford.edu/~boyd/graph_dcp. html. [8] M. Grant and S. Boyd. CVX: Matlab software for disciplined convex programming, version 2.1. http: //cvxr.com/cvx, March 2014. [9] L. Jacques. On the optimality of a L1/L1 solver for sparse signal recovery from sparsely corrupted compressive measurements. Technical Report, TR-LJ-2013.01, arXiv preprint arXiv:1303.5097, 2013. [10] L. Jacques, D. K. Hammond, and Jalal M. Fadili. Dequantizing Compressed Sensing: When Oversampling and Non-Gaussian Constraints Combine. IEEE Transactions on Information Theory, 57(1):559–571, jan 2011. [11] M. Nikolova. A variational approach to remove outliers and impulse noise. Journal of Mathematical Imaging and Vision, 20(1), 2004. [12] R. T. Rockafellar. Conjugate duality and optimization, volume 16. Siam, 1974. [13] C. Studer, P. Kuppinger, G. Pope, and H. Bolcskei. Recovery of Sparsely Corrupted Signals. IEEE Transactions on Information Theory, 58(5):3115–3130, may 2012. [14] R. Tibshirani. Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society. Series B: Statistical Methodology, 58(1):267–288, 1995. [15] Ryan J. Tibshirani. The lasso problem and uniqueness. Electronic Journal of Statistics, 7:1456–1490, 2013. [16] S. Vaiter, G. Peyré, C. Dossal, and M.J. Fadili. Robust sparse analysis regularization. IEEE Transactions on Information Theory, 59(4):2001–2016, 2013. [17] S. Vaiter, G. Peyré, and J. Fadili. Model consistency of partly smooth regularizers. Preprint 00987293, HAL, 2014. [18] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ℓ1-constrained quadratic programming (lasso). IEEE Transactions on Information Theory, 55(5):2183–2202, 2009. [19] P. Zhao and B. Yu. On model selection consistency of Lasso. J. Mach. Learn. Res., 7:2541–2563, December 2006. 9 | 2016 | 212 |
6,120 | Tractable Operations for Arithmetic Circuits of Probabilistic Models Yujia Shen and Arthur Choi and Adnan Darwiche Computer Science Department University of California Los Angeles, CA 90095 {yujias,aychoi,darwiche}@cs.ucla.edu Abstract We consider tractable representations of probability distributions and the polytime operations they support. In particular, we consider a recently proposed arithmetic circuit representation, the Probabilistic Sentential Decision Diagram (PSDD). We show that PSDDs support a polytime multiplication operator, while they do not support a polytime operator for summing-out variables. A polytime multiplication operator makes PSDDs suitable for a broader class of applications compared to classes of arithmetic circuits that do not support multiplication. As one example, we show that PSDD multiplication leads to a very simple but effective compilation algorithm for probabilistic graphical models: represent each model factor as a PSDD, and then multiply them. 1 Introduction Arithmetic circuits (ACs) have been a central representation for probabilistic graphical models, such as Bayesian networks and Markov networks. On the reasoning side, some state-of-the-art approaches for exact inference are based on compiling probabilistic graphical models into arithmetic circuits [Darwiche, 2003]; see also Darwiche [2009, chapter 12]. Such approaches can exploit parametric structure (such as determinism and context-specific independence), allowing inference to scale sometimes to models with very high treewidth, which are beyond the scope of classical inference algorithms such as variable elimination and jointree. For example, the ace system for compiling ACs [Chavira and Darwiche, 2008] was the only system in the UAI’08 evaluation of probabilistic reasoning systems to exactly solve all 250 networks in a challenging (very high-treewidth) suite of relational models [Darwiche et al., 2008]. On the learning side, arithmetic circuits have become a popular representation for learning from data, as they are tractable for certain probabilistic queries. For example, there are algorithms for learning ACs of Bayesian networks [Lowd and Domingos, 2008], ACs of Markov networks [Lowd and Rooshenas, 2013, Bekker et al., 2015] and Sum-Product Networks (SPNs) [Poon and Domingos, 2011], among other related representations.1 Depending on their properties, different classes of ACs are tractable for different queries and operations. Among these queries are maximum a posteriori (MAP) inference,2 which is an NP-complete problem, and evaluating the partition function, which is a PP-complete problem (more intractable). Among operations, the multiplication of two ACs stands out as particularly important, being a primitive operation in some approaches to incremental or adaptive inference [Delcher et al., 1995, Acar et al., 2008], bottom-up compilation of probabilistic graphical models [Choi et al., 2013], and some search-based approaches to structure learning [Bekker et al., 2015]. 1SPNs can be converted into ACs (and vice-versa) with linear size and time [Rooshenas and Lowd, 2014]. 2This is also known as most probable explanation (MPE) inference [Pearl, 1988]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In this paper, we investigate the tractability of two fundamental operations on arithmetic circuits: multiplying two ACs and summing out a variable from an AC. We show that both operations are intractable for some influential ACs that have been employed in the probabilistic reasoning and learning literatures. We then consider a recently proposed sub-class of ACs, called the Probabilistic Sentential Decision Diagram (PSDD) [Kisa et al., 2014]. We show that PSDDs support a polytime multiplication operation, which makes them suitable for a broader class of applications. We also show that PSDDs do not support a polytime summing-out operation (a primitive operation for messagepassing inference algorithms). We empirically illustrate the advantages of PSDDs compared to other AC representations, for compiling probabilistic graphical models. Previous approaches for compiling probabilistic models into ACs are based on encoding these models into auxiliary logical representations, such as a Sentential Decision Diagram (SDD) or a deterministic DNNF circuits, which are then converted to an AC [Chavira and Darwiche, 2008, Choi et al., 2013]. PSDDs are a direct representation of probability distributions, bypassing the overhead of intermediate logical representations, and leading to more efficient compilations in some cases. Most importantly though, this approach lends itself to a significantly simpler compilation algorithm: represent each factor of a given model as a PSDD, and then multiply the factors using PSDD multiplication. This paper is organized as follows. In Section 2, we review arithmetic circuits (ACs) as a representation of probability distributions, including PSDDs in particular. In Section 3, we introduce a polytime multiplication operator for PSDDs, and in Section 4, we show that there is no polytime sum-out operator for PSDDs. In Section 5, we propose a simple compilation algorithm for PSDDs based on the multiply operator, which we evaluate empirically. We discuss related work in Section 6 and finally conclude in Section 7. Proofs of theorems are available in the Appendix. 2 Representing Distributions Using Arithmetic Circuits We start with the definition of factors, which include distributions as a special case. Definition 1 (Factor) A factor f(X) over variables X maps each instantiation x of variables X into a non-negative number f(x). The factor represents a distribution when P x f(x) = 1. We define the value of a factor at a partial instantiation y, where Y ✓X, as f(y) = P z f(yz), where Z = X \ Y. When the factor is a distribution, f(y) corresponds to the probability of evidence y. We also define the MAP instantiation of a factor as argmaxx f(x), which corresponds to the most likely instantiation when the factor is a distribution. The classical, tabular representation of a factor f(X) is exponential in the number of variables X. However, one can represent such factors more compactly using arithmetic circuits. Definition 2 (Arithmetic Circuit) An arithmetic circuit AC(X) over variables X is a rooted DAG whose internal nodes are labeled with + or ⇤and whose leaf nodes are labeled with either indicator variables λx or non-negative parameters ✓. The value of the circuit at instantiation x, denoted AC(x), is obtained by assigning indicator λx the value 1 if x is compatible with instantiation x and 0 otherwise, then evaluating the circuit in the standard way. The circuit AC(X) represents factor f(X) iff AC(x) = f(x) for each instantiation x. A tractable arithmetic circuit allows one to efficiently answer certain queries about the factor it represents. We next discuss two properties that lead to tractable arithmetic circuits. The first is decomposability [Darwiche, 2001b], which was used for probabilistic reasoning in [Darwiche, 2003]. Definition 3 (Decomposability) Let n be a node in an arithmetic circuit AC(X). The variables of n, denoted vars(n), are the variables X 2 X with some indicator λx appearing at or under node n. An arithmetic circuit is decomposable iff every pair of children c1 and c2 of a ⇤-node satisfies vars(c1) \ vars(c2) = ;. The second property is determinism [Darwiche, 2001a], which was also employed for probabilistic reasoning in Darwiche [2003]. Definition 4 (Determinism) An arithmetic circuit AC(X) is deterministic iff each +-node has at most one non-zero input when the circuit is evaluated under any instantiation x of the variables X. 2 A third property called smoothness is also desirable as it simplifies the statement of certain AC algorithms, but is less important for tractability as it can be enforced in polytime [Darwiche, 2001a]. Definition 5 (Smoothness) An arithmetic circuit AC(X) is smooth iff it contains at least one indicator for each variable in X, and for each child c of +-node n, we have vars(n) = vars(c). Decomposability and determinism lead to tractability in the following sense. Let Pr(X) be a distribution represented by a decomposable, deterministic and smooth arithmetic circuit AC(X). Then one can compute the following queries in time that is linear in the size of circuit AC(X): the probability of any partial instantiation, Pr(y), where Y ✓X [Darwiche, 2003] and the most likely instantiation, argmaxx Pr(x) [Chan and Darwiche, 2006]. The decision problems of these queries are known to be PP-complete and NP-complete for Bayesian networks [Roth, 1996, Shimony, 1994]. * * * * + + + * * * * Oa Oa b O b O a T a T a b| T a b| T a b| T a b| T Figure 1: An AC for a Bayesian network A ! B. A number of methods have been proposed for compiling a Bayesian network into a decomposable, deterministic and smooth AC that represents its distribution [Darwiche, 2003]. Figure 1 depicts such a circuit that represents the distribution of Bayesian network A ! B. One method ensures that the size of the AC is proportional to the size of a jointree for the network. Another method yields circuits that can sometimes be exponentially smaller, and is implemented in the publicly available ace system [Chavira and Darwiche, 2008]; see also Darwiche et al. [2008]. Additional methods are discussed in Darwiche [2009, chapter 12]. This work is motivated by the following limitation of these tractable circuits, which may narrow their applicability in probabilistic reasoning and learning. Definition 6 (Multiplication) The product of two arithmetic circuits AC1(X) and AC2(X) is an arithmetic circuit AC(X) such that AC(x) = AC1(x)AC2(x) for every instantiation x. Theorem 1 Computing the product of two decomposable ACs is NP-hard if the product is also decomposable. Computing the product of two decomposable and deterministic ACs is NP-hard if the product is also decomposable and deterministic. We now investigate a newly introduced class of tractable ACs, called the Probabilistic Sentential Decision Diagram (PSDD) [Kisa et al., 2014]. In particular, we show that this class of circuits admits a tractable product operation and then explore an application of this operation to exact inference in probabilistic graphical models. PSDDs were motivated by the need to represent probability distributions Pr(X) with many instantiations x attaining zero probability, Pr(x) = 0. Consider the distribution Pr(X) in Figure 2(a) for an example. The first step in constructing a PSDD for this distribution is to construct a special Boolean circuit that captures its zero entries; see Figure 2(b). The Boolean circuit captures zero entries in the following sense. For each instantiation x, the circuit evaluates to 0 at instantiation x iff Pr(x) = 0. The second and final step of constructing a PSDD amounts to parameterizing this Boolean circuit (e.g., by learning them from data), by including a local distribution on the inputs of each or-gate; see Figure 2(c). 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 2(d). The following definition of SDD circuits is a based on the one given by Darwiche [2011] and uses a different notation. Definition 7 (SDD) An SDD normalized for a vtree v is a Boolean circuit defined as follows. If v is a leaf node labeled with variable X, then the SDD is either X, ¬X, ? or an or-gate with inputs X and ¬X. If v is an internal vtree node, then the SDD has the structure in Figure 3, where p1, . . . , pn are SDDs normalized for the left child vl and s1, . . . , sn are SDDs normalized for the right child vr. Moreover, the circuits p1, . . . , pn are consistent, mutually exclusive and exhaustive. 3 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 2: A probability distribution and its SDD/PSDD representation. Note that the numbers annotating or-gates in (b) & (c) correspond to vtree node IDs in (d). Further, note that while the circuit appears to be a tree, the input variables are shared and hence the circuit is not a tree. p1 s1 p2 s2 · · · pn sn · · · ↵1 ↵2 ↵n Figure 3: Each (pi, si, ↵i) is called an element of the or-gate, where the pi’s are called primes and the si’s are called subs. Moreover, P i ↵i = 1 and exactly one pi evaluates to 1 under any circuit input. SDD circuits alternate between or-gates and and-gates. Their andgates have two inputs each. The or-gates of these circuits are such that at most one input will be high under any circuit input. An SDD circuit may produce a 1-output for every possible input (i.e., the circuit represents the function true). These circuits arise when representing strictly positive distributions (with no zero entries). A PSDD is obtained by including a distribution ↵1, . . . , ↵n on the inputs of each or-gate; see Figure 3. The semantics of PSDDs are given in [Kisa et al., 2014].3 We next provide an alternative semantics, which is based on converting a PSDD into an arithmetic circuit. Definition 8 (ACs of PSDDs) The arithmetic circuit of a PSDD is obtained as follows. Leaf nodes x and ? are converted into λx and 0, respectively. Each and-gate is converted into a ⇤-node. Each or-node with children c1, . . . , cn and corresponding parameters ↵1, . . . , ↵n is converted into a +-node with children ↵1 ⇤c1, ..., ↵n ⇤cn. Theorem 2 The arithmetic circuit of a PSDD represents the distribution induced by the PSDD. Moreover, the arithmetic circuit is decomposable and deterministic.4 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., 2014] for details. Finally, PSDDs have been used to learn distributions over combinatorial objects, including rankings and permutations [Choi et al., 2015], 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 2 {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]. 3Let 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. 4The arithmetic circuit also satisfies a minor weakening of smoothness with the same effect as smoothness. 4 3 Multiplying Two PSDDs Factors and their operations are fundamental to probabilistic inference, whether exact or approximate [Darwiche, 2009, Koller and Friedman, 2009]. Consider two of the most basic operations on factors: (1) computing the product of two factors and (2) summing out a variable from a factor. With these operations, one can directly implement various inference algorithms, including variable elimination, the jointree algorithm, and message-passing algorithms such as loopy belief propagation. Typically, tabular representations (and their sparse variations) are used to represent factors and implement the above algorithms; see Larkin and Dechter [2003], Sanner and McAllester [2005], Chavira and Darwiche [2007] for some alternatives. More generally, factor multiplication is useful for online or incremental reasoning with probabilistic models. In some applications, we may not have access to all factors of a model beforehand, to compile as a jointree or an arithmetic circuit. For example, when learning the structure of a Markov network from data [Bekker et al., 2015], we may want to introduce and remove candidate factors from a model, while evaluating the changes to the log likelihood. Certain realizations of generalized belief propagation also require the multiplication of factors [Yedidia et al., 2005, Choi and Darwiche, 2011]. In these realizations, one can use factor multiplication to enforce dependencies between factors that have been relaxed to make inference more tractable, albeit less accurate. We next discuss PSDD multiplication, while deferring summing out to the following section. Algorithm 1 Multiply(n1, n2, v) input: PSDDs n1, n2 normalized for vtree v output: PSDD n and constant main: 1: n, k cachem(n1, n2), cachec(n1, n2) . check if previously computed 2: if n 6= null then return (n, k) . return previously cached result 3: else if v is a leaf then (n, ) BaseCase(n1, n2) . n1, n2 are literals, ? or simple or-gates 4: else . n1 and n2 have the structure in Figure 3 5: γ, {}, 0 . initialization 6: for all elements (p, s, ↵) of n1 do . see Figure 3 7: for all elements (q, r, β) of n2 do . see Figure 3 8: (m1, k1) Multiply(p, q, vl) . recursively multiply primes p and q 9: if k1 6= 0 then . if (m1, k1) is not a trivial factor 10: (m2, k2) Multiply(s, r, vr) . recursively multiply subs s and r 11: ⌘ k1 · k2 · ↵· β . compute weight of element (m1, m2) 12: + ⌘ . aggregate weights of elements 13: add (m1, m2, ⌘) to γ 14: γ {(m1, m2, ⌘/) | (m1, m2, ⌘) 2 γ} . normalize parameters of γ 15: n unique PSDD node with elements γ . cache lookup for unique nodes 16: cachem(n1, n2) n 17: cachec(n1, n2) . store results in cache 18: return (n, ) Our first observation is that the product of two distributions is generally not a distribution, but a factor. Moreover, a factor f(X) can always be represented by a distribution Pr(X) and a constant such that f(x) = · Pr(x). Hence, our proposed multiplication method will output a PSDD together with a constant, as given in Algorithm 1. This algorithm uses three caches, one for storing constants (cachec), another for storing circuits (cachem), and a third used to implement Line 15.5 This line ensures that the PSDD has no duplicate structures of the form given in Figure 3. The description of function BaseCase() on Line 3 is available in the Appendix. It appears inside the proof of the following theorem, which establishes the soundness and complexity of the given algorithm. Theorem 3 Algorithm 1 outputs a PSDD n normalized for vtree v. Moreover, if Pr 1(X) and Pr 2(X) are the distributions of input PSDDs n1 and n2, and Pr(X) is the distribution of output PSDD n, then Pr 1(x)Pr 2(x) = · Pr(x) for every instantiation x. Finally, Algorithm 1 takes time O(s1s2), where s1 and s2 are the sizes of input PSDDs. 5The cache key of a PSDD node in Figure 3 is based on the (unique) ID’s of nodes pi/si and parameters ↵i. 5 We will later discuss an application of PSDD multiplication to probabilistic inference, in which we cascade these multiplication operations. In particular, we end up multiplying two factors f1 and f2, represented by PSDDs n1 and n2 and the corresponding constants 1 and 2. We use Algorithm 1 for this purpose, multiplying PSDDs n1 and n2 (distributions), to yield a PSDD n (distribution) and a constant . The factor f1f2 will then correspond to PSDD n and constant · 1 · 2. A G F K E C B J H I D A G K H D A G B H D Figure 4: A vtree and two of its projections. Another observation is that Algorithm 1 assumes that the input PSDDs are over the same vtree and, hence, same set of variables. A more detailed version of this algorithm can multiply two PSDDs over different sets of variables as long as the PSDDs have compatible vtrees. We omit this version here to simplify the presentation, but mention that it has the same complexity as Algorithm 1. Two vtrees over variables X and Y are compatible iff they can be obtained by projecting some vtree on variables X and Y, respectively. Definition 9 (Vtree Projection) Let v be a vtree over variables Z. The projection of v on variables X ✓Z is obtained as follows. Successively remove every maximal subtree v0 whose variables are outside X, while replacing the parent of v0 with its sibling. Figure 4 depicts a vtree and two of its projections. When compiling a probabilistic graphical model into a PSDD, we first construct a vtree v over all variables in the model. We then compile each factor f(X) into a PSDD, using the projection of v on variables X. We finally multiply the PSDDs of these factors. We will revisit these steps later. 4 Summing-Out a Variable in a PSDD We now discuss the summing out of variables from distributions represented by arithmetic circuits. Definition 10 (Sum Out) Summing-out a variable X 2 X from factor f(X) results in another factor over variables Y = X \ {X}, denoted by P X f and defined as: ⇣P X f ⌘ (y) def = P x f(x, y). When the factor is a distribution (i.e., normalized), the sum out operation corresponds to marginalization. Together with multiplication, summing out provides a direct implementation of algorithms such as variable elimination and those based on message passing. Just like multiplication, summing out is also intractable for a common class of arithmetic circuits. Theorem 4 The sum-out operation on decomposable and deterministic ACs is NP-hard, assuming the output is also decomposable and deterministic. This theorem does not preclude the possibility that the resulting AC is of polynomial size with respect to the size of the input AC—it just says that the computation is intractable. Summing out is also intractable on PSDDs, but the result is stronger here as the size of the output can be exponential. Theorem 5 There exists a class of factors f(X) and variable X 2 X, such that n = |X| can be arbitrarily large, f(X) has a PSDD whose size is linear in n, while the PSDD of P X f has size exponential in n for every vtree. Only the multiplication operation is needed to compile probabilistic graphical models into arithmetic circuits. Even for inference algorithms that require summing out variables, such as variable elimination, summing out can still be useful, even if intractable, since the size of resulting arithmetic circuit will not be larger than a tabular representation. 6 5 Compiling Probabilistic Graphical Models into PSDDs Even though PSDDs form a strict subclass of decomposable and deterministic ACs (and satisfy stronger properties), one can still provide the following classical guarantee on PSDD size. Theorem 6 The interaction graph of factors f1(X1), . . . , fn(Xn) has nodes corresponding to variables X1 [ . . . [ Xn and an edge between two variables iff they appear in the same factor. There is a PSDD for the product f1 . . . fn whose size is O(m · exp(w)), where m is the number of variables and w is its treewidth. This theorem provides an upper bound on the size of PSDD compilations for both Bayesian and Markov networks. An analogous guarantee is available for SDD circuits of propositional models, using a special type of vtree known as a decision vtree [Oztok and Darwiche, 2014]. We next discuss our experiments, which focused on the compilation of Markov networks using decision vtrees. To compile a Markov network, we first construct a decision vtree using a known technique.6 For each factor of the network, we project the vtree on the factor variables, and then compile the factor into a PSDD. This can be done in time linear in the factor size, but we omit the details here. We finally multiply the obtained PSDDs. The order of multiplication is important to the overall efficiency of the compilation approach. The order we used is as follows. We assign each PSDD to the lowest vtree node containing the PSDD variables, and then multiply PSDDs in the order that we encounter them as we traverse the vtree bottom-up (this is analogous to compiling CNFs in Choi et al. [2013]). Table 1 summarizes our results. We compiled Markov networks into three types of arithmetic circuits. The first compilation (AC1) is to decomposable and deterministic ACs using ace [Chavira and Darwiche, 2008].7 The second compilation (AC2) is also to decomposable and deterministic ACs, but using the approach proposed in Choi et al. [2013]. The third compilation is to PSDDs as discussed above. The first two approaches are based on reducing the inference problem into a weighted model counting problem. In particular, these approaches encode the network using Boolean expressions, which are compiled to logical representations (d-DNNF or SDD), from which an arithmetic circuit is induced. The systems underlying these approaches are quite complex and are the result of many years of engineering. In contrast, the proposed compilation to PSDDs does not rely on an intermediate representation or additional boxes, such as d-DNNF or SDD compilers. The benchmarks in Table 1 are from the UAI-14 Inference Competition.8 We selected all networks over binary variables in the MAR track, and report a network only if at least one approach successfully compiled it (given time and space limits of 30 minutes and 16GB). We report the size (the number of edges) and time spent for each compilation. First, we note that for all benchmarks that compiled to both PSDD and AC2 (based on SDDs), the PSDD size is always smaller. This can be attributed in part to the fact that reductions to weighted model counting represent parameters explicitly as variables, which are retained throughout the compilation process. In contrast, PSDD parameters are annotated on its edges. More interestingly, when we multiply two PSDD factors, the parameters of the inputs may not persist in the output PSDD. That is, the PSDD only maintains enough parameters to represent the resulting distribution, which further explains the size differences. In the Promedus benchmarks, we also see that in all but 5 cases, the compiled PSDD is smaller than AC1. However, several Grids benchmarks were compilable to AC1, but failed to compile to AC2 or PSDD, given the time and space limits. On the other hand, we were able to compile some of the relational benchmarks to PSDD, which did not compile to AC1 and compiled partially to AC2. 6 Related Work Tabular representations and their sparse variations (e.g., Larkin and Dechter [2003]) are typically used to represent factors for probabilistic inference and learning. Rules and decision trees are more succinct representations for modeling context-specific independence, although they are not much more amenable to exact inference compared to tabular representations [Boutilier et al., 1996, Friedman and Goldszmidt, 1998]. Domain specific representations have been proposed, e.g., in computer vision 6We used the minic2d package which is available at reasoning.cs.ucla.edu/minic2d/. 7The ace system is publicly available at http://reasoning.cs.ucla.edu/ace/. 8http://www.hlt.utdallas.edu/~vgogate/uai14-competition/index.html 7 Table 1: AC compilation size (number of edges) and time (in seconds) compilation size compilation time network AC1 AC2 psdd AC1 AC2 psdd Alchemy_11 12,705,213 - 13,715,906 130.83 - 300.80 Grids_11 81,074,816 - 271.97 Grids_12 232,496 457,529 201,250 0.93 1.12 1.68 Grids_13 81,090,432 - 273.88 Grids_14 83,186,560 - 279.12 Segmentation_11 20,895,884 41,603,129 30,951,708 72.39 204.54 223.60 Segmentation_12 15,840,404 41,005,721 34,368,060 51.27 209.03 283.79 Segmentation_13 33,746,511 78,028,443 33,726,812 117.46 388.97 255.29 Segmentation_14 16,965,928 48,333,027 46,363,820 62.31 279.19 639.07 Segmentation_15 29,888,972 - 33,866,332 107.87 - 273.67 Segmentation_16 18,799,112 54,557,867 19,935,308 65.64 265.07 163.38 relational_3 183,064 41,070 1.21 10.43 relational_5 217,696 - 594.68 Promedus_11 67,036 174,592 30,542 6.80 1.88 2.28 Promedus_12 45,119 349,916 48,814 0.91 5.81 2.46 Promedus_13 42,065 83,701 26,100 0.80 0.23 3.94 Promedus_14 2,354,180 3,667,740 749,528 21.64 33.27 24.90 Promedus_15 14,363 31,176 9,520 0.95 0.10 1.52 Promedus_16 45,935 154,467 29,150 1.35 0.40 2.06 Promedus_17 3,336,316 9,849,598 1,549,170 68.08 48.47 50.22 compilation size compilation time network AC1 AC2 psdd AC1 AC2 psdd Promedus_18 3,006,654 762,247 539,478 20.46 18.38 21.20 Promedus_19 796,928 1,171,288 977,510 6.80 25.01 68.62 Promedus_20 70,422 188,322 70,492 0.96 3.24 3.46 Promedus_21 17,528 31,911 10,944 0.62 0.18 1.78 Promedus_22 26,010 39,016 33,064 0.63 0.10 1.58 Promedus_23 329,669 1,473,628 317,514 3.29 17.77 10.88 Promedus_24 4,774 9,085 1,960 0.45 0.05 0.80 Promedus_25 556,179 3,614,581 407,974 7.66 32.90 6.78 Promedus_26 57,190 24,578 5,146 0.71 198.74 2.72 Promedus_27 33,611 52,698 19,434 0.73 0.55 1.16 Promedus_28 24,049 46,364 17,084 1.04 0.30 1.59 Promedus_29 10,403 20,600 4,828 0.54 0.08 1.88 Promedus_30 9,884 21,230 6,734 0.50 0.07 1.23 Promedus_31 17,977 31,754 10,842 0.57 0.12 1.96 Promedus_32 15,215 33,064 8,682 0.59 0.11 1.77 Promedus_33 10,734 18,535 4,006 0.59 0.07 1.57 Promedus_34 38,113 54,214 21,398 0.87 0.78 1.78 Promedus_35 18,765 31,792 11,120 0.68 0.13 1.79 Promedus_36 19,175 31,792 11,004 1.22 0.12 1.91 Promedus_37 77,088 144,664 79,210 1.49 3.50 6.15 Promedus_38 177,560 593,675 123,552 1.67 17.19 8.09 [Felzenszwalb and Huttenlocher, 2006], to allow for more efficient factor operations. Algebraic Decision Diagrams (ADDs) and Algebraic Sentential Decision Diagrams (ASDDs) can also be used to multiply two factors in polytime [Bahar et al., 1993, Herrmann and de Barros, 2013], but their sizes can grow quickly with repeated multiplications: ADDs have a distinct node for each possible value of a factor/distribution. Since ADDs also support a polytime summing-out operation, ADDs are more commonly used in the context of variable elimination [Sanner and McAllester, 2005, Chavira and Darwiche, 2007], and in message passing algorithms [Gogate and Domingos, 2013]. Probabilistic Decision Graphs (PDGs) and AND/OR Multi-Valued Decision Diagrams (AOMDD) support a polytime multiply operator, and also have treewidth upper bounds when compiling probabilistic graphical models [Jaeger, 2004, Mateescu et al., 2008]. Both PDGs and AOMDDs can be viewed as sub-classes of PSDDs that branch on variables instead of sentences as is the case with PSDDs—this distinction can lead to exponential reductions in size [Xue et al., 2012, Bova, 2016]. 7 Conclusion We considered the tractability of multiplication and summing-out operators for arithmetic circuits (ACs), as tractable representations of factors and distributions. We showed that both operations are intractable for deterministic and decomposable ACs (under standard complexity theoretic assumptions). We also showed that for a sub-class of ACs, known as PSDDs, a polytime multiplication operator is supported. Moreover, we showed that PSDDs do not support summing-out in polytime (unconditionally). Finally, we illustrated the utility of PSDD multiplication, providing a relatively simple but effective algorithm for compiling probabilistic graphical models into PSDDs. Acknowledgments This work was partially supported by NSF grant #IIS-1514253 and ONR grant #N00014-15-1-2339. References U. A. Acar, A. T. Ihler, R. R. Mettu, and Ö. Sümer. Adaptive inference on general graphical models. In UAI, pages 1–8, 2008. R. I. Bahar, E. A. Frohm, C. M. Gaona, G. D. Hachtel, E. Macii, A. Pardo, and F. Somenzi. Algebraic decision diagrams and their applications. In ICCAD, pages 188–191, 1993. J. Bekker, J. Davis, A. Choi, A. Darwiche, and G. Van den Broeck. Tractable learning for complex probability queries. In NIPS, 2015. C. Boutilier, N. Friedman, M. Goldszmidt, and D. Koller. Context-specific independence in Bayesian networks. In UAI, pages 115–123, 1996. S. Bova. SDDs are exponentially more succinct than OBDDs. In AAAI, pages 929–935, 2016. H. Chan and A. Darwiche. On the robustness of most probable explanations. In UAI, 2006. M. Chavira and A. Darwiche. Compiling Bayesian networks using variable elimination. In IJCAI, 2007. 8 M. Chavira and A. Darwiche. On probabilistic inference by weighted model counting. AIJ, 172(6–7):772–799, April 2008. A. Choi and A. Darwiche. Relax, compensate and then recover. In T. Onada, D. Bekki, and E. McCready, editors, NFAI, volume 6797 of LNCF, pages 167–180. Springer, 2011. A. Choi, D. Kisa, and A. Darwiche. Compiling probabilistic graphical models using sentential decision diagrams. In ECSQARU, pages 121–132, 2013. A. Choi, G. Van den Broeck, and A. Darwiche. Tractable learning for structured probability spaces: A case study in learning preference distributions. In IJCAI, 2015. A. Choi, N. Tavabi, and A. Darwiche. Structured features in naive Bayes classification. In AAAI, 2016. A. Darwiche. On the tractable counting of theory models and its application to truth maintenance and belief revision. Journal of Applied Non-Classical Logics, 11(1-2):11–34, 2001a. A. Darwiche. Decomposable negation normal form. J. ACM, 48(4):608–647, 2001b. A. Darwiche. A differential approach to inference in Bayesian networks. J. ACM, 50(3):280–305, 2003. A. Darwiche. Modeling and Reasoning with Bayesian Networks. Cambridge University Press, 2009. A. Darwiche. SDD: A new canonical representation of propositional knowledge bases. In IJCAI, pages 819–826, 2011. A. Darwiche and P. Marquis. A knowledge compilation map. JAIR, 17:229–264, 2002. A. Darwiche, R. Dechter, A. Choi, V. Gogate, and L. Otten. Results from the probabilistic inference evaluation of UAI-08. 2008. A. L. Delcher, A. J. Grove, S. Kasif, and J. Pearl. Logarithmic-time updates and queries in probabilistic networks. In UAI, pages 116–124, 1995. P. F. Felzenszwalb and D. P. Huttenlocher. Efficient belief propagation for early vision. IJCV, 70(1):41–54, 2006. N. Friedman and M. Goldszmidt. Learning bayesian networks with local structure. In Learning in graphical models, pages 421–459. Springer, 1998. V. Gogate and P. M. Domingos. Structured message passing. In UAI, 2013. R. G. Herrmann and L. N. de Barros. Algebraic sentential decision diagrams in symbolic probabilistic planning. In Proceedings of the Brazilian Conference on Intelligent Systems (BRACIS), pages 175–181, 2013. M. Jaeger. Probabilistic decision graphs — combining verification and AI techniques for probabilistic inference. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 12:19–42, 2004. D. Kisa, G. Van den Broeck, A. Choi, and A. Darwiche. Probabilistic sentential decision diagrams. In KR, 2014. D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. D. Larkin and R. Dechter. Bayesian inference in the presence of determinism. In AISTATS, 2003. D. Lowd and P. M. Domingos. Learning arithmetic circuits. In UAI, pages 383–392, 2008. D. Lowd and A. Rooshenas. Learning Markov networks with arithmetic circuits. In AISTATS, pages 406–414, 2013. R. Mateescu, R. Dechter, and R. Marinescu. AND/OR multi-valued decision diagrams (AOMDDs) for graphical models. J. Artif. Intell. Res. (JAIR), 33:465–519, 2008. U. Oztok and A. Darwiche. On compiling CNF into decision-DNNF. In CP, pages 42–57, 2014. J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. MK, 1988. H. Poon and P. M. Domingos. Sum-product networks: A new deep architecture. In UAI, pages 337–346, 2011. A. Rooshenas and D. Lowd. Learning sum-product networks with direct and indirect variable interactions. In ICML, pages 710–718, 2014. D. Roth. On the hardness of approximate reasoning. Artif. Intell., 82(1-2):273–302, 1996. S. Sanner and D. A. McAllester. Affine algebraic decision diagrams (AADDs) and their application to structured probabilistic inference. In IJCAI, pages 1384–1390, 2005. S. E. Shimony. Finding MAPs for belief networks is NP-hard. Artif. Intell., 68(2):399–410, 1994. D. Sieling and I. Wegener. NC-algorithms for operations on binary decision diagrams. Parallel Processing Letters, 3:3–12, 1993. Y. Xue, A. Choi, and A. Darwiche. Basing decisions on sentences in decision diagrams. In AAAI, pages 842–849, 2012. J. Yedidia, W. Freeman, and Y. Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. IEEE Transactions on Information Theory, 51(7):2282–2312, 2005. 9 | 2016 | 213 |
6,121 | Dual Learning for Machine Translation Di He1,∗, Yingce Xia2,∗, Tao Qin3, Liwei Wang1, Nenghai Yu2, Tie-Yan Liu3, Wei-Ying Ma3 1Key Laboratory of Machine Perception (MOE), School of EECS, Peking University 2University of Science and Technology of China 3Microsoft Research 1{dih,wanglw}@cis.pku.edu.cn; 2xiayingc@mail.ustc.edu.cn; 2ynh@ustc.edu.cn 3{taoqin,tie-yan.liu,wyma}@microsoft.com Abstract While neural machine translation (NMT) is making good progress in the past two years, tens of millions of bilingual sentence pairs are needed for its training. However, human labeling is very costly. To tackle this training data bottleneck, we develop a dual-learning mechanism, which can enable an NMT system to automatically learn from unlabeled data through a dual-learning game. This mechanism is inspired by the following observation: any machine translation task has a dual task, e.g., English-to-French translation (primal) versus French-to-English translation (dual); the primal and dual tasks can form a closed loop, and generate informative feedback signals to train the translation models, even if without the involvement of a human labeler. In the dual-learning mechanism, we use one agent to represent the model for the primal task and the other agent to represent the model for the dual task, then ask them to teach each other through a reinforcement learning process. Based on the feedback signals generated during this process (e.g., the languagemodel likelihood of the output of a model, and the reconstruction error of the original sentence after the primal and dual translations), we can iteratively update the two models until convergence (e.g., using the policy gradient methods). We call the corresponding approach to neural machine translation dual-NMT. Experiments show that dual-NMT works very well on English↔French translation; especially, by learning from monolingual data (with 10% bilingual data for warm start), it achieves a comparable accuracy to NMT trained from the full bilingual data for the French-to-English translation task. 1 Introduction State-of-the-art machine translation (MT) systems, including both the phrase-based statistical translation approaches [6, 3, 12] and the recently emerged neural networks based translation approaches [1, 5], heavily rely on aligned parallel training corpora. However, such parallel data are costly to collect in practice and thus are usually limited in scale, which may constrain the related research and applications. Given that there exist almost unlimited monolingual data in the Web, it is very natural to leverage them to boost the performance of MT systems. Actually different methods have been proposed for this purpose, which can be roughly classified into two categories. In the first category [2, 4], monolingual corpora in the target language are used to train a language model, which is then integrated with the MT models trained from parallel bilingual corpora to improve the translation quality. In the second category [14, 11], pseudo bilingual sentence pairs are generated from monolingual data by using the ∗The first two authors contributed equally to this work. This work was conducted when the second author was visiting Microsoft Research Asia. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. translation model trained from aligned parallel corpora, and then these pseudo bilingual sentence pairs are used to enlarge the training data for subsequent learning. While the above methods could improve the MT performance to some extent, they still suffer from certain limitations. The methods in the first category only use the monolingual data to train language models, but do not fundamentally address the shortage of parallel training data. Although the methods in the second category can enlarge the parallel training data, there is no guarantee/control on the quality of the pseudo bilingual sentence pairs. In this paper, we propose a dual-learning mechanism that can leverage monolingual data (in both the source and target languages) in a more effective way. By using our proposed mechanism, these monolingual data can play a similar role to the parallel bilingual data, and significantly reduce the requirement on parallel bilingual data during the training process. Specifically, the dual-learning mechanism for MT can be described as the following two-agent communication game. 1. The first agent, who only understands language A, sends a message in language A to the second agent through a noisy channel, which converts the message from language A to language B using a translation model. 2. The second agent, who only understands language B, receives the translated message in language B. She checks the message and notifies the first agent whether it is a natural sentence in language B (note that the second agent may not be able to verify the correctness of the translation since the original message is invisible to her). Then she sends the received message back to the first agent through another noisy channel, which converts the received message from language B back to language A using another translation model. 3. After receiving the message from the second agent, the first agent checks it and notifies the second agent whether the message she receives is consistent with her original message. Through the feedback, both agents will know whether the two communication channels (and thus the two translation models) perform well and can improve them accordingly. 4. The game can also be started from the second agent with an original message in language B, and then the two agents will go through a symmetric process and improve the two channels (translation models) according to the feedback. It is easy to see from the above descriptions, although the two agents may not have aligned bilingual corpora, they can still get feedback about the quality of the two translation models and collectively improve the models based on the feedback. This game can be played for an arbitrary number of rounds, and the two translation models will get improved through this reinforcement procedure (e.g., by means of the policy gradient methods). In this way, we develop a general learning framework for training machine translation models through a dual-learning game. The dual learning mechanism has several distinguishing features. First, we train translation models from unlabeled data through reinforcement learning. Our work significantly reduces the requirement on the aligned bilingual data, and it opens a new window to learn to translate from scratch (i.e., even without using any parallel data). Experimental results show that our method is very promising. Second, we demonstrate the power of deep reinforcement learning (DRL) for complex real-world applications, rather than just games. Deep reinforcement learning has drawn great attention in recent years. However, most of them today focus on video or board games, and it remains a challenge to enable DRL for more complicated applications whose rules are not pre-defined and where there is no explicit reward signals. Dual learning provides a promising way to extract reward signals for reinforcement learning in real-world applications like machine translation. The remaining parts of the paper are organized as follows. In Section 2, we briefly review the literature of neural machine translation. After that, we introduce our dual-learning algorithm for neural machine translation. The experimental results are provided and discussed in Section 4. We extend the breadth and depth of dual learning in Section 5 and discuss future work in the last section. 2 Background: Neural Machine Translation In principle, our dual-learning framework can be applied to both phrase-based statistical machine translation and neural machine translation. In this paper, we focus on the latter one, i.e., neural 2 machine translation (NMT), due to its simplicity as an end-to-end system, without suffering from human crafted engineering [5]. Neural machine translation systems are typically implemented with a Recurrent Neural Network (RNN) based encoder-decoder framework. Such a framework learns a probabilistic mapping P(y|x) from a source language sentence x = {x1, x2, ..., xTx} to a target language sentence y = {y1, y2, ..., yTy} , in which xi and yt are the i-th and t-th words for sentences x and y respectively. To be more concrete, the encoder of NMT reads the source sentence x and generates Tx hidden states by an RNN: hi = f(hi−1, xi) (1) in which hi is the hidden state at time i, and function f is the recurrent unit such as Long Short-Term Memory (LSTM) unit [12] or Gated Recurrent Unit (GRU) [3]. Afterwards, the decoder of NMT computes the conditional probability of each target word yt given its proceeding words y<t, as well as the source sentence, i.e., P(yt|y<t, x), which is then used to specify P(y|x) according to the probability chain rule. P(yt|y<t, x) is given as: P(yt|y<t, x) ∝exp(yt; rt, ct) (2) rt = g(rt−1, yt−1, ct) (3) ct = q(rt−1, h1, · · · , hTx) (4) where rt is the decoder RNN hidden state at time t, similarly computed by an LSTM or GRU, and ct denotes the contextual information in generating word yt according to different encoder hidden states. ct can be a ‘global’ signal summarizing sentence x [3, 12], e.g., c1 = · · · = cTy = hTx, or ‘local’ signal implemented by an attention mechanism [1], e.g., ct = PTx i=1 αihi, αi = exp{a(hi,rt−1)} P j exp{a(hj,rt−1)}, where a(·, ·) is a feed-forward neural network. We denote all the parameters to be optimized in the neural network as Θ and denote D as the dataset that contains source-target sentence pairs for training. Then the learning objective is to seek the optimal parameters Θ∗: Θ∗= argmax Θ X (x,y)∈D Ty X t=1 log P(yt|y<t, x; Θ) (5) 3 Dual Learning for Neural Machine Translation In this section, we present the dual-learning mechanism for neural machine translation. Noticing that MT can (always) happen in dual directions, we first design a two-agent game with a forward translation step and a backward translation step, which can provide quality feedback to the dual translation models even using monolingual data only. Then we propose a dual-learning algorithm, called dual-NMT, to improve the two translation models based on the quality feedback provided in the game. Consider two monolingual corpora DA and DB which contain sentences from language A and B respectively. Please note these two corpora are not necessarily aligned with each other, and they may even have no topical relationship with each other at all. Suppose we have two (weak) translation models that can translate sentences from A to B and verse visa. Our goal is to improve the accuracy of the two models by using monolingual corpora instead of parallel corpora. Our basic idea is to leverage the duality of the two translation models. Starting from a sentence in any monolingual data, we first translate it forward to the other language and then further translate backward to the original language. By evaluating this two-hop translation results, we will get a sense about the quality of the two translation models, and be able to improve them accordingly. This process can be iterated for many rounds until both translation models converge. Suppose corpus DA contains NA sentences, and DB contains NB sentences. Denote P(.|s; ΘAB) and P(.|s; ΘBA) as two neural translation models, where ΘAB and ΘBA are their parameters (as described in Section 2). Assume we already have two well-trained language models LMA(.) and LMB(.) (which are easy to obtain since they only require monolingual data), each of which takes a sentence as input and outputs 3 Algorithm 1 The dual-learning algorithm 1: Input: Monolingual corpora DA and DB, initial translation models ΘAB and ΘBA, language models LMA and LMB, α, beam search size K, learning rates γ1,t, γ2,t . 2: repeat 3: t = t + 1. 4: Sample sentence sA and sB from DA and DB respectively. 5: Set s = sA. ▷Model update for the game beginning from A. 6: Generate K sentences smid,1, . . . , smid,K using beam search according to translation model P(.|s; ΘAB). 7: for k = 1, . . . , K do 8: Set the language-model reward for the kth sampled sentence as r1,k = LMB(smid,k). 9: Set the communication reward for the kth sampled sentence as r2,k = log P(s|smid,k; ΘBA). 10: Set the total reward of the kth sample as rk = αr1,k + (1 −α)r2,k. 11: end for 12: Compute the stochastic gradient of ΘAB: ∇ΘAB ˆE[r] = 1 K K X k=1 [rk∇ΘAB log P(smid,k|s; ΘAB)]. 13: Compute the stochastic gradient of ΘBA: ∇ΘBA ˆE[r] = 1 K K X k=1 [(1 −α)∇ΘBA log P(s|smid,k; ΘBA)]. 14: Model updates: ΘAB ←ΘAB + γ1,t∇ΘAB ˆE[r], ΘBA ←ΘBA + γ2,t∇ΘBA ˆE[r]. 15: Set s = sB. ▷Model update for the game beginning from B. 16: Go through line 6 to line 14 symmetrically. 17: until convergence a real value to indicate how confident the sentence is a natural sentence in its own language. Here the language models can be trained either using other resources, or just using the monolingual data DA and DB. For a game beginning with sentence s in DA, denote smid as the middle translation output. This middle step has an immediate reward r1 = LMB(smid), indicating how natural the output sentence is in language B. Given the middle translation output smid, we use the log probability of s recovered from smid as the reward of the communication (we will use reconstruction and communication interchangeably). Mathematically, reward r2 = log P(s|smid; ΘBA). We simply adopt a linear combination of the LM reward and communication reward as the total reward, e.g., r = αr1 + (1 −α)r2, where α is a hyper-parameter. As the reward of the game can be considered as a function of s, smid and translation models ΘAB and ΘBA, we can optimize the parameters in the translation models through policy gradient methods for reward maximization, as widely used in reinforcement learning [13]. We sample smid according to the translation model P(.|s; ΘAB). Then we compute the gradient of the expected reward E[r] with respect to parameters ΘAB and ΘBA. According to the policy gradient theorem [13], it is easy to verify that ∇ΘBAE[r] = E[(1 −α)∇ΘBA log P(s|smid; ΘBA)] (6) ∇ΘABE[r] = E[r∇ΘAB log P(smid|s; ΘAB)] (7) in which the expectation is taken over smid. Based on Eqn.(6) and (7), we can adopt any sampling approach to estimate the expected gradient. Considering that random sampling brings very large variance and sometimes unreasonable results in 4 Table 1: Translation results of En↔Fr task. The results of the experiments using all the parallel data for training are provided in the first two columns (marked by “Large”), and the results using 10% parallel data for training are in the last two columns (marked by “Small”). En→Fr (Large) Fr→En (Large) En→Fr (Small) Fr→En (Small) NMT 29.92 27.49 25.32 22.27 pseudo-NMT 30.40 27.66 25.63 23.24 dual-NMT 32.06 29.78 28.73 27.50 machine translation [9, 12, 10], we use beam search [12] to obtain more meaningful results (more reasonable middle translation outputs) for gradient computation, i.e., we greedily generate top-K high-probability middle translation outputs, and use the averaged value on the beam search results to approximate the true gradient. If the game begins with sentence s in DB, the computation of the gradient is just symmetric and we omit it here. The game can be repeated for many rounds. In each round, one sentence is sampled from DA and one from DB, and we update the two models according to the game beginning with the two sentences respectively. The details of this process are given in Algorithm 1. 4 Experiments We conducted a set of experiments to test the proposed dual-learning mechanism for neural machine translation. 4.1 Settings We compared our dual-NMT approach with two baselines: the standard neural machine translation [1] (NMT for short), and a recent NMT-based method [11] which generates pseudo bilingual sentence pairs from monolingual corpora to assist training (pseudo-NMT for short). We leverage a tutorial NMT system implemented by Theano for all the experiments. 2 We evaluated our algorithm on the translation task of a pair of languages: English→French (En→Fr) and French→English (Fr→En). In detail, we used the same bilingual corpora from WMT’14 as used in [1, 5], which contains 12M sentence pairs extracting from five datasets: Europarl v7, Common Crawl corpus, UN corpus, News Commentary, and 109French-English corpus. Following common practices, we concatenated newstest2012 and newstest2013 as the validation set, and used newstest2014 as the testing set. We used the “News Crawl: articles from 2012” provided by WMT’14 as monolingual data. We used the GRU networks and followed the practice in [1] to set experimental parameters. For each language, we constructed the vocabulary with the most common 30K words in the parallel corpora, and out-of-vocabulary words were replaced with a special token <UNK>. For monolingual corpora, we removed the sentences containing at least one out-of-vocabulary words. Each word was projected into a continuous vector space of 620 dimensions, and the dimension of the recurrent unit was 1000. We removed sentences with more than 50 words from the training set. Batch size was set as 80 with 20 batches pre-fetched and sorted by sentence lengths. For the baseline NMT model, we exactly followed the settings reported in [1]. For the baseline pseudo-NMT [11], we used the trained NMT model to generate pseudo bilingual sentence pairs from monolingual data, removed the sentences with more than 50 words, merged the generated data with the original parallel training data, and then trained the model for testing. Each of the baseline models was trained with AdaDelta [15] on K40m GPU until their performances stopped to improve on the validation set. Our method needs a language model for each language. We trained an RNN based language model [7] for each language using its corresponding monolingual corpus. Then the language model was 2dl4mt-tutorial: https://github.com/nyu-dl 5 Table 2: Reconstruction performance of En↔Fr task En→Fr→En (L) Fr→En→Fr (L) En→Fr→En (S) Fr→En→Fr (S) NMT 39.92 45.05 28.28 32.63 pseudo-NMT 38.15 45.41 30.07 34.54 dual-NMT 51.84 54.65 48.94 50.38 fixed and the log likelihood of a received message was used to reward the communication channel (i.e., the translation model) in our experiments. While playing the game, we initialized the channels using warm-start translation models (e.g., trained from bilingual data corpora), and see whether dual-NMT can effectively improve the machine translation accuracy. In our experiments, in order to smoothly transit from the initial model trained from bilingual data to the model training purely from monolingual data, we adopted the following soft-landing strategy. At the very beginning of the dual learning process, for each mini batch, we used half sentences from monolingual data and half sentences from bilingual data (sampled from the dataset used to train the initial model). The objective was to maximize the weighted sum of the reward based on monolingual data defined in Section 3 and the likelihood on bilingual data defined in Section 2. When the training process went on, we gradually increased the percentage of monolingual sentences in the mini batch, until no bilingual data were used at all. Specifically, we tested two settings in our experiments: • In the first setting (referred to Large), we used all the 12M bilingual sentences pairs during the soft-landing process. That is, the warm start model was learnt based on full bilingual data. • In the second setting (referred to Small), we randomly sampled 10% of the 12M bilingual sentences pairs and used them during the soft-landing process. For each of the settings we trained our dual-NMT algorithm for one week. We set the beam search size to be 2 in the middle translation process. All the hyperparameters in the experiments were set by cross validation.We used the BLEU score [8] as the evaluation metric, which are computed by the multi-bleu.perl script3. Following the common practice, during testing we used beam search [12] with beam size of 12 for all the algorithms as in many previous works. 4.2 Results and Analysis We report the experimental results in this section. Recall that the two baselines for English→French and French→English are trained separately while our dual-NMT conducts joint training. We summarize the overall performances in Table 1 and plot the BLEU scores with respect to the length of source sentences in Figure 1. From Table 1 we can see that our dual-NMT algorithm outperforms the baseline algorithms in all the settings. For the translation from English to French, dual-NMT outperforms the baseline NMT by about 2.1/3.4 points for the first/second warm start setting, and outperforms pseudo-NMT by about 1.7/3.1 points for both settings. For the translation from French to English, the improvement is more significant: our dual-NMT outperforms NMT by about 2.3/5.2 points for the first/second warm start setting, and outperforms pseudo-NMT by about 2.1/4.3 points for both settings. Surprisingly, with only 10% bilingual data, dual-NMT achieves comparable translation accuracy as vanilla NMT using 100% bilingual data for the Fr→En task. These results demonstrate the effectiveness of our dual-NMT algorithm. Furthermore, we have the following observations: • Although pseudo-NMT outperforms NMT, its improvements are not very significant. Our hypothesis is that the quality of pseudo bilingual sentence pairs generated from the monolingual data is not very good, which limits the performance gain of pseudo-NMT. One might need to carefully select and filter the generated pseudo bilingual sentence pairs to get better performance for pseudo-NMT. 3https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl 6 Table 3: Cases study of the translation-back-translation (TBT) performance during dual-NMT training Translation-back-translation results Translation-back-translation results before dual-NMT training after dual-NMT training Source (En) The majority of the growth in the years to come will come from its liquefied natural gas schemes in Australia. La plus grande partie de la croisLa majorité de la croissance dans En→Fr -sance des années à venir viendra les années à venir viendra de ses de ses systèmes de gaz naturel régimes de gaz naturel liquéfié liquéfié en Australie . en Australie . Most of the growth of future The majority of growth in the En→Fr→En years will come from its liquefied coming years will come from its natural gas systems in Australia . liquefied natural gas systems in Australia . Source (Fr) Il précise que " les deux cas identifiés en mai 2013 restent donc les deux seuls cas confirmés en France à ce jour " . He noted that " the two cases He states that " the two cases Fr→En identified in May 2013 therefore identified in May 2013 remain the remain the only two two confirmed only two confirmed cases in France cases in France to date " . to date " Il a noté que " les deux cas Il précise que " les deux cas Fr→En→Fr identifiésen mai 2013 demeurent identifiés en mai 2013 restent les donc les deux seuls deux deux cas seuls deux cas confirmés en France confirmés en France à ce jour " à ce jour ". • When the parallel bilingual data are small, dual-NMT makes larger improvement. This shows that the dual-learning mechanism makes very good utilization of monolingual data. Thus we expect dual-NMT will be more helpful for language pairs with smaller labeled parallel data. Dual-NMT opens a new window to learn to translate from scratch. We plot BLEU scores with respect to the length of source sentences in Figure 1. From the figure, we can see that our dual-NMT algorithm outperforms the baseline algorithms in all the ranges of length. We make some deep studies on our dual-NMT algorithm in Table 2. We study the self-reconstruction performance of the algorithms: For each sentence in the test set, we translated it forth and back using the models and then checked how close the back translated sentence is to the original sentence using the BLEU score. We also used beam search to generate all the translation results. It can be easily seen from Table 2 that the self-reconstruction BLEU scores of our dual-NMT are much higher than NMT and pseudo-NMT. In particular, our proposed method outperforms NMT by about 11.9/9.6 points when using warm-start model trained on large parallel data, and outperforms NMT for about 20.7/17.8 points when using the warm-start model trained on 10% parallel data. We list several example sentences in Table 3 to compare the self-reconstruction results of models before and after dual learning. It is quite clear that after dual learning, the reconstruction is largely improved for both directions, i.e., English→French→English and French→English→French. To summarize, all the results show that the dual-learning mechanism is promising and better utilizes the monolingual data. 5 Extensions In this section, we discuss the possible extensions of our proposed dual learning mechanism. 7 First, although we have focused on machine translation in this work, the basic idea of dual learning is generally applicable: as long as two tasks are in dual form, we can apply the dual-learning mechanism to simultaneously learn both tasks from unlabeled data using reinforcement learning algorithms. Actually, many AI tasks are naturally in dual form, for example, speech recognition versus text to speech, image caption versus image generation, question answering versus question generation (e.g., Jeopardy!), search (matching queries to documents) versus keyword extraction (extracting keywords/queries for documents), so on and so forth. It would very be interesting to design and test dual-learning algorithms for more dual tasks beyond machine translation. Second, although we have focused on dual learning on two tasks, our technology is not restricted to two tasks only. Actually, our key idea is to form a closed loop so that we can extract feedback signals by comparing the original input data with the final output data. Therefore, if more than two associated tasks can form a closed loop, we can apply our technology to improve the model in each task from unlabeled data. For example, for an English sentence x, we can first translate it to a Chinese sentence y, then translate y to a French sentence z, and finally translate z back to an English sentence x′. The similarity between x and x′ can indicate the effectiveness of the three translation models in the loop, and we can once again apply the policy gradient methods to update and improve these models based on the feedback signals during the loop. We would like to name this generalized dual learning as close-loop learning, and will test its effectiveness in the future. <10 [10,20) [20,30) [30,40) [40,50) [50,60) >60 16 18 20 22 24 26 28 30 32 34 Source Sentence Length BLEU NMT (Large) dual−NMT (Large) NMT (Small) dual−NMT (Small) (a) En→Fr <10 [10,20) [20,30) [30,40) [40,50) [50,60) >60 16 18 20 22 24 26 28 30 32 Source Sentence Length BLEU NMT (Large) dual−NMT (Large) NMT (Small) dual−NMT (Small) (b) Fr→En Figure 1: BLEU scores w.r.t lengths of source sentences 6 Future Work We plan to explore the following directions in the future. First, in the experiments we used bilingual data to warm start the training of dual-NMT. A more exciting direction is to learn from scratch, i.e., to learn translations directly from monolingual data of two languages (maybe plus lexical dictionary). Second, our dual-NMT was based on NMT systems in this work. Our basic idea can also be applied to phrase-based SMT systems and we will look into this direction. Third, we only considered a pair of languages in this paper. We will extend our approach to jointly train multiple translation models for a tuple of 3+ languages using monolingual data. Acknowledgement This work was partially supported by National Basic Research Program of China (973 Program) (grant no. 2015CB352502), NSFC (61573026) and the MOE–Microsoft Key Laboratory of Statistics and Machine Learning, Peking University. We would like to thank Yiren Wang, Fei Tian, Li Zhao and Wei Chen for helpful discussions, and the anonymous reviewers for their valuable comments on our paper. 8 References [1] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015. [2] T. Brants, A. C. Popat, P. Xu, F. J. Och, and J. Dean. Large language models in machine translation. In In Proceedings of the Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Citeseer, 2007. [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 Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724–1734, Doha, Qatar, October 2014. Association for Computational Linguistics. [4] C. Gulcehre, O. Firat, K. Xu, K. Cho, L. Barrault, H.-C. Lin, F. Bougares, H. Schwenk, and Y. Bengio. On using monolingual corpora in neural machine translation. arXiv preprint arXiv:1503.03535, 2015. [5] S. Jean, K. Cho, R. Memisevic, and Y. Bengio. On using very large target vocabulary for neural machine translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1–10, Beijing, China, July 2015. Association for Computational Linguistics. [6] P. Koehn, F. J. Och, and D. Marcu. Statistical phrase-based translation. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume 1, pages 48–54. Association for Computational Linguistics, 2003. [7] T. Mikolov, M. Karafiát, L. Burget, J. Cernock`y, and S. Khudanpur. Recurrent neural network based language model. In INTERSPEECH, volume 2, page 3, 2010. [8] K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 311–318. Association for Computational Linguistics, 2002. [9] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. [10] A. M. Rush, S. Chopra, and J. Weston. A neural attention model for abstractive sentence summarization. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 379–389, Lisbon, Portugal, September 2015. Association for Computational Linguistics. [11] R. Sennrich, B. Haddow, and A. Birch. Improving neural machine translation models with monolingual data. In ACL, 2016. [12] 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. [13] R. S. Sutton, D. A. McAllester, S. P. Singh, Y. Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pages 1057–1063, 1999. [14] N. Ueffing, G. Haffari, and A. Sarkar. Semi-supervised model adaptation for statistical machine translation. Machine Translation Journal, 2008. [15] M. D. Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. 9 | 2016 | 214 |
6,122 | Solving Random Systems of Quadratic Equations via Truncated Generalized Gradient Flow Gang Wang∗,† and Georgios B. Giannakis† ∗ECE Dept. and Digital Tech. Center, Univ. of Minnesota, Mpls, MN 55455, USA † School of Automation, Beijing Institute of Technology, Beijing 100081, China {gangwang, georgios}@umn.edu Abstract This paper puts forth a novel algorithm, termed truncated generalized gradient flow (TGGF), to solve for x ∈Rn/Cn a system of m quadratic equations yi = |⟨ai, x⟩|2, i = 1, 2, . . . , m, which even for {ai ∈Rn/Cn}m i=1 random is known to be NP-hard in general. We prove that as soon as the number of equations m is on the order of the number of unknowns n, TGGF recovers the solution exactly (up to a global unimodular constant) with high probability and complexity growing linearly with the time required to read the data {(ai; yi)}m i=1. Specifically, TGGF proceeds in two stages: s1) A novel orthogonality-promoting initialization that is obtained with simple power iterations; and, s2) a refinement of the initial estimate by successive updates of scalable truncated generalized gradient iterations. The former is in sharp contrast to the existing spectral initializations, while the latter handles the rather challenging nonconvex and nonsmooth amplitude-based cost function. Empirical results demonstrate that: i) The novel orthogonalitypromoting initialization method returns more accurate and robust estimates relative to its spectral counterparts; and, ii) even with the same initialization, our refinement/truncation outperforms Wirtinger-based alternatives, all corroborating the superior performance of TGGF over state-of-the-art algorithms. 1 Introduction Consider a system of m quadratic equations yi = |⟨ai, x⟩|2 , i ∈[m] := {1, 2, . . . , m} (1) where data vector y := [y1 · · · ym]T and feature vectors ai ∈Rn/Cn, collected in the m×n matrix A := [a1 · · · am]H are known, whereas vector x ∈Rn/Cn is the wanted unknown. When {ai}m i=1 and/or x are complex, their amplitudes are given but phase information is lacking; whereas in the real case only the signs of {⟨ai, x⟩} are unknown. Supposing that the system of equations in (1) admits a unique solution x (up to a global unimodular constant), our objective is to reconstruct x from m phaseless quadratic equations, or equivalently, recover the missing signs/phases of ⟨ai, x⟩in the real-/complex-valued settings. Indeed, it has been established that m ≥2n−1 or m ≥4n−4 generic data {(ai; yi)}m i=1 as in (1) suffice for uniqueness of an n-dimensional real- or complex-valued vector x [1, 2], respectively, and the former with equality has also been shown to be necessary [1]. The problem in (1) constitutes an instance of nonconvex quadratic programming, that is generally known to be NP-hard [3]. Specifically for real-valued vectors, this can be understood as a combinatorial optimization since one seeks a series of signs si = ±1, such that the solution to the system of linear equations ⟨ai, x⟩= siψi, where ψi := √yi, obeys the given quadratic system (1). Concatenating all amplitudes {ψi}m i=1 to form the vector ψ := [ψ1 · · · ψm]T , apparently there are a total of 2m different combinations of {si}m i=1, among which only two lead to x up to a global sign. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. The complex case becomes even more complicated, where instead of a set of signs {si}m i=1, one must specify for uniqueness a collection of unimodular complex scalars {σi ∈C}m i=1. In many fields of physical sciences and engineering, the problem of recovering the phase from intensity/magnitude-only measurements is commonly referred to as phase retrieval [4, 5]. The plethora of applications include X-ray crystallography, optics, as well as array imaging, where due to physical limitations, optical detectors can record only (squared) modulus of the Fresnel or Fraunhofer diffraction pattern, while losing the phase of the incident light reaching the object [5]. It has been shown that reconstructing a discrete, finite-duration signal from its Fourier transform magnitude is NP-complete [6]. Despite its simple form and practical relevance across various fields, tackling the quadratic system (1) under real-/complex-valued settings is challenging and NP-hard in general. 1.1 Nonconvex Optimization Adopting the least-squares criterion, the task of recovering x can be recast as that of minimizing the following intensity-based empirical loss min z∈Cn f(z) := 1 2m m X i=1 yi − aH i z 22 (2) or, the amplitude-based one min z∈Cn ℓ(z) := 1 2m m X i=1 ψi − aH i z 2 . (3) Unfortunately, both cost functions (2) and (3) are nonconvex. Minimizing nonconvex objectives, which may exhibit many stationary points, is in general NP-hard [7]. In a nutshell, solving problems of the form (2) or (3) is challenging. Existing approaches to solving (2) (or related ones using the Poisson likelihood; see, e.g., [8]) or (3) fall under two categories: nonconvex and convex ones. Popular nonconvex solvers include the alternating projection such as Gerchberg-Saxton [9] and Fineup [10], AltMinPhase [11], and (Truncated) Wirtinger flow (WF/TWF) [12, 8], as well as trust-region methods [13]. Convex approaches on the other hand rely on the so-called matrix-lifting technique to obtain the solvers abbreviated as PhaseLift [14] and PhaseCut [15]. In terms of sample complexity for Gaussian {ai} designs, convex approaches enable exact recovery from1 O(n) noiseless measurements [16], while they require solving a semidefinite program of a matrix variable with size n × n, thus incurring worst-case computational complexity on the order of O(n4.5) [15], that does not scale well with dimensionality n. Upon exploiting the underlying problem structure, O(n4.5) can be reduced to O(n3) [15]. Solving for vector variables, nonconvex approaches achieve significantly improved computational performance. Using formulation (3), AltMinPhase adopts a spectral initialization and establishes exact recovery with sample complexity O(n log3 n) under Gaussian {ai} designs with resampling [11]. Concerning formulation (2), WF iteratively refines the spectral initial estimate by means of a gradient-like update [12]. The follow-up TWF improves upon WF through a truncation procedure to separate gradient components of excessively extreme sizes. Likewise, at the initialization stage, since the term (aT i x)2aiaH i responsible for the spectral initialization is heavy-tailed, data {yi}m i=1 are pre-screened in the truncated spectral initialization to yield improved initial estimates [8]. Under Gaussian sampling models, WF allows exact recovery from O(n log n) measurements in O(mn2 log(1/ϵ)) time/flops to yield an ϵ-accurate solution for any given ϵ > 0 [12], while TWF advances these to O(n) measurements and O(mn log(1/ϵ)) time [8]. Interestingly, the truncation procedure in the gradient stage turns out to be useful in avoiding spurious stationary points in the context of nonconvex optimization. Although for large-scale linear regressions, similar ideas including censoring have been studied [17, 18]. It is worth mentioning that when m ≥Cn log3 n for sufficiently large C > 0, the objective function in (3) admits benign geometric structure that allows certain iterative algorithms (e.g., trust-region methods) to efficiently find a global minimizer with random initializations [13]. Although achieving a linear (in the number of unknowns n) sample and computational complexity, the state-of-the-art TWF scheme still requires at least 4n ∼5n equations to yield a stable empirical success rate (e.g., ≥99%) under the real Gaussian model [8, Section 3], which are more than twice the known information-limit of m = 2n −1 [1]. Similar though less obvious results hold also in 1The notation φ(n) = O(g(n)) means that there is a constant c > 0 such that |φ(n)| ≤c|g(n)|. 2 the complex-valued scenario. Even though the truncated spectral initialization improves upon the “plain vallina” spectral initialization, its performance still suffers when the number of measurements is relatively small and its advantage (over the untruncated version) narrows as the number of measurements grows. Further, it is worth stressing that extensive numerical and experimental validation confirms that the amplitude-based cost function performs better than the intensity-based one; that is, formulation (3) is superior over (2) [19]. Hence, besides enhancing initialization, markedly improved performance in the gradient stage could be expected by re-examining the amplitude-based cost function and incorporating judiciously designed truncation rules. 2 Algorithm: Truncated Generalized Gradient Flow Along the lines of suitably initialized nonconvex schemes, and building upon the amplitude-based formulation (3), this paper develops a novel linear-time (in both m and n) algorithm, referred to as truncated generalized gradient flow (TGGF), that provably recovers x ∈Rn/Cn exactly from a near-optimal number of noise-free measurements, while also featuring a near-perfect statistical performance in the noisy setup. Our TGGF proceeds in two stages: s1) A novel orthogonality-promoting initialization that relies on simple power iterations to markedly improve upon spectral initialization; and, s2) a refinement of the initial estimate by successive updates of truncated generalized gradient iterations. Stages s1) and s2) are delineated next in reverse order. For concreteness, our analysis will focus on the real Gaussian model with x ∈Rn and independently and identically distributed (i.i.d.) design vectors ai ∈Rn ∼N(0, In), whereas numerical implementations for the complex Gaussian model having x ∈Cn and i.i.d. ai ∼CN(0, In) := N(0, In/2) + jN(0, In/2) will be discussed briefly. To start, define the Euclidean distance of any estimate z to the solution set: dist(z, x) := min ∥z ± x∥for real signals, and dist(z, x) := minφ∈[0,2π) ∥z −xeiφ∥for complex ones [12]. Define also the indistinguishable global phase constant in real-valued settings as φ(z) := 0, ∥z −x∥≤∥z + x∥, π, otherwise. (4) Henceforth, fixing x to be any solution of the given quadratic system (1), we always assume that φ (z) = 0; otherwise, z is replaced by e−jφ(z)z, but for simplicity of presentation, the constant phase adaptation term e−jφ(z) is dropped whenever it is clear from the context. Numerical tests comparing TGGF, TWF, and WF will be presented throughout our analysis, so let us first describe our basic test settings. Simulated estimates will be averaged over 100 independent Monte Carlo (MC) realizations without mentioning this explicitly each time. Performance is evaluated in terms of the relative root mean-square error, i.e., Relative error := dist(z, x)/∥x∥, and the success rate among 100 trials, where a success will be claimed for a trial if the resulting estimate incurs relative error less than 10−5 [8]. Simulated tests under both noiseless and noisy Gaussian models are performed, corresponding to ψi = aH i x + ηi with ηi = 0 and ηi ∼N(0, σ2) [11], respectively, with i.i.d. ai ∼N(0, In) or ai ∼CN(0, In). 2.1 Truncated generalized gradient stage Let us rewrite the amplitude-based cost function in a matrix-vector form as min z∈Rn ℓ(z) = 1 2m
ψ −|Az|
2 (5) where |Az| := |aT 1 z| · · · |aT mz| T . Apart from being nonconvex, ℓ(z) is nondiffentiable. In the presence of smoothness or convexity, convergence analysis of iterative algorithms relies either on continuity of the gradient (gradient methods) [20], or, on the convexity of the objective functional (subgradient methods) [20]. Although subgradient methods have found widespread applicability in nonsmooth optimization, they are limited to the class of convex functions [20, Page 4]. In nonconvex nonsmooth optimization, the so-termed generalized gradient broadens the scope of the (sub)gradient to the class of almost everywhere differentiable functions [21]. Consider a continuous function h(z) ∈R defined over an open region S ⊆Rn. Definition 1 [22, Definition 1.1] The generalized gradient of a function h at z, denoted by ∂h, is the convex hull of the set of limits of the form lim ∇h(zk), where zk →z as k →+∞, i.e., 3 ∂h(z) := conv n lim k→+∞∇h(zk) : zk →z, zk /∈Gℓ o where the symbol ‘conv’ signifies the convex hull of a set, and Gℓdenotes the set of points in S at which h fails to be differentiable. Having introduced the notion of generalized gradient, and with t denoting the iteration number, our approach to solving (5) amounts to iteratively refining the initial guess z0 by means of the ensuing truncated generalized gradient iterations zt+1 = zt −µt∂ℓtr(zt) (6) where µt > 0 is the stepsize, and a piece of the (truncated) generalized gradient ∂ℓtr(zt) is given by ∂ℓtr(zt) := X i∈It+1 aT i zt −ψi aT i zt |aT i zt| ai (7) for some index set It+1 ⊆[m] to be designed shortly; and the convention aT i zt |aT i zt| := 0 is adopted, if aT i zt = 0. Further, it is easy to verify that the update in (6) monotonically decreases the objective value in (5). m/n for x∈ R1,000 1 2 3 4 5 6 7 Empirical success rate 0 0.2 0.4 0.6 0.8 1 WF TWF TAF Figure 1: Empirical success rate for WF, TWF, and TGGF with the same truncated spectral initialization under the noiseless real Gaussian model. Recall that since they offer descent iterations, the alternating projection variants are guaranteed to converge to a stationary point of ℓ(z), and any limit point z∗ adheres to the following fixed-point equation [23] AT Az∗−ψ ⊙Az∗ |Az∗| = 0 (8) for entry-wise product ⊙, which may have many solutions. Clearly, if z∗is a solution, so is −z∗. Further, both solutions/global minimizers x and −x satisfy (8) due to Ax −ψ ⊙ Ax |Ax| = 0. Considering any stationary point z∗̸= ±x that has been adapted such that φ(z∗) = 0, one can write z∗= x+(AT A)−1AT ψ⊙ Az∗ |Az∗| −Ax |Ax| . A necessary condition for z∗̸= x is Az∗ |Az∗| ̸= Ax |Ax|. Expressed differently, there must be sign differences between Az∗ |Az∗| and Ax |Ax| whenever one gets stuck with an undesirable stationary point z∗. Building on this observation, it is reasonable to devise algorithms that can detect and separate out the generalized gradient components corresponding to mistakenly estimated signs aT i zt |aT i zt| along the iterates {zt}. Precisely, if zt and x lie in different sides of the hyperplane aT i z = 0, then the sign of aT i zt will be different than that of aT i x; that is, aT i x |aT i x| ̸= aT i z |aT i z|. Specifically, one can write the i-th generalized gradient component ∂ℓi(z) = aT i z −ψi aT i z |aT i z| ai = aT i z −ψi aT i x |aT i x| ai + aT i x |aT i x| −aT i z |aT i z| ψiai = aiaT i h + aT i x |aT i x| −aT i z |aT i z| ψiai △= aiaT i h + ri (9) where h := z −x. Apparently, the strong law of large numbers (SLLN) asserts that averaging the first term aiaT i h over m instances approaches h, which qualifies it as a desirable search direction. However, certain generalized gradient entries involve erroneously estimated signs of aT i x; hence, nonzero ri terms exert a negative influence on the search direction h by dragging the iterate away from x, and they typically have sizable magnitudes. To see why, recall that quantities maxi∈[m] ψi and (1/m) Pm i=1 ψi have magnitudes on the order of √m∥x∥and p π/2∥x∥, respectively, whereas ∥h∥≤ρ∥x∥for some small constant 0 < ρ ≤1/10, to be discussed shortly. To maintain a meaningful search direction, those ‘bad’ generalized gradient entries should be detected and excluded from the search direction. 4 Nevertheless, it is difficult or even impossible to check whether the sign of aT i zt equals that of aT i x. Fortunately, when the initialization is accurate enough, most spurious gradient entries (those corrupted by nonzero ri terms) provably hover around the watershed hyperplane aT i zt = 0. For this reason, TGGF includes only those components having zt sufficiently away from its watershed It+1 := n 1 ≤i ≤m |aT i zt| |aT i x| ≥ 1 1 + γ o , t ≥0 (10) for an appropriately selected threshold γ > 0. It is worth stressing that our novel truncation rule deviates from the intuition behind TWF. Among its complicated truncation procedures, TWF also throws away large-size gradient components corresponding to (10), which is not the case with TGGF. As demonstrated by our analysis, it rarely happens that a generalized gradient component having a large |aT i zt|/ ∥zt∥yields an incorrect sign of aT i x. Further, discarding too many samples (those i /∈Tt+1) introduces large bias into (1/m) Pm i∈Tt+1 aiaT i ht, thus rendering TWF less effective when m/n is small. Numerical comparison depicted in Fig. 1 suggests that even starting with the same truncated spectral initialization, TGGF’s refinement outperforms those of TWF and WF, corroborating the merits of our novel truncation and update rule over TWF/WF. 2.2 Orthogonality-promoting initialization stage Number of points 100 101 102 103 104 Squared normalized inner-product 10-14 10-12 10-10 10-8 10-6 10-4 10-2 100 m=2n m=4n m=6n m=8n m=10n Figure 2: Ordered squared normalized innerproduct for pairs x and ai, ∀i ∈[m] with m/n varying by 2 from 2 to 10, and n = 103. Leveraging the SLLN, spectral methods estimate x using the (appropriately scaled) leading eigenvector of Y := 1 m P i∈T0 yiaiaT i , where T0 is an index set accounting for possible truncation. As asserted in [8], each summand (aT i x)2aiaT i follows a heavytail probability density function lacking a moment generating function. This causes major performance degradation especially when the number of measurements is limited. Instead of spectral initialization, we shall take another route to bypass this hurdle. To gain intuition for selecting our alternate route, a motivating example is presented first that reveals fundamental characteristics among high-dimensional random vectors. Example: Fixing any nonzero vector x ∈Rn, generate data ψi = |⟨ai, x⟩| using i.i.d. ai ∼N(0, In), ∀i ∈[m], and evaluate the squared normalized innerproduct cos2 θi := |⟨ai, x⟩|2 ∥ai∥2∥x∥2 = ψ2 i ∥ai∥2∥x∥2 , ∀i ∈[m] (11) where θi is the angle between ai and x. Consider ordering all cos2 θi’s in an ascending fashion, and collectively denote them as ξ := cos2 θ[m] · · · cos2 θ[1] T with cos2 θ[1] ≥· · · ≥cos2 θ[m]. Fig. 2 plots the ordered entries in ξ for m/n varying by 2 from 2 to 10 with n = 103. Observe that almost all {ai} vectors have a squared normalized inner-product smaller than 10−2, while half of the inner-products are less than 10−3, which implies that x is nearly orthogonal to many ai’s. This example corroborates that random vectors in high-dimensional spaces are almost always nearly orthogonal to each other [24]. This inspired us to pursue an orthogonality-promoting initialization method. Our key idea is to approximate x by a vector that is most orthogonal to a subset of vectors {ai}i∈I0, where I0 is a set with cardinality |I0| < m that includes indices of the smallest squared normalized inner-products cos2 θi . Since ∥x∥appears in all inner-products, its exact value does not influence their ordering. Henceforth, we assume without loss of generality that ∥x∥= 1. Using {(ai; ψi)}, evaluate cos2 θi according to (11) for each pair x and ai. Instrumental for the ensuing derivations is noticing that the summation of cos2 θi over indices i ∈I0 is very small, while rigorous justification is deferred to Section 3 and supplementary materials. Thus, a meaningful approximation denoted by z0 ∈Rn can be obtained by solving 5 min ∥z∥=1 zT 1 |I0| X i∈I0 aiaT i ∥ai∥2 ! z (12) which amounts to finding the smallest eigenvalue and the associated eigenvector of 1 |I0| P i∈I0 aiaT i ∥ai∥2 . Yet finding the smallest eigenvalue calls for eigen-decomposition or matrix inversion, each requiring computational complexity O(n3). Such a computational burden can be intractable when n grows large. Applying a standard concentration result simplifies greatly those computations next [25]. Since ai/∥ai∥has unit norm and is uniformly distributed on the unit sphere, it is uniformly spherically distributed.2 Spherical symmetry implies that ai/∥ai∥has zero mean and covariance matrix In/n [25]. Appealing again to the SLLN, the sample covariance matrix 1 m Pm i=1 aiaT i ∥ai∥2 approaches 1 nIn as m grows. Simple derivations lead to P i∈I0 aiaT i ∥ai∥2 = Pm i=1 aiaT i ∥ai∥2 −P i∈I0 aiaT i ∥ai∥2 ≊ m n In −P i∈I0 aiaT i ∥ai∥2 , where I0 is the complement of I0 in the set [m]. Define S := [a1/∥a1∥· · · am/∥am∥]T ∈Rm×n, and form S0 by removing the rows of S if their indices do not belong to I0. The task of seeking the smallest eigenvalue of Y0 := 1 |I0|ST 0 S0 reduces to computing the largest eigenvalue of Y0 := 1 |I0|ST 0 S0, namely, ˜z0 := arg max ∥z∥=1 zT Y0z (13) which can be efficiently solved using simple power iterations. If, on the other hand, ∥x∦= 1, the estimate ˜z0 from (13) is further scaled so that its norm matches approximately that of x (which is estimated to be 1 m Pm i=1 yi), thus yielding z0 = pPm i=1 yi/m˜z0. It is worth stressing that the constructed matrix Y0 does not depend on {yi} explicitly, saving our initialization from suffering heavy-tails of the fourth order of {ai} in spectral initialization schemes. m/n for x∈R1,000 2 5 10 15 20 Relative error 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 Spectral Truncated spectral Orthogonality-promoting Figure 3: Relative error versus m/n for: i) the spectral method; ii) the truncated spectral method; and iii) our orthogonality-promoting method for noiseless real Gaussian model. Fig. 3 compares three initialization schemes showing their relative errors versus the measurement/unknown ratio m/n under the noise-free real Gaussian model, where x ∈R1,000 and m/n increases by 2 from 2 to 20. Apparently, all schemes enjoy improved performance as m/n increases. In particular, the proposed initialization method outperforms its spectral alternatives. Interestingly, the spectral and truncated spectral schemes exhibit similar performance when m/n is sufficiently large (e.g., m/n ≥14). This confirms that truncation helps only if m/n is relatively small. Indeed, truncation is effected by discarding measurements of excessively large sizes emerging from the heavy tails of the data distribution. Hence, its advantage over the untruncated one narrows as the number of measurements increases, thus straightening out the heavy tails. On the contrary, the orthogonalitypromoting initialization method achieves consistently superior performance over its spectral alternatives. 3 Main results TGGF is summarized in Algorithm 1 with default values set for pertinent algorithmic parameters. Postulating independent samples {(ai; ψi)}, the following result establishes the performance of our TGGF approach. 2A random vector z ∈Rn is said to be spherical (or spherically symmetric) if its distribution does not change under rotations of the coordinate system; that is, the distribution of P z coincides with that of z for any given orthogonal n × n matrix P . 6 Algorithm 1 Truncated generalized gradient flow (TGGF) solvers 1: Input: Data {ψi}m i=1 and feature vectors {ai}m i=1; the maximum number of iterations T = 1, 000; by default, take constant step size µ = 0.6/1 for real/complex Gaussian models, truncation thresholds |I0| = ⌈1 6m⌉(⌈·⌉the ceil operation), and γ = 0.7. 2: Evaluate ψi/∥ai∥, ∀i ∈[m], and find I0 comprising indices corresponding to the |I0| largest (ψi/∥ai∥)’s. 3: Initialize z0 to pPm i=1 ψ2 i /m˜z0, where ˜z0 is the unit leading eigenvector of Y0 := 1 |I0| P i∈I0 aiaT i ∥ai∥2 . 4: Loop: for t = 0 to T −1 zt+1 = zt −µ m X i∈It+1 aT i zt −ψi aT i zt |aT i zt| ai where It+1 := 1 ≤i ≤m |aT i zt| ≥ 1 1+γ ψi . 5: Output: zT Theorem 1 Let x ∈Rn be an arbitrary signal vector, and consider (noise-free) measurements ψi = |aT i x|, in which ai i.i.d. ∼N(0, In), 1 ≤i ≤m. Then with probability at least 1 −(m + 5)e−n/2 −e−c0m −1/n2 for some universal constant c0 > 0, the initialization z0 returned by the orthogonality-promoting method in Algorithm 1 satisfies dist(z0, x) ≤ρ ∥x∥ (14) with ρ = 1/10 (or any sufficiently small positive constant), provided that m ≥c1|I0| ≥c2n for some numerical constants c1, c2 > 0, and sufficiently large n. Further, choosing a constant step size µ ≤µ0 along with a fixed truncation level γ ≥1/2, and starting from any initial guess z0 satisfying (14), successive estimates of the TGGF solver (tabulated in Algorithm 1) obey dist (zt, x) ≤ρ (1 −ν)t ∥x∥, t = 0, 1, . . . (15) for some 0 < ν < 1, which holds with probability exceeding 1 −(m + 5)e−n/2 −8e−c0m −1/n2. Typical parameters are µ = 0.6, and γ = 0.7. Theorem 1 asserts that: i) TGGF recovers the solution x exactly as soon as the number of equations is about the number of unknowns, which is theoretically order optimal. Our numerical tests demonstrate that for the real Gaussian model, TGGF achieves a success rate of 100% when m/n is as small as 3, which is slightly larger than the information limit of m/n = 2 (Recall that m ≥2n −1 is necessary for a unique solution); this is a significant reduction in the sample complexity ratio, which is 5 for TWF and 7 for WF. Surprisingly, TGGF enjoys also a success rate of over 50% when m/n is 2, which has not yet been presented for any existing algorithm under Gaussian sampling models and thus, our TGGF bridges the gap; see further discussion in Section 4; and, ii) TGGF converges exponentially fast. Specifically, TGGF requires at most O(log(1/ϵ)) iterations to achieve any given solution accuracy ϵ > 0 (a.k.a., dist(zt, x) ≤ϵ ∥x∥), with iteration cost O(mn). Since truncation takes time on the order of O(m), the computational burden of TGGF per iteration is dominated by evaluating the generalized gradients. The latter involves two matrix-vector multiplications that are computable in O(mn) flops, namely, Azt yields ut, and AT vt the generalized gradient, where vt := ut−ψ⊙ut |ut|. Hence, the total running time of TGGF is O(mn log(1/ϵ)), which is proportional to the time taken to read the data O(mn). The proof of Theorem 1 can be found in the supplementary material. 4 Simulated tests and conclusions Additional numerical tests evaluating performance of the proposed scheme relative to TWF/WF are presented in this section. For fairness, all pertinent algorithmic parameters involved in each scheme are set to their default values. The Matlab implementations of TGGF are available at http://www.tc.umn.edu/˜gangwang/TAF. The initial estimate was found based on 50 power iterations, and was subsequently refined by T = 103 gradient-like iterations in each scheme. Left panel in Fig. 4 presents average relative error of three initialization methods on a series of noiseless/noisy real Gaussian problems with m/n = 6 fixed, and n varying from 500 to 104, 7 Real signal dimension n 500 2,000 4,000 6,000 8,000 10,000 Relative error 0.6 0.7 0.8 0.9 1 1.1 1.2 Spectral Truncated spectral Orthogonality-promoting Spectral (noisy) Truncated spectral (noisy) Orthogonality-promoting (noisy) Complex signal dimension n 100 1,000 2,000 3,000 4,000 5,000 Relative error 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 Spectral Truncated spectral Orthogonality-promoting Spectral (noisy) Truncated spectral (noisy) Orthogonality-promoting (noisy) Figure 4: The average relative error using: i) the spectral method [11, 12]; ii) the truncated spectral method [8]; and iii) the proposed orthogonality-promoting method on noise-free (solid) and noisy (dotted) instances with m/n = 6, and n varying from 500/100 to 10, 000/5, 000 for real/complex vectors. Left: Real Gaussian model with x ∼N(0, In), ai ∼N(0, In), and σ2 = 0.22 ∥x∥2. Right: Complex Gaussian model with x ∼CN(0, In), ai ∼CN(0, In), and σ2 = 0.22 ∥x∥2. m/n for x∈R1,000 1 2 3 4 5 6 7 Empirical success rate 0 0.2 0.4 0.6 0.8 1 WF TWF TGGF m/n for x∈C1,000 1 2 3 4 5 6 7 Empirical success rate 0 0.2 0.4 0.6 0.8 1 WF TWF TGGF Figure 5: Empirical success rate for WF, TWF, and TGGF with n = 1, 000 and m/n varying from 1 to 7. Left: Noiseless real Gaussian model with x ∼N(0, In) and ai ∼N(0, In); Right: Noiseless complex Gaussian model with x ∼CN(0, In) and ai ∼CN(0, In). while those for the corresponding complex Gaussian instances are shown in the right panel. Fig. 5 compares empirical success rate of three schemes under both real and complex Gaussian models with n = 103 and m/n varying by 1 from 1 to 7. Apparently, the proposed initialization method returns more accurate and robust estimates than the spectral ones. Moreover, for real-valued vectors, TGGF achieves a success rate of over 50% when m/n = 2, and guarantees perfect recovery from about 3n measurements; while for complex-valued ones, TGGF enjoys a success rate of 95% when m/n = 3.4, and ensures perfect recovery from about 4.5n measurements. Regarding running times, TGGF converges slightly faster than TWF, while both are markedly faster than WF. Curves in Fig. 5 clearly corroborate the merits of TGGF over Wirtinger alternatives. This paper developed a linear-time algorithm termed TGGF for solving random systems of quadratic equations. TGGF builds on three key ingredients: a novel orthogonality-promoting initialization, along with a simple yet effective truncation rule, as well as simple scalable gradient-like iterations. Numerical tests corroborate the superior performance of TGGF over state-of-the-art solvers. Acknowledgements Work in this paper was supported in part by NSF grants 1500713 and 1514056. 8 References [1] R. Balan, P. Casazza, and D. Edidin, “On signal reconstruction without phase,” Appl. Comput. Harmon. Anal., vol. 20, no. 3, pp. 345–356, May 2006. [2] A. Conca, D. Edidin, M. Hering, and C. Vinzant, “An algebraic characterization of injectivity in phase retrieval,” Appl. Comput. Harmon. Anal., vol. 38, no. 2, pp. 346–356, Mar. 2015. [3] P. M. Pardalos and S. A. Vavasis, “Quadratic programming with one negative eigenvalue is NP-hard,” J. Global Optim., vol. 1, no. 1, pp. 15–22, 1991. [4] H. A. Hauptman, “The phase problem of X-ray crystallography,” Rep. Prog. Phys., vol. 54, no. 11, p. 1427, 1991. [5] E. J. Cand`es, Y. C. Eldar, T. Strohmer, and V. Voroninski, “Phase retrieval via matrix completion,” SIAM Rev., vol. 57, no. 2, pp. 225–251, May 2015. [6] H. Sahinoglou and S. D. Cabrera, “On phase retrieval of finite-length sequences using the initial time sample,” IEEE Trans. Circuits and Syst., vol. 38, no. 8, pp. 954–958, Aug. 1991. [7] K. G. Murty and S. N. Kabadi, “Some NP-complete problems in quadratic and nonlinear programming,” Math. Prog., vol. 39, no. 2, pp. 117–129, 1987. [8] Y. Chen and E. J. Cand`es, “Solving random quadratic systems of equations is nearly as easy as solving linear systems,” Comm. Pure Appl. Math., 2016 (to appear). [9] R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction,” Optik, vol. 35, pp. 237–246, Nov. 1972. [10] J. Fienup, “Phase retrieval algorithms: A comparison,” Appl. Opt., vol. 21, no. 15, pp. 2758–2769, 1982. [11] P. Netrapalli, P. Jain, and S. Sanghavi, “Phase retrieval using alternating minimization,” IEEE Trans. Signal Process., vol. 63, no. 18, pp. 4814–4826, Sept. 2015. [12] E. J. Cand`es, X. Li, and M. Soltanolkotabi, “Phase retrieval via Wirtinger flow: Theory and algorithms,” IEEE Trans. Inf. Theory, vol. 61, no. 4, pp. 1985–2007, Apr. 2015. [13] J. Sun, Q. Qu, and J. Wright, “A geometric analysis of phase retrieval,” arXiv:1602.06664, 2016. [14] E. J. Cand`es, T. Strohmer, and V. Voroninski, “PhaseLift: Exact and stable signal recovery from magnitude measurements via convex programming,” Appl. Comput. Harmon. Anal., vol. 66, no. 8, pp. 1241–1274, Nov. 2013. [15] I. Waldspurger, A. d’Aspremont, and S. Mallat, “Phase recovery, maxcut and complex semidefinite programming,” Math. Prog., vol. 149, no. 1-2, pp. 47–81, 2015. [16] E. J. Cand`es and X. Li, “Solving quadratic equations via PhaseLift when there are about as many equations as unknowns,” Found. Comput. Math., vol. 14, no. 5, pp. 1017–1026, 2014. [17] G. Wang, D. Berberidis, V. Kekatos, and G. B. Giannakis, “Online reconstruction from big data via compressive censoring,” in IEEE Global Conf. Signal and Inf. Process., Atlanta, GA, 2014, pp. 326–330. [18] D. K. Berberidis, V. Kekatos, G. Wang, and G. B. Giannakis, “Adaptive censoring for large-scale regressions,” in IEEE Intl. Conf. Acoustics, Speech and Signal Process., South Brisbane, QLD, Australia, 2015, pp. 5475–5479. [19] L.-H. Yeh, J. Dong, J. Zhong, L. Tian, M. Chen, G. Tang, M. Soltanolkotabi, and L. Waller, “Experimental robustness of Fourier ptychography phase retrieval algorithms,” Opt. Express, vol. 23, no. 26, pp. 33 214– 33 240, Dec. 2015. [20] N. Z. Shor, K. C. Kiwiel, and A. Ruszcay`nski, Minimization Methods for Non-differentiable Functions. Springer-Verlag New York, Inc., 1985. [21] F. H. Clarke, Optimization and Nonsmooth Analysis. SIAM, 1990, vol. 5. [22] ——, “Generalized gradients and applications,” T. Am. Math. Soc., vol. 205, pp. 247–262, 1975. [23] P. Chen, A. Fannjiang, and G.-R. Liu, “Phase retrieval with one or two diffraction patterns by alternating projections of the null vector,” arXiv:1510.07379v2, 2015. [24] T. Cai, J. Fan, and T. Jiang, “Distributions of angles in random packing on spheres,” J. Mach. Learn. Res., vol. 14, no. 1, pp. 1837–1864, Jan. 2013. [25] R. Vershynin, “Introduction to the non-asymptotic analysis of random matrices,” arXiv:1011.3027, 2010. 9 | 2016 | 215 |
6,123 | Phased LSTM: Accelerating Recurrent Network Training for Long or Event-based Sequences Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu Institute of Neuroinformatics University of Zurich and ETH Zurich Zurich, Switzerland 8057 {dneil, pfeiffer, shih}@ini.uzh.ch Abstract Recurrent Neural Networks (RNNs) have become the state-of-the-art choice for extracting patterns from temporal sequences. However, current RNN models are ill-suited to process irregularly sampled data triggered by events generated in continuous time by sensors or other neurons. Such data can occur, for example, when the input comes from novel event-driven artificial sensors that generate sparse, asynchronous streams of events or from multiple conventional sensors with different update intervals. In this work, we introduce the Phased LSTM model, which extends the LSTM unit by adding a new time gate. This gate is controlled by a parametrized oscillation with a frequency range that produces updates of the memory cell only during a small percentage of the cycle. Even with the sparse updates imposed by the oscillation, the Phased LSTM network achieves faster convergence than regular LSTMs on tasks which require learning of long sequences. The model naturally integrates inputs from sensors of arbitrary sampling rates, thereby opening new areas of investigation for processing asynchronous sensory events that carry timing information. It also greatly improves the performance of LSTMs in standard RNN applications, and does so with an order-of-magnitude fewer computes at runtime. 1 Introduction Interest in recurrent neural networks (RNNs) has greatly increased in recent years, since larger training databases, more powerful computing resources, and better training algorithms have enabled breakthroughs in both processing and modeling of temporal sequences. Applications include speech recognition [13], natural language processing [1, 20], and attention-based models for structured prediction [5, 29]. RNNs are attractive because they equip neural networks with memories, and the introduction of gating units such as LSTM and GRU [16, 6] has greatly helped in making the learning of these networks manageable. RNNs are typically modeled as discrete-time dynamical systems, thereby implicitly assuming a constant sampling rate of input signals, which also becomes the update frequency of recurrent and feed-forward units. Although early work such as [25, 10, 4] has realized the resulting limitations and suggested continuous-time dynamical systems approaches towards RNNs, the great majority of modern RNN implementations uses fixed time steps. Although fixed time steps are perfectly suitable for many RNN applications, there are several important scenarios in which constant update rates impose constraints that affect the precision and efficiency of RNNs. Many real-world tasks for autonomous vehicles or robots need to integrate input from a variety of sensors, e.g. for vision, audition, distance measurements, or gyroscopes. Each sensor may have its own data sampling rate, and short time steps are necessary to deal with sensors with high sampling frequencies. However, this leads to an unnecessarily higher computational load and 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Input Gate it ot ft xt xt xt xt ct ht Forget Gate Output Gate (a) xt Input Gate ct it ot ft xt xt xt ht Forget Gate Output Gate ct ~ t kt t kt (b) Figure 1: Model architecture. (a) Standard LSTM model. (b) Phased LSTM model, with time gate kt controlled by timestamp t. In the Phased LSTM formulation, the cell value ct and the hidden output ht can only be updated during an “open” phase; otherwise, the previous values are maintained. power consumption so that all units in the network can be updated with one time step. An interesting new application area is processing of event-based sensors, which are data-driven, and record stimulus changes in the world with short latencies and accurate timing. Processing the asynchronous outputs of such sensors with time-stepped models would require high update frequencies, thereby counteracting the potential power savings of event-based sensors. And finally there is an interest coming from computational neuroscience, since brains can be viewed loosely as very large RNNs. However, biological neurons communicate with spikes, and therefore perform asynchronous, event-triggered updates in continuous time. This work presents a novel RNN model which can process inputs sampled at asynchronous times and is described further in the following sections. 2 Model Description Long short-term memory (LSTM) units [16] (Fig. 1(a)) are an important ingredient for modern deep RNN architectures. We first define their update equations in the commonly-used version from [12]: it = σi(xtWxi + ht−1Whi + wci ⊙ct−1 + bi) (1) ft = σf(xtWxf + ht−1Whf + wcf ⊙ct−1 + bf) (2) ct = ft ⊙ct−1 + it ⊙σc(xtWxc + ht−1Whc + bc) (3) ot = σo(xtWxo + ht−1Who + wco ⊙ct + bo) (4) ht = ot ⊙σh(ct) (5) The main difference to classical RNNs is the use of the gating functions it, ft, ot, which represent the input, forget, and output gate at time t respectively. ct is the cell activation vector, whereas xt and ht represent the input feature vector and the hidden output vector respectively. The gates use the typical sigmoidal nonlinearities σi, σf, σo and tanh nonlinearities σc, and σh with weight parameters Whi, Whf, Who, Wxi, Wxf, and Wxo, which connect the different inputs and gates with the memory cells and outputs, as well as biases bi, bf, and bo. The cell state ct itself is updated with a fraction of the previous cell state that is controlled by ft, and a new input state created from the element-wise (Hadamard) product, denoted by ⊙, of it and the output of the cell state nonlinearity σc. Optional peephole [11] connection weights wci, wcf, wco further influence the operation of the input, forget, and output gates. The Phased LSTM model extends the LSTM model by adding a new time gate, kt (Fig. 1(b)). The opening and closing of this gate is controlled by an independent rhythmic oscillation specified by three parameters; updates to the cell state ct and ht are permitted only when the gate is open. The first parameter, τ, controls the real-time period of the oscillation. The second, ron, controls the ratio of the duration of the “open” phase to the full period. The third, s, controls the phase shift of the oscillation to each Phased LSTM cell. All parameters can be learned during the training process. Though other variants are possible, we propose here a particularly successful linearized formulation 2 t Input tj-2 Layer 1 Layer 2 j-2 Input tj-1 Layer 1 Layer 2 j-1 Input tj Layer 1 Layer 2 j Output Output Output ... ... ... closed open (a) Input kt Openness 1 2 3 4 Time ct State (b) Figure 2: Diagram of Phased LSTM behaviour. (a) Top: The rhythmic oscillations to the time gates of 3 different neurons; the period τ and the phase shift s is shown for the lowest neuron. The parameter ron is the ratio of the open period to the total period τ. Bottom: Note that in a multilayer scenario, the timestamp is distributed to all layers which are updated at the same time point. (b) Illustration of Phased LSTM operation. A simple linearly increasing function is used as an input. The time gate kt of each neuron has a different τ, identical phase shift s, and an open ratio ron of 0.05. Note that the input (top panel) flows through the time gate kt (middle panel) to be held as the new cell state ct (bottom panel) only when kt is open. of the time gate, with analogy to the rectified linear unit that propagates gradients well: φt = (t −s) mod τ τ , kt = 2φt ron , if φt < 1 2ron 2 −2φt ron , if 1 2ron < φt < ron αφt, otherwise (6) φt is an auxiliary variable, which represents the phase inside the rhythmic cycle. The gate kt has three phases (see Fig. 2a): in the first two phases, the "openness" of the gate rises from 0 to 1 (first phase) and drops from 1 to 0 (second phase). During the third phase, the gate is closed and the previous cell state is maintained. The leak with rate α is active in the closed phase, and plays a similar role as the leak in a parametric “leaky” rectified linear unit [15] by propagating important gradient information even when the gate is closed. Note that the linear slopes of kt during the open phases of the time gate allow effective transmission of error gradients. In contrast to traditional RNNs, and even sparser variants of RNNs [19], updates in Phased LSTM can optionally be performed at irregularly sampled time points tj. This allows the RNNs to work with event-driven, asynchronously sampled input data. We use the shorthand notation cj = ctj for cell states at time tj (analogously for other gates and units), and let cj−1 denote the state at the previous update time tj−1. We can then rewrite the regular LSTM cell update equations for cj and hj (from Eq. 3 and Eq. 5), using proposed cell updates ecj and ehj mediated by the time gate kj: ecj = fj ⊙cj−1 + ij ⊙σc(xjWxc + hj−1Whc + bc) (7) cj = kj ⊙ecj + (1 −kj) ⊙cj−1 (8) ehj = oj ⊙σh( ecj) (9) hj = kj ⊙ehj + (1 −kj) ⊙hj−1 (10) A schematic of Phased LSTM with its parameters can be found in Fig. 2a, accompanied by an illustration of the relationship between the time, the input, the time gate kt, and the state ct in Fig. 2b. One key advantage of this Phased LSTM formulation lies in the rate of memory decay. For the simple task of keeping an initial memory state c0 as long as possible without receiving additional inputs (i.e. ij = 0 at all time steps tj), a standard LSTM with a nearly fully-opened forget gate (i.e. fj = 1 −ϵ) after n update steps would contain cn = fn ⊙cn−1 = (1 −ϵ) ⊙(fn−1 ⊙cn−2) = . . . = (1 −ϵ)n ⊙c0 . (11) 3 16 18 20 22 24 26 28 30 Time [ms] −1.0 −0.5 0.0 0.5 1.0 (a) 16 18 20 22 24 26 28 30 Time [ms] −1.0 −0.5 0.0 0.5 1.0 (b) 16 18 20 22 24 26 28 30 Time [ms] −1.0 −0.5 0.0 0.5 1.0 (c) Standard sampling High resolution sampling Async. sampling 50 60 70 80 90 100 Accuracy at 70 Epochs [%] Phased LSTM BN LSTM LSTM (d) Figure 3: Frequency discrimination task. The network is trained to discriminate waves of different frequency sets (shown in blue and gray); every circle is an input point. (a) Standard condition: the data is regularly sampled every 1 ms. (b) High resolution sampling condition: new input points are gathered every 0.1ms. (c) Asynchronous sampling condition: new input points are presented at intervals of 0.02 ms to 10 ms. (d) The accuracy of Phased LSTM under the three sampling conditions is maintained, but the accuracy of the BN-LSTM and standard LSTM drops significantly in the sampling conditions (b) and (c). Error bars indicate standard deviation over 5 runs. This means the memory for ϵ < 1 decays exponentially with every time step. Conversely, the Phased LSTM state only decays during the open periods of the time gate, but maintains a perfect memory during its closed phase, i.e. cj = cj−∆if kt = 0 for tj−∆≤t ≤tj. Thus, during a single oscillation period of length τ, the units only update during a duration of ron · τ, which will result in substantially fewer than n update steps. Because of this cyclic memory, Phased LSTM can have much longer and adjustable memory length via the parameter τ. The oscillations impose sparse updates of the units, therefore substantially decreasing the total number of updates during network operation. During training, this sparseness ensures that the gradient is required to backpropagate through fewer updating timesteps, allowing an undecayed gradient to be backpropagated through time and allowing faster learning convergence. Similar to the shielding of the cell state ct (and its gradient) by the input gates and forget gates of the LSTM, the time gate prevents external inputs and time steps from dispersing and mixing the gradient of the cell state. 3 Results In the following sections, we investigate the advantages of the Phased LSTM model in a variety of scenarios that require either precise timing of updates or learning from a long sequence. For all the results presented here, the networks were trained with Adam [18] set to default learning rate parameters, using Theano [2] with Lasagne [9]. Unless otherwise specified, the leak rate was set to α = 0.001 during training and α = 0 during test. The phase shift, s, for each neuron was uniformly chosen from the interval [0, τ]. The parameters τ and s were learned during training, while the open ratio ron was fixed at 0.05 and not adjusted during training, except in the first task to demonstrate that the model can train successfully while learning all parameters. 3.1 Frequency Discrimination Task In this first experiment, the network is trained to distinguish two classes of sine waves from different frequency sets: those with a period in a target range T ∼U(5, 6), and those outside the range, i.e. T ∼{U(1, 5) ∪U(6, 100)}, using U(a, b) for the uniform distribution on the interval (a, b). This task illustrates the advantages of Phased LSTM, since it involves a periodic stimulus and requires fine timing discrimination. The inputs are presented as pairs ⟨y, t⟩, where y is the amplitude and t the timestamp of the sample from the input sine wave. Figure 3 illustrates the task: the blue curves must be separated from the lighter curves based on the samples shown as circles. We evaluate three conditions for sampling the input signals: In the standard condition (Fig. 3a), the sine waves are regularly sampled every 1 ms; in the oversampled 4 0 50 100 150 200 250 300 Epoch 45 50 55 60 65 70 75 80 85 90 Accuracy [%] Phased LSTM BN LSTM LSTM (a) 0 20 40 60 80 100 Epoch 10-5 10-4 10-3 10-2 10-1 100 MSE LSTM PLSTM (¿ » eU(0; 2)) PLSTM (¿ » eU(2; 4)) PLSTM (¿ » eU(4; 6)) PLSTM (¿ » eU(6; 8)) (b) Figure 4: (a) Accuracy during training for the superimposed frequencies task. The Phased LSTM outperforms both LSTM and BN-LSTM while exhibiting lower variance. Shading shows maximum and minimum over 5 runs, while dark lines indicate the mean. (b) Mean-squared error over training on the addition task, with an input length of 500. Note that longer periods accelerate learning convergence. condition (Fig. 3b), the sine waves are regularly sampled every 0.1 ms, resulting in ten times as many data points. Finally, in the asynchronously sampled condition (Fig. 3c), samples are collected at asynchronous times over the duration of the input. Additionally, the sine waves have a uniformly drawn random phase shift from all possible shifts, random numbers of samples drawn from U(15, 125), a random duration drawn from U(15, 125), and a start time drawn from U(0, 125 − duration). The number of samples in the asynchronous and standard sampling condition is equal. The classes were approximately balanced, yielding a 50% chance success rate. Single-layer RNNs are trained on this data, each repeated with five random initial seeds. We compare our Phased LSTM configuration to regular LSTM, and batch-normalized (BN) LSTM which has found success in certain applications [14]. For the regular LSTM and the BN-LSTM, the timestamp is used as an additional input feature dimension; for the Phased LSTM, the time input controls the time gates kt. The architecture consists of 2-110-2 neurons for the LSTM and BN-LSTM, and 1-110-2 for the Phased LSTM. The oscillation periods of the Phased LSTMs are drawn uniformly in the exponential space to give a wide variety of applicable frequencies, i.e., τ ∼exp(U(0, 3)). All other parameters match between models where applicable. The default LSTM parameters are given in the Lasagne Theano implementation, and were kept for LSTM, BN-LSTM, and Phased LSTM. Appropriate gate biasing was investigated but did not resolve the discrepancies between the models. All three networks excel under standard sampling conditions as expected, as seen in Fig. 3d (left). However, for the same number of epochs, increasing the data sampling by a factor of ten has devastating effects for both LSTM and BN-LSTM, dropping their accuracy down to near chance (Fig. 3d, middle). Presumably, if given enough training iterations, their accuracies would return to the normal baseline. However, for the oversampled condition, Phased LSTM actually increases in accuracy, as it receives more information about the underlying waveform. Finally, if the updates are not evenly spaced and are instead sampled at asynchronous times, even when controlled to have the same number of points as the standard sampling condition, it appears to make the problem rather challenging for traditional state-of-the-art models (Fig. 3d, right). However, the Phased LSTM has no difficulty with the asynchronously sampled data, because the time gates kt do not need regular updates and can be correctly sampled at any continuous time within the period. We extend the previous task by training the same RNN architectures on signals composed of two sine waves. The goal is to distinguish signals composed of sine waves with periods T1 ∼U(5, 6) and T2 ∼U(13, 15), each with independent phase, from signals composed of sine waves with periods T1 ∼{U(1, 5) ∪U(6, 100)} and T2 ∼{U(1, 13) ∪U(15, 100)}, again with independent phase. Despite being significantly more challenging, Fig. 4a demonstrates how quickly the Phased LSTM converges to the correct solution compared to the standard approaches, using exactly the same parameters. Additionally, the Phased LSTM appears to exhibit very low variance during training. 5 1 2 3 (a) (b) 0 1 ×10 5 Time [us] 2 3 (c) Figure 5: N-MNIST experiment. (a) Sketch of digit movement seen by the image sensor. (b) Frame-based representation of an ‘8’ digit from the N-MNIST dataset [24] obtained by integrating all input spikes for each pixel. (c) Spatio-temporal representation of the digit, presented in three saccades as in (a). Note that this representation shows the digit more clearly than the blurred frame-based one. 3.2 Adding Task To investigate how introducing time gates helps learning when long memory is required, we revisit an original LSTM task called the adding task [16]. In this task, a sequence of random numbers is presented along with an indicator input stream. When there is a 0 in the indicator input stream, the presented value should be ignored; a 1 indicates that the value should be added. At the end of presentation the network produces a sum of all indicated values. Unlike the previous tasks, there is no inherent periodicity in the input, and it is one of the original tasks that LSTM was designed to solve well. This would seem to work against the advantages of Phased LSTM, but using a longer period for the time gate kt could allow more effective training as a unit opens only a for a few timesteps during training. In this task, a sequence of numbers (of length 490 to 510) was drawn from U(−0.5, 0.5). Two numbers in this stream of numbers are marked for addition: one from the first 10% of numbers (drawn with uniform probability) and one in the last half (drawn with uniform probability), producing a model of a long and noisy stream of data with only few significant points. Importantly, this should challenge the Phased LSTM model because there is no inherent periodicity and every timestep could contain the important marked points. The same network architecture is used as before. The period τ was drawn uniformly in the exponential domain, comparing four sampling intervals exp(U(0, 2)), exp(U(2, 4)), exp(U(4, 6)), and exp(U(6, 8)). Note that despite different τ values, the total number of LSTM updates remains approximately the same, since the overall sparseness is set by ron. However, a longer period τ provides a longer jump through the past timesteps for the gradient during backpropagation-through-time. Moreover, we investigate whether the model can learn longer sequences more effectively when longer periods are used. By varying the period τ, the results in Fig. 4b show longer τ accelerates training of the network to learn much longer sequences faster. 3.3 N-MNIST Event-Based Visual Recognition To test performance on real-world asynchronously sampled data, we make use of the publiclyavailable N-MNIST [24] dataset for neuromorphic vision. The recordings come from an event-based vision sensor that is sensitive to local temporal contrast changes [26]. An event is generated from a pixel when its local contrast change exceeds a threshold. Every event is encoded as a 4-tuple ⟨x, y, p, t⟩with position x, y of the pixel, a polarity bit p (indicating a contrast increase or decrease), and a timestamp t indicating the time when the event is generated. The recordings consist of events generated by the vision sensor while the sensor undergoes three saccadic movements facing a static digit from the MNIST dataset (Fig. 5a). An example of the event responses can be seen in Fig. 5c). In previous work using event-based input data [21, 23], the timing information was sometimes removed and instead a frame-based representation was generated by computing the pixel-wise event-rate over some time period (as shown in Fig. 5(b)). Note that the spatio-temporal surface of 6 Table 1: Accuracy on N-MNIST CNN BN-LSTM Phased LSTM (τ = 100ms) Accuracy at Epoch 1 73.81% ± 3.5 40.87% ± 13.3 90.32% ± 2.3 Train/test ρ = 0.75 95.02% ± 0.3 96.93% ± 0.12 97.28% ± 0.1 Test with ρ = 0.4 90.67% ± 0.3 94.79% ± 0.03 95.11% ± 0.2 Test with ρ = 1.0 94.99% ± 0.3 96.55% ± 0.63 97.27% ± 0.1 LSTM Updates – 3153 per neuron 159 ± 2.8 per neuron events in Fig. 5(c) reveals details of the digit much more clearly than in the blurred frame-based representation.The Phased LSTM allows us to operate directly on such spatio-temporal event streams. Table 1 summarizes classification results for three different network types: a CNN trained on framebased representations of N-MNIST digits and two RNNs, a BN-LSTM and a Phased LSTM, trained directly on the event streams. Regular LSTM is not shown, as it was found to perform worse. The CNN was comprised of three alternating layers of 8 kernels of 5x5 convolution with a leaky ReLU nonlinearity and 2x2 max-pooling, which were then fully-connected to 256 neurons, and finally fullyconnected to the 10 output classes. The event pixel address was used to produce a 40-dimensional embedding via a learned embedding matrix [9], and combined with the polarity to produce the input. Therefore, the network architecture was 41-110-10 for the Phased LSTM and 42-110-10 for the BN-LSTM, with the time given as an extra input dimension to the BN-LSTM. Table 1 shows that Phased LSTM trains faster than alternative models and achieves much higher accuracy with a lower variance even within the first epoch of training. We further define a factor, ρ, which represents the probability that an event is included, i.e. ρ = 1.0 means all events are included. The RNN models are trained with ρ = 0.75, and again the Phased LSTM achieves slightly higher performance than the BN-LSTM model. When testing with ρ = 0.4 (fewer events) and ρ = 1.0 (more events) without retraining, both RNN models perform well and greatly outperform the CNN. This is because the accumulated statistics of the frame-based input to the CNN change drastically when the overall spike rates are altered. The Phased LSTM RNNs seem to have learned a stable spatio-temporal surface on the input and are only slightly altered by sampling it more or less frequently. Finally, as each neuron of the Phased LSTM only updates about 5% of the time, on average, 159 updates are needed in comparison to the 3153 updates needed per neuron of the BN-LSTM, leading to an approximate twenty-fold reduction in run time compute cost. It is also worth noting that these results form a new state-of-the-art accuracy for this dataset [24, 7]. 3.4 Visual-Auditory Sensor Fusion for Lip Reading Finally, we demonstrate the use of Phased LSTM on a task involving sensors with different sampling rates. Few RNN models ever attempt to merge sensors of different input frequencies, although the sampling rates can vary substantially. For this task, we use the GRID dataset [8]. This corpus contains video and audio of 30 speakers each uttering 1000 sentences composed of a fixed grammar and a constrained vocabulary of 51 words. The data was randomly divided into a 90%/10% train-test set. An OpenCV [17] implementation of a face detector was used on the video stream to extract the face which was then resized to grayscale 48x48 pixels. The goal here is to obtain a model that can use audio alone, video alone, or both inputs to robustly classify the sentence. However, since the audio alone is sufficient to achieve greater than 99% accuracy, sensor modalities were randomly masked to zero during training to encourage robustness towards sensory noise and loss. The network architecture first separately processes video and audio data before merging them in two RNN layers that receive both modalities. The video stream uses three alternating layers of 16 kernels of 5x5 convolution and 2x2 subsampling to reduce the input of 1x48x48 to 16x2x2, which is then used as the input to 110 recurrent units. The audio stream connects the 39-dimensional MFCCs (13 MFCCs with first and second derivatives) to 150 recurrent units. Both streams converge into the Merged-1 layer with 250 recurrent units, and is connected to a second hidden layer with 250 recurrent units named Merged-2. The output of the Merged-2 layer is fully-connected to 51 output nodes, which represent the vocabulary of GRID. For the Phased LSTM network, all recurrent units are Phased LSTM units. 7 Time MFCCs Inputs Video Frames 220 260 300 340 Time [ms] Merged-2 PLSTM Merged-1 PLSTM Video PLSTM Audio PLSTM kj Openness (a) 500 1500 2500 Time [ms] 0 5 10 15 20 25 30 35 MFCC (b) 10-2 10-1 Low Res. Loss 0 10 20 30 40 50 Epoch 10-2 10-1 High Res. Loss Phased LSTM BN LSTM LSTM (c) Figure 6: Lip reading experiment. (a) Inputs and openness of time gates for the lip reading experiment. Note that the 25fps video frame rate is a multiple of the audio input frequency (100 Hz). Phased LSTM timing parameters are configured to align to the sampling time of their inputs. (b) Example input of video (top) and audio (bottom). (c) Test loss using the video stream alone. Video frame rate is 40ms. Top: low resolution condition, MFCCs computed every 40ms with a network update every 40 ms; Bottom: high resolution condition, MFCCs every 10 ms with a network update every 10 ms. In the audio and video Phased LSTM layers, we manually align the open periods of the time gates to the sampling times of the inputs and disable learning of the τ and s parameters (see Fig. 6a). This prevents presenting zeros or artificial interpolations to the network when data is not present. In the merged layers, however, the parameters of the time gate are learned, with the period τ of the first merged layer drawn from U(10, 1000) and the second from U(500, 3000). Fig. 6b shows a visualization of one frame of video and the complete duration of an audio sample. During evaluation, all networks achieve greater than 98% accuracy on audio-only and combined audio-video inputs. However, video-only evaluation with an audio-video capable network proved the most challenging, so the results in Fig. 6c focus on these results (though result rankings are representative of all conditions). Two differently-sampled versions of the data were used: In the first “low resolution” version (Fig. 6c, top), the sampling rate of the MFCCs was matched to the sampling rate of the 25 fps video. In the second “high-resolution” condition, the sampling rate was set to the more common value of 100 Hz sampling frequency (Fig. 6c, bottom and shown in Fig. 6a). The higher audio sampling rate did not increase accuracy, but allows for a faster latency (10ms instead of 40ms). The Phased LSTM again converges substantially faster than both LSTM and batch-normalized LSTM. The peak accuracy of 81.15% compares favorably against lipreading-focused state-of-the-art approaches [28] while avoiding manually-crafted features. 4 Discussion The Phased LSTM has many surprising advantages. With its rhythmic periodicity, it acts like a learnable, gated Fourier transform on its input, permitting very fine timing discrimination. Alternatively, the rhythmic periodicity can be viewed as a kind of persistent dropout that preserves state [27], enhancing model diversity. The rhythmic inactivation can even be viewed as a shortcut to the past for gradient backpropagation, accelerating training. The presented results support these interpretations, demonstrating the ability to discriminate rhythmic signals and to learn long memory traces. Importantly, in all experiments, Phased LSTM converges more quickly and theoretically requires only 5% of the computes at runtime, while often improving in accuracy compared to standard LSTM. The presented methods can also easily be extended to GRUs [6], and it is likely that even simpler models, such as ones that use a square-wave-like oscillation, will perform well, thereby making even more efficient and encouraging alternative Phased LSTM formulations. An inspiration for using oscillations in recurrent networks comes from computational neuroscience [3], where rhythms have been shown to play important roles for synchronization and plasticity [22]. Phased LSTMs were not designed as biologically plausible models, but may help explain some of the advantages and robustness of learning in large spiking recurrent networks. 8 References [1] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [2] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, D. Warde-Farley, and Y. Bengio. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for scientific computing conference (SciPy), volume 4, page 3, 2010. [3] G. Buzsaki. Rhythms of the Brain. Oxford University Press, 2006. [4] G. Cauwenberghs. An analog VLSI recurrent neural network learning a continuous-time trajectory. IEEE Transactions on Neural Networks, 7(2):346–361, 1996. [5] K. Cho, A. Courville, and Y. Bengio. Describing multimedia content using attention-based encoder-decoder networks. IEEE Transactions on Multimedia, 17(11):1875–1886, 2015. [6] K. Cho, B. van Merrienboer, C. Gulcehre, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [7] G. K. Cohen, G. Orchard, S. H. Ieng, J. Tapson, R. B. Benosman, and A. van Schaik. Skimming digits: Neuromorphic classification of spike-encoded images. Frontiers in Neuroscience, 10(184), 2016. [8] M. Cooke, J. Barker, S. Cunningham, and X. Shao. An audio-visual corpus for speech perception and automatic speech recognition. The Journal of the Acoustical Society of America, 120(5):2421–2424, 2006. [9] S. Dieleman et al. Lasagne: First release., Aug. 2015. [10] K.-I. Funahashi and Y. Nakamura. Approximation of dynamical systems by continuous time recurrent neural networks. Neural Networks, 6(6):801–806, 1993. [11] F. A. Gers and J. Schmidhuber. Recurrent nets that time and count. In Neural Networks, 2000. IJCNN 2000, Proceedings of the IEEE-INNS-ENNS International Joint Conference on, volume 3, pages 189–194. IEEE, 2000. [12] A. Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. [13] A. Graves, A.-R. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In 2013 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6645–6649, 2013. [14] A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenger, S. Satheesh, S. Sengupta, A. Coates, et al. Deep speech: Scaling up end-to-end speech recognition. arXiv preprint arXiv:1412.5567, 2014. [15] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In The IEEE International Conference on Computer Vision (ICCV), 2015. [16] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [17] Itseez. Open source computer vision library. https://github.com/itseez/opencv, 2015. [18] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [19] J. Koutnik, K. Greff, F. Gomez, and J. Schmidhuber. A clockwork rnn. arXiv preprint arXiv:1402.3511, 2014. [20] T. Mikolov, M. Karafiát, L. Burget, J. Cernock`y, and S. Khudanpur. Recurrent neural network based language model. Interspeech, 2:3, 2010. [21] D. Neil and S.-C. Liu. Effective sensor fusion with event-based sensors and deep network architectures. In IEEE Int. Symposium on Circuits and Systems (ISCAS), 2016. [22] B. Nessler, M. Pfeiffer, L. Buesing, and W. Maass. Bayesian computation emerges in generic cortical microcircuits through spike-timing-dependent plasticity. PLoS Comput Biol, 9(4):e1003037, 2013. [23] P. O’Connor, D. Neil, S.-C. Liu, T. Delbruck, and M. Pfeiffer. Real-time classification and sensor fusion with a spiking Deep Belief Network. Frontiers in Neuroscience, 7, 2013. [24] G. Orchard, A. Jayawant, G. Cohen, and N. Thakor. Converting static image datasets to spiking neuromorphic datasets using saccades. arXiv: 1507.07629, 2015. [25] B. A. Pearlmutter. Learning state space trajectories in recurrent neural networks. Neural Computation, 1(2):263–269, 1989. [26] C. Posch, T. Serrano-Gotarredona, B. Linares-Barranco, and T. Delbruck. Retinomorphic event-based vision sensors: bioinspired cameras with spiking outputs. Proceedings of the IEEE, 102(10):1470–1484, 2014. [27] S. Semeniuta, A. Severyn, and E. Barth. Recurrent dropout without memory loss. arXiv, arXiv:1603.05118, 2016. [28] M. Wand, J. Koutník, and J. Schmidhuber. Lipreading with long short-term memory. arXiv preprint arXiv:1601.08188, 2016. [29] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhutdinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In International Conference on Machine Learning, 2015. 9 | 2016 | 216 |
6,124 | Launch and Iterate: Reducing Prediction Churn Q. Cormier ENS Lyon 15 parvis René Descartes Lyon, France quentin.cormier@ens-lyon.fr M. Milani Fard, K. Canini, M. R. Gupta Google Inc. 1600 Amphitheatre Parkway Mountain View, CA 94043 {mmilanifard,canini,mayagupta}@google.com Abstract Practical applications of machine learning often involve successive training iterations with changes to features and training examples. Ideally, changes in the output of any new model should only be improvements (wins) over the previous iteration, but in practice the predictions may change neutrally for many examples, resulting in extra net-zero wins and losses, referred to as unnecessary churn. These changes in the predictions are problematic for usability for some applications, and make it harder and more expensive to measure if a change is statistically significant positive. In this paper, we formulate the problem and present a stabilization operator to regularize a classifier towards a previous classifier. We use a Markov chain Monte Carlo stabilization operator to produce a model with more consistent predictions without adversely affecting accuracy. We investigate the properties of the proposal with theoretical analysis. Experiments on benchmark datasets for different classification algorithms demonstrate the method and the resulting reduction in churn. 1 The Curse of Version 2.0 In most practical settings, training and launching an initial machine-learned model is only the first step: as new and improved features are created, additional training data is gathered, and the model and learning algorithm are improved, it is natural to launch a series of ever-improving models. Each new candidate may bring wins, but also unnecessary changes. In practice, it is desirable to minimize any unnecessary changes for two key reasons. First, unnecessary changes can hinder usability and debugability as they can be disorienting to users and follow-on system components. Second, unnecessary changes make it more difficult to measure with statistical confidence whether the change is truly an improvement. For both these reasons, there is great interest in making only those changes that are wins, and minimizing any unnecessary changes, while making sure such process does not hinder the overall accuracy objective. There is already a large body of work in machine learning that treats the stability of learning algorithms. These range from the early works of Devroye and Wagner [1] and Vapnik [2, 3] to more recent studies of learning stability in more general hypothesis spaces [4, 5, 6]. Most of the literature on this topic focus on stability of the learning algorithm in terms of the risk or loss function and how such properties translate into uniform generalization with specific convergence rates. We build on these notions, but the problem treated here is substantively different. We address the problem of training consecutive classifiers to reduce unnecessary changes in the presence of realistic evolution of the problem domain and the training sets over time. The main contributions of this paper include: (I) discussion and formulation of the “churn” metric between trained models, (II) design of stabilization operators for regularization towards a previous model, (III) proposing a Markov chain Monte Carlo (MCMC) stabilization technique, (VI) theoretical analysis of the proposed stabilization in terms of churn, and (V) empirical analysis of the proposed methods on benchmark datasets with different classification algorithms. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Table 1: Win-loss ratio (WLR) needed to establish a change is statistically significant at the p = 0.05 level for k wins out of n diffs from a binomial distribution. The empirical WLR column shows the WLR one must actually see in the diffs. The true WLR column is the WLR the change must have so that any random draw of diffs has at least a 95% chance of producing the needed empirical WLR. # Diffs Min # Wins Max # Losses Empirical WLR True WLR Needed Allowed Needed Needed 10 9 1 9.000 26.195 100 59 41 1.439 1.972 1,000 527 473 1.114 1.234 10,000 5,083 4,917 1.034 1.068 1.1 Testing for Improvements In the machine learning literature, it is common to compare classifiers on a fixed pre-labeled test set. However, a fixed test set has a few practical downsides. First, if many potential changes to the model are evaluated on the same dataset, it becomes difficult to avoid observing spurious positive effects that are actually due to chance. Second, the true test distribution may be evolving over time, meaning that a fixed test set will eventually diverge from the true distribution of interest. Third, and most important to our discussion, any particular change may affect only a small subset of the test examples, leaving too small a sample of differences (diffs) to determine whether a change is statistically significant. For example, suppose one has a fixed test set of 10,000 samples with which to evaluate a classifier. Consider a change to one of the features, say a Boolean string-similarity feature that causes the feature to match more synonyms, and suppose that re-training a classifier with this small change to this one feature impacts only 0.1% of random examples. Then only 10 of the 10,000 test examples would be affected. As shown in the first row of Table 1, given only 10 diffs, there must be 9 or more wins to declare the change statistically significantly positive for p = 0.05. Note that cross-validation (CV), even in leave-one-out form, does not solve this issue. First, we are still bound by the size of the training set which might not include enough diffs between the two models. Second, and more importantly, the model in the previous iteration has likely seen the entire dataset, which breaks the independence assumption needed for the statistical test. To address these problems and ensure a fresh, sufficiently large test set for each comparison, practitioners often instead measure changes on a set of diffs for the proposed change. For example, to compare classifier A and B, each classifier is evaluated on a billion unlabeled examples, and then the set of diffs is defined as those examples for which classifiers A and B predict a different class. 1.2 Churn We define the churn between two models as the expected percent of diffs sampled from the test distribution. For a fixed accuracy gain, less churn is better. For example, if classifier A has accuracy 90% and classifier B has accuracy 91%, then the best case is if classifier B gets the same 90% of examples correct as classifier A, while correcting A’s errors on 1% of the data. Churn is thus only 1% in this case, and all diffs between A and B will be wins for B. Therefore the improvement of B over A will achieve statistical significance after labelling a mere 10 diffs. The worst case is if classifier A is right on the 9% of examples that B gets wrong, and B is right on the 10% of examples that A gets wrong. In this case, churn is 19%, and a given diff will only have probability of 10/19 of being a win for B, and almost 1,000 diffs will have to be labeled to be confident that B is better. On Statistical Significance: Throughout this paper, we assume that every diff is independent and identically distributed with some probability of being a win for the test model vs. the base model. Thus, the probability of k wins in n trials follows a binomial distribution. Confidence intervals can provide more information than a p-value, but p-values are a useful summary statistic to motivate the problem and proposed solution, and are relevant in practice; for a longer discussion see e.g. [7]. 2 Reducing Churn for Classifiers In this paper, we propose a new training strategy for reducing the churn between classifiers. One special case is how to train a classifier B to be low-churn given a fixed classifier A. We treat that 2 De-Churning Markov Chain A B T1 T2 TK TA TB . .. F ∗ 1 F ∗ 2 F ∗ K A∗ B∗ . .. Figure 1: The orange nodes illustrate a Markov Chain, at each step the classifier F ∗ t is regularized towards the previous step’s classifier F ∗ t−1 using the stabilization operator S, and each step trained on a different random training set Tt. We run K steps of this Markov chain, for K large enough so that the distribution of F ∗ k is close to a stationary distribution. The classifier A∗= S(F ∗ K, TA) is then deployed. Later, some changes are proposed, and a new classifier B∗is trained on training set TB but regularized towards A∗using B∗= S(A∗, TB). We compare this proposal in terms of churn and accuracy to the green nodes, which do not use the proposed stabilization. special case as well as a broader problem: a framework for training both classifiers A and B so that classifier B is expected to have low-churn relative to classifier A, though when we train A we do not yet know exactly the changes B will incorporate. We place no constraints on the kind of classifiers or the kind of future changes allowed. Our solution consists of two components: a stabilization operator that regularizes classifier B to be closer in predictions to classifier A; and a randomization of the training set that attempts to mimic expected future changes. We consider a training set T = {(xi, yi)}m i=1 of m samples with each D-dimensional feature vector xi ∈X ⊆RD and each label yi ∈Y = {−1, 1}. Samples are drawn i.i.d. from distribution D. Define a classifier f : RD →{−1, 1}, and the churn between two classifiers f1 and f2 as: C(f1, f2) = E (X,Y )∼D[1f1(X)f2(X)<0], (1) where 1 is the indicator function. We are given training sets TA and TB to train the first and second version of the model respectively. TB might add or drop features or examples compared to TA. 2.1 Perturbed Training to Imitate Future Changes Consider a random training set drawn from a distribution P(TA), such that different draws may have different training samples and different features. We show that one can train an initial classifier to be more consistent in predictions for different realizations of the perturbed training set by iteratively training on a series of i.i.d. random draws T1, T2, . . . from P(TA). We choose P(TA) to model a typical expected future change to the dataset. For example, if we think a likely future change will add 5% more training data and one new feature, then we would define a random training set to be a random 95% of the m examples in TA, while dropping a feature at random. 2.2 Stabilized Training Based On A Previous Model using a Markov Chain We propose a Markov chain Monte Carlo (MCMC) approach to form a distribution over classifiers that are consistent in predictions w.r.t. the distribution P(TA) on the training set. Let S denote a regularized training that outputs a new classifier F ∗ t+1 = S(F ∗ t , Tt+1) where F ∗ t is a previous classifier and Tt+1 is the current training set. Applying S repeatedly to random training sets Tt forms a Markov chain as shown in Figure 1. We expect this chain to produce a stationary peaked distribution on classifiers robust to the perturbation P(TA). We sample a model from this resulting distribution after K steps. We end the proposed Markov chain with a classifier A∗trained on the full training set TA, that is, A∗= S(F ∗ K, TA). Classifier A∗is the initial launched model, and has been pre-trained to be robust to the kind of changes we expect to see in some future training set TB. Later, classifier B∗should be trained as B∗= S(A∗, TB). We expect the chain to have reduced the churn C(A∗, B∗) compared to the churn C(A, B) that would have resulted from training classifiers A and B without the proposed stabilization. See Figure 1 for an illustration. Note that this chain only needs to be run for the first version of the model. 3 On Regularization Effect of Perturbed Training: One can view the perturbation of the dataset and random feature drops during the MCMC run as a form of regularization, resembling the dropout technique [8] now popular in deep, convolutional and recurrent neural networks (see e.g. [9] for a recent survey). Such regularization can result in better generalization error, and our empirical results show some evidence of such an effect. See further discussion in the experiments section. Perturbation Chain as Longitudinal Study: The chain in Figure 1 can also be viewed as a study of the stabilization operator upon several iterations of the model, with each trained and anchored on the previous version. It can help us assess if the successive application of the operator has any adverse effect on the accuracy or if the resulting churn reduction diminishes over time. 3 Stabilization Operators We propose two stabilization operators: (I) Regress to Corrected Prediction (RCP) which turns the classification problem into a regression towards corrected predictions of an older model, and (II) the Diplopia operator which regularizes the new model towards the older model using example weights. 3.1 RCP Stabilization Operator We propose a stabilization operator S(f, T) that can be used with almost any regression algorithm and any type of change. The RCP operator re-labels each classification training label yj ∈{−1, 1} in T with a regularized label ˜yj ∈R, using an anchor model f: ˜yj = αf(xj) + (1 −α)yj if yjf(xj) ≥0 ϵyj otherwise, (2) where α, ϵ ∈[0, 1] are hyperparameters of S that control the churn-accuracy trade-off, with larger α corresponding to lower churn but less sensitive to good changes. Denote the set of all re-labeled examples ˜T. The RCP stabilization operator S trains a regression model on ˜T, using the user’s choice of regression algorithm. 3.2 Diplopia Stabilization Operator The second stabilization operator, which we term Diplopia (double-vision), can be used with any classification strategy that can output a probability estimate for each class, including algorithms like SVMs and random forests (calibrated with a method like Platt scaling [10] or isotonic regression [11]). This operator can be easily extended to multi-class problems. For binary classification, the Diplopia operator copies each training example into two examples with labels ±1, and assigns different weights to the two contradictorily labeled copies. If f(.) is the probability estimate of class +1: (xi, yi) → (xi, +1) with weight Λi (xi, −1) with weight 1 −Λi Λi = αf(xi) + (1 −α)1yi≥0 if yi(f(xi) −1 2) ≥0 1/2 + ϵyi otherwise. The formula always assigns the higher weight to the copy with the correct label. Notice that the roles of α and ϵ are very similar than to those in (2). To see the intuition behind this operator, note that with α = 1 and without the ϵ-correction, stochastic f(.) maximizes the likelihood of the new dataset. The RCP operator requires using a regressor, but our preliminary experiments showed that it often trains faster (without the need to double the dataset size) and reduces churn better than the Diplopia operator. We therefore focus on the RCP operator for theoretical and empirical analysis. 4 Theoretical Results In this section we present some general bounds on smoothed churn, assuming that the perturbation does not remove any features, and that the training algorithm is symmetric in training examples (i.e. independent of the order of the dataset). The analysis here assumes datasets for different models are sampled i.i.d., ignoring the dependency between consecutive re-labeled datasets (through the intermediate model). Proofs and further technical details are given in the supplemental material. 4 First, note that we can rewrite the definition of the churn in terms of zero-one loss: C(f1, f2) = E (X,Y )∼D [ℓ0,1(f1(X), f2(X))] = E (X,Y )∼D [|ℓ0,1(f1(X), Y ) −ℓ0,1(f2(X), Y )|] . (3) We define a relaxation of C that is similar to the loss used by [5] to study the stability of classification algorithms, we call it smooth churn and it is parameterized by the choice of γ: Cγ(f1, f2) = E (X,Y )∼D [|ℓγ(f1(X), Y ) −ℓγ(f2(X), Y )|] , (4) where ℓγ(y, y′) = 1 if yy′ ≤0, ℓγ(y, y′) = 1 −yy′/γ for 0 ≤yy′ ≤γ, and ℓγ(y, y′) = 0 otherwise. Smooth churn can be interpreted as γ playing the role of a “confidence threshold” of the classifier f such that |f(x)|≪γ means the classifier is not confident in its prediction. It is easy to verify that ℓγ is (1/γ)-Lipschitz continuous with respect to y, when y′ ∈{−1, 1}. Let fT (x) →R be a classifier discriminant function (which can be thresholded to form a classifier) trained on set T. Let T i be the same as T except with the ith training sample (xi, yi) replaced by another sample. Then, as in [4], define training algorithm f.(.) to be β-stable if: ∀x, T, T i : |fT (x) −fT i(x)|≤β. (5) Many algorithms such as SVM and classical regularization networks have been shown to be β-stable with β = O(1/m) [4, 5]. We can use β-stability of learning algorithms to get a bound on the expected churn between independent runs of the algorithms on i.i.d. datasets: Theorem 1 (Expected Churn). Suppose f is β-stable, and is used to train classifiers on i.i.d. training sets T and T ′ sampled from Dm. We have: E T,T ′∼Dm[Cγ(fT , fT ′)] ≤β√πm γ . (6) Assuming β = O(1/m) this bound is of order O(1/√m), in line with most concentration bounds on the generalization error. We can further show that churn is concentrated around its expectation: Theorem 2 (Concentration Bound on Churn). Suppose f is β-stable, and is used to train classifiers on i.i.d. training sets T and T ′ sampled from Dm. We have: Pr T,T ′∼Dm Cγ(fT , fT ′) > ϵ + √πmβ γ ≤e−ϵ2γ2 mβ2 . (7) β-stability for learning algorithms often includes worst case bound on loss or Lipschitz-constant of the loss function. Assuming we use the RCP operator with squared loss in a reproducing kernel Hilbert space (RKHS), we can derive a distribution-dependent bound on the expected squared churn: Theorem 3 (Expected Squared Churn). Let F be a reproducing kernel Hilbert space with kernel k such that ∀x ∈X : k(x, x) ≤κ2 < ∞. Let fT be a model trained on T = {(xi, yi)}m i=1 defined by: fT = arg min g∈F 1 m m X 1 (g(xi) −yi)2 + λ∥g∥2 k. (8) For models trained on i.i.d. training sets T and T ′: E T,T ′∼Dm (X,Y )∼D (ℓγ(fT (X), Y ) −ℓγ(fT ′(X), Y ))2 ≤ 2κ4 mλ2γ2 E T ∼Dm " 1 m m X i=1 (fT (xi) −yi)2 # . (9) We can further use Chebyshev’s inequality to get a concentration bound on the smooth churn Cγ. Unlike the bounds in [4] and [5], the bound of Theorem 3 scales with the expected training error (note that we must use ˜yi in place of of yi when applying the theorem, since training data is re-labeled by the stabilization operator). We can thus use the above bound to analyse the effect of α and ϵ on the churn, through their influence on the training error. Suppose the Markov chain described in Section 2.2 has reached a stationary distribution. Let F ∗ k be a model sampled from the resulting stationary distribution, used with the RCP operator defined in (2) 5 Table 2: Description of the datasets used in the experimental analysis. Nomao [13] News Popularity [14] Twitter Buzz [15] # Features 89 61 77 TA 4000 samples, 84 features 8000 samples, 58 features 4000 samples, 70 features TB 5000 samples, 89 features 10000 samples, 61 features 5000 samples, 77 features Validation set 1000 samples 1000 samples 1000 samples Testing set 28465 samples 28797 samples 45402 samples to re-label the dataset Tk+1. Since F ∗ k+1 is the minimizer of objective in (8) on the re-labeled dataset we have: E Tk+1 " 1 m m X i=1 (F ∗ k+1(xi) −˜yi)2 # ≤ E Tk+1 " 1 m m X i=1 (F ∗ k (xi) −˜yi)2 + λ(∥F ∗ k ∥2 k−∥F ∗ k+1∥2 k) # = E Tk+1 " 1 m m X i=1 (F ∗ k (xi) −˜yi)2 # , (10) where line (10) is by the assumptions of stationary regime on F ∗ k and F ∗ k+1 with similar dataset sampling distributions for Tk and Tk+1. If E is the set of examples that F ∗ k got wrong, using the definition of the RCP operator we can replace ˜yi to get this bound on the squared churn: κ4 mλ2γ2 E Tk+1 " 1 −α m X i/∈E (F ∗ k (xi) −yi)2 + 1 m X i∈E (F ∗ k (xi) + ϵ)2 # . (11) We can see in Eqn. (11) that using an α close to 1 can decrease the first part of the bound, but at the same time it can negatively affect the error rate of the classifier, resulting in more samples in E and consequently a larger second term. Decreasing ϵ can reduce the (F ∗ k (xi) + ϵ)2 term of the bound, but can again cause an increase in the error rate. As shown in the experimental results, there is often a trade-off between the amount of churn reduction and the accuracy of the resulting model. We can measure the accuracy on the training set or a validation set to make sure the choice of α and ϵ does not degrade the accuracy. To estimate churn reduction, we can use an un-labeled dataset. 5 Experiments This section demonstrates the churn reduction effect of the RCP operator for three UCI benchmark datasets (see Table 2) with three regression algorithms: ridge regression, random forest regression, and support vector machine regression with RBF kernel, all implemented in Scikit-Learn [12] (additional results for boosted stumps and linear SVM in the appendix). We randomly split each dataset into three fixed parts: a training set, a validation set on which we optimized the hyper-parameters for all algorithms, and a testing set. We impute any missing values by the corresponding mean, and normalize the data to have zero mean and variance 1 on the training set. See the supplementary material for more experimental details. To compare two models by computing the WLR on a reasonable number of diffs, we have made the testing sets as large as possible, so that the expected number of diffs between two different models is large enough to derive accurate and statistically significant conclusions. Lastly, we note that the churn metric does not require labels, so it can be computed on an unlabeled dataset. 5.1 Experimental Set-up and Metrics We assume an initial classifier is to be trained on TA, and a later candidate trained on TB will be tested against the initial classifier. For the baseline of our experiments, we train classifier A on TA and classifier B on TB independently and without any stabilization, as shown in Figure 1. For the RCP operator comparison, we train A on TA, then train B+= S(A, TB). For the MCMC operator comparison, we run the MCMC chain for k = 30 steps—empirically enough for convergence 6 5 10 15 20 25 30 Iteration of the Markov chain 1 1.5 2 2.5 3 Churn (%) between consecutive models C(Fi,Fi-1) C(Fi *, Fi-1 * ) 5 10 15 20 25 30 Iteration of the Markov chain 94.1 94.2 94.3 94.4 94.5 94.6 94.7 94.8 94.9 Test Accuracy (%) Fi Accuracy Fi * Accuracy Figure 2: Left: Churn between consecutive models during the MCMC run on Nomao Dataset, with and without stabilization. Right: Accuracy of the intermediate models, with and without stabilization. Values are averaged over 40 runs of the chain. Dotted lines show standard errors. for the datasets we considered as seen in Figure 2—and set A∗= S(F ∗ k , TA) and B∗= S(A∗, TA). The dataset perturbation sub-samples 80% of the examples in TA and randomly drops 3-7 features. We run 40 independent chains to measure the variability, and report the average outcome and standard deviation. Figure 2 (left) plots the average and standard deviation of the churn along the 40 traces, and Figure 2 (right) shows the accuracy. For each experiment we report the churn ratio Cr between the initial classifier and candidate change, that is, Cr = C(B+, A)/C(B, A) for the RCP operator, and Cr = C(B∗, A∗)/C(B, A) for the MCMC operator, and Cr = C(B, A)/C(B, A) = 1 for the baseline experiment. The most important metric in practice is how easy it is to tell if B is an improvement over A, which we quantify by the WLR between the candidate and initial classifier for each experiment. To help interpret the WLR, we also report the resulting probability pwin that we would conclude that the candidate change is positive (p ≤0.05) with a random 100-example set of differences. Lastly, to demonstrate that the proposed methods reduce the churn without adversely impacting the accuracy of the models, we also report the accuracy of the different trained models for a large test set, though the point of this work is that a sufficiently-large labeled test set may not be available in a real setting (see Section 1.1), and note that even if available, using a fixed test set to test many different changes will lead to overfitting. 5.2 Results Table 3 shows results using reasonable default values of α = 0.5 and ϵ = 0.5 for both RCP and the MCMC (for results with other values of α and ϵ see Appendix D). As seen in the Cr rows of the table, RCP reduces churn over the baseline in all 9 cases, generally by 20%, but as much as 46% for ridge regression on the Nomao dataset. Similarly, running RCP in the Markov Chain also reduces the churn compared to the baseline in all 9 cases, and by slightly more on average than with the one-step RCP. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Epsilon Parameter for RCP 0.1 0.2 0.3 0.4 0.5 Test accuracy compared to baseline (%) 0.5 0.55 0.6 0.65 0.7 Churn Ratio (A*- A) Accuracy (B*- B) Accuracy Churn Ratio 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Alpha Parameter for RCP -1.5 -1 -0.5 0 0.5 1 Test accuracy compared to baseline (%) 0.3 0.5 0.7 0.9 1.1 Churn Ratio (A*- A) Accuracy (B*- B) Accuracy Churn Ratio Figure 3: SVM on Nomao dataset. Left: Testing accuracy of A∗and B∗compared to A and B, and churn ratio Cr as a function of ϵ, for fixed α = 0.7. Both the accuracy and the churn ratio tend to increase with larger values of ϵ. Right: Accuracies and the churn ratio versus α, for fixed ϵ = 0.1. There is a sharp decrease in accuracy with α > 0.8 likely due to divergence in the chain. 7 Table 3: Experiment results on 3 domains with 3 different training algorithms for a single step RCP and the MCMC methods. For the MCMC experiment, we report the numbers with the standard deviation over the 40 runs of the chain. Baseline RCP MCMC, k = 30 No Stabilization α = 0.5, ϵ = 0.5 α = 0.5, ϵ = 0.5 Nomao Ridge WLR 1.24 1.40 1.31 pwin 26.5 49.2 36.5 Cr 1.00 0.54 0.54 ± 0.06 Acc V1 / V2 93.1 / 93.4 93.1 / 93.4 93.2 ± 0.1 / 93.4 ± 0.1 RF WLR 1.02 1.13 1.09 pwin 5.6 13.4 9.8 Cr 1.00 0.83 0.83 ± 0.05 Acc V1 / V2 94.8 / 94.8 94.8 / 95.0 94.9 ± 0.2 / 95.0 ± 0.2 SVM WLR 1.70 2.51 2.32 pwin 82.5 99.7 99.2 Cr 1.00 0.75 0.69 ± 0.06 Acc V1 / V2 94.6 / 95.1 94.6 / 95.2 94.8 ± 0.2 / 95.3 ± 0.1 News Ridge WLR 0.95 0.94 1.04 pwin 2.5 2.4 6.7 Cr 1.00 0.75 0.78 ± 0.04 Acc V1 / V2 65.1 / 65.0 65.1 / 65.0 65.0 ± 0.1 / 65.1 ± 0.1 RF WLR 1.07 1.02 1.10 pwin 8.5 5.7 10.8 Cr 1.00 0.69 0.67 ± 0.04 Acc V1 / V2 64.5 / 65.1 64.5 / 64.7 64.3 ± 0.3 / 64.8 ± 0.2 SVM WLR 1.17 1.26 1.24 pwin 18.4 29.4 26.1 Cr 1.00 0.77 0.86 ± 0.02 Acc V1 / V2 64.9 / 65.4 64.9 / 65.4 64.8 ± 0.1 / 65.4 ± 0.1 Twitter Buzz Ridge WLR 1.71 3.54 1.53 pwin 83.1 100.0 66.4 Cr 1.00 0.85 0.65 ± 0.05 Acc V1 / V2 89.7 / 89.9 89.7 / 90.0 90.1 ± 0.1 / 90.2 ± 0.1 RF WLR 1.35 1.15 1.15 pwin 41.5 16.1 15.9 Cr 1.00 0.86 0.77 ± 0.07 Acc V1 / V2 96.2 / 96.4 96.2 / 96.3 96.3 ± 0.1 / 96.3 ± 0.1 SVM WLR 1.35 1.77 1.55 pwin 42.2 86.6 68.4 Cr 1.00 0.70 0.70 ± 0.03 Acc V1 / V2 96.0 / 96.1 96.0 / 96.1 96.1 ± 0.1 / 96.2 ± 0.1 In some cases, the reduced churn has a huge impact on the WLR. For example, for the SVM on Twitter, the 30% churn reduction by RCP raised the WLR from 1.35 to 1.77, making it twice as likely that labelling 100 differences would have verified the change was good (compare pwin values). MCMC provides a similar churn reduction, but the WLR increase is not as large. In addition to the MCMC providing slightly more churn reduction on average than RCP, running the Markov chain provides slightly higher accuracy on average as well, most notably for the ridge classifier on the Twitter dataset, raising initial classifier accuracy by 2.3% over the baseline. We hypothesize this is due to the regularization effect of the perturbed training during the MCMC run, resembling the effect of dropout in neural networks. We used fixed values of α = 0.5 and ϵ = 0.5 for all the experiments in Table 3, but note that results will vary with the choice of α and ϵ, and if they can be tuned with cross-validation or otherwise, results can be substantially improved. Figure 3 illustrates the dependence on these hyper-parameters: the left plot shows that small values of ϵ result in lower churn with reduced improvement on accuracy, and the right plot shows that increasing α reduces churn, and also helps increase accuracy, but at values larger than 0.8 causes the Markov chain to diverge. 8 References [1] L. Devroye and T. Wagner. Distribution-free performance bounds for potential function rules. Information Theory, IEEE Transactions on, 25(5):601–604, 1979. [2] V. N. Vapnik. The Nature of Statistical Learning Theory. Springer-Verlag: New York, 1995. [3] V. N. Vapnik. Statistical Learning Theory. John Wiley: New York, 1998. [4] O. Bousquet and A. Elisseeff. Algorithmic stability and generalization performance. In Advances in Neural Information Processing Systems 13: Proceedings of the 2000 Conference, volume 13, page 196. MIT Press, 2001. [5] O. Bousquet and A. Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2(Mar):499–526, 2002. [6] S. Mukherjee, P. Niyogi, T. Poggio, and R. Rifkin. Learning theory: stability is sufficient for generalization and necessary and sufficient for consistency of empirical risk minimization. Advances in Computational Mathematics, 25(1-3):161–193, 2006. [7] A. Reinart. Statistics Done Wrong: The Woefully Complete Guide. No Starch Press, San Francisco, USA, 2015. [8] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. [9] L. Zhang and P. N. Suganthan. A survey of randomized algorithms for training neural networks. Information Sciences, 2016. [10] J. Platt. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in Large Margin Classifiers, 10(3):61–74, 1999. [11] A. Niculescu-Mizil and R. Caruana. Predicting good probabilities with supervised learning. In Proceedings of the 22nd International Conference on Machine Learning, pages 625–632. ACM, 2005. [12] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [13] L. Candillier and V. Lemaire. Design and analysis of the Nomao challenge active learning in the real-world. In Proceedings of the ALRA: Active Learning in Real-world Applications, Workshop ECML-PKDD, 2012. [14] K. Fernandes, P. Vinagre, and P. Cortez. Progress in Artificial Intelligence: 17th Portuguese Conference on Artificial Intelligence, EPIA 2015, Coimbra, Portugal, September 8-11, 2015. Proceedings, chapter A Proactive Intelligent Decision Support System for Predicting the Popularity of Online News, pages 535–546. Springer International Publishing, Cham, 2015. [15] F. Kawala, E. Gaussier, A. Douzal-Chouakria, and E. Diemert. Apprentissage d’ordonnancement et influence de l’ambiguïté pour la prédiction d’activité sur les réseaux sociaux. In Coria’2014, pages 1–15, Nancy, France, France, March 2014. 9 | 2016 | 217 |
6,125 | Stochastic Three-Composite Convex Minimization Alp Yurtsever, B`˘ang Công V˜u, and Volkan Cevher Laboratory for Information and Inference Systems (LIONS) École Polytechnique Fédérale de Lausanne, Switzerland alp.yurtsever@epfl.ch, bang.vu@epfl.ch, volkan.cevher@epfl.ch Abstract We propose a stochastic optimization method for the minimization of the sum of three convex functions, one of which has Lipschitz continuous gradient as well as restricted strong convexity. Our approach is most suitable in the setting where it is computationally advantageous to process smooth term in the decomposition with its stochastic gradient estimate and the other two functions separately with their proximal operators, such as doubly regularized empirical risk minimization problems. We prove the convergence characterization of the proposed algorithm in expectation under the standard assumptions for the stochastic gradient estimate of the smooth term. Our method operates in the primal space and can be considered as a stochastic extension of the three-operator splitting method. Numerical evidence supports the effectiveness of our method in real-world problems. 1 Introduction We propose a stochastic optimization method for the three-composite minimization problem: minimize x∈Rd f(x) + g(x) + h(x), (1) where f : Rd →R and g : Rd →R are proper, lower semicontinuous convex functions that admit tractable proximal operators, and h : Rd →R is a smooth function with restricted strong convexity. We assume that we have access to unbiased, stochastic estimates of the gradient of h in the sequel, which is key to scale up optimization and to address streaming settings where data arrive in time. Template (1) covers a large number of applications in machine learning, statistics, and signal processing by appropriately choosing the individual terms. Operator splitting methods are powerful in this setting, since they reduce the complex problem (1) into smaller subproblems. These algorithms are easy to implement, and they typically exhibit state-of-the-art performance. To our knowledge, there is no operator splitting framework that can currently tackle template (1) using stochastic gradient of h and the proximal operators of f and g separately, which is critical to the scalability of the methods. This paper specifically bridges this gap. Our basic framework is closely related to the deterministic three operator splitting method proposed in [11], but we avoid the computation of the gradient ∇h and instead work with its unbiased estimates. We provide rigorous convergence guarantees for our approach and provide guidance in selecting the learning rate under different scenarios. Road map. Section 2 introduces the basic optimization background. Section 3 then presents the main algorithm and provides its convergence characterization. Section 4 places our contributions in light of the existing work. Numerical evidence that illustrates our theory appears in Section 5. We relegate the technical proofs to the supplementary material. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2 Notation and background This section recalls a few basic notions from the convex analysis and the probability theory, and presents the notation used in the rest of the paper. Throughout, Γ0(Rd) denotes the set of all proper, lower semicontinuous convex functions from Rd to [−∞, +∞], and ⟨· | ·⟩is the standard scalar product on Rd with its associated norm ∥· ∥. Subdifferential. The subdifferential of f ∈Γ0(Rd) at a point x ∈Rd is defined as ∂f(x) = {u ∈Rd | f(y) −f(x) ≥⟨y −x | u⟩, ∀y ∈Rd}. We denote the domain of ∂f as dom(∂f) = {x ∈Rd | ∂f(x) ̸= ∅}. If ∂f(x) is a singleton, then f is a differentiable function, and ∂f(x) = {∇f(x)}. Indicator function. Given a nonempty subset C in Rd, the indicator function of C is given by ιC(x) = 0 if x ∈C, +∞ if x ̸∈C. (2) Proximal operator. The proximal operator of a function f ∈Γ0(Rd) is defined as follows proxf(x) = arg min z∈Rd f(z) + 1 2∥z −x∥2 . (3) Roughly speaking, the proximal operator is tractable when the computation of (3) is cheap. If f is the indicator function of a nonempty, closed convex subset C, its proximity operator is the projection operator on C. Lipschitz continuos gradient. A function f ∈Γ0(Rd) has Lipschitz continuous gradient with Lipschitz constant L > 0 (or simply L-Lipschitz), if ∥∇f(x) −∇f(y)∥≤L∥x −y∥, ∀x, y ∈Rd. Strong convexity. A function f ∈Γ0(Rd) is called strongly convex with some parameter µ > 0 (or simply µ-strongly convex), if ⟨p −q | x −y⟩≥µ∥x −y∥2, ∀x, y ∈dom(∂f), ∀p ∈∂f(x), ∀q ∈∂f(y). Solution set. We denote optimum points of (1) by x⋆, and the solution set by X ⋆: x⋆∈X ⋆= {x ∈Rd | 0 ∈∇h(x) + ∂g(x) + ∂f(x)}. Throughout this paper, we assume that X ⋆is not empty. Restricted strong convexity. A function f ∈Γ0(Rd) has restricted strong convexity with respect to a point x⋆in a set M ⊂dom(∂f), with parameter µ > 0, if ⟨p −q | x −x⋆⟩≥µ∥x −x⋆∥2, ∀x ∈M, ∀p ∈∂f(x), ∀q ∈∂f(x⋆). Let (Ω, F, P) be a probability space. An Rd-valued random variable is a measurable function x: Ω→Rd, where Rd is endowed with the Borel σ-algebra. We denote by σ(x) the σ-field generated by x. The expectation of a random variable x is denoted by E[x]. The conditional expectation of x given a σ-field A ⊂F is denoted by E[x|A]. Given a random variable y: Ω→Rd, the conditional expectation of x given y is denoted by E[x|y]. See [17] for more details on probability theory. An Rd-valued random process is a sequence (xn)n∈N of Rd-valued random variables. 3 Stochastic three-composite minimization algorithm and its analysis We present stochastic three-composite minimization method (S3CM) in Algorithm 1, for solving the three-composite template (1). Our approach combines the stochastic gradient of h, denoted as r, and the proximal operators of f and g in essentially the same structrure as the three-operator splitting method [11, Algorithm 2]. Our technique is a nontrivial combination of the algorithmic framework of [11] with stochastic analysis. 2 Algorithm 1 Stochastic three-composite minimization algorithm (S3CM) Input: An initial point xf,0, a sequence of learning rates (γn)n∈N, and a sequence of squared integrable Rd-valued stochastic gradient estimates (rn)n∈N. Initialization: xg,0 = proxγ0g(xf,0) ug,0 = γ−1 0 (xf,0 −xg,0) Main loop: for n = 0, 1, 2, . . . do xg,n+1 = proxγng(xf,n + γnug,n) ug,n+1 = γ−1 n (xf,n −xg,n+1) + ug,n xf,n+1 = proxγn+1f(xg,n+1 −γn+1ug,n+1 −γn+1rn+1) end for Output: xg,n as an approximation of an optimal solution x⋆. Theorem 1 Assume that h is µh-strongly convex and has L-Lipschitz continuous gradient. Further assume that g is µg-strongly convex, where we allow µg = 0. Consider the following update rule for the learning rate: γn+1 = −γ2 nµhη + p (γ2nµhη)2 + (1 + 2γnµg)γ2n 1 + 2γnµg , for some γ0 > 0 and η ∈]0, 1[. Define Fn = σ(xf,k)0≤k≤n, and suppose that the following conditions hold for every n ∈N: 1. E[rn+1|Fn] = ∇h(xg,n+1) almost surely, 2. There exists c ∈[0, +∞[ and t ∈R, that satisfies Pn k=0 E[∥rk −∇h(xg,k)∥2] ≤cnt. Then, the iterates of S3CM satisfy E[∥xg,n −x⋆∥2] = O(1/n2) + O(1/n2−t). (4) Remark 1 The variance condition of the stochastic gradient estimates in the theorems above is satisfied when E[∥rn −∇h(xg,n)∥2] ≤c for all n ∈N and for some constant c ∈[0, +∞[. See [15, 22, 26] for details. Remark 2 When rn = ∇h(xn), S3CM reduces to the deterministic three-operator splitting scheme [11, Algorithm 2] and we recover the convergence rate O(1/n2) as in [11]. When g is zero, S3CM reduces to the standard stochastic proximal point algorithm [2, 13, 26]. Remark 3 Learning rate sequence (γn)n∈N in Theorem 1 depends on the strong convexity parameter µh, which may not be available a priori. Our next result avoids the explicit reliance on the strong convexity parameter, while providing essentially the same convergence rate. Theorem 2 Assume that h is µh-strongly convex and has L-Lipschitz continuous gradient. Consider a positive decreasing learning rate sequence γn = Θ(1/nα) for some α ∈]0, 1], and denote β = limn→∞2µhnαγn. Define Fn = σ(xf,k)0≤k≤n, and suppose that the following conditions hold for every n ∈N: 1. E[rn+1|Fn] = ∇h(xg,n+1) almost surely, 2. E[∥rn −∇h(xg,n)∥2] is uniformly bounded by some positive constant. 3. E[∥ug,n −x⋆∥2] is uniformly bounded by some positive constant. Then, the iterates of S3CM satisfy E[∥xg,n −x⋆∥2] = O 1/nα if 0 < α < 1 O 1/nβ if α = 1, and β < 1 O (log n)/n if α = 1, and β = 1, O 1/n if α = 1, and β > 1. 3 Proof outline. We consider the proof of three-operator splitting method as a baseline, and we use the stochastic fixed point theory to derive the convergence of the iterates via the stochastic Fejér monotone sequence. See the supplement for the complete proof. Remark 4 Note that ug,n ∈∂g(xg,n). Hence, we can replace condition 3 in Theorem 2 with the bounded subgradient assumption: ∥p∥≤c, ∀p ∈∂g(xg,n), for some positive constant c. Remark 5 (Restricted strong convexity) Let M be a subset of Rd that contains (xg,n)n∈N and x⋆. Suppose that h has restricted strong convexity on M with parameter µh. Then, Theorems 1 and 2 still hold. An example role of the restricted strong convexity assumption on algorithmic convergence can be found in [1, 21]. Remark 6 (Extension to arbitrary number of non-smooth terms.) Using the product space technique [5, Section 6.1], S3CM can be applied to composite problems with arbitrary number of non-smooth terms: minimize x∈Rd m X i=1 fi(x) + h(x), where fi : Rd →R are proper, lower semicontinuous convex functions, and h : Rd →R is a smooth function with restricted strong convexity. We present this variant in Algorithm 2. Theorems 1 and 2 hold for this variant, replacing xg,n by xn, and ug,n by ui,n for i = 1, 2, . . . , m. Algorithm 2 Stochastic m(ulti)-composite minimization algorithm (SmCM) Input: Initial points {xf1,0, xf2,0, . . . , xfm,0}, a sequence of learning rates (γn)n∈N, and a sequence of squared integrable Rd-valued stochastic gradient estimates (rn)n∈N Initialization: x0 = m−1 Pm i=1 xfi,0 for i=1,2,...,m do ui,0 = γ−1 0 (xfi,0 −x0) end for Main loop: for n = 0, 1, 2, . . . do xn+1 = m−1 Pm i=1(xfi,n + γnui,n) for i=1,2,...,m do ui,n+1 = γ−1 n (xfi,n −xn+1) + ui,n xfi,n+1 = proxγn+1mfi(xn+1 −γn+1ui,n+1 −γn+1rn+1) end for end for Output: xn as an approximation of an optimal solution x⋆. Remark 7 With a proper learning rate, S3CM still converges even if h is not (restricted) strongly convex under mild assumptions. Suppose that h has L-Lipschitz continuous gradient. Set the learning rate such that ε ≤γn ≡γ ≤α(2L−1 −ε), for some α and ε in ]0, 1[. Define Fn = σ(xf,k)0≤k≤n, and suppose that the following conditions hold for every n ∈N: 1. E[rn+1|Fn] = ∇h(xg,n+1) almost surely. 2. P n∈N E[∥rn+1 −∇h(xg,n+1)∥2|Fn] < +∞almost surely. Then, (xg,n)n∈N converges to a X ⋆-valued random vector almost surely. See [7] for details. Remark 8 All the results above hold for any separable Hilbert space, except that the strong convergence in Remark 7 is replaced by weak convergence. Note however that extending Remark 7 to variable metric setting as in [10, 27] is an open problem. 4 4 Contributions in the light of prior work Recent algorithms in the operator splitting, such as generalized forward-backward splitting [24], forward-Douglas-Rachford splitting [5], and the three-operator splitting [11], apply to our problem template (1). These key results, however, are in the deterministic setting. Our basic framework can be viewed as a combination of the three-operator splitting method in [11] with the stochastic analysis. The idea of using unbiased estimates of the gradient dates back to [25]. Recent developments of this idea can be viewed as proximal based methods for solving the generic composite convex minimization template with a single non-smooth term [2, 9, 12, 13, 15, 16, 19, 26, 23]. This generic form arises naturally in regularized or constrained composite problems [3, 13, 20], where the smooth term typically encodes the data fidelity. These methods require the evaluation of the joint prox of f and g when applied to the three-composite template (1). Unfortunately, evaluation of the joint prox is arguably more expensive compared to the individual prox operators. To make comparison stark, consider the simple example where f and g are indicator functions for two convex sets. Even if the projection onto the individual sets are easy to compute, projection onto the intersection of these sets can be challenging. Related literature also contains algorithms that solve some specific instances of template (1). To point out a few, random averaging projection method [28] handles multiple constraints simultaneously but cannot deal with regularizers. On the other hand, accelerated stochastic gradient descent with proximal average [29] can handle multiple regularizers simultaneously, but the algorithm imposes a Lipschitz condition on regularizers, and hence, it cannot deal with constraints. To our knowledge, our method is the first operator splitting framework that can tackle optimization template (1) using the stochastic gradient estimate of h and the proximal operators of f and g separately, without any restriction on the non-smooth parts except that their subdifferentials are maximally monotone. When h is strongly convex, under mild assumptions, and with a proper learning rate, our algorithm converges with O(1/n) rate, which is optimal for the stochastic methods under strong convexity assumption for this problem class. 5 Numerical experiments We present numerical evidence to assess the theoretical convergence guarantees of the proposed algorithm. We provide two numerical examples from Markowitz portfolio optimization and support vector machines. As a baseline, we use the deterministic three-operator splitting method [11]. Even though the random averaging projection method proposed in [28] does not apply to our template (1) with its all generality, it does for the specific applications that we present below. In our numerical tests, however, we observed that this method exhibits essentially the same convergence behavior as ours when used with the same learning rate sequence. For the clarity of the presentation, we omit this method in our results. 5.1 Portfolio optimization Traditional Markowitz portfolio optimization aims to reduce risk by minimizing the variance for a given expected return. Mathematically, we can formulate this as a convex optimization problem [6]: minimize x∈Rd E |aT i x −b|2 subject to x ∈∆, aT av x ≥b, where ∆is the standard simplex for portfolios with no-short positions or a simple sum constraint, aav = E [ai] is the average returns for each asset that is assumed to be known (or estimated), and b encodes a minimum desired return. This problem has a streaming nature where new data points arrive in time. Hence, we typically do not have access to the whole dataset, and the stochastic setting is more favorable. For implementation, 5 we replace the expectation with the empirical sample average: minimize x∈Rd 1 p p X i=1 (aT i x −b)2 subject to x ∈∆, aT av x ≥b. (5) This problem fits into our optimization template (1) by setting h(x) = 1 p p X i=1 (aT i x −b)2, g(x) = ι∆(x), and f(x) = ι{x | aT avx≥b}(x). We compute the unbiased estimates of the gradient by rn = 2(aT inx −b)ain, where index in is chosen uniformly random. We use 5 different real portfolio datasets: Dow Jones industrial average (DJIA, with 30 stocks for 507 days), New York stock exchange (NYSE, with 36 stocks for 5651 days), Standard & Poor’s 500 (SP500, with 25 stocks for 1276 days), Toronto stock exchange (TSE, with 88 stocks for 1258 days) that are also considered in [4]; and one dataset by Fama and French (FF100, 100 portfolios formed on size and book-to-market, 23,647 days) that is commonly used in financial literature, e.g., [6, 14]. We impute the missing data in FF100 using nearest-neighbor method with Euclidean distance. Figure 1: Comparison of the deterministic three-operators splitting method [11, Algorithm 2] and our stochastic three-composite minimization method (S3CM) for Markowitz portfolio optimization (5). Results are averaged over 100 Monte-Carlo simulations, and the boundaries of the shaded area are the best and worst instances. For the deterministic algorithm, we set η = 0.1. We evaluate the Lipschitz constant L and the strong convexity parameter µh to determine the step-size. For the stochastic algorithm, we do not have access to the whole data, so we cannot compute these parameter. Hence, we adopt the learning rate sequence defined in Theorem 2. We simply use γn = γ0/(n + 1) with γ0 = 1 for FF100, and γ0 = 103 for others.1 We start both algorithms from the zero vector. 1Note that a fine-tuned learning rate with a more complex definition can improve the empirical performance, e.g., γn = γ0/(n + ζ) for some positive constants γ0 and ζ. 6 We split all the datasets into test (10%) and train (90%) partitions randomly. We set the desired return as the average return over all assets in the training set, b = mean(aav). Other b values exhibit qualitatively similar behavior. The results of this experiment are compiled in Figure 1. We compute the objective function over the datapoints in the test partition, htest. We compare our algorithm against the deterministic threeoperator splitting method [11, Algorithm 2]. Since we seek statistical solutions, we compare the algorithms to achieve low to medium accuracy. [11] provides other variants of the deterministic algorithm, including two ergodic averaging schemes that feature improved theoretical rate of convergence. However, these variants performed worse in practice than the original method, and are omitted. Solid lines in Figure 1 present the average results over 100 Monte-Carlo simulations, and the boundaries of the shaded area are the best and worst instances. We also assess empirical evidence of the O(1/n) convergence rate guaranteed in Theorem 2, by presenting squared relative distance to the optimum solution for FF100 dataset. Here, we approximate the ground truth by solving the problem to high accuracy with the deterministic algorithm for 105 iterations. 5.2 Nonlinear support vector machines classification This section demonstrates S3CM on a support vector machines (SVM) for binary classification problem. We are given a training set A = {a1, a2, . . . , ad} and the corresponding class labels {b1, b2, . . . , bd}, where ai ∈Rp and bi ∈{−1, 1}. The goal is to build a model that assigns new examples into one class or the other correctly. As common in practice, we solve the dual soft-margin SVM formulation: minimize x∈Rd 1 2 d X i=1 d X j=1 K(ai, aj)bibjxixj − d X i=1 xi subject to x ∈[0, C]d, bT x = 0, where C ∈[0, +∞[ is the penalty parameter and K : Rp × Rp →R is a kernel function. In our example we use the Gaussian kernel given by Kσ(ai, aj) = exp(−σ∥ai −aj∥2) for some σ > 0. Define symmetric positive semidefinite matrix M ∈Rd×d with entries Mij = Kσ(ai, aj)bibj. Then the problem takes the form minimize x∈Rd 1 2xT Mx − d X i=1 xi subject to x ∈[0, C]d, bT x = 0. (6) This problem fits into three-composite optimization template (1) with h(x) = 1 2xT Mx − d X i=1 xi, g(x) = ι[0,C]d(x), and f(x) = ι{x | bT x=0}(x). One can solve this problem using three-operator splitting method [11, Algorithm 1]. Note that proxf and proxg, which are projections onto the corresponding constraint sets, incur O(d) computational cost, whereas the cost of computing the gradient is O(d2). To compute an unbiased gradient estimate, we choose an index in uniformly random, and we form rn = dM inxin −1. Here M in denotes ith n column of matrix M, and 1 represents the vector of ones. We can compute rn in O(d) computations, hence each iteration of S3CM costs an order cheaper compared to deterministic algorithm. We use UCI machine learning dataset “a1a”, with d = 1605 datapoints and p = 123 features [8, 18]. Note that our goal here is to demonstrate the optimization performance of our algorithm for a real world problem, rather than competing the prediction quality of the best engineered solvers. Hence, to keep experiments simple, we fix problem parameters C = 1 and σ = 2−2, and we focus on the effects of algorithmic parameters on the convergence behavior. Since p < d, M is rank deficient and h is not strongly convex. Nevertheless we use S3CM with the learning rate γn = γ0/(n + 1) for various values of γ0. We observe O(1/n) empirical convergence rate on the squared relative error for large enough γ0, which is guaranteed under restricted strong convexity assumption. See Figure 2 for the results. 7 Figure 2: [Left] Convergence of S3CM in the squared relative error with learning rate γn = γ0/(n + 1). [Right] Comparison of the deterministic three-operators splitting method [11, Algorithm 1] and S3CM with γ0 = 1 for SVM classification problem. Results are averaged over 100 Monte-Carlo simulations. Boundaries of the shaded area are the best and worst instances. Acknowledgments This work was supported in part by ERC Future Proof, SNF 200021-146750, SNF CRSII2-147633, and NCCR-Marvel. References [1] A. Agarwal, S. Negahban, and M. J. Wainwright. Fast global convergence of gradient methods for high-dimensional statistical recovery. Ann. Stat., 40(5):2452–2482, 2012. [2] Y. F. Atchadé, G. Fort, and E. Moulines. On stochastic proximal gradient algorithms. arXiv:1402.2365v2, 2014. [3] H. H. Bauschke and P. L. Combettes. Convex analysis and monotone operator theory in Hilbert spaces. Springer-Verlag, 2011. [4] A. Borodin, R. El-Yaniv, and V. Gogan. Can we learn to beat the best stock. In Advances in Neural Information Processing Systems 16, pages 345–352. 2004. [5] L. M. Briceño-Arias. Forward-Douglas–Rachford splitting and forward-partial inverse method for solving monotone inclusions. Optimization, 64(5):1239–1261, 2015. [6] J. Brodie, I. Daubechies, C. de Mol, D. Giannone, and I. Loris. Sparse and stable Markowitz portfolios. Proc. Natl. Acad. Sci., 106:12267–12272, 2009. [7] V. Cevher, B. C. V˜u, and A. Yurtsever. Stochastic forward–Douglas–Rachford splitting for monotone inclusions. EPFL-Report-215759, 2016. [8] C.-C. Chang and C.-J. Lin. LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol., 2(3):27:1–27:27, 2011. [9] P. L. Combettes and J.-C. Pesquet. Stochastic approximations and perturbations in forwardbackward splitting for monotone operators. arXiv:1507.07095v1, 2015. [10] P. L. Combettes and B. C. V˜u. Variable metric forward–backward splitting with applications to monotone inclusions in duality. Optimization, 63(9):1289–1318, 2014. [11] D. Davis and W. Yin. A three-operator splitting scheme and its optimization applications. arXiv:1504.01032v1, 2015. [12] O. Devolder. Stochastic first order methods in smooth convex optimization. Technical report, Center for Operations Research and Econometrics, 2011. 8 [13] J. Duchi and Y. Singer. Efficient online and batch learning using forward backward splitting. J. Mach. Learn. Res., 10:2899–2934, 2009. [14] E. F. Fama and K. R. French. Multifactor explanations of asset pricing anomalies. Journal of Finance,, 51:55–84, 1996. [15] C. Hu, W. Pan, and J. T. Kwok. Accelerated gradient methods for stochastic optimization and online learning. In Advances in Neural Information Processing Systems 22, pages 781–789. 2009. [16] G. Lan. An optimal method for stochastic composite optimization. Math. Program., 133(1):365– 397, 2012. [17] M. Ledoux and M. Talagrand. Probability in Banach spaces: Isoperimetry and processes. Springer-Verlag, 1991. [18] M. Lichman. UCI machine learning repository. University of California, Irvine, School of Information and Computer Sciences, 2013. [19] Q. Lin, X. Chen, and J. Peña. A smoothing stochastic gradient method for composite optimization. Optimization Methods and Software, 29(6):1281–1301, 2014. [20] S. Mosci, L. Rosasco, M. Santoro, A. Verri, and S. Villa. Solving structured sparsity regularization with proximal methods. In European Conf. Machine Learning and Principles and Practice of Knowledge Discovery, pages 418–433, 2010. [21] S. Negahban, B. Yu, M. J. Wainwright, and P. K. Ravikumar. A unified framework for highdimensional analysis of M-estimators with decomposable regularizers. In Advances in Neural Information Processing Systems 22, pages 1348–1356, 2009. [22] A. Nemirovski. Prox-method with rate of convergence O(1/t) for variational inequalities with Lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM J. on Optimization, 15(1):229–251, 2005. [23] A. Nitanda. Stochastic proximal gradient descent with acceleration techniques. In Advances in Neural Information Processing Systems 27, pages 1574–1582. 2014. [24] H. Raguet, J. Fadili, and G. Peyré. A generalized forward-backward splitting. SIAM Journal on Imaging Sciences, 6(3):1199–1226, 2013. [25] H. Robbins and S. Monro. A stochastic approximation method. Ann. Math. Statist., 22(3):400– 407, 1951. [26] L. Rosasco, S. Villa, and B. C. V˜u. Convergence of stochastic proximal gradient algorithm. arXiv:1403.5074v3, 2014. [27] B. C. V˜u. Almost sure convergence of the forward–backward–forward splitting algorithm. Optimization Letters, 10(4):781–803, 2016. [28] M. Wang, Y. Chen, J. Liu, and Y. Gu. Random multi–constraint projection: Stochastic gradient methods for convex optimization with many constraints. arXiv:1511.03760v1, 2015. [29] W. Zhong and J. Kwok. Accelerated stochastic gradient method for composite regularization. J. Mach. Learn. Res., 33:1086–1094, 2014. 9 | 2016 | 218 |
6,126 | Synthesizing the preferred inputs for neurons in neural networks via deep generator networks Anh Nguyen anguyen8@uwyo.edu Alexey Dosovitskiy dosovits@cs.uni-freiburg.de Jason Yosinski jason@geometric.ai Thomas Brox brox@cs.uni-freiburg.de Jeff Clune jeffclune@uwyo.edu Abstract Deep neural networks (DNNs) have demonstrated state-of-the-art results on many pattern recognition tasks, especially vision classification problems. Understanding the inner workings of such computational brains is both fascinating basic science that is interesting in its own right—similar to why we study the human brain—and will enable researchers to further improve DNNs. One path to understanding how a neural network functions internally is to study what each of its neurons has learned to detect. One such method is called activation maximization (AM), which synthesizes an input (e.g. an image) that highly activates a neuron. Here we dramatically improve the qualitative state of the art of activation maximization by harnessing a powerful, learned prior: a deep generator network (DGN). The algorithm (1) generates qualitatively state-of-the-art synthetic images that look almost real, (2) reveals the features learned by each neuron in an interpretable way, (3) generalizes well to new datasets and somewhat well to different network architectures without requiring the prior to be relearned, and (4) can be considered as a high-quality generative method (in this case, by generating novel, creative, interesting, recognizable images). 1 Introduction and Related Work Understanding how the human brain works has been a long-standing quest in human history. Neuroscientists have discovered neurons in human brains that selectively fire in response to specific, abstract concepts such as Halle Berry or Bill Clinton, shedding light on the question of whether learned neural codes are local vs. distributed [1]. These neurons were identified by finding the preferred stimuli (here, images) that highly excite a specific neuron, which was accomplished by showing subjects many different images while recording a target neuron’s activation. Such neurons are multifaceted: for example, the “Halle Berry neuron” responds to very different stimuli related to the actress—from pictures of her face, to pictures of her in costume, to the word “Halle Berry” printed as text [1]. Inspired by such neuroscience research, we are interested in shedding light into the inner workings of DNNs by finding the preferred inputs for each of their neurons. As the neuroscientists did, one could simply show the network a large set of images and record a set of images that highly activate a neuron [2]. However, that method has disadvantages vs. synthesizing preferred stimuli: 1) it requires a distribution of images that are similar to those used to train the network, which may not be known (e.g. when probing a trained network when one does not know which data were used to train it); 2) even in such a dataset, many informative images that would activate the neuron may not exist because the image space is vast [3]; 3) with real images, it is unclear which of their features a neuron has learned: for example, if a neuron is activated by a picture of a lawn mower on grass, it is unclear if it 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Images synthesized from scratch to highly activate output neurons in the CaffeNet deep neural network, which has learned to classify different types of ImageNet images. ‘cares about’ the grass, but if an image synthesized to highly activate the lawn mower neuron contains grass (as in Fig. 1), we can be more confident the neuron has learned to pay attention to that context. Synthesizing preferred stimuli is called activation maximization [4–8, 3, 9]. It starts from a random image and iteratively calculates via backpropagation how the color of each pixel in the image should be changed to increase the activation of a neuron. Previous studies have shown that doing so without biasing the images produced creates unrealistic, uninterpretable images [5, 3], because the set of all possible images is so vast that it is possible to produce ‘fooling’ images that excite a neuron, but do not resemble the natural images that neuron has learned to detect. Instead, we must constrain optimization to generate only synthetic images that resemble natural images [6]. Attempting that is accomplished by incorporating natural image priors into the objective function, which has been shown to substantially improve the recognizability of the images generated [7, 6, 9]. Many handdesigned natural image priors have been experimentally shown to improve image quality such as: Gaussian blur [7], α-norm [5, 7, 8], total variation [6, 9], jitter [10, 6, 9], data-driven patch priors [8], center-bias regularization [9], and initializing from mean images [9]. Instead of hand-designing such priors, in this paper, we propose to use a superior, learned natural image prior [11] akin to a generative model of images. This prior allows us to synthesize highly human-interpretable preferred stimuli, giving additional insight into the inner functioning of networks. While there is no way to rigorously measure human-interpretability, a problem that also makes quantitatively assessing generative models near-impossible [12], we should not cease scientific work on improving qualitative results simply because humans must subjectively evaluate them. Learning generative models of natural images has been a long-standing goal in machine learning [13]. Many types of neural network models exist, including probabilistic [13], auto-encoder [13], stochastic [14] and recurrent networks [13]. However, they are typically limited to relatively low-dimensional images and narrowly focused datasets. Recently, advances in network architectures and training methods enabled the generation of high-dimensional realistic images [15, 16, 11]. Most of these works are based on Generative Adversarial Networks (GAN) [17], which trains two models simultaneously: a generative model G to capture the data distribution, and a discriminative model D to estimates the probability that a sample came from the training data rather than G. The training objective for G is to maximize the probability of D making a mistake. Recently Dosovitskiy and Brox [11] trained networks capable of generating images from highly compressed feature representations, by combining an auto-encoder-style approach with GAN’s adversarial training. We harness these image generator networks as priors to produce synthetic preferred images. These generator networks are close to, but not true, generative models because they are trained without imposing any prior on the hidden distribution as in variational auto-encoders [14] or GANs [17], and without the addition of noise as in denoising auto-encoders [18]. Thus, there is no natural sampling procedure nor an implicit density function over the data space. The image generator DNN that we use as a prior is trained to take in a code (e.g. vector of scalars) and output a synthetic image that looks as close to real images from the ImageNet dataset [19] as possible. To produce a preferred input for a neuron in a given DNN that we want to visualize, we optimize in the input code space of the image generator DNN so that it outputs an image that activates 2 . . . I m age banana convertible . . . . . Deep generator network (prior) DNN being visualized candle Code Forward and backward passes u9 u2 u1 c1 c2 fc6 fc7 fc8 fc6 c3 c4 c5 ... u p c o n v o l u t i o n a l c o n v o l u t i o n a l Figure 2: To synthesize a preferred input for a target neuron h (e.g. the “candle” class output neuron), we optimize the hidden code input (red bar) of a deep image generator network (DGN) to produce an image that highly activates h. In the example shown, the DGN is a network trained to invert the feature representations of layer fc6 of CaffeNet. The target DNN being visualized can be a different network (with a different architecture and or trained on different data). The gradient information (blue-dashed line) flows from the layer containing h in the target DNN (here, layer fc8) all the way through the image back to the input code layer of the DGN. Note that both the DGN and target DNN being visualized have fixed parameters, and optimization only changes the DGN input code (red). the neuron of interest (Fig. 2). Our method restricts the search to only the set of images that can be drawn by the prior, which provides a strong biases toward realistic visualizations. Because our algorithm uses a deep generator network to perform activation maximization, we call it DGN-AM. 2 Methods Networks that we visualize. We demonstrate our visualization method on a variety of different networks. For reproducibility, we use pretrained models freely available in Caffe or the Caffe Model Zoo [20]: CaffeNet [20], GoogleNet [21], and ResNet [22]. They represent different convnet architectures trained on the ∼1.3-million-image 2012 ImageNet dataset [23, 19]. Our default DNN is CaffeNet [20], a minor variant of the common AlexNet architecture [24] with similar performance [20]. The last three fully connected layers of the 8-layer CaffeNet are called fc6, fc7 and fc8 (Fig. 2). fc8 is the last layer (pre softmax) and has 1000 outputs, one for each ImageNet class. Image generator network. We denote the DNN we want to visualize by Φ. Instead of previous works, which directly optimized an image so that it highly activates a neuron h in Φ and optionally satisfies hand-designed priors embedded in the cost function [5, 7, 9, 6], here we optimize in the input code of an image generator network G such that G outputs an image that highly activates h. For G we use networks made publicly available by [11] that have been trained with the principles of GANs [17] to reconstruct images from hidden-layer feature representations within CaffeNet [20]. How G is trained includes important differences from the original GAN configuration [17]. Here we can only briefly summarize the training procedure; please see [11] for more details. The training process involves four convolutional networks: 1) a fixed encoder network E to be inverted, 2) a generator network G, 3) a fixed “comparator” network C and 4) a discriminator D. G is trained to invert a feature representation extracted by the network E, and has to satisfy three objectives: 1) for a feature vector yi = E(xi), the synthesized image G(yi) has to be close to the original image xi; 2) the features of the output image C(G(yi)) have to be close to those of the real image C(xi); 3) D should be unable to distinguish G(yi) from real images. The objective for D is to discriminate between synthetic images G(yi) and real images xi as in the original GAN [17]. In this paper, the encoder E is CaffeNet truncated at different layers. We denote CaffeNet truncated at layer l by El, and the network trained to invert El by Gl. The “comparator” C is CaffeNet up to layer pool5. D is a convolutional network with 5 convolutional and 2 fully connected layers. G is an upconvolutional (aka deconvolutional) architecture [15] with 9 upconvolutional and 3 fully connected layers. Detailed architectures are provided in [11]. 3 Synthesizing the preferred images for a neuron. Intuitively, we search in the input code space of the image generator model G to find a code y such that G(y) is an image that produces high activation of the target neuron h in the DNN Φ that we want to visualize (i.e. optimization maximizes Φh(G(y))). Recall that Gl is a generator network trained to reconstruct images from the l-th layer features of CaffeNet. Formally, and including a regularization term, we may pose the activation maximization problem as finding a code byl such that: byl = arg max yl (Φh(Gl(yl)) −λ∥yl∥) (1) Empirically, we found a small amount of L2 regularization (λ = 0.005) works best. We also compute the activation range for each neuron in the set of codes {yl i} computed by running validation set images through El. We then clip each neuron in byl to be within the activation range of [0, 3σ], where σ is one standard deviation around the mean activation (the activation is lower bounded at 0 due to the ReLU nonlinearities that exist at the layers whose codes we optimize). This clipping acts as a primitive prior on the code space and substantially improves the image quality. In future work, we plan to learn this prior via a GAN or other generative model. Because the true goal of activation maximization is to generate interpretable preferred stimuli for each neuron, we performed random search in the hyperparameter space consisting of L2 weight λ, number of iterations, and learning rate. We chose the hyperparameter settings that produced the highest quality images. We note that we found no correlation between the activation of a neuron and the recognizability of its visualization. Our code and parameters are available at http://EvolvingAI.org/synthesizing. 3 Results 3.1 Comparison between priors trained to invert features from different layers Since a generator model Gl could be trained to invert feature representations of an arbitrary layer l of E, we sampled l = {3, 5, 6, 7} to explore the impact on this choice and identify qualitatively which produces the best images. Here, the DNN to visualize Φ is the same as the encoder E (CaffeNet), but they can be different (as shown below). The Gl networks are from [11]. For each Gl network we chose the hyperparameter settings from a random sample that gave the best qualitative results. Optimizing codes from the convolutional layers (l = 3, 5) typically yields highly repeated fragments, whereas optimizing fully-connected layer codes produces much more coherent global structure (Fig. S13). Interestingly, previous studies have shown that G trained to invert lower-layer codes (smaller l) results in far better reconstructions than higher-layer codes [25, 6]. That can be explained because those low-level codes come from natural images, and contain more information about image details than more abstract, high-level codes. For activation maximization, however, we are synthesizing an entire layer code from scratch. We hypothesize that this process works worse for Gl priors with smaller l because each feature in low-level codes has a small, local receptive field. Optimization thus has to independently tune features throughout the image without knowing the global structure. For example, is it an image of one or four robins? Because fully-connected layers have information from all areas of the image, they represent information such as the number, location, size, etc. of an object, and thus all the pixels can be optimized toward this agreed upon structure. An orthogonal, non-mutually-exclusive hypothesis is that the code space at a convolutional layer is much more high-dimensional, making it harder to optimize. We found that optimizing in the fc6 code space produces the best visualizations (Figs. 1 & S13). We thus use this G6 DGN as the default prior for the experiments in the rest of the paper. In addition, our images qualitatively appear to be the most realistic-looking compared to visualizations from all previous methods (Fig. S17). Our result reveals that a great amount of fine detail and global structure are captured by the DNN even at the last output layer. This finding is in contrast to a previous hypothesis that DNNs trained with supervised learning often ignore an object’s global structure, and only learn discriminative features per class (e.g. color or texture) [3]. Section 3.5 provides evidence that this global structure does not come from the prior. To test whether our method memorizes the training set images, we retrieved the closest images from the training set for each of sample synthetic images. Specifically, for each synthetic image for an output neuron Y (e.g. lipstick), we find an image among the same class Y with the lowest Euclidean distance in pixel space, as done in previous works [17], but also in each of the 8 code spaces of the 4 encoder DNN. While this is a much harder test than comparing to a nearest neighbor found among the entire dataset, we found no evidence that our method memorizes the training set images (Fig. S22). We believe evaluating similarity in the spaces of deep representations, which better capture semantic aspects of images, is a more informative approach compared to evaluating only in the pixel space. 3.2 Does the learned prior trained on ImageNet generalize to other datasets? We test whether the same DNN prior (G6) that was trained on inverting the feature representations of ImageNet images generalizes to enable visualizing DNNs trained on different datasets. Specifically, we target the output neurons of two DNNs downloaded from Caffe Model Zoo [20]): (1) An AlexNet DNN that was trained on the 2.5-million-image MIT Places dataset to classify 205 types of places with 50.1% accuracy [26]. (2) A hybrid architecture of CaffeNet and the network in [2] created by [27] to classify actions in videos by processing each frame of the video separately. The dataset consists of 13,320 videos categorized into 101 human action classes. For DNN 1, the prior trained on ImageNet images generalizes well to the completely different MIT Places dataset (Fig. 3). This result suggests the prior trained on ImageNet will generalize to other natural image datasets, at least if the architecture of the DNN to be visualized Φ is the same as the architecture of the encoder network E from which the generator model G was trained to invert feature representations. For DNN 2: the prior generalizes to produce decent results; however, the images are not qualitatively as sharp and clear as for DNN 1 (Fig. 4). We have two orthogonal hypotheses for why this happens: 1) Φ (the DNN from [27]) is a heavily modified version of E (CaffeNet); 2) the two types of images are too different: the primarily object-centric ImageNet dataset vs. the UCF-101 dataset, which focuses on humans performing actions. Sec. 3.3 returns to the first hypothesis regarding how the similarity between Φ and E affects the image quality Overall, the prior trained with a CaffeNet encoder generalizes well to visualizing other DNNs of the same CaffeNet architecture trained on different datasets. Figure 3: Preferred stimuli for output units of an AlexNet DNN trained on the MIT Places dataset [26], showing that the ImageNet-trained prior generalizes well to a dataset comprised of images of scenes. 3.3 Does the learned prior generalize to visualizing different architectures? We have shown that when the DNN to be visualized Φ is the same as the encoder E, the resultant visualizations are quite realistic and recognizable (Sec. 3.1). To visualize a different network architecture ˆΦ, one could train a new ˆG to invert ˆΦ feature representations. However, training a new G DGN for every DNN we want to visualize is computationally costly. Here, we test whether the same DGN prior trained on CaffeNet (G6) can be used to visualize two state-of-the-art DNNs that are architecturally different from CaffeNet, but were trained on the same ImageNet dataset. Both were downloaded from Caffe Model Zoo and have similar accuracy scores: (a) GoogLeNet is a 22-layer network and has a top-5 accuracy of 88.9% [21]; (b) ResNet is a new type of very deep architecture with skip connections [22]. We visualize a 50-layer ResNet that has a top-5 accuracy of 93.3%. [22]. DGN-AM produces the best image quality when Φ = E, and the visualization quality tends to degrade as the Φ architecture becomes more distant from E (Fig. 5, top row; GoogleLeNet is closer 5 Figure 4: Preferred images for output units of a heavily modified version of the AlexNet architecture trained to classify videos into 101 classes of human activities [27]. Here, we optimize a single preferred image per neuron because the DNN only classifies single frames (whole video classification is done by averaging scores across all video frames). in architecture to CaffeNet than ResNet) . An alternative hypothesis is that the network depth impairs gradient propagation during activation maximization. In any case, training a general prior for activation maximization that generalizes well to different network architectures, which would enable comparative analysis between networks, remains an important, open challenge. Figure 5: DGN-AM produces the best image quality when the DNN being visualized Φ is the same as the encoder E (here, CaffeNet), as in the top row, and degrades when Φ is different from E. 3.4 Does the learned prior generalize to visualizing hidden neurons? Visualizing the hidden neurons in an ImageNet DNN. Previous visualization techniques have shown that low-level neurons detect small, simple patterns such as corners and textures [2, 9, 7], mid-level neurons detect single objects like faces and chairs [9, 2, 28, 7], but that visualizations of hidden neurons in fully-connected layers are alien and difficult to interpret [9]. Since DGN was trained to invert the feature representations of real, full-sized ImageNet images, one possibility is that this prior may not generalize to producing preferred images for such hidden neurons because they are often smaller, different in theme, and or do not resemble real objects. To find out, we synthesized preferred images for the hidden neurons at all layers and compare them to images produced by the multifaceted feature visualization method from [9], which harnesses hand-designed priors of total variation and mean image initialization. The DNN being visualized is the same as in [9] (the CaffeNet architecture with weights from [7]). The side-by-side comparison (Fig. S14) shows that both methods often agree on the features that a neuron has learned to detect. However, overall DGN-AM produces more realistic-looking color and texture, despite not requiring optimization to be seeded with averages of real images, thus improving our ability to learn what feature each hidden neuron has learned. An exception is for the faces of 6 human and other animals, which DGN-AM does not visualize well (Fig. S14, 3rd unit on layer 6; 1st unit on layer 5; and 6th unit on layer 4). Visualizing the hidden neurons in a Deep Scene DNN. Recently, Zhou et al. [28] found that object detectors automatically emerge in the intermediate layers of a DNN as we train it to classify scene categories. To identify what a hidden neuron cares about in a given image, they densely slide an occluding patch across the image and record when activation drops. The activation changes are then aggregated to segment out the exact region that leads to the high neural activation (Fig. 6, the highlighted region in each image). To identify the semantics of these segmentations, humans are then shown a collection of segmented images for a specific neuron and asked to label what types of image features activate that neuron [28]. Here, we compare our method to theirs on an AlexNet DNN trained to classify 205 categories of scenes from the MIT Places dataset (described in Sec. 3.2). The prior learned on ImageNet generalizes to visualizing the hidden neurons of a DNN trained on the MIT Places dataset (Fig. S15). Interestingly, our visualizations produce similar results to the method in [28] that requires showing each neuron a large, external dataset of images to discover what feature each neuron has learned to detect (Fig. 6). Sometimes, DGN-AM reveals additional information: a unit that fires for TV screens also fires for people on TV (Fig. 6, unit 106). Overall, DGN-AM thus not only generalizes well to a different dataset, but also produces visualizations that qualitatively fall within the human-provided categories of what type of image features each neuron responds to [28]. Figure 6: Visualizations of example hidden neurons at layer 5 of an AlexNet DNN trained to classify categories of scenes from [28]. For each unit: we compare the two visualizations produced by a method from [28] (left) to two visualizations produced by our method (right). The left two images are real images, each highlighting a region that highly activates the neuron, and humans provide text labels describing the common theme in the highlighted regions. Our synthetic images enable the same conclusion regarding what feature a hidden neuron has learned. An extended version of this figure with more units is in Fig. S16. Best viewed electronically with zoom. 3.5 Do the synthesized images teach us what the neurons prefer or what the prior prefers? Visualizing neurons trained on unseen, modified images. We have shown that DGN-AM can generate preferred image stimuli with realistic colors and coherent global structures by harnessing the DGN’s strong, learned, natural image prior (Fig. 1). To what extent do the global structure, natural colors, and sharp textures (e.g. of the brambling bird, Fig. 1) reflect the features learned by the “brambling” neuron vs. those preferred by the prior? To investigate that, we train 3 different DNNs: one on images that have less global structure, one on images of non-realistic colors, and one on blurry images. We test whether DGN-AM with the same prior produces visualizations that reflect these modified, unrealistic features. Specifically, we train 3 different DNNs following CaffeNet architecture to discriminate 2000 classes. The first 1000 classes contain regular ImageNet images, and the 2nd 1000 classes contain modified ImageNet images. We perform 3 types of modifications: 1) we cut up each image into quarters and re-stitch them back in a random order (Fig. S19); 2) we convert regular RGB into BRG images (Fig. S20); 3) we blur out images with Gaussian blur with radius of 3 (Fig. S21). We visualize both groups of output neurons (those trained on 1000 regular vs. 1000 modified classes) in each DNN (Figs. S19, S20, & S21). The visualizations for the neurons that are trained on regular images often show coherent global structures, realistic-looking colors and sharpness. In contrast, the visualizations for neurons that are trained on modified images indeed show cut-up objects (Fig. S19), images in BRG color space (Fig. S20), and objects with washed out details (Fig. S21). The results show that DGN-AM visualizations do closely reflect the features learned by neurons from the data and that these properties are not exclusively produced by the prior. 7 Why do visualizations of some neurons not show canonical images? While many DGN-AM visualizations show global structure (e.g. a single, centered table lamp, Fig. 1); some others do not (e.g. blobs of textures instead of a dog with 4 legs, Fig. S18) or otherwise are non-canonical (e.g. a school bus off to the side of an image, Fig. S7). Sec. S5 describes our experiments investigating whether this is a shortcoming of our method or whether these non-canonical visualizations reflect some property of the neurons. The results suggest that DGN-AM can accurately visualize a class of images if the images of that set are mostly canonical, and the reason why the visualizations for some neurons lack global structure or are not canonical is that the set of images that neuron has learned to detect are often diverse (multi-modal), instead of having canonical pose. More research is needed into multifaceted feature visualization algorithms that separately visualize each type of image that activates a neuron [9]. 3.6 Other applications of our proposed method DGN-AM can also be useful for a variety of other important tasks. We briefly describe our experiments for these tasks, and refer the reader to the supplementary section for more information. 1. One advantage of synthesizing preferred images is that we can watch how features evolve during training to better understand what occurs during deep learning. Doing so also tests whether the learned prior (trained to invert features from a well-trained encoder) generalizes to visualizing underfit and overfit networks. The results suggest that the visualization quality is indicative of a DNN’s validation accuracy to some extent, and the learned prior is not overly specialized to the well-trained encoder DNN. See Sec. S6 for more details. 2. Our method for synthesizing preferred images could naturally be applied to synthesize preferred videos for an activity recognition DNN to better understand how it works. For example, we found that a state-of-the-art DNN classifies videos without paying attention to temporal information across video frames (Sec. S7). 3. Our method can be extended to produce creative, original art by synthesizing images that activate two neurons at the same time (Sec. S8). 4 Discussion and Conclusion We have shown that activation maximization—synthesizing the preferred inputs for neurons in neural networks—via a learned prior in the form of a deep generator network is a fruitful approach. DGNAM produces the most realistic-looking, and thus interpretable, preferred images to date, making it qualitatively the state of the art in activation maximization. The visualizations it synthesizes from scratch improve our ability to understand which features a neuron has learned to detect. Not only do the images closely reflect the features learned by a neuron, but they are visually interesting. We have explored a variety of ways that DGN-AM can help us understand trained DNNs. In future work, DGN-AM or its learned prior could dramatically improve our ability to synthesize an image from a text description of it (e.g. by synthesizing the image that activates a certain caption) or create more realistic “deep dream” [10] images. Additionally, that the prior used in this paper does not generalize equally well to DNNs of different architectures motivates research into how to train such a general prior. Successfully doing so could enable informative comparative analyses between the information transformations that occur within different types of DNNs. Acknowledgments The authors would like to thank Yoshua Bengio for helpful discussions and Bolei Zhou for providing images for our study. Jeff Clune was supported by an NSF CAREER award (CAREER: 1453549) and a hardware donation from the NVIDIA Corporation. Jason Yosinski was supported by the NASA Space Technology Research Fellowship and NSF grant 1527232. Alexey Dosovitskiy and Thomas Brox acknowledge funding by the ERC Starting Grant VideoLearn (279401). References [1] R. Q. Quiroga, L. Reddy, G. Kreiman, C. Koch, and I. Fried. Invariant visual representation by single neurons in the human brain. Nature, 435(7045):1102–1107, 2005. 8 [2] M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In Computer Vision– ECCV 2014, pages 818–833. Springer, 2014. [3] A. Nguyen, J. Yosinski, and J. Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Computer Vision and Pattern Recognition (CVPR), 2015. [4] D. Erhan, Y. Bengio, A. Courville, and P. Vincent. Visualizing higher-layer features of a deep network. Dept. IRO, Université de Montréal, Tech. Rep, 4323, 2009. [5] K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. ICLR workshop, 2014. [6] A. Mahendran and A. Vedaldi. Visualizing deep convolutional neural networks using natural pre-images. In Computer Vision and Pattern Recognition (CVPR), 2016. [7] J. Yosinski, J. Clune, A. Nguyen, T. Fuchs, and H. Lipson. Understanding neural networks through deep visualization. In Deep Learning Workshop, ICML conference, 2015. [8] D. Wei, B. Zhou, A. Torrabla, and W. Freeman. Understanding intra-class knowledge inside cnn. arXiv preprint arXiv:1507.02379, 2015. [9] A. Nguyen, J. Yosinski, and J. Clune. Multifaceted feature visualization: Uncovering the different types of features learned by each neuron in deep neural networks. In Visualization for Deep Learning Workshop, ICML conference, 2016. [10] A. Mordvintsev, C. Olah, and M. Tyka. Inceptionism: Going deeper into neural networks. Google Research Blog. Retrieved June, 20, 2015. [11] A. Dosovitskiy and T. Brox. Generating images with perceptual similarity metrics based on deep networks. In NIPS, 2016. [12] L. Theis, A. van den Oord, and M. Bethge. A note on the evaluation of generative models. In ICLR, 2016. [13] Y. Bengio, I. J. Goodfellow, and A. Courville. Deep learning. MIT Press, 2015. [14] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In ICLR, 2014. [15] A. Dosovitskiy, J. Tobias Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In Computer Vision and Pattern Recognition (CVPR), 2015. [16] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. [17] 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. [18] G. Alain and Y. Bengio. What regularized auto-encoders learn from the data-generating distribution. The Journal of Machine Learning Research, 15(1):3563–3593, 2014. [19] O. Russakovsky et al. Imagenet large scale visual recognition challenge. IJCV, 115(3):211–252, 2015. [20] 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. [21] 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. [22] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [23] J. Deng et al. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. [24] 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. [25] A. Dosovitskiy and T.Brox. Inverting visual representations with convolutional networks. In CVPR, 2016. [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, 2014. [27] J. Donahue, L. A. Hendricks, S. Guadarrama, M. Rohrbach, et al. Long-term recurrent convolutional networks for visual recognition and description. In Computer Vision and Pattern Recognition, 2015. [28] B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Object detectors emerge in deep scene cnns. In International Conference on Learning Representations (ICLR), 2015. 9 | 2016 | 219 |
6,127 | Budgeted stream-based active learning via adaptive submodular maximization Kaito Fujii Kyoto University JST, ERATO, Kawarabayashi Large Graph Project fujii@ml.ist.i.kyoto-u.ac.jp Hisashi Kashima Kyoto University kashima@i.kyoto-u.ac.jp Abstract Active learning enables us to reduce the annotation cost by adaptively selecting unlabeled instances to be labeled. For pool-based active learning, several effective methods with theoretical guarantees have been developed through maximizing some utility function satisfying adaptive submodularity. In contrast, there have been few methods for stream-based active learning based on adaptive submodularity. In this paper, we propose a new class of utility functions, policy-adaptive submodular functions, which includes many existing adaptive submodular functions appearing in real world problems. We provide a general framework based on policy-adaptive submodularity that makes it possible to convert existing poolbased methods to stream-based methods and give theoretical guarantees on their performance. In addition we empirically demonstrate their effectiveness by comparing with existing heuristics on common benchmark datasets. 1 Introduction Active learning is a problem setting for sequentially selecting unlabeled instances to be labeled, and it has been studied with much practical interest as an efficient way to reduce the annotation cost. One of the most popular settings of active learning is the pool-based one, in which the learner is given the entire set of unlabeled instances in advance, and iteratively selects an instance to be labeled next. The stream-based setting, which we deal with in this paper, is another important setting of active learning, in which the entire set of unlabeled instances are hidden initially, and presented one by one to the learner. This setting also has many real world applications, for example, sentiment analysis of web stream data [26], spam filtering [25], part-of-speech tagging [10], and video surveillance [23]. Adaptive submodularity [19] is an adaptive extension of submodularity, a natural diminishing return condition. It provides a framework for designing effective algorithms for several adaptive problems including pool-based active learning. For instance, the ones for noiseless active learning [19, 21] and the ones for noisy active learning [20, 9, 8] have been developed in recent years. Not only they have strong theoretical guarantees on their performance, but they perform well in practice compared with existing widely-used heuristics. In spite of its considerable success in the pool-based setting, little is known about benefits of adaptive submodularity in the stream-based setting. This paper answers the question: is it possible to construct algorithms for stream-based active learning based on adaptive submodularity? We propose a general framework for creating stream-based algorithms from existing pool-based algorithms. In this paper, we tackle the problem of stream-based active learning with a limited budget for making queries. The goal is collecting an informative set of labeled instances from a data stream of a certain length. The stream-based active learning problem has been typically studied in two settings: 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the stream setting and the secretary setting, which correspond to memory constraints and timing constraints respectively; we treat both in this paper. We formalize these problems as the adaptive stochastic maximization problem in the stream or secretary setting. For solving this problem, we propose a new class of stochastic utility functions: policy-adaptive submodular functions, which is another adaptive extension of submodularity. We prove this class includes many existing adaptive submodular functions used in various applications. Assuming the objective function satisfies policy-adaptive submodularity, we propose simple methods for each problem, and give theoretical guarantees on their performance in comparison to the optimal pool-based method. Experiments conducted on benchmark datasets show the effectiveness of our methods compared with several heuristics. Due to our framework, many algorithms developed in the pool-based setting can be converted to the stream-based setting. In summary, our main contributions are the following: • We provide a general framework that captures budgeted stream-based active learning and other applications. • We propose a new class of stochastic utility functions, policy-adaptive submodular functions, which is a subclass of the adaptive submodular functions, and prove this class includes many existing adaptive submodular functions in real world problems. • We propose two simple algorithms, AdaptiveStream and AdaptiveSecretary, and give theoretical performance guarantees on them. 2 Problem Settings In this section, we first describe the general framework, then illustrate applications including streambased active learning. 2.1 Adaptive Stochastic Maximization in the Stream and Secretary Settings Here we specify the problem statement. This problem is a generalization of budgeted stream-based active learning and other applications. Let V = {v1, · · · , vn} denote the entire set of n items, and each item vi is in a particular state out of the set Y of possible states. Denote by ϕ : V →Y a realization of the states of the items. Let Φ be a random realization, and Yi a random variable representing the state of each item vi for i = 1, · · · , n, i.e., Yi = Φ(vi). Assume that ϕ is generated from a known prior distribution p(ϕ). Suppose the state Yi is revealed when vi is selected. Let ψA : A →Y denote the partial realization obtained after the states of items A ⊆V are observed. Note that a partial realization ψA can be regarded as the set of observations {(s, ψA(s)) | s ∈A} ⊆V × Y. We are given a set function1 f : 2V ×Y →R≥0 that defines the utility of observations made when some items are selected. Consider iteratively selecting an item to observe its state and aiming to make observations of high utility value. A policy π is some decision tree that represents a strategy for adaptively selecting items. Formally it is defined to be a partial mapping that determines an item to be selected next from the observations made so far. Given some budget k ∈Z>0, the goal is constructing a policy π maximizing EΦ[f(ψ(π, Φ))] subject to |ψ(π, ϕ)| ≤k for all ϕ where ψ(π, ϕ) denotes the observations obtained by executing policy π under realization ϕ. This problem has been studied mainly in the pool-based setting, where we are given the entire set V from the beginning and adaptively observe the states of items in any order. In this paper we tackle the stream-based setting, where the items are hidden initially and arrive one by one. The streambased setting arises in two kinds of scenarios: one is the stream setting2, in which we can postpone deciding whether or not to select an item by keeping it in a limited amount of memory, and at any time observe the state of the stored items. The other is the secretary setting, in which we must decide 1In the original definition of stochastic utility functions [19], the objective value depends not only on the partial realization ψ, but also on the realization ϕ. However, given such f : 2V × YV →R≥0, we can redefine ˜f : 2V ×Y →R≥0 as ˜f(ψA) = EΦ[f(A, Φ) | Φ ∼p(Φ|ψA)], and it does not critically change the overall discussion in our problem settings. Thus for notational convenience, we use the simpler definition. 2In this paper, “stream-based setting” and “stream setting” are distinguished. 2 v1 v2 v3 v4 v5 v6 v7 +1 −1 +1 −1 +1 −1 (a) A policy tree for the pool-based setting v1 v2 v3 v4 v5 v6 v7 v1 v2 v3 v4 v5 v6 v7 t +1 −1 +1 −1 +1 −1 (b) A policy tree for the stream-based setting Figure 1: Examples of a pool-based policy and a stream-based policy in the case of Y = {+1, −1}. (a) A pool-based policy can select items in an arbitrary order. (b) A stream-based policy must select items under memory or timing constraints taking account of only items that arrived so far. immediately whether or not to select an item at each arrival. In both settings we assume the items arrive in a random order. The comparison of policies for the pool-based and stream-based settings is indicated in Figure 1. 2.2 Budgeted Stream-based Active Learning We consider a problem setting called Bayesian active learning. Here V represents the set of instances, Y1, · · · , Yn the initially unknown labels of the instances, and Y the set of possible labels. Let H denote the set of candidates for the randomly generated true hypothesis H, and pH denote a prior probability over H. When observations of the labels are noiseless, every hypothesis h ∈H represents a particular realization, i.e., h corresponds to some ϕ ∈YV . When observations are noisy, the probability distribution P[Y1, · · · , Yn|H = h] of the labels is not necessarily deterministic for each h ∈H. In both cases, we can iteratively select an instance and query its label to the annotation oracle. The objective is to determine the true hypothesis or one whose prediction error is small. Both the pool-based and stream-based settings have been extensively studied. The stream-based setting contains the stream and secretary settings, both of which have a lot of real world applications. A common approach for devising a pool-based algorithm is designing some utility function that represents the informativeness of a set of labeled instances, and greedily selecting the instance maximizing this utility in terms of the expected value. We introduce the utility into stream-based active learning, and aim to collect k labeled instances of high utility where k ∈Z>0 is the budget on the number of queries. While most of the theoretical results for stream-based active learning are obtained assuming the data stream is infinite, we assume the length of the total data stream is given in advance. 2.3 Other Applications We give a brief sketch of two examples that can be formalized as the adaptive stochastic maximization problem in the secretary setting. Both are variations for streaming data of the problems first proposed by Golovin and Krause [19]. One is adaptive viral marketing whose aim is spreading information about a new product through social networks. In this problem we adaptively select k people to whom a free promotional sample of the product is offered so as to let them recommend the product to their friends. We cannot know if he recommends the product before actually offering a sample to each. The objective is maximizing the number of people that information of the product reaches. There arise some situations where people come sequentially, and at each arrival we must decide whether or not to offer a sample to them. Another is adaptive sensor placement. We want to adaptively place k unreliable sensors to cover the information obtained by them. The informativeness of each sensor is unknown before its deploy3 ment. We can consider the cases where the timing of placing sensors at each location is restricted for some reasons such as transportation cost. 3 Policy-Adaptive Submodularity In this section, we discuss conditions satisfied by the utility functions of adaptive stochastic maximization problems. Submodularity [17] is known as a natural diminishing return condition satisfied by various set functions appearing in a lot of applications, and adaptive submodularity was proposed by Golovin and Krause [19] as an adaptive extension of submodularity. Adaptive submodularity is defined as the diminishing return property about the expected marginal gain of a single item, i.e., ∆(s|ψA) ≥ ∆(s|ψB) for any partial realization ψA ⊆ψB and item s ∈V \ B, where ∆(s|ψ) = EΦ[f(ψ ∪{(s, Φ(s))}) −f(ψ) | Φ ∼p(Φ|ψ)]. Similarly, adaptive monotonicity, an adaptive analog of monotonicity, is defined to be ∆(s|ψA) ≥0 for any partial realization ψA and item s ∈V . It is known that many utility functions used in the above applications satisfy the adaptive submodularity and the adaptive monotonicity. In the poolbased setting, greedily selecting the item of the maximal expected marginal gain yields (1 −1/e)approximation if the objective function is adaptive submodular and adaptive monotone [19]. Here we propose a new class of stochastic utility functions, policy-adaptive submodular functions. Let range(π) denote the set containing all items that π selects for some ϕ, and we define policyadaptive submodularity as the diminishing return property about the expected marginal gain of any policy as follows. Definition 3.1 (Policy-adaptive submodularity). A set function f : 2V ×Y →R≥0 is policy-adaptive submodular with respect to a prior distribution p(ϕ), or (f, p) is policy-adaptive submodular, if ∆(π|ψA) ≥∆(π|ψB) holds for any partial realization ψA, ψB and policy π such that ψA ⊆ψB and range(π) ⊆V \ B, where ∆(π|ψ) = EΦ[f(ψ ∪ψ(π, Φ)) −f(ψ) | Φ ∼p(Φ|ψ)]. Since a single item can be regarded as a policy selecting only one item, policy-adaptive submodularity is a stricter condition than adaptive submodularity. Policy-adaptive submodularity is also a natural extension of submodularity. The submodularity of a set function f : 2V →R≥0 is defined as the condition that f(A∪{s})−f(A) ≥f(B∪{s})−f(B) for any A ⊆B ⊆V and s ∈V \ B, which is equivalent to the condition that f(A ∪P) −f(A) ≥ f(B ∪P) −f(B) for any A ⊆B ⊆V and P ⊆V \ B. Adaptive extensions of these conditions are adaptive submodularity and policy-adaptive submodularity respectively. Nevertheless there is a counterexample to the equivalence of adaptive submodularity and policy-adaptive submodularity, which is given in the supplementary materials. Surprisingly, many existing adaptive submodular functions in applications also satisfy the policyadaptive submodularity. In active learning, the objective function of generalized binary search [12, 19], EC2 [20], ALuMA [21], and the maximum Gibbs error criterion [9, 8] are not only adaptive submodular, but policy-adaptive submodular. In other applications including influence maximization and sensor placements, it is often assumed that the variables Y1, · · · , Yn are independent, and the policy-adaptive submodularity always holds in this case. The proofs of these propositions are given in the supplementary materials. To give the theoretical guarantees for the algorithms introduced in the next section, we assume not only the adaptive submodularity and the adaptive monotonicity, but also the policy-adaptive submodularity. However, our theoretical analyses can still be applied to many applications. 4 Algorithms In this section we describe our proposed algorithms for each of the stream and secretary settings, and state the theoretical guarantees on their performance. The full versions of pseudocodes are given in the supplementary materials. 4 Algorithm 1 AdaptiveStream algorithm & AdaptiveSecretary algorithm Input: A set function f : 2V ×Y →R≥0 and a prior distribution p(ϕ) such that (f, p) is policyadaptive submodular and adaptive monotone. The number of items in the entire stream n ∈Z>0. A budget k ∈Z>0. Randomly permuted stream of the items, denoted by (s1, · · · , sn). Output: Some observations ψk ⊆V × Y such that |ψk| ≤k. 1: Let ψ0 := ∅. 2: for each segment Sl = {si | (l −1)n/k < i ≤ln/k} do 3: Select an item s out of Sl by {selecting the item of the largest expected marginal gain (AdaptiveStream) applying the classical secretary algorithm (AdaptiveSecretary) 4: Observe the state y of item s and let ψl := ψl−1 ∪{(s, y)}. 5: return ψk as the solution 4.1 Algorithm for the Stream Setting The main idea of our proposed method is simple: divide the entire stream into k segments and select the best item from each one. For simplicity, we consider the case where n is a multiple integer of k. If n is not, we can add k⌈n k ⌉−n dummy items with no benefit and prove the same guarantee. Our algorithm first divides the item sequence s1, · · · , sn into Sl = {si | (l −1)n/k < i ≤ln/k} for l = 1, · · · , k. In each segment, the algorithm selects the item of the largest expected marginal gain, that is, argmax{∆(s|ψl−1) | s ∈Sl} where ψl−1 is the partial realization obtained before the lth segment. This can be implemented with only O(1) space by storing only the item of the maximal expected marginal gain so far in the current segment. We provide the theoretical guarantee on the performance of this algorithm by utilizing the policy-adaptive submodularity of the objective function. Theorem 4.1. Suppose f : 2V ×Y →R≥0 is policy-adaptive submodular and adaptive monotone w.r.t. a prior p(ϕ). Assume the items come sequentially in a random order. For any policy π such that |ψ(π, ϕ)| ≤k holds for all ϕ, AdaptiveStream selects k items using O(1) space and achieves at least 0.16 times the expected total gain of π in expectation. 4.2 Algorithm for the Secretary Setting Though our proposed algorithm for the secretary setting is similar in its approach to the one for the stream setting, it is impossible to select the item of the maximal expected marginal gain from each segment in the secretary setting. Then we use classical secretary algorithm [13] as a subroutine to obtain the maximal item at least with some constant probability. The classical secretary algorithm lets the first ⌊n/(ek)⌋items pass and then selects the first item whose value is larger than all items so far. The probability that this subroutine selects the item of the largest expected marginal gain is at least 1/e at each segment. This algorithm can be viewed as an adaptive version of the algorithm for the monotone submodular secretary problem [3]. We give the guarantee similar to the one for the stream setting. Theorem 4.2. Suppose f : 2V ×Y →R≥0 is policy-adaptive submodular and adaptive monotone w.r.t. a prior p(ϕ). Assume the items come sequentially in a random order. For any policy π such that |ψ(π, ϕ)| ≤k holds for all ϕ, AdaptiveSecretary selects at most k items and achieves at least 0.08 times the expected total gain of π in expectation. 5 Overview of Theoretical Analysis In this section we briefly describe the proofs of Theorem 4.1 and 4.2, and compare our techniques with the previous work. The full proofs are given in the supplementary materials. The methods used in the proofs of both theorems are almost the same. They consist of two steps: in the first step, we bound the expected marginal gain of each item and in the second step, we take summation of one step marginal gains and derive the overall bound for the algorithms. Though our techniques used in the second step are taken from the previous work [3], the first step contains several novel techniques. 5 Let ∆i be the expected marginal gain of an item picked from the ith segment Si. First we bound it from below with the difference between the optimal pool-based policy π∗ T for selecting k items from T and the policy πσ i−1 that encodes the algorithm until i −1th step under a permutation σ in which the items arrive. For the non-adaptive setting, the items in the optimal set are distributed among the segments uniformly at random, then we can evaluate ∆i by considering whether Si contains an item included in the optimal set [3]. On the other hand, in the adaptive setting, it is difficult to consider how π∗ T is distributed in the unarrived items because the policy is closely related not only to the contained items but also to the order of items. Then we compare ∆i and the marginal gain of π∗ T directly. With the adaptive monotonicity, we obtain ∆i ≥(1 −exp(− k k−i+1))(favg(π∗ T ) − favg(πσ i−1))/k where favg(π) = EΦ[f(ψ(π, Φ))]. Next we bound favg(π∗ T ) with the optimal pool-based policy π∗ V that selects k items from V . For the non-adaptive setting, we can apply a widely-used lemma proved by Feige, Mirrokni, and Vondrák [15]. This lemma provides a bound for the expected value of a randomly deleted subset. To extend this lemma to the adaptive setting, we define a partially deleted policy tree, grafted policy, and prove the adaptive version of the lemma with the policy-adaptive submodularity. From this lemma we can obtain the bound Eσ[favg(π∗ T )] ≥(k −i + 1)favg(π∗ V )/k. We also provide an example that shows adaptive submodularity is not enough to prove this lemma. Summing the bounds for each one-step expected marginal gain until lth step (l is specified in the full proof for optimizing the resulting guarantees), we can conclude that our proposed algorithms achieve some constant factor approximation in comparison to the optimal pool-based policy. Though AdaptiveSecretary is the adaptive version of the existing algorithm, our resulting constant factor is a little worse than the original (1 −1/e)/7 due to the above new analyses. 6 Experiments 6.1 Experimental Setting We conducted experiments on budgeted active learning in the following three settings: the poolbased, stream, and secretary settings. For each setting, we compare two methods: one is based on the policy-adaptive submodularity and the other is based on uncertainty sampling as baselines. Uncertainty sampling is the most widely-used approach in applications. Selecting random instances, which we call random, is also implemented as another baseline that can be used in every setting. We select ALuMA [21] out of several pool-based methods based on adaptive submodularity, and convert it to the stream and secretary settings with AdaptiveStream and AdaptiveSecretary, which we call stream submodular and secretary submodular respectively. For comparison, we also implement the original pool-based method, which we call pool submodular. Though ALuMA is designed for the noiseless case, there is a modification method that makes its hypotheses sampling more noise-tolerant [7], which we employ. The number of hypotheses sampled at each time is set N = 1000 in all settings. For the pool-based setting, uncertainty sampling is widely-known as a generic and easy-toimplement heuristic in many applications. This selects the most uncertain instance, i.e., the instance that is closest to the current linear separator. In contrast, there is no standard heuristic for the stream and secretary settings. We apply the same conversion to the pool-based uncertain sampling method as AdaptiveStream and AdaptiveSecretary, i.e., in the stream setting, selecting the most uncertain instance from the segment at each step, and in the secretary setting, running the classical secretary algorithm to select the most uncertain instance at least with probability 1/e. A similar one to this approach in the stream setting is used in some applications [26]. In every setting, we first randomly select 10 instances for the initial training of a classifier and after that, select k −10 instances with each method. We use the linear SVM trained with instances labeled so far to judge the uncertainty. We call these methods pool uncertainty, stream uncertainty, secretary uncertainty respectively, and use them as baselines. We conducted experiments on two benchmark datasets, WDBC3 and MNIST4. The WDBC dataset contains 569 instances, each of which consists of 32-dimensional features of cells and their diagnosis 3https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic) 4http://yann.lecun.com/exdb/mnist/ 6 k = 30 k = 40 k = 50 Budget on the number of queries 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 Error rate (a) WDBC dataset, error 10 15 20 25 30 35 40 45 50 Number of labels obtained 0.00 0.02 0.04 0.06 0.08 0.10 0.12 Error rate (c) WDBC dataset, convergence k = 30 k = 40 k = 50 Budget on the number of queries 0.000 0.005 0.010 0.015 0.020 0.025 0.030 Error rate (b) MNIST dataset, error 10 15 20 25 30 35 40 45 50 Number of labels obtained 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 Error rate (d) MNIST dataset, convergence random pool uncertainty pool submodular stream uncertainty stream submodular secretary uncertainty secretary submodular random pool uncertainty pool submodular stream uncertainty stream submodular secretary uncertainty secretary submodular Figure 2: Experimental results results. From the MNIST dataset, the dataset of handwritten digits, we extract 14780 images of the two classes, 0 and 1, so as to consider the binary classification problem, and apply PCA to reduce its dimensions from 784 to 10. We standardize both datasets so that the values of each feature have zero mean and unit variance. We evaluate the performance through 100 trials, where at each time an order in which the instances arrive is generated randomly. For all the methods, we calculate the error rate by training linear SVM with the obtained labeled instances and testing with the entire dataset. 6.2 Experimental Results Figure 2(a)(b) illustrate the average error rate achieved by each method with budget k = 30, 40, 50. Our methods stream submodular and secretary submodular outperform not only random, but also stream uncertainty and secretary uncertainty respectively, i.e., the methods based on policyadaptive submodularity perform better than the methods based on uncertainty sampling in each of the stream and secretary settings. Moreover, we can observe our methods are stabler than the other methods from the error bars representing the standard deviation. Figure 2(c)(d) show how the error rate decreases as labels are queried in the case of k = 50. In both datasets, we can observe the performance of stream submodular is competitive with pool submodular. 7 Related Work Stream-based active learning. Much amount of work has been dedicated to devising algorithms for stream-based active learning (also known as selective sampling) from both the theoretical and practical aspects. From the theoretical aspects, several bounds on the label complexity have been provided [16, 2, 4], but their interest lies in the guarantees compared to the passive learning, not the optimal algorithm. From the practical aspects, it has been applied to many real world problems such as sentiment analysis of web stream data [26], spam filtering [25], part-of-speech tagging [10], and video surveillance [23], but there is no definitive widely-used heuristic. 7 Of particular relevance to our work is the one presented by Sabato and Hess [24]. They devised general methods for constructing stream-based algorithms satisfying a budget based on pool-based algorithms, but their theoretical guarantees are bounding the length of the stream needed to emulate the pool-based algorithm, which is a large difference from our work. Das et al. [11] designed the algorithm for adaptively collecting water samples, referring to the submodular secretary problem, but they focused on applications to marine ecosystem monitoring, and did not give any theoretical analysis about its performance. Adaptive submodular maximization. The framework of adaptive submodularity, which is an adaptive counterpart of submodularity, is established by Golovin and Krause [19]. It provides the simple greedy algorithm with the near-optimal guarantees in several adaptive real world problems. Specifically it achieves remarkable success in pool-based active learning. For the noiseless cases, Golovin and Krause [19] described the generalized binary search algorithm [12] as the greedy algorithm for some adaptive submodular function, and improved its approximation factor. Golovin et al. [20] provided an algorithm for Bayesian active learning with noisy observations by reducing it to the equivalence class determination problem. On the other hand, there have been several studies on adaptive submodular maximization in other settings, for example, selecting multiple instances at the same time before observing their states [7], guessing an unknown prior distribution in the bandit setting [18], and maximizing non-monotone adaptive submodular functions [22]. Submodular maximization in the stream and secretary settings. Submodular maximization in the stream setting, called streaming submodular maximization, has been studied under several constraints. Badanidiyuru et al. [1] provided a (1/2 −ϵ)-approximation algorithm that can be executed in O(k log k) space for the cardinality constraint. For more general constraints including matching and multiple matroids constraints, Chakrabarti and Kale [5] proposed constant factor approximation algorithms. Chekuri et al. [6] devised algorithms for non-monotone submodular functions. On the other hand, much effort is also devoted to submodular maximization in the secretary setting, called submodular secretary problem, under various constraints. Bateni et al. [3] specified the problem first and provided algorithms for both monotone and non-monotone submodular secretary problems under several constraints, one of which our methods are based on. Feldman et al. [14] improved constant factors of the theoretical guarantees for monotone cases. 8 Concluding Remarks In this paper, we investigated stream-based active learning with a budget constraint in the view of adaptive submodular maximization. To tackle this problem, we introduced the adaptive stochastic maximization problem in the stream and secretary settings, which can formalize stream-based active learning. We provided a new class of objective functions, policy-adaptive submodular functions, and showed this class contains many utility functions that have been used in pool-based active learning and other applications. AdaptiveStream and AdaptiveSecretary, which we proposed in this paper, are simple algorithms guaranteed to be constant factor competitive with the optimal pool-based policy. We empirically demonstrated their performance by applying our algorithms to the budgeted stream-based active learning problem, and our experimental results indicate their effectiveness compared to the existing methods. There are two natural directions for future work. One is exploring the possibility of the concept, policy-adaptive submodularity. By studying the nature of this class, we can probably yield theoretical insight for other problems. Another is further developing the practical aspects of our results. In real world problems sometimes it happens that the items arrive not in a random order. For example, in sequential adaptive sensor placement [11], an order of items is restricted to some transportation constraint. In this setting our guarantees do not hold and another algorithm is needed. In contrast to the non-adaptive setting, even in the stream setting, it seems much more difficult to design a constant factor approximation algorithm because the full information of each item is totally revealed when its state is observed and memory is not so powerful as in the non-adaptive setting. Acknowledgments The second author is supported by Grant-in-Aid for Scientific Research on Innovative Areas, Exploration of nanostructure-property relationships for materials innovation. 8 References [1] A. Badanidiyuru, B. Mirzasoleiman, A. Karbasi, and A. Krause. Streaming submodular maximization: Massive data summarization on the fly. Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pp. 671–680, 2014. [2] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. Proceedings of the 23rd International Conference on Machine Learning (ICML), pp. 65–72, 2006. [3] M. Bateni, M. Hajiaghayi, and M. Zadimoghaddam. Submodular secretary problem and extensions. ACM Transactions on Algorithms (TALG), 9(4):32, 2013. [4] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance-weighted active learning. Proceedings of the 26th International Conference on Machine Learning (ICML), pp. 49–56, 2009. [5] A. Chakrabarti and S. Kale. Submodular maximization meets streaming: Matchings, matroids, and more. Mathematical Programming Series B, 154(1), pp. 225–247, 2015. [6] C. Chekuri, S. Gupta, and K. Quanrud. Streaming algorithms for submodular function maximization. Automata, Languages, and Programming (ICALP), pp. 318–330, 2015. [7] Y. Chen and A. Krause. Near-optimal batch mode active learning and adaptive submodular optimization. Proceedings of the 30th International Conference on Machine Learning (ICML), pp. 160–168, 2013. [8] N. V. Cuong, W. S. Lee, and N. Ye. Near-optimal adaptive pool-based active learning with general loss. Uncertainty in Artificial Intelligence (UAI), 2014. [9] N. V. Cuong, W. S. Lee, N. Ye, K. M. A. Chai, and H. L. Chieu. Active learning for probabilistic hypotheses using the maximum Gibbs error criterion. Advances in Neural Information Processing Systems (NIPS), pp. 1457–1465, 2013. [10] I. Dagan and S. Engelson. Committee-based sampling for training probabilistic classifiers. Proceedings of the 12th International Conference on Machine Learning (ICML), pp. 150–157, 1995. [11] J. Das, F. Py, J. B. J. Harvey, J. P. Ryan, A. Gellene, R. Graham, D. A. Caron, K. Rajan, and G. S. Sukhatme. Data-driven robotic sampling for marine ecosystem monitoring. The International Journal of Robotics Research, 34(12), pp. 1435–1452, 2015. [12] S. Dasgupta. Analysis of a greedy active learning strategy. Advances in Neural Information Processing Systems (NIPS), pp. 337–344, 2004. [13] E. B. Dynkin. The optimum choice of the instant for stopping a Markov process. Soviet Math. Dokl, 4, pp. 627–629, 1963. [14] M. Feldman, J. S. Naor, and R. Schwartz. Improved competitive ratios for submodular secretary problems. Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX-RANDOM), pp. 218–229, 2011. [15] U. Feige, V. Mirrokni, and J. Vondrák. Maximizing non-monotone submodular functions. SIAM Journal on Computing, 40(4), pp. 1133–1153, 2011. [16] Y. Freund, H. S. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28, pp. 133–168, 1997. [17] S. Fujishige. Submodular Functions and Optimization, Second Edition. Annals of Discrete Mathematics, Vol. 58, Elsevier, 2005. [18] V. Gabillon, B. Kveton, Z. Wen, B. Eriksson, and S. Muthukrishnan. Adaptive submodular maximization in bandit setting. Advances in Neural Information Processing Systems (NIPS), pp. 2697–2705, 2013. [19] D. Golovin and A. Krause. Adaptive submodularity: Theory and applications in active learning and stochastic optimization. Journal of Artificial Intelligence Research (JAIR), 42, pp. 427–486, 2011. [20] D. Golovin, A. Krause, and D. Ray. Near-optimal Bayesian active learning with noisy observations. Advances in Neural Information Processing Systems (NIPS), pp. 766–774, 2010. [21] A. Gonen, S. Sabato, and S. Shalev-Shwartz. Efficient active learning of halfspaces: An aggressive approach. The Journal of Machine Learning Research (JMLR), 14(1), pp. 2583–2615, 2013. [22] A. Gotovos, A. Karbasi, and A. Krause. Non-monotone adaptive submodular maximization. Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI), pp. 1996–2003, 2015. [23] C. C. Loy, T. M. Hospedales, T. Xiang, and S. Gong. Stream-based joint exploration-exploitation active learning. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. [24] S. Sabato and T. Hess. Interactive algorithms: From pool to stream. In Proceedings of the 29th Annual Conference on Learning Theory (COLT), pp. 1419–1439, 2016. [25] D. Sculley. Online active learning methods for fast label-efficient spam filtering. Proceedings of Fourth Conference on Email and Anti-Spam (CEAS), 2007. [26] J. Smailovi´c, M. Grˇcar, N. Lavraˇc, and M. Žnidaršiˇc. Stream-based active learning for sentiment analysis in the financial domain. Information Sciences, 285, pp. 181–203, 2014. 9 | 2016 | 22 |
6,128 | Bayesian Optimization with a Finite Budget: An Approximate Dynamic Programming Approach Remi R. Lam Massachusetts Institute of Technology Cambridge, MA rlam@mit.edu Karen E. Willcox Massachusetts Institute of Technology Cambridge, MA kwillcox@mit.edu David H. Wolpert Santa Fe Institute Santa Fe, NM dhw@santafe.edu Abstract We consider the problem of optimizing an expensive objective function when a finite budget of total evaluations is prescribed. In that context, the optimal solution strategy for Bayesian optimization can be formulated as a dynamic programming instance. This results in a complex problem with uncountable, dimension-increasing state space and an uncountable control space. We show how to approximate the solution of this dynamic programming problem using rollout, and propose rollout heuristics specifically designed for the Bayesian optimization setting. We present numerical experiments showing that the resulting algorithm for optimization with a finite budget outperforms several popular Bayesian optimization algorithms. 1 Introduction Optimizing an objective function is a central component of many algorithms in machine learning and engineering. It is also essential to many scientific models, concerning everything from human behavior, to protein folding, to population biology. Often, the objective function to optimize is non-convex and does not have a known closed-form expression. In addition, the evaluation of this function can be expensive, involving a time-consuming computation (e.g., training a neural network, numerically solving a set of partial differential equations, etc.) or a costly experiment (e.g., drilling a borehole, administering a treatment, etc.). Accordingly, there is often a finite budget specifying the maximum number of evaluations of the objective function allowed to perform the optimization. Bayesian optimization (BO) has become a popular optimization technique for solving problems governed by such expensive objective functions [17, 9, 2]. BO iteratively updates a statistical model and uses it as a surrogate for the objective function. At each iteration, this statistical model is used to select the next design to evaluate. Most BO algorithms are greedy, ignoring how the design selected at a given iteration will affect the future steps of the optimization. Thus, the decisions made are typically one-step optimal. Because of this shortsightedness, such algorithms balance, in a greedy fashion, the BO exploration-exploitation trade-off: evaluating designs to improve the statistical model or to find the optimizer of the objective function. In contrast to greedy algorithms, a lookahead approach is aware of the remaining evaluations and can balance the exploration-exploitation trade-off in a principled way. A lookahead approach builds an optimal strategy that maximizes a long-term reward over several steps. That optimal strategy is the solution of a challenging dynamic programming (DP) problem whose complexity stems, in part, from 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the increasing dimensionality of the involved spaces as the budget increases, and from the presence of nested maximizations and expectations. This is especially challenging when the design space takes an uncountable set of values. The first contribution of this paper is to use rollout [1], an approximate dynamic programming (ADP) algorithm to circumvent the nested maximizations of the DP formulation. This leads to a problem significantly simpler to solve. Rollout uses suboptimal heuristics to guide the simulation of optimization scenarios over several steps. Those simulations allow us to quantify the long-term benefits of evaluating a given design. The heuristics used by rollout are typically problem-dependent. The second contribution of this paper is to build heuristics adapted to BO with a finite budget that leverage existing greedy BO strategies. As demonstrated with numerical experiments, this can lead to improvements in performance. The following section of this paper provides a brief description of Gaussian processes and their use in Bayesian optimization (Sec. 2), followed by a brief overview of dynamic programming (Sec. 3). Sec. 4 develops the connection between BO and DP and discusses some of the related work. We then propose to employ the rollout algorithm (with heuristics adapted to BO) to mitigate the complexity of the DP algorithm (Sec. 5). In Sec. 6, we numerically investigate the proposed algorithm and present our conclusions in Sec. 7. 2 Bayesian Optimization We consider the following optimization problem: (OP) x∗= argminx∈X f(x), (1) where x is a d-dimensional vector of design variables. The design space, X, is a bounded subset of Rd, and f : X 7→R is an objective function that is expensive to evaluate. We are interested in finding a minimizer x∗of the objective function using a finite budget of N function evaluations. We refer to this problem as the original problem (OP). In the Bayesian optimization (BO) setting, the (deterministic or noisy) objective function f is modeled as a realization of a stochastic process, typically a Gaussian process (GP) G, on a probability space (Ω, Σ, P), which defines a prior distribution over functions. A GP is fully defined by a mean function m : X →R (often set to zero without loss of generality) and a covariance kernel κ : X 2 →R (see [16] for an overview of GP): f ∼G(m, κ). (2) The BO algorithm starts with an initial design x1 and its associated value y1 = f(x1) provided by the user. This defines the first training set S1 = {(x1, y1)}. At each iteration k ∈{1, · · · , N}, the GP prior is updated, using Bayes rule, to obtain posterior distributions conditioned on the current training set Sk = {(xi, yi)}k i=1 containing the past evaluated designs and observations. For any (potentially non-evaluated) design x ∈X, the posterior mean µk(x) and posterior variance σ2 k(x) of the GP, conditioned on Sk, are known in closed-form and are considered cheap to evaluate: µk(x) = K(Xk, x)⊤[K(Xk, Xk) + λI]−1Yk, (3) σ2 k(x) = κ(x, x) −K(Xk, x)⊤[K(Xk, Xk) + λI]−1K(Xk, x), (4) where K(Xk, Xk) is the k × k matrix whose ijth entry is κ(xi, xj), K(Xk, x) (respectively Yk) is the k × 1 vector whose ith entry is κ(xi, x) (respectively yi), and λ is the noise variance. A new design xk+1 is then selected and evaluated with this objective function to provide an observation yk+1 = f(xk+1). This new pair (xk+1, yk+1) is added to the current training set Sk to define the training set for the next iteration Sk+1 = Sk ∪{(xk+1, yk+1)}. In BO, the next design to evaluate is selected by solving an auxiliary problem (AP), typically of the form: (AP) xk+1 = argmaxx∈X Uk(x; Sk), (5) where Uk is a utility function to maximize. The rationale is that, because the optimization run-time or cost is dominated by the evaluation of the expensive function f, time and effort should be dedicated to choosing a good and informative (in a sense defined by the auxiliary problem) design to evaluate. 2 Solving this auxiliary problem (sometimes called maximization of an acquisition or utility function) does not involve the evaluation of the expensive objective function f, but only the posterior quantities of the GP and, thus, is considered cheap. Examples of utility functions, Uk, used to select the next design to evaluate in Bayesian optimization include maximizing the probability of improvement (PI) [12], maximizing the expected improvement (EI) in the efficient global optimization (EGO) algorithm [10], minimizing a linear combination µ−ασ of the posterior mean µ and standard deviation σ in GP upper confidence bound (GP-UCB) [18], or maximizing a metric quantifying the information gain [19, 6, 7]. However, the aforementioned utility functions are oblivious to the number of objective function evaluations left and, thus, lead to greedy optimization strategies. Devising methods that account for the remaining budget would allow to better plan the sequence of designs to evaluate, balance in a principled way the exploration-exploitation trade-off encountered in BO, and thus potentially lead to performance gains. 3 Dynamic Programming In this section, we review some of the key features of dynamic programming (DP) which addresses optimal decision making under uncertainty for dynamical systems. BO with a finite budget can be seen as such a problem. It has the following characteristics: (1) a statistical model to represent the objective function, (2) a system dynamic that describes how this statistical model is updated as new information is collected, and (3) a goal that can be quantified with a long-term reward. DP provides us with a mathematical formulation to address this class of problem. A full overview of DP can be found in [1, 15]. We consider a system governed by a discrete-stage dynamic. At each stage k, the system is fully characterized by a state zk ∈Zk. A control uk, from a control space Uk(zk), that generally depends on the state, is applied. Given a state zk and a control uk, a random disturbance wk ∈Wk(zk, uk) occurs, characterized by a random variable Wk with probability distribution P(·|zk, uk). Then, the system evolves to a new state zk+1 ∈Zk+1, according to the system dynamic. This can be written in the following form: ∀k ∈{1, · · · , N}, ∀(zk, uk, wk) ∈Zk × Uk × Wk, zk+1 = Fk(zk, uk, wk), (6) where z1 is an initial state, N is the total number of stages, or horizon, and Fk : Zk × Uk × Wk 7→ Zk+1 is the dynamic of the system at stage k (where the spaces’ dependencies are dropped for ease of notation). We seek the construction of an optimal policy (optimal in a sense yet to define). A policy, π = {π1, · · · , πN}, is sequence of rules, πk : Zk 7→Uk, for k = 1, · · · , N, mapping a state zk to a control uk = πk(zk). At each stage k, a stage-reward function rk : Zk × Uk × Wk 7→R, quantifies the benefits of applying a control uk to a state zk, subject to a disturbance wk. A final reward function rN+1 : ZN+1 7→R, similarly quantifies the benefits of ending at a state zN+1. Thus, the expected reward starting from state z1 and using policy π is: Jπ(z1) = E " rN+1(zN+1) + N X k=1 rk(zk, πk(zk), wk) # , (7) where the expectation is taken with respect to the disturbances. An optimal policy, π∗, is a policy that maximizes this (long-term) expected reward over the set of admissible policies Π: J∗(z1) = Jπ∗(z1) = max π∈Π Jπ(z1), (8) where J∗is the optimal reward function, also called optimal value function. Using Bellman’s principle of optimality, the optimal reward is given by a nested formulation and can be computed using the following DP recursive algorithm, working backward from k = N to k = 1: JN+1(zN+1) = rN+1(zN+1), (9) Jk(zk) = max uk∈Uk E[rk(zk, uk, wk) + Jk+1(Fk(zk, uk, wk))]. (10) The optimal reward J∗(z1) is then given by J1(z1), and if u∗ k = π∗ k(zk) maximizes the right hand side of Eq. 10 for all k and all zk, then the policy π∗= {π∗ 1, · · · , π∗ N} is optimal (e.g., [1], p.23). 3 4 Bayesian Optimization with a Finite Budget In this section, we define the auxiliary problem of BO with a finite budget (Eq. 5) as a DP instance. At each iteration k, we seek to evaluate the design that will lead, once the evaluation budget N has been consumed, to the maximum reduction of the objective function. In general, the value of the objective function f(x) at a design x is unknown before its evaluation and, thus, estimating the long-term effect of an evaluation is not possible. However, using the GP representing f, it is possible to characterize the unknown f(x) by a distribution. This can be used to simulate sequences of designs and function values (i.e., optimization scenarios), compute their rewards and associated probabilities, without evaluating f. Using this simulation machinery, it is possible to capture the goal of achieving a long term reward in a utility function Uk. We now formulate the simulation of optimization scenarios in the DP context and proceed with the definition of such utility function Uk. We consider that the process of optimization is a dynamical system. At each iteration k, this system is fully characterized by a state zk equal to the training set Sk. The system is actioned by a control uk equal to the design xk+1 selected to be evaluated. For a given state and control, the value of the objective function is unknown and modeled as a random variable Wk, characterized by: Wk ∼N µk(xk+1), σ2 k(xk+1) , (11) where µk(xk+1) and σ2 k(xk+1) are the posterior mean and variance of the GP at xk+1, conditioned on Sk. We define a disturbance wk to be equal to a realization fk+1 of Wk. Thus, wk = fk+1 represents a possible (simulated) value of the objective function at xk+1. Note that this simulated value of the objective function, fk+1, is not the value of the objective function yk+1 = f(xk+1). Hence, we have the following identities: Zk = (X × R)k, Uk = X and Wk = R. The new state zk+1 is then defined to be the augmented training set Sk+1 = Sk ∪{(xk+1, fk+1)}, and the system dynamic can be written as: Sk+1 = Fk(Sk, xk+1, fk+1) = Sk ∪{(xk+1, fk+1)}. (12) The disturbances wk+1 at iteration k + 1 are then characterized, using Bayes’ rule, by the posterior of the GP conditioned on the training set Sk+1. To optimally control this system (i.e., to use an optimal strategy to solve OP), we define the stagereward function at iteration k to be the reduction in the objective function obtained at stage k: rk(Sk, xk+1, fk+1) = max n 0, f Sk min −fk+1 o , (13) where f Sk min is the minimum value of the objective function in the training set Sk. We define the final reward to be zero: rN+1(SN+1) = 0. The utility function, at a given iteration k characterized by Sk, is defined to be the expected reward: ∀xk+1 ∈X, Uk(xk+1; Sk) = E[rk(Sk, xk+1, fk+1) + Jk+1(Fk(Sk, xk+1, fk+1))], (14) where the expectation is taken with respect to the disturbances, and Jk+1 is defined by Eqs. 9-10. Note that E[rk(Sk, xk+1, fk+1)] is simply the expected improvement given, for all x ∈X, by: EI(x; Sk) = f Sk min −µk (x) Φ f Sk min −µk (x) σk (x) ! + σk(x)φ f Sk min −µk (x) σk (x) ! , (15) where Φ is the standard Gaussian CDF and φ is the standard Gaussian PDF. In other words, the GP is used to simulate possible scenarios, and the next design to evaluate is chosen to maximize the decrease of the objective function, over the remaining iterations, averaged over all possible simulated scenarios. Several related methods have been proposed to go beyond greedy BO strategies. Optimal formulations for BO with a finite budget have been explored in [14, 4]. Both formulations involve nested maximizations and expectations. Those authors note that their N-steps lookahead methods scale poorly with the number of steps considered (i.e., the budget N); they are able to solve the problem for two-steps lookahead. For some specific instances of BO (e.g., finding the super-level set of a one-dimensional function), the optimal multi-step strategy can be computed efficiently [3]. Approximation techniques accounting for more steps have been recently proposed. They leverage partial 4 tree exploration [13] or Lipschitz reward function [11] and have been applied to cases where the control spaces Uk are finite (e.g., at each iteration, uk is one of the 4 or 8 directions that a robot can take to move before it evaluates f). Theoretical performance guarantees are provided for the algorithm proposed in [11]. Another approximation technique for non-greedy BO has been proposed in GLASSES [5] and is applicable to uncountable control space Uk. It builds an approximation of the N-steps lookahead formulation by using a one-step lookahead algorithm with approximation of the value function Jk+1. The approximate value function is induced by a heuristic oracle based on a batch Bayesian optimization method. The oracle is used to select up to 15 steps at once to approximate the value function. In this paper, we propose to use rollout, an ADP algorithm, to address the intractability of the DP formulation. The proposed approach is not restricted to countable control spaces, and accounts for more than two steps. This is achieved by approximating the value function Jk+1 with simulations over several steps, where the information acquired at each simulated step is explicitly used to simulate the next step. Note that this is a closed-loop approach, in comparison to GLASSES [5] which is an open-loop approach. In contrast to the DP formulation, the decision made at each simulated step of the rollout is not optimal, but guided by problem-dependent heuristics. In this paper we propose the use of heuristics adapted to BO, leveraging existing greedy BO strategies. 5 Rollout for Bayesian Optimization Solving the auxiliary problem defined by Eqs. 5,14 is challenging. It requires the solution of nested maximizations and expectations for which there is no closed-form expression known. In finite spaces, the DP algorithm already suffers from the curse of dimensionality. In this particular setting, the state spaces Zk = (X × R)k are uncountable and their dimension increases by d + 1 at each stage. The control spaces Uk = X are also uncountable, but of fixed dimension. Thus, solving Eq. 5 with utility function defined by Eq. 14 is intractable. To simplify the problem, we use ADP to approximate Uk with the rollout algorithm (see [1, 15] for an overview). It is a one-step lookahead technique where Jk+1 is approximated using simulations over several future steps. The difference with the DP formulation is that, in those simulated future steps, rollout relaxes the requirement to optimally select a design (which is the origin of the nested maximizations). Instead, rollout uses a suboptimal heuristic to decide which control to apply for a given state. This suboptimal heuristic is problem-dependent and, in the context of BO with a finite budget, we propose to use existing greedy BO algorithms as such a heuristic. Our algorithm proceeds as follows. For any iteration k, the optimal reward to go, Jk+1 (Eq. 14), is approximated by Hk+1, the reward to go induced by a heuristic π = (π1, · · · , πN), also called base policy. Hk+1 is recursively given by: HN(SN) = EI(πN(SN); SN), (16) Hn(Sn) = E [rn(Sn, πn(Sn), fn+1) + γHn+1(F(Sn, πn(Sn), fn+1))] , (17) for all n ∈{k +1, · · · , N −1}, where γ ∈[0, 1] is a discount factor incentivizing the early collection of reward. A discount factor γ = 0, leads to a greedy strategy that maximizes the immediate collection of reward. This corresponds to maximizing the EI. On the other hand, γ = 1, means that there is no differentiation between collecting reward early or late in the optimization. Note that Hk+1 is defined by recursion, and involves nested expectations. However, the nested maximizations are replaced by the use of the base policy π. An important point is that, even if its definition is recursive, Hk+1 can be computed in a forward manner, unlike Jk+1 which has to be computed in a backward fashion (see Eqs. 9,10). The DP and the rollout formulations are illustrated in Fig.1. The approximated reward Hk+1 is then numerically approximated by eHk+1 using several simplifications. First, we use a rolling horizon, h, to alleviate the curse of dimensionality. At a given iteration k, a rolling horizon limits the number of stages considered to compute the approximate reward to go by replacing the horizon N by ˜N = min{k + h, N}. Second, expectations are taken with respect to the (Gaussian) disturbances and are approximated using Gauss-Hermite quadrature. We obtain the following formulation: ˜H ˜ N(S ˜ N) = EI(π ˜ N(S ˜ N); S ˜ N), (18) eHn(Sn) = Nq X q=1 α(q) h rn Sn, πn(Sn), f (q) n+1 + γ eHn+1 F Sn, πn(Sn), f (q) n+1 i , (19) 5 Sk xk+1 fk+1 Sk+1 xk+2 fk+2 Sk+2 ... SN · · · Sk xk+1 fk+1 Sk+1 πk+1(Sk+1) fk+2 Sk+2 ... SN · · · Figure 1: Graphs representing the DP (left) and the rollout (right) formulations (in the binary decisions, binary disturbances case). Each white circle represents a training set, each black circle represents a training set and a design. Double arrows are decisions that depend on decisions lower in the graph (leading to nested optimizations in the DP formulation), single arrows represent decisions made using a heuristic (independent of the lower part of the graph). Dashed lines are simulated values of the objective function and lead to the computation of expectations. Note the simpler structure of the rollout graph compared to the DP one. for all n ∈{k + 1, · · · , ˜N −1}, where Nq ∈N is the number of quadrature weights α(q) ∈R and points f (q) k+1 ∈R, and rk is the stage-reward defined by Eq. 13. Finally, for all iterations k ∈{1, · · · , N −1} and for all xk+1 ∈X, we define the utility function to be: Uk(xk+1; Sk) = Nq X q=1 α(q) h rk Sk, xk+1, f (q) k+1 + γ eHk+1 F Sk, xk+1, f (q) k+1 i . (20) We note that for the last iteration, k = N, the utility function is known in closed form: UN(xN+1; SN) = EI(xN+1; SN). (21) The base policy π used as a heuristic in the rollout is problem-dependent. A good heuristic π should be cheap to compute and induce an expected reward Jπ close to the optimal expected reward Jπ∗ (Eq. 7). In the context of BO with a finite budget, this heuristic should mimic an optimal strategy that balances the exploration-exploitation trade-off. We propose to use existing BO strategies, in particular, maximization of the expected improvement (which has an exploratory behavior) and minimization of the posterior mean (which has an exploitation behavior) to build the base policy. For every iteration k ∈{1, · · · , N −1}, we define π = {πk+1, · · · , π ˜ N} such that, at stage n ∈{k + 1, ˜N −1}, the policy component, πn : Zn 7→X, maps a state zn = Sn to the design xn+1 that maximizes the expected improvement (Eq. 15): xn+1 = argmax x∈X EI(x; Sn). (22) The last policy component, π ˜ N : Z ˜ N 7→X, is defined to map a state z ˜ N = S ˜ N to the design x ˜ N+1 that minimizes the posterior mean (Eq. 3): x ˜ N+1 = argmin x∈X µ ˜ N(x). (23) Each evaluation of the utility function requires O N h q applications of a heuristic. In our approach, the heuristic involves optimizing a quantity that requires O |Sk|2 of work (rank-1 update of the Cholesky decomposition to update the GP, and back-substitution for the posterior variance). To summarize, we propose to use rollout, a one-step lookahead algorithm that approximates Jk+1. This approximation is computed using simulation over several steps (e.g., more than 3 steps), where the information collected after a simulated step is explicitly used to simulate the next step (i.e., it is a closed-loop approach). This is achieved using a heuristic instead of the optimal strategy, and thus, leads to a formulation without nested maximizations. 6 6 Experiments and Discussion In this section, we apply the proposed algorithm to several optimization problems with a finite budget and demonstrate its performance on GP generated and classic test functions. We use a zero-mean GP with square-exponential kernel (hyper-parameters: maximum variance σ2 = 4, length scale L = 0.1, noise variance λ = 10−3) to generate 24 objective functions defined on X = [0, 1]2. We generate 10 designs from a uniform distribution on X, and use them as 10 different initial guesses for optimization. Thus, for each optimization, the initial training set S1 contains one training point. All algorithms are given a budget of N = 15 evaluations. For each of the initial guess and each objective function, we run the BO algorithm with the following utility functions: PI, EI and GP-UCB (with the parameter balancing exploration and exploitation set to α = 3). We also run the rollout algorithm proposed in Sec. 5 and defined by Eqs. 5,20, for the same objective functions and with the same initial guesses for different parameters of the rolling horizon h ∈{2, 3, 4, 5} and discount factor γ ∈{0.5, 0.7, 0.9, 1.0}. All algorithms use the same kernel and hyper-parameters as those used to generate the objective functions. Given a limited evaluation budget, we evaluate the performance of an algorithm for the original problem (Eq. 1) in terms of gap G [8]. The gap measures the best decrease in objective function from the first to the last iteration, normalized by the maximum reduction possible: G = f S1 min −f SN+1 min f S1 min −f(x∗) . (24) The mean and the median performances of the rollout algorithm are computed for the 240 experiments for the 16 configurations of discount factors and rolling horizons. The results are reported in Table 1. Table 1: Mean (left) and median (right) performance G over 24 objective functions and 10 initial guesses for different rolling horizons h and discount factors γ. γ h = 2 h = 3 h = 4 h = 5 0.5 0.790 0.811 0.799 0.817 0.7 0.787 0.786 0.787 0.836 0.9 0.816 0.767 0.827 0.828 1.0 0.818 0.793 0.842 0.812 γ h = 2 h = 3 h = 4 h = 5 0.5 0.849 0.862 0.858 0.856 0.7 0.849 0.830 0.806 0.878 0.9 0.896 0.839 0.876 0.850 1.0 0.870 0.861 0.917 0.858 The mean gap achieved is G = 0.698 for PI, G = 0.762 for EI and G = 0.711 for GP-UCB. All the configurations of the rollout algorithm outperform the three greedy BO algorithms. The best performance is achieved by the configuration γ = 1.0 and h = 4. For this configuration, the performance increase with respect to EI is about 8%. The worst mean configuration (γ = 0.9 and h = 3) still outperforms EI by 0.5%. The median performance achieved is G = 0.738 for PI, G = 0.777 for EI and G = 0.770 for GP-UCB. All the configurations of the rollout algorithm outperform the three greedy BO algorithms. The best performance is achieved by the configuration γ = 1.0 and h = 4 (same as best mean performance). For this configuration, the performance increase with respect to EI is about 14%. The worst rollout configuration (γ = 0.7 and h = 4) still outperforms EI by 2.9%. The complete distribution of gaps achieved by the greedy BO algorithms and the best and worst configurations of the rollout is shown in Fig. 2. We notice that increasing the length of the rolling horizon does not necessarily increase the gap (see Table 1). This is a classic result from DP (Sec. 6.5.1 of [1]). We also notice that discounting the future rewards has no clear effect on the gap. For all discount factors tested, we notice that reward is not only collected at the last stage (See Fig. 2). This is a desirable property. Indeed, in a case where the optimization has to be stopped before the end of the budget is reached, one would wish to have collected part of the reward. We now evaluate the performance on test functions.1 We consider four rollout configurations R-4-9 (h = 4, γ = 0.9), R-4-10 (h = 4, γ = 1.0), R-5-9 (h = 5, γ = 0.9) and R-5-10 (h = 5, γ = 1.0) 1Test functions from http://www.sfu.ca/~ssurjano/optimization.html. 7 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 G 0 20 40 60 80 100 120 140 Realizations Rollout (Best) Rollout (Worst) EI UCB PI 0 2 4 6 8 10 12 14 Iteration k 0.0 0.2 0.4 0.6 0.8 1.0 G Rollout (Best) Rollout (Worst) EI UCB PI Figure 2: Left: Histogram of gap for the rollout (best and worst mean configurations tested) and greedy BO algorithms. Right: Median gap of the rollout (for the best and worst mean configurations tested) and other algorithms as a function of iteration (budget of N = 15). and two additional BO algorithms: PES [7] and the non-greedy GLASSES [5]. We use a squareexponential kernel for each algorithm (hyper-parameters: maximum variance σ2 = 4, noise variance λ = 10−3, length scale L set to 10% of the design space length scale). We generate 40 designs from a uniform distribution on X, and use them as 40 different initial guesses for optimization. Each algorithm is given N = 15 evaluations. The mean and median gap (over the 40 initial guesses) for each function define 8 metrics (shown in Table 2). We found that rollout had the best metric 3 times out of 8, and was never the worst algorithm. PES was found to perform best on 3 metrics out of 8 but was the worst algorithm for 2 metrics out of 8. GLASSES was never the best algorithm and performed the worst in one metric. Note that the rollout configuration R-4-9 outperforms GLASSES on 5 metrics out of 6 (excluding the case of the Griewank function). Thus, our rollout algorithm performs well and shows robustness. Table 2: Mean and median gap G over 40 initial guesses. Function name PI EI UCB PES GLASSES R-4-9 R-4-10 R-5-9 R-5-10 Branin-Hoo Mean 0.847 0.818 0.848 0.861 0.846 0.904 0.898 0.887 0.903 Median 0.922 0.909 0.910 0.983 0.909 0.959 0.943 0.921 0.950 Goldstein-Price Mean 0.873 0.866 0.733 0.819 0.782 0.895 0.784 0.861 0.743 Median 0.983 0.981 0.899 0.987 0.919 0.991 0.985 0.989 0.928 Griewank Mean 0.827 0.884 0.913 0.972 12 0.882 0.885 0.930 0.867 Median 0.904 0.953 0.970 0.987 12 0.967 0.962 0.960 0.954 Six-hump Camel Mean 0.850 0.887 0.817 0.664 0.776 0.860 0.825 0.793 0.803 Median 0.893 0.970 0.915 0.801 0.941 0.926 0.900 0.941 0.907 7 Conclusions We presented a novel algorithm to perform Bayesian optimization with a finite budget of evaluations. The next design to evaluate is chosen to maximize a utility function that quantifies long-term rewards. We propose to employ an approximate dynamic programming algorithm, rollout, to approximate this utility function. Rollout leverages heuristics to circumvent the need for nested maximizations. We propose to build such a heuristic using existing suboptimal Bayesian optimization strategies, in particular maximization of the expected improvement and minimization of the posterior mean. The proposed approximate dynamic programming algorithm is empirically shown to outperform popular greedy and non-greedy Bayesian optimization algorithms on multiple test cases. This work was supported in part by the AFOSR MURI on multi-information sources of multi-physics systems under Award Number FA9550-15-1-0038, program manager Dr. Jean-Luc Cambier. 2This gap G = 1 results from an arbitrary choice made by one optimizer used by GLASSES to evaluate the origin. The origin happens to be the minimizer of the Griewank function. We thus exclude those results from the analysis. 8 References [1] D. P. Bertsekas. Dynamic programming and optimal control, volume 1. Athena Scientific, 1995. [2] E. Brochu, V. M. Cora, and N. De Freitas. A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv preprint arXiv:1012.2599, 2010. [3] J. M. Cashore, L. Kumarga, and P. I. Frazier. Multi-step Bayesian optimization for one-dimensional feasibility determination. Working paper. Retrieved from https://people.orie.cornell.edu/pfrazier/pub/workingpaper-CashoreKumargaFrazier.pdf. [4] D. Ginsbourger and R. Le Riche. Towards Gaussian process-based optimization with finite time horizon. In mODa 9–Advances in Model-Oriented Design and Analysis, pages 89–96. Springer, 2010. [5] J. González, M. Osborne, and N. D. Lawrence. GLASSES: Relieving the myopia of Bayesian optimisation. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 790–799, 2016. [6] P. Hennig and C. J. Schuler. Entropy search for information-efficient global optimization. The Journal of Machine Learning Research, 13(1):1809–1837, 2012. [7] 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. [8] D. Huang, T. T. Allen, W. I. Notz, and N. Zeng. Global optimization of stochastic black-box systems via sequential kriging meta-models. Journal of Global Optimization, 34(3):441–466, 2006. [9] D. R. Jones. A taxonomy of global optimization methods based on response surfaces. Journal of Global Optimization, 21(4):345–383, 2001. [10] D. R. Jones, M. Schonlau, and W. J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global Optimization, 13(4):455–492, 1998. [11] C. K. Ling, K. H. Low, and P. Jaillet. Gaussian process planning with lipschitz continuous reward functions: Towards unifying bayesian optimization, active learning, and beyond. In 30th AAAI Conference on Artificial Intelligence, 2016. [12] D. J. Lizotte. Practical Bayesian Optimization. PhD thesis, Edmonton, Alta., Canada, 2008. AAINR46365. [13] R. Marchant, F. Ramos, and S. Sanner. Sequential Bayesian optimisation for spatial-temporal monitoring. 2015. [14] M. A. Osborne, R. Garnett, and S. J. Roberts. Gaussian processes for global optimization. In 3rd International Conference on Learning and Intelligent Optimization (LION3), pages 1–15, 2009. [15] W. B. Powell. Approximate Dynamic Programming: Solving the Curses of Dimensionality, volume 842. John Wiley & Sons, 2011. [16] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, Cambridge, MA, 2006. [17] 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. [18] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In Proceedings of the 27th International Conference on Machine Learning, pages 1015–1022, 2010. [19] 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. 9 | 2016 | 220 |
6,129 | Gaussian Process Bandit Optimisation with Multi-fidelity Evaluations Kirthevasan Kandasamy ♮, Gautam Dasarathy ♦, Junier Oliva ♮, Jeff Schneider ♮, Barnabás Póczos ♮ ♮Carnegie Mellon University, ♦Rice University {kandasamy, joliva, schneide, bapoczos}@cs.cmu.edu, gautamd@rice.edu Abstract In many scientific and engineering applications, we are tasked with the optimisation of an expensive to evaluate black box function f. Traditional methods for this problem assume just the availability of this single function. However, in many cases, cheap approximations to f may be obtainable. For example, the expensive real world behaviour of a robot can be approximated by a cheap computer simulation. We can use these approximations to eliminate low function value regions cheaply and use the expensive evaluations of f in a small but promising region and speedily identify the optimum. We formalise this task as a multi-fidelity bandit problem where the target function and its approximations are sampled from a Gaussian process. We develop MF-GP-UCB, a novel method based on upper confidence bound techniques. In our theoretical analysis we demonstrate that it exhibits precisely the above behaviour, and achieves better regret than strategies which ignore multi-fidelity information. MF-GP-UCB outperforms such naive strategies and other multi-fidelity methods on several synthetic and real experiments. 1 Introduction In stochastic bandit optimisation, we wish to optimise a payoff function f : X →R by sequentially querying it and obtaining bandit feedback, i.e. when we query at any x ∈X, we observe a possibly noisy evaluation of f(x). f is typically expensive and the goal is to identify its maximum while keeping the number of queries as low as possible. Some applications are hyper-parameter tuning in expensive machine learning algorithms, optimal policy search in complex systems, and scientific experiments [20, 23, 27]. Historically, bandit problems were studied in settings where the goal is to maximise the cumulative reward of all queries to the payoff instead of just finding the maximum. Applications in this setting include clinical trials and online advertising. Conventional methods in these settings assume access to only this single expensive function of interest f. We will collectively refer to them as single fidelity methods. In many practical problems however, cheap approximations to f might be available. For instance, when tuning hyper-parameters of learning algorithms, the goal is to maximise a cross validation (CV) score on a training set, which can be expensive if the training set is large. However CV curves tend to vary smoothly with training set size; therefore, we can train and cross validate on small subsets to approximate the CV accuracies of the entire dataset. For a concrete example, consider kernel density estimation (KDE), where we need to tune the bandwidth h of a kernel. Figure 1 shows the CV likelihood against h for a dataset of size n = 3000 and a smaller subset of size n = 300. The two maximisers are different, which is to be expected since optimal hyper-parameters are functions of the training set size. That said, the curve for n = 300 approximates the n = 3000 curve quite well. Since training/CV on small n is cheap, we can use it to eliminate bad values of the hyper-parameters and reserve the expensive experiments with the entire dataset for the promising candidates (e.g. boxed region in Fig. 1). In online advertising, the goal is to maximise the cumulative number of clicks over a given period. In the conventional bandit treatment, each query to f is the display of an ad for a specific time, say one 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. hour. However, we may display ads for shorter intervals, say a few minutes, to approximate its hourly performance. The estimate is biased, as displaying an ad for a longer interval changes user behaviour, but will nonetheless be useful in gauging its long run click through rate. In optimal policy search in robotics and automated driving vastly cheaper computer simulations are used to approximate the expensive real world performance of the system. Scientific experiments can be approximated to varying degrees using less expensive data collection, analysis, and computational techniques. In this paper, we cast these tasks as multi-fidelity bandit optimisation problems assuming the availability of cheap approximate functions (fidelities) to the payoff f. Our contributions are: 1. We present a formalism for multi-fidelity bandit optimisation using Gaussian Process (GP) assumptions on f and its approximations. We develop a novel algorithm, Multi-Fidelity Gaussian Process Upper Confidence Bound (MF-GP-UCB) for this setting. 2. Our theoretical analysis proves that MF-GP-UCB explores the space at lower fidelities and uses the high fidelities in successively smaller regions to zero in on the optimum. As lower fidelity queries are cheaper, MF-GP-UCB has better regret than single fidelity strategies. 3. Empirically, we demonstrate that MF-GP-UCB outperforms single fidelity methods on a series of synthetic examples, three hyper-parameter tuning tasks and one inference problem in Astrophysics. Our matlab implementation and experiments are available at github.com/kirthevasank/mf-gp-ucb. Related Work: Since the seminal work by Robbins [25], the multi-armed bandit problem has been studied extensively in the K-armed setting. Recently, there has been a surge of interest in the optimism under uncertainty principle for K armed bandits, typified by upper confidence bound (UCB) methods [2, 4]. UCB strategies have also been used in bandit tasks with linear [6] and GP [28] payoffs. There is a plethora of work on single fidelity methods for global optimisation both with noisy and noiseless evaluations. Some examples are branch and bound techniques such as dividing rectangles (DiRect) [12], simulated annealing, genetic algorithms and more [17, 18, 22]. A suite of single fidelity methods in the GP framework closely related to our work is Bayesian Optimisation (BO). While there are several techniques for BO [13, 21, 30], of particular interest to us is the Gaussian process upper confidence bound (GP-UCB) algorithm of Srinivas et al. [28]. Many applied domains of research such as aerodynamics, industrial design and hyper-parameter tuning have studied multi-fidelity methods [9, 11, 19, 29]; a plurality of them use BO techniques. However none of these treatments neither formalise nor analyse any notion of regret in the multifidelity setting. In contrast, MF-GP-UCB is an intuitive UCB idea with good theoretical properties. Some literature have analysed multi-fidelity methods in specific contexts such as hyper-parameter tuning, active learning and reinforcement learning [1, 5, 26, 33]. Their settings and assumptions are substantially different from ours. Critically, none of them are in the more difficult bandit setting where there is a price for exploration. Due to space constraints we discuss them in detail in Appendix A.3. The multi-fidelity poses substantially new theoretical and algorithmic challenges. We build on GPUCB and our recent work on multi-fidelity bandits in the K-armed setting [16]. Section 2 presents our formalism including a notion of regret for multi-fidelity GP bandits. Section 3 presents our algorithm. The theoretical analysis is in Appendix C with a synopsis for the 2-fidelity case in Section 4. Section 6 presents our experiments. Appendix A.1 tabulates the notation used in the manuscript. 2 Preliminaries We wish to maximise a payoff function f : X →R where X ≡[0, r]d. We can interact with f only by querying at some x ∈X and obtaining a noisy observation y = f(x)+ϵ. Let x⋆∈argmaxx∈X f(x) and f⋆= f(x⋆). Let xt ∈X be the point queried at time t. The goal of a bandit strategy is to maximise the sum of rewards Pn t=1 f(xt) or equivalently minimise the cumulative regret Pn t=1 f⋆−f(xt) after n queries; i.e. we compete against an oracle which queries at x⋆at all t. Our primary distinction from the classical setting is that we have access to M −1 successively accurate approximations f (1), f (2), . . . , f (M−1) to the payoff f = f (M). We refer to these approximations as fidelities. We encode the fact that fidelity m approximates fidelity M via the assumption, ∥f (M) − f (m)∥∞≤ζ(m), where ζ(1) > ζ(2) > · · · > ζ(M) = 0. Each query at fidelity m expends a cost λ(m) of a resource, e.g. computational effort or advertising time, where λ(1) < λ(2) < · · · < λ(M). A strategy for multi-fidelity bandits is a sequence of query-fidelity pairs {(xt, mt)}t≥0, where 2 n=300 n=3000 x ϕt f Figure 1: Left: Average CV log likelihood on datasets of size 300, 3000 on a synthetic KDE task. The crosses are the maxima. Right: Illustration of GP-UCB at time t. The figure shows f(x) (solid black line), the UCB ϕt(x) (dashed blue line) and queries until t −1 (black crosses). We query at xt = argmaxx∈X ϕt(x) (red star). (xn, mn) could depend on the previous query-observation-fidelity tuples {(xt, yt, mt)}n−1 t=1 . Here yt = f (mt)(xt) + ϵ. After n steps we will have queried any of the M fidelities multiple times. Some smoothness assumptions on f (m)’s are needed to make the problem tractable. A standard in the Bayesian nonparametric literature is to use a Gaussian process (GP) prior [24] with covariance kernel κ. In this work we focus on the squared exponential (SE) κσ,h and the Matérn κν,h kernels as they are popularly used in practice and their theoretical properties are well studied. Writing z = ∥x −x′∥2, they are defined as κσ,h(x, x′) = σ exp −z2/(2h2) , κν,h(x, x′) = 21−ν Γ(ν) √ 2νz h ν Bν √ 2νz h , where Γ, Bν are the Gamma and modified Bessel functions. A convenience the GP framework offers is that posterior distributions are analytically tractable. If f ∼GP(0, κ), and we have observations Dn = {(xi, yi)}n i=1, where yi = f(xi) + ϵ and ϵ ∼N(0, η2) is Gaussian noise, the posterior distribution for f(x)|Dn is also Gaussian N(µn(x), σ2 n(x)) with µn(x) = k⊤∆−1Y, σ2 n(x) = κ(x, x) −k⊤∆−1k. (1) Here, Y ∈Rn with Yi = yi, k ∈Rn with ki = κ(x, xi) and ∆= K + η2I ∈Rn×n where Ki,j = κ(xi, xj). In keeping with the above, we make the following assumptions on our problem. Assumption 1. A1: The functions at all fidelities are sampled from GPs, f (m) ∼GP(0, κ) for all m = 1, . . . , M. A2: ∥f (M) −f (m)∥∞≤ζ(m) for all m = 1, . . . , M. A3: ∥f (M)∥∞≤B. The purpose of A3 is primarily to define the regret. In Remark 7, Appendix A.4 we argue that these assumptions are probabilistically valid, i.e. the latter two events occur with nontrivial probability when we sample the f (m)’s from a GP. So a generative mechanism would keep sampling the functions and deliver them when the conditions hold true. A point x ∈X can be queried at any of the M fidelities. When we query at fidelity m, we observe y = f (m)(x) + ϵ where ϵ ∼N(0, η2). We now present our notion of cumulative regret R(Λ) after spending capital Λ of a resource in the multi-fidelity setting. R(Λ) should reduce to the conventional definition of regret for any single fidelity strategy that queries only at M th fidelity. As only the optimum of f = f (M) is of interest to us, queries at fidelities less than M should yield the lowest possible reward, (−B) according to A3. Accordingly, we set the instantaneous reward qt at time to be −B if mt ̸= M and f (M)(xt) if mt = M. If we let rt = f⋆−qt denote the instantaneous regret, we have rt = f⋆+ B if mt ̸= M and f⋆−f(xt) if mt = M. R(Λ) should also factor in the costs of the fidelity of each query. Finally, we should also receive (−B) reward for any unused capital. Accordingly, we define R(Λ) as, R(Λ) = Λf⋆− " N X t=1 λ(mt)qt + Λ − N X t=1 λ(mt) (−B) # ≤ 2BΛres + N X t=1 λ(mt)rt, (2) where Λres = Λ −PN t=1 λ(mt). Here, N is the (random) number of queries at all fidelities within capital Λ, i.e. the largest n such that Pn t=1 λ(mt) ≤Λ. According to (2) above, we wish to compete against an oracle that uses all its capital Λ to query x⋆at the M th fidelity. R(Λ) is at best 0 when we follow the oracle and at most 2ΛB. Our goal is a strategy that has small regret for all values of (sufficiently large) Λ, i.e. the equivalent of an anytime strategy, as opposed to a fixed time horizon strategy in the usual bandit setting. For the purpose of optimisation, we also define the simple regret as S(Λ) = mint rt = f⋆−maxt qt. S(Λ) is the difference between f⋆and the best highest fidelity query (and f⋆+ B if we have never queried at fidelity M). Since S(Λ) ≤1 ΛR(Λ), any strategy with asymptotic sublinear regret limΛ→∞1 ΛR(Λ) = 0, also has vanishing simple regret. Since, to our knowledge, this is the first attempt to formalise regret for multi-fidelity problems, the definition for R(Λ) (2) necessitates justification. Consider a two fidelity robot gold mining problem 3 where the second fidelity is a real world robot trial, costing λ(2) dollars and the first fidelity is a computer simulation costing λ(1). A multi-fidelity algorithm queries the simulator to learn about the real world. But it does not collect any actual gold during a simulation; hence no reward, which according to our assumptions is −B. Meantime the oracle is investing this capital on the best experiment and collecting ∼f⋆gold. Therefore, the regret at this time instant is f⋆+ B. However we weight this by the cost to account for the fact that the simulation costs only λ(1). Note that lower fidelities use up capital but yield the lowest reward. The goal however, is to leverage information from these cheap queries to query prudently at the highest fidelity and obtain better regret. That said, other multi-fidelity settings might require different definitions for R(Λ). In online advertising, the lower fidelities (displaying ads for shorter periods) would still yield rewards. In clinical trials, the regret at the highest fidelity due to a bad treatment would be, say, a dead patient. However, a bad treatment on a simulation may not warrant large penalty. We use the definition in (2) because it is more aligned with our optimisation experiments: lower fidelities are useful to the extent that they guide search on the expensive f (M), but there is no reward to finding the optimum of a cheap f (m). A crucial challenge for a multi-fidelity method is to not get stuck at the optimum of a lower fidelity, which is typically suboptimal for f (M). While exploiting information from the lower fidelities, it is also important to explore sufficiently at f (M). In our experiments we demonstrate that naive strategies which do not do so would get stuck at the optimum of a lower fidelity. A note on GP-UCB: Sequential optimisation methods adopting UCB principles maintain a high probability upper bound ϕt : X →R for f(x) for all x ∈X [2]. For GP-UCB, ϕt takes the form ϕt(x) = µt−1(x) + β1/2 t σt−1(x) where µt−1, σt−1 are the posterior mean and standard deviation of the GP conditioned on the previous t −1 queries. The key intuition is that the mean µt−1 encourages an exploitative strategy – in that we want to query where we know the function is high – and the confidence band β1/2 t σt−1 encourages an explorative strategy – in that we want to query at regions we are uncertain about f lest we miss out on high valued regions. We have illustrated GP-UCB in Fig 1 and reviewed the algorithm and its theoretical properties in Appendix A.2. 3 MF-GP-UCB The proposed algorithm, MF-GP-UCB, will also maintain a UCB for f (M) obtained via the previous queries at all fidelities. Denote the posterior GP mean and standard deviation of f (m) conditioned only on the previous queries at fidelity m by µ(m) t , σ(m) t respectively (See (1)). Then define, ϕ(m) t (x) = µ(m) t−1(x) + β1/2 t σ(m) t−1(x) + ζ(m), ∀m, ϕt(x) = min m=1,...,M ϕ(m) t (x). (3) For appropriately chosen βt, µ(m) t−1(x)+β1/2 t σ(m) t−1(x) will upper bound f (m)(x) with high probability. By A2, ϕ(m) t (x) upper bounds f (M)(x) for all m. We have M such upper bounds, and their minimum ϕt(x) gives the best bound. Our next query is at the maximiser of this UCB, xt = argmaxx∈X ϕt(x). Next we need to decide which fidelity to query at. Consider any m < M. The ζ(m) conditions on f (m) constrain the value of f (M) – the confidence band β1/2 t σ(m) t−1 for f (m) is lengthened by ζ(m) to obtain confidence on f (M). If β1/2 t σ(m) t−1(xt) for f (m) is large, it means that we have not constrained f (m) sufficiently well at xt and should query at the mth fidelity. On the other hand, querying indefinitely in the same region to reduce β1/2 t σ(m) t−1 in that region will not help us much as the ζ(m) elongation caps off how much we can learn about f (M) from f (m); i.e. even if we knew f (m) perfectly, we will only have constrained f (M) to within a ±ζ(m) band. Our algorithm captures this simple intuition. Having selected xt, we begin by checking at the first fidelity. If β1/2 t σ(1) t−1(xt) is smaller than a threshold γ(1), we proceed to the second fidelity. If at any stage β1/2 t σ(m) t−1(xt) ≥γ(m) we query at fidelity mt = m. If we proceed all the way to fidelity M, we query at mt = M. We will discuss choices for γ(m) shortly. We summarise the resulting procedure in Algorithm 1. Fig 2 illustrates MF-GP-UCB on a 2–fidelity problem. Initially, MF-GP-UCB is mostly exploring X in the first fidelity. β1/2 t σ(1) t−1 is large and we are yet to constrain f (1) well to proceed to f (2). By t = 14, we have constrained f (1) around the optimum and have started querying at f (2) in this region. 4 Algorithm 1 MF-GP-UCB Inputs: kernel κ, bounds {ζ(m)}M m=1, thresholds {γ(m)}M m=1. • For m = 1, . . . , M: D(m) 0 ←∅, (µ(m) 0 , σ(m) 0 ) ←(0, κ1/2). • for t = 1, 2, . . . 1. xt ←argmaxx∈X ϕt(x). (See Equation (3)) 2. mt = minm{ m |β1/2 t σ(m) t−1(xt) ≥γ(m) or m = M}. (See Appendix B, C for βt) 3. yt ←Query f (mt) at xt. 4. Update D(mt) t ←D(mt) t−1 ∪{(xt, yt)}. Obtain µ(mt) t , σ(mt) t conditioned on D(mt) t (See (1)). x⋆ xt t = 6 ϕ(1) t ϕ(2) t ϕt f (1) f (2) x⋆ xt t = 14 f (1) f (2) β1/2 t σ(1) t−1(x) γ(1) mt = 1 γ(1) mt = 2 Figure 2: Illustration of MF-GP-UCB for a 2-fidelity problem initialised with 5 random points at the first fidelity. In the top figures, the solid lines in brown and blue are f (1), f (2) respectively, and the dashed lines are ϕ(1) t , ϕ(2) t . The solid green line is ϕt = min(ϕ(1) t , ϕ(2) t ). The small crosses are queries from 1 to t −1 and the red star is the maximiser of ϕt, i.e. the next query xt. x⋆, the optimum of f (2) is shown in magenta. In the bottom figures, the solid orange line is β1/2 t σ(1) t−1 and the dashed black line is γ(1). When β1/2 t σ(1) t−1(xt) ≤γ(1) we play at fidelity mt = 2 and otherwise at mt = 1. See Fig. 6 in Appendix B for an extended simulation. Notice how ϕ(2) t dips to change ϕt in this region. MF-GP-UCB has identified the maximum with just 3 queries to f (2). In Appendix B we provide an extended simulation and discuss further insights. Finally, we make an essential observation. The posterior for any f (m)(x) conditioned on previous queries at all fidelities is not Gaussian due to the ζ(m) constraints (A2). However, |f (m)(x) − µ(m) t−1(x)| < β1/2 t σ(m) t−1(x) holds with high probability, since, by conditioning only on queries at the mth fidelity we have Gaussianity for f (m)(x). Next we summarise our main theoretical contributions. 4 Summary of Theoretical Results For pedagogical reasons we present our results for the M = 2 case. Appendix C contains statements and proofs for general M. We also ignore constants and polylog terms when they are dominated by other terms. ≲, ≍denote inequality and equality ignoring constants. We begin by defining the Maximum Information Gain (MIG) which characterises the statistical difficulty of GP bandits. Definition 2. (Maximum Information Gain) Let f ∼GP(0, κ). Consider any A ⊂Rd and let eA = {x1, . . . , xn} ⊂A be a finite subset. Let f e A, ϵ e A ∈Rn be such that (f e A)i = f(xi), (ϵ e A)i ∼ N(0, η2), and y e A = f e A + ϵ e A. Let I denote the Shannon Mutual Information. The Maximum Information Gain of A is Ψn(A) = max e A⊂A,| e A|=n I(y e A; f e A). The MIG, which depends on the kernel κ and the set A, is an important quantity in our analysis. For a given κ, it typically scales with the volume of A; i.e. if A = [0, r]d then Ψn(A) ∈O(rdΨn([0, 1]d)). For the SE kernel, Ψn([0, 1]d) ∈O((log(n))d+1) and for Matérn, Ψn([0, 1]d) ∈O(n d(d+1) 2ν+d(d+1) ) [28]. Recall, N is the (random) number of queries by a multi-fidelity strategy within capital Λ at either fidelity. Let nΛ = ⌊Λ/λ(2)⌋be the (non-random) number of queries by a single fidelity method operating only at the second fidelity. As λ(1) < λ(2), N could be large for an arbitrary multi-fidelity method. However, our analysis reveals that for MF-GP-UCB, N is on the order of nΛ. 5 Fundamental to the 2-fidelity problem is the set Xg = {x ∈X; f⋆−f (1)(x) ≤ζ(1)}. Xg is a high valued region for f (2)(x): for all x ∈Xg, f (2)(x) is at most 2ζ(1) away from the optimum. More interestingly, when ζ(1) is small, i.e. when f (1) is a good approximation to f (2), Xg will be much smaller than X. This is precisely the target domain for this research. For instance, in the robot gold mining example, a cheap computer simulator can be used to eliminate several bad policies and we could reserve the real world trials for the promising candidates. If a multifidelity strategy were to use the second fidelity queries only in Xg, then the regret will only have Ψn(Xg) dependence after n high fidelity queries. In contrast, a strategy that only operates at the highest fidelity (e.g. GP-UCB) will have Ψn(X) dependence. In the scenario described above Ψn(Xg) ≪Ψn(X), and the multi-fidelity strategy will have significantly better regret than a single fidelity strategy. MF-GP-UCB roughly achieves this goal. In particular, we consider a slightly inflated set e Xg,ρ = {x ∈X; f⋆−f (1)(x) ≤ζ(1) + ργ(1)}, of Xg where ρ > 0. The following result which characterises the regret of MF-GP-UCB in terms of e Xg,ρ is the main theorem of this paper. Theorem 3 (Regret of MF-GP-UCB – Informal). Let X = [0, r]d and f (1), f (2) ∼GP(0, κ) satisfy Assumption 1. Pick δ ∈(0, 1) and run MF-GP-UCB with βt ≍d log(t/δ). Then, with probability > 1 −δ, for sufficiently large Λ and for all α ∈(0, 1), there exists ρ depending on α such that, R(Λ) ≲λ(2) q nΛβnΛΨnΛ( e Xg,ρ) + λ(1)q nΛβnΛΨnΛ(X) + λ(2)q nα ΛβnΛΨnα Λ(X) + λ(1)ξn, e Xg,ρ,γ(1) As we will explain shortly, the latter two terms are of lower order. It is instructive to compare the above rates against that for GP-UCB (see Theorem 4, Appendix A.2). By dropping the common and subdominant terms, the rate for MF-GP-UCB is λ(2)Ψ1/2 nΛ ( e Xg,ρ) + λ(1)Ψ1/2 nΛ (X) whereas for GP-UCB it is λ(2)Ψ1/2 nΛ (X). When λ(1) ≪λ(2) and vol( e Xg,ρ) ≪vol(X) the rates for MF-GPUCB are very appealing. When the approximation worsens (Xg, e Xg,ρ become larger) and the costs λ(1), λ(2) become comparable, the bound for MF-GP-UCB decays gracefully. In the worst case, MF-GP-UCB is never worse than GP-UCB up to constant terms. Intuitively, the above result states that MF-GP-UCB explores the entire X using f (1) but uses “most” of its queries to f (2) inside e Xg,ρ. Now let us turn to the latter two terms in the bound. The third term is the regret due to the second fidelity queries outside e Xg,ρ. We are able to show that the number of such queries is O(nα Λ) for all α > 0 for an appropriate ρ. This strong result is only possible in the multi-fidelity setting. For example, in GP-UCB the best bound you can achieve on the number of plays on a suboptimal set is O(n1/2 Λ ) for the SE kernel and worse for the Matérn kernel. The last term is due to the first fidelity plays inside e Xg,ρ and it scales with vol( e Xg,ρ) and polylogarithmically with n, both of which are small. However, it has a 1/poly(γ(1)) dependence which could be bad if γ(1) is too small: intuitively, if γ(1) is too small then you will wait for a long time in step 2 of Algorithm 1 for β1/2 t σ(1) t−1 to decrease without proceeding to f (2), incurring large regret (f⋆+ B) in the process. Our analysis reveals that an optimal choice for the SE kernel scales γ(1) ≍(λ(1)ζ(1)/(tλ(2)))1/(d+2) at time t. However this is of little practical use as the leading constant depends on several problem dependent quantities such as Ψn(Xg). In Section 5 we describe a heuristic to set γ(m) which worked well in our experiments. Theorem 3 can be generalised to cases where the kernels κ(m) and observation noises η(m) are different at each fidelity. The changes to the proofs are minimal. In fact, our practical implementation uses different kernels. As with any nonparametric method, our algorithm has exponential dependence on dimension. This can be alleviated by assuming additional structure in the problem [8, 15]. Finally, we note that the above rates translate to bounds on the simple regret S(Λ) for optimisation. 5 Implementation Details Our implementation uses some standard techniques in Bayesian optimisation to learn the kernel such as initialisation with random queries and periodic marginal likelihood maximisation. The above techniques might be already known to a reader familiar with the BO literature. We have elaborated these in Appendix B but now focus on the γ(m), ζ(m) parameters of our method. Algorithm 1 assumes that the ζ(m)’s are given with the problem description, which is hardly the case in practice. In our implementation, instead of having to deal with M −1, ζ(m) values we set (ζ(1), ζ(2), . . . , ζ(M−1)) = ((M −1)ζ, (M −2)ζ, . . . , ζ) so we only have one value ζ. This for 6 Λ 200 400 600 800 1000 S(Λ) 10 0 10 1 10 2 BoreHole-8D, M = 2, Costs = [1; 10] MF-GP-UCB GP-UCB EI DiRect MF-NAIVE MF-SKO Λ 2000 4000 6000 8000 10000 S(Λ) 10 -3 10 -2 10 -1 10 0 Hartmann-3D, M = 3, Costs = [1; 10; 100] 0 0.5 1 1.5 2 2.5 3 3.5 0 5 10 15 20 25 30 35 40 Number of Queries Query frequencies for Hartmann-3D f (3)(x) m=1 m=2 m=3 Figure 3: The simple regret S(Λ) against the spent capital Λ on synthetic functions. The title states the function, its dimensionality, the number of fidelities and the costs we used for each fidelity in the experiment. All curves barring DiRect (which is a deterministic), were produced by averaging over 20 experiments. The error bars indicate one standard error. See Figures 8, 9 10 in Appendix D for more synthetic results. The last panel shows the number of queries at different function values at each fidelity for the Hartmann-3D example. instance, is satisfied if ∥f (m) −f (m−1)∥∞≤ζ which is stronger than Assumption A2. Initially, we start with small ζ. Whenever we query at any fidelity m > 1 we also check the posterior mean of the (m −1)th fidelity. If |f (m)(xt) −µ(m−1) t−1 (xt)| > ζ, we query again at xt, but at the (m −1)th fidelity. If |f (m)(xt) −f (m−1)(xt)| > ζ, we update ζ to twice the violation. To set γ(m)’s we use the following intuition: if the algorithm, is stuck at fidelity m for too long then γ(m) is probably too small. We start with small values for γ(m). If the algorithm does not query above the mth fidelity for more than λ(m+1)/λ(m) iterations, we double γ(m). We found our implementation to be fairly robust even recovering from fairly bad approximations at the lower fidelities (see Appendix D.3). 6 Experiments We compare MF-GP-UCB to the following methods. Single fidelity methods: GP-UCB; EI: the expected improvement criterion for BO [13]; DiRect: the dividing rectangles method [12]. Multifidelity methods: MF-NAIVE: a naive baseline where we use GP-UCB to query at the first fidelity a large number of times and then query at the last fidelity at the points queried at f (1) in decreasing order of f (1)-value; MF-SKO: the multi-fidelity sequential kriging method from [11]. Previous works on multi-fidelity methods (including MF-SKO) had not made their code available and were not straightforward to implement. Hence, we could not compare to all of them. We discuss this more in Appendix D along with some other single and multi-fidelity baselines we tried but excluded in the comparison to avoid clutter in the figures. In addition, we also detail the design choices and hyper-parameters for all methods in Appendix D. Synthetic Examples: We use the Currin exponential (d = 2), Park (d = 4) and Borehole (d = 8) functions in M = 2 fidelity experiments and the Hartmann functions in d = 3 and 6 with M = 3 and 4 fidelities respectively. The first three are taken from previous multi-fidelity literature [32] while we tweaked the Hartmann functions to obtain the lower fidelities for the latter two cases. We show the simple regret S(Λ) against capital Λ for the Borehole and Hartmann-3D functions in Fig. 3 with the rest deferred to Appendix D due to space constraints. MF-GP-UCB outperforms other methods. Appendix D also contains results for the cumulative regret R(Λ) and the formulae for these functions. A common occurrence with MF-NAIVE was that once we started querying at fidelity M, the regret barely decreased. The diagnosis in all cases was the same: it was stuck around the maximum of f (1) which is suboptimal for f (M). This suggests that while we have cheap approximations, the problem is by no means trivial. As explained previously, it is also important to “explore” at the higher fidelities to achieve good regret. The efficacy of MF-GP-UCB when compared to single fidelity methods is that it confines this exploration to a small set containing the optimum. In our experiments we found that MF-SKO did not consistently beat other single fidelity methods. Despite our best efforts to reproduce this (and another) multi-fidelity method, we found them to be quite brittle (Appendix D.1). The third panel of Fig. 3 shows a histogram of the number of queries at each fidelity after 184 queries of MF-GP-UCB, for different ranges of f (3)(x) for the Hartmann-3D function. Many of the queries at the low f (3) values are at fidelity 1, but as we progress they decrease and the second fidelity queries increase. The third fidelity dominates very close to the optimum but is used sparingly elsewhere. This corroborates the prediction in our analysis that MF-GP-UCB uses low fidelities to explore and successively higher fidelities at promising regions to zero in on x⋆. (Also see Fig. 6, Appendix B.) 7 CPU Time (s) 0 2000 4000 6000 8000 CV (Classification) Error 0.115 0.12 0.125 0.13 0.135 0.14 SVM-2D, M = 2, ntr = [500, 2000] MF-GP-UCB GP-UCB EI DiRect MF-NAIVE MF-SKO CPU Time (s) 0 1000 2000 3000 4000 5000 6000 7000 CV (Least Squares) Error 0 0.2 0.4 0.6 0.8 1 SALSA-6D, M = 3, ntr = [2000, 4000, 8000] CPU Time (s) 1000 2000 3000 4000 5000 6000 7000 8000 CV (Classification) Error 0.1 0.15 0.2 0.25 0.3 0.35 V&J-22D, M = 2, ntr = [300, 3000] Figure 4: Results on the hyper-parameter tuning experiments. The title states the experiment, dimensionality (number of hyperparameters) and training set size at each fidelity. All curves were produced by averaging over 10 experiments. The error bars indicate one standard error. The lengths of the curves are different in time as we ran each method for a pre-specified number of iterations and they concluded at different times. Real Experiments: We present results on three hyper-parameter tuning tasks (results in Fig. 4), and a maximum likelihood inference task in Astrophysics (Fig. 5). We compare methods on computation time since that is the “cost” in all experiments. We include the processing time for each method in the comparison (i.e. the cost of determining the next query). Classification using SVMs (SVM): We trained an SVM on the magic gamma dataset using the SMO algorithm to an accuracy of 10−12. The goal is to tune the kernel bandwidth and the soft margin coefficient in the ranges (10−3, 101) and (10−1, 105) respectively on a dataset of size 2000. We set this up as a M = 2 fidelity experiment with the entire training set at the second fidelity and 500 points at the first. Each query was 5-fold cross validation on these training sets. Regression using Additive Kernels (SALSA): We used the regression method from [14] on the 4-dimensional coal power plant dataset. We tuned the 6 hyper-parameters –the regularisation penalty, the kernel scale and the kernel bandwidth for each dimension– each in the range (10−3, 104) using 5-fold cross validation. This experiment used M = 3 and 2000, 4000, 8000 points at each fidelity. Viola & Jones face detection (V&J): The V&J classifier [31], which uses a cascade of weak classifiers, is a popular method for face detection. To classify an image, we pass it through each classifier. If at any point the classifier score falls below a threshold, the image is classified negative. If it passes through the cascade, then it is classified positive. One of the more popular implementations comes with OpenCV and uses a cascade of 22 weak classifiers. The threshold values in OpenCV are pre-set based on some heuristics and there is no reason to think they are optimal for a given face detection task. The goal is to tune these 22 thresholds by optimising for them over a training set. We modified the OpenCV implementation to take in the thresholds as parameters. As our domain X we chose a neighbourhood around the configuration used in OpenCV. We set this up as a M = 2 fidelity experiment where the second fidelity used 3000 images from the V&J face database and the first used 300. Interestingly, on an independent test set, the configurations found by MF-GP-UCB consistently achieved over 90% accuracy while the OpenCV configuration achieved only 87.4% accuracy. CPU Time (s) 500 1000 1500 2000 2500 3000 3500 Log Likelihood -10 -5 0 5 10 Supernova-3D, M = 3, Grid = [100, 10K, 1M] Figure 5: Results on the supernova inference problem. The y-axis is the log likelihood so higher is better. MF-NAIVE is not visible as it performed very poorly. Type Ia Supernovae: We use Type Ia supernovae data [7] for maximum likelihood inference on 3 cosmological parameters, the Hubble constant H0 ∈(60, 80), the dark matter and dark energy fractions ΩM, ΩΛ ∈(0, 1). Unlike typical parametric maximum likelihood problems, the likelihood is only available as a black-box. It is computed using the Robertson–Walker metric which requires a one dimensional numerical integration for each sample in the dataset. We set this up as a M = 3 fidelity task. The goal is to maximise the likelihood at the third fidelity where the integration was performed using the trapezoidal rule on a grid of size 106. For the first and second fidelities, we used grids of size 102, 104 respectively. The results are given in Fig. 5. Conclusion: We introduced and studied the multi-fidelity bandit under Gaussian Process assumptions. We present, to our knowledge, the first formalism of regret and the first theoretical results in this setting. They demonstrate that MF-GP-UCB explores the space via cheap lower fidelities, and leverages the higher fidelities on successively smaller regions hence achieving better regret than single fidelity strategies. Experimental results demonstrate the efficacy of our method. 8 References [1] Alekh Agarwal, John C Duchi, Peter L Bartlett, and Clement Levrard. Oracle inequalities for computationally budgeted model selection. In COLT, 2011. [2] Peter Auer. Using Confidence Bounds for Exploitation-exploration Trade-offs. J. Mach. Learn. Res., 2003. [3] E. Brochu, V. M. Cora, and N. de Freitas. A Tutorial on Bayesian Optimization of Expensive Cost Functions, with Application to Active User Modeling and Hierarchical RL. CoRR, 2010. [4] Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 2012. [5] Mark Cutler, Thomas J. Walsh, and Jonathan P. How. Reinforcement Learning with Multi-Fidelity Simulators. In ICRA, 2014. [6] V. Dani, T. P. P. Hayes, and S. M Kakade. Stochastic Linear Optimization under Bandit Feedback. In COLT, 2008. [7] T. M. Davis et al. Scrutinizing Exotic Cosmological Models Using ESSENCE Supernova Data Combined with Other Cosmological Probes. Astrophysical Journal, 2007. [8] J Djolonga, A Krause, and V Cevher. High-Dimensional Gaussian Process Bandits. In NIPS, 2013. [9] Alexander I. J. Forrester, András Sóbester, and Andy J. Keane. Multi-fidelity optimization via surrogate modelling. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Science, 2007. [10] Subhashis Ghosal and Anindya Roy. Posterior consistency of Gaussian process prior for nonparametric binary regression". Annals of Statistics, 2006. [11] D. Huang, T.T. Allen, W.I. Notz, and R.A. Miller. Sequential kriging optimization using multiple-fidelity evaluations. Structural and Multidisciplinary Optimization, 2006. [12] D. R. Jones, C. D. Perttunen, and B. E. Stuckman. Lipschitzian Optimization Without the Lipschitz Constant. J. Optim. Theory Appl., 1993. [13] Donald R. Jones, Matthias Schonlau, and William J. Welch. Efficient global optimization of expensive black-box functions. J. of Global Optimization, 1998. [14] Kirthevasan Kandasamy and Yaoliang Yu. Additive Approximations in High Dimensional Nonparametric Regression via the SALSA. In ICML, 2016. [15] Kirthevasan Kandasamy, Jeff Schenider, and Barnabás Póczos. High Dimensional Bayesian Optimisation and Bandits via Additive Models. In International Conference on Machine Learning, 2015. [16] Kirthevasan Kandasamy, Gautam Dasarathy, Jeff Schneider, and Barnabas Poczos. The Multi-fidelity Multi-armed Bandit. In NIPS, 2016. [17] K. Kawaguchi, L. P. Kaelbling, and T. Lozano-Pérez. Bayesian Optimization with Exponential Convergence. In NIPS, 2015. [18] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi. Optimization by simulated annealing. SCIENCE, 1983. [19] A. Klein, S. Bartels, S. Falkner, P. Hennig, and F. Hutter. Towards efficient Bayesian Optimization for Big Data. In BayesOpt, 2015. [20] R. Martinez-Cantin, N. de Freitas, A. Doucet, and J. Castellanos. Active Policy Learning for Robot Planning and Exploration under Uncertainty. In Proceedings of Robotics: Science and Systems, 2007. [21] Jonas Mockus. Application of Bayesian approach to numerical methods of global and stochastic optimization. Journal of Global Optimization, 1994. [22] R. Munos. Optimistic Optimization of Deterministic Functions without the Knowledge of its Smoothness. In NIPS, 2011. [23] D. Parkinson, P. Mukherjee, and A.. R Liddle. A Bayesian model selection analysis of WMAP3. Physical Review, 2006. [24] C.E. Rasmussen and C.K.I. Williams. Gaussian Processes for Machine Learning. UPG Ltd, 2006. [25] Herbert Robbins. Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 1952. [26] A Sabharwal, H Samulowitz, and G Tesauro. Selecting near-optimal learners via incremental data allocation. In AAAI, 2015. [27] J. Snoek, H. Larochelle, and R. P Adams. Practical Bayesian Optimization of Machine Learning Algorithms. In NIPS, 2012. [28] Niranjan Srinivas, Andreas Krause, Sham Kakade, and Matthias Seeger. Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design. In ICML, 2010. [29] Kevin Swersky, Jasper Snoek, and Ryan P Adams. Multi-task bayesian optimization. In NIPS, 2013. [30] W. R. Thompson. On the Likelihood that one Unknown Probability Exceeds Another in View of the Evidence of Two Samples. Biometrika, 1933. [31] Paul A. Viola and Michael J. Jones. Rapid Object Detection using a Boosted Cascade of Simple Features. In Computer Vision and Pattern Recognition, 2001. [32] Shifeng Xiong, Peter Z. G. Qian, and C. F. Jeff Wu. Sequential design and analysis of high-accuracy and low-accuracy computer codes. Technometrics, 2013. [33] C. Zhang and K. Chaudhuri. Active Learning from Weak and Strong Labelers. In NIPS, 2015. 9 | 2016 | 221 |
6,130 | Learning Parametric Sparse Models for Image Super-Resolution Yongbo Li, Weisheng Dong∗, Xuemei Xie, Guangming Shi1, Xin Li2, Donglai Xu3 State Key Lab. of ISN, School of Electronic Engineering, Xidian University, China 1Key Lab. of IPIU (Chinese Ministry of Education), Xidian University, China 2Lane Dep. of CSEE, West Virginia University, USA 3Sch. of Sci. and Eng., Teesside University, UK yongboli@stu.xidian.edu.cn, {wsdong, xmxie}@mail.xidian.edu.cn gmshi@xidian.edu.cn, Xin.Li@mail.wvu.edu Abstract Learning accurate prior knowledge of natural images is of great importance for single image super-resolution (SR). Existing SR methods either learn the prior from the low/high-resolution patch pairs or estimate the prior models from the input low-resolution (LR) image. Specifically, high-frequency details are learned in the former methods. Though effective, they are heuristic and have limitations in dealing with blurred LR images; while the latter suffers from the limitations of frequency aliasing. In this paper, we propose to combine those two lines of ideas for image super-resolution. More specifically, the parametric sparse prior of the desirable high-resolution (HR) image patches are learned from both the input low-resolution (LR) image and a training image dataset. With the learned sparse priors, the sparse codes and thus the HR image patches can be accurately recovered by solving a sparse coding problem. Experimental results show that the proposed SR method outperforms existing state-of-the-art methods in terms of both subjective and objective image qualities. 1 Introduction Image super-resolution (SR) aiming to recover a high-resolution (HR) image from a single lowresolution (LR) image, has important applications in image processing and computer vision, ranging from high-definition (HD) televisions and surveillance to medical imaging. Due to the information loss in the LR image formation, image SR is a classic ill-posed inverse problem, for which strong prior knowledge of the underlying HR image is required. Generally, image SR methods can be categorized into two types, i.e., model-based and learning-based methods. In model-based image SR, the selection of image prior is of great importance. The image priors, ranging from smoothness assumptions to sparsity and structured sparsity priors, have been exploited for image SR [1][3][4][13][14][15][19]. The smoothness prior models, e.g., Tikhonov and total variation (TV) regularizers[1], are effective in suppressing the noise but tend to over smooth image details. The sparsity-based SR methods, assuming that the HR patches have sparse representation with respect to a learned dictionary, have led to promising performances. Due to the ill-posed nature of the SR problem, designing an appropriate sparse regularizer is critical for the success of these methods. Generally, parametric sparse distributions, e.g., Laplacian and Generalized Gaussian models, which correspond to the ℓ1 and ℓp (0 ≤p ≤1) regularizers, are widely used. It has been shown that the SR performance can be much boosted by exploiting the structural self-similarity of natural images ∗Corresponding author. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. [3][4][15]. Though promising SR performance can be achieved by the sparsity-based methods, it is rather challenging to recover high-quality HR images for a large scaling factors, as there is no sufficient information for accurate estimation of the sparse models from the input LR image. Instead of adopting a specifical prior model, learning-based SR methods learn the priors directly from a large set of LR and HR image patch pairs [2][5][6][8][18]. Specifically, mapping functions between the LR and the high-frequency details of the HR patches are learned. Popular learning-based SR methods include the sparse coding approaches[2] and the more efficient anchored neighborhood regression methods (i.e., ANR and A+)[5][6]. More recently, inspired by the great success of the deep neural network (DNN)[16] for image recognition, the DNN based SR methods have also been proposed[8], where the DNN models is used to learn the mapping functions between the LR and the high-frequency details of the HR patches. Despite the state-of-the-art performances achieved, these patch-based methods [6][8] have limitations in dealing with the blurred LR images (as shown in Sec. 5). Instead of learning high-frequency details, in [12] Li et al. proposed to learn parametric sparse distributions (i.e., non-zero mean Laplacian distributions) of the sparse codes from retrieved HR images that are similar to the LR image. State-of-the-art SR results have been achieved for the landmark LR images, for which similar HR images can be retrieved from a large image set. However, it has limitations for general LR images (i.e., it reduces to be the conventional sparsity-based SR method), for which correlated HR images cannot be found in the image database. In this paper, we propose a novel image SR approach combining the ideas of sparsity-based and learning-based approaches for SR. The sparse prior, i.e., the parametric sparse distributions (e.g., Laplace distribution) are learned from general HR image patches. Specifically, a set of mapping functions between the LR image patches and the sparse codes of the HR patches are learned. In addition to the learned sparse prior, the learned sparse distributions are also combined with those estimated from the input LR image. Experimental results show that the proposed method performs much better than the current state-of-the-art SR approaches. 2 Related works In model-based SR, it is often assumed that the desirable HR image/patches have sparse expansions with respect to a certain dictionary. For a given LR image y = Hx + n, where H ∈RM×N specifies the degradation model, x ∈RN and n ∈RM denote the original image and additive Gaussian noise, respectively. Sparsity-based SR image reconstruction can be formulated as [3][4] (x, α) = argmin x,α ||y −Hx||2 2 + η X i {||Rix −Dαi||2 2 + λψ(α)}, (1) where Ri ∈Rn×N denotes the matrix extracting image patch of size √n × √n at position i from x, D ∈Rn×K denotes the dictionary that is an off-the-shelf basis or learned from an training dataset, and ψ(·) denotes the sparsity regularizer. As recovering x from y is an ill-posed inverse problem, the selection of ψ(·) is critical for the SR performance. Common selection of ψ(·) is the ℓp-norm (0 ≤p ≤1) regularizer, where zero-mean sparse distributions of the sparse coefficients are assumed. In [12], nonzero-mean Laplacian distributions are used, leading to the following sparsity-based SR method, (x, α) = argmin x,α ||y −Hx||2 2 + η X i {||Rix −Dαi||2 2 + ||Λi(αi −βi)||1}, (2) where Λ = diag( 2 √ 2σ2 n θi,j ), θi and βi denote the standard derivation and expectation of αi, respectively. It has been shown in [3] that by estimating {βi, θi} from the nonlocal similar image patches of the input image, promising SR performance can be achieved. However, for large scaling factors, it is rather challenging to accurately estimate {βi, θi} from the input LR image, due to the lack of sufficient information. To overcome this limitations, Li et al., propose to learn the parametric distributions from retrieved similar HR images [12] via block matching, and obtain state-of-the-art SR performance for landmark images. However, for general LR images, for which similar HR images cannot be found, the sparse prior (βi, θi) cannot be learned. Learning-based SR methods resolve the SR problem by learning mapping functions between LR and HR image patches [2][6][8]. Popular methods include the sparse coding methods [2], where LR/HR dictionary pair is jointly learned from a training set. The sparse codes of the LR patches with respect 2 to the LR dictionary are inferred via sparse coding and then used to reconstruct the HR patches with the HR dictionary. To reduce the computational complexity, anchored neighborhood points (ANR) and its advanced version (i.e., A+) methods [6] have been proposed. These methods first divided the patch spaces into many clusters, then LR/HR dictionary pairs are learned for each cluster. Mapping functions between the LR/HR patches are learned for each cluster via ridge regression. Recently, deep neural network (DNN) model has also been developed to learn the mapping functions between the LR and HR patches [8]. The advantages of the DNN model is that the entire SR pipeline is jointly optimized via end-to-end learning, leading to state-of-the-art SR performance. Despite the excellent performances, these learning-based methods focusing on learning the mapping functions between LR and HR patches have limitations in recovering a HR image from a blurry LR image generated by first applying a low-pass filtering followed by downsampling (as shown in Sec. 4). In this paper, we propose a novel image SR method by taking advantages of both the sparse-based and the example-based SR approaches. Specifically, mapping functions between the LR patches and the sparse codes of the desirable HR patches are learned. Hence, sparse prior can be learned from both the training patches and the input LR image. With the learned sparse prior, state-of-the-art SR performance can be achieved. 3 Learning Parametric Sparse Models In this section, we first propose a novel method to learn the sparse codes of the desirable HR patches and then present the method to estimate the parametric distributions from both the predicted sparse codes and those of the LR images. 3.1 Learning the sparse codes from LR/HR patch pairs For a given LR image patch yi ∈Rm, we aim to learn the expectation of the sparse code αi of the desirable HR patch xi with respect to dictionary D. Without the loss of generality, we define the learning function as ˜αi = f(zi; W, b) = g(W ∗zi + b), (3) where zi denotes the feature vector extracted from the LR patch yi, W ∈RK×m is the weighting matrix and b ∈RK is the bias, and g(·) denotes an activation function. Now, the remaining task is to learn the parameters of the learning function of Eq. (3). To learn the parameters, we first construct a large set of LR feature vectors and HR image patch pairs {(zi, xi)}, i = 1, 2, · · · , N. For a given dictionary, the sparse codes αi of xi can be obtained by a sparse coding algorithm. Then, the parameters W = {W, b} can be learned by minimizing the following objective function (W, b) = argmin W,b N X i=1 ||αi −f(zi; W, b)||2 2. (4) The above optimization problem can be iteratively solved by using a stochastic gradient descent approach. Considering the highly complexity of the mapping function between the LR feature vectors and the desirable sparse codes, we propose to learn a set of mapping functions for each possible local image structures. Specifically, the K-means clustering algorithm is used to cluster the LR/HR patches into K clusters. Then, a mapping function is learned for each cluster. After clustering, the LR/HR patches in each cluster generally contain similar image structures, and linear mapping function would be sufficient to characterize the correlations between the LR feature vectors and the sparse codes of the desirable HR patches. Therefore, for each cluster Sk, the mapping function can be learned via minimizing (Wk, bk) = argmin Wk,bk X i∈Sk ||αi −(Wkzi + bk)||2 2. (5) For simplicity, the bias term bk in the above equation can be absorbed into Wk by rewriting Wk and zi as Wk = [Wk, bk] and zi = [z⊤ i ; 1]⊤, respectively. Then, the parameters Wk can be easily solved via a least-square method. As the HR patches in each cluster generally have similar image structures, a compact dictionary should be sufficient to represent the various HR patches. Hence, instead of learning an overcomplete dictionary for all HR patches, an orthogonal basis is learned for each cluster Sk. Specifically, a PCA 3 Algorithm 1 Sparse codes learning algorithm Initialization: (a) Construct a set of LR and HR image pairs {y, x} and recover the HR images {ˆx} with a conventional SR method; (b) Extract feature patches zi, the LR and HR patches yi and xi from {ˆx, y, x}, respectively; (c) Clustering {zi, yi, xi} into K clusters using K-means algorithm. Outer loop: Iteration on k = 1, 2, · · · , K (a) Calculate the PCA basis Dk for each cluster using the HR patches belong to the k-th cluster; (b) Computer the sparse codes as αi = Sλ(D⊤ kixi) for each xi, i ∈Sk; (c) Learn the parameters W of the mapping function via solving Eq. (5). End for Output: {Dk, Wk}. basis, denoted as Dk ∈Rn×n is learned for each Sk, k = 1, 2, · · · , K. Then, the sparse codes αi can be easily obtained αi = Sλ(D⊤ kixi), where Dki denotes the PCA basis of the ki-th cluster. Regarding the feature vectors zi, we extract feature vectors from an initially recovered HR image, which can be obtained with a conventional sparsity-based method. Similar to [5][6], the first- and second-order gradients are extracted from the initially recovered HR image as the features. However, other more effective features can also be used. The sparse distribution learning algorithm is summarized in Algorithm 1. 3.2 Parametric sparse models estimation After learning linearized mapping functions, denoted as ˜αi, the estimates of αi can be estimated from LR patch via Eq. (3). Based on the observation that natural images contain abundant self-repeating structures, a collection of similar patches can often be found for an exemplar patch. Then, the mean of αi can be estimated as a weighted average of the sparse codes of the similar patches. As the original image is unknown, an initial estimate of the desirable HR image, denoted as ˆx is obtained using a conventional SR method, e.g., solving Eq. (2). Then, the search of similar patches can be conducted based on ˆx. Let ˆxi denote the patch extracted from ˆx at position i and ˆxi,l denote the patches similar to ˆxi that are within the first L-th closest matches, l = 1, 2, · · · , L. Denoted by zi,l the corresponding features vectors extracted from ˆx. Therefore, the mean of βi can be estimated by ˜βi = L X l=1 wi,l ˜αi,l, (6) where wi,l = 1 c exp(−||ˆxi,l −ˆxi||/h), c is the normalization constant, and h is the predefined parameter. Additionally, we can also estimate the mean of space codes αi directly from the intermediate estimate of target HR image. For each initially recovered HR patch ˆxi, the sparse codes can be obtained via a sparse coding algorithm. As the patch space has been clustered into K sub-spaces and a compact PCA basis is computed for each cluster, the sparse code of ˆxi can be easily computed as ˆαi,j = Sλ(D⊤ ki ˆxi,j), where Sλ(·) is the soft-thresholding function with threshold λ, ki denote the cluster that ˆxi falls into. The sparse codes of the set of similar patches ˆxi,l can also be computed. Then, the expectation of βi can be estimated as ˆβi = L X l=1 wi,j ˆαi,l. (7) Then, an improved estimation of βi can be obtained by combining the above two estimates, i.e., βi = ∆˜βi + (1 −∆) ˆβi. (8) 4 where ∆= ωdiag(δj) ∈RK×K. Similar to [12], δj is set according to the energy ratio of ˜βi(j) and ˆβi(j) as δj = r2 j r2 j + 1/r2 j , rj = ˜βi(j)/ ˆβi(j). (9) And ω is a predefined constant. After estimating βi, the variance of the sparse codes are estimated as θ2 i = 1 L L X j=1 ( ˆαi,j −βi)2. (10) The learned parametric Laplacian distributions with {βi, θi} for image patches xi are then used with the MAP estimator for image SR in the next section. 4 Image Super-Resolution with learned Parametric Sparsity Models With the learned parametric sparse distributions {(βi, θi)}, image SR problem can be formulated as (ˆx, ˆAi) = argmin xi,Ai ||y −xH||2 2 + η X i {||˜Rix −DkiAi||2 F + λ L X l=1 ||Λi(αi,l −βi)||1}, (11) where ˜Rix = [Ri,1x, Ri,2x, · · · , Ri,Lx] ∈Rn×L denotes the matrix formed by the similar patches, Ai = [αi,1, · · · , αi,L], Dki denotes the selected PCA basis of the ki-th cluster, and Λi = diag( 1 θi,j ). In Eq. (11), the group of similar patches is assumed to follow the same estimated parametric distribution {βi, θi}. Eq. (11) can be approximately solved via alternative optimization. For fixed xi, the sets of sparse codes Ai can be solved by minimizing ˆAi = argmin Ai ||˜Rix −DkiAi||2 F + λ L X l=1 ||Λi(αi,l −βi)||1 (12) As the orthogonal PCA basis is used, the above equation can be solved in closed-form solution, i.e., ˆαi,l = Sτi(D⊤ kiRi,lx −βi) + βi, (13) where τi = λ/θi. With estimated ˆAi, the whole image can be estimated by solving ˆx = argmin x ||y −xH||2 2 + η X i ||˜Rix −DkiAi||2 F , (14) which is a quadratic optimization problem and admits a closed-form solution, as ˆx = (H⊤H + η X i ˜R ⊤ i ˜Ri)−1(H⊤y + η X i ˜R ⊤ i Dki ˆAi), (15) where ˜R ⊤ i ˜Ri = PL l=1 R⊤ l Rl and ˜R ⊤ i Dki ˆAi = PL l=1 R⊤ l Dki ˆαi,l. As the matrix to be inverted in Eq. (15) is very large, the conjugate gradient algorithm is used to compute Eq. (15). The proposed image SR algorithm is summarized in Algorithm 2. In Algorithm 2, we iteratively extract the feature patches from ˆx(t) and learn ˜βi from the training set, leading to further improvements in predicting the sparse codes with the learned mapping functions. 5 Experimental results In this section, we verify the performance of the proposed SR method. For fair comparisons, we use the relative small training set of images used in [2][6]. The training images are used to simulate the LR images, which are recovered by a sparsity-based method (e.g., the NCSR method [3]). Total 100, 000 features and HR patches pairs are extracted from the reconstructed HR images and the original HR images. Patches of size 7 × 7 are extracted from the feature images and HR images. Similar to [5][6], the PCA technique is used to reduce the dimensions of the feature vectors. The training patches are clustered into 1000 clusters. The other major parameters of the proposed SR 5 Algorithm 2 Image SR with Learned Sparse Representation Initialization: (a) Initialize ˆx(0) with a conventional SR method; (b) Set parameters η and λ; Outer loop: Iteration over t = 0, 1, · · · , T (a) Extract feature vectors zi from ˆx(t) and cluster the patches into clusters; (b) Learn ˜βi for each local patch using Eq. (6); (c) Update the estimate of βi using Eq. (8) and estimate θi with Eq. (10); (d) Inner loop (solve Eq.(11)): iteration over j = 1, 2, · · · , J; (I) Compute A(j+1) i by solving Eq.(13); (II) Update the whole image ˆx(j+1) via Eq. (15); (III) Set x(t+1) = x(j+1) if j = J. End for Output: x(t+1). method are set as: L = 12, T = 8, and J = 10. The proposed SR method is compared with several current state-of-the-art image SR methods, i.e., the sparse coding based SR method (denoted as SCSR)[2], the SR method based on sparse regression and natural image prior (denoted as KK) [7], the A+ method [6], the recent SRCNN method [8], and the NCSR method [3]. Note that the NCSR is the current sparsity-based SR method. Three images sets, i.e., Set5[9], Set14[10] and BSD100[11], which consists of 5, 14 and 100 images respectively, are used as the test images. In this paper, we consider two types of degradation when generating the LR images, i.e., the bicubic image resizing function implemented with imresize in matlab and Gaussian blurring followed by downsampling with a scaling factor, both of which are commonly used in the literature of image SR. 5.1 Image SR for LR images generated with bicubic interpolation function In [2][6][7][8], the LR images are generated with the bicubic interpolation function (i.e., imresize function in Matlab), i.e., y = B(x) + n, where B(·) denotes the bicubic downsampling function. To deal with this type of degradation, we implement the degradation matrix H as an operator that resizes a HR image using bicubic function with scaling factors of 1 s and implement H⊤as an operator that upscales a LR image using bicubic function with scaling factor s, where s = 2, 3, 4. The average PSNR and SSIM results of the reconstructed HR images are reported in Table 1. It can be seen that the SRCNN method performs better than the A+ and the SCSR methods. It is surprising to see that the NCSR method, which only exploits the internal similar samples performs comparable with the SRCNN method. By exploiting both the external image patches and the internal similar patches, the proposed method outperforms the NCSR. The average PSNR gain over SRCNN can be up to 0.64 dB. Parts of some reconstructed HR images by the test methods are shown in Fig. 1, from which we can see that the proposed method reproduces the most visually pleasant HR images than other competing methods. Please refer to the supplementary file for more visual comparison results. 5.2 Image SR for LR images generated with Gaussian blur followed by downsampling Another commonly used degradation process is to first apply a Gaussian kernel followed by downsampling. In this experimental setting, the 7 × 7 Gaussian kernel of standard deviation of 1.6 is used, followed by downsampling with scaling factor s = 2, 3, 4. For these SCSR, KK, A+ and SRCNN methods, which cannot deal with the Gaussian blur kernel, the iterative back-projection [17] method is applied to the reconstructed HR images by those methods as a post processing to remove the blur. The average PSNR and SSIM results on the three test image sets are reported in Table 2. It can be seen that the performance of the example-based methods, i.e., SCSR[2], KK[7], A+[6] and SRCNN[8] methods are much worse than the NCSR [3] method. Compared with the NCSR method, the average PSNR gain of the proposed method can be up to 0.46 dB, showing the effectiveness of the proposed sparse codes learning method. Parts of the reconstructed HR images are shown in Fig. 2 6 Table 1: Average PSNR and SSIM results of the test methods (LR images generated with bicubic resizing function) Images Se5 Set14 BSD100 Upscaling ×2 ×3 ×4 ×2 ×3 ×4 ×2 ×3 ×4 SCSR[2] 31.42 0.8821 28.31 0.7954 26.54 0.7729 KK[7] 36.22 0.9514 32.29 0.9037 30.03 0.8544 32.12 0.9029 28.39 0.8135 27.15 0.7422 31.08 0.8834 28.15 0.7780 26.69 0.7017 A+[6] 36.55 0.9544 32.59 0.9088 30.29 0.8603 32.28 0.9056 29.13 0.8188 27.33 0.7491 31.21 0.8863 28.29 0.7835 26.82 0.7087 SRCNN[8] 36.66 0.9542 32.75 0.9090 30.49 0.8628 32.45 0.9067 29.30 0.8215 27.50 0.7513 31.36 0.8879 28.41 0.7863 26.90 0.7103 NCSR[3] 36.68 0.9550 33.05 0.9149 30.77 0.8720 32.26 0.9058 29.30 0.8239 27.52 0.7563 31.14 0.8863 28.37 0.7872 26.91 0.7143 Proposed 36.99 0.9551 33.39 0.9173 31.04 0.8779 32.61 0.9072 29.59 0.8264 27.77 0.7620 31.42 0.8879 28.56 0.7899 27.08 0.7187 (a) Original (b) Bicubic (c) SCSR / 26.01dB (d) KK / 26.49dB (e) A+ / 26.55dB (f) SRCNN / 26.71dB (g) NCSR / 27.11dB (h) Proposed / 27.35dB Figure 1: SR results on image ’86000’ of BSD100 of scaling factor 3 (LR image generated with bicubic interpolation function). and Fig. 3. Obviously, the proposed method can recover sharper edges and finer details than other competing methods. 6 Conclusion In this paper, we propose a novel approach for learning parametric sparse models for image superresolution. Specifically, mapping functions between the LR patch and the sparse codes of the desirable HR patches are learned from a training set. Then, parametric sparse distributions are estimated from the learned sparse codes and those estimated from the input LR image. With the learned sparse models, the sparse codes and thus the HR image patches can be accurately recovered by solving a sparse coding problem. Experimental results show that the proposed SR method outperforms existing state-of-the-art methods in terms of both subjective and objective image qualities. Acknowledgments This work was supported in part by the Natural Science Foundation (NSF) of China under Grants(No. No. 61622210, 61471281, 61632019, 61472301, and 61390512), in part by the Specialized Research Fund for the Doctoral Program of Higher Education (No. 20130203130001). 7 Table 2: Average PSNR and SSIM results of the test methods of scaling factor 3 (LR images generated with Gaussian kernel followed by downsampling) SCSR[2] KK[7] A+[6] SRCNN[8] NCSR[3] Proposed Set5 30.22 0.8484 30.28 0.8536 29.39 0.8502 30.20 08514 33.03 0.9106 33.49 0.9165 Set14 27.51 0.7619 27.46 0.7640 26.96 0.7627 27.48 0.7638 29.28 0.8203 29.63 0.8255 BSD100 27.10 0.7338 27.10 0.7342 26.59 0.7331 27.11 0.7338 28.35 0.7841 28.60 0.7887 (a) Original (b) Bicubic (c) SCSR / 29.85dB (d) KK / 29.94dB (e) A+ / 29.48dB (f) SRCNN / 29.88dB (g) NCSR / 32.97dB (h) Proposed / 33.84dB Figure 2: SR results on ’Monarch’ from Set14 of scaling factor 3 (LR images generated with Gaussian blur followed downsampling). (a) Original (b) Bicubic (c) SCSR / 32.22dB (d) KK / 32.12dB (e) A+ / 30.81dB (f) SRCNN / 32.16dB (g) NCSR / 34.59dB (h) Proposed / 35.15dB Figure 3: SR results on ’Pepper’ from Set14 of scaling factor 3 (LR images generated with Gaussian blur followed downsampling). 8 References [1] A. Marquina and S. J. Osher. Image super-resolution by TV-regularization and bregman iteration. Journal of Scientific Computing, 37(3):367–382, 2008. [2] J. Yang, J. Wright, T. S. Huang, and Y. Ma. Image super-resolution via sparse representation. IEEE transactions on image processing, 19(11):2861–2873, 2010. [3] W. Dong, L. Zhang, G. Shi, and X. Li. Nonlocally centralized sparse representation for image restoration. IEEE Transactions on Image Processing, 22(4):1620–1630, 2013. [4] W. Dong, G. Shi, Y. Ma, and X. Li. Image restoration via simultaneous sparse coding: Where structured sparsity meets gaussian scale mixture. International Journal of Computer Vision, 114(2-3):217–232, 2015. [5] R. Timofte, V. De Smet, and L. Van Gool. Anchored neighborhood regression for fast example-based super-resolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 1920–1927, 2013. [6] R. Timofte, V. De Smet, and L. Van Gool. A+: Adjusted anchored neighborhood regression for fast super-resolution. In Asian Conference on Computer Vision, pages 111–126. Springer, 2014. [7] K. I. Kim and Y. Kwon. Single-image super-resolution using sparse regression and natural image prior. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(6):1127–1133, 2010. [8] C. Dong, C. C. Loy, K. He, and X. Tang. Image super-resolution using deep convolutional networks. IEEE transactions on pattern analysis and machine intelligence, 38(2):295–307, 2016. [9] M. Bevilacqua, A. Roumy, C. Guillemot, and M. L. AlberiMorel. Low-complexity single-image superresolution based on nonnegative neighbor embedding. 2012. [10] R. Zeyde, M. Elad, and M. Protter. On single image scale-up using sparse-representations. In International conference on curves and surfaces, pages 711–730. Springer, 2010. [11] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Computer Vision, 2001. ICCV 2001. Proceedings. Eighth IEEE International Conference on, volume 2, pages 416–423. IEEE, 2001. [12] Y. Li, W. Dong, G. Shi, and X. Xie. Learning parametric distributions for image super-resolution: Where patch matching meets sparse coding. In Proceedings of the IEEE International Conference on Computer Vision, pages 450–458, 2015. [13] W. Dong, L. Zhang, G. Shi, and X. Wu. Image deblurring and super-resolution by adaptive sparse domain selection and adaptive regularization. IEEE Transactions on Image Processing, 20(7):1838–1857, 2011. [14] W. Dong, L. Zhang, and G. Shi. Centralized sparse representation for image restoration. In 2011 International Conference on Computer Vision, pages 1259–1266. IEEE, 2011. [15] G. Yu, G. Sapiro, and S. Mallat. Solving inverse problems with piecewise linear estimators: From gaussian mixture models to structured sparsity. IEEE Transactions on Image Processing, 21(5):2481–2499, 2012. [16] 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. [17] M. Irani and S. Peleg. Motion analysis for image enhancement: Resolution, occlusion, and transparency. Journal of Visual Communication and Image Representation, 4(4):324–335, 1993. [18] D. Dai, R. Timofte, and L. Van Gool. Jointly optimized regressors for image super-resolution. In Computer Graphics Forum, volume 34, pages 95–104. Wiley Online Library, 2015. [19] K. Egiazarian and V. Katkovnik. Single image super-resolution via BM3D sparse coding. In Signal Processing Conference (EUSIPCO), 2015 23rd European, pages 2849–2853. IEEE, 2015. 9 | 2016 | 222 |
6,131 | Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula Jean Barbier, Mohamad Dia and Nicolas Macris Laboratoire de Théorie des Communications, Faculté Informatique et Communications, Ecole Polytechnique Fédérale de Lausanne, 1015, Suisse. firstname.lastname@epfl.ch Florent Krzakala Laboratoire de Physique Statistique, CNRS, PSL Universités et Ecole Normale Supérieure, Sorbonne Universités et Université Pierre & Marie Curie, 75005, Paris, France. florent.krzakala@ens.fr Thibault Lesieur and Lenka Zdeborová Institut de Physique Théorique, CNRS, CEA, Université Paris-Saclay, F-91191, Gif-sur-Yvette, France. lesieur.thibault@gmail.com,lenka.zdeborova@gmail.com Abstract Factorizing low-rank matrices has many applications in machine learning and statistics. For probabilistic models in the Bayes optimal setting, a general expression for the mutual information has been proposed using heuristic statistical physics computations, and proven in few specific cases. Here, we show how to rigorously prove the conjectured formula for the symmetric rank-one case. This allows to express the minimal mean-square-error and to characterize the detectability phase transitions in a large set of estimation problems ranging from community detection to sparse PCA. We also show that for a large set of parameters, an iterative algorithm called approximate message-passing is Bayes optimal. There exists, however, a gap between what currently known polynomial algorithms can do and what is expected information theoretically. Additionally, the proof technique has an interest of its own and exploits three essential ingredients: the interpolation method introduced in statistical physics by Guerra, the analysis of the approximate message-passing algorithm and the theory of spatial coupling and threshold saturation in coding. Our approach is generic and applicable to other open problems in statistical estimation where heuristic statistical physics predictions are available. Consider the following probabilistic rank-one matrix estimation problem: one has access to noisy observations w = (wij)n i,j=1 of the pair-wise product of the components of a vector s = (s1, . . . , sn)⊺∈Rn with i.i.d components distributed as Si ∼P0, i = 1, . . . , n. The entries of w are observed through a noisy element-wise (possibly non-linear) output probabilistic channel Pout(wij|sisj/√n). The goal is to estimate the vector s from w assuming that both P0 and Pout are known and independent of n (noise is symmetric so that wij =wji). Many important problems in statistics and machine learning can be expressed in this way, such as sparse PCA [1], the Wigner spiked model [2, 3], community detection [4] or matrix completion [5]. Proving a result initially derived by a heuristic method from statistical physics, we give an explicit expression for the mutual information (MI) and the information theoretic minimal mean-square-error (MMSE) in the asymptotic n →∞limit. Our results imply that for a large region of parameters, the posterior marginal expectations of the underlying signal components (often assumed intractable 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. to compute) can be obtained in the leading order in n using a polynomial-time algorithm called approximate message-passing (AMP) [6, 3, 4, 7]. We also demonstrate the existence of a region where both AMP and spectral methods [8] fail to provide a good answer to the estimation problem, while it is nevertheless information theoretically possible to do so. We illustrate our theorems with examples and also briefly discuss the implications in terms of computational complexity. 1 Setting and main results The additive white Gaussian noise setting: A standard and natural setting is the case of additive white Gaussian noise (AWGN) of known variance ∆, wij =sisj/√n+zij √ ∆, where z=(zij)n i,j=1 is a symmetric matrix with i.i.d entries Zij ∼N(0, 1), 1≤i≤j ≤n. Perhaps surprisingly, it turns out that this Gaussian setting is sufficient to completely characterize all the problems discussed in the introduction, even if these have more complicated output channels. This is made possible by a theorem of channel universality [9] (already proven for community detection in [4] and conjectured in [10]). This theorem states that given an output channel Pout(w|y), such that (s.t) log Pout(w|y=0) is three times differentiable with bounded second and third derivatives, then the MI satisfies I(S; W)= I(S; SS⊺/√n+Z √ ∆)+O(√n), where ∆is the inverse Fisher information (evaluated at y =0) of the output channel: ∆−1 := EPout(w|0)[(∂y log Pout(W|y)|y=0)2]. Informally, this means that we only have to compute the MI for an AWGN channel to take care of a wide range of problems, which can be expressed in terms of their Fisher information. In this paper we derive rigorously, for a large class of signal distributions P0, an explicit one-letter formula for the MI per variable I(S; W)/n in the asymptotic limit n→∞. Main result: Our central result is a proof of the expression for the asymptotic n→∞MI per variable via the so-called replica symmetric (RS) potential iRS(E; ∆) defined as iRS(E; ∆) := (v −E)2 + v2 4∆ −ES,Z ln Z dx P0(x)e − x2 2Σ(E;∆)2 +x S Σ(E;∆)2 + Z Σ(E;∆) , (1) with Z ∼N(0, 1), S ∼P0, E[S2]=v and Σ(E; ∆)2 :=∆/(v−E), E ∈[0, v]. Here we will assume that P0 is a discrete distribution over a finite bounded real alphabet P0(s)=Pν α=1 pαδ(s−aα). Thus the only continuous integral in (1) is the Gaussian over z. Our results can be extended to mixtures of discrete and continuous signal distributions at the expense of technical complications in some proofs. It turns out that both the information theoretic and algorithmic AMP thresholds are determined by the set of stationary points of (1) (w.r.t E). It is possible to show that for all ∆>0 there always exist at least one stationary minimum. Note E =0 is never a stationary point (except for P0 a single Dirac mass) and E = v is stationary only if E[S] = 0. In this contribution we suppose that at most three stationary points exist, corresponding to situations with at most one phase transition. We believe that situations with multiple transitions can also be covered by our techniques. Theorem 1.1 (RS formula for the mutual information) Fix ∆>0 and let P0 be a discrete distribution s.t (1) has at most three stationary points. Then limn→∞I(S; W)/n=minE∈[0,v] iRS(E; ∆). The proof of the existence of the limit does not require the above hypothesis on P0. Also, it was first shown in [9] that for all n, I(S; W)/n≤minE∈[0,v] iRS(E; ∆), an inequality that we will use in the proof section. It is conceptually useful to define the following threshold: Definition 1.2 (Information theoretic threshold) Define ∆Opt as the first non-analyticity point of the MI as ∆increases: ∆Opt :=sup{∆| limn→∞I(S; W)/n is analytic in ]0, ∆[}. When P0 is s.t (1) has at most three stationary points, as discussed below, then minE∈[0,v] iRS(E; ∆) has at most one non-analyticity point denoted ∆RS (if minE∈[0,v] iRS(E; ∆) is analytic over all R+ we set ∆RS = ∞). Theorem 1.1 gives us a mean to compute the information theoretic threshold ∆Opt =∆RS. A basic application of theorem 1.1 is the expression of the MMSE: Corollary 1.3 (Exact formula for the MMSE) For all ∆̸= ∆RS, the matrix-MMSE Mmmsen := ES,W[∥SS⊺−E[XX⊺|W]∥2 F]/n2 (∥−∥F being the Frobenius norm) is asymptotically limn→∞Mmmsen(∆−1) = v2−(v−argminE∈[0,v]iRS(E; ∆))2. Moreover, if ∆< ∆AMP (where ∆AMP is the algorithmic threshold, see definition 1.4) or ∆> ∆RS, then the usual vector-MMSE Vmmsen :=ES,W[∥S−E[X|W]∥2 2]/n satisfies limn→∞Vmmsen =argminE∈[0,v]iRS(E; ∆). 2 It is natural to conjecture that the vector-MMSE is given by argminE∈[0,v]iRS(E; ∆) for all ∆̸=∆RS, but our proof does not quite yield the full statement. A fundamental consequence concerns the performance of the AMP algorithm [6] for estimating s. AMP has been analysed rigorously in [11, 12, 4] where it is shown that its asymptotic performance is tracked by state evolution (SE). Let Et :=limn→∞ES,Z[∥S−ˆst∥2 2]/n be the asymptotic average vector-MSE of the AMP estimate ˆst at time t. Define mmse(Σ−2):=ES,Z[(S−E[X|S+ΣZ])2] as the usual scalar mmse function associated to a scalar AWGN channel of noise variance Σ2, with S ∼P0 and Z ∼N(0, 1). Then Et+1 = mmse(Σ(Et; ∆)−2), E0 = v, (2) is the SE recursion. Monotonicity properties of the mmse function imply that Et is a decreasing sequence s.t limt→∞Et =E∞exists. Note that when E[S] = 0 and v is an unstable fixed point, as such, SE “does not start”. While this is not really a problem when one runs AMP in practice, for analysis purposes one can slightly bias P0 and remove the bias at the end of the proofs. Definition 1.4 (AMP algorithmic threshold) For ∆> 0 small enough, the fixed point equation corresponding to (2) has a unique solution for all noise values in ]0, ∆[. We define ∆AMP as the supremum of all such ∆. Corollary 1.5 (Performance of AMP) In the limit n→∞, AMP initialized without any knowledge other than P0 yields upon convergence the asymptotic matrix-MMSE as well as the asymptotic vector-MMSE iff ∆<∆AMP or ∆>∆RS, namely E∞=argminE∈[0,v]iRS(E; ∆). ∆AMP can be read off the replica potential (1): by differentiation of (1) one finds a fixed point equation that corresponds to (2). Thus ∆AMP is the smallest solution of ∂iRS/∂E =∂2iRS/∂E2 =0; in other words it is the “first” horizontal inflexion point appearing in iRS(E; ∆) when ∆increases. Discussion: With our hypothesis on P0 there are only three possible scenarios: ∆AMP < ∆RS (one “first order” phase transition); ∆AMP = ∆RS < ∞(one “higher order” phase transition); ∆AMP = ∆RS = ∞(no phase transition). In the sequel we will have in mind the most interesting case, namely one first order phase transition, where we determine the gap between the algorithmic AMP and information theoretic performance. The cases of no phase transition or higher order phase transition, which present no algorithmic gap, are basically covered by the analysis of [3] and follow as a special case from our proof. The only cases that would require more work are those where P0 is s.t (1) develops more than three stationary points and more than one phase transition is present. For ∆AMP <∆RS the structure of stationary points of (1) is as follows1 (figure 1). There exist three branches Egood(∆), Eunstable(∆) and Ebad(∆) s.t: 1) For 0<∆<∆AMP there is a single stationary point Egood(∆) which is a global minimum; 2) At ∆AMP a horizontal inflexion point appears, for ∆∈[∆AMP, ∆RS] there are three stationary points satisfying Egood(∆AMP)<Eunstable(∆AMP)= Ebad(∆AMP), Egood(∆) < Eunstable(∆) < Ebad(∆) otherwise, and moreover iRS(Egood; ∆) ≤ iRS(Ebad; ∆) with equality only at ∆RS; 3) for ∆> ∆RS there is at least the stationary point Ebad(∆) which is always the global minimum, i.e. iRS(Ebad; ∆)<iRS(Egood; ∆). (For higher ∆ the Egood(∆) and Eunstable(∆) branches may merge and disappear); 4) Egood(∆) is analytic for ∆∈]0, ∆′[, ∆′ >∆RS, and Ebad(∆) is analytic for ∆>∆AMP. We note for further use in the proof section that E∞=Egood(∆) for ∆<∆AMP and E∞=Ebad(∆) for ∆> ∆AMP. Definition 1.4 is equivalent to ∆AMP = sup{∆|E∞= Egood(∆)}. Moreover we will also use that iRS(Egood; ∆) is analytic on ]0, ∆′[, iRS(Ebad; ∆) is analytic on ]∆AMP, ∞[, and the only non-analyticity point of minE∈[0,v] iRS(E; ∆) is at ∆RS. Relation to other works: Explicit single-letter characterization of the MI in the rank-one problem has attracted a lot of attention recently. Particular cases of theorem 1.1 have been shown rigorously in a number of situations. A special case when si =±1∼Ber(1/2) already appeared in [13] where an equivalent spin glass model is analysed. Very recently, [9] has generalized the results of [13] and, notably, obtained a generic matching upper bound. The same formula has been also rigorously computed following the study of AMP in [3] for spiked models (provided, however, that the signal was not too sparse) and in [4] for strictly symmetric community detection. 1We take E[S] ̸= 0. Once theorem 1.1 is proven for this case a limiting argument allows to extend it to E[S]=0. 3 0.095 0.1 0.105 0.11 0.115 0.12 0.125 0 0.005 0.01 0.015 0.02 iRS(E) ∆=0.0008 0.082 0.083 0.084 0.085 0.086 0 0.005 0.01 0.015 0.02 ∆=0.0012 0.08 0.082 0.084 0 0.005 0.01 0.015 0.02 iRS(E) E ∆=0.00125 0.066 0.068 0.07 0.072 0.074 0.076 0.078 0.08 0 0.005 0.01 0.015 0.02 E ∆=0.0015 Figure 1: The replica symmetric potential iRS(E) for four values of ∆in the Wigner spiked model. The MI is min iRS(E) (the black dot, while the black cross corresponds to the local minimum) and the asymptotic matrix-MMSE is v2−(v−argminEiRS(E))2, where v =ρ in this case with ρ=0.02 as in the inset of figure 2. From top left to bottom right: (1) For low noise values, here ∆=0.0008<∆AMP, there exists a unique “good” minimum corresponding to the MMSE and AMP is Bayes optimal. (2) As the noise increases, a second local “bad” minimum appears: this is the situation at ∆AMP <∆=0.0012<∆RS. (3) For ∆=0.00125>∆RS, the “bad” minimum becomes the global one and the MMSE suddenly deteriorates. (4) For larger values of ∆, only the “bad” minimum exists. AMP can be seen as a naive minimizer of this curve starting from E =v =0.02. It reaches the global minimum in situations (1), (3) and (4), but in (2), when ∆AMP <∆<∆RS, it is trapped by the local minimum with large MSE instead of reaching the global one corresponding to the MMSE. For rank-one symmetric matrix estimation problems, AMP has been introduced by [6], who also computed the SE formula to analyse its performance, generalizing techniques developed by [11] and [12]. SE was further studied by [3] and [4]. In [7, 10], the generalization to larger rank was also considered. The general formula proposed by [10] for the conditional entropy and the MMSE on the basis of the heuristic cavity method from statistical physics was not demonstrated in full generality. Worst, all existing proofs could not reach the more interesting regime where a gap between the algorithmic and information theoretic perfomances appears, leaving a gap with the statistical physics conjectured formula (and rigorous upper bound from [9]). Our result closes this conjecture and has interesting non-trivial implications on the computational complexity of these tasks. Our proof technique combines recent rigorous results in coding theory along the study of capacityachieving spatially coupled codes [14, 15, 16, 17] with other progress, coming from developments in mathematical physics putting on a rigorous basis predictions of spin glass theory [18]. From this point of view, the theorem proved in this paper is relevant in a broader context going beyond low-rank matrix estimation. Hundreds of papers have been published in statistics, machine learning or information theory using the non-rigorous statistical physics approach. We believe that our result helps setting a rigorous foundation of a broad line of work. While we focus on rank-one symmetric matrix estimation, our proof technique is readily extendable to more generic low-rank symmetric matrix or low-rank symmetric tensor estimation. We also believe that it can be extended to other problems of interest in machine learning and signal processing, such as generalized linear regression, features/dictionary learning, compressed sensing or multi-layer neural networks. 2 Two examples: Wigner spiked model and community detection In order to illustrate the consequences of our results we shall present two examples. Wigner spiked model: In this model, the vector s is a Bernoulli random vector, Si ∼Ber(ρ). For large enough densities (i.e. ρ>0.041(1)), [3] computed the matrix-MMSE and proved that AMP is a computationally efficient algorithm that asymptotically achieves the matrix-MMSE for any value of the noise ∆. Our results allow to close the gap left open by [3]: on one hand we now obtain rigorously the MMSE for ρ ≤0.041(1), and on the other one we observe that for such values of ρ, and as ∆ decreases, there is a small region where two local minima coexist in iRS(E; ∆). In particular for ∆AMP <∆<∆Opt = ∆RS the global minimum corresponding to the MMSE differs from the local one that traps AMP, and a computational gap appears (see figure 1). While the region where AMP is Bayes optimal is quite large, the region where is it not, however, is perhaps the most interesting one. While this is by no means evident, statistical physics analogies with physical phase transitions in nature suggest that this region should be hard for a very broad class of algorithms. For small ρ our 4 0 0.001 0.002 0.003 0.004 0.005 0 0.01 0.02 0.03 0.04 0.05 ∆ ρ Wigner Spike model ∆AMP ∆Opt ∆spectral 0 0.001 0.002 0 0.0001 0.0002 0.0003 0.0004 matrix-MSE(∆) at ρ=0.02 ∆opt ∆AMP MMSE AMP 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 0 0.1 0.2 0.3 0.4 0.5 ∆ ρ Asymmetric Community Detection ∆AMP ∆Opt ∆spectral 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 2.5 matrix-MSE(∆) at ρ=0.05 ∆opt ∆AMP MMSE AMP Figure 2: Phase diagram in the noise variance ∆versus density ρ plane for the rank-one spiked Wigner model (left) and the asymmetric community detection (right). Left: [3] proved that AMP achieves the matrix-MMSE for all ∆as long as ρ>0.041(1). Here we show that AMP is actually achieving the optimal reconstruction in the whole phase diagram except in the small region between the blue and red lines. Notice the large gap with spectral methods (dashed black line). Inset: matrix-MMSE (blue) at ρ=0.02 as a function of ∆. AMP (dashed red) provably achieves the matrix-MMSE except in the region ∆AMP < ∆< ∆Opt = ∆RS. We conjecture that no polynomial-time algorithm will do better than AMP in this region. Right: Asymmetric community detection problem with two communities. For ρ>1/2− p 1/12 (black point) and when ∆>1, it is information theoretically impossible to find any overlap with the true communities and the matrix-MMSE is 1, while it becomes possible for ∆<1. In this region, AMP is always achieving the matrix-MMSE and spectral methods can find a non-trivial overlap with the truth as well, starting from ∆<1. For ρ<1/2− p 1/12, however, it is information theoretically possible to find an overlap with the hidden communities for ∆>1 (below the blue line) but both AMP and spectral methods miss this information. Inset: matrix-MMSE (blue) at ρ=0.05 as a function of ∆. AMP (dashed red) again provably achieves the matrix-MMSE except in the region ∆AMP <∆<∆Opt. results are consistent with the known optimal and algorithmic thresholds predicted in sparse PCA [19, 20], that treats the case of sub-extensive ρ= O(1) values. Another interesting line of work for such probabilistic models appeared in the context of random matrix theory (see [8] and references therein) and predicts that a sharp phase transition occurs at a critical value of the noise ∆spectral =ρ2 below which an outlier eigenvalue (and its principal eigenvector) has a positive correlation with the hidden signal. For larger noise values the spectral distribution of the observation is indistinguishable from that of the pure random noise. Asymmetric balanced community detection: We now consider the problem of detecting two communities (groups) with different sizes ρn and (1 −ρ)n, that generalizes the one considered in [4]. One is given a graph where the probability to have a link between nodes in the first group is p + µ(1−ρ)/(ρ√n), between those in the second group is p + µρ/(√n(1−ρ)), while interconnections appear with probability p−µ/√n. With this peculiar “balanced” setting, the nodes in each group have the same degree distribution with mean pn, making them harder to distinguish. According to the universality property described in the first section, this is equivalent to a model with AWGN of variance ∆= p(1−p)/µ2 where each variable si is chosen according to P0(s)=ρδ(s− p (1−ρ)/ρ)+(1−ρ)δ(s+ p ρ/(1−ρ)). Our results for this problem2 are summarized on the right hand side of figure 2. For ρ > ρc = 1/2− p 1/12 (black point), it is asymptotically information theoretically possible to get an estimation better than chance if and only if ∆<1. When ρ<ρc, however, it becomes possible for much larger values of the noise. Interestingly, AMP and spectral methods have the same transition and can find a positive correlation with the hidden communities for ∆<1, regardless of the value of ρ. Again, a region [∆AMP, ∆Opt =∆RS] exists where a computational gap appears when ρ<ρc. One can investigate the very low ρ regime where we find that the information theoretic transition goes as ∆Opt(ρ→0) = 1/(4ρ| log ρ|). Now if we assume that this result stays true even for ρ = O(1) (which is a speculation at this point), we can choose µ→(1−p)ρ√n such that the small group is a clique. Then the problem corresponds to a “balanced” version of the famous planted clique problem [21]. We find that the AMP/spectral approach finds the 2Note that here since E =v =1 is an extremum of iRS(E; ∆), one must introduce a small bias in P0 and let it then tend to zero at the end of the proofs. 5 hidden clique when it is larger than p np/(1−p), while the information theoretic transition translates into size of the clique 4p log(n)/(1−p). This is indeed reminiscent of the more classical planted clique problem at p=1/2 with its gap between log(n) (information theoretic), p n/e (AMP [22]) and √n (spectral [21]). Since in our balanced case the spectral and AMP limits match, this suggests that the small gain of AMP in the standard clique problem is simply due to the information provided by the distribution of local degrees in the two groups (which is absent in our balanced case). We believe this correspondence strengthens the claim that the AMP gap is actually a fundamental one. 3 Proofs The crux of our proof rests on an auxiliary “spatially coupled system”. The hallmark of spatially coupled models is that one can tune them so that the gap between the algorithmic and information theoretic limits is eliminated, while at the same time the MI is maintained unchanged for the coupled and original models. Roughly speaking, this means that it is possible to algorithmically compute the information theoretic limit of the original model because a suitable algorithm is optimal on the coupled system. The present spatially coupled construction is similar to the one used for the coupled Curie-Weiss model [14]. Consider a ring of length L+1 (L even) with blocks positioned at µ∈{0, . . . , L} and coupled to neighboring blocks {µ−w, . . . , µ+w}. Positions µ are taken modulo L+1 and the integer w∈{0, . . . , L/2} equals the size of the coupling window. The coupled model is wiµjν = siµsjν r Λµν n + ziµjν √ ∆, (3) where the index iµ ∈{1, . . . , n} (resp. jν) belongs to the block µ (resp. ν) along the ring, Λ is an (L+1)×(L+1) matrix which describes the strength of the coupling between blocks, and Ziµjν ∼N(0, 1) are i.i.d. For the proof to work, the matrix elements have to be chosen appropriately. We assume that: i) Λ is a doubly stochastic matrix; ii) Λµν depends on |µ−ν|; iii) Λµν is not vanishing for |µ−ν| ≤w and vanishes for |µ−ν|>w; iv) Λ is smooth in the sense |Λµν −Λµ+1ν|=O(w−2); v) Λ has a non-negative Fourier transform. All these conditions can easily be met, the simplest example being a triangle of base 2w+1 and height 1/(w+1). The construction of the coupled system is completed by introducing a seed in the ring: we assume perfect knowledge of the signal components {siµ} for µ∈B:={−w−1, . . . , w−1} mod L+1. This seed is what allows to close the gap between the algorithmic and information theoretic limits and therefore plays a crucial role. Note it can also be viewed as an “opening” of the chain with fixed boundary conditions. Our first crucial result states that the MI Iw,L(S; W) of the coupled and original systems are the same in a suitable limit. Lemma 3.1 (Equality of mutual informations) For any fixed w the following limits exist and are equal: limL→∞limn→∞Iw,L(S; W)/(n(L+1))=limn→∞I(S; W)/n. An immediate corollary is that non-analyticity points (w.r.t ∆) of the MIs are the same in the coupled and original models. In particular, defining ∆Opt,coup := sup{∆ | limL→∞limn→∞Iw,L(S; W)/(n(L+1)) is analytic in ]0, ∆[}, we have ∆Opt,coup =∆Opt. The second crucial result states that the AMP threshold of the spatially coupled system is at least as good as ∆RS. The analysis of AMP applies to the coupled system as well [11, 12] and it can be shown that the performance of AMP is assessed by SE. Let Et µ :=limn→∞ES,Z[∥Sµ−ˆst µ∥2 2]/n be the asymptotic average vector-MSE of the AMP estimate ˆst µ at time t for the µ-th “block” of S. We associate to each position µ ∈{0, . . . , L} an independent scalar system with AWGN of the form Y = S+Σµ(E; ∆)Z, with Σµ(E; ∆)2 := ∆/(v−PL ν=0 ΛµνEν) and S ∼P0, Z ∼N(0, 1). Taking into account knowledge of the signal components in B, SE reads: Et+1 µ = mmse(Σµ(Et; ∆)−2), E0 µ = v for µ ∈{0, . . . , L} \ B, Et µ = 0 for µ ∈B, t ≥0, (4) where the mmse function is defined as in section 1. From the monotonicity of the mmse function we have Et+1 µ ≤Et µ for all µ∈{0, . . . , L}, a partial order which implies that limt→∞Et =E∞exists. This allows to define an algorithmic threshold for the coupled system: ∆AMP,w,L :=sup{∆|E∞ µ ≤ Egood(∆) ∀µ}. We show (equality holds but is not directly needed): Lemma 3.2 (Threshold saturation) Let ∆AMP,coup := lim infw→∞lim infL→∞∆AMP,w,L. We have ∆AMP,coup ≥∆RS. 6 Proof sketch of theorem 1.1: First we prove the RS formula for ∆≤∆Opt. It is known [3] that the matrix-MSE of AMP when n→∞is equal to v2−(v−Et)2. This cannot improve the matrix-MMSE, hence (v2−(v−E∞)2)/4 ≥lim supn→∞Mmmsen/4. For ∆≤∆AMP we have E∞= Egood(∆) which is the global minimum of (1) so the left hand side of the last inequality equals the derivative of minE∈[0,v] iRS(E; ∆) w.r.t ∆−1. Thus using the matrix version of the I-MMSE relation [23] we get d d∆−1 min E∈[0,v] iRS(E; ∆) ≥lim sup n→∞ 1 n dI(S; W) d∆−1 . (5) Integrating this relation on [0, ∆] ⊂[0, ∆AMP] and checking that minE∈[0,v] iRS(E; 0) = H(S) (the Shannon entropy of P0) we obtain minE∈[0,v] iRS(E; ∆) ≤lim infn→∞I(S; W)/n. But we know I(S; W)/n≤minE∈[0,v] iRS(E; ∆) [9], thus we already get theorem 1.1 for ∆≤∆AMP. We notice that ∆AMP ≤∆Opt. While this might seem intuitively clear, it follows from ∆RS ≥∆AMP (by their definitions) which together with ∆AMP > ∆Opt would imply from theorem 1.1 that limn→∞I(S; W)/n is analytic at ∆Opt, a contradiction. The next step is to extend theorem 1.1 to the range [∆AMP, ∆Opt]. Suppose for a moment ∆RS ≥∆Opt. Then both functions on each side of the RS formula are analytic on the whole range ]0, ∆Opt[ and since they are equal for ∆≤∆AMP, they must be equal on their whole analyticity range and by continuity, they must also be equal at ∆Opt (that the functions are continuous follows from independent arguments on the existence of the n→∞limit of concave functions). It remains to show that ∆RS ∈]∆AMP, ∆Opt[ is impossible. We proceed by contradiction, so suppose this is true. Then both functions on each side of the RS formula are analytic on ]0, ∆RS[ and since they are equal for ]0, ∆AMP[⊂]0, ∆RS[ they must be equal on the whole range ]0, ∆RS[ and also at ∆RS by continuity. For ∆>∆RS the fixed point of SE is E∞=Ebad(∆) which is also the global minimum of iRS(E; ∆), hence (5) is verified. Integrating this inequality on ]∆RS, ∆[⊂]∆RS, ∆Opt[ and using I(S; W)/n≤minE∈[0,v] iRS(E; ∆) again, we find that the RS formula holds for all ∆∈[0, ∆Opt]. But this implies that minE∈[0,v] iRS(E; ∆) is analytic at ∆RS, a contradiction. We now prove the RS formula for ∆≥∆Opt. Note that the previous arguments showed that necessarily ∆Opt ≤∆RS. Thus by lemmas 3.1 and 3.2 (and the sub-optimality of AMP as shown as before) we obtain ∆RS ≤∆AMP,coup ≤∆Opt,coup = ∆Opt ≤∆RS. This shows that ∆Opt = ∆RS (this is the point where spatial coupling came in the game and we do not know of other means to prove such an equality). For ∆> ∆RS we have E∞= Ebad(∆) which is the global minimum of iRS(E; ∆). Therefore we again have (5) in this range and the proof can be completed by using once more the integration argument, this time over the range [∆RS, ∆]=[∆Opt, ∆]. Proof sketch of corollaries 1.3 and 1.5: Let E∗(∆)=argminEiRS(E; ∆) for ∆̸=∆RS. By explicit calculation one checks that diRS(E∗, ∆)/d∆−1 =(v2−(v−E∗(∆))2)/4, so from theorem 1.1 and the matrix form of the I-MMSE relation we find Mmmsen →v2−(v−E∗(∆))2 as n→∞which is the first part of the statement of corollary 1.3. Let us now turn to corollary 1.5. For n→∞the vectorMSE of the AMP estimator at time t equals Et, and since the fixed point equation corresponding to SE is precisely the stationarity equation for iRS(E; ∆), we conclude that for ∆/∈[∆AMP, ∆RS] we must have E∞=E∗(∆). It remains to prove that E∗(∆)=limn→∞Vmmsen(∆) at least for ∆/∈ [∆AMP, ∆RS] (we believe this is in fact true for all ∆). This will settle the second part of corollary 1.3 as well as 1.5. Using (Nishimori) identities ES,W[SiSjE[XiXj|W]]=ES,W[E[XiXj|W]2] (see e.g. [9]) and using the law of large numbers we can show limn→∞Mmmsen ≤limn→∞(v2 −(v − Vmmsen(∆))2). Concentration techniques similar to [13] suggest that the equality in fact holds (for ∆̸= ∆RS) but there are technicalities that prevent us from completing the proof of equality. However it is interesting to note that this equality would imply E∗(∆)=limn→∞Vmmsen(∆) for all ∆̸=∆RS. Nevertheless, another argument can be used when AMP is optimal. On one hand the right hand side of the inequality is necessarily smaller than v2−(v−E∞)2. On the other hand the left hand side of the inequality is equal to v2−(v−E∗(∆))2. Since E∗(∆)=E∞when ∆/∈[∆AMP, ∆RS], we can conclude limn→∞Vmmsen(∆)=argminEiRS(E; ∆) for this range of ∆. Proof sketch of lemma 3.1: Here we prove the lemma for a ring that is not seeded. An easy argument shows that a seed of size w does not change the MI per variable when L→∞. The statistical physics formulation is convenient: up to the trivial additive term n(L+1)v2/4, the MI Iw,L(S; W) equals the free energy −ES,Z[ln Zw,L], where Zw,L := R dxP0(x) exp(−H(x, z, Λ)) and H(x, z, Λ) = 1 ∆ L X µ=0 Λµµ X iµ≤jµ Aiµjµ(x, z, Λ) + µ+w X ν=µ+1 Λµν X iµ,jν Aiµjν(x, z, Λ) , (6) 7 with Aiµjν(x, z, Λ):=(x2 iµx2 jν)/(2n)−(siµsjνxiµxjν)/n−(xiµxjνziµjν √ ∆)/ p nΛµν. Consider a pair of systems with coupling matrices Λ and Λ′ and i.i.d noize realizations z, z′, an interpolated Hamiltonian H(x, z, tΛ)+H(x, z′, (1−t)Λ′), t ∈[0, 1], and the corresponding partition function Zt. The main idea of the proof is to show that for suitable choices of matrices, −d dtES,Z,Z′[ln Zt]≤0 for all t∈[0, 1] (up to negligible terms), so that by the fundamental theorem of calculus, we get a comparison between the free energies of H(x, z, Λ) and H(x, z′, Λ′). Performing the t-derivative brings down a Gibbs average of a polynomial in all variables siµ, xiµ, ziµjν and z′ iµjν. This expectation over S, Z, Z′ of this Gibbs average is simplified using integration by parts over the Gaussian noise ziµjν, z′ iµjν and Nishimori identities (see e.g. proof of corollary 1.3 for one of them). This algebra leads to − 1 n(L + 1) d dtES,Z,Z′[ln Zt] = 1 4∆(L + 1)ES,Z,Z′[⟨q⊺Λq −q⊺Λ′q⟩t] + O(1/(nL)), (7) where ⟨−⟩t is the Gibbs average w.r.t the interpolated Hamiltonian, q is the vector of overlaps qµ := Pn iµ=1 siµxiµ/n. If we can choose matrices s.t Λ′ > Λ, the difference of quadratic forms in the Gibbs bracket is negative and we obtain an inequality in the large size limit. We use this scheme to interpolate between the fully decoupled system w=0 and the coupled one 1≤w<L/2 and then between 1 ≤w < L/2 and the fully connected system w = L/2. The w = 0 system has Λµν = δµν with eigenvalues (1, 1, . . . , 1). For the 1 ≤w < L/2 system, we take any stochastic translation invariant matrix with non-negative discrete Fourier transform (of its rows): such matrices have an eigenvalue equal to 1 and all others in [0, 1[ (the eigenvalues are precisely equal to the discrete Fourier transform). For w = L/2 we choose Λµν = 1/(L+1) which is a projector with eigenvalues (0, 0, . . . , 1). With these choices we deduce that the free energies and MIs are ordered as Iw=0,L + O(1)≤Iw,L + O(1)≤Iw=L/2,L + O(1). To conclude the proof we divide by n(L+1) and note that the limits of the leftmost and rightmost MIs are equal, provided the limit exists. Indeed the leftmost term equals L times I(S; W) and the rightmost term is the same MI for a system of n(L+1) variables. Existence of the limit follows by subadditivity, proven by a similar interpolation [18]. Proof sketch of lemma 3.2: Fix ∆< ∆RS. We show that, for w large enough, the coupled SE recursion (4) must converge to a fixed point E∞ µ ≤Egood(∆) for all µ. The main intuition behind the proof is to use a “potential function” whose “energy” can be lowered by small perturbation of a fixed point that would go above Egood(∆) [16, 17]. The relevant potential function iw,L(E, ∆) is in fact the replica potential of the coupled system (a generalization of (1)). The stationarity condition for this potential is precisely (4) (without the seeding condition). Monotonicity properties of SE ensure that any fixed point has a “unimodal” shape (and recall that it vanishes for µ ∈B = {0, . . . , w−1}∪{L−w, . . . , L}). Consider a position µmax ∈{w, . . . , L−w−1} where it is maximal and suppose that E∞ µmax > Egood(∆). We associate to the fixed point E∞a so-called saturated profile Es defined on the whole of Z as follows: Es µ =Egood(∆) for all µ≤µ∞where µ∞+1 is the smallest position s.t E∞ µ >Egood(∆); Es µ =E∞ µ for µ∈{µ∞+1, . . . , µmax−1}; Es µ =E∞ µmax for all µ≥µmax. We show that Es cannot exist for w large enough. To this end define a shift operator by [S(Es)]µ := Es µ−1. On one hand the shifted profile is a small perturbation of Es which matches a fixed point, except where it is constant, so if we Taylor expand, the first order vanishes and the second order and higher orders can be estimated as |iw,L(S(Es); ∆)−iw,L(Es; ∆)|=O(1/w) uniformly in L. On the other hand, by explicit cancellation of telescopic sums iw,L(S(Es); ∆)−iw,L(Es; ∆)= iRS(Egood; ∆)−iRS(E∞ µmax; ∆). Now one can show from monotonicity properties of SE that if E∞ is a non trivial fixed point of the coupled SE then E∞ µmax cannot be in the basin of attraction of Egood(∆) for the uncoupled SE recursion. Consequently as can be seen on the plot of iRS(E; ∆) (e.g. figure 1) we must have iRS(E∞ µmax; ∆)≥iRS(Ebad; ∆). Therefore iw,L(S(Es); ∆)−iw,L(Es; ∆)≤ −|iRS(Ebad; ∆)−iRS(Egood; ∆)| which is an energy gain independent of w, and for large enough w we get a contradiction with the previous estimate coming from the Taylor expansion. Acknowledgments J.B and M.D acknowledge funding from the SNSF (grant 200021-156672). Part of this research received funding from the ERC under the EU’s 7th Framework Programme (FP/2007-2013/ERC Grant Agreement 307087-SPARCS). F.K and L.Z thank the Simons Institute for its hospitality. 8 References [1] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of computational and graphical statistics, 15(2):265–286, 2006. [2] I.M. Johnstone and A.Y. Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 2012. [3] Y. Deshpande and A. Montanari. Information-theoretically optimal sparse pca. In IEEE Int. Symp. on Inf. Theory, pages 2197–2201, 2014. [4] Y. Deshpande, E. Abbe, and A. Montanari. Asymptotic mutual information for the two-groups stochastic block model. arXiv:1507.08685, 2015. [5] E.J. Candès and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [6] S. Rangan and A.K. Fletcher. Iterative estimation of constrained rank-one matrices in noise. In IEEE Int. Symp. on Inf. Theory, pages 1246–1250, 2012. [7] T. Lesieur, F. Krzakala, and L. Zdeborová. Phase transitions in sparse pca. In IEEE Int. Symp. on Inf. Theory, page 1635, 2015. [8] J. Baik, G. Ben Arous, and S. Péché. Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices. Annals of Probability, page 1643, 2005. [9] F. Krzakala, J. Xu, and L. Zdeborová. Mutual information in rank-one matrix estimation. arXiv:1603.08447, 2016. [10] T. Lesieur, F. Krzakala, and L. Zdeborová. Mmse of probabilistic low-rank matrix estimation: Universality with respect to the output channel. In Annual Allerton Conference, 2015. [11] M. Bayati and A. Montanari. The dynamics of message passing on dense graphs, with applications to compressed sensing. IEEE Trans. on Inf. Theory, 57(2):764 –785, 2011. [12] A. Javanmard and A. Montanari. State evolution for general approximate message passing algorithms, with applications to spatial coupling. J. Infor. & Inference, 2:115, 2013. [13] S.B. Korada and N. Macris. Exact solution of the gauge symmetric p-spin glass model on a complete graph. Journal of Statistical Physics, 136(2):205–230, 2009. [14] S.H. Hassani, N. Macris, and R. Urbanke. Coupled graphical models and their thresholds. In IEEE Information Theory Workshop (ITW), 2010. [15] S. Kudekar, T.J. Richardson, and R. Urbanke. Threshold saturation via spatial coupling: Why convolutional ldpc ensembles perform so well over the bec. IEEE Trans. on Inf. Th., 57, 2011. [16] A. Yedla, Y.Y. Jian, P.S. Nguyen, and H.D. Pfister. A simple proof of maxwell saturation for coupled scalar recursions. IEEE Trans. on Inf. Theory, 60(11):6943–6965, 2014. [17] J. Barbier, M. Dia, and N. Macris. Threshold saturation of spatially coupled sparse superposition codes for all memoryless channels. CoRR, abs/1603.04591, 2016. [18] F. Guerra. An introduction to mean field spin glass theory: methods and results. Mathematical Statistical Physics, pages 243–271, 2005. [19] A.A. Amini and M.J. Wainwright. High-dimensional analysis of semidefinite relaxations for sparse principal components. In IEEE Int. Symp. on Inf. Theory, page 2454, 2008. [20] Q. Berthet and P. Rigollet. Computational lower bounds for sparse pca. arXiv:1304.0828, 2013. [21] A. d’Aspremont, L. El Ghaoui, M.I. Jordan, and G.RG. Lanckriet. A direct formulation for sparse pca using semidefinite programming. SIAM review, 49(3):434, 2007. [22] Y. Deshpande and A. Montanari. Finding hidden cliques of size p N/e in nearly linear time. Foundations of Computational Mathematics, 15(4):1069–1128, 2015. [23] D. Guo, S. Shamai, and S. Verdú. Mutual information and minimum mean-square error in gaussian channels. IEEE Trans. on Inf. Theory, 51, 2005. 9 | 2016 | 223 |
6,132 | Large Margin Discriminant Dimensionality Reduction in Prediction Space Mohammad Saberian Netflix esaberian@netflix.com Jose Costa Pereira INESCTEC jose.c.pereira@inesctec.pt Can Xu Google canxu@google.com Jian Yang Yahoo Research jianyang@yahoo-inc.com Nuno Vasconcelos UC San Diego nvasconcelos@ucsd.edu Abstract In this paper we establish a duality between boosting and SVM, and use this to derive a novel discriminant dimensionality reduction algorithm. In particular, using the multiclass formulation of boosting and SVM we note that both use a combination of mapping and linear classification to maximize the multiclass margin. In SVM this is implemented using a pre-defined mapping (induced by the kernel) and optimizing the linear classifiers. In boosting the linear classifiers are pre-defined and the mapping (predictor) is learned through a combination of weak learners. We argue that the intermediate mapping, i.e. boosting predictor, is preserving the discriminant aspects of the data and that by controlling the dimension of this mapping it is possible to obtain discriminant low dimensional representations for the data. We use the aforementioned duality and propose a new method, Large Margin Discriminant Dimensionality Reduction (LADDER) that jointly learns the mapping and the linear classifiers in an efficient manner. This leads to a data-driven mapping which can embed data into any number of dimensions. Experimental results show that this embedding can significantly improve performance on tasks such as hashing and image/scene classification. 1 Introduction Boosting and support vector machines (SVM) are widely popular techniques for learning classifiers. While both methods are maximizing the margin, there are a number of differences that distinguish them; e.g. while SVM selects a number of examples to assemble the decision boundary, boosting achieves this by combining a set of weak learners. In this work we propose a new duality between boosting and SVM which follows from their multiclass formulations. It shows that both methods seek a linear decision rule by maximizing the margin after transforming input data to an intermediate space. In particular, kernel-SVM (K-SVM) [39] first selects a transformation (induced by the kernel) that maps data points into an intermediate space, and then learns a set of linear decision boundaries that maximize the margin. This is depicted in Figure 1-bottom. In contrast, multiclass boosting (MCBoost) [34] relies on a set of pre-defined codewords in an intermediate space, and then learns a mapping to this space such that it maximizes the margin with respect to the boundaries defined by those codewords. See Figure 1-top. Therefore, both boosting and SVM follow a two-step procedure: (i) mapping data to some intermediate space, and (ii) determine the boundaries that separate the classes. There are, however, two notable differences: 1) while K-SVM aims to learn only the boundaries, MCBoost effort is on learning the mapping and 2) in K-SVM the intermediate space typically has infinite dimensions, while in MCBoost the space has M or M −1 dimensions, where M is the number of classes. 1 SVCL 64 select a transformation K-SVM: Data MCBoost: select linear classifiers learn a transformation learn a linear classifier Figure 1: Duality between multiclass boosting and SVM. The intermediate space (called prediction space) in the exposed duality has some interesting properties. In particular, the final classifier decision is based on the representation of data points in this prediction space where the decision boundaries are linear. An accurate classification by these simple boundaries suggests that the input data points must be very-well separated in this space. Given that in the case of boosting this space has limited dimensions, e.g. M or M −1, this suggests that we can potentially use the predictor of MCBoost as a discriminant dimensionality reduction operator. However, the dimension of MCBoost is either M or M −1 which restricts application of this operator as a general dimensionality reduction operator. In addition, according to the proposed duality, each of K-SVM or Boosting optimizes only one of the two components, i.e. mapping and decision boundaries. Because of this, extra care needs to be put in manually choosing the right kernel in K-SVM; and in MCBoost, we may not even be able to learn a good mapping if we preset some bad boundaries. We can potentially overcome these limitations by combining boosting and SVM to jointly learn both the mapping and linear classifiers for a prediction space of arbitrary dimension d. We note that this is not a straightforward merge of the two methods as this can lead to a computationally prohibitive method; e.g. imagine having to solve the quadratic optimization of K-SVM before each iteration of boosting. In this paper, we propose a new algorithm, Large-mArgin Discriminant DimEnsionality Reduction (LADDER), to efficiently implement this hybrid approach using a boosting-like method. LADDER is able to learn both the mapping and the decision boundaries in a margin maximizing objective function that is adjustable to any number of dimensions. Experiments show that the resulting embedding can significantly improve tasks such as hashing and image/scene classification. Related works: This paper touches several topics such as dimensionality reduction, classification, embedding and representation learning. Due to space constraints we present only a brief overview and comparison to previous work. Dimensionality reduction has been studied extensively. Unsupervised techniques, such as principal component analysis (PCA), non-negative matrix factorization (NMF), clustering, or deep autoencoders, are conceptually simple and easy to implement, but may eliminate discriminant dimensions of the data and result in sub-optimal representations for classification. Discriminant methods, such as sequential feature selection techniques [31], neighborhood components analysis [11], large margin nearest neighbors [42] or maximally collapsing metric learning [37] can require extensive computation and/or fail to guarantee large margin discriminant data representations. The idea of jointly optimizing the classifiers and the embedding has been extensively explored in embedding and classification literature, e.g. [7, 41, 45, 43]. These methods, however, typically rely on linear data transformation/classifier, requires more complex semi-definite programming [41] or rely on Error Correcting Output Codes (ECOC) approach [7, 45, 10] which has shown inferior performance compared to direct multiclass boosting methods [34, 27]. In comparison, we note that the proposed method (1) is able to learn a very non-linear transformation through boosting predictor, e.g. boosting deep decision trees; and, (2) relies on direct multiclass boosting that optimizes a margin enforcing loss function. Another example of jointly learning the classifiers and the embedding is multiple kernel learning (MKL) literature, e.g. [12, 36]. In these methods, a new kernel is learned as a linear combination of fixed basis functions. Compared with LADDER, 1) the basis functions are data-driven and not fixed, and 2) our method is also able to combine weak learners and form novel basis functions tailored for the current task. Finally, it is also possible to jointly learn the classifiers and embedding using deep neural networks. This, however, requires large number of training data and can be computationally very intensive. In addition the proposed LADDER method is a meta algorithm that can be used to further improve the deep networks, e.g. by boosting of the deep CNNs. 2 2 Duality of boosting and SVM Consider an M-class classification problem, with training set D = {(xi, zi)}n i=1, where zi ∈ {1 . . . M} is the class of example xi. The goal is to learn a real-valued (multidimensional) function f(x) to predict the class label z of each example x. This is formulated as the predictor f(x) that minimizes the risk defined in terms of the expected loss L(z, f(x)): R[f] = EX,Z{L(z, f(x))} ≈1 n X i L(zi, f(xi)). (1) Different algorithms vary in their choice of loss functions and numerical optimization procedures. The learned predictor has large margin if the loss L(z, f(x)) encourages large values of the classification margin. For binary classification, f(x) ∈R, z ∈{1, 2}, the margin is defined as M(xi, zi) = yif(xi), where yi = y(zi) ∈{−1, 1} is the codeword of class zi. The classifier is then F(x) = H(sign[f(x)]) where H(+1) = 1 and H(−1) = 2. The extension to M-ary classification requires M codewords. These are defined in a multidimensional space, i.e. as yk ∈Rd, k = 1 . . . M where commonly d = M or d = M −1. The predictor is then f(x) = [f1(x), f2(x) . . . fd(x)] ∈Rd, and the margin is defined as M(xi, zi) = 1 2 ⟨f(xi), yzi⟩−max l̸=zi ⟨f(xi), yl⟩ , (2) where ⟨·, ·⟩is the Euclidean dot product. Finally, the classifier is implemented as F(x) = arg max k∈{1,...,M}⟨yk, f(x)⟩. (3) Note that the binary equations are the special cases of (2)-(3) for codewords {−1, 1}. Mutliclass Boosting: MCBoost [34] is a multiclass boosting method that uses a set of unit vectors as codewords – forming a regular simplex in RM−1 –, and the exponential loss L(zi, f(xi)) = M X j=1,j̸=zi e−1 2 [⟨yzi,f(xi)⟩−⟨yj,f(xi)⟩]. (4) For M = 2, this reduces to the loss L(zi, f(xi)) = e−yzif(xi) of AdaBoost [9]. Given a set, G, of weak learners g(x) ∈G : X →RM−1, MCBoost minimizes (1) by gradient descent in function space. In each iteration MCBoost computes the directional derivative of the risk for updating f(x) along the direction of g(x), δR[f; g] = ∂R[f + ϵg] ∂ϵ ϵ=0 = −1 2n n X i=1 ⟨g(xi), w(xi)⟩, (5) where w(xi) = PM j=1(yj −yzi)e−1 2 ⟨yzi−yj,f(xi)⟩∈RM−1. The direction of steepest descent and the optimal step size toward that direction are then g∗ = arg min g∈G δR[f; g] α∗= arg min α∈R R[f + αg∗]. (6) The predictor is finally updated with f := f + α∗g∗. This method is summarized in Algorithm 1. As previously mentioned, it reduces to AdaBoost [9] for M = 2, in which α∗has closed form. Mutliclass Kernel SVM (MC-KSVM) : In the support vector machine (SVM) literature, the margin is defined as M(xi, wzi) = ⟨Φ(xi), wzi⟩−max l̸=zi ⟨Φ(xi), wl⟩, (7) where Φ(x) is a feature transformation, usually defined indirectly through a kernel k(x, x′) = ⟨Φ(x), Φ(x′)⟩, and wl (l = 1 . . . M) are a set of discriminative projections. Several algorithms have been proposed for multiclass SVM learning [39, 44, 17, 5]. The classical formulation by Vapnik finds the projections that solve: minw1...wM PM l=1 ∥wl∥2 2 + C P i ξi s.t. ⟨Φ(xi), wzi⟩−⟨Φ(xi), wl⟩≥1 −ξi, ∀(xi, zi) ∈D, l ̸= zi, ξi ≥0 ∀i. (8) 3 Algorithm 1 MCBoost Input: Number of classes M, number of iterations Nb, codewords {y1, . . . , yM} ∈RM−1, and dataset D = {(xi, zi)}n i=1 where zi ∈{1 . . . M} is label of example xi. Initialization: Set f = 0 ∈RM−1. for t = 1 to Nb do Find the best weak learner g∗(x) and optimal step size α∗using (6). Update f(x) := f(x) + α∗g∗(x). end for Output: F(x) = arg maxk ⟨f(x), yk⟩ Rewriting the constraints as ξi ≥max[0, 1 −(⟨Φ(xi), wzi⟩−max l̸=zi ⟨Φ(xi), wl⟩)], and using the fact that the objective function is monotonically increasing in ξi, this is identical to solving the problem minw1...wM P i ⌊⟨Φ(xi), wzi⟩−maxl̸=zi⟨Φ(xi), wl⟩⌋+ + λ PM l=1 ∥wl∥2 2, (9) where ⌊x⌋+ = max(0, 1 −x) is the hinge loss, and λ = 1/C. Hence, MC-KSVM minimizes the risk R[f] subject to a regularization constraint on P l ∥wl∥2 2. The predictor of the multiclass kernel SVM (MC-KSVM) is then defined as FMC−KSV M(x) = arg max l=1..M⟨Φ(x), w∗ l ⟩. (10) Duality: The discussion of the previous sections unveils an interesting duality between multiclass boosting and SVM. Since (7) and (10) are special cases of (2) and (3), respectively, the MC-SVM is a special case of the formulation of Section 2, with predictor f(x) = Φ(x) and codewords yl = wl. This leads to the duality of Figure 1. Both boosting and SVM implement a classifier with a set of linear decision boundaries on a prediction space F. This prediction space is the range space of the predictor f(x). The linear decision boundaries are the planes whose normals are the codewords yl. For both boosting and SVM, the decision boundaries implement a large margin classifier in F. However, the learning procedure is different. For the SVM, examples are first mapped into F by a pre-defined predictor. This is the feature transformation Φ(x) that underlies the SVM kernel. The codewords (linear classifiers) are then learned so as to maximize the margin. On the other hand, for boosting, the codewords are pre-defined and the boosting algorithm learns the predictor f(x) that maximizes the margin. The boosting / SVM duality is summarized in Table 1. Table 1: Duality between MCBoost and MC-KSVM predictor codewords MCBoost learns f(x) fix yi MC-KSVM fix Φ(x) learns wl 3 Discriminant dimensionality reduction In this section, we exploit the multiclass boosting / SVM duality to derive a new family of discriminant dimensionality reduction methods. Many learning problems require dimensionality reduction. This is usually done by mapping the space of features X to some lower dimensional space Z, and then learning a classifier on Z. However, the mapping from X to Z is usually quite difficult to learn. Unsupervised procedures, such as principal component analysis (PCA) or clustering, frequently eliminate discriminant dimensions of the data that are important for classification. On the other hand, supervised procedures tend to lead to complex optimization problems and can be quite difficult to implement. Using the proposed duality we argue that it is possible to use an embedding provided by boosting or SVM. In case of SVM this embedding is usually infinite dimensional which can make it impractical for some applications, e.g. hashing problem [20]. In case of boosting the embedding, f(x), has a finite dimension d. In general, the complexity of learning a predictor f(x) is inversely proportional to this dimension d, and lower dimensional codewords/predictors require more sophisticated predictor learning. For example, convolutional networks such as [22] use the 4 Algorithm 2 Codeword boosting Input: Dataset D = {(xi, zi)}n i=1 where zi ∈{1 . . . M} is label of example xi, n. of classes M, a predictor f(x) : X →Rd, n. of codeword learning iterations Nc and a set of d dimensional codewords Y. for t = 1 to Nc do Compute ∂R ∂Y and find the best step size, β∗by (12). Update Y := Y −β∗dY. Normalize codewords in Y to satisfy constraint of (11). end for Output: Codeword set Y SVCL 3 Figure 2: Codeword updates after a gradient descent step canonical basis of RM as codeword set, and a predictor composed of M neural network outputs. This is a deep predictor, with multiple layers of feature transformation, using a combination of linear and non-linear operations. Similarly, as discussed in the previous section, MCBoost can be used to learn predictors of dimension M or M −1, by combining weak learners. A predictor learned by any of these methods can be interpreted as a low-dimensional embedding. Compared to the classic sequential approach of first learning an intermediate low dimensional space Z and then learning a predictor f : Z →F = RM, these methods learn the classifier directly in a low-dimensional prediction space, i.e. F = Z. In the case of boosting, this leverages a classifier that explicitly maximizes the classification margin for the solution of the dimensionality reduction problem. The main limitation of this approach is that current multiclass boosting methods [34, 27] rely on a fixed codeword dimension d, e.g. d = M in [27] or d = M −1 in [34]. In addition these codewords are pre-defined and are independent of the input data, e.g. vertices of a regular simplex in RM or RM−1 [34]. In summary, the dimensionality of the predictor and codewords are tied to the number of classes. Next, we propose a method that extends current boosting algorithms 1) to use embeddings of arbitrary dimensions and 2) to learn the codewords (linear classifiers) based on the input data. In principle, the formulation of section 2 is applicable to any codeword set and the challenge is to find the optimal codewords for a target dimension d. For this, we propose to leverage the duality between boosting and SVM. First, use boosting to learn the optimal predictor for a given set of codewords, and second use SVM to learn the optimal codewords for the given predictor. This procedure, has two limitations. First, although both are large margin methods, boosting and SVM use different loss functions (exponential vs. hinge). Hence, the procedure is not guaranteed to converge. Second, an algorithm based on multiple iterations of boosting and SVM learning is computationally intensive. We avoid these problems by formulating the codeword learning problem in the boosting framework rather than an SVM formulation. For this, we note that, given a predictor f(x), it is possible to learn a set of codewords Y = {y1 . . . yM} that guarantees large margins, under the exponential loss, by solving miny1...yM R[Y, f] = 1 2n Pn i=1 L(Y, zi, f(xi)) s.t. ∥yk∥= 1 ∀k (11) where L(Y, zi, f(xi)) = P j̸=zi e−1 2 ⟨yzi−yj,f(xi)⟩. As is usual in boosting, we propose to solve this optimization by a gradient descent procedure. Each iteration of the proposed codeword boosting algorithm computes the risk derivatives with respect to all codewords and forms the matrix ∂R ∂Y = h ∂R[Y,f] ∂y1 . . . ∂R[Y,f] ∂yM i . The codewords are then updated according to Y = Y −β∗∂R ∂Y where β∗= arg min β R Y −β ∂R ∂Y , f , (12) is found by a line search. Finally, each codeword yl is normalized to satisfy the constraint of (11). This algorithm is summarized in Algorithm 2. Given this, we are ready to introduce an algorithm that jointly optimizes the codeword set Y and predictor f. This is implemented using an alternate minimization procedure that iterates between the following two steps. First, given a codeword set Y, determine the predictor f ∗(x) of minimum risk R[Y, f]. This is implemented with MCBoost (Algorithm 1). Second, given the optimal predictor 5 Algorithm 3 LADDER Input: number of classes M, dataset D = {(xi, zi)}n i=1 where zi ∈{1 . . . M} is label of example xi, number of predictor and codeword dimension d, number of boosting iteration Nb, number codeword learning iteration Nc and number of interleaving rounds Nr. Initialization: Set f = 0 ∈Rd and initialize Y. for t = 1 to Nr do Use Y and run Nb iterations of MCBoost, Algorithm 1, to update f(x). Use f(x) and run Nc iterations of gradient descent in Algorithm 2 to update Y. end for Output: Predictor f(x), codeword set Y and decision rule F(x) = arg maxk ⟨f(x), yk⟩ f ∗(x), determine the codeword set Y∗of minimum risk R[Y∗, f ∗]. This is implemented with codeword boosting (Algorithm 2). Note that, unlike the combined SVM-Boosting solution, the two steps of this algorithm optimize the common risk of (11). Since this risk encourages predictors of large margin, the algorithm is denoted Large mArgin Discriminant DimEnsionality Reduction (LADDER). The procedure is summarized in Algorithm 3. Analysis: First, note that the sub-problems solved by each step of LADDER, i.e. the minimization of R[Y, f] given Y or f, are convex. However, the overall optimization of (11) is not convex. Hence, the algorithm will converge to a local optimum, which depends on the initialization conditions. We propose an initialization procedure motivated by the following intuition. If two of the codewords are very close, e.g. yj ≈yk, then ⟨yj, f(x)⟩is very similar to ⟨yk, f(x)⟩and small variations of x may change the classification results of (3) from k to j and vice-versa. This suggests that the codewords should be as distant from each other as possible. We thus propose to initialize the MCBoost codewords with the set of unit vectors of maximum pair-wise distance, e.g. max y1...yM min j̸=k ||yj −yk|| , ∀j ̸= k (13) For d = M, these codewords can be the canonical basis of RM. We have implemented a barrier method from [18] to obtain maximum pair-wise distance codeword sets for any d < M. Second, Algorithm 2 has interesting intuitions. We start by rewriting the risk derivatives as ∂R[Y,f] ∂yj = 1 2n P i(−1)δijf(xi)Lis(1−δij) ij where Li = L(Y, zi, f(xi)), sij = e 1 2 ⟨yj ,f(xi)⟩ P k̸=zi e 1 2 ⟨yk,f(xi)⟩, and δij = 1 if zi = j and δij = 0 otherwise. It follows that the update of each codeword along the gradient ascent direction, −∂R[Y,f] ∂yj , is a weighted average of the predictions f(xi). Since δij is an indicator of the examples xi in class j, the term (−1)δij reflects the assignment of examples to the classes. While each xi in class j contributes to the update of yj with a multiple of the prediction f(xi), this contribution is −f(xi) for examples in classes other than j. Hence, each example xi in class j pulls yj towards its current prediction f(xi), while pulling all other codewords in the opposite direction. This is illustrated in Figure 2. The result is an increase of the dot-product ⟨yj, f(xi)⟩, while the dot-products ⟨yk, f(xi)⟩∀k ̸= j decrease. Besides encouraging correct classification, these dot product adjustments maximize the multiclass margin. This effect is modulated by the weight of the contribution of each point. This weight is the factor Lis(1−δij) ij , which has two components. The first, Li, is the loss of the current predictor f(xi) for example xi. This measures how much xi contributes to the current risk and is similar to the example weighting mechanism of AdaBoost. Training examples are weighted, so as to emphasize those poorly classified by the current predictor f(x). The second, s(1−δij) ij , only affects examples xi that do not belong to class j. For these, the weight is multiplied by sij. This computes a softmax-like operation among the codeword projections of f(xi) and is large when the projection along yj is one of the largest, and small otherwise. Hence, among examples xi from classes other than j that have equivalent loss Li, the learning algorithm weights more heavily those most likely to be mistakenly assigned to class j. In result, the emphasis on incorrectly classified examples is modulated by how much class pairs are confused by the current predictor. Examples from classes that are more confusable with class j receive larger weight for the update of the latter. 6 0 5 10 15 20 25 30 0 10 20 30 40 50 60 number of dimensions error rate MCBoost LADDER PCA+CLR ProbPCA+CLR KernelPCA+CLR LPP+CLR NPE+CLR LDA+CLR Figure 3: Left: Initial codewords for all traffic sign classes. Middle: codewords learned by LADDER. Right: Error rate evaluation with standard MCBoost classifier (CLR) with several dimensionality reduction techniques. 4 Experiments We start with a traffic sign detection problem that allows some insight on the merits of learning codewords from data. This experiment was based on ∼2K instances from 17 different types of traffic signs in the first set of the Summer traffic sign dataset [25], which was split into training and test set. Examples of traffic signs are shown in the left of figure 3. We also collected about 1, 000 background images, to represent non-traffic sign images, leading to a total of 18 classes. The background class is shown as a black image in figure 3-left and middle. All images were resized to 40 × 40 pixels and the integral channel method of [8] was used to extract 810 features per image. The first experiment compared the performance of traditional multiclass boosting to LADDER. The former was implemented by running MCBoost (Algorithm 1) for Nb = 200 iterations, using the optimal solution of (13) as codeword set. LADDER was implemented with Algorithm 3, using Nb = 2, Nc = 4, and Nr = 100. In both cases, codewords were initialized with the solution of (13) and the initial assignment of codewords to classes was random. In each experiment, the learning algorithm was initialized with 5 different random assignments. Figure 3 compares the initial codewords (Left) to those learned by LADDER (Middle) for a 2-D embedding (d = 2). A video showing the evolution of the codewords is available in the supplementary materials. The organization of the learned codewords reflects the semantics of the various classes. Note, for example, how LADDER clusters the codewords associated with speed limit signs, which were initially scattered around the unit circle. On the other hand, all traffic sign codewords are pushed away from that of the background image class. Within the traffic sign class, round signs are positioned in one half-space and signs of other shapes on the other. Regarding discriminant power, a decision rule learned by MCBoost achieved 0.44 ± 0.03 error rate, while LADDER achieved 0.21 ± 0.02. In summary, codeword adaptation produces a significantly more discriminant prediction space. This experiment was repeated for d ∈[2, 27], with the results of Figure 3-right. For small d, LADDER substantially improves on MCBoost (about half error rate for d ≤5). LADDER was also compared to various classical dimensionality reduction techniques that do not operate on the prediction space. These included PCA, LDA, Probabilistic PCA [33], Kernel PCA [35], Locally Preserving Projections (LPP) [16], and Neighborhood Preserving Embedding (NPE) [15]. All implementations were provided by [1]. For each method, the data was mapped to a lower dimension d and classified using MCBoost. LADDER outperformed all methods for all dimensions. Hashing and retrieval: Image retrieval is a classical problem in Vision [3, 4]. Encoding high dimensional feature vectors into short binary codes to enable large scale retrieval has gained momentum in the last few years [6, 38, 23, 13, 24, 26]. LADDER enables the design of an effective discriminant hash code for retrieval systems. To obtain a d-bit hash, we learn a predictor f(x) ∈Rd. Each predictor coordinate is then thresholded and mapped to {0, 1}. Retrieval is finally based on the Hamming distance between these hash codes. We compare this hashing method to a number of popular techniques on CIFAR-10 [21], which contains 60K images of ten classes. Evaluation was based on the test settings of [26], using 1, 000 randomly selected images. Learning was based on a random set of 2, 000 images, sampled from the remaining 59K. All images are represented as 512-dimensional GIST feature vectors [28]. The 1, 000 test images were used to query a database containing the remaining 59K images. 7 Table 2: Left: Mean average precision (mAP) for CIFAR-10. Right: Classification accuracy on MIT indoor scenes dataset. Method hash length (bits) 8 10 12 LSH 0.147 0.150 0.150 BRE 0.156 0.156 0.158 ITQunsup. 0.162 0.159 0.164 ITQsup. 0.220 0.225 0.231 MCBoost 0.200 0.250 0.250 KSH 0.237 0.252 0.253 LADDER 0.224 0.270 0.266 Method Accuracy RBoW [29] 37.9% SPM-SM [40] 44.0% HMP [2] 47.6% conv5+PCA+FV 52.9% conv5+MC-Boost+FV 52.8% conv5+LADDER+FV 55.2% Table 2-Left shows mean average precision (mAP) scores under different code lengths for LSH [6], BRE [23], ITQ [13], MCBoost [34], KSH [26] and LADDER. Several conclusions can be drawn. First, using a multiclass boosting technique with predefined equally spaced codewords of (13), MCBoost, we observe a competitive performance; on par with popular approaches such as ITQ, however slightly worst than KSH. Second, LADDER improves on MCBoost, with mAP gains that range from 6 to 12%. This is due to its ability of LADDER to adjust/learn codewords according to the training data. Finally, LADDER outperformed other popular methods for hash code lengths ≥10-bits. These gains are about 5 and 7% as compared to KSH, the second best method. Scene understanding: In this experiment we show that LADDER can provide more efficient dimensionality reduction than regular methods such as PCA. For this we selected the scene understanding pipeline of [30, 14] that is consists of deep CNNs [22, 19], PCA, Fisher Vectors(FV) and SVM. PCA in this setting is necessary as the Fisher Vectors can become extremely high dimensional. We replaced the PCA component by embeddings of MCBoost and LADDER and compared their performance with PCA and other scene classification methods on the MIT Indoor dataset [32]. This is a dataset of 67 indoor scene categories where the standard train/test split contains 80 images for training and 20 images for testing per class. Table 2-Right summarizes performance of different methods. Again even with plain MCBoost predictor we observe a competitive performance; on par with PCA. The performance is then improved by LADDER by learning the embedding and codewords jointly. 5 Conclusions In this work we present a duality between boosting and SVM. This duality is used to propose a novel discriminant dimensionality reduction method. We show that both boosting and K-SVM maximize the margin, using the combination of a non-linear predictor and linear classification. For K-SVM, the predictor (induced by the kernel) is fixed and the linear classifier is learned. For boosting, the linear classifier is fixed and the predictor is learned. It follows from this duality that 1) the predictor learned by boosting is a discriminant mapping, and 2) by iterating between boosting and SVM it should be possible to design better discriminant mappings. We propose the LADDER algorithm to efficiently implement the two steps and learn an embedding of arbitrary dimension. Experiments show that LADDER learns low-dimensional spaces that are more discriminant. References [1] Visualizing High-Dimensional Data Using t-SNE. JMLR, MIT Press, 2008. [2] L. Bo, X. Ren, and D. Fox. Unsup. Feature Learn. for RGB-D Based Object Recognition. In ISER, 2012. [3] J. Costa Pereira and N. Vasconcelos. On the Regularization of Image Semantics by Modal Expansion. In Proc. IEEE CVPR, pages 3093–3099, 2012. [4] J. Costa Pereira and N. Vasconcelos. Cross-modal domain adaptation for text-based regularization of image semantics in image retrieval systems. Comput. Vision Image Understand., 124:123–135, July 2014. [5] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, MIT Press, 2:265–292, 2002. [6] M. Datar, N. Immorlica, P. Indyk, and V. S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proc. ACM Symp. on Comp. Geometry, pages 253–262, 2004. [7] O. Dekel and Y. Singer. Multiclass learning by prob. embeddings. In Adv. NIPS, pages 945–952, 2002. [8] P. Dollar, Z. Tu, P. Perona, and S. Belongie. Integral channel features. In Proc. BMVC, 2009. [9] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal Comp. and Sys. Science, 1997. 8 [10] T. Gao and D. Koller. Multiclass boosting with hinge loss based on output coding. In ICML, 2011. [11] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In Adv. NIPS, pages 513–520, 2004. [12] M. Gonen and E. Alpaydin. Multiple kernel learning algorithms. JMLR, MIT Press, 12:2211–2268, July 2011. [13] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. (99):1–15, 2012. [14] Y. Gong, L. Wang, R. Guo, and S. LazebniK. Multi-scale orderless pooling of multi-scale orderless pooling of deep convolutional activation features. In Proc. ECCV, 2014. [15] X. He, D. Cai, S. Yan, and H.-J. Zhang. Neighborhood preserving embedding. In Proc. IEEE ICCV, 2005. [16] X. He and P. Niyogi. Locality preserving projections. In Adv. NIPS, 2003. [17] C. Hsu and C. Lin. A comparison of methods for multiclass support vector machines. IEEE Trans. Neural Netw., 13(2):415–425, 2002. [18] S. J. Nocedal and Wright. Numerical Optimization. Springer Verlag, New York, 1999. [19] 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. [20] D. Knuth. The art of computer programming: Sorting and searching, 1973. [21] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, Dept. of Computer Science, 2009. [22] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Adv. NIPS, 2012. [23] B. Kulis and T. Darrell. Learning to hash with binary reconstructive embeddings. In Adv. NIPS, volume 22, pages 1042–1050. 2009. [24] B. Kulis and K. Grauman. Kernelized locality-sensitive hashing. IEEE Trans. Pattern Anal. Mach. Intell., 34(6):1092–1104, 2012. [25] F. Larsson, M. Felsberg, and P. Forssen. Correlating Fourier descriptors of local patches for road sign recognition. IET Computer Vision, 5(4):244–254, 2011. [26] W. Liu, J. Wang, R. Ji, Y.-G. Jiang, and S.-F. Chang. Supervised hashing with kernels. In Proc. IEEE CVPR, pages 2074–2081, 2012. [27] I. Mukherjee and R. E. Schapire. A theory of multiclass boosting. In Adv. NIPS, 2010. [28] A. Oliva and A. Torralba. Modeling the shape of the scene: A holistic representation of the spatial envelope. Int. Journal Comput. Vision, 42(3):145–175, 2001. [29] S. N. Parizi, J. G. Oberlin, and P. F. Felzenszwalb. Reconfigurable models for scene recognition. In Proc. IEEE CVPR, 2012. [30] F. Perronnin, J. Sánchez, and T. Mensink. Improving the fisher kernel for large-scale image classification. In Proc. ECCV, 2010. [31] P. Pudil, J. Novoviˇcová, and J. Kittler. Floating search methods in feature selection. Pattern Recogn. Lett., pages 1119–1125, 1994. [32] A. Quattoni and A. Torralba. Recognizing indoor scenes. Proc. IEEE CVPR, 2009. [33] S. Roweis. EM Algorithms for PCA and SPCA. In Adv. NIPS, 1998. [34] M. Saberian and N. Vasconcelos. Multiclass boosting: Theory and algorithms. In Adv. NIPS, 2011. [35] B. Schölkopf, A. Smola, and K.-R. Müller. Nonlinear component analysis as a kernel eigenvalue problem. Neural Computations, pages 1299–1319, 1998. [36] S. Sonnenburg, G. Ratsch, C. Schafer, and B. Scholkopf. Large scale multiple kernel learning. JMLR, MIT Press, 7:1531–1565, Dec. 2006. [37] M. Sugiyama. Dimensionality reduction of multimodal labeled data by local fisher discriminant analysis. JMLR, MIT Press, pages 1027–1061, 2007. [38] A. Torralba, R. Fergus, and Y. Weiss. Small codes and large image databases for recognition. In Proc. IEEE CVPR, pages 1–8, 2008. [39] V. N. Vapnik. Statistical Learning Theory. John Wiley Sons Inc, 1998. [40] N. Vasconcelos and N. Rasiwasia. Scene recognition on the semantic manifold. In Proc. ECCV, 2012. [41] K. Q. Weinberger and O. Chapelle. Large margin taxonomy embedding for document categorization. In Adv. NIPS. 2009. [42] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. JMLR, MIT Press, pages 207–244, 2009. [43] J. Weston, S. Bengio, and N. Usunier. Large scale image annotation: Learning to rank with joint word-image embeddings. In Proc. ECML, 2010. [44] J. Weston and C. Watkins. Support vector machines for multi-class pattern recognition. In Euro. Symp. On Artificial Neural Networks, pages 219–224, 1999. [45] B. Zhao and E. Xing. Sparse output coding for large-scale visual recognition. In Proc. IEEE CVPR, pages 3350–3357, 2013. 9 | 2016 | 224 |
6,133 | Fast learning rates with heavy-tailed losses Vu Dinh1 Lam Si Tung Ho2 Duy Nguyen3 Binh T. Nguyen4 1Program in Computational Biology, Fred Hutchinson Cancer Research Center 2Department of Biostatistics, University of California, Los Angeles 3Department of Statistics, University of Wisconsin-Madison 4Department of Computer Science, University of Science, Vietnam Abstract We study fast learning rates when the losses are not necessarily bounded and may have a distribution with heavy tails. To enable such analyses, we introduce two new conditions: (i) the envelope function supf∈F |ℓ◦f|, where ℓis the loss function and F is the hypothesis class, exists and is Lr-integrable, and (ii) ℓsatisfies the multi-scale Bernstein’s condition on F. Under these assumptions, we prove that learning rate faster than O(n−1/2) can be obtained and, depending on r and the multi-scale Bernstein’s powers, can be arbitrarily close to O(n−1). We then verify these assumptions and derive fast learning rates for the problem of vector quantization by k-means clustering with heavy-tailed distributions. The analyses enable us to obtain novel learning rates that extend and complement existing results in the literature from both theoretical and practical viewpoints. 1 Introduction The rate with which a learning algorithm converges as more data comes in play a central role in machine learning. Recent progress has refined our theoretical understanding about setting under which fast learning rates are possible, leading to the development of robust algorithms that can automatically adapt to data with hidden structures and achieve faster rates whenever possible. The literature, however, has mainly focused on bounded losses and little has been known about rates of learning in the unbounded cases, especially in cases when the distribution of the loss has heavy tails [van Erven et al., 2015]. Most of previous work about learning rate for unbounded losses are done in the context of density estimation [van Erven et al., 2015, Zhang, 2006a,b], of which the proofs of fast rates implicitly employ the central condition [Gr¨unwald, 2012] and cannot be extended to address losses with polynomial tails [van Erven et al., 2015]. Efforts to resolve this issue include Brownlees et al. [2015], which proposes using some robust mean estimators to replace empirical means, and Cortes et al. [2013], which derives relative deviation and generalization bounds for unbounded losses with the assumption that Lr-diameter of the hypothesis class is bounded. However, results about fast learning rates were not obtained in both approaches. Fast learning rates are derived in Lecu´e and Mendelson [2013] for sub-Gaussian losses and in Lecu´e and Mendelson [2012] for hypothesis classes that have sub-exponential envelope functions. To the best of our knowledge, no previous work about fast learning rates for heavy-tailed losses has been done in the literature. The goal of this research is to study fast learning rates for the empirical risk minimizer when the losses are not necessarily bounded and may have a distribution with heavy tails. We recall that heavy-tailed distributions are probability distributions whose tails are not exponentially bounded: that is, they have heavier tails than the exponential distribution. To enable the analyses of fast rates with heavy-tailed losses, two new assumptions are introduced. First, we assume the existence and the Lr-integrability of the envelope function F = supf∈F |f| of the hypothesis class F for 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. some value of r ≥2, which enables us to use the results of Lederer and van de Geer [2014] on concentration inequalities for suprema of empirical unbounded processes. Second, we assume that the loss function satisfies the multi-scale Bernstein’s condition, a generalization of the standard Bernstein’s condition for unbounded losses, which enables derivation of fast learning rates. Building upon this framework, we prove that if the loss has finite moments up to order r large enough and if the hypothesis class satisfies the regularity conditions described above, then learning rate faster than O(n−1/2) can be obtained. Moreover, depending on r and the multi-scale Bernstein’s powers, the learning rate can be arbitrarily close to the optimal rate O(n−1). We then verify these assumptions and derive fast learning rates for the k-mean clustering algorithm and prove that if the distribution of observations has finite moments up to order r and satisfies the Pollard’s regularity conditions, then fast learning rate can be derived. The result can be viewed as an extension of the result from Antos et al. [2005] and Levrard [2013] to cases when the source distribution has unbounded support, and produces a more favorable convergence rate than that of Telgarsky and Dasgupta [2013] under similar settings. 2 Mathematical framework Let the hypothesis class F be a class of functions defined on some measurable space X with values in R. Let Z = (X, Y ) be a random variable taking values in Z = X ×Y with probability distribution P where Y ⊂R. The loss ℓ: Z × F →R+ is a non-negative function. For a hypothesis f ∈F and n iid samples {Z1, Z2, . . . , Zn} of Z, we define Pℓ(f) = EZ∼P [ℓ(Z, f)] and Pnℓ(f) = 1 n n X i=1 ℓ(Zi, f). For unsupervised learning frameworks, there is no output (Y = ∅) and the loss has the form ℓ(X, f) depending on applications. Nevertheless, Pℓ(f) and Pnℓ(f) can be defined in a similar manner. We will abuse the notation to denote the losses ℓ(Z, f) by ℓ(f). We also denote the optimal hypothesis f ∗be any function for which Pℓ(f ∗) = inff∈F Pℓ(f) := P ∗and consider the empirical risk minimizer (ERM) estimator ˆfn = arg minf∈F Pnℓ(f). We recall that heavy-tailed distributions are probability distributions whose tails are not exponentially bounded. Rigorously, the distribution of a random variable V is said to have a heavy right tail if limv→∞eλvP[V > v] = ∞for all λ > 0 and the definition is similar for heavy left tail. A learning problem is said to be with heavy-tailed loss if the distribution of ℓ(f) has heavy tails from some or all hypotheses f ∈F. For a pseudo-metric space (G, d) and ϵ > 0, we denote by N(ϵ, G, d) the covering number of (G, d); that is, N(ϵ, G, d) is the minimal number of balls of radius ϵ needed to cover G. The universal metric entropy of G is defined by H(ϵ, G) = supQ log N(ϵ, G, L2(Q)), where the supremum is taken over the set of all probability measures Q concentrated on some finite subset of G. For convenience, we define G = ℓ◦F the class of all functions g such that g = ℓ(f) for some f ∈F and denote by Fϵ a finite subset of F such that G is contained in the union of balls of radius ϵ with centers in Gϵ = ℓ◦Fϵ. We refer to Fϵ and Gϵ as an ϵ-net of F and G, respectively. To enable the analyses of fast rates for learning problems with heavy-tailed losses, throughout the paper, we impose the following regularity conditions on F and ℓ. Assumption 2.1 (Multi-scale Bernstein’s condition). Define F∗= arg minF Pℓ(f). There exist a finite partition of F = ∪i∈IFi, positive constants B = {Bi}i∈I, constants γ = {γi}i∈I in (0, 1], and f ∗= {f ∗ i }i∈I ⊂F∗such that E[(ℓ(f) −ℓ(f ∗ i ))2] ≤Bi (E[ℓ(f) −ℓ(f ∗ i )])γi for all i ∈I and f ∈Fi. Assumption 2.2 (Entropy bounds). The hypothesis class F is separable and there exist C ≥1, K ≥1 such that ∀ϵ ∈(0, K], the L2(P)-covering numbers and the universal metric entropies of G are bounded as log N(ϵ, G, L2(P)) ≤C log(K/ϵ) and H(ϵ, G) ≤C log(K/ϵ). Assumption 2.3 (Integrability of the envelope function). There exists W > 0, r ≥C + 1 such that E supg∈G |g|r1/r ≤W. The multi-scale Bernstein’s condition is more general than the Bernstein’s condition. This entails that the multi-scale Bernstein’s condition holds whenever the Bernstein’s condition does, thus al2 lows us to consider a larger class of problems. In other words, our results are also valid with the Bernstein’s condition. The multi-scale Bernstein’s condition is more proper to study unbounded losses since it is able to separately consider the behaviors of the risk function on microscopic and macroscopic scales, for which the distinction can only be observed in an unbounded setting. We also recall that if G has finite VC-dimension, then Assumption 2.2 is satisfied [Boucheron et al., 2013, Bousquet et al., 2004]. Both Bernstein’s condition and the assumption of separable parametric hypothesis class are standard assumptions frequently used to obtain faster learning rates in agnostic settings. A review about the Bernstein’s condition and its applications is Mendelson [2008], while fast learning rates for bounded losses on hypothesis classes satisfying Assumptions 2.2 were previously studied in Mehta and Williamson [2014] under the stochastic mixability condition. Fast learning rate for hypothesis classes with envelope functions were studied in Lecu´e and Mendelson [2012], but under a much stronger assumption that the envelope function is sub-exponential. Under these assumptions, we illustrate that fast rates for heavy-tailed losses can be obtained. Throughout the analyses, two recurrent analytical techniques are worth mentioning. The first comes from the simple observation that in the standard derivation of fast learning rates for bounded losses, the boundedness assumption is used in multiple places only to provide reverse-Holder-type inequalities, where the L2-norm are upper bounded by the L1-norm. This use of the boundedness assumption can be simply relieved by the assumption that the Lr-norm of the loss is bounded, which implies ∥u∥L2 ≤∥u∥(r−2)/(2r−2) L1 ∥u∥r/(2r−2) Lr . The second technique relies on the following results of Lederer and van de Geer [2014] on concentration inequalities for suprema of empirical unbounded processes. Lemma 2.1. If {Vk : k ∈K} is a countable family of non-negative functions such that E sup k∈K |Vk|r ≤M r σ2 = sup k∈K EV 2 k and V := sup k∈K PnVk, then for all ζ, x > 0, we have P[V ≥(1 + ζ)EV + x] ≤min 1≤l≤r (1/x)l 64/ζ + ζ + 7) (l/n)1−l/r M + 4σ p l/n l . An important notice from this result is that the failure probability is a polynomial in the deviation x. As we will see later, for a given level of confidence δ, this makes the constant in the convergence rate a polynomial function of (1/δ) instead of log(1/δ) as in sub-exponential cases. Thus, more careful examinations of the order of the failure probability are required for the derivation of any generalization bound with heavy-tailed losses. 3 Fast learning rates with heavy-tailed losses The derivation of fast learning rate with heavy tailed losses proceeds as follows. First, we will use the assumption of integrable envelope function to prove a localization-based result that allows us to reduce the analyses from the separable parametric classes F to its finite ϵ-net Fϵ. The multi-scale Bernstein’s condition is then employed to derive a fast-rate inequality that helps distinguish the optimal hypothesis from alternative hypotheses in Fϵ. The two results are then combined to obtain fast learning rates. 3.1 Preliminaries Throughout this section, let Gϵ be an ϵ-net for G in the L2(P)-norm, with ϵ = n−β for some 1 ≥β > 0. Denote by π : G →Gϵ an L2(P)-metric projection from G to Gϵ. For any g0 ∈Gϵ, we denote K(g0) = {|g0 −g| : g ∈π−1(g0)}. We have (i) the constant zero function is an element of K(g0), (ii) E[supu∈K(g0) |u|r] ≤(2W)r; and supu∈K(g0) ∥u∥L2(P ) ≤ϵ, (iii) N(t, K(g0), L2(P)) ≤(K/t)C for all t > 0. 3 Given a sample Z = (Z1, . . . , Zn), we denote by KZ the projection of K(g0) onto the sample Z and by D(KZ) half of the radius of (KZ, ∥· ∥2), that is D(KZ) = supu,v∈KZ ∥u −v∥/4. We have the following preliminary lemma, for which the proofs are provided in the Appendix. Lemma 3.1. 2 √nED(KZ) ≤ ϵ + E supu∈K(g0) (Pn −P)u r−2 2(r−1) (2W) r 2(r−1) . Lemma 3.2. Given 0 < ν < 1, there exist constant C1, C2 > 0 depending only on ν such that for all x > 0, if x ≤axν + b then x ≤C1a1/(1−ν) + C2b. Lemma 3.3. Define A(l, r, β, C, α) = max l2/r −(1 −β)l + βC, [β (1 −α/2) −1/2] l + βC . (3.1) Assuming that r ≥4C and α ≤1, if we choose l = r (1 −β) /2 and 0 < β < (1 −2 p C/r)/(2 −α), (3.2) then 1 ≤l ≤r and A(l, r, β, C, α) < 0. This also holds if α ≥1 and 0 < β < 1 −2 p C/r. 3.2 Local analysis of the empirical loss The preliminary lemmas enable us to locally bound E supu∈K(g0) (Pn −P)u as follows: Lemma 3.4. If β < (r −1)/r, there exists c1 > 0 such that E supu∈K(g0) (Pn −P)u ≤c1n−β for all n. Proof. Without loss of generality, we assume that K(g0) is countable. The arguments to extend the bound from countable classes to separable classes are standard (see, for example, Lemma 12 of Mehta and Williamson [2014]). Denote ¯Z = supu∈K(g0) (Pn −P)u and let ϵ = 1/nβ, R = (R1, R2, . . . , Rn) be iid Rademacher random variables, using standard results about symmetrization and chaining of Rademacher process (see, for example, Corollary 13.2 in Boucheron et al. [2013]), we have nE sup u∈K(g0) (Pn −P)g ≤2E ER sup u∈K(g0) n X j=1 Rju(Xj) ≤24E Z D(KX)∨ϵ 0 p log N(t, KX, ∥· ∥2)dt ≤24E Z D(KX)∨ϵ 0 q H t/√n, K(g0) dt, where ER denotes the expected value with respect to the random variables R1, R2, . . . , Rn. By Assumption 2.2, we deduce that nE ¯Z ≤C0(K, n, σ, C)(ϵ + ED(KX)) where C0 = O( p log n). If we define x = ϵ + E ¯Z, b = C0ϵ/n = O( p log n/nβ+1), a = C0n−1/2(2W) r 2(r−1) /2 = O( p log n/√n), then by Lemma 3.1, we have x ≤ax(r−2)/(2r−2) + b + ϵ. Using lemma 3.2, we have x ≤C1a2(r−1)/r + C2(b + ϵ) ≤C3n−β, which completes the proof. Lemma 3.5. Assuming that r ≥4C, if β < 1 −2 p C/r, there exist c1, c2 > 0 such that for all n and δ > 0 sup u∈K(g0) Pnu ≤ 9c1 + (c2/δ)1/[r(1−β)] n−β ∀g0 ∈Gϵ with probability at least 1 −δ. 4 Proof. Denote Z = supu∈K(g0) Pnu and ¯Z = supu∈K(g0) (Pn −P)u. We have Z = sup u∈K(g0) Pnu ≤¯Z + sup u∈K(g0) Pu ≤¯Z + sup u∈K(g0) ∥u∥L2(P ) = ¯Z + ϵ. Applying Lemma 2.1 for ζ = 8 and x = y/nβ for ¯Z, using the facts that σ = sup u∈Kg0 p E[u(X)]2 ≤ϵ = 1/nβ, and E[ sup u∈Kg0 |u|r] ≤(2W)r, we have P ¯Z ≥9E ¯Z + y/nβ ≤min 1≤l≤r y−l 46 (l/n)1−l/r nβW + 4 p l/n l := φ(y, n). To provide a union bound for all g0 ∈Gϵ, we want the total failure probability φ(y, n)(nβK)C ≤δ. This failure probability, as a function of n, is of order A(l, r, β, C, α) (as define in Lemma 3.3) with α = 2 . By choosing l = r(1 −β)/2 and β < 1 −2 p C/r, we deduce that there exist c2, c3 > 0 such that φ(y, n)(nβK)C ≤c2/(nc3yl) ≤c2/yr(1−β)/2. The proof is completed by choosing y = (c2/δ)2/[r(1−β)] and using the fact that E ¯Z ≤c1/nβ (note that 1 −2 p C/r ≤(r −1)/r and we can apply Lemma 3.4 to get the bound). A direct consequence of this Lemma is the following localization-based result. Theorem 3.1 (Local analysis). Under Assumptions 2.1, 2.2 and 2.3, let Gϵ be a minimal ϵ-net for G in the L2(P)-norm, with ϵ = n−β where β < 1 −2 p C/r. Then there exist c1, c2 > 0 such that for all δ > 0, Png ≥Pn(π(g)) − 9c1 + (c2/δ)2/[r(1−β)] n−β ∀g ∈G with probability at least 1 −δ. 3.3 Fast learning rates with heavy-tailed losses Theorem 3.2. Given a0, δ > 0. Under the multi-scale (B, γ, I)-Bernstein’s condition and the assumption that r ≥4C, consider 0 < β < (1 −2 p C/r)/(2 −γi) ∀i ∈I. (3.3) Then there exist Na0,δ,r,B,γ > 0 such that ∀f ∈Fϵ and n ≥Na0,δ,r,B,γ, we have Pℓ(f) −P ∗≥a0/nβ implies ∃f ∗∈F∗: Pnℓ(f) −Pnℓ(f ∗) ≥a0/(4nβ) with probability at least 1 −δ. Proof. Define a = [Pℓ(f) −P ∗]nβ. Assuming that f ∈Fi, applying Lemma 2.1 for ζ = 1/2 and x = a/4nβ for a single hypothesis f, we have P [Pnℓ(f) −Pnℓ(f ∗ i ) ≤(Pℓ(f) −Pℓ(f ∗ i ))/4] ≤h(a, n) where h(a, n, i) = min 1≤l≤r (4/a)l 50nβ (l/n)1−l/r W + 4nβBiaγi/2/nβγi/2p l/n l using the fact that σ2 = E[ℓ(f)−ℓ(f ∗ i )]2 ≤Bi [E(ℓ(f) −ℓ(f ∗ i ))]γi = Biaγi/nβγi if f ∈Fi. Since γi ≤1, h(a, n, i) is a non-increasing function in a. Thus, P [Pnℓ(f) −Pnℓ(f ∗ i ) ≤(Pℓ(f) −Pℓ(f ∗ i ))/4] ≤h(a0, n, i). To provide a union bound for all f ∈Fϵ such that Pℓ(f) −Pℓ(f ∗ i ) ≥a0/nβ, we want the total failure probability to be small. This is guaranteed if h(a0, n, i)(nβK)C ≤δ. This failure probability, as a function of n, is of order A(l, r, β, C, γi) as defined in equation (3.1). By choosing r, l as in Lemma 3.3 and β as in equation (3.3), we have 1 ≤l ≤r and A(l, r, β, C, γi) < 0 for all i. Thus, there exists c4, c5, c6 > 0 such that h(a0, n, i)(nβK)C ≤c6a−c5(1−γi/2) 0 n−c4 ∀n, i. Hence, when n ≥ Na,δ,r,B,γ = c6δa−c5(1−˜γ/2) 0 1/c4 where ˜γ = max{γ}1{a0≥1} + min{γ}1{a0<1}, we have: ∀f ∈Fϵ, Pℓ(f) −P ∗≥a0/nβ implies ∃f ∗∈F∗, Pnℓ(f) − Pnℓ(f ∗) ≥a0/(4nβ) with probability at least 1 −δ. 5 Theorem 3.3. Under Assumptions 2.1, 2.2 and 2.3, consider β as in equation (3.3) and c1, c2 as in previous theorems. For all δ > 0, there exists Nδ,r,B,γ such that if n ≥Nδ,r,B,γ, then Pℓ( ˆfz) ≤Pℓ(f ∗) + 36c1 + 1 + 4 (2c2/δ)2/[r(1−β)] n−β with probability at least 1 −δ. Proof of Theorem 3.3. Let Fϵ by an ϵ-net of F with ϵ = 1/nβ such that f ∗∈Fϵ. We denote the projection of ˆfz to Fϵ by f1 = π( ˆfz). For a given δ > 0, define A1 = n ∃f ∈F : Pnf ≤Pn(π(f)) − 9c1 + (c3/δ)2/[r(1−β)] n−βo , A2 = ∃f ∈Fϵ : Pnℓ(π(f)) −Pnℓ(f ∗) ≤a0/(4nβ) and Pℓ(π(f)) −Pℓ(f ∗) ≥a0/nβ , where c1, c2 is defined as in previous theorem, a0/4 = 9c1 + (c3/δ)2/[r(1−β)] and n ≥Na0,δ,r,γ. We deduce that A1 and A2 happen with probability at most δ. On the other hand, under the event that A1 and A2 do not happen, we have Pnℓ(f1) ≤Pnℓ( ˆfz) + 9c1 + (c3/δ)2/[r(1−β)] n−β ≤Pnℓ(f ∗) + a0/(4nβ). By definition of Fϵ, we have Pℓ( ˆfz) ≤Pℓ(f1) + ϵ ≤Pℓ(f ∗) + (a0 + 1)/nβ. 3.4 Verifying the multi-scale Bernstein’s condition In practice, the most difficult condition to verify for fast learning rates is the multi-scale Bernstein’s condition. We derive in this section some approaches to verify the condition. We first extend the result of Mendelson [2008] to prove that the (standard) Bernstein’s condition is automatically satisfied for functions that are relatively far way from f ∗under the integrability condition of the envelope function (proof in the Appendix). We recall that R(f) = Eℓ(f) is referred to as the risk function. Lemma 3.6. Under Assumption 2.3, we define M = W r/(r−2) and γ = (r −2)/(r −1). Then, if α > M and R(f) ≥α/(α −M)R(f ∗), then E(ℓ(f) −ℓ(f ∗))2 ≤2αγE(ℓ(f) −ℓ(f ∗))γ. This allows us to derive the following result, for which the proof is provided in the Appendix. Lemma 3.7. If F is a subset of a vector space with metric d and the risk function R(f) = Eℓ(f) has a unique minimizer on F at f ∗in the interior of F and (i) There exists L > 0 such that E(ℓ(f) −ℓ(g))2 ≤Ld(f, g)2 for all f, g ∈F. (ii) There exists m ≥2, c > 0 and a neighborhood U around f ∗such that R(f) −R(f ∗) ≥cd(f, f ∗)m for all f ∈U. Then the multi-scale Bernstein’s condition holds for γ = ((r −2)/(r −1), 2/m). Corollary 3.1. Suppose that (F, d) is a pseudo-metric space, ℓsatisfies condition (i) in Lemma 3.7 and the risk function is strongly convex with respect to d, then the Bernstein’s condition holds with γ = 1. Remark 3.1. If the risk function is analytic at f ∗, then condition (ii) in Lemma 3.7 holds. Similarly, if the risk function is continuously differentiable up to order 2 and the Hessian of R(f) is positive definite at f ∗, then condition (ii) is valid with m = 2. Corollary 3.2. If the risk function R(f) = Eℓ(f) has a finite number of global minimizers f1, f2, . . . , fk, ℓsatisfies condition (i) in Lemma 3.7 and there exists mi ≥2, ci > 0 and neighborhoods Ui around fi such that R(f) −R(fi) ≥cid(f, fi)mi for all f ∈Ui, i = 1, . . . , k, then the multi-scale Bernstein’s condition holds for γ = ((r −2)/(r −1), 2/m1, . . . , 2/mk). 3.5 Comparison to related work Theorem 3.3 dictates that under our settings, the problem of learning with heavy-tailed losses can obtain convergence rates up to order O n−(1−2√ C/r)/(2−min{γ}) (3.4) 6 where γ is the multi-scale Bernstein’s order and r is the degree of integrability of the loss. We recall that convergence rate of O(n−1/(2−γ)) is obtained in Mehta and Williamson [2014] under the same setting but for bounded losses. (The analysis there was done under the γ-weakly stochastic mixability condition, which is equivalent with the standard γ-Bernstein’s condition for bounded losses [van Erven et al., 2015]). We note that if the loss is bounded, r = ∞and (3.4) reduces to the convergence rate obtained in Mehta and Williamson [2014]. Fast learning rates for unbounded loses are previously derived in Lecu´e and Mendelson [2013] for sub-Gaussian losses and in Lecu´e and Mendelson [2012] for hypothesis classes that have subexponential envelope functions. In Lecu´e and Mendelson [2013], the Bernstein’s condition is not directly imposed, but is replaced by condition (ii) of Lemma 3.7 with m = 2 on the whole hypothesis class, while the assumption of sub-Gaussian hypothesis class validates condition (i). This implies the standard Bernstein’s condition with γ = 1 and makes the convergence rate O(n−1) consistent with our result (note that for sub-Gaussian losses, r can be chosen arbitrary large). The analysis of Lecu´e and Mendelson [2012] concerns about non-exact oracle inequalities (rather than the sharp oracle inequalities we investigate in this paper) and can not be directly compared with our results. 4 Application: k-means clustering with heavy-tailed source distributions k-means clustering is a method of vector quantization aiming to partition n observations into k ≥2 clusters in which each observation belongs to the cluster with the nearest mean. Formally, let X be a random vector taking values in Rd with distribution P. Given a codebook (set of k cluster centers) C = {yi} ∈(Rd)k, the distortion (loss) on an instant x is defined as ℓ(C, x) = minyi∈C ∥x − yi∥2 and k-means clustering method aims at finding a minimizer C∗of R(ℓ(C)) = Pℓ(C) via minimizing the empirical distortion Pnℓ(C). The rate of convergence of k-means clustering has drawn considerable attention in the statistics and machine learning literatures [Pollard, 1982, Bartlett et al., 1998, Linder et al., 1994, Ben-David, 2007]. Fast learning rates for k-means clustering (O(1/n)) have also been derived by Antos et al. [2005] in the case when the source distribution is supported on a finite set of points, and by Levrard [2013] under the assumptions that the source distribution has bounded support and satisfies the so-called Pollard’s regularity condition, which dictates that P has a continuous density with respect to the Lebesgue measure and the Hessian matrix of the mapping C →R(C) is positive definite at C∗. Little is known about the finite-sample performance of empirically designed quantizers under possibly heavy-tailed distributions. In Telgarsky and Dasgupta [2013], a convergence rate of O(n−1/2+2/r) are derived, where r is the number of moments of X that are assumed to be finite. Brownlees et al. [2015] uses some robust mean estimators to replace empirical means and derives a convergence rate of O(n−1/2) assuming only that the variance of X is finite. The results from previous sections enable us to prove that with proper setting, the convergence rate of k-means clustering for heavy-tailed source distributions can be arbitrarily close to O(1/n). Following the framework of Brownlees et al. [2015], we consider G = {ℓ(C, x) = min yi∈C ∥x −yi∥2, C ∈F = (−ρ, ρ)d×k} for some ρ > 0 with the regular Euclidean metric. We let C∗, ˆCn be defined as in the previous sections. Theorem 4.1. If X has finite moments up to order r ≥4k(d + 1), P has a continuous density with respect to the Lebesgue measure, the risk function has a finite number of global minimizers and the Hessian matrix of C →R(C) is positive definite at the every optimal C∗in the interior of F, then for all β that satisfies 0 < β < r −1 r (1 −2 p k(d + 1)/r), there exists c1, c2 > 0 such that for all δ > 0, with probability at least 1 −δ, we have R( ˆCn) −R(C∗) ≤ c1 + 4 (c2/δ)2/r n−β Moreover, when r →∞, β can be chosen arbitrarily close to 1. 7 Proof. We have E sup C∈F ℓ(C, X)r 1/r ≤ 1 2r E[∥X∥2 + ρ2]r 1/r ≤ 1 2E∥X∥2r + 1 2ρ2r 1/r ≤W < ∞, while standard results about VC-dimension of k-means clustering hypothesis class guarantees that C ≤k(d + 1) [Linder et al., 1994]. On the other hand, we can verify that E[ℓ(C, X) −ℓ(C′, X)]2 ≤Lρ∥C −C′∥2 2, which validates condition (i) in Lemma 3.7. The fact that the Hessian matrix of C →R(C) is positive definite at C∗prompts R( ˆCn)−R(C∗) ≥c∥ˆCn−C∗∥2 for some c > 0 in a neighborhood U around any optimal codebook C∗. Thus, Lemma 3.6 confirms the multi-scale Bernstein’s condition with γ = ((r −2)/(r −1), 1, . . . , 1). The inequality is then obtained from Theorem 3.3. 5 Discussion and future work We have shown that fast learning rates for heavy-tailed losses can be obtained for hypothesis classes with an integrable envelope when the loss satisfies the multi-scale Bernstein’s condition. We then verify those conditions and obtain new convergence rates for k-means clustering with heavy-tailed losses. The analyses extend and complement existing results in the literature from both theoretical and practical points of view. We also introduce a new fast-rate assumption, the multi-scale Bernstein’s condition, and provide a clear path to verify the assumption in practice. We believe that the multi-scale Bernstein’s condition is the proper assumption to study fast rates for unbounded losses, for its ability to separate the behaviors of the risk function on microscopic and macroscopic scales, for which the distinction can only be observed in an unbounded setting. There are several avenues for improvement. First, we would like to consider hypothesis class with polynomial entropy bounds. Similarly, the condition of independent and identically distributed observations can be replaced with mixing properties [Steinwart and Christmann, 2009, Hang and Steinwart, 2014, Dinh et al., 2015]. While the condition of integrable envelope is an improvement from the condition of sub-exponential envelope previously investigated in the literature, it would be interesting to see if the rates retain under weaker conditions, for example, the assumption that the Lr-diameter of the hypothesis class is bounded [Cortes et al., 2013]. Finally, the recent work of Brownlees et al. [2015], Hsu and Sabato [2016] about robust estimators as alternatives of ERM to study heavy-tailed losses has yielded more favorable learning rates under weaker conditions, and we would like to extend the result in this paper to study such estimators. Acknowledgement Vu Dinh was supported by DMS-1223057 and CISE-1564137 from the National Science Foundation and U54GM111274 from the National Institutes of Health. Lam Si Tung Ho was supported by NSF grant IIS 1251151. 8 References Andr´as Antos, L´aszl´o Gy¨orfi, and Andr´as Gy¨orgy. Individual convergence rates in empirical vector quantizer design. IEEE Transactions on Information Theory, 51(11):4013–4022, 2005. Peter L Bartlett, Tam´as Linder, and G´abor Lugosi. The minimax distortion redundancy in empirical quantizer design. IEEE Transactions on Information Theory, 44(5):1802–1813, 1998. Shai Ben-David. A framework for statistical clustering with constant time approximation algorithms for kmedian and k-means clustering. Machine Learning, 66(2):243–257, 2007. St´ephane Boucheron, G´abor Lugosi, and Pascal Massart. Concentration inequalities: A nonasymptotic theory of independence. OUP Oxford, 2013. Olivier Bousquet, St´ephane Boucheron, and G´abor Lugosi. Introduction to statistical learning theory. In Advanced lectures on machine learning, pages 169–207. Springer, 2004. Christian Brownlees, Emilien Joly, and G´abor Lugosi. Empirical risk minimization for heavy-tailed losses. The Annals of Statistics, 43(6):2507–2536, 2015. Corinna Cortes, Spencer Greenberg, and Mehryar Mohri. Relative deviation learning bounds and generalization with unbounded loss functions. arXiv:1310.5796, 2013. Vu Dinh, Lam Si Tung Ho, Nguyen Viet Cuong, Duy Nguyen, and Binh T Nguyen. Learning from non-iid data: Fast rates for the one-vs-all multiclass plug-in classifiers. In Theory and Applications of Models of Computation, pages 375–387. Springer, 2015. Peter Gr¨unwald. The safe Bayesian: learning the learning rate via the mixability gap. In Proceedings of the 23rd international conference on Algorithmic Learning Theory, pages 169–183. Springer-Verlag, 2012. Hanyuan Hang and Ingo Steinwart. Fast learning from α-mixing observations. Journal of Multivariate Analysis, 127:184–199, 2014. Daniel Hsu and Sivan Sabato. Loss minimization and parameter estimation with heavy tails. Journal of Machine Learning Research, 17(18):1–40, 2016. Guillaume Lecu´e and Shahar Mendelson. General nonexact oracle inequalities for classes with a subexponential envelope. The Annals of Statistics, 40(2):832–860, 2012. Guillaume Lecu´e and Shahar Mendelson. Learning sub-Gaussian classes: Upper and minimax bounds. arXiv:1305.4825, 2013. Johannes Lederer and Sara van de Geer. New concentration inequalities for suprema of empirical processes. Bernoulli, 20(4):2020–2038, 2014. Cl´ement Levrard. Fast rates for empirical vector quantization. Electronic Journal of Statistics, 7:1716–1746, 2013. Tam´as Linder, G´abor Lugosi, and Kenneth Zeger. Rates of convergence in the source coding theorem, in empirical quantizer design, and in universal lossy source coding. IEEE Transactions on Information Theory, 40(6):1728–1740, 1994. Nishant A Mehta and Robert C Williamson. From stochastic mixability to fast rates. In Advances in Neural Information Processing Systems, pages 1197–1205, 2014. Shahar Mendelson. Obtaining fast error rates in nonconvex situations. Journal of Complexity, 24(3):380–397, 2008. David Pollard. A central limit theorem for k-means clustering. The Annals of Probability, pages 919–926, 1982. Ingo Steinwart and Andreas Christmann. Fast learning from non-iid observations. In Advances in Neural Information Processing Systems, pages 1768–1776, 2009. Matus J Telgarsky and Sanjoy Dasgupta. Moment-based uniform deviation bounds for k-means and friends. In Advances in Neural Information Processing Systems, pages 2940–2948, 2013. Tim van Erven, Peter D Gr¨unwald, Nishant A Mehta, Mark D Reid, and Robert C Williamson. Fast rates in statistical and online learning. Journal of Machine Learning Research, 16:1793–1861, 2015. Tong Zhang. From ϵ-entropy to KL-entropy: Analysis of minimum information complexity density estimation. The Annals of Statistics, 34(5):2180–2210, 2006a. Tong Zhang. Information-theoretic upper and lower bounds for statistical estimation. IEEE Transactions on Information Theory, 52(4):1307–1321, 2006b. 9 | 2016 | 225 |
6,134 | Dynamic matrix recovery from incomplete observations under an exact low-rank constraint Liangbei Xu Mark A. Davenport Department of Electrical and Computer Engineering Georgia Institute of Technology Atlanta, GA 30318 lxu66@gatech.edu mdav@gatech.edu Abstract Low-rank matrix factorizations arise in a wide variety of applications – including recommendation systems, topic models, and source separation, to name just a few. In these and many other applications, it has been widely noted that by incorporating temporal information and allowing for the possibility of time-varying models, significant improvements are possible in practice. However, despite the reported superior empirical performance of these dynamic models over their static counterparts, there is limited theoretical justification for introducing these more complex models. In this paper we aim to address this gap by studying the problem of recovering a dynamically evolving low-rank matrix from incomplete observations. First, we propose the locally weighted matrix smoothing (LOWEMS) framework as one possible approach to dynamic matrix recovery. We then establish error bounds for LOWEMS in both the matrix sensing and matrix completion observation models. Our results quantify the potential benefits of exploiting dynamic constraints both in terms of recovery accuracy and sample complexity. To illustrate these benefits we provide both synthetic and real-world experimental results. 1 Introduction Suppose that X ∈Rn1×n2 is a rank-r matrix with r much smaller than n1 and n2. We observe X through a linear operator A : Rn1×n2 →Rm, y = A(X), y ∈Rm. In recent years there has been a significant amount of progress in our understanding of how to recover X from observations of this form even when the number of observations m is much less than the number of entries in X. (See [8] for an overview of this literature.) When A is a set of weighted linear combinations of the entries of X, this problem is often referred to as the matrix sensing problem. In the special case where A samples a subset of entries of X, it is known as the matrix completion problem. There are a number of ways to establish recovery guarantee in these settings. Perhaps the most popular approach for theoretical analysis in recent years has focused on the use of nuclear norm minimization as a convex surrogate for the (nonconvex) rank constraint [1, 3, 4, 5, 6, 7, 15, 19, 21, 22]. An alternative, however is to aim to directly solve the problem under an exact low-rank constraint. This leads a non-convex optimization problem, but has several computational advantages over most approaches to minimizing the nuclear norm and is widely used in large-scale applications (such as recommendation systems) [16]. In general, popular algorithms for solving the rank-constrained models – e.g., alternating minimization and alternating gradient descent – do not have as strong of convergence or recovery error guarantees due to the non-convexity of the rank constraint. However, there has been significant progress on this front in recent years [11, 10, 12, 13, 14, 23, 25], with many of these algorithms now having guarantees comparable to those for nuclear norm minimization. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Nearly all of this existing work assumes that the underlying low-rank matrix X remains fixed throughout the measurement process. In many practical applications, this is a tremendous limitation. For example, users’ preferences for various items may change (sometimes quite dramatically) over time. Modelling such drift of user’s preference has been proposed in the context of both music and movies as a way to achieve higher accuracy in recommendation systems [9, 17]. Another example in signal processing is dynamic non-negative matrix factorization for the blind signal separation problem [18]. In these and many other applications, explicitly modelling the dynamic structure in the data has led to superior empirical performance. However, our theoretical understanding of dynamic low-rank matrix recovery is still very limited. In this paper we provide the first theoretical results on the dynamic low-rank matrix recovery problem. We determine the sense in which dynamic constraints can help to recover the underlying time-varying low-rank matrix in a particular dynamic model and quantify this impact through recovery error bounds. To describe our approach, we consider a simple example where we have two rank-r matrices X1 and X2. Suppose that we have a set of observations for each of X1 and X2, given by yi = Ai Xi , i = 1, 2. The naïve approach is to use y1 to recover X1 and y2 to recover X2 separately. In this case the number of observations required to guarantee successful recovery is roughly mi ≥Cir max(n1, n2) for i = 1, 2 respectively, where C1, C2 are fixed positive constants (see [4]). However, if we know that X2 is close to X1 in some sense (for example, if X2 is a small perturbation of X1), then the above approach is suboptimal both in terms of recovery accuracy and sample complexity, since in this setting y1 actually contains information about X2 (and similarly, y2 contains information about X1). There are a variety of possible approaches to incorporating this additional information. The approach we will take is inspired by the LOWESS (locally weighted scatterplot smoothing) approach from non-parametric regression. In the case of this simple example, if we look just at the problem of estimating X2, our approach reduces to solving a problem of the form min X2 ∥A2(X2) −y2∥2 2 + λ∥A1(X2) −y1∥2 2 s.t. rank X2 ≤r, where λ is a parameter that determines how strictly we are enforcing the dynamic constraint (if X1 is very close to X2 we can set λ to be larger, but if X1 is far from X2 we will set it to be comparatively small). This approach generalizes naturally to the locally weighted matrix smoothing (LOWEMS) program described in Section 2. Note that it has a (simple) convex objective function, but a non-convex rank constraint. Our analysis in Section 3 shows that the proposed program outperforms the above naïve recovery strategy both in terms of recovery accuracy and sample complexity. We should emphasize that the proposed LOWEMS program is non-convex due to the exact lowrank constraint. Inspired by previous work on matrix factorization, we propose using an efficient alternating minimization algorithm (described in more detail in Section 4). We explicitly enforce the low-rank constraint by optimizing over a rank-r factorization and alternately minimize with respect to one of the factors while holding the other one fixed. This approach is popular in practice since it is typically less computationally complex than nuclear norm minimization based algorithms. In addition, thanks to recent work on global convergence guarantees for alternating minimization for low-rank matrix recovery [10, 13, 25], one can reasonably expect similar convergence guarantees to hold for alternating minimization in the context of LOWEMS, although we leave the pursuit of such guarantees for future work. To empirically verify our analysis, we perform both synthetic and real world experiments, described in Section 5. The synthetic experimental results demonstrate that LOWEMS outperforms the naïve approach in practice both in terms of recovery accuracy and sample complexity. We also demonstrate the effectiveness of LOWEMS in the context of recommendation systems. Before proceeding, we briefly state some of the notation that we will use throughout. For a vector x ∈Rn, we let ∥x∥p denote the standard ℓp norm. Given a matrix X ∈Rn1×n2, we use Xi: to denote the ith row of X and X:j to denote the jth column of X. We let ∥X∥F denote the the Frobenius norm, ∥X∥2 the operator norm, ∥X∥∗the nuclear norm, and ∥X∥∞= maxi,j |Xij| the elementwise infinity norm. Given a pair of matrices X, Y ∈Rn1×n2, we let ⟨X, Y ⟩= P i,j XijYij = Tr Y T X denote the standard inner product. Finally, we let nmax and nmin denote max{n1, n2} and min{n1, n2} respectively. 2 2 Problem formulation The underlying assumption throughout this paper is that our low-rank matrix is changing over time during the measurement process. For simplicity we will model this through the following discrete dynamic process: at time t, we have a low-rank matrix Xt ∈Rn1×n2 with rank r, which we assume is related to the matrix at previous time-steps via Xt = f(X1, . . . , Xt−1) + ϵt, where ϵt represents noise. Then we observe each Xt through a linear operator At : Rn1×n2 →Rmt, yt = At(Xt) + zt, yt, zt ∈Rmt, (1) where zt is measurement noise. In our problem we will suppose that we observe up to d time steps, and our goal is to recover {Xt}d t=1 jointly from {yt}d t=1. The above model is sufficiently flexible to incorporate a wide variety of dynamics, but we will make several simplifications. First, we note that we can impose the low-rank constraint explicitly by factorizing Xt as Xt = U t (V t)T , U t ∈Rn1×r, V t ∈Rn2×r. In general both U t and V t may be changing over time. However, in some applications, it is reasonable to assume that only one set of factors is changing. For example, in a recommendation system where our matrix represent user preferences, if the rows correspond to items and the columns correspond to users, then U t contains the latent properties of the items and V t models the latent preferences of the users. In this context it is reasonable to assume that only V t changes over time [9, 17], and that there is a fixed matrix U (which we may assume to be orthonormal) such that we can write Xt = UV t for all t. Similar arguments can be made in a variety of other applications, including personalized learning systems, blind signal separation, and more. Second, we assume a Markov property on f, so that Xt (or equivalently, V t) only depends on the previous Xt−1 (or V t−1). Furthermore, although other dynamic models could be accommodated, for the sake of simplicity in our analysis we consider the simple model on V t where V t = V t−1 + ϵt, t = 2, . . . , d. (2) We will also assume that both ϵt and the measurement noise zt are i.i.d. zero-mean Gaussian noise. To simplify our discussion, we will assume that our goal is to recover the matrix at the most recent time-step, i.e., we wish to estimate Xd from {yt}d t=1. Our general approach can be stated as follows. The LOWEMS estimator is given by the following optimization program: ˆXd = arg min X∈C(r) L (X) = arg min X∈C(r) 1 2 d X t=1 wt
At (X) −yt
2 2 , (3) where C(r) = {X ∈Rn1×n2 : rank(X) ≤r}, and {wt}d t=1 are non-negative weights. We further assume Pd t=1 wt = 1 to avoid ambiguity. In the following section we provide bounds on the performance of the LOWEMS estimator for two common choices of operators At. 3 Recovery error bounds Given the estimator ˆXd from (3), we define the recovery error to be ∆d := ˆXd −Xd. Our goal in this section will be to provide bounds on ∥ˆXd −Xd∥F under two common observation models. Our analysis builds on the following (deterministic) inequality. Proposition 3.1. Both the estimator ˆXd by (3) and (9) satisfies d X t=1 wt
At ∆d
2 2 ≤2 √ 2r
d X t=1 wtAt∗ ht −zt
2
∆d
F , (4) where ht = At Xd −Xt and At∗is the adjoint operator of At. This is a deterministic result that holds for any set of {At}. The remaining work is to lower bound the LHS of (4), and upper bound the RHS of (4) for concrete choices of {At}. In the following sections we derive such bounds in the settings of both Gaussian matrix sensing and matrix completion. For simplicity and without loss of generality, we will assume m1 = . . . = md =: m0, so that the total number of observations is simply m = dm0. 3 3.1 Matrix sensing setting For the matrix sensing problem, we will consider the case where all operators At correspond to Gaussian measurement ensembles, defined as follows. Definition 3.2. [4] A linear operator A : Rn1×n2 →Rm is a Gaussian measurement ensemble if we can express each entry of A (X) as [A (X)]i = ⟨Ai, X⟩for a matrix Ai whose entries are i.i.d. according to N (0, 1/m), and where the matrices A1, . . . , Am are independent from each other. Also, we define the matrix restricted isometry property (RIP) for a linear map A. Definition 3.3. [4] For each integer r = 1, . . . , nmin, the isometry constant δr of A is the smallest quantity such that (1 −δr) ∥X∥2 F ≤∥A (X)∥2 2 ≤(1 + δr) ∥X∥2 F holds for all matrices X of rank at most r. An important result (that we use in the proof of Theorem 3.4) is that Gaussian measurement ensembles satisfy the matrix RIP with high probability provided m ≥Crnmax. See, for example, [4] for details. To obtain an error bound in the matrix sensing case we lower bound the LHS of (4) using the matrix RIP and upper bound the stochastic error (the RHS of (4)) using a covering argument. The following is our main result in the context of matrix setting. Theorem 3.4. Suppose that we are given measurements as in (1) where all At’s are Gaussian measurement ensembles. Assume that Xt evolves according to (2) and has rank r. Further assume that the measurement noise zt is i.i.d. N 0, σ2 1 for 1 ≤t ≤d and that the perturbation noise ϵt is i.i.d. N 0, σ2 2 for 2 ≤t ≤d. If m0 ≥D1 max ( nmaxr d X t=1 w2 t , nmax ) , (5) where D1 is a fixed positive constant, then the estimator ˆXd from (3) satisfies
∆d
2 F ≤C0 d X t=1 w2 t σ2 1 + d−1 X t=1 (d −t)w2 t σ2 2 ! nmaxr (6) with probability at least P1 = 1 −dC1 exp (−c1n2), where C0, C1, c1 are positive constants. If we choose the weights as wd = 1 and wt = 0 for 1 ≤t ≤d −1, the bound in Theorem 3.4 reduces to a bound matching classical (static) matrix recovery results (see, for example, [4] Theorem 2.4). Also note that in this case Theorem 3.4 implies exact recovery when the sample complexity is O(rn/d). In order to help interpret this result for other choices of the weights, we note that for a given set of parameters, we can determine the optimal weights that will minimize this bound. Towards this end, we define κ := σ2 2/σ2 1 and set pt = (d −t), 1 ≤t ≤d. Then one can calculate the optimal weights by solving the following quadratic program: {w∗ t }d t=1 = arg min P t wt=1; wt≥0 d X t=1 w2 t + d−1 X t=1 ptκw2 t . (7) Using the method of Lagrange multipliers one can show that (7) has the analytical solution: w∗ j = 1 Pd i=1 1 1+piκ 1 1 + pjκ, 1 ≤j ≤d. (8) A simple special case occurs when σ2 = 0. In this case all V t’s are the same, and the optimal weights go to wt = 1 d for all t. In contrast, when σ2 grows large the weights eventually converge to wd = 1 and wt = 0 for all t ̸= d. This results in essentially using only yd to recover Xd and ignoring the rest of the measurements. Combining these, we note that when the σ2 is small, we can gain by a factor of approximately d over the naïve strategy that ignores dynamics and tries to recover Xd using only yd. Notice also that the minimum sample complexity is proportional to Pd t=1 w2 t when r/d is relatively large. Thus, when σ2 is small, the required number of measurements can be reduced by a factor of d compared to what would be required to recover Xd using only yd. 4 3.2 Matrix completion setting For the matrix completion problem, we consider the following simple uniform sampling ensemble: Definition 3.5. A linear operator A : Rn1×n2 →Rm is a uniform sampling ensemble (with replacement) if all sensing matrices Ai are i.i.d. uniformly distributed on the set X = ej (n1) eT k (n2) , 1 ≤j ≤n1, 1 ≤k ≤n2 , where ej (n) are the canonical basis vectors in Rn. We let p = m0/(n1n2) denote the fraction of sampled entries. For this observation architecture, our analysis is complicated by the fact that it does not satisfy the matrix RIP. (A quick problematic example is a rank-1 matrix with only one non-zero entry.) To handle this we follow the typical approach and restrict our focus to matrices that satisfy certain incoherence properties. Definition 3.6. (Subspace incoherence [10]) Let U ∈Rn×r be the orthonormal basis for an rdimensional subspace U, then the incoherence of U is defined as µ(U) := maxi∈[n] √n √r
eT i U
2, where ei denotes the ith standard basis vector. We also simply denote µ(span(U)) as µ(U). Definition 3.7. (Matrix incoherence [13]) A rank-r matrix X ∈Rn1×n2 with SVD X = UΣV T is incoherent with parameter µ if ∥U:i∥2 ≤µ√r √n1 for any i ∈[n1] and ∥V:j∥2 ≤µ√r √n2 for any j ∈[n2], i.e., the subspaces spanned by the columns of U and V are both µ-incoherent. The incoherence assumption guarantees that X is far from sparse, which make it possible to recover X from incomplete measurements since a measurement contains roughly the same amount of information for all dimensions. To proceed we also assume that the matrix Xd has “bounded spikiness” in that the maximum entry of Xd is bounded by a, i.e.,
Xd
∞≤a. To exploit the spikiness constraint below we replace the optimization constraints C (r) in (3) with C (r, a) :== {X ∈Rn1×n2 : rank (X) ≤r, ∥X∥∞≤a}: ˆXd = arg min X∈C(r,a) L (X) = arg min X∈C(r,a) 1 2 d X t=1 wt
At (X) −yt
2 2 . (9) Note that Proposition 3.1 still holds for (9). To obtain an error bound in the matrix completion case, we lower bound the LHS of 4 using a restricted convexity argument (see, for example, [20]) and upper bound the RHS using matrix Bernstein inequality. The result of this approach is the following theorem. Theorem 3.8. Suppose that we are given measurements as in (1) where all At’s are uniform sampling ensembles. Assume that Xt evolves according to (2), has rank r, and is incoherent with parameter µ0 and
Xd
∞≤a. Further assume that the perturbation noise and the measurement noise satisfy the same assumptions in Theorem 3.4. If m0 ≥D2nmin log2(n1 + n2)φ′(w), (10) where φ′(w) = maxt w2 t((d−t)µ2 0rσ2 2/n1+σ2 1) Pd t=1 w2 t((d−t)σ2 2+σ2 1) , then the estimator ˆXd from (9) satisfies
∆d
2 F ≤max B1 := C2a2n1n2 sPd t=1 w2 t log(n1 + n2) m0 , B2 , (11) with probability at least P1 = 1 −5/(n1 + n2) −5dnmax exp(−nmin), where B2 = C3rn2 1n2 2 log(n1 + n2) nminm0 d X t=1 w2 t σ2 1 + d−1 X t=1 (d −t)w2 t σ2 2 ! + d X t=1 w2 t a2 ! , (12) and C2, C3, D2 are absolute positive constants. 5 If we choose the weights as wd = 1 and wt = 0 for 1 ≤t ≤d −1, the bound in Theorem 3.8 reduces to a result comparable to classical (static) matrix completion results (see, for example, [15] Theorem 7). Moreover, from the B2 term in (11), we obtain the same dependence on m as that of (6), i.e., 1/m. However, there are also a few key differences between Theorem 3.4 and our results for matrix completion. In general the bound is loose in several aspects compared to the matrix sensing bound. For example, when m0 is small, B1 actually dominates, in which case the dependence on m is actually 1/√m instead of 1/m. When m0 is sufficiently large, then B2 dominates, in which case we can consider two cases. The first case corresponds to when a is relatively large compared to σ1, σ2 – i.e., the low-rank matrix is spiky. In this case the term containing a2 in B2 dominates, and the optimal weights are equal weights of 1/d. This occurs because the term involving a dominates and there is little improvement to be obtained by exploiting temporal dynamics. In the second case, when a is relatively small compared to σ1, σ2 (which is usually the case in practice), the bound can be simplified to ∥∆∥2 F ≤c3rn2 1n2 2 log(n1 + n2) nminm0 d X t=1 w2 t σ2 1 + d−1 X t=1 (d −t)w2 t σ2 2 !! . The above bound is much more similar to the bound in (6) from Theorem 3.4. In fact, we can also obtain the optimal weights by solving the same quadratic program as (7). When n1 ≈n2, the sample complexity is Θ(nmin log2(n1 + n2)φ′(w)). In this case Theorem 3.8 also implies a similar sample complexity reduction as we observed in the matrix sensing setting. However, the precise relations between sample complexity and weights wt’s are different in these two cases (deriving from the fact that the proof uses matrix Bernstein inequalities in the matrix completion setting rather than concentration inequalities of Chi-squared variables as in the matrix sensing setting). 4 An algorithm based on alternating minimization As noted in Section 2, any rank-r matrix can be factorized as X = UV T where U is n1 × r and V is n2 × r, therefore the LOWEMS estimator in (3) can be reformulated as ˆXd = arg min X∈C(r) L (X) = arg min X=UV T d X t=1 1 2wt
At UV T −yt
2 2 . (13) The above program can be solved by alternating minimization (see [17]), which alternatively minimizes the objective function over U (or V ) while holding V (or U) fixed until a stopping criterion is reached. Since the objective function is quadratic, each step in this procedure reduces to conventional weighted least squares, which can be solved via efficient numerical procedures. Theoretical guarantees for global convergence of alternating minimization for the static matrix sensing/completion problem have recently been established in [10, 13, 25] by treating the alternating minimization as a noisy version of the power method. Extending these results to establish convergence guarantees for (13) would involve analyzing a weighted power method. We leave this analysis for future work, but expect that similar convergence guarantees should be possible in this setting. 5 Simulations and experiments 5.1 Synthetic simulations Our synthetic simulations consider both matrix sensing and matrix completion, but with an emphasis on matrix completion. We set n1 = 100, n2 = 50, d = 4 and r = 5. We consider two baselines: baseline one is only using yd to recover Xd and simply ignoring y1, . . . yd−1; baseline two is using {yt}d t=1 with equal weights. Note that both of these can be viewed as special cases of LOWEMS with weights (0, . . . , 0, 1) and ( 1 d, 1 d, . . . , 1 d) respectively. Recalling the formula for the optimal choice of weights in (8), it is easy to show that baseline one is equivalent to the case where κ = (σ2 2)/(σ2 1) →∞ and the baseline two equivalent to the case where κ →0. This also makes intuitive sense since κ →∞means the perturbation is arbitrarily large between time steps, while κ →0 reduces to the static setting. 6 (a) 10 −2 10 −1 10 0 0 0.005 0.01 0.015 0.02 0.025 0.03 σ2 Recovery Error Baseline one Baseline two LOWEMS (b) 10-2 10-1 100 101 σ2 0 0.01 0.02 0.03 0.04 0.05 0.06 Recovery Error Baseline one Baseline two LOWEMS Figure 1: Recovery error under different levels of perturbation noise. (a) matrix sensing. (b) matrix completion. 10 −3 10 −2 10 −1 10 0 10 1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 σ2 Sample Complexity p Baseline one LOWEMS Baseline two Figure 2: Sample complexity under different levels of perturbation noise (matrix completion). 1). Recovery error. In this simulation, we set m0 = 4000 and set the measurement noise level σ1 to 0.05. We vary the perturbation noise level σ2. For every pair of (σ1, σ2) we perform 10 trials, and show the average relative recovery error
∆d
2 F /
Xd
2 F . Figure 1 illustrates how LOWEMS reduces the recovery error compared to our baselines. As one can see, when σ2 is small, the optimal κ, i.e., σ2 2/σ2 1, generates nearly equal weights (baseline two), reducing recovery error approximately by a factor of 4 over baseline one, which is roughly equal to d as expected. As σ2 grows, the recovery error of baseline two will increase dramatically due to the perturbation noise. However in this case the optimal κ of LOWEMS grows with it, leading to a more uneven weighting and to somewhat diminished performance gains. We also note that, as expected, LOWEMS converges to baseline one when σ2 is large. 2). Sample complexity. In the interest of conciseness we only provide results here for the matrix completion setting (matrix sensing yields broadly similar results). In this simulation we vary the fraction of observed entries p to empirically find the minimum sample complexity required to guarantee successful recovery (defined as a relative error ≤0.08). We compare the sample complexity of the proposed LOWEMS to baseline one and baseline two under different perturbation noise level σ2 (σ1 is set as 0.02). For a certain σ2, the relative recovery error is the averaged over 10 trials. Figure 2 illustrates how LOWEMS reduces the sample complexity required to guarantee successful recovery. When the perturbation noise is weaker than the measurement noise, the sample complexity can be reduced approximately by a factor of d compared to baseline one. When the perturbation noise is much stronger than measurement noise, the recovery error of baseline two will increase due to the perturbation noise and hence the sample complexity increase rapidly. However in this case proposed LOWEMS still achieves relatively small sample complexity and its sample complexity converges to baseline one when σ2 is relatively large. 7 (a) 1 3 6 8 # of bins 0.871 0.872 0.873 0.874 0.875 0.876 0.877 RMSE (b) 10-2 10-1 100 101 κ 0.745 0.75 0.755 0.76 0.765 0.77 0.775 0.78 RMSE d = 1 d = 3 d = 6 d = 8 Figure 3: Experimental results on truncated Netflix dataset. (a) Testing RMSE vs. number of time steps. (b) Validation RMSE vs. κ. 5.2 Real world experiments We next test the LOWEMS approach in the context of a recommendation system using the (truncated) Netflix dataset. We eliminate those movies with few ratings, and those users rating few movies, and generate a truncated dataset with 3199 users, 1042 movies, 2462840 ratings, and hence the fraction of visible entries in the rating matrix is ≈0.74. All the ratings are distributed over a period of 2191 days. For the sake of robustness, we additionally impose a Frobenius norm penalty on the factor matrices U and V in (13). We keep the latest (in time) 10% of the ratings as a testing set. The remaining ratings are split into a validation set and a training set for the purpose of cross validation. We divide the remaining ratings into d ∈{1, 3, 6, 8} bins respectively with same time period according to their timestamps. We use 5-fold cross validation, and we keep 1/5 of the ratings from the dth bin as a validation set. The number of latent factors r is set to 10. The Frobenius norm regularization parameter γ is set to 1. We also note that in practice one likely has no prior information on σ1, σ2 and hence κ. However, we use model selection techniques like cross validation to select the best κ incorporating the unknown prior information on measurement/perturbation noise. We use root mean squared error (RMSE) to measure prediction accuracy. Since alternating minimization uses a random initialization, we generate 10 test RMSE’s (using a boxplot) for the same testing set. Figure 3(a) shows that the proposed LOWEMS estimator improves the testing RMSE significantly with appropriate κ. Additionally, the performance improvement increases as d gets larger. To further investigate how the parameter κ affects accuracy, we also show the validation RMSE compared to κ in Figure 3(b). When κ ≈1, LOWEMS achieves the best RMSE on the validation data. This further demonstrates that imposing an appropriate dynamic constraint should improve recovery accuracy in practice. 6 Conclusion In this paper we consider the low-rank matrix recovery problem in a novel setting, where one of the factor matrices changes over time. We propose the locally weighted matrix smoothing (LOWEMS) framework, and have established error bounds for LOWEMS in both the matrix sensing and matrix completion cases. Our analysis quantifies how the proposed estimator improves recovery accuracy and reduces sample complexity compared to static recovery methods. Finally, we provide both synthetic and real world experimental results to verify our analysis and demonstrate superior empirical performance when exploiting dynamic constraints in a recommendation system. Acknowledge This work was supported by grants NRL N00173-14-2-C001, AFOSR FA9550-14-1-0342, NSF CCF-1409406, CCF-1350616, and CMMI-1537261. 8 References [1] A. Agarwal, S. Negahban, and M. Wainwright. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. Ann. Stat., 40(2):1171–1197, 2012. [2] P. Bühlmann and S. Van De Geer. Statistics for high-dimensional data: Methods, theory and applications. Springer-Verlag Berlin Heidelberg, 2011. [3] E. Candès and Y. Plan. Matrix completion with noise. Proc. IEEE, 98(6):925–936, 2010. [4] E. Candès and Y. Plan. Tight oracle inequalities for low-rank matrix recovery from a minimal number of noisy random measurements. IEEE Trans. Inform. Theory, 57(4):2342–2359, 2011. [5] E. Candès and B. Recht. Exact matrix completion via convex optimization. Found. Comput. Math., 9(6):717–772, 2009. [6] E. Candès and T. Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Trans. Inform. Theory, 56(5):2053–2080, 2010. [7] M. Davenport, Y. Plan, E. van den Berg, and M. Wootters. 1-bit matrix completion. Inf. Inference, 3(3):189–223, 2014. [8] M. Davenport and J. Romberg. An overview of low-rank matrix recovery from incomplete observations. IEEE J. Select. Top. Signal Processing, 10(4):608–622, 2016. [9] G. Dror, N. Koenigstein, Y. Koren, and M. Weimer. The Yahoo! music dataset and KDD-Cup’11. In Proc. ACM SIGKDD Int. Conf. on Knowledge, Discovery, and Data Mining (KDD), San Diego, CA, Aug. 2011. [10] M. Hardt. Understanding alternating minimization for matrix completion. In Proc. IEEE Symp. Found. Comp. Science (FOCS), Philadelphia, PA, Oct. 2014. [11] M. Hardt and M. Wootters. Fast matrix completion without the condition number. In Proc. Conf. Learning Theory, Barcelona, Spain, June 2014. [12] P. Jain and P. Netrapalli. Fast exact matrix completion with finite samples. In Proc. Conf. Learning Theory, Paris, France, July 2015. [13] P. Jain, P. Netrapalli, and S. Sanghavi. Low-rank matrix completion using alternating minimization. In Proc. ACM Symp. Theory of Comput., Stanford, CA, June 2013. [14] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from noisy entries. In Proc. Adv. in Neural Processing Systems (NIPS), Vancouver, BC, Dec. 2009. [15] O. Klopp. Noisy low-rank matrix completion with general sampling distribution. Bernoulli, 20(1):282–303, 2014. [16] Y. Koren. The Bellkor solution to the Netflix grand prize, 2009. [17] Y. Koren. Collaborative filtering with temporal dynamics. Comm. ACM, 53(4):89–97, 2010. [18] N. Mohammadiha, P. Smaragdis, G. Panahandeh, and S. Doclo. A state-space approach to dynamic nonnegative matrix factorization. IEEE Trans. Signal Processing, 63(4):949–959, 2015. [19] S. Negahban and M. Wainwright. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. Ann. Stat., 39(2):1069–1097, 2011. [20] S. Negahban and M. Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. J. Machine Learning Research, 13(1):1665–1697, 2012. [21] B. Recht, M. Fazel, and P. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Rev., 52(3):471–501, 2010. [22] B. Recht, W. Xu, and B. Hassibi. Necessary and sufficient conditions for success of the nuclear norm heuristic for rank minimization. In Proc. IEEE Conf. on Decision and Control (CDC), Cancun, Mexico, Dec. 2008. [23] R. Sun and Z.-Q. Luo. Guaranteed matrix completion via nonconvex factorization. In Proc. IEEE Symp. Found. Comp. Science (FOCS), Berkeley, CA, Oct. 2015. [24] J. A. Tropp. An introduction to matrix concentration inequalities. Found. Trends Mach. Learning, 8(1–2):1–230, 2015. [25] T. Zhao, Z. Wang, and H. Liu. A nonconvex optimization framework for low rank matrix estimation. In Proc. Adv. in Neural Processing Systems (NIPS), Montréal, QC, Dec. 2015. 9 | 2016 | 226 |
6,135 | Tight Complexity Bounds for Optimizing Composite Objectives Blake Woodworth Toyota Technological Institute at Chicago Chicago, IL, 60637 blake@ttic.edu Nathan Srebro Toyota Technological Institute at Chicago Chicago, IL, 60637 nati@ttic.edu Abstract We provide tight upper and lower bounds on the complexity of minimizing the average of m convex functions using gradient and prox oracles of the component functions. We show a significant gap between the complexity of deterministic vs randomized optimization. For smooth functions, we show that accelerated gradient descent (AGD) and an accelerated variant of SVRG are optimal in the deterministic and randomized settings respectively, and that a gradient oracle is sufficient for the optimal rate. For non-smooth functions, having access to prox oracles reduces the complexity and we present optimal methods based on smoothing that improve over methods using just gradient accesses. 1 Introduction We consider minimizing the average of m ≥2 convex functions: min x2X ( F(x) := 1 m m X i=1 fi(x) ) (1) where X ✓Rd is a closed, convex set, and where the algorithm is given access to the following gradient (or subgradient in the case of non-smooth functions) and prox oracle for the components: hF (x, i, β) = ⇥ fi(x), rfi(x), proxfi(x, β) ⇤ (2) where proxfi(x, β) = arg min u2X ⇢ fi(u) + β 2 kx −uk2 ' (3) A natural question is how to leverage the prox oracle, and how much benefit it provides over gradient access alone. The prox oracle is potentially much more powerful, as it provides global, rather then local, information about the function. For example, for a single function (m = 1), one prox oracle call (with β = 0) is sufficient for exact optimization. Several methods have recently been suggested for optimizing a sum or average of several functions using prox accesses to each component, both in the distributed setting where each components might be handled on a different machine (e.g. ADMM [7], DANE [18], DISCO [20]) or for functions that can be decomposed into several “easy” parts (e.g. PRISMA [13]). But as far as we are aware, no meaningful lower bound was previously known on the number of prox oracle accesses required even for the average of two functions (m = 2). The optimization of composite objectives of the form (1) has also been extensively studied in the context of minimizing empirical risk over m samples. Recently, stochastic methods such as SDCA [16], SAG [14], SVRG [8], and other variants, have been presented which leverage the finite nature of the problem to reduce the variance in stochastic gradient estimates and obtain guarantees that dominate both batch and stochastic gradient descent. As methods with improved complexity, such 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. L-Lipschitz γ-Smooth Convex, λ-Strongly Convex, λ-Strongly kxk B Convex kxk B Convex Deterministic Upper mLB ✏ mL p λ✏ m q γB2 ✏ m p γ λ log ✏0 ✏ (Section 3) (Section 3) (AGD) (AGD) Lower mLB ✏ mL p λ✏ m q γB2 ✏ m p γ λ log ✏0 ✏ (Section 4) (Section 4) (Section 4) (Section 4) Randomized Upper L2B2 ✏2 ^ ⇣ m log 1 ✏+ pmLB ✏ ⌘ L2 λ✏^ ⇣ m log 1 ✏+ pmL p λ✏ ⌘ m log ✏0 ✏+ q mγB2 ✏ $ m+ pmγ λ & log ✏0 ✏ (SGD, A-SVRG) (SGD, A-SVRG) (A-SVRG) (A-SVRG) Lower L2B2 ✏2 ^ ⇣ m+ pmLB ✏ ⌘ L2 λ✏^ ⇣ m+ pmL p λ✏ ⌘ m + q mγB2 ✏ m + p mγ λ log ✏0 ✏ (Section 5) (Section 5) (Section 5) (Section 5) Table 1: Upper and lower bounds on the number of grad-and-prox oracle accesses needed to find ✏-suboptimal solutions for each function class. These are exact up to constant factors except for the lower bounds for smooth and strongly convex functions, which hide extra log λ/γ and log p mλ/γ factors for deterministic and randomized algorithms. Here, ✏0 is the suboptimality of the point 0. as accelerated SDCA [17], accelerated SVRG, and KATYUSHA [3], have been presented, researchers have also tried to obtain lower bounds on the best possible complexity in this settings—but as we survey below, these have not been satisfactory so far. In this paper, after briefly surveying methods for smooth, composite optimization, we present methods for optimizing non-smooth composite objectives, which show that prox oracle access can indeed be leveraged to improve over methods using merely subgradient access (see Section 3). We then turn to studying lower bounds. We consider algorithms that access the objective F only through the oracle hF and provide lower bounds on the number of such oracle accesses (and thus the runtime) required to find ✏-suboptimal solutions. We consider optimizing both Lipschitz (non-smooth) functions and smooth functions, and guarantees that do and do not depend on strong convexity, distinguishing between deterministic optimization algorithms and randomized algorithms. Our upper and lower bounds are summarized in Table 1. As shown in the table, we provide matching upper and lower bounds (up to a log factor) for all function and algorithm classes. In particular, our bounds establish the optimality (up to log factors) of accelerated SDCA, SVRG, and SAG for randomized finite-sum optimization, and also the optimality of our deterministic smoothing algorithms for non-smooth composite optimization. On the power of gradient vs prox oracles For non-smooth functions, we show that having access to prox oracles for the components can reduce the polynomial dependence on ✏from 1/✏2 to 1/✏, or from 1/(λ✏) to 1/ p λ✏for λ-strongly convex functions. However, all of the optimal complexities for smooth functions can be attained with only component gradient access using accelerated gradient descent (AGD) or accelerated SVRG. Thus the worst-case complexity cannot be improved (at least not significantly) by using the more powerful prox oracle. On the power of randomization We establish a significant gap between deterministic and randomized algorithms for finite-sum problems. Namely, the dependence on the number of components must be linear in m for any deterministic algorithm, but can be reduced to pm (in the typically significant term) using randomization. We emphasize that the randomization here is only in the algorithm—not in the oracle. We always assume the oracle returns an exact answer (for the requested component) and is not a stochastic oracle. The distinction is that the algorithm is allowed to flip coins in deciding what operations and queries to perform but the oracle must return an exact answer to that query (of course, the algorithm could simulate a stochastic oracle). Prior Lower Bounds Several authors recently presented lower bounds for optimizing (1) in the smooth and strongly convex setting using component gradients. Agarwal and Bottou [1] presented a lower bound of ⌦ * m + p mγ λ log 1 ✏ + . However, their bound is valid only for deterministic algorithms (thus not including SDCA, SVRG, SAG, etc.)—we not only consider randomized algorithms, but also show a much higher lower bound for deterministic algorithms (i.e. the bound of Agarwal 2 and Bottou is loose). Improving upon this, Lan [9] shows a similar lower bound for a restricted class of randomized algorithms: the algorithm must select which component to query for a gradient by drawing an index from a fixed distribution, but the algorithm must otherwise be deterministic in how it uses the gradients, and its iterates must lie in the span of the gradients it has received. This restricted class includes SAG, but not SVRG nor perhaps other realistic attempts at improving over these. Furthermore, both bounds allow only gradient accesses, not prox computations. Thus SDCA, which requires prox accesses, and potential variants are not covered by such lower bounds. We prove as similar lower bound to Lan’s, but our analysis is much more general and applies to any randomized algorithm, making any sequence of queries to a gradient and prox oracle, and without assuming that iterates lie in the span of previous responses. In addition to smooth functions, we also provide lower bounds for non-smooth problems which were not considered by these previous attempts. Another recent observation [15] was that with access only to random component subgradients without knowing the component’s identity, an algorithm must make ⌦(m2) queries to optimize well. This shows how relatively subtle changes in the oracle can have a dramatic effect on the complexity of the problem. Since the oracle we consider is quite powerful, our lower bounds cover a very broad family of algorithms, including SAG, SVRG, and SDCA. Our deterministic lower bounds are inspired by a lower bound on the number of rounds of communication required for optimization when each fi is held by a different machine and when iterates lie in the span of certain permitted calculations [5]. Our construction for m = 2 is similar to theirs (though in a different setting), but their analysis considers neither scaling with m (which has a different role in their setting) nor randomization. Notation and Definitions We use k·k to denote the standard Euclidean norm on Rd. We say that a function f is L-Lipschitz continuous on X if 8x, y 2 X |f(x) −f(x)| L kx −yk; γ-smooth on X if it is differentiable and its gradient is γ-Lipschitz on X; and λ-strongly convex on X if 8x, y 2 X fi(y) ≥fi(x) + hrfi(x), y −xi + λ 2 kx −yk2. We consider optimizing (1) under four combinations of assumptions: each component fi is either L-Lipschitz or γ-smooth, and either F(x) is λ-strongly convex or its domain is bounded, X ✓{x : kxk B}. 2 Optimizing Smooth Sums We briefly review the best known methods for optimizing (1) when the components are γ-smooth, yielding the upper bounds on the right half of Table 1. These upper bounds can be obtained using only component gradient access, without need for the prox oracle. We can obtain exact gradients of F(x) by computing all m component gradients rfi(x). Running accelerated gradient descent (AGD) [12] on F(x) using these exact gradients achieves the upper complexity bounds for deterministic algorithms and smooth problems (see Table 1). SAG [14], SVRG [8] and related methods use randomization to sample components, but also leverage the finite nature of the objective to control the variance of the gradient estimator used. Accelerating these methods using the Catalyst framework [10] ensures that for λ-strongly convex objectives we have E ⇥ F(x(k)) −F(x⇤) ⇤ < ✏after k = O ** m + p mγ λ + log2 ✏0 ✏ + iterations, where F(0) −F(x⇤) = ✏0. KATYUSHA [3] is a more direct approach to accelerating SVRG which avoids extraneous log-factors, yielding the complexity k = O ** m + p mγ λ + log ✏0 ✏ + indicated in Table 1. When F is not strongly convex, adding a regularizer to the objective and instead optimizing Fλ(x) = F(x) + λ 2 kxk2 with λ = ✏/B2 results in an oracle complexity of O ✓✓ m + q mγB2 ✏ ◆ log ✏0 ✏ ◆ . The log-factor in the second term can be removed using the more delicate reduction of Allen-Zhu and Hazan [4], which involves optimizing Fλ(x) for progressively smaller values of λ, yielding the upper bound in the table. KATYUSHA and Catalyst-accelerated SAG or SVRG use only gradients of the components. Accelerated SDCA [17] achieves a similar complexity using gradient and prox oracle access. 3 Leveraging Prox Oracles for Lipschitz Sums In this section, we present algorithms for leveraging the prox oracle to minimize (1) when each component is L-Lipschitz. This will be done by using the prox oracle to “smooth” each component, 3 and optimizing the new, smooth sum which approximates the original problem. This idea was used in order to apply KATYUSHA [3] and accelerated SDCA [17] to non-smooth objectives. We are not aware of a previous explicit presentation of the AGD-based deterministic algorithm, which achieves the deterministic upper complexity indicated in Table 1. The key is using a prox oracle to obtain gradients of the β-Moreau envelope of a non-smooth function, f, defined as: f (β)(x) = inf u2X f(u) + β 2 kx −uk2 (4) Lemma 1 ([13, Lemma 2.2], [6, Proposition 12.29], following [11]). Let f be convex and LLipschitz continuous. For any β > 0, 1. f (β) is β-smooth 2. r(f (β))(x) = β(x −proxf(x, β)) 3. f (β)(x) f(x) f (β)(x) + L2 2β Consequently, we can consider the smoothed problem min x2X ( ˜F (β)(x) := 1 m m X i=1 f (β) i (x) ) . (5) While ˜F (β) is not, in general, the β-Moreau envelope of F, it is β-smooth, we can calculate the gradient of its components using the oracle hF , and ˜F (β)(x) F(x) ˜F (β)(x) + L2 2β . Thus, to obtain an ✏-suboptimal solution to (1) using hF , we set β = L2/✏and apply any algorithm which can optimize (5) using gradients of the L2/✏-smooth components, to within ✏/2 accuracy. With the rates presented in Section 2, using AGD on (5) yields a complexity of O * mLB ✏ + in the deterministic setting. When the functions are λ-strongly convex, smoothing with a fixed β results in a spurious log-factor. To avoid this, we again apply the reduction of Allen-Zhu and Hazan [4], this time optimizing ˜F (β) for increasingly large values of β. This leads to the upper bound of O ⇣ mL p λ✏ ⌘ when used with AGD (see Appendix A for details). Similarly, we can apply an accelerated randomized algorithm (such as KATYUSHA) to the smooth problem ˜F (β) to obtain complexities of O ⇣ m log ✏0 ✏+ pmLB ✏ ⌘ and O ⇣ m log ✏0 ✏+ pmL p λ✏ ⌘ —this matches the presentation of Allen-Zhu [3] and is similar to that of Shalev-Shwartz and Zhang [17]. Finally, if m > L2B2/✏2 or m > L2/(λ✏), stochastic gradient descent is a better randomized alternative, yielding complexities of O(L2B2/✏2) or O(L2/(λ✏)). 4 Lower Bounds for Deterministic Algorithms We now turn to establishing lower bounds on the oracle complexity of optimizing (1). We first consider only deterministic optimization algorithms. What we would like to show is that for any deterministic optimization algorithm we can construct a “hard” function for which the algorithm cannot find an ✏-suboptimal solution until it has made many oracle accesses. Since the algorithm is deterministic, we can construct such a function by simulating the (deterministic) behavior of the algorithm. This can be viewed as a game, where an adversary controls the oracle being used by the algorithm. At each iteration the algorithm queries the oracle with some triplet (x, i, β) and the adversary responds with an answer. This answer must be consistent with all previous answers, but the adversary ensures it is also consistent with a composite function F that the algorithm is far from optimizing. The “hard” function is then gradually defined in terms of the behavior of the optimization algorithm. To help us formulate our constructions, we define a “round” of queries as a series of queries in which d m 2 e distinct functions fi are queried. The first round begins with the first query and continues until exactly d m 2 e unique functions have been queried. The second round begins with the next query, and continues until exactly d m 2 e more distinct components have been queried in the second round, and so on until the algorithm terminates. This definition is useful for analysis but requires no assumptions about the algorithm’s querying strategy. 4 4.1 Non-Smooth Components We begin by presenting a lower bound for deterministic optimization of (1) when each component fi is convex and L-Lipschitz continuous, but is not necessarily strongly convex, on the domain X = {x : kxk B}. Without loss of generality, we can consider L = B = 1. We will construct functions of the following form: fi(x) = 1 p 2 |b −hx, v0i| + 1 2 p k k X r=1 δi,r |hx, vr−1i −hx, vri| . (6) where k = b 1 12✏c, b = 1 pk+1, and {vr} is an orthonormal set of vectors in Rd chosen according to the behavior of the algorithm such that vr is orthogonal to all points at which the algorithm queries hF before round r, and where δi,r are indicators chosen so that δi,r = 1 if the algorithm does not query component i in round r (and zero otherwise). To see how this is possible, consider the following truncations of (6): f t i (x) = 1 p 2 |b −hx, v0i| + 1 2 p k t−1 X r=1 δi,r |hx, vr−1i −hx, vri| (7) During each round t, the adversary answers queries according to f t i , which depends only on vr, δi,r for r < t, i.e. from previous rounds. When the round is completed, δi,t is determined and vt is chosen to be orthogonal to the vectors {v0, ..., vt−1} as well as every point queried by the algorithm so far, thus defining f t+1 i for the next round. In Appendix B.1 we prove that these responses based on f t i are consistent with fi. The algorithm can only learn vr after it completes round r—until then every iterate is orthogonal to it by construction. The average of these functions reaches its minimum of F(x⇤) = 0 at x⇤= b Pk r=0 vr, so we can view optimizing these functions as the task of discovering the vectors vr— even if only vk is missing, a suboptimality better than b/(6 p k) > ✏cannot be achieved. Therefore, the deterministic algorithm must complete at least k rounds of optimization, each comprising at least ⌃m 2 ⌥ queries to hF in order to optimize F. The key to this construction is that even though each term |hx, vr−1i −hx, vri| appears in m/2 components, and hence has a strong effect on the average F(x), we can force a deterministic algorithm to make ⌦(m) queries during each round before it finds the next relevant term. We obtain (for complete proof see Appendix B.1): Theorem 1. For any L, B > 0, any 0 < ✏< LB 12 , any m ≥2, and any deterministic algorithm A with access to hF , there exists a dimension d = O * mLB ✏ + , and m functions fi defined over X = 3 x 2 Rd : kxk B , which are convex and L-Lipschitz continuous, such that in order to find a point ˆx for which F(ˆx) −F(x⇤) < ✏, A must make ⌦ * mLB ✏ + queries to hF . Furthermore, we can always reduce optimizing a function over kxk B to optimizing a strongly convex function by adding the regularizer ✏kxk2 /(2B2) to each component, implying (see complete proof in Appendix B.2): Theorem 2. For any L, λ > 0, any 0 < ✏< L2 288λ, any m ≥2, and any deterministic algorithm A with access to hF , there exists a dimension d = O ⇣ mL p λ✏ ⌘ , and m functions fi defined over X ✓Rd, which are L-Lipschitz continuous and λ-strongly convex, such that in order to find a point ˆx for which F(ˆx) −F(x⇤) < ✏, A must make ⌦ ⇣ mL p λ✏ ⌘ queries to hF . 4.2 Smooth Components When the components fi are required to be smooth, the lower bound construction is similar to (6), except it is based on squared differences instead of absolute differences. We consider the functions: fi(x) = 1 8 δi,1 ⇣ hx, v0i2 −2a hx, v0i ⌘ + δi,k hx, vki2 + k X r=1 δi,r (hx, vr−1i −hx, vri)2 ! (8) where δi,r and vr are as before. Again, we can answer queries at round t based only on δi,r, vr for r < t. This construction yields the following lower bounds (full details in Appendix B.3): 5 Theorem 3. For any γ, B, ✏> 0, any m ≥2, and any deterministic algorithm A with access to hF , there exists a sufficiently large dimension d = O * m p γB2/✏ + , and m functions fi defined over X = 3 x 2 Rd : kxk B , which are convex and γ-smooth, such that in order to find a point ˆx 2 Rd for which F(ˆx) −F(x⇤) < ✏, A must make ⌦ * m p γB2/✏ + queries to hF . In the strongly convex case, we use a very similar construction, adding the term λ kxk2 /2, which gives the following bound (see Appendix B.4): Theorem 4. For any γ, λ > 0 such that γ λ > 73, any ✏> 0, any ✏0 > 3γ✏ λ , any m ≥2, and any deterministic algorithm A with access to hF , there exists a sufficiently large dimension d = O ⇣ m p γ λ log ⇣ λ✏0 γ✏ ⌘⌘ , and m functions fi defined over X ✓Rd, which are γ-smooth and λstrongly convex and where F(0) −F(x⇤) = ✏0, such that in order to find a point ˆx for which F(ˆx) −F(x⇤) < ✏, A must make ⌦ ⇣ m p γ λ log ⇣ λ✏0 γ✏ ⌘⌘ queries to hF . 5 Lower Bounds for Randomized Algorithms We now turn to randomized algorithms for (1). In the deterministic constructions, we relied on being able to set vr and δi,r based on the predictable behavior of the algorithm. This is impossible for randomized algorithms, we must choose the “hard” function before we know the random choices the algorithm will make—so the function must be “hard” more generally than before. Previously, we chose vectors vr orthogonal to all previous queries made by the algorithm. For randomized algorithms this cannot be ensured. However, if we choose orthonormal vectors vr randomly in a high dimensional space, they will be nearly orthogonal to queries with high probability. Slightly modifying the absolute or squared difference from before makes near orthogonality sufficient. This issue increases the required dimension but does not otherwise affect the lower bounds. More problematic is our inability to anticipate the order in which the algorithm will query the components, precluding the use of δi,r. In the deterministic setting, if a term revealing a new vr appeared in half of the components, we could ensure that the algorithm must make m/2 queries to find it. However, a randomized algorithm could find it in two queries in expectation, which would eliminate the linear dependence on m in the lower bound! Alternatively, if only one component included the term, a randomized algorithm would indeed need ⌦(m) queries to find it, but that term’s effect on suboptimality of F would be scaled down by m, again eliminating the dependence on m. To establish a ⌦(pm) lower bound for randomized algorithms we must take a new approach. We define ⌅m 2 ⇧ pairs of functions which operate on ⌅m 2 ⇧ orthogonal subspaces of Rd. Each pair of functions resembles the constructions from the previous section, but since there are many of them, the algorithm must solve ⌦(m) separate optimization problems in order to optimize F. 5.1 Lipschitz Continuous Components First consider the non-smooth, non-strongly-convex setting and assume for simplicity m is even (otherwise we simply let the last function be zero). We define the helper function c, which replaces the absolute value operation and makes our construction resistant to small inner products between iterates and not-yet-discovered components: c(z) = max (0, |z| −c) (9) Next, we define m/2 pairs of functions, indexed by i = 1..m/2: fi,1(x) = 1 p 2 |b −hx, vi,0i| + 1 2 p k k X r even c (hx, vi,r−1i −hx, vi,ri) (10) fi,2(x) = 1 2 p k k X r odd c (hx, vi,r−1i −hx, vi,ri) where {vi,r}r=0..k,i=1..m/2 are random orthonormal vectors and k = ⇥( 1 ✏pm). With c sufficiently small and the dimensionality sufficiently high, with high probability the algorithm only learns the 6 identity of new vectors vi,r by alternately querying fi,1 and fi,2; so revealing all k + 1 vectors requires at least k + 1 total queries. Until vi,k is revealed, an iterate is ⌦(✏)-suboptimal on (fi,1 + fi,2)/2. From here, we show that an ✏-suboptimal solution to F(x) can be found only after at least k + 1 queries are made to at least m/4 pairs, for a total of ⌦(mk) queries. This time, since the optimum x⇤will need to have inner product b with ⇥(mk) vectors vi,r, we need to have b = ⇥( 1 p mk) = ⇥( p ✏/pm), and the total number of queries is ⌦(mk) = ⌦( pm ✏). The ⌦(m) term of the lower bound follows trivially since we require ✏= O(1/pm), (proofs in Appendix C.1): Theorem 5. For any L, B > 0, any 0 < ✏< LB 10pm, any m ≥2, and any randomized algorithm A with access to hF , there exists a dimension d = O ⇣ L4B6 ✏4 log * LB ✏ +⌘ , and m functions fi defined over X = 3 x 2 Rd : kxk B , which are convex and L-Lipschitz continuous, such that to find a point ˆx for which E [F(ˆx) −F(x⇤)] < ✏, A must make ⌦ * m + pmLB ✏ + queries to hF . An added regularizer gives the result for strongly convex functions (see Appendix C.2): Theorem 6. For any L, λ > 0, any 0 < ✏< L2 200λm, any m ≥2, and any randomized algorithm A with access to hF , there exists a dimension d = O * L4 λ3✏log L p λ✏ + , and m functions fi defined over X ✓Rd, which are L-Lipschitz continuous and λ-strongly convex, such that in order to find a point ˆx for which E [F(ˆx) −F(x⇤)] < ✏, A must make ⌦ * m + pmL p λ✏ + queries to hF . The large dimension required by these lower bounds is the cost of omitting the assumption that the algorithm’s queries lie in the span of previous oracle responses. If we do assume that the queries lie in that span, the necessary dimension is only on the order of the number of oracle queries needed. When ✏= ⌦(LB/pm) in the non-strongly convex case or ✏= ⌦ * L2/(λm) + in the strongly convex case, the lower bounds for randomized algorithms presented above do not apply. Instead, we can obtain a lower bound based on an information theoretic argument. We first uniformly randomly choose a parameter p, which is either (1/2 −2✏) or (1/2 + 2✏). Then for i = 1, ..., m, in the nonstrongly convex case we make fi(x) = x with probability p and fi(x) = −x with probability 1 −p. Optimizing F(x) to within ✏accuracy then implies recovering the bias of the Bernoulli random variable, which requires ⌦(1/✏2) queries based on a standard information theoretic result [2, 19]. Setting fi(x) = ±x + λ 2 kxk2 gives a ⌦(1/(λ✏)) lower bound in the λ-strongly convex setting. This is formalized in Appendix C.5. 5.2 Smooth Components When the functions fi are smooth and not strongly convex, we define another helper function φc: φc(z) = 8 < : 0 |z| c 2(|z| −c)2 c < |z| 2c z2 −2c2 |z| > 2c (11) and the following pairs of functions for i = 1, ..., m/2: fi,1(x) = 1 16 ✓ hx, vi,0i2 −2a hx, vi,0i + k X r even φc (hx, vi,r−1i −hx, vi,ri) ◆ (12) fi,2(x) = 1 16 ✓ φc (hx, vi,ki) + k X r odd φc (hx, vi,r−1i −hx, vi,ri) ◆ with vi,r as before. The same arguments apply, after replacing the absolute difference with squared difference. A separate argument is required in this case for the ⌦(m) term in the bound, which we show using a construction involving m simple linear functions (see Appendix C.3). Theorem 7. For any γ, B, ✏> 0, any m ≥2, and any randomized algorithm A with access to hF , there exists a sufficiently large dimension d = O ⇣ γ2B6 ✏2 log ⇣ γB2 ✏ ⌘ + B2m log m ⌘ and m functions fi defined over X = 3 x 2 Rd : kxk B , which are convex and γ-smooth, such that to find a point ˆx 2 Rd for which E [F(ˆx) −F(x⇤)] < ✏, A must make ⌦ ✓ m + q mγB2 ✏ ◆ queries to hF . 7 In the strongly convex case, we add the term λ kxk2 /2 to fi,1 and fi,2 (see Appendix C.4) to obtain: Theorem 8. For any m ≥2, any γ, λ > 0 such that γ λ > 161m, any ✏> 0, any ✏0 > 60✏ p γ λm, and any randomized algorithm A, there exists a dimension d = O ⇣ γ2.5✏0 λ2.5✏log3 ⇣ λ✏0 γ✏ ⌘ + mγ✏0 λ✏ log m ⌘ , domain X ✓Rd, x0 2 X, and m functions fi defined on X which are γ-smooth and λ-strongly convex, and such that F(x0) −F(x⇤) = ✏0 and such that in order to find a point ˆx 2 X such that E [F(ˆx) −F(x⇤)] < ✏, A must make ⌦ ⇣ m + p mγ λ log ⇣ ✏0 ✏ q mλ γ ⌘⌘ queries to hF . Remark: We consider (1) as a constrained optimization problem, thus the minimizer of F could be achieved on the boundary of X, meaning that the gradient need not vanish. If we make the additional assumption that the minimizer of F lies on the interior of X (and is thus the unconstrained global minimum), Theorems 1-8 all still apply, with a slight modification to Theorems 3 and 7. Since the gradient now needs to vanish on X, 0 is always O(γB2)-suboptimal, and only values of ✏in the range 0 < ✏< γB2 128 and 0 < ✏< 9γB2 128 result in a non-trivial lower bound (see Remarks at the end of Appendices B.3 and C.3). 6 Conclusion We provide a tight (up to a log factor) understanding of optimizing finite sum problems of the form (1) using a component prox oracle. Randomized optimization of (1) has been the subject of much research in the past several years, starting with the presentation of SDCA and SAG, and continuing with accelerated variants. Obtaining lower bounds can be very useful for better understanding the problem, for knowing where it might or might not be possible to improve or where different assumptions would be needed to improve, and for establishing optimality of optimization methods. Indeed, several attempts have been made at lower bounds for the finite sum setting [1, 9]. But as we explain in the introduction, these were unsatisfactory and covered only limited classes of methods. Here we show that in a fairly general sense, accelerated SDCA, SVRG, SAG, and KATYUSHA are optimal up to a log factor. Improving on their runtime would require additional assumptions, or perhaps a stronger oracle. However, even if given “full” access to the component functions, all algorithms that we can think of utilize this information to calculate a prox vector. Thus, it is unclear what realistic oracle would be more powerful than the prox oracle we consider. Our results highlight the power of randomization, showing that no deterministic algorithm can beat the linear dependence on m and reduce it to the pm dependence of the randomized algorithms. The deterministic algorithm for non-smooth problems that we present in Section 3 is also of interest in its own right. It avoids randomization, which is not usually problematic, but makes it fully parallelizable unlike the optimal stochastic methods. Consider, for example, a supervised learning problem where fi(x) = `(hφi, xi, yi) is the (non-smooth) loss on a single training example (φi, yi), and the data is distributed across machines. Calculating a prox oracle involves applying the Fenchel conjugate of the loss function `, but even if a closed form is not available, this is often easy to compute numerically, and is used in algorithms such as SDCA. But unlike SDCA, which is inherently sequential, we can calculate all m prox operations in parallel on the different machines, average the resulting gradients of the smoothed function, and take an accelerated gradient step to implement our optimal deterministic algorithm. This method attains a recent lower bound for distributed optimization, resolving a question raised by Arjevani and Shamir [5], and when the number of machines is very large improves over all other known distributed optimization methods for the problem. In studying finite sum problems, we were forced to explicitly study lower bounds for randomized optimization as opposed to stochastic optimization (where the source of randomness is the oracle, not the algorithm). Even for the classic problem of minimizing a smooth function using a first order oracle, we could not locate a published proof that applies to randomized algorithms. We provide a simple construction using ✏-insensitive differences that allows us to easily obtain such lower bounds without reverting to assuming the iterates are spanned by previous responses (as was done, e.g., in [9]), and could potentially be useful for establishing randomized lower bounds also in other settings. Acknowledgements: We thank Ohad Shamir for his helpful discussions and for pointing out [4]. 8 References [1] Alekh Agarwal and Leon Bottou. A lower bound for the optimization of finite sums. arXiv preprint arXiv:1410.0723, 2014. [2] Alekh Agarwal, Martin J Wainwright, Peter L Bartlett, and Pradeep K Ravikumar. Information-theoretic lower bounds on the oracle complexity of convex optimization. In Advances in Neural Information Processing Systems, pages 1–9, 2009. [3] Zeyuan Allen-Zhu. Katyusha: The first truly accelerated stochastic gradient descent. arXiv preprint arXiv:1603.05953, 2016. [4] Zeyuan Allen-Zhu and Elad Hazan. Optimal black-box reductions between optimization objectives. arXiv preprint arXiv:1603.05642, 2016. [5] Yossi Arjevani and Ohad Shamir. Communication complexity of distributed convex learning and optimization. In Advances in Neural Information Processing Systems, pages 1747–1755, 2015. [6] Heinz H Bauschke and Patrick L Combettes. Convex analysis and monotone operator theory in Hilbert spaces. Springer Science & Business Media, 2011. [7] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends R⃝in Machine Learning, 3(1):1–122, 2011. [8] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [9] Guanghui Lan. An optimal randomized incremental gradient method. arXiv preprint arXiv:1507.02000, 2015. [10] Hongzhou Lin, Julien Mairal, and Zaid Harchaoui. A universal catalyst for first-order optimization. In Advances in Neural Information Processing Systems, pages 3366–3374, 2015. [11] Yu Nesterov. Smooth minimization of non-smooth functions. Mathematical programming, 103(1):127– 152, 2005. [12] Yurii Nesterov. A method of solving a convex programming problem with convergence rate o (1/k2). Soviet Mathematics Doklady, 27(2):372–376, 1983. [13] Francesco Orabona, Andreas Argyriou, and Nathan Srebro. Prisma: Proximal iterative smoothing algorithm. arXiv preprint arXiv:1206.2372, 2012. [14] Mark Schmidt, Nicolas Le Roux, and Francis Bach. Minimizing finite sums with the stochastic average gradient. arXiv preprint arXiv:1309.2388, 2013. [15] Shai Shalev-Shwartz. Stochastic optimization for machine learning. Slides of presentation at “Optimization Without Borders 2016”, http://www.di.ens.fr/~aspremon/Houches/talks/Shai.pdf, 2016. [16] Shai Shalev-Shwartz and Tong Zhang. Stochastic dual coordinate ascent methods for regularized loss. The Journal of Machine Learning Research, 14(1):567–599, 2013. [17] Shai Shalev-Shwartz and Tong Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. Mathematical Programming, 155(1-2):105–145, 2016. [18] Ohad Shamir, Nathan Srebro, and Tong Zhang. Communication efficient distributed optimization using an approximate newton-type method. arXiv preprint arXiv:1312.7853, 2013. [19] Bin Yu. Assouad, fano, and le cam. In Festschrift for Lucien Le Cam, pages 423–435. Springer, 1997. [20] Yuchen Zhang and Lin Xiao. Communication-efficient distributed optimization of self-concordant empirical loss. arXiv preprint arXiv:1501.00263, 2015. 9 | 2016 | 227 |
6,136 | A Forward Model at Purkinje Cell Synapses Facilitates Cerebellar Anticipatory Control Ivan Herreros-Alonso SPECS lab Universitat Pompeu Fabra Barcelona, Spain ivan.herreros@upf.edu Xerxes D. Arsiwalla SPECS lab Universitat Pompeu Fabra Barcelona, Spain Paul F.M.J. Verschure SPECS, UPF Catalan Institution of Research and Advanced Studies (ICREA) Barcelona, Spain Abstract How does our motor system solve the problem of anticipatory control in spite of a wide spectrum of response dynamics from different musculo-skeletal systems, transport delays as well as response latencies throughout the central nervous system? To a great extent, our highly-skilled motor responses are a result of a reactive feedback system, originating in the brain-stem and spinal cord, combined with a feed-forward anticipatory system, that is adaptively fine-tuned by sensory experience and originates in the cerebellum. Based on that interaction we design the counterfactual predictive control (CFPC) architecture, an anticipatory adaptive motor control scheme in which a feed-forward module, based on the cerebellum, steers an error feedback controller with counterfactual error signals. Those are signals that trigger reactions as actual errors would, but that do not code for any current or forthcoming errors. In order to determine the optimal learning strategy, we derive a novel learning rule for the feed-forward module that involves an eligibility trace and operates at the synaptic level. In particular, our eligibility trace provides a mechanism beyond co-incidence detection in that it convolves a history of prior synaptic inputs with error signals. In the context of cerebellar physiology, this solution implies that Purkinje cell synapses should generate eligibility traces using a forward model of the system being controlled. From an engineering perspective, CFPC provides a general-purpose anticipatory control architecture equipped with a learning rule that exploits the full dynamics of the closed-loop system. 1 Introduction Learning and anticipation are central features of cerebellar computation and function (Bastian, 2006): the cerebellum learns from experience and is able to anticipate events, thereby complementing a reactive feedback control by an anticipatory feed-forward one (Hofstoetter et al., 2002; Herreros and Verschure, 2013). This interpretation is based on a series of anticipatory motor behaviors that originate in the cerebellum. For instance, anticipation is a crucial component of acquired behavior in eye-blink conditioning (Gormezano et al., 1983), a trial by trial learning protocol where an initially neutral stimulus such as a tone or a light (the conditioning stimulus, CS) is followed, after a fixed delay, by a noxious one, such as an air puff to the eye (the unconditioned stimulus, US). During early trials, a protective unconditioned response (UR), a blink, occurs reflexively in a feedback manner following the US. After training though, a well-timed anticipatory blink (the conditioned response, CR) precedes the US. Thus, learning results in the (partial) transference from an initial feedback action to an anticipatory (or predictive) feed-forward one. Similar responses occur during anticipatory postural adjustments, which are postural changes that precede voluntary motor movements, such as raising an arm while standing (Massion, 1992). The goal of these anticipatory adjustments is to counteract the postural and equilibrium disturbances that voluntary movements introduce. These 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. behaviors can be seen as feedback reactions to events that after learning have been transferred to feed-forward actions anticipating the predicted events. Anticipatory feed-forward control can yield high performance gains over feedback control whenever the feedback loop exhibits transmission (or transport) delays (Jordan, 1996). However, even if a plant has negligible transmission delays, it may still have sizable inertial latencies. For example, if we apply a force to a visco-elastic plant, its peak velocity will be achieved after a certain delay; i.e. the velocity itself will lag the force. An efficient way to counteract this lag will be to apply forces anticipating changes in the desired velocity. That is, anticipation can be beneficial even when one can act instantaneously on the plant. Given that, here we address two questions: what is the optimal strategy to learn anticipatory actions in a cerebellar-based architecture? and how could it be implemented in the cerebellum? To answer that we design the counterfactual predictive control (CFPC) scheme, a cerebellar-based adaptive-anticipatory control architecture that learns to anticipate performance errors from experience. The CFPC scheme is motivated from neuro-anatomy and physiology of eye-blink conditioning. It includes a reactive controller, which is an output-error feedback controller that models brain stem reflexes actuating on eyelid muscles, and a feed-forward adaptive component that models the cerebellum and learns to associate its inputs with the error signals driving the reactive controller. With CFPC we propose a generic scheme in which a feed-forward module enhances the performance of a reactive error feedback controller steering it with signals that facilitate anticipation, namely, with counterfactual errors. However, within CFPC, even if these counterfactual errors that enable predictive control are learned based on past errors in behavior, they do not reflect any current or forthcoming error in the ongoing behavior. In addition to eye-blink conditioning and postural adjustments, the interaction between reactive and cerebellar-dependent acquired anticipatory behavior has also been studied in paradigms such as visually-guided smooth pursuit eye movements (Lisberger, 1987). All these paradigms can be abstracted as tasks in which the same predictive stimuli and disturbance or reference signal are repeatedly experienced. In accordance to that, we operate our control scheme in trial-by-trial (batch) mode. With that, we derive a learning rule for anticipatory control that modifies the well-known least-mean-squares/Widrow-Hoff rule with an eligibility trace. More specifically, our model predicts that to facilitate learning, parallel fibers to Purkinje cell synapses implement a forward model that generates an eligibility trace. Finally, to stress that CFPC is not specific to eye-blink conditioning, we demonstrate its application with a smooth pursuit task. 2 Methods 2.1 Cerebellar Model xj x1 xN o e w1 wj wN Figure 1: Anatomical scheme of a Cerebellar Purkinje cell. The xj denote parallel fiber inputs to Purkinje synapses (in red) with weights wj. o denotes the output of the Purkinje cell. The error signal e, through the climbing fibers (in green), modulates synaptic weights. We follow the simplifying approach of modeling the cerebellum as a linear adaptive filter, while focusing on computations at the level of the Purkinje cells, which are the main output cells of the cerebellar cortex (Fujita, 1982; Dean et al., 2010). Over the mossy fibers, the cerebellum receives a wide range of inputs. Those inputs reach Purkinke cells via parallel fibers (Fig. 1), that cross 2 dendritic trees of Purkinje cells in a ratio of up to 1.5 × 106 parallel fiber synapses per cell (Eccles et al., 1967). We denote the signal carried by a particular fiber as xj, j ∈[1, G], with G equal to the total number of inputs fibers. These inputs from the mossy/parallel fiber pathway carry contextual information (interoceptive or exteroceptive) that allows the Purkinje cell to generate a functional output. We refer to these inputs as cortical bases, indicating that they are localized at the cerebellar cortex and that they provide a repertoire of states and inputs that the cerebellum combines to generate its output o. As we will develop a discrete time analysis of the system, we use n to indicate time (or time-step). The output of the cerebellum at any time point n results from a weighted sum of those cortical bases. wj indicates the weight or synaptic efficacy associated with the fiber j. Thus, we have x[n] = [x1[n], . . . , xG[n]]⊺and w[n] = [w1[n], . . . , wG[n]]⊺(where the transpose, ⊺, indicates that x[n] and w[n] are column vectors) containing the set of inputs and synaptic weights at time n, respectively, which determine the output of the cerebellum according to o[n] = x[n]⊺w[n] (1) The adaptive feed-forward control of the cerebellum stems from updating the weights according to a rule of the form ∆wj[n + 1] = f(xj[n], . . . , xj[1], e[n], Θ) (2) where Θ denotes global parameters of the learning rule; xj[n], . . . , xj[1], the history of its presynaptic inputs of synapse j; and e[n], an error signal that is the same for all synapses, corresponding to the difference between the desired, r, and the actual output, y, of the controlled plant. Note that in drawing an analogy with the eye-blink conditioning paradigm, we use the simplifying convention of considering the noxious stimulus (the air-puff) as a reference, r, that indicates that the eyelids should close; the closure of the eyelid as the output of the plant, y; and the sensory response to the noxious stimulus as an error, e, that encodes the difference between the desired, r, and the actual eyelid closures, y. Given this, we advance a new learning rule, f, that achieves optimal performance in the context of eye-blink conditioning and other cerebellar learning paradigms. 2.2 Cerebellar Control Architecture + US (airpuf) [r] Eyelids (Blink) [P] [y] Facial nucleus [C] Trigeminal nucleus [e] [e] CS (Context, e.g.: sound, light) [u] Cerebellum (cortex and nuclei) and Inferior olive [FF] [x] Pons [o] FF x o r e C u P y + + ADAPTIVE-ANTICIPATORY (FEED-FORWARD) LAYER REACTIVE (FEEDBACK) LAYER FEEDBACK CLOSEDLOOP SYSTEM Figure 2: Neuroanatomy of eye-blink conditioning and the CFPC architecture. Left: Mapping of signals to anatomical structures in eye-blink conditioning (De Zeeuw and Yeo, 2005); regular arrows indicate external inputs and outputs, arrows with inverted heads indicate neural pathways. Right: CFPC architecture. Note that the feedback controller, C, and the feed-forward module, FF, belong to the control architecture, while the plant, P, denotes an object controlled. Other abbreviations: r, reference signal; y, plant’s output; e, output error; x, basis signals; o, feed-forward signal; and u, motor command. We embed the adaptive filter cerebellar module in a layered control architecture, namely the CFPC architecture, based on the interaction between brain stem motor nuclei driving motor reflexes and the cerebellum, such as the one established between the cerebellar microcircuit responsible for conditioned responses and the brain stem reflex circuitry that produces unconditioned eye-blinks (Hesslow and Yeo, 2002) (Fig. 2 left). Note that in our interpretation of this anatomy we assume that cerebellar output, o, feeds the lower reflex controller (Fig. 2 right). Put in control theory terms, within the CFPC scheme an adaptive feed-forward layer supplements a negative feedback controller steering it with feed-forward signals. 3 Our architecture uses a single-input single-output negative-feedback controller. The controller receives as input the output error e = r −y. For the derivation of the learning algorithm, we assume that both plant and controller are linear and time-invariant (LTI) systems. Importantly, the feedback controller and the plant form a reactive closed-loop system, that mathematically can be seen as a system that maps the reference, r, into the plant’s output, y. A feed-forward layer that contains the above-mentioned cerebellar model provides the negative feedback controller with an additional input signal, o. We refer to o as a counter-factual error signal, since although it mechanistically drives the negative feedback controller analogously to an error signal it is not an actual error. The counterfactual error is generated by the feed-forward module that receives an output error, e, as its teaching signal. Notably, from the point of view of the reactive layer closed-loop system, o can also be interpreted as a signal that offsets r. In other words, even if r remains the reference that sets the target of behavior, r + o functions as the effective reference that drives the closed-loop system. 3 Results 3.1 Derivation of the gradient descent update rule for the cerebellar control architecture We apply the CFPC architecture defined in the previous section to a task that consists in following a finite reference signal r ∈RN that is repeated trial-by-trial. To analyze this system, we use the discrete time formalism and assume that all components are linear time-invariant (LTI). Given this, both reactive controller and plant can be lumped together into a closed-loop dynamical system, that can be described with the dynamics A, input B, measurement C and feed-through D matrices. In general, these matrices describe how the state of a dynamical system autonomously evolves with time, A; how inputs affect system states, B; how states are mapped into outputs, C; and how inputs instantaneously affect the system’s output D (Astrom and Murray, 2012). As we consider a reference of a finite length N, we can construct the N-by-N transfer matrix T as follows (Boyd, 2008) T = D 0 0 . . . 0 CB D 0 . . . 0 CAB CB D . . . 0 ... ... ... ... ... CAN−2B CAN−3B CAN−4B . . . D With this transfer matrix we can map any given reference r into an output yr using yr = T r, obtaining what would have been the complete output trajectory of the plant on an entirely feedback-driven trial. Note that the first column of T contains the impulse response curve of the closed-loop system, while the rest of the columns are obtained shifting that impulse response down. Therefore, we can build the transfer matrix T either in a model-based manner, deriving the state-space characterization of the closed-loop system, or in measurement-based manner, measuring the impulse response curve. Additionally, note that (I −T )r yields the error of the feedback control in following the reference, a signal which we denote with e0. Let o ∈RN be the entire feed-forward signal for a given trial. Given commutativity, we can consider that from the point of view of the closed-loop system o is added directly to the reference r, (Fig. 2 right). In that case, we can use y = T (r + o) to obtain the output of the closed-loop system when it is driven by both the reference and the feed-forward signal. The feed-forward module only outputs linear combinations of a set of bases. Let X ∈RN×G be a matrix with the content of the G bases during all the N time steps of a trial. The feed-forward signal becomes o = Xw, where w ∈RG contains the mixing weights. Hence, the output of the plant given a particular w becomes y = T (r + Xw). We implement learning as the process of adjusting the weights w of the feed-forward module in a trial-by-trial manner. At each trial the same reference signal, r, and bases, X, are repeated. Through learning we want to converge to the optimal weight vector w∗defined as w∗= arg min w c(w) = arg min w 1 2e⊺e = arg min w 1 2(r −T (r + Xw))⊺(r −T (r + Xw)) (3) where c indicates the objective function to minimize, namely the L2 norm or sum of squared errors. With the substitution ˜X = T X and using e0 = (I −T )r, the minimization problem can be cast as a 4 canonical linear least-squares problem: w∗= arg min w 1 2(e0 −˜Xw)⊺(e0 −˜Xw) (4) One the one hand, this allows to directly find the least squares solution for w∗, that is, w∗= ˜X†e0, where † denotes the Moore-Penrose pseudo-inverse. On the other hand, and more interestingly, with w[k] being the weights at trial k and having e[k] = e0 −˜Xw[k], we can obtain the gradient of the error function at trial k with relation to w as follows: ∇wc = −˜X⊺e[k] = −X⊺T ⊺e[k] Thus, setting η as a properly scaled learning rate (the only global parameter Θ of the rule), we can derive the following gradient descent strategy for the update of the weights between trials: w[k + 1] = w[k] + ηX⊺T ⊺e[k] (5) This solves for the learning rule f in eq. 2. Note that f is consistent with both the cerebellar anatomy (Fig. 2left) and the control architecture (Fig. 2right) in that the feed-forward module/cerebellum only requires two signals to update its weights/synaptic efficacies: the basis inputs, X, and error signal, e. 3.2 T ⊺facilitates a synaptic eligibility trace The standard least mean squares (LMS) rule (also known as Widrow-Hoff or decorrelation learning rule) can be represented in its batch version as w[k + 1] = w[k] + ηX⊺e[k]. Hence, the only difference between the batch LMS rule and the one we have derived is the insertion of the matrix factor T ⊺. Now we will show how this factor acts as a filter that computes an eligibility trace at each weight/synapse. Note that the update of a single weight, according Eq. 5 becomes wj[k + 1] = wj[k] + ηx⊺ j T ⊺e[k] (6) where xj contains the sequence of values of the cortical basis j during the entire trial. This can be rewritten as wj[k + 1] = wj[k] + ηh⊺ j e[k] (7) with hj ≡T xj. The above inner product can be expressed as a sum of scalar products wj[k + 1] = wj[k] + η N X n=1 hj[n]e[k, n] (8) where n indexes the within trial time-step. Note that e[k] in Eq. 7 refers to the whole error signal at trial k whereas e[k, n] in Eq. 8 refers to the error value in the n-th time-step of the trial k. It is now clear that each hj[n] weighs how much an error arriving at time n should modify the weight wj, which is precisely the role of an eligibility trace. Note that since T contains in its columns/rows shifted repetitions of the impulse response curve of the closed-loop system, the eligibility trace codes at any time n, the convolution of the sequence of previous inputs with the impulse-response curve of the reactive layer closed-loop. Indeed, in each synapse, the eligibility trace is generated by a forward model of the closed-loop system that is exclusively driven by the basis signal. Consequently, our main result is that by deriving a gradient descent algorithm for the CFPC cerebellar control architecture we have obtained an exact definition of the suitable eligibility trace. That definition guarantees that the set of weights/synaptic efficacies are updated in a locally optimal manner in the weights’ space. 3.3 On-line gradient descent algorithm The trial-by-trial formulation above allowed for a straightforward derivation of the (batch) gradient descent algorithm. As it lumped together all computations occurring in a same trial, it accounted for time within the trial implicitly rather than explicitly: one-dimensional time-signals were mapped onto points in a high-dimensional space. However, after having established the gradient descent algorithm, we can implement the same rule in an on-line manner, dropping the repetitiveness assumption inherent to trial-by-trial learning and performing all computations locally in time. Each weight/synapse must 5 have a process associated to it that outputs the eligibility trace. That process passes the incoming (unweighted) basis signal through a (forward) model of the closed-loop as follows: sj[n + 1] = Asj[n] + Bxj[n] hj[n] = Csj[n] + Dxj[n] where matrices A, B, C and D refer to the closed-loop system (they are the same matrices that we used to define the transfer matrix T ), and sj[n] is the state vector of the forward model of the synapse j at time-step n. In practice, each “synaptic” forward model computes what would have been the effect of having driven the closed-loop system with each basis signal alone. Given the superposition principle, the outcome of that computation can also be interpreted as saying that hj[n] indicates what would have been the displacement over the current output of the plant, y[n], achieved feeding the closed-loop system with the basis signal xj. The process of weight update is completed as follows: wj[n + 1] = wj[n] + ηhj[n]e[n] (9) At each time step n, the error signal e[n] is multiplied by the current value of the eligibility trace hj[n], scaled by the learning rate η, and subtracted to the current weight wj[n]. Therefore whereas the contribution of each basis to the output of the adaptive filter depends only on its current value and weight, the change in weight depends on the current and past values passed through a forward model of the closed-loop dynamics. 3.4 Simulation of a visually-guided smooth pursuit task We demonstrate the CFPC approach in an example of a visual smooth pursuit task in which the eyes have to track a target moving on a screen. Even though the simulation does not capture all the complexity of a smooth pursuit task, it illustrates our anticipatory control strategy. We model the plant (eye and ocular muscles) with a two-dimensional linear filter that maps motor commands into angular positions. Our model is an extension of the model in (Porrill and Dean, 2007), even though in that work the plant was considered in the context of the vestibulo-ocular reflex. In particular, we use a chain of two leaky integrators: a slow integrator with a relaxation constant of 100 ms drives the eyes back to the rest position; the second integrator, with a fast time constant of 3 ms ensures that the change in position does not occur instantaneously. To this basic plant, we add a reactive control layer modeled as a proportional-integral (PI) error-feedback controller, with proportional gain kp and integral gain ki. The control loop includes a 50 ms delay in the error feedback, to account for both the actuation and the sensing latency. We choose gains such that reactive tracking lags the target by approximately 100 ms. This gives kp = 20 and ki = 100. To complete the anticipatory and adaptive control architecture, the closed-loop system is supplemented by the feed-forward module. 0 0.5 1 1.5 2 2.5 0 0.2 0.4 0.6 0.8 1 time (s) angular position (a.u.) r y[1] y[50] 0 0.5 1 1.5 2 2.5 −0.1 0 0.1 0.2 time (s) angular position (a.u.) e[1] e[50] o[50] Figure 3: Behavior of the system. Left: Reference (r) and output of the system before (y[1]) and after learning (y[50]). Right: Error before e[1] and after learning e[50] and output acquired by cerebellar/feed-forward component (o[50]) The architecture implementing the forward model-based gradient descent algorithm is applied to a task structured in trials of 2.5 sec duration. Within each trial, a target remains still at the center of the visual scene for a duration 0.5 sec, next it moves rightwards for 0.5 sec with constant velocity, remains still for 0.5 sec and repeats the sequence of movements in reverse, returning to the center. The cerebellar component receives 20 Gaussian basis signals (X) whose receptive fields are defined in the temporal domain, relative to trial onset, with a width (standard-deviation) of 50 ms and spaced by 100 ms. The whole system is simulated using a 1 ms time-step. To construct the matrix T we computed closed-loop system impulse response. 6 At the first trial, before any learning, the output of the plant lags the reference signal by approximately 100 ms converging to the position only when the target remains still for about 300 ms (Fig. 3 left). As a result of learning, the plant’s behavior shifts from a reactive to an anticipatory mode, being able to track the reference without any delay. Indeed, the error that is sizable during the target displacement before learning, almost completely disappears by the 50th trial (Fig. 3 right). That cancellation results from learning the weights that generate a feed-forward predictive signal that leads the changes in the reference signal (onsets and offsets of target movements) by approximately 100 ms (Fig. 3 right). Indeed, convergence of the algorithm is remarkably fast and by trial 7 it has almost converged to the optimal solution (Fig. 4). 0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 #trial rRMSE WH WH+50ms WH+70ms FM−ET Figure 4: Performance achieved with different learning rules. Representative learning curves of the forward model-based eligibility trace gradient descent (FM-ET), the simple Widrow-Hoff (WH) and the Widrow-Hoff algorithm with a delta-eligibility trace matched to error feedback delay (WH+50 ms) or with an eligibility trace exceeding that delay by 20 ms (WH+70 ms). Error is quantified as the relative root mean-squared error (rRMSE), scaled proportionally to the error in the first trial. Error of the optimal solution, obtained with w∗= (T X)†e0, is indicated with a dashed line. To assess how much our forward-model-based eligibility trace contributes to performance, we test three alternative algorithms. In both cases we employ the same control architecture, changing the plasticity rule such that we either use no eligibility trace, thus implementing the basic Widrow-Hoff learning rule, or use the Widrow-Hoff rule extended with a delta-function eligibility trace that matches the latency of the error feedback (50 ms) or slightly exceeds it (70 ms). Performance with the basic WH model worsens rapidly whereas performance with the WH learning rule using a “pure delay” eligibility trace matched to the transport delay improves but not as fast as with the forward-modelbased eligibility trace (Fig. 4). Indeed, in this case, the best strategy for implementing a delayed delta eligibility trace is setting a delay exceeding the transport delay by around 20 ms, thus matching the peak of the impulse response. In that case, the system performs almost as good as with the forward-model eligibility trace (70 ms). This last result implies that, even though the literature usually emphasizes the role of transport delays, eligibility traces also account for response lags due to intrinsic dynamics of the plant. To summarize our results, we have shown with a basic simulation of a visual smooth pursuit task that generating the eligibility trace by means of a forward model ensures convergence to the optimal solution and accelerates learning by guaranteeing that it follows a gradient descent. 4 Discussion In this paper we have introduced a novel formulation of cerebellar anticipatory control, consistent with experimental evidence, in which a forward model has emerged naturally at the level of Purkinje cell synapses. From a machine learning perspective, we have also provided an optimality argument for the derivation of an eligibility trace, a construct that was often thought of in more heuristic terms as a mechanism to bridge time-delays (Barto et al., 1983; Shibata and Schaal, 2001; McKinstry et al., 2006). The first seminal works of cerebellar computational models emphasized its role as an associative memory (Marr, 1969; Albus, 1971). Later, the cerebellum was investigates as a device processing correlated time signals(Fujita, 1982; Kawato et al., 1987; Dean et al., 2010). In this latter framework, 7 the use of the computational concept of an eligibility trace emerged as a heuristic construct that allowed to compensate for transmission delays in the circuit(Kettner et al., 1997; Shibata and Schaal, 2001; Porrill and Dean, 2007), which introduced lags in the cross-correlation between signals. Concretely, that was referred to as the problem of delayed error feedback, due to which, by the time an error signal reaches a cell, the synapses accountable for that error are no longer the ones currently active, but those that were active at the time when the motor signals that caused the actual error were generated. This view has however neglected the fact that beyond transport delays, response dynamics of physical plants also influence how past pre-synaptic signals could have related to the current output of the plant. Indeed, for a linear plant, the impulse-response function of the plant provides the complete description of how inputs will drive the system, and as such, integrates transmission delays as well as the dynamics of the plant. Recently, Even though cerebellar microcircuits have been used as models for building control architectures, e.g., the feedback-error learning model (Kawato et al., 1987), our CFPC is novel in that it links the cerebellum to the input of the feedback controller, ensuring that the computational features of the feedback controller are exploited at all times. Within the domain of adaptive control, there are remarkable similarities at the functional level between CFPC and iterative learning control (ILC) (Amann et al., 1996), which is an input design technique for learning optimal control signals in repetitive tasks. The difference between our CFPC and ILC lies in the fact that ILC controllers directly learn a control signal, whereas, the CFPC learns a conterfactual error signal that steers a feedback controller. However the similarity between the two approaches can help for extending CFPC to more complex control tasks. With our CFPC framework, we have modeled the cerebellar system at a very high level of abstraction: we have not included bio-physical constraints underlying neural computations, obviated known anatomical connections such as the cerebellar nucleo-olivary inhibition (Bengtsson and Hesslow, 2006; Herreros and Verschure, 2013) and made simplifications such as collapsing cerebellar cortex and nuclei into the same computational unit. On the one hand, such a choice of high-level abstraction may indeed be beneficial for deriving general-purpose machine learning or adaptive control algorithms. On the other hand, it is remarkable that in spite of this abstraction our framework makes fine-grained predictions at the micro-level of biological processes. Namely, that in a cerebellar microcircuit (Apps and Garwicz, 2005), the response dynamics of secondary messengers (Wang et al., 2000) regulating plasticity of Purkinje cell synapses to parallel fibers must mimic the dynamics of the motor system being controlled by that cerebellar microcircuit. Notably, the logical consequence of this prediction, that different Purkinje cells should display different plasticity rules according to the system that they control, has been validated recording single Purkinje cells in vivo (Suvrathan et al., 2016). In conclusion, we find that a normative interpretation of plasticity rules in Purkinje cell synapses emerges from our systems level CFPC computational architecture. That is, in order to generate optimal eligibility traces, synapses must include a forward model of the controlled subsystem. This conclusion, in the broader picture, suggests that synapses are not merely components of multiplicative gains, but rather the loci of complex dynamic computations that are relevant from a functional perspective, both, in terms of optimizing storage capacity (Benna and Fusi, 2016; Lahiri and Ganguli, 2013) and fine-tuning learning rules to behavioral requirements. Acknowledgments The research leading to these results has received funding from the European Commission’s Horizon 2020 socSMC project (socSMC-641321H2020-FETPROACT-2014) and by the European Research Council’s CDAC project (ERC-2013-ADG 341196). References Albus, J. S. (1971). A theory of cerebellar function. Mathematical Biosciences, 10(1):25–61. Amann, N., Owens, D. H., and Rogers, E. (1996). Iterative learning control for discrete-time systems with exponential rate of convergence. IEE Proceedings-Control Theory and Applications, 143(2):217–224. Apps, R. and Garwicz, M. (2005). Anatomical and physiological foundations of cerebellar information processing. Nature reviews. Neuroscience, 6(4):297–311. Astrom, K. J. and Murray, R. M. (2012). Feedback Systems: An Introduction for Scientists and Engineers. Princeton university press. 8 Barto, A. G., Sutton, R. S., and Anderson, C. W. (1983). Neuronlike adaptive elements that can solve difficult learning control problems. IEEE transactions on systems, man, and cybernetics, SMC-13(5):834–846. Bastian, A. J. (2006). Learning to predict the future: the cerebellum adapts feedforward movement control. Current Opinion in Neurobiology, 16(6):645–649. Bengtsson, F. and Hesslow, G. (2006). Cerebellar control of the inferior olive. Cerebellum (London, England), 5(1):7–14. Benna, M. K. and Fusi, S. (2016). Computational principles of synaptic memory consolidation. Nature neuroscience. Boyd, S. (2008). Introduction to linear dynamical systems. Online Lecture Notes. De Zeeuw, C. I. and Yeo, C. H. (2005). Time and tide in cerebellar memory formation. Current opinion in neurobiology, 15(6):667–74. Dean, P., Porrill, J., Ekerot, C.-F., and Jörntell, H. (2010). The cerebellar microcircuit as an adaptive filter: experimental and computational evidence. Nature reviews. Neuroscience, 11(1):30–43. Eccles, J., Ito, M., and Szentágothai, J. (1967). The cerebellum as a neuronal machine. Springer Berlin. Fujita, M. (1982). Adaptive filter model of the cerebellum. Biological cybernetics, 45(3):195–206. Gormezano, I., Kehoe, E. J., and Marshall, B. S. (1983). Twenty years of classical conditioning with the rabbit. Herreros, I. and Verschure, P. F. M. J. (2013). Nucleo-olivary inhibition balances the interaction between the reactive and adaptive layers in motor control. Neural Networks, 47:64–71. Hesslow, G. and Yeo, C. H. (2002). The functional anatomy of skeletal conditioning. In A neuroscientist’s guide to classical conditioning, pages 86–146. Springer. Hofstoetter, C., Mintz, M., and Verschure, P. F. (2002). The cerebellum in action: a simulation and robotics study. European Journal of Neuroscience, 16(7):1361–1376. Jordan, M. I. (1996). Computational aspects of motor control and motor learning. In Handbook of perception and action, volume 2, pages 71–120. Academic Press. Kawato, M., Furukawa, K., and Suzuki, R. (1987). A hierarchical neural-network model for control and learning of voluntary movement. Biological Cybernetics, 57(3):169–185. Kettner, R. E., Mahamud, S., Leung, H. C., Sitkoff, N., Houk, J. C., Peterson, B. W., and Barto, a. G. (1997). Prediction of complex two-dimensional trajectories by a cerebellar model of smooth pursuit eye movement. Journal of neurophysiology, 77:2115–2130. Lahiri, S. and Ganguli, S. (2013). A memory frontier for complex synapses. In Advances in neural information processing systems, pages 1034–1042. Lisberger, S. (1987). Visual Motion Processing And Sensory-Motor Integration For Smooth Pursuit Eye Movements. Annual Review of Neuroscience, 10(1):97–129. Marr, D. (1969). A theory of cerebellar cortex. The Journal of physiology, 202(2):437–470. Massion, J. (1992). Movement, posture and equilibrium: Interaction and coordination. Progress in Neurobiology, 38(1):35–56. McKinstry, J. L., Edelman, G. M., and Krichmar, J. L. (2006). A cerebellar model for predictive motor control tested in a brain-based device. Proceedings of the National Academy of Sciences of the United States of America, 103(9):3387–3392. Porrill, J. and Dean, P. (2007). Recurrent cerebellar loops simplify adaptive control of redundant and nonlinear motor systems. Neural computation, 19(1):170–193. Shibata, T. and Schaal, S. (2001). Biomimetic smooth pursuit based on fast learning of the target dynamics. In Intelligent Robots and Systems, 2001. Proceedings. 2001 IEEE/RSJ International Conference on, volume 1, pages 278–285. IEEE. Suvrathan, A., Payne, H. L., and Raymond, J. L. (2016). Timing rules for synaptic plasticity matched to behavioral function. Neuron, 92(5):959–967. Wang, S. S.-H., Denk, W., and Häusser, M. (2000). Coincidence detection in single dendritic spines mediated by calcium release. Nature neuroscience, 3(12):1266–1273. 9 | 2016 | 228 |
6,137 | Verification Based Solution for Structured MAB Problems Zohar Karnin Yahoo Research New York, NY 10036 zkarnin@ymail.com Abstract We consider the problem of finding the best arm in a stochastic Multi-armed Bandit (MAB) game and propose a general framework based on verification that applies to multiple well-motivated generalizations of the classic MAB problem. In these generalizations, additional structure is known in advance, causing the task of verifying the optimality of a candidate to be easier than discovering the best arm. Our results are focused on the scenario where the failure probability δ must be very low; we essentially show that in this high confidence regime, identifying the best arm is as easy as the task of verification. We demonstrate the effectiveness of our framework by applying it, and matching or improving the state-of-the art results in the problems of: Linear bandits, Dueling bandits with the Condorcet assumption, Copeland dueling bandits, Unimodal bandits and Graphical bandits. 1 Introduction The Multi-Armed Bandit (MAB) game is one where in each round the player chooses an action, also referred to as an arm, from a pre-determined set. The player then gains a reward associated with the chosen arm and observes the reward while rewards associated with the other arms are not revealed. In the stochastic setting, each arm x has a fixed associated value µ(x) throughout all rounds, and the reward associated with the arm is a random variable, independent of the history, with an expected value of µ(x). In this paper we focus on the pure exploration task [9] in the stochastic setting where our objective is to identify the arm maximizing µ(x) with sufficiently high probability, while minimizing the required number of rounds, otherwise known as the query complexity. This task, as opposed to the classic task of maximizing the sum of accumulated rewards is motivated by numerous scenarios where exploration (i.e. trying multiple options) is only possible in an initial testing phase, and not throughout the running time of the game. As an example consider a company testing several variations of a (physical) product, and then once realizing the best one, moving to a production phase where the product is massively produced and shipped to numerous vendors. It is very natural to require that the identified option is the best one with very high probability, as a mistake can be very costly. Generally speaking, the vast majority of uses-cases of a pure exploration requires the error probability δ to be very small, so much so that even a logarithmic dependence over δ is non-negligible. Another example to demonstrate this is that of explore-then-exploit type algorithms. There are many examples of papers providing a solution to a regret based MAB problem where the first phase consists of identifying the best arm with probability at least 1 −1/T, and then using it in the remainder of the rounds. Here, δ = 1/T is often assumed to be the only non-constant. We do not focus on the classic MAB problem but rather on several extensions of it for settings where we are given as input some underlying structural properties of the reward function µ. We elaborate on the formal definitions and different scenarios in Section 2. Another extension we consider is that 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. of Dueling Bandits where, informally, we do not query a single arm but rather a pair, and rather than observing the reward of the arms we observe a hint as to the difference between their associated µ values. Each extension we discuss is motivated by different scenarios which we elaborate on in the upcoming sections. In all of the cases mentioned, we focus on the regime of high confidence meaning where the failure probability δ is very small. Notice that due to the additional structure (that does not exist in the classic case), verifying a candidate arm is indeed the best arm can be a much easier task, at least conceptually, compared to that of discovering which arm is the best. This observation leads us to the following design: Explore the arms and obtain a candidate arm that is the best arm w.p. 1 −for some constant , then verify it is indeed the best with confidence 1 −δ. If the exploration procedure happened to be correct, the query complexity of the problem will be composed of a sum of two quantities. One is that of the exploration algorithm that is completely independent of δ, and the other is dependent of δ but is the query complexity of the easier verification task. The query complexity is either dominated by that of the verification task, or by that of the original task with a constant failure probability. Either way, for small values of δ the savings are potentially huge. As it turns out, as discussed in Section 3, a careful combination of an exploration and verification algorithm can achieve an expected query complexity of Hexplore + Hverify where Hexplore is the exploration query complexity, independent of δ, and Hverify is the query complexity of the verification procedure with confidence 1 −δ. Below, we design exploration and verification algorithms for the problems of: Dueling bandits §4, Linear bandits §5, Unimodal graphical bandits §6 and Graphical bandits1 . In the corresponding sections we provide short reviews of each MAB problem, and analyze their exploration and verification algorithms. Our results improve upon the state-of-the-art results in each of these mentioned problem (See Table 1 for a detailed comparison). Related Works: We are aware of one attempt to capture multiple (stochastic) bandit problems in a single frameworks, given in [20]. The focus there is mostly on problems where the observed random variables do not necessarily reflect the reward, such as the dueling bandit problem, rather than methods to exploit structure between the arms. For example, in the case of the dueling bandit problem with the Condorcet assumption their algorithm does not take advantage of the structural properties and the corresponding query complexity is larger than that obtained here (see Section 4.1). We review the previous literature of each specific problem in the corresponding sections. 2 Formulation of Bandit Problems The pure exploration Multi-Armed Bandit (MAB) problem, in the stochastic setting, can be generally formalized as follows. Our input consists of a set K of arms, where each arm x is associated with some reward µ(x). In each round t we play an arm xt and observe the outcome of a random variable whose expected value is µ(xt). Other non-stochastic settings exist yet they are outside the scope of our paper; see [4] for a survey on bandit problems, including the stochastic and non-stochastic settings. The objective in the best arm identification problem is to identify the arm2 x⇤= arg max µ(x) while minimizing the expected number of queries to the reward values of the arms. Other than the classic MAB problem, where K is a finite set and µ is an arbitrary function there exist other frameworks where some structure is assumed regarding the behavior of µ over the arms of K. An example for a common framework matching this formulation, that we will analyze in detail in Section 5, is that of the linear MAB. Here, K is a compact subset of Rd, and the reward function µ is assumed to be linear. Unlike the classic MAB case, an algorithm can take advantage of the structure of µ and obtain a performance that is independent of the size of K. Yet another example, discuss in Section 6, is that of unimodal bandits, where we are given a graph whose vertices are the arms, and it is guaranteed that the best arm is the unique arm having a maximal value among its neighbors in the graph. The above general framework captures many variants of the MAB problem, yet does not capture the Dueling Multi Armed Bandit (DMAB) problem. Here, the input as before consists of a set of arms denoted by K yet we are not allowed to play a single arm in a round but rather a pair x, y 2 K. The general definition of the observation from playing the pair x, y is a random variable whose 1Do to space restrictions we defer the section of Graphical bandits [7] to the extended version. 2This objective is naturally extended in the PAC setting where we are interested in an arm that is approximately the best arm. For simplicity we restrict our focus to the best arm identification problem. We note that our general framework of exploration and verification can be easily expanded to handle the PAC setting as well. 2 expected value is P(x, y) where P : K ⇥K ! R. The original motivating example for the DMAB [22] problem is that of information retrieval, where a query to a pair of arms is a presentation of the interleaved results of two ranking algorithms. The output is the 0 or 1, depending on the choice of the user, i.e. whether she chose a result from one or ranker or the other. The µ score here can be thought of a quality score for a ranker, defined according to the P scores. We elaborate on the motivation for the MAB problem and the exact definition of the best arm in Section 4. In an extended version of this paper we discuss the problem of graphical bandits that is in some sense a generalization of the dueling bandit problem. There, we are not allowed to query any pair but rather pairs from some predefined set E ✓K ⇥K. 3 Boosting the Exploration Process with a Verification Policy In what follows we present results for different variants of the MAB problem. We discuss two types of problems. The first is the well known pure exploration problem. Our input is the MAB instance, including the set of arms and possible structural information, and a confidence parameter . The objective is to find the best arm w.p. at least 1 −while using a minimal number of queries. We often discuss variants of the exploration problem where in addition to finding the best arm, we wish to obtain some additional information about the problem such as an estimate of the gaps of the reward value of suboptimal arms from the optimal one, the identity of important arm pairs, etc. We refer to this additional information as an advice vector ✓, and our objective is to minimize queries while obtaining a sufficiently accurate advice vector and the true optimal arm with probability at least 1 −. For each MAB problem we describe an algorithm referred to as FindBestArm with a query complexity of3 Hexplore · log(1/) that obtains an advice vector ✓that is sufficiently accurate4 w.p. at least 1 −. Definition 1. Let FindBestArm be an algorithm that given the MAB problem and confidence parameter > 0 has the following guarantees. (1) with probability at least 1 −it outputs a correct best arm and advice vector ✓. (2) its expected query complexity is Hexplore · log(1/), where Hexplore is some instance specific complexity (that is not required to be known). The second type of problem is that of verification. Here we are given as input not only the MAB problem and confidence parameter δ, but an advice vector ✓, including the identity of a candidate optimal arm. Definition 2. Let VerifyBestArm be an algorithm that given the MAB problem, confidence parameter δ > 0 and an advice vector ✓including a proposed identity of the best arm, has the following guarantees. (1) if the candidate optimal arm is not the actual optimal arm, the output is ‘fail’ w.p. at least 1 −δ. (2) if the advice vector is sufficiently accurate, and in particular the candidate is indeed the optimal arm, we should output ‘success’ w.p. at least 1 −δ. (3) if the advice vector is sufficiently accurate the expected query complexity is Hverify log(1/δ). Otherwise, it is Hexplore log(1/δ). It is very common that Hverify ⌧Hexplore as it is clearly an easier problem to simply verify the identity of the optimal arm rather than discover it. Our main result is thus somewhat surprising as it essentially shows that in the regime of high confidence, the best arm identification problem is as easy as verifying the identity of a candidate. Specifically we provide a complexity that is additive in Hexplore and log(1/δ) rather than multiplicative. The formal result is as follows. Algorithm 1 Explore-Verify Framework Input: Best arm identification problem, Oracle access to FindBestArm and VerifyBestArm with failure probability tuning, failure probability parameter δ, parameter . for all r = 1 . . . do Call FindBestArm with failure probability , denote by ✓its output. Call VerifyBestArm with advice vector ✓, that includes a candidate best arm ˆx, and failure probability δ/2r2. If succeeded, return ˆx. Else, continue to the next iteration end for 3The general form of such algorithms is in fact H1 log(1/) + H0. For simplicity we state our results for the form H log(1/); the general statements are an easy modification. 4The exact definition of sufficiently accurate is given per problem instance. 3 Theorem 3. Assume that algorithm 1 is given oracle access to FindBestArm and VerifyBestArm with the above mentioned guarantees, and a confidence parameter δ < 1/3. For any < 1/3, the algorithm identifies the best arm with probability 1 −δ while using an expected number of at most O (Hexplore log(1/) + (Hverify + · Hexplore) log(1/δ)) The following provides the guarantees for two suggested values of . The first may not be known to us but can very often be estimated beforehand. The second depends only on δ hence is always known in advance. Corollary 4. By setting = min {1/3, Hverify/Hexplore}, algorithm 1 has an expected number of at most O(Hexplore log(Hexplore/Hverify) + Hverify log(1/δ)) queries. By setting = min {1/3, 1/ log(1/δ)}, algorithm 1 has an expected query complexity of at most O(Hexplore log(log(1/δ)) + Hverify log(1/δ)) Notice that by setting to min {1/3, 1/ log(1/δ)}, for any practical use-case, the dependence on δ in the left summand is nonexistent. In particular, this default value for provides a multiplicative saving of either Hexplore/Hverify, i.e. the ratio between the exploration and verification problem, or log(1/δ) log(log(1/δ)). Since log(1/δ) is rarely a negligible term, and as we will see in what follows, neither is Hexplore/Hverify, the savings are significant, hence the effectiveness of our result. Proof of Theorem 3. In the analysis we often discuss the output of the sub-procedures in round r > 1, even if the algorithm terminated before round r. We note that these values are well-defined random variables regardless of the fact that we may not reach the round. To prove the correctness of the algorithm notice that since P1 r=1 r−2 2 we have with probability at least 1 −δ that all runs of VerifyBestArm do not err. Since we halt only when VerifyBestArm outputs ‘success’ our algorithm indeed outputs the best arm w.p. at least 1 −δ We proceed to analyze the expected query complexity, and start with a simple observation. Let QCsingle(r) denote the expected query complexity in round r, and let Yr be the indicator variable to whether the algorithm reached round r. Since Yr is independent of the procedures running in round r and in particular of the number of queries required by them, we have that the total expected query complexity is E " 1 X r=1 YrQCsingle(r) # = 1 X r=1 E [Yr] · E ⇥ QCsingle(r) ⇤ Hence, we proceed to analyze E ⇥ QCsingle(r) ⇤ and E[Yr] separately. For E ⇥ QCsingle(r) ⇤ we have E ⇥ QCsingle(r) ⇤ Hexplore log(1/)+ ((1 −) Hverify + Hexplore) log ✓2r2 δ ◆ Hexplore log(1/) + (Hexplore + Hverify) log ✓2r2 δ ◆ To explain the first inequality, the first summand is the complexity of FindBestArm . The second summand is that of VerifyBestArm , that is decomposed to the complexity in the scenario where FindBestArm succeeded vs. the scenario where it failed. To compute E[Yr], we notice that Yr is an indicator function hence E[Yr] = Pr[Yr = 1]. In order for Yr to take the value of 1 we must have that for all rounds r0 < r either VerifyBestArm or FindBestArm have failed. Since the failure or success of the algorithms at different rounds are independent we have Pr[Yr = 1] Y r0<r ✓ + δ 2(r0)2 ◆ 21−r . The last inequality is since δ, 1/3. We get that the expected number of queries required by the algorithm is at most 2 · 1 X r=1 2−r ✓ Hexplore log(1/) + (Hexplore + Hverify) log ✓2r2 δ ◆◆ = 4 MAB cite existing solution our solution improvement task ratio Dueling [16] ✓ K1+✏· P x6=x⇤min y: pxy<0 p−2 xy ◆ + P x6=x⇤ y6=x min 8 < :p−2 xy , min y0 : pxy0 <0 p−2 xy 9 = ; + ≥K✏for Bandits P x6=x⇤miny,pxy<0 p−2 xy log(1/δ) P x6=x⇤miny,pxy<0 p−2 xy log(1/δ) large δ (Condorcet) Linear [19] d log(K/δ) ∆2 min d log ⇣ Kd/∆2 min ⌘ ∆2 min + up to d Bandits ⇢⇤(Y ⇤) log (1/δ) for small δ Unimodal [6] P x6=x⇤(∆Γ x)−2+ P x6=x⇤(∆x)−2+ can be ⌦(K) Bandits P x2Γ(x⇤) ∆−2 x log(1/δ) P x2Γ(x⇤) ∆−2 x log(1/δ) in typical (line graph) settings (line graph) (large δ) Graphical [7] KD log(K/δ) log2(K) ∆2 min KD log3(K) ∆2 min + KD log(1/δ) ∆2 min log2(K) Bandits Table 1: Comparison between the results obtained by our techniques and the state-of-the-art results in several bandit problem. K represents the total number of arms, δ the failure probability; in the case of linear bandits, d is the dimension of the space in which the arms lie. The definitions the rest of the problem specific quantities are given in the corresponding sections. The ratio between the solutions, for a typical case is given in the last column. 2 · 1 X r=1 2−r (Hexplore log(1/) + (Hexplore + Hverify) log(1/δ)) + 2 · 1 X r=1 2−r log(2r2) (Hexplore + Hverify) = O (Hexplore log(1/) + (Hexplore + Hverify) log(1/δ)) In the following sections we provide algorithms for several bandit problems using the framework of Theorem 3. In Table 1 we provide a comparison between the state-of-the-art results prior to this paper and the results here. 4 Application to Dueling Bandits The dueling bandit problem, introduced in [22], arises naturally in domains where feedback is more reliable when given as a pairwise preference (e.g., when it is provided by a human) and specifying real-valued feedback instead would be arbitrary or inefficient. Examples include ranker evaluation [14, 23, 12] in information retrieval, ad placement and recommender systems. As with other preference learning problems [10], feedback consists of a pairwise preference between a selected pair of arms, instead of scalar reward for a single selected arm, as in the K-armed bandit problem. The formulation of the problem is the following. Given a set of arms K, a query is to a pair x, y 2 K and its output is a r.v. in {−1, 1} with an expected reward of Pij. It is assumed that P is antisymmetric meaning5 P(x, y) = −P(y, x) and the µ values are determined by those of P. One common assumption regarding P is the existence of a Condorcet winner, meaning there exist some x⇤2 K for which P(x⇤, y) ≥0 for all y 2 K. In this case, x⇤is defined as the best arm and the reward associated with arm y is typically P(x⇤, y). A more general framework can be considered where a Condorcet winner is not assumed to exist. In the absence of a Condorcet winner there is no clear answer as to which arm is the best; several approaches are discussed in [20], [5], and recently in [8, 3], that use some of the notions proposed by social choice theorists, such as the Copeland score or the Borda score to measure the quality of each arm, or game theoretic concepts to determine the best worst-case strategy over arms; we do not elaborate on all of them as they are outside the scope of this paper. In Appendix B.2 we discuss one solution based on the Copeland score, where µ(x) is defined as the number of arm y 6= x where P(x, y) > 0. A general framework capturing both the MAB and DMAB scenarios is that of partial monitoring games introduced by [18]. In this framework, when playing an arm K one obtains a reward µ(x) yet observes a different function h(x). Some connection between h and µ is known in advance and based on it, one can design a strategy to discover the best arm or minimize regret. As we do not present results regarding this framework we do not elaborate on it any further, but rather mention that our results, in terms of query complexity, cannot be matched by the existing results there. 5It is actually common to define the output of P as a number in [0, 1] and have P(x, y) = 1 −P(y, x), but both definitions are equivalent up to a linear shift of P. 5 4.1 Dueling Bandits with the Condorcet Assumption The Condorcet assumption in the Dueling bandit setting asserts the existence of an arm x⇤that beats all other arms. In this section we discuss a solution for finding this arm under the assumption of its existence. Recall that the observable input consists of a set of arms K of size K. There is assumed to exist some matrix P mapping each pair of arms x, y 2 K to a number pxy 2 [−1, 1]; the matrix P has a zero diagonal, meaning pxx = 0 and is anti-symmetric pxy = −pyx. A query to the pair (x, y) gives an observation to a random Bernoulli variable with expected value (1 + pxy)/2 and is considered as an outcome of a match between x, y. As we assume the existence of a Condorcet winner, there exists some x⇤2 K with px⇤y > 0 for all y 6= x. The Condorcet dueling bandit problem, as stated here and without any additional assumptions was tackled in several papers [20, 26, 16]. The best guarantees to date are given by [16] that provide an asymptotically optimal regret bound for the problem, for the regime of a very large time horizon. This result can be transformed into a best-arm identification algorithm, and the corresponding guarantee is listed in Table 1. Loosely speaking, the result shows that it suffices to query each pair sufficiently many times to separate the corresponding Px,y from 0.5 with constant probability, and additionally only K pairs must be queried sufficiently many times in order to separate the corresponding Px,y from 0.5 with probability 1 −δ. We note that other improvements exist that achieve a better constant term (the additive term independent of δ) [25, 24] or an overall improved result via imposing additional assumptions about P such as an induced total order, stochastic triangle inequality etc. [22, 23, 1]. These types of results however fall outside the scope of our paper. In Appendix B.1 we provide an exploration and verification algorithm for the problem. The exploration algorithm queries all pairs until finding, for each suboptimal arm x, an arm y with pxy < 0; the exploration algorithm provides as output not only the identity of the optimal arm, but for each sub-optimal arm x, the identity of an arm y(x) that (approximately) maximizes pyx meaning it beats x by the largest gap. The verification procedure is now straightforward. Given the above advice the algorithm makes sure that for each allegedly sub-optimal x, the arm y(x) indeed beats it meaning p(yx) > 0. We obtain the following formal result. Theorem 5. Algorithm 1, along with the exploration and verification algorithms given in Appendix B.1, finds the Condorcet winner w.p. at least 1 −δ while using an expected amount of at most ˜O 0 @ X y6=x⇤ p−2 x⇤y + X x6=x⇤ X y6=x min ⇢ p−2 xy , min y0,pxy0<0 p−2 xy -1 A + O 0 @ X x6=x⇤ min y,pxy<0 p−2 xy ln(K/δp2 xy) 1 A queries, where x⇤is the Condorcet winner. 5 Application to Linear Bandits The linear bandit problem was originally introduced in [2]. It captures multiple problems where there is linear structure among the available options. Its pure exploration variant (as opposed to the regret setting) was recently discussed in [19]. Recall that in the linear bandit problem the set of arms K is a subset of Rd. The reward function associated with an arm x is a random variable with expected value µ(x) = w>x, for some unknown w 2 Rd. For simplicity we assume that all vectors w, and those of K lie inside the Euclidean unit ball, and that the noise is sub-gaussian with variance 1 (hence concentration bounds such as Hoeffding’s inequality can be applied). The results of [19] offer two approaches. The first is a static strategy that guarantees, for failure probability , a query complexity of d log(K/) ∆2 min with x⇤being the best arm, ∆x = w>(x⇤−x) for x 6= x⇤and ∆min = minx6=x⇤∆x. The second is adaptive and provides better bounds in a specific case where the majority of the hardship of the problem is in separating the best arm from the second best arm. The algorithms are based on tools from the area of Optimal design of experiments where the high level idea is the following: Consider our set of vectors (arms) K and an additional set of vecotrs Y . We are interested in querying a sequence of t arms from K that will minimize the maximum variance of the estimation of w>y, where the maximum is taken over all y 2 Y . Recall that via the Azuma-Hoeffding inequality, one can show that by querying a set of points x1, . . . , xt and solving the Ordinary Least 6 Squares (OLS) problem, one obtains an unbiased estimator of w and the corresponding variance to a point y is ⇢x1,...,xt(y) ∆= y> t X i=1 xix> i !−1 y Hence, our formal problem statement is to obtain a sequence x1, . . . , xt that minimizes ⇢x1,...,xt(Y ) defined as ⇢x1,...,xt(Y ) = maxy2Y ⇢x1,...,xt(y). Tools from the area of Optimal design of experiments (see e.g. [21]) provide ways to obtain such sequences that achieve a multiplicative approximation of 1 + d(d + 1)/t of the optimal sequence. In particular it is shown that as t tends to infinity, t times the ⇢value of the optimal sequence of length t tends to ⇢⇤(Y ) ∆= min p max y2Y y> X x2K pxxx> !−1 y with p restricted to being a distribution over K. We elaborate on these in the extended version of the paper. [19] propose two and analyze two different choices of the set Y . The first is the set Y = K; querying points of K in order to minimize ⇢x1...,xt(K) leads to a best arm identification algorithm with a query complexity of d log(K/)/∆2 min for failure probability . We use essentially the same approach for the exploration procedure (given in the extended version), and with the same (asymptotic) query complexity we do not only obtain a candidate best arm ˆx but also approximations of the different ∆x for all x 6= x⇤. These are required for the verification procedure. The second interesting set Y is the set Y = n x⇤−x ∆x |x 2 K, x 6= x⇤o . Clearly this set is not known to us in advance, but it helps in [19] to define a notion of the ‘true’ complexity of the problem. Indeed, one cannot discover the best arm without verifying that it is superior to the others, and the set Y provides the best strategy to do so. The authors show that6 max y2Y kyk2 ⇢⇤(Y ) 4d/∆2 min and bring examples where each of the inequalities are tight. Notice that the multiplicative gap between the bounding expressions can be huge (at least linear in the dimension d), hence an algorithm with a query complexity depending on ⇢⇤(Y ) as opposed to d/∆2 min can potentially be much better than the above mentioned algorithm. The bound on ⇢⇤(Y ) proves in particular that indeed querying w.r.t. Y is a better strategy than querying w.r.t. K. This immediately translates into a verification procedure. Given the advice from our exploration procedure, we have access to a candidate best arm, and approximate ∆ values. Hence, we construct this set Y and query according to it. We show that given a correct advice, the query complexity for failure probability δ is at most O (⇢⇤(Y ⇤) log(K⇢⇤(Y ⇤)/δ)). Combining the exploration and verification algorithms, we get the following result. Theorem 6. Algorithm 1, along with the exploration and verification algorithms described above (we give a the formal version only in the extended version of the paper), finds the best arm w.p. at least 1 −δ while using an expected query complexity of O d log 4 Kd/∆2 min 5 ∆2 min + ⇢⇤(Y ⇤) log (1/δ) ! 6 Application to Unimodal Bandits The unimodal bandit problem consists of a MAB problem given unimodality information. We focus on a graphical variant defined as follows: There exist some graph G whose vertex set is the set of arm K and an arbitrary edge set E. For every sub-optimal arm x there exist some neighbor y in the graph such that µ(x) < µ(y). In other words, the best arm x⇤is the unique arm having a superior reward compared to its immediate neighbors. The graphical unimodal bandit problem was introduced by7 [13]. 6Under the assumption that all vectors in K lie in the Euclidean unit sphere 7Other variants of the unimodal bandit problem exist, e.g. one where the arms are the scalars in the intervals [0, 1] yet we do not deal with them in this paper, as we focus on pure best arm identification problems and in that scenario the regret setting is more common, and only a PAC algorithm is possible, translating to a T 2/3 rather than p T regret algorithm 7 Due to space constraints we limit the discussion here to a specific type of unimodal bandits in which the underlying graph is line. The motivation here comes from a scenario where the point set K represents an ✏-net over the [0, 1] interval and the µ values come from some unimodal onedimensional function. We discuss the more general graph scenario only in the extended version of the paper. To review the existing results we introduce some notations. For an arm x let Γ(x) denote the set of its neighbors in the graph. For a suboptimal arm x we let ∆Γ x = maxy2Γ(x) µ(y) −µ(x) be the gap between the reward of x and its neighbors and let ∆x = µ(x⇤) −µ(x) be its gap from the best arm x⇤. We denote by ∆Γ min the minimal value of ∆Γ x and ∆min be the minimal value of ∆x. Notice that in reasonable scenarios, for a typical arm x we have ∆Γ x ⌧∆x since many arms are far from being optimal but have a close value to those of their two neighbors. The state-of-the-art results to date, as far as we are aware, for the problem at hand is by [6], where a method OSUB is proposed achieving an expected query complexity of (up to logarithmic terms independent of δ)8 O 0 @ X x6=x⇤ (∆Γ x)−2 + X x2Γ(x⇤) ∆−2 x log(1/δ) 1 A They show that the summand with the logarithmic dependence over δ is optimal. In the context of a line graph we provide an algorithm whose exploration is a simple naive application of a best arm identification algorithm that ignores the structure of the problem, e.g. Exponential Gap-Elimination by [15]. The verification algorithm requires only the identity of the candidate best arm as advice. It simply applies a best arm identification algorithm over the candidate arm and its neighborhood. The following provides our formal results. Theorem 7. Algorithm 1, along with the exploration of Exponential Gap-Elimination and the verification algorithm of Exponential Gap-Elimination, applied to the neighborhood of the candidate best arm, finds the best arm w.p. at least 1 −δ while using an expected query complexity of O 0 @ X x6=x⇤ ∆−2 x log (K/∆min) + X x2Γ(x⇤) ∆−2 x log (1/δ) 1 A The improvement w.r.t. the results of [6] is in the constant term independent of δ. The replacement of ∆Γ x with ∆x leads to a significant improvement in many reasonable submodular functions. For example, if the arms for an ✏-net over the [0, 1] interval, and the function is O(1)-Lipchitz then P x6=x⇤(∆Γ x)−2 = ⌦(✏−3) while P x6=x⇤(∆x)−2 can potentially be O(✏−2). Perhaps for this reason, experiments in [6] showed that often, performing UCB on an ✏-net is superior to other algorithms. 7 Conclusions We presented a general framework for improving the performance of best-arm identification problems, for the regime of high confidence. Our framework is based on the fact that in MAB problems with structure, it is often easier to design an algorithm for verifying a candidate arm is the best one, rather than discovering the identity of the best arm. We demonstrated the effectiveness of our framework by improving the state-of-the-art results in several MAB problems. References [1] Nir Ailon, Zohar Karnin, and Thorsten Joachims. Reducing dueling bandits to cardinal bandits. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 856–864, 2014. [2] Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. The Journal of Machine Learning Research, 3:397–422, 2003. [3] Akshay Balsubramani, Zohar Karnin, Robert Schapire, and Masrour Zoghi. Instance-dependent regret bounds for dueling bandits. In Proceedings of The 29th Conference on Learning Theory, COLT 2016, 2016. 8The result of [6] is in fact tighter in the sense that it takes advantage of the variance of the estimators by using confidence bounds based on KL-divergence. In the case of uniform variance however, the stated results here are accurate. More importantly, the KL-divergence type techniques can be applied here to obtain the same type of guarantees, at the expense of a slightly more technical analysis. For this reason we present the results for the case of uniform variance. 8 [4] Sébastien Bubeck and Nicolo Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Machine Learning, 5(1):1–122, 2012. [5] Róbert Busa-Fekete, Balázs Szörényi, and Eyke Hüllermeier. Pac rank elicitation through adaptive sampling of stochastic pairwise preferences. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, AAAI, 2014. [6] Richard Combes and Alexandre Proutiere. Unimodal bandits: Regret lower bounds and optimal algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 521–529, 2014. [7] Dotan Di Castro, Claudio Gentile, and Shie Mannor. Bandits with an edge. CoRR, abs/1109.2296, 2011. [8] Miroslav Dudík, Katja Hofmann, Robert E. Schapire, Aleksandrs Slivkins, and Masrour Zoghi. Contextual dueling bandits. In Grünwald et al. [11], pages 563–587. [9] Eyal Even-Dar, Shie Mannor, and Yishay Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. The Journal of Machine Learning Research, 7:1079–1105, 2006. [10] J. Fürnkranz and E. Hüllermeier, editors. Preference Learning. Springer-Verlag, 2010. [11] Peter Grünwald, Elad Hazan, and Satyen Kale, editors. Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, volume 40 of JMLR Proceedings. JMLR.org, 2015. [12] K. Hofmann, S. Whiteson, and M. de Rijke. Balancing exploration and exploitation in listwise and pairwise online learning to rank for information retrieval. Information Retrieval, 16(1):63–90, 2013. [13] Y Yu Jia and Shie Mannor. Unimodal bandits. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 41–48, 2011. [14] T. Joachims. Optimizing search engines using clickthrough data. In KDD, 2002. [15] Zohar Karnin, Tomer Koren, and Oren Somekh. Almost optimal exploration in multi-armed bandits. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 1238–1246, 2013. [16] Junpei Komiyama, Junya Honda, Hisashi Kashima, and Hiroshi Nakagawa. Regret lower bound and optimal algorithm in dueling bandit problem. In Grünwald et al. [11], pages 1141–1154. [17] Junpei Komiyama, Junya Honda, and Hiroshi Nakagawa. Copeland dueling bandit problem: Regret lower bound, optimal algorithm, and computationally efficient algorithm, 2016. [18] A. Piccolboni and C. Schindelhauer. Discrete prediction games with arbitrary feedback and loss. In Computational Learning Theory, pages 208–223, 2001. [19] Marta Soare, Alessandro Lazaric, and Rémi Munos. Best-arm identification in linear bandits. In Advances in Neural Information Processing Systems, pages 828–836, 2014. [20] Tanguy Urvoy, Fabrice Clerot, Raphael Féraud, and Sami Naamane. Generic exploration and k-armed voting bandits. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 91–99, 2013. [21] Kai Yu, Jinbo Bi, and Volker Tresp. Active learning via transductive experimental design. In Proceedings of the 23rd international conference on Machine learning, pages 1081–1088. ACM, 2006. [22] Y. Yue, J. Broder, R. Kleinberg, and T. Joachims. The K-armed dueling bandits problem. Journal of Computer and System Sciences, 78(5):1538–1556, September 2012. [23] Y. Yue and T. Joachims. Beat the mean bandit. In ICML, 2011. [24] Masrour Zoghi, Zohar Karnin, Shimon Whiteson, and Maarten de Rijke. Copeland dueling bandits. In Advances in Neural Information Processing Systems, pages 307–315, 2015. [25] Masrour Zoghi, Shimon Whiteson, and Maarten de Rijke. Mergerucb: A method for large-scale online ranker evaluation. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, pages 17–26. ACM, 2015. [26] Masrour Zoghi, Shimon Whiteson, Remi Munos, and Maarten D Rijke. Relative upper confidence bound for the k-armed dueling bandit problem. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 10–18, 2014. 9 | 2016 | 229 |
6,138 | An equivalence between high dimensional Bayes optimal inference and M-estimation Madhu Advani Surya Ganguli Department of Applied Physics, Stanford University msadvani@stanford.edu and sganguli@stanford.edu Abstract When recovering an unknown signal from noisy measurements, the computational difficulty of performing optimal Bayesian MMSE (minimum mean squared error) inference often necessitates the use of maximum a posteriori (MAP) inference, a special case of regularized M-estimation, as a surrogate. However, MAP is suboptimal in high dimensions, when the number of unknown signal components is similar to the number of measurements. In this work we demonstrate, when the signal distribution and the likelihood function associated with the noise are both log-concave, that optimal MMSE performance is asymptotically achievable via another M-estimation procedure. This procedure involves minimizing convex loss and regularizer functions that are nonlinearly smoothed versions of the widely applied MAP optimization problem. Our findings provide a new heuristic derivation and interpretation for recent optimal M-estimators found in the setting of linear measurements and additive noise, and further extend these results to nonlinear measurements with non-additive noise. We numerically demonstrate superior performance of our optimal M-estimators relative to MAP. Overall, at the heart of our work is the revelation of a remarkable equivalence between two seemingly very different computational problems: namely that of high dimensional Bayesian integration underlying MMSE inference, and high dimensional convex optimization underlying M-estimation. In essence we show that the former difficult integral may be computed by solving the latter, simpler optimization problem. 1 Introduction Modern technological advances now enable scientists to simultaneously record hundreds or thousands of variables in fields ranging from neuroscience and genomics to health care and economics. For example, in neuroscience, we can simultaneously record P = O(1000) neurons in behaving animals. However, the number of measurements N we can make of these P dimensional neural activity patterns can be limited in any given experimental condition due to constraints on recording time. Thus a critical parameter is the measurement density α = N P . Classical statistics focuses on the limit of few variables and many measurements, so P is finite, N is large, and α →∞. Here, we instead consider the modern high dimensional limit where the measurement density α remains finite as N, P →∞. In this important limit, we ask what is the optimal way to recover signal from noise? More precisely, we wish to recover an unknown signal vector s0 ∈RP given N noisy measurements yµ = r(xµ · s0, ϵµ) where xµ ∈RP and yµ ∈R, for µ = 1, . . . , N. (1) Here, xµ and yµ are input-output pairs for measurement µ, r is a measurement nonlinearity, and ϵµ is a noise realization. For example, in a brain machine interface, xµ could be a neural activity pattern, yµ a behavioral covariate, and s0 the unknown regression coefficients of a decoder relating neural activity to behavior. Alternatively, in sensory neuroscience, xµ could be an external stimulus, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. yµ a single neuron’s response to that stimulus, and s0 the unknown receptive field relating stimulus to neural response. We assume the noise ϵµ is independent and identically distributed (iid) across measurements, implying the outputs yµ are drawn iid from a noise distribution Py|z(yµ|zµ), where zµ = xµ · s0. Similarly, we assume the signal components s0 i are drawn iid from a prior signal distribution Ps(s0). We denote its variance below by σ2 s. Finally, we denote by X ∈RN×P the input or measurement matrix, whose µ’th row is xµ, and by y ∈RN the measurement output vector whose µ’th component is yµ. In this paper, we will focus on the case of dense iid random Gaussian measurements, normalized so that ⟨xµ · xν ⟩= γ δµ,ν. In the case of systems identification in sensory neuroscience, this choice would correspond to an oft used white noise stimulus at contrast γ. Now given measurement data (X, y), as well as knowledge of the nonlinearity r(·) and the signal Ps and noise Py|z distributions, what is the best way to infer an estimate ˆs of the unknown signal s0? We characterize the performance of an estimate ˆs by its mean squared error (MSE), ∥ˆs −s0∥2 2, averaged over noise realizations and measurements. The best minimal MSE (MMSE) estimator is given by optimal Bayesian integration to compute the posterior mean: ˆsMMSE = Z s P(s|X, y) ds. (2) Unfortunately, this integral is generally intractable in high dimensions, at large P; both numerical integration and Monte Carlo methods for estimating the integral require computational time growing exponentially in P for high accuracy. Consequently, an often used surrogate for MMSE inference is maximum a posteriori (MAP) inference, which computes the mode rather than the mean of the posterior distribution. Thus MAP relies on optimization rather than integration: ˆsMAP = arg max s P(s|X, y) = arg min s [−log P(s|X, y)]. (3) Assuming inputs X are independent of the unkown signal s0, the above expression becomes ˆsMAP = arg min s " N X µ=1 −log Py|z(yµ|xµ · s) + P X i=1 −log Ps(si) # . (4) A related algorithm is maximum likelihood (ML), which seeks to maximize the likelihood of the data given a candidate signal s. ML is equivalent to MAP in (4) but without the second sum, i.e. without prior information on the signal. While ML is typically optimal amongst unbiased estimators in the classical statistical limit α →∞ (see e.g. [1]), neither MAP nor ML are optimal in high dimensions, at finite α. Therefore, we consider a broader class of estimators known as regularized M-estimators, corresponding to the optimization problem ˆs = arg min s " N X µ=1 L(yµ, xµ · s) + P X i=1 σ(si) # . (5) Here L(y, η) is a loss function and σ is a regularizer. We assume both to be convex functions in η and s respectively. Note that MAP inference corresponds to the choice L(y, η) = −log Py|z(y|η) and σ(s) = −log Ps(s). ML inference corresponds to the same loss function but without regularization: σ(s) = 0. Other well known M-estimators include LASSO [2], corresponding to the choice L(y, η) = 1 2(y −η)2 and σ(s) ∝|s|, or the elastic net [3], which includes an addition quadratic term on the LASSO regularizer. Such M-estimators are heuristically motivated as a convex relaxation of MAP inference for sparse signal distributions, and have been found to be very useful in such settings. However, a general theory for how to select the optimal M-estimator in (5) given the generative model of data in (1) remains elusive. This is the central problem we address in this work. 1.1 Related work and Outline Seminal work [4] found the optimal unregularized M-estimator using variational methods in the special case of linear measurements and additive noise, i.e. r(z, ϵ) = z + ϵ in (1). In this same setting, [5] characterized unregularized M-estimator performance via approximate message passing (AMP) [6]. Following this, the performance of regularized M-estimators in the linear additive setting was characterized in [7], using non-rigorous statistical physics methods based on replica theory, and 2 in [8], using rigorous methods different from [4, 5]. Moreover, [7] found the optimal regularized M-estimator and demonstrated, surprisingly, zero performance gap relative to MMSE. The goals of this paper are to (1) interpret and extend previous work by deriving an equivalence between optimal M-estimation and Bayesian MMSE inference via AMP and (2) to derive the optimal M-estimator in the more general setting of nonlinear measurements and non-additive noise. To address these goals, we begin in section 2 by describing a pair of AMP algorithms, derived heuristically via approximations of belief propagation (BP). The first algorithm, mAMP, is designed to solve M-estimation in (5), while the second, bAMP, is designed to solve Bayesian MMSE inference in (2). In section 3 we derive a connection, via AMP, between M-estimation and MMSE inference: we find, for a particular choice of optimal M-estimator, that mAMP and bAMP have the same fixed points. To quantitatively determine the optimal M-estimator, which depends on some smoothing parameters, we must quantitatively characterize the performance of AMP, which we do in section 4. We thereby recover optimal M-estimators found in recent works in the linear additive setting, without using variational methods, and moreover find optimal M-estimators in the nonlinear, nonadditive setting. Our non-variational approach through AMP also provides an intuitive explanation for the form of the optimal M-estimator in terms of Bayesian inference. Intriguingly, the optimal M-estimator resembles a smoothed version of MAP, with lower measurement density requiring more smoothing. In Section 4, we also demonstrate, through numerical simulations, a substantial performance improvement in inference accuracy achieved by the optimal M-estimator over MAP under nonlinear measurements with non-additive noise. We end with a discussion in section 5. 2 Formulations of Bayesian inference and M-estimation through AMP Both mAMP and bAMP, heuristically derived in the supplementary material 1 (SM) sections 2.2-2.4 though approximate BP applied to (5) and (2) respectively, can be expressed as special cases of a generalized AMP (gAMP) algorithm [9], which we first describe. gAMP is a set of iterative equations, ηt = Xˆst + λt ηGy(λt−1 η , y, ηt−1) ˆst+1 = Gs λt h,ˆst −λt hXT Gy(λt η, y, ηt) (6) λt h = γα N N X ν=1 ∂ ∂η Gy(λt η, yν, ηt ν) !−1 λt+1 η = γλt h P P X j=1 ∂ ∂hGs(λt h, ˆst j −λt hXT j Gy(λt η, y, ηt)), (7) that depend on the scalar functions Gy(λη, y, η) and Gs(λh, h) which, in our notation, act componentwise on vectors so that µth component Gy(λη, y, η)µ = Gy(λη, yµ, ηµ) and the ith component Gs(λh, h)i = Gs(λh, hi). Initial conditions are given by ˆst=0 ∈RP , λt=0 η ∈R+ and ηt=−1 ∈RN. Intuitively, one can think of ηt as related to the linear part of the measurement outcome predicted by the current guess ˆst, and Gy is a measurement correction map that uses the actual measurement data y to correct ηt. Also, intuitively, we can think of Gs as taking an input ˆst −λt hXT Gy(λt η, y, ηt), which is a measurement based correction to ˆst, and yielding as output a further, measurement independent correction ˆst+1, that could depend on either a regularizer or prior. We thus refer to the functions Gy and Gs as the measurement and signal correctors respectively. gAMP is thus alternating measurement and signal correction, with time dependent parameters λt h and λt η. These equations were described in [9], and special cases of them were studied in various works (see e.g. [5, 10]). 2.1 From M-estimation to mAMP Now, applying approximate BP to (5) when the input vectors xµ are iid Gaussian, again with normalization ⟨xµ · xµ ⟩= γ, we find (SM Sec. 2.3) that the resulting mAMP equations are a special case of the gAMP equations, where the functions Gy and Gs are related to the loss L and regularizer σ through GM y (λη, y, η) = Mλη[ L(y, ·) ]′(η), GM s (λh, h) = Pλh[ σ ](h). (8) 1Please see https://ganguli-gang.stanford.edu/pdf/16.Bayes.Mestimation.Supp.pdf for the supplementary material. 3 The functional mappings M and P, the Moreau envelope and proximal map [11], are defined as Mλ[ f ](x) = min y (x −y)2 2λ + f(y) , Pλ[ f ](x) = arg min y (x −y)2 2λ + f(y) . (9) The proximal map maps a point x to another point that minimizes f while remaining close to x as determined by a scale λ. This can be thought of as a proximal descent step on f starting from x with step length λ. Perhaps the most ubiquitous example of a proximal map occurs for f(z) = |z|, in which case the proximal map is known as the soft thresholding operator and takes the form Pλ[ f ](x) = 0 for |x| ≤λ and Pλ[ f ](x) = x −sign(x)λ for |x| ≥λ. This soft thresholding is prominent in AMP approaches to compressed sensing (e.g. [10]). The Moreau envelope is a minimum convolution of f with a quadratic, and as such, Mλ[ f ](x) is a smoothed lower bound on f with the same minima [11]. Moreover, differentiating M with respect to x yields [11] the relation Pλ[ f ](x) = x −λMλ[ f ]′(x). (10) Thus a proximal descent step on f is equivalent to a gradient descent step on the Moreau envelope of f, with the same step length λ. This equality is also useful in proving (SM Sec. 2.1) that the fixed points of mAMP satisfy XT ∂ ∂η L(y, Xˆs) + σ′(ˆs) = 0. (11) Thus fixed points of mAMP are local minima of M-estimation in (5). To develop intuition for the mAMP algorithm, we note that the ˆs update step in (6) is similar to the more intuitive proximal gradient descent algorithm [11] which seeks to solve the M-estimation problem in (5) by alternately performing a gradient descent step on the loss term and a proximal descent step on the regularization term, both with the same step length. Thus one iteration of gradient descent on L followed by proximal descent on σ in (5), with both steps using step length λh, yields ˆst+1 = Pλh[ σ ](ˆst −λhXT ∂ ∂ηL(y, Xˆst)). (12) By inserting (8) into (6)-(7), we see that mAMP closely resembles proximal gradient descent, but with three main differences: 1) the loss function is replaced with its Moreau envelope, 2) the loss is evaluated at ηt which includes an additional memory term, and 3) the step size λt h is time dependent. Interestingly, this additional memory term and step size evolution has been found to speed up convergence relative to proximal gradient descent in certain special cases, like LASSO [10]. In summary, in mAMP the measurement corrector Gy implements a gradient descent on the Moreau smoothed loss, while the signal corrector Gs implements a proximal descent step on the regularizer. But because of (10), this latter step can also be thought of as a gradient descent step on the Moreau smoothed regularizer. Thus overall, the mAMP approach to M-estimation is intimately related to Moreau smoothing of both the loss and regularizer. 2.2 From Bayesian integration to bAMP Now, applying approximate BP to (2) when again the input vectors xµ are iid Gaussian, we find (SM Sec. 2.2) that the resulting bAMP equations are a special case of the gAMP equations, where the functions Gy and Gs are related to the noise Py|z and signal Ps distributions through GB y (λη, y, η) = −∂ ∂η log (Py(y|η, λη)), GB s (λh, h) = ˆsmmse(λh, h), (13) where Py(y|η, λ) ∝ Z Py|z(y|z)e−(η−z)2 2λ dz, ˆsmmse(λ, h) = R sPs(s)e−(s−h)2 2λ ds R Ps(s)e−(s−h)2 2λ ds , (14) as derived in SM section 2.2. Here Py(y|η, λ) is a convolution of the likelihood with a Gaussian of variance λ (normalized so that it is a probability density in y) and ˆsmmse denotes the posterior mean s0|h where h = s0 + √ λw is a corrupted signal, w is a standard Gaussian random variable, and s0 is a random variable drawn from Ps. Inserting these equations into (6)-(7), we see that bAMP performs a measurement correction step through Gy that corresponds to a gradient descent step on the negative log of a Gaussian-smoothed likelihood function. The subsequent signal correction step through Gs is simply the computation of a posterior mean, assuming the input is drawn from the prior and corrupted by additive Gaussian noise with a time-dependent variance λt h. 4 3 An AMP equivalence between Bayesian inference and M-estimation In the previous section, we saw intriguing parallels between mAMP and bAMP, both special cases of gAMP. While mAMP performs its measurement and signal correction through a gradient descent step on a Moreau smoothed loss and a Moreau smoothed regularizer respectively, bAMP performs its measurement correction through a gradient descent step on the minus log of a Gaussian smoothed likelihood, and its signal correction though an MMSE estimation problem. These parallels suggest we may be able to find a loss L and regularizer σ such that the corresponding mAMP becomes equivalent to bAMP. If so, then assuming the correctness of bAMP as a solution to (2), the resulting Lopt and σopt will yield the optimal mAMP dynamics, achieving MMSE inference. By comparing (8) and (13), we see that bAMP and mAMP will have the same Gy if the Moreausmoothed loss equals the minus log of the Gaussian-smoothed likelihood function: Mλη[ Lopt(y, ·) ](η) = −log (Py(y|η, λη)). (15) Before describing how to invert the above expression to determine Lopt, we would also like to find a relation between the two signal correction functions GM s and GB s . This is a little more challenging because the former implements a proximal descent step while the latter implements an MMSE posterior mean computation. However, we can express the MMSE computation as gradient ascent on the log of a Gaussian smoothed signal distribution (see SM): ˆsmmse(λh, h) = h + λh ∂ ∂h log (Ps(h, λh)), Ps(h, λ) ∝ Z Ps(s)e−(s−h)2 2λ ds. (16) Moreover, by applying (10) to the definition of GM s in (8), we can write GM s as gradient descent on a Moreau smoothed regularizer. Then, comparing these modified forms of GB s with GM s , we find a similar condition for σopt, namely that its Moreau smoothing should equal the minus log of the Gaussian smoothed signal distribution: Mλh[ σopt ](h) = −log (Ps(h, λh)) . (17) Our goal is now to compute the optimal loss and regularizer by inverting the Moreau envelope relations (15, 17) to solve for Lopt, σopt. A sufficient condition [4] to invert these Moreau envelopes to determine the optimal mAMP dynamics is that Py(y|z) and Ps(s) are log concave with respect to z and s respectively. Under this condition the Moreau envelope will be invertible via the relation Mq[ −Mq[ −f ](·) ](·) = f(·) (see SM Appendix A.3 for a derivation), which yields: Lopt(y, η) = −Mλη[ log (Py(y|·, λη)) ](η), σopt(h) = −Mλh[ log (Ps(·, λh)) ](h). (18) This optimal loss and regularizer form resembles smoothed MAP inference, with λη and λh being scalar parameters that modify MAP through both Gaussian and Moreau smoothing. An example of such a family of smoothed loss and regularizer functions is given in Fig. 1 for the case of a logistic output channel with Laplacian distributed signal. Additionally, one can show that the optimal loss and regularizer are convex when the signal and noise distributions are log-concave. Overall, this analysis yields a dynamical equivalence between mAMP and bAMP as long as at each iteration time t, the optimal loss and regularizer for mAMP are chosen through the smoothing operation in (18), but using time-dependent smoothing parameters λt η and λt h whose evolution is governed by (7). 4 Determining optimal smoothing parameters via state evolution of AMP In the previous section, we have shown that mAMP and bAMP have the same dynamics, as long as, at each iteration t of mAMP, we choose a time dependent optimal loss Lopt t and regularizer σopt t through (18), where the time dependence is inherited from the time dependent smoothing parameters λt η and λt h. However, mAMP was motivated as an algorithmic solution to the M-estimation problem in (5) for a fixed loss and regularizer, while bAMP was motivated as a method of performing the Bayesian integral in (2). This then raises the question, is there a fixed, optimal choice of Lopt and σopt in (5) such the corresponding M-estimation problem yields the same answer as the Bayesian integral in (2)? The answer is yes: simply choose a fixed Lopt and σopt through (18) where the smoothing parameters λη and λh are chosen to be those found at the fixed points of bAMP. To see this, note that fixed points of mAMP with time dependent choices of Lopt t and σopt t are equivalent to the minima of the 5 -4 -2 0 2 4 0 1 2 3 4 -2 -1 0 1 2 0 0.5 1 1.5 2 A Optimal loss B Optimal regularizer Figure 1: Here we plot the optimal loss (A) and regularizer (B) in (18), for a logistic output y ∈{0, 1} with Py|z(y = 1|z) = 1 1+e−z , and Laplacian signal s with Ps(s) = 1 2e−|s|. In (A) we plot the loss for the measurement y = 1: Lopt(y = 1, ·). Both sets of curves from red to black (and bottom to top) correspond to smoothing parameters λη = (0, 2, 4, 6) in (A) and λh = (0, 1/2, 1, 2) in (B). With zero smoothing, the red curves at the bottom correspond to the MAP loss and regularizer. M-estimation problem in (5), with the choice of loss and regularizer that this time dependent sequence converges to: Lopt ∞and σopt ∞(this follows from an extension of the argument that lead to (11)). In turn the fixed points of mAMP are equivalent to those of bAMP under the choice (18). These equivalences then imply that, if the bAMP dynamics for (ˆst, λt η, λt h) approaches the fixed point (ˆs∞, λ∞ η , λ∞ h ), then ˆs∞is the solution to both Bayesian inference in (2) and optimal M-estimation in (5), with optimal loss and regularizer given by (18) with the choice of smoothing parameters λ∞ η and λ∞ h . We now discuss how to determine λ∞ η and λ∞ h analytically, thereby completing our heuristic derivation of an optimal M-estimator that matches Bayesian MMSE inference. An essential tool is state evolution (SE) which characterizes the gAMP dynamics [12] as follows. First, let z = Xs0 be related to the true measurements. Then (6) implies that ηt −z is a time-dependent residual. Remarkably, the gAMP equations ensure that the components of the residual ηt −z, as well as ht = −λt hXT Gy(λt η, y, ηt) are Gaussian distributed; the history term in the update of ηt in (6) crucially cancels out non-Gaussian structure that would otherwise develop as the vectors ηt and ht propagate through the nonlinear measurement and signal correction steps induced by Gy and Gs. We denote by qt η and qt h the variance of the components of ηt −z and ht respectively. Additionally, we denote by qt s = 1 P ⟨∥ˆst −s0∥2⟩ the per component MSE at iteration t. SE is a set of analytical evolution equations for the quantities (qt s, qt η, qt h, λt η, λt h) that characterize the state of gAMP. A rigorous derivation both for dense [12] Gaussian measurements and sparse measurements [13] reveal that the SE equations accurately track the gAMP dynamical state in the high dimensional limit N, P →∞with α = N P O(1) that we consider here. We derive the specific form of the mAMP SE equations, yielding a set of 5 update equations (see SM section 3.1 for further details). We also derive the SE equations for bAMP, which are simpler. First, we find the relations λt η = qt η and λt h = qt h. Thus SE for bAMP reduces to a pair of update equations: qt+1 η = γ GB s (qt h, s0 + p qt hw) −s02 w,s0 qt h = αγ D GB y (qt η, y, ηt) 2 E y,z,ηt −1 . (19) Here w is a zero mean unit variance Gaussian and s0 is a scalar signal drawn from the signal distribution Ps. Thus the computation of the next residual qt+1 η on the LHS of (19) involves computing the MSE in estimating a signal s0 corrupted by Gaussian noise of variance qt h, using MMSE inference as an estimation prcoedure via the function GB defined in (13). The RHS involves an average over the joint distribution of scalar versions of the output y, true measurement z, and estimated measurement ηt. These three scalars are the SE analogs of the gAMP variables y, z, and ηt, and they model the joint distribution of single components of these vectors. Their joint distribution is given by P(y, z, ηt) = Py|z(y|z)P(z, ηt). In the special case of bAMP, z and ηt are jointly zero mean Gaussian with second moments given by ⟨(ηt)2⟩= γσ2 s −qt η, ⟨z2⟩= γσ2 s, 6 and ⟨zηt ⟩= γσ2 s −qt η (see SM 3.2 for derivations). These moments imply the residual variance (z −ηt)2 = qt η. Intuitively, when gAMP works well, that is reflected in the SE equations by the reduction of the residual variance qt η over time, as the time dependent estimated measurement ηt converges to the true measurement z. The actual measurement outcome y, after the nonlinear part of the measurement process, is always conditionally independent of the estimated measurement ηt, given the true linear part of the measurement, z. Finally, the joint distribution of a single component of ˆst+1 and s0 in gAMP are predicted by SE to have the same distribution as ˆst+1 = GB s (qt h, s0 + p qt hw), after marginalizing out w. Comparing with the LHS of (19) then yields that the MSE per component satisfies qt s = qt η/γ. Now, bAMP performance, upon convergence, is characterized by the fixed point of SE, which satisfies qs = MMSE(s0|s0 + √qhw) qh = 1 αγJ [ Py(y|η, γqs) ]. (20) Here, the MMSE function denotes the minimal error in estimating the scalar signal s0 from a measurement of s0 corrupted by additive Gaussian noise of variance qh via computation of the posterior mean s0|s0 + √qhw : MMSE(s0|s0 + √qhw) = D s0|s0 + √qhw −s02 E s0,w. (21) Also, the function J on the RHS of (20) denotes the average Fisher information that y retains about an input, with some additional Gaussian input noise of variance q: J [ Py(y|η, q) ] = − D ∂2 ∂η2 log Py(y|η, q) E η,y (22) These equations characterize the performance of bAMP, through qs. Furthermore, they yield the optimal smoothing parameters λη = γqs and λh = qh. This choice of smoothing parameters, when used in (18), yield a fixed optimal loss Lopt and regularizer σopt. When this optimal loss and regularizer are used in the M-estimation problem in (5), the resulting M-estimator should have performance equivalent to that of MMSE inference in (2). This completes our heuristic derivation of an equivalence between optimal M-estimation and Bayesian inference through message passing. In Figure 2 we demonstrate numerically that the optimal M-estimator substantially outperforms MAP, especially at low measurement density α, and has performance equivalent to MMSE inference, as theoretically predicted by SE for bAMP. 0 1 2 3 4 5 0.3 0.4 0.5 0.6 0.7 0.8 0.9 MAP Optimal Optimal vs MAP inference error Figure 2: For logistic output and Laplacian signal, as in Fig. 1, we plot the per component MSE, normalized by signal variance. Smooth curves are theoretical predictions based on SE fixed points for mAMP for MAP inference (red) and bAMP for MMSE inference (black). Error bars reflect standard deviation in performance obtained by solving (5), via mAMP, for MAP inference (red) and optimal M-estimation (black), using simulated data generated as in (1), with dense i.i.d Gaussian measurements. For these finite simulated data sets, we varied α = N P , while holding √ NP ≈250. These results demonstrate that optimal M-estimation both significantly outperforms MAP (black below red) and matches Bayesian MMSE inference as predicted by SE for bAMP (black error bars consistent with black curve). 5 Discussion Overall we have derived an optimal M-estimator, or a choice of optimal loss and regularizer, such the M-estimation problem in (5) has equivalent performance to that of Bayes optimal MMSE inference in (2), in the case of log-concave signal distribution and noise likelihood. Our derivation is heuristic in that it employs the formalism of gAMP, and as such depends on the correctness of a few statements. First, we assume that two special cases of the gAMP dynamics in (6), namely mAMP in (8) and 7 bAMP in (13) correctly solve the M-estimation problem in (5) and Bayesian MMSE inference in (2), respectively. We provide a heuristic derivation of both of these assumptions in the SM based on approximations of BP. Second, we require that SE in (19) correctly tracks the performance of gAMP in (13). We note that under mild conditions, the correctness of SE as a description of gAMP was rigorously proven in [12]. While we have not presented a rigorous derivation that the bAMP dynamics correctly solves the MMSE inference problem, we note several related rigorous results. First, it has been shown that bAMP is equivalent to MMSE inference in the limit of large sparse measurement matrices in [13, 14]. Also, in this same large sparse limit, the corresponding mAMP algorithm was shown to be equivalent to MAP inference with additive Gaussian noise [15]. In the setting of dense measurements, the correctness of bAMP has not yet been rigorously proven, but the associated SE is believed to be exact in the dense iid Gaussian measurement setting based on replica arguments from statistical physics (see e.g. section 4.3 in [16] for further discussion). For this reason, similar arguments have been used to determine theoretical bounds on inference algorithms in compressed sensing [16], and matrix factorization [17]. There are further rigorous results in the setting of M-estimation: mAMP and its associated SE is also provably correct in the large sparse measurement limit, and has additionally been rigorously proven to converge in special cases [5],[6] for dense iid Gaussian measurements. We further expect these results to generalize to a universality class of measurement matrices with iid elements and a suitable condition on their moments. Indeed this generalization was demonstrated rigorously for a subclass of M-estimators in [18]. In the setting of dense measurements, due to the current absence of rigorous results demonstrating the correctness of bAMP in solving MMSE inference, we have also provided numerical experiments in Fig. 2. This figure demonstrates that optimal M-estimation can significantly outperform MAP for high dimensional inference problems, again for the case of log-concave signal and noise. Additionally, we note that the per-iteration time complexity of the gAMP algorithms (6, 7) scales linearly in both the number of measurements and signal dimensions. Therefore the optimal algorithms we describe are applicable to large-scale problems. Moreover, at lower measurement densities, the optimal loss and regularizer are smoother. Such smoothing may accelerate convergence time. Indeed smoother convex functions, with smaller Lipschitz constants on their derivative, can be minimized faster via gradient descent. It would be interesting to explore whether a similar result may hold for gAMP dynamics. Another interesting future direction is the optimal estimation of sparse signals, which typically do not have log-concave distributions. One potential strategy in such scenarios would be to approximate the signal distribution with the best log-concave fit and apply optimal smoothing to determine a good regularizer. Alternatively, for any practical problem, one could choose the precise smoothing parameters through any model selection procedure, for example cross-validation on held-out data. Thus the combined Moreau and Gaussian smoothing in (18) could yield a family of optimization problems, where one member of this family could potentially yield better performance in practice on held-out data. For example, while LASSO performs very well for sparse signals, as demonstrated by its success in compressed sensing [19, 20], the popular elastic net [3], which sometimes outperforms pure LASSO by combining L1 and L2 penalties, resembles a specific type of smoothing of an L1 regularizer. It would be interesting to see if combined Moreau and Gaussian smoothing underlying our optimal M-estimators could significantly out-perform LASSO and elastic net in practice, when our distributional assumptions about signal and noise need not precisely hold. However, finding optimal M-estimators for known sparse signal distributions, and characterizing the gap between their performance and that of MMSE inference, remains a fundamental open question. Acknowledgements The authors would like to thank Lenka Zdeborova and Stephen Boyd for useful discussions and also Chris Stock and Ben Poole for comments on the manuscript. M.A. thanks the Stanford MBC and SGF for support. S.G. thanks the Burroughs Wellcome, Simons, Sloan, McKnight, and McDonnell foundations, and the Office of Naval Research for support. 8 References [1] P. Huber and E. Ronchetti. Robust Statistics. Wiley, 2009. [2] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), 58:267–288, 1996. [3] H. Zou and T. Hastie. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67:301–320, 2005. [4] D. Bean, PJ Bickel, N. El Karoui, and B. Yu. Optimal M-estimation in high-dimensional regression. PNAS, 110(36):14563–8, 2013. [5] D Donoho and A Montanari. High dimensional robust m-estimation: Asymptotic variance via approximate message passing. Probability Theory and Related Fields, pages 1–35, 2013. [6] M Bayati and A Montanari. The dynamics of message passing on dense graphs, with applications to compressed sensing. Information Theory, IEEE Transactions, 57(2):764–785, 2011. [7] M Advani and S Ganguli. Statistical mechanics of optimal convex inference in high dimensions. Physical Review X, 6:031034. [8] C. Thrampoulidis, Abbasi E., and Hassibi B. Precise high-dimensional error analysis of regularized m-estimators. 2015 53rd Annual Allerton Conference on Communication, Control, and Compting (Allerton), pages 410–417, 2015. [9] S Rangan. Generalized approximate message passing for estimation with random linear mixing. Information Theory Proceedings (ISIT), 2011 IEEE International Symposium, pages 2168–2172, 2011. [10] D. L. Donoho, A. Maleki, and Montanari A. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, pages 18914–18919, 2009. [11] N. Parikh and S. Boyd. Proximal algorithms. Foundations and Trends in Optimization, 1(3):123– 231, 2013. [12] A Javanmard and A Montanari. State evolution for general approximate message passing algorithms, with applications to spatial coupling. Information and Inference, page iat004, 2013. [13] S Rangan. Estimation with random linear mixing, belief propagation and compressed sensing. Information Sciences and Systems (CISS), 2010 44th Annual Conference, 2010. [14] D Guo and CC Wang. Random sparse linear systems observed via arbitrary channels: A decoupling principle. Information Theory, 2007. ISIT 2007. IEEE International Symposium, 2007. [15] CC Wang and D Guo. Belief propagation is asymptotically equivalent to map estimation for sparse linear systems. Proc. Allerton Conf, pages 926–935, 2006. [16] F Krzakala, M M´ezard, F Sausset, Y. Sun, and L. Zdeborov´a. Probabilistic reconstruction in compressed sensing: algorithms, phase diagrams, and threshold achieving matrices. Journal of Statistical Mechanics: Theory and Experiment, (08):P08009, 2012. [17] Y. Kabashima, F. Krzakala, M. Mzard, A. Sakata, and L. Zdeborov´a. Phase transitions and sample complexity in bayes-optimal matrix factorization. IEEE Transactions on Information Theory, 62:4228–4265, 2016. [18] M Bayati, M Lelarge, and A Montanari. Universality in polytope phase transitions and message passing algorithms. The Annals of Applied Probability, 25:753–822, 2015. [19] E. Candes and M. Wakin. An introduction to compressive sampling. IEEE Sig. Proc. Mag., 25(2):21–30, 2008. [20] A.M. Bruckstein, D.L. Donoho, and M. Elad. From sparse solutions of systems of equations to sparse modeling of signals and images. SIAM Review, 51(1):34–81, 2009. 9 | 2016 | 23 |
6,139 | SURGE: Surface Regularized Geometry Estimation from a Single Image Peng Wang1 Xiaohui Shen2 Bryan Russell2 Scott Cohen2 Brian Price2 Alan Yuille3 1University of California, Los Angeles 2Adobe Research 3Johns Hopkins University Abstract This paper introduces an approach to regularize 2.5D surface normal and depth predictions at each pixel given a single input image. The approach infers and reasons about the underlying 3D planar surfaces depicted in the image to snap predicted normals and depths to inferred planar surfaces, all while maintaining fine detail within objects. Our approach comprises two components: (i) a fourstream convolutional neural network (CNN) where depths, surface normals, and likelihoods of planar region and planar boundary are predicted at each pixel, followed by (ii) a dense conditional random field (DCRF) that integrates the four predictions such that the normals and depths are compatible with each other and regularized by the planar region and planar boundary information. The DCRF is formulated such that gradients can be passed to the surface normal and depth CNNs via backpropagation. In addition, we propose new planar-wise metrics to evaluate geometry consistency within planar surfaces, which are more tightly related to dependent 3D editing applications. We show that our regularization yields a 30% relative improvement in planar consistency on the NYU v2 dataset [24]. 1 Introduction Recent efforts to estimate the 2.5D layout of a depicted scene from a single image, such as per-pixel depths and surface normals, have yielded high-quality outputs respecting both the global scene layout and fine object detail [2, 6, 7, 29]. Upon closer inspection, however, the predicted depths and normals may fail to be consistent with the underlying surface geometry. For example, consider the depth and normal predictions from the contemporary approach of Eigen and Fergus [6] shown in Figure 1 (b) (Before DCRF). Notice the significant distortion in the predicted depth corresponding to the depicted planar surfaces, such as the back wall and cabinet. We argue that such distortion arises from the fact that the 2.5D predictions (i) are made independently per pixel from appearance information alone, and (ii) do not explicitly take into account the underlying surface geometry. When 3D geometry has been used, e.g., [29], it often consists of a boxy room layout constraint, which may be too coarse and fail to account for local planar regions that do not adhere to the box constraint. Moreover, when multiple 2.5D predictions are made (e.g., depth and normals), they are not explicitly enforced to agree with each other. To overcome the above issues, we introduce an approach to identify depicted 3D planar regions in the image along with their spatial extent, and to leverage such planar regions to regularize the depth and surface normal outputs. We formulate our approach as a four-stream convolutional neural network (CNN), followed by a dense conditional random field (DCRF). The four-stream CNN independently predicts at each pixel the surface normal, depth, and likelihoods of planar region and planar boundary. The four cues are integrated into a DCRF, which encourages the output depths and normals to align with the inferred 3D planar surfaces while maintaining fine detail within objects. Furthermore, the output depths and normals are explicitly encouraged to agree with each other. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Framework of SURGE system. (a) We induce surface regularization in geometry estimation though DCRF, and enable joint learning with CNN, which largely improves the visual quality (b). We show that our DCRF is differentiable with respect to depth and surface normals, and allows back-propagation to the depth and normal CNNs during training. We demonstrate that the proposed approach shows relative improvement over the base CNNs for both depth and surface normal prediction on the NYU v2 dataset using the standard evaluation criteria, and is significantly better when evaluated using our proposed plane-wise criteria. 2 Related work From a single image, traditional geometry estimation approaches rely on extracting visual primitives such as vanishing points and lines [10] or abstract the scenes with major plane and box representations [22, 26]. Those methods can only obtain sparse geometry representations, and some of them require certain assumptions (e.g. Manhattan world). With the advance of deep neural networks and their strong feature representation, dense geometry, i.e., pixel-wise depth and normal maps, can be readily estimated from a single image [7]. Long-range context and semantic cues are also incorporated in later works to refine the dense prediction by combining the networks with conditional random fields (CRF) [19, 20, 28, 29]. Most recently, Eigen and Fergus [6] further integrate depth and normal estimation into a large multi-scale network structure, which significantly improves the geometry estimation accuracy. Nevertheless, the output of the networks still lacks regularization over planar surfaces due to the adoption of pixel-wise loss functions during network training, resulting in unsatisfactory experience in 3D image editing applications. For inducing non-local regularization, DCRF has been commonly used in various computer vision problems such as semantic segmentation [5, 32], optical flow [16] and stereo [3]. However, the features for the affinity term are mostly simple ones such as color and location. In contrast, we have designed a unique planar surface affinity term and a novel compatibility term to enable 3D planar regularization over geometry estimation. Finally, there is also a rich literature in 3D reconstruction from RGBD images [8, 12, 24, 25, 30], where planar surfaces are usually inferred. However, they all assume that the depth data have been acquired. To the best of our knowledge, we are the first to explore using planar surface information to regularize dense geometry estimation by only using the information of a single RGB image. 3 Overview Fig. 1 illustrates our approach. An input image is passed through a four-stream convolutional neural network (CNN) that predicts at each pixel a surface normal, depth value, and whether the pixel belongs to a planar surface or edge (i.e., edge separating different planar surfaces or semantic regions), along with their prediction confidences. We build on existing CNNs [6, 31] to produce the four maps. While the CNNs for surface normals and depths produce high-fidelity outputs, they do not explicitly enforce their predictions to agree with depicted planar regions. To address this, we propose a fullyconnected dense conditional random field (DCRF) that reasons over the CNN outputs to regularize the surface normals and depths. The DCRF jointly aligns the surface normals and depths to individual planar surfaces derived from the edge and planar surface maps, all while preserving fine detail within objects. Our DCRF leverages the advantages of previous fully-connected CRFs [15] in terms of both its non-local connectivity, which allows propagation of information across an entire planar surface, and efficiency during inference. We present our DCRF formulation in Section 4, followed by our algorithm for joint learning and inference within a CNN in Section 5. 2 Normal Depth 3D 3D surface Image Figure 2: The orthogonal compatibility constraint inside the DCRF. We recover 3d points from the depth map and require the difference vector to be perpendicular to the normal predictions. 4 DCRF for Surface Regularized Geometry Estimation In this section, we present our DCRF that incorporates plane and edge predictions for depth and surface normal regularization. Specifically, the field of variables we optimize are depths, D = {di}K i=1, where K is number of the pixels, and normals, N = {ni}K i=1, where ni = [nix, niy, niz]T indicates the 3D normal direction. In addition, as stated in the overview (Sec. 3), we have four types of information from the CNN predictions, namely a predicted normal map No = {no i }K i=1, a depth map Do = {di}K i=1, a plane probability map Po and edge predictions Eo. Following the general form of DCRF [16], our problem can be formulated as, min N,D X i ψu(ni, di|No, Do) + λ X i,j,i̸=j ψr(ni, nj, di, dj|Po, Eo) with ∥ni∥2 = 1 (1) where ψu(·) is a unary term encouraging the optimized surface normals ni and depths di to be close to the outputs no i and do i from the networks. ψr(·, ·) is a pairwise fully connected regularization term depending on the information from the plane map Po and edge map Eo, where we seek to encourage consistency of surface normals and depths within planar regions with the underlying depicted 3D planar surfaces. Also, we constrain the normal predictions to have unit length. Specifically, the definition of unary and pairwise in our model are presented as follows. 4.1 Unary terms Motivated by Monte Carlo dropout [27], we notice that when forward propagating multiple times with dropout, the CNN predictions have different variations across different pixels, indicating the prediction uncertainty. Based on the prediction variance from the normal and depth networks, we are able to obtain pixel-wise confidence values wn i and wd i for normal and depth predictions. We leverage such information to DCRF inference by trusting the predictions with higher confidence while regularizing more over ones with low confidence. By integrating the confidence values, our unary term is defined as, ψu(ni, di|No, Do) = 1 2wn i ψn(ni|no) + 1 2wd i ψd(di|do), (2) where ψn(ni|no) = 1 −ni · no i is the cosine distance between the input and output surface normals, and ψd(di|do) = (di −do i )2 is the is the squared difference between input and output depth. 4.2 Pairwise term for regularization. We follow the convention of DCRF with Gibbs energy [17] for pairwise designing, but also bring in the confidence value of each pixel as described in Sec. 4.1. Formally, it is defined as, ψr(ni, nj, di, dj|Po, Eo) = wn i,jµn(ni, nj) + wd i,jµd(di, dj, ni, nj) Ai,j(Po, Eo), where, wn i,j = 1 2(wn i + wn j ), wd i,j = 1 2(wd i + wd j ) (3) Here, Ai,j is a pairwise planar affinity indicating whether pixel locations i and j belong to the same planar surface derived from the inferred edge and planar surface maps. µn() and µd() regularize the output surface normals and depths to be aligned inside the underlying 3D plane. Here, we use simplified notations, i.e. Ai,j, µn() and µd() for the corresponding terms. For the compatibility µn() of surface normals, we use the same function as ψn() in Eqn. (2), which measures the cosine distance between ni and nj. For depths, we design an orthogonal compatibility function µd() which encourages the normals and depths of each adjacent pixel pair to be consistent and aligned within a 3D planar surface. Next we define µd() and Ai,j. 3 Pairwise planar affinity Edge Plane Image NCut eigenvectors Figure 3: Pairwise surface affinity from the plane and edge predictions with computed Ncut features. We highlight the computed affinity w.r.t. pixel i (red dot). Orthogonal compatibility: In principle, when two pixels fall in the same plane, the vector connecting their corresponding 3D world coordinates should be perpendicular to their normal directions, as illustrated in Fig. 2. Formally, this orthogonality constraint can be formulated as, µd(di, dj, ni, nj) = 1 2 (ni · (xi −xj))2 + 1 2 (nj · (xi −xj))2 , with xi = diK−1pi. (4) Here xi is the 3D world coordinate back projected by 2D pixel coordinate pi (written in homogeneous coordinates), given the camera calibration matrix K and depth value di. This compatibility encourages consistency between depth and normals. Pairwise planar affinity: As noted in Eqn. (3), the planar affinity is used to determine whether pixels i and j belong to the same planar surface from the information of plane and edge. Here Po helps to check whether two pixels are both inside planar regions, and Eo helps to determine whether the two pixels belong to the same planar surface. Here, for efficiency, we chose the form of Gaussian bilateral affinity to represent such information since it has been successfully adopted by many previous works with efficient inference, e.g. in discrete label space for semantic segmentation [5] or in continuous label space for edge-awared smoothing [3, 16]. Specifically, following the form of bilateral filters, our planar surface affinity is defined as, Ai,j(Po, Eo) = pipj (ω1κ (fi, fj; θα) κ (ci, cj; θβ) + ω2κ (ci, cj; θγ)) , (5) where κ(zi, zj; θ) = exp −1 2θ2 ∥zi −zj∥2 is a Gaussian RBF kernel. pi is the predicted value from the planar map Po at pixel i. pipj indicates that the regularization is activated when both i, j are inside planar regions with high probability. fi is the appearance feature derived from the edge map Eo, ci is the 2D coordinate of pixel i on image. ω1, ω2, θα, θβ, θγ are parameters. To transform the pairwise similarity derived from the edge map to the feature representation f for efficient computing, we borrow the idea from the Normalized Cut (NCut) for segmentation [14, 23], where we can first generate an affinity matrix between pixels using intervening contour [23], and perform normalized cut. We select the top 6 resultant eigenvectors as our feature f. . A transformation from edge to the planar affinity using the eigenvectors is shown in Fig. 3. As can be seen from the affinity map, the NCut features are effective to determine whether two pixels lie in the same planar surface where the regularization can be performed. 5 Optimization Given the formulation in Sec. 4, we first discuss the fast inference implementation for DCRF, and then present the algorithm of joint training with CNNs through back-propagation. 5.1 Inference To optimize the objective function defined in Eqn.(1), we use mean-field approximation for fast inference as used in the optimization of DCRF [15]. In addition, we chose to use coordinate descent to sequentially optimize normals and depth. When optimizing normals, for simplicity and efficiency, we do not consider the term of µd() in Eqn.(3), yielding the updating for pixel i at iteration t as, n(t) i ←1 2wn i no i + λ 2 X j,j̸=i wn j n(t−1) j Ai,j, n(t) i ←n(t) i /∥n(t) i ∥2, (6) which is equivalent to first performing a dense bilateral filtering [4] with our pairwise planar affinity term Ai,j for the predicted normal map, and then applying L2 normalization. Given the optimized normal information, we further optimize depth values. Similar to normals, after performing mean-field approximation, the inferred updating equation for depth at iteration t is, d(t) i ←1 νi wd i do i + λ(ni · pi) X j,j̸=i Ai,jwd j d(t−1) j (nj · pj) (7) 4 where νi = wd i +λ(ni ·pi) pi · P j,j̸=i Ai,jwd j nj , Since the graph is densely connected, previous work [16] indicates that only a few (<10) iterations are need to achieve reasonable performance. In practice we found that 5 iterations for normal inference and 2 iterations for depth inference yielded reasonable results. 5.2 Joint training of CNN and DCRF We further implement the DCRF inference as a trainable layer as in [32] by considering the inference as feedforward process, to enable joint training together with the normal and depth neural networks. This makes the planar surface information able to be back-propagated to the neural networks and further refine their output. We describe the gradients back-propagated to the two networks respectively. Back-propagation to the normal network. Suppose the gradient of normal passed from the upper layer after DCRF for pixel i is ∇f(ni), which is a 3x1 vector. We now back-propagate it first through the L2 normalization using the equation of ∇L2(ni) = (I/∥ni∥−ninT i /∥ni∥3)∇f(ni), and then back-propagate through the mean-field approximation in Eqn. (6) as, ∂L(N) ∂ni = ∇L2(ni) 2 + λ 2 X j,j̸=i Aj,i∇L2(nj), (8) where L(N) is the loss from normal predictions after DCRF, I is the identity matrix. Back-propagation to the depth network. Similarly for depth, suppose the gradient from the upper layer is ∇f(di), the depth gradient for back-propagation through Eqn. 7 can be inferred as, ∂L(D) ∂di = 1 νi ∇f(di) + λ(ni · pi) X j,j̸=i 1 νj Aj,i(nj · pj)∇f(dj) (9) where L(D) is the loss from depth predictions after DCRF. Note that during back propagation for both surface normals and depths we drop the confidences w since using it during training will make the process very complicated and inefficient. We adopt the same surface normal and depth loss function as in [6] during joint training. It is possible to also back propagate the gradients of the depth values to the normal network via the surface normal and depth compatibility in Eqn. (4). However, this involves the depth values from all the pixels within the same plane, which may be intractable and cause difficulty during joint learning. We therefore chose not to back propagate through the compatibility in our current implementation and leave it to future work. 6 Implementation details for DCRF To predict the input surface normals and depths, we build on the publicly-available implementation from Eigen and Fergus [6], which is at or near state of the art for both tasks. We compute prediction confidences for the surface normals and depths using Monte Carlo dropout [27]. Specifically, we forward propagate through the network 10 times with dropout during testing, and compute the prediction variance vi at each pixel. The predictions with larger variance vi are considered less stable, so we set the confidence as w· i = exp(−vi/σ·2). We empirically set σn = 0.1 for normals prediction and σd = 0.15 for depth prediction to produce reasonable confidence values. Specifically, for prediction the plane map Po, we adopt a semantic segmentation network structure similar to the Deeplab [5] network but with multi-scale output as the FCN [21]. The training is formulated as a pixel-wise two-class classification problem (planar vs. non-planar). The output of the network is hereby a plane probability map Po where pi at pixel i indicates the probability of pixel i belonging to a planar surface. The edge map Eo indicates the plane boundaries. During training, the ground-truth edges are extracted from the corresponding ground-truth depth and normal maps, and refined by semantic annotations when available (see Fig.4 for an example). We then adopt the recent Holistic-nested Edge Detector (HED) network [31] for training. In addition, we augment the network by adding predicted depth and normal maps as another 4-channel input to improve recall, which is very important for our regularization since missing edges could mistakenly merge two planes and propagate errors during the message passing. For the surface bilateral filter in Eqn. (5), we set the parameters θα = 0.1, θβ = 50, θγ = 3, ω1 = 1, ω2 = 0.3, and set the λ = 2 in Eqn.(1) through a grid search over a validation set from [9]. The four types of inputs to the DCRF are aligned and resized to 294x218 by matching the network output of [6]. During the joint training of DCRF and CNNs, we fix the parameters and fine-tune the network 5 Image Plane Edge Normal Depth Figure 4: Four types of ground-truth from the NYU dataset that are used in our algorithm. based on the weights pre-trained from [6], with the 795 training images, and use the same loss functions and learning rates as in their depth and normal networks respectively. Due to limited space, the detailed edge and plane network structures, the learning and inference times and visualization of confidence values are presented in the supplementary materials. 7 Experiments We perform all our experiments on the NYU v2 dataset [24]. It contains 1449 images with size of 640×480, which is split to 795 training images and 654 testing images. Each image has an aligned ground-truth depth map and a manually annotated semantic category map. In additional, we use the ground-truth surface normals generated by [18] from depth maps. We further use the official NYU toolbox1 to extract planar surfaces from the ground-truth depth and refine them with the semantic annotations, from which a binary ground-truth plane map and an edge map are obtained. The details of generating plane and edge ground-truth are elaborated in supplementary materials. Fig. 4 shows the produced four types of ground-truth maps for our learning and evaluation. We implemented all our algorithms based on Caffe [13], including DCRF inference and learning, which are adapted from the implementation in [1, 32]. Evaluation setup. In the evaluation, we first compare the normals and depths generated by different baselines and components over the ground truth planar regions, since these are the regions where we are trying to improve, which are most important for 3D editing applications. We evaluated over the valid 561x427 area following the convention in [18, 20]. We also perform evaluation over the ground truth edge area showing that our results preserve better geometry details. Finally, we show the improvement achieved by our algorithm over the entire image region. We compare our results against the recent work Eigen et.al [6] since it is or is near state-of-the-art for both depth and normal. In practice, we use their published results and models for comparison. In addition, we implemented a baseline method for hard planar regularization, in which the planar surfaces are explicitly extracted from the network predictions. The normal and depth values within each plane are then used to fit the plane parameters, from which the regularized normal and depth values are obtained. We refer to this baseline as "Post-Proc.". For normal prediction, we implemented another baseline in which a basic Bilateral filter based on the RGB image is used to smooth the normal map. In terms of the evaluation criteria, we first adopt the pixel-wise evaluation criteria commonly used by previous works [6, 28]. However, as mentioned in [11], such metrics mainly evaluate pixel-wise depth and normal offsets, but do not well reflect the quality of reconstructed structures over edges and planar surfaces. Thus, we further propose plane-wise metrics that evaluate the consistency of the predictions inside a ground truth planar region. In the following, we first present evaluations for normal prediction, and then report the results of depth estimation. Surface normal criteria. For pixel-wise evaluation, we use the same metrics used in [6]. For plane-wise evaluation, given a set of ground truth planar regions {P∗ j}NP j=1, we propose two metrics to evaluate the consistency of normal prediction within the planar regions, 1. Degree variation (var.): It measures the overall planarity inside a plane, and defined as, 1 NP P j 1 |P∗ j | P i∈P∗ j δ(ni, nj), where δ(ni, nj) = acos(ni · nj) which is the degree difference between two normals, nj is the normal mean of the prediction inside P∗ j. 2. First-order degree gradient (grad.): It measures the smoothness of the normal transition inside a planar region. Formally, it is defined as, 1 NP P j 1 |P∗ j | P i∈P∗ j (δ(ni, nhi) + δ(ni, nvi)), where nhi, nvi are normals of right and bottom neighbor pixels of i. 1http://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html 6 Pixel-wise (Over planar region) Plane-wise Lower the better Higher the better Lower the better Evaluation over the planar regions Method mean median 11.25◦ 22.5◦ 30◦ var. grad. Eigen-VGG [6] 14.5425 8.9735 59.00 80.85 87.38 9.1534 1.1112 RGB-Bilateral 14.4665 8.9439 59.12 80.86 87.41 8.6454 1.1735 Post-Proc. 14.8154 8.6971 59.85 80.52 86.67 7.2753 0.9882 Eigen-VGG (JT) 14.4978 8.9371 59.12 80.90 87.43 8.9601 1.0795 DCRF 14.1934 8.8697 59.27 81.08 87.77 6.9688 0.7441 DCRF (JT) 14.2055 8.8696 59.34 81.13 87.78 6.8866, 0.7302 DCRF-conf 13.9732 8.5320 60.89 81.87 88.09 6.8212 0.7407 DCRF-conf (JT) 13.9763 8.2535 62.20 82.35 88.08 6.3939 0.6858 Oracle 13.5804 8.1671 62.83 83.16 88.85 4.9199 0.5923 Eigen-VGG [6] 23.4141 18.3288 30.90 58.91 71.43 Edge DCRF-conf (JT) 23.4694 17.6804 33.63 59.53 71.03 Eigen-VGG [6] 20.9322 13.2214 44.43 67.25 75.83 Image DCRF-conf (JT) 20.6093 12.1704 47.29 68.92 76.64 Table 1: Normal accuracy comparison over the NYU v2 dataset. We compare our final results (DCRF-conf (JT)) against various baselines over ground truth planar regions at upper part, where JT means joint training CNN and DCRF as presented in Sec. 5.2. We list additional comparison over the edge and full image region at lower part. Evaluation on surface normal estimation. In upper part of Tab. 1, we show the comparison results. The first line, i.e. Eigen-VGG, is the result from [6] with VGG net, which serves as our baseline. The simple RGB-Bilateral filtering can only slightly improve the network output since it does not contain any planar surface information during the smoothing. The hard regularization over planar regions ("Post-Proc.") can improve the plane-wise consistency since hard constraints are enforced in each plane, but it also brings strong artifacts and suffers significant decrease in pixel-wise accuracy metrics. Our "DCRF" can bring improvement on both pixel-wise and plane-wise metrics, while integrating network prediction confidence further makes the DCRF inference achieve much better results. Specifically, using "DCRF-conf", the plane-wise error metric var. drops from 9.15 produced by the network to 6.8. It demonstrates that our non-local planar surface regularization does help the predictions especially for the consistency inside planar regions. We also show the benefits from the joint training of DCRF and CNN. "Eigen-VGG (JT)" denotes the output of the CNN after joint training, which shows better results than the original network. It indicates that regularization using DCRF for training also improves the network. By using the joint trained CNN and DCRF ("DCRF (JT)"), we observe additional improvement over that from "DCRF". Finally, by combining the confidence from joint trained CNN, our final outputs ("DCRF-conf (JT)") achieve the best results over all the compared methods. In addition, we also use ground-truth plane and edge map to regularize the normal output("Oracle") to get an upper bound when the planar surface information is perfect. We can see our final results are in fact quite close to "Oracle", demonstrating the high quality of our plane and edge prediction. In the bottom part of Tab. 1, we show the evaluation over edge areas (rows marked by "Edge") as well as on the entire images (marked by "Image"). The edge areas are obtained by dilating the ground truth edges with 10 pixels. Compared with the baseline, although our results slightly drop in "mean" and 30◦, they are much better in "median" and 11.25◦. It shows by preserving edge information, our geometry have more accurate predictions around boundaries. When evaluated over the entire images, our results outperforms the baseline in all the metrics, showing that our algorithm not only largely improves the prediction in planar regions, but also keeps the good predictions within non-planar regions. Depth criteria. When evaluating depths, similarly, we also firstly adopt the traditional pixel-wise depth metrics that are defined in [7, 28]. We refer readers to the original papers for detailed definition due to limited space. We then also propose plane-wise metrics. Specifically, we generate the normals from the predicted depths using the NYU toolbox [24], and evaluate the degree variation (var.) of the generated normals within each plane. 7 Pixel-wise Plane-wise Lower the better (LTB) Higher the better LTB Evaluation over the planar regions Method Rel Rel(sqr) log10 RMSElin RMSElog 1.25 1.252 1.253 var. Eigen-VGG [6] 0.1441 0.0892 0.0635 0.5083 0.1968 78.7055 96.3516 99.3291 16.4460 Post-Proc. 0.1470 0.0937 0.0644 0.5200 0.2003 78.2290 96.1145 99.2258 11.1489 Eigen-VGG(JT) 0.1427 0.0881 0.0612 0.4900 0.1930 80.1163 96.4421 99.3029 17.5251 DCRF 0.1438 0.0893 0.0634 0.5100 0.1965 78.7311 96.3739 99.3321 12.0424 DCRF(JT) 0.1424 0.0874 0.0610 0.4873 0.1920 80.1800 96.5481 99.3326 10.5836 DCRF-conf 0.1437 0.0881 0.0631 0.5027 0.1957 78.9070 96.4336 99.3395 12.0420 DCRF-conf(JT) 0.1423 0.0874 0.0610 0.4874 0.1920 80.2453 96.5612 99.3229 10.5746 Oracle 0.1431 0.0879 0.0629 0.5043 0.1950 78.9777 96.4297 99.3605 8.0522 Eigen-VGG [6] 0.1645 0.1369 0.0735 0.7268 0.2275 72.9491 94.2890 98.6539 Edge DCRF-conf(JT) 0.1624 0.1328 0.0707 0.6965 0.2214 74.7198 94.6927 98.7048 Eigen-VGG [6] 0.1583 0.1213 0.0671 0.6388 0.2145 77.0536 95.0456 98.8140 Image DCRF-conf(JT) 0.1555 0.1179 0.0672 0.6430 0.2139 76.8466 95.0946 98.8668 Table 2: Depth accuracy comparison over the NYU v2 dataset. Evaluation on depth prediction. Similarly, we first report the results on planar regions in the upper part of Tab. 2, and then present the evaluation on edge areas and over the entire image. We can observe similar trends of different methods as in normal evaluation, demonstrating the effectiveness of the proposed approach in both tasks. Qualitative results. We also visually show an example to illustrate the improvements brought by our method. In Fig. 5, we visualize the predictions in 3D space in which the reconstructed strcture can be better observed. As can be seen, the results from network output [6] have lots of distortions in planar surfaces, and the transition is blurred accross plane boundaries, yielding non-satisfactory quality. Our results largely allievate such problems by incorporating plane and edge regularization, yielding visually much more satisfied results. Due to space limitation, we include more examples in the supplementary materials. 8 Conclusion In this paper, we introduce SURGE, which is a system that induces surface regularization to depth and normal estimation from a single image. Specifically, we formulate the problem as DCRF which embeds surface affinity and depth normal compatibility into the regularization. Last but not the least, our DCRF is enabled to be jointly trained with CNN. From our experiments, we achieve promising results and show such regularization largely improves the quality of estimated depth and surface normal over planar regions, which is important for 3D editing applications. Acknowledgment. This work is supported by the NSF Expedition for Visual Cortex on Silicon NSF award CCF-1317376 and the Army Research Office ARO 62250-CS. Image Eigen et.al [6] Ours Ground Truth Normal [6] Ours normal Normal GT Depth [6] Ours depth Depth GT. Figure 5: Visual comparison between network output from Eigen et.al [6] and our results in 3D view. We project the RGB and normal color to the 3D points (Best view in color). 8 References [1] A. Adams, J. Baek, and M. A. Davis. Fast high-dimensional filtering using the permutohedral lattice. In Computer Graphics Forum, volume 29, pages 753–762. Wiley Online Library, 2010. [2] A. Bansal, B. Russell, and A. Gupta. Marr revisited: 2d-3d alignment via surface normal prediction. In CVPR, 2016. [3] J. T. Barron, A. Adams, Y. Shih, and C. Hernández. Fast bilateral-space stereo for synthetic defocus. CVPR, 2015. [4] J. T. Barron and B. Poole. The fast bilateral solver. CoRR, 2015. [5] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. ICLR, 2015. [6] D. Eigen and R. Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In ICCV, 2015. [7] D. Eigen, C. Puhrsch, and R. Fergus. Depth map prediction from a single image using a multi-scale deep network. In NIPS. 2014. [8] R. Guo and D. Hoiem. Support surface prediction in indoor scenes. In ICCV, 2013. [9] S. Gupta, R. Girshick, P. Arbelaez, and J. Malik. Learning rich features from RGB-D images for object detection and segmentation. In ECCV. 2014. [10] D. Hoiem, A. A. Efros, and M. Hebert. Recovering surface layout from an image. In ICCV, 2007. [11] K. Honauer, L. Maier-Hein, and D. Kondermann. The hci stereo metrics: Geometry-aware performance analysis of stereo algorithms. In ICCV, 2015. [12] S. Ikehata, H. Yang, and Y. Furukawa. Structured indoor modeling. In ICCV, 2015. [13] 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. [14] I. Kokkinos. Pushing the boundaries of boundary detection using deep learning. ICLR, 2016. [15] P. Krähenbühl and V. Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. NIPS, 2012. [16] P. Krähenbühl and V. Koltun. Efficient nonlocal regularization for optical flow. In ECCV, 2012. [17] P. Krähenbühl and V. Koltun. Parameter learning and convergent inference for dense random fields. In ICML, 2013. [18] L. Ladicky, B. Zeisl, and M. Pollefeys. Discriminatively trained dense surface normal estimation. In D. J. Fleet, T. Pajdla, B. Schiele, and T. Tuytelaars, editors, ECCV, 2014. [19] B. Li, C. Shen, Y. Dai, A. van den Hengel, and M. He. Depth and surface normal estimation from monocular images using regression on deep features and hierarchical crfs. In CVPR, June 2015. [20] F. Liu, C. Shen, and G. Lin. Deep convolutional neural fields for depth estimation from a single image. In CVPR, June 2015. [21] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431–3440, 2015. [22] A. G. Schwing, S. Fidler, M. Pollefeys, and R. Urtasun. Box in the box: Joint 3d layout and object reasoning from single images. In ICCV, pages 353–360. IEEE Computer Society, 2013. [23] J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI, 22(8):888–905, 2000. [24] N. Silberman, D. Hoiem, P. Kohli, and R. Fergus. Indoor segmentation and support inference from rgbd images. In ECCV (5), pages 746–760, 2012. [25] S. Song, S. Lichtenberg, and J. Xiao. SUN RGB-D: A RGB-D scene understanding benchmark suite. In CVPR, 2015. [26] F. Srajer, A. G. Schwing, M. Pollefeys, and T. Pajdla. Match box: Indoor image matching via box-like scene estimation. In 2nd International Conference on 3D Vision, 3DV 2014, Tokyo, Japan, December 8-11, 2014, Volume 1, 2014. [27] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1), 2014. [28] P. Wang, X. Shen, Z. Lin, S. Cohen, B. L. Price, and A. L. Yuille. Towards unified depth and semantic prediction from a single image. In CVPR, 2015. [29] X. Wang, D. Fouhey, and A. Gupta. Designing deep networks for surface normal estimation. In CVPR, 2015. [30] J. Xiao and Y. Furukawa. Reconstructing the world’s museums. In ECCV, 2012. [31] S. Xie and Z. Tu. Holistically-nested edge detection. ICCV, 2015. [32] 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 International Conference on Computer Vision (ICCV), 2015. 9 | 2016 | 230 |
6,140 | CliqueCNN: Deep Unsupervised Exemplar Learning Miguel A. Bautista∗, Artsiom Sanakoyeu∗, Ekaterina Sutter, Björn Ommer Heidelberg Collaboratory for Image Processing IWR, Heidelberg University, Germany firstname.lastname@iwr.uni-heidelberg.de Abstract Exemplar learning is a powerful paradigm for discovering visual similarities in an unsupervised manner. In this context, however, the recent breakthrough in deep learning could not yet unfold its full potential. With only a single positive sample, a great imbalance between one positive and many negatives, and unreliable relationships between most samples, training of Convolutional Neural networks is impaired. Given weak estimates of local distance we propose a single optimization problem to extract batches of samples with mutually consistent relations. Conflicting relations are distributed over different batches and similar samples are grouped into compact cliques. Learning exemplar similarities is framed as a sequence of clique categorization tasks. The CNN then consolidates transitivity relations within and between cliques and learns a single representation for all samples without the need for labels. The proposed unsupervised approach has shown competitive performance on detailed posture analysis and object classification. 1 Introduction Visual similarity learning is the foundation for numerous computer vision subtasks ranging from low-level image processing to high-level object recognition or posture analysis. A common paradigm has been category-level recognition, where categories and the similarities of all their instances to other classes are jointly modeled. However, large intra-class variability has recently spurred exemplar methods [15, 11], which split this problem into simpler sub-tasks. Therefore, separate exemplar classifiers are trained by learning the similarities of individual exemplars against a large set of negatives. The exemplar paradigm has been successfully employed in diverse areas such as segmentation [11], grouping [10], instance retrieval [2, 19], and object recognition [15, 5]. Learning similarities is also of particular importance for posture analysis [8] and video parsing [17]. Among the many approaches for similarity learning, supervised techniques have been particularly popular in the vision community, leading to the formulation as a ranking [23], regression [6], and classification [17] task. With the recent advances of convolutional neural networks (CNN), two-stream architectures [25] and ranking losses [21] have shown great improvements. However, to achieve their performance gain, CNN architectures require millions of samples of supervised training data or at least the fine-tuning [3] on large datasets such as PASCAL VOC. Although the amount of accessible image data is increasing at an enormous rate, supervised labeling of similarities is very costly. In addition, not only similarities between images are important, but especially between objects and their parts. Annotating the fine-grained similarities between all these entities is hopelessly complex, in particular for the large datasets typically used for training CNNs. Unsupervised deep learning of similarities that does not requiring any labels for pre-training or fine-tuning is, therefore, of great interest to the vision community. This way we can utilize large ∗Both authors contributed equally to this work. Project on GitHub: https://github.com/asanakoy/cliquecnn 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. image datasets without being limited by the need for costly manual annotations. However, CNNs for exemplar-based learning have been rare [4] due to limitations resulting from the widely used softmax loss. The learning task suffers from only a single positive instance, it is highly unbalanced with many more negatives, and the relationships between samples are unknown, cf. Sec. 2. Consequentially, stochastic gradient descend (SGD) gets corrupted and has a bias towards negatives, thus forfeiting the benefits of deep learning. Outline of the proposed approach: We overcome these limitations by updating similarities and CNNs. Typically at the beginning only a few, local estimates of (dis-)similarity are easily available, i.e., pairs of samples that are highly similar (near duplicates) or that are very distant. Most of the similarities are, however, unknown or mutually contradicting, so that transitivity does not hold. Therefore, we initially can only gather small, compact cliques of mutually similar samples around an exemplar, but for most exemplars we know neither if they are similar nor dissimilar. To nevertheless define balanced classification tasks suited for CNN training, we formulate an optimization problem that builds training batches for the CNN by selecting groups of compact cliques, so that all cliques in a batch are mutually distant. Thus for all samples of a batch (dis-)similarity is defined—they either belong to the same compact clique or are far away and belong to different cliques. However, pairs of samples with no reliable similarities end up in different batches so they do not yield false training signal for SGD. Classifying if a sample belongs to a clique serves as a pretext task for learning exemplar similarity. Training the network then implicitly reconciles the transitivity relations between samples in different batches. Thus, the learned CNN representations impute similarities that were initially unavailable and generalize them to unseen data. In the experimental evaluation the proposed approach significantly improves over state-of-the-art approaches for posture analysis and retrieval by learning a general feature representation for human pose that can be transferred across datasets. 1.1 Exemplar Based Methods for Similarity Learning The Exemplar Support Vector Machine (Exemplar-SVM) has been one of the driving methods for exemplar based learning [15]. Each Exemplar-SVM classifier is defined by a single positive instance and a large set of negatives. To improve performance, Exemplar-SVMs require several round of hard negative mining, increasing greatly the computational cost of this approach. To circumvent this high computational cost [10] proposes to train Linear Discriminant Analysis (LDA) over Histogram of Gradient (HOG) features [10]. LDA whitened HOG features with the common covariance matrix estimated for all the exemplars removes correlations between the HOG features, which tend to amplify the background of the image. Recently, several CNN approaches have been proposed for supervised similarity learning using either pairs [25], or triplets [21] of images. However, supervised formulations for learning similarities require that the supervisory information scales quadratically for pairs of images, or cubically for triplets. This results in very large training times. Literature on exemplar based learning in CNNs is very scarce. In [4] the authors of ExemplarCNN tackle the problem of unsupervised feature learning. A patch-based categorization problem is designed by randomly extracting patch for each image in the training set and defining it as surrogate class. Hence, since this approach does not take into account (dis-)similarities between exemplars, it fails to model their transitivity relationships, resulting in poor performances (see Sect. 3.1). le Furthermore, recent works by Wang et al. [22] and Doersh et al. [3] showed that temporal information in videos and spatial context information in images can be utilized as a convenient supervisory signal for learning feature representation with CNNs. However, the computational cost of the training algorithm is enormous since the approach in [3] needs to tackle all possible pair-wise image relationships requiring training set that scales quadratically with the number of samples. On the contrary, our approach leverages the relationship information between compact cliques, defining a multi-class classification problem. As each training batch contains mutually distinct cliques the computational cost of the training algorithm is greatly decreased. 2 Approach We will now discuss how we can employ a CNN for learning similarities between all pairs of a large number of exemplars. Exemplar learning in CNNs has been a relatively unexplored approach for multiple reasons. First and foremost, deep learning requires large amounts of training data, thus 2 False positive rate 0 0.2 0.4 0.6 0.8 1 True positive rate 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-sample-CNN(0.62) NN-CNN(0.65) Ours(0.79) (a) (b) (c) (d) Figure 1: (a) Average AUC for posture retrieval in the Olympic Sports dataset. Similarities learnt by (b) 1-sample CNN, (c) using NN-CNN, and (d) for the proposed approach. The plots show a magnified crop of the full similarity matrix. Note the more detailed fine structure in (d). conflicting with having only a single positive exemplar in a setup that we now abbreviate as 1-sample CNN. Such a 1-sample CNN faces several issues. (i) The within-class variance of an individual exemplar cannot be modeled. (ii) The ratio of one exemplar and many negatives is highly imbalanced, so that the softmax loss over SGD batches overfits against the negatives. (iii) An SGD batch for training a CNN on multiple exemplars can contain arbitrarily similar samples with different label (the different exemplars may be similar or dissimilar), resulting in label inconsistencies. The proposed method overcomes these issues as follows. In Sect. 2.2 we discuss why simply merging an exemplar with its nearest neighbors and data augmentation (similar in spirit to the Clustered Exemplar-SVM [20]) is not sufficient to address (i). Sect. 3.1 compares this NN-CNN approach against other methods. Sect. 2.3 deals with (ii) and (iii) by generating batches of cliques that maximize the intra-clique similarity while minimizing inter-clique similarity. To show the effectiveness of the proposed method we give empirical proof by training CNNs in both 1-sample CNN and NN-CNN manners. Fig. 1(a) shows the average ROC curve for posture retrieval in the Olympic Sports dataset [16] (refer to Sec. 3.1 for further details) for 1-sample CNN, NN-CNN and the proposed method, which clearly outperforms both exemplar based strategies. In addition, Fig. 1(b-d) show an excerpt of the similarity matrix learned for each method. It becomes evident that the proposed approach captures more detailed similarity structures, e.g., the diagonal structures correspond to repetitions of the same gait cycle within a long jump. 2.1 Initialization Since deep learning benefits from large amounts of data and requires more than a single exemplar to avoid biased gradients, we now reframe exemplar-based learning of similarities so that it can be handled by a CNN. Given a single exemplar di we thus strive for related samples to enable a CNN training that then further improves the similarities between samples. To obtain this initial set of few, mutually similar samples for an exemplar, we now briefly discuss the reliability of standard feature distances such as whitening HOG features using LDA [10]. HOG-LDA is a computationally effective foundation for estimating similarities sij between large numbers of samples, sij = s(di, dj) = φ(di)⊤φ(dj). Here φ(di) is the initial HOG-LDA representation of the exemplar and S is the resulting kernel. Most of these initial similarities are unreliable (cf. Fig. 4(b)) and, thus, the majority of samples cannot be properly ranked w.r.t. their similarity to an exemplar di. However, highly similar samples and those that are far away can be reliably identified as they stand out from the similarity distribution. Subsequently we utilize these few reliable relationships to build groups of compact cliques. 2.2 Compact Cliques Simply assigning the same label to all the nearest and another label to all the furthest neighbors of an exemplar is inappropriate. The samples in these groups may be close to di (or distant for the negative group) but not to another due to lacking transitivity. Moreover, mere augmentation of the exemplar with synthetic data does not add transitivity relations to other samples. Therefore, to learn within-class similarities we need to restrict the model to compact cliques of samples so that all samples in a clique are also mutually close to another and deserve the same label. 3 Query Ours Alexnet [13] HOG-LDA [10] Figure 2: Averaging of the 50 nearest neighbours for a given query frame using similarities obtained by our approach, Alexnet[13] and HOG-LDA [10]. To build candidate cliques we apply complete-linkage clustering starting at each di to merge the sample with its local neighborhood, so that all merged samples are mutually similar. Thus, cliques are compact, differ in size, and may be mutually overlapping. To reduce redundancy, highly overlapping cliques are subsequently merged by clustering cliques using farthest-neighbor clustering. This agglomerative grouping is terminated if intra-clique similarity of a cluster is less than half that of its constituents. Let K be the resulting number of clustered cliques and N the number of samples di. Then C ∈{0, 1}K×N is the resulting assignment matrix of samples to cliques. 2.3 Selecting Batches of Mutually Consistent Cliques We now have a set of compact cliques that comprise all training data. Thus, one may consider to train a CNN to assign all samples of a clique with the same label. However, since only the highest/lowest similarities are reliable, samples in different cliques are not necessarily dissimilar. Forcing them into different classes can consequently entail incorrect similarities. Therefore, we now seek batches of mutually distant cliques, so that all samples in a batch can be labeled consistently because they are either similar (same compact clique) or dissimilar (different, distant clique). Samples with unreliable similarity then end up in different batches and we train a CNN successively on these batches. We now formulate an optimization problem that produces a set of consistent batches of cliques. Let X ∈{0, 1}B×K be an indicator matrix that assigns K cliques to B batches (the rows xb of X are the cliques in batch b) and S′ ∈RK×K be the similarity between cliques. We enforce cliques in the same batch to be dissimilar by minimizing tr (XS′X⊤), which is regularized for the diagonal elements of the matrix S′ selected for each batch (see Eq. (1)). Moreover, each batch should maximize sample coverage, i.e., the number of distinct samples in all cliques of a batch ∥xbC∥p p should be maximal. Finally, the number of distinct points covered by all batches, ∥1XC∥p p, should be maximal, so that the different (potentially overlapping) batches together comprise as much samples as possible. We select p = 1/16 so that our penalty function roughly approximate the non-linear step function. The objective of the optimization problem then becomes min X∈{0,1}B×K tr (XS′X⊤)−tr (X diag (S′)X⊤) −λ1 B X b=1 ∥xbC∥p p−λ2∥1XC∥p p (1) s.t. X1⊤ K = r1⊤ B (2) where r is the desired number of cliques in one batch for CNN training. The number of batches, B, can be set arbitrarily high to allow for as many rounds of SGD training as desired. If it is too low, this can be easily spotted as only limited coverage of training data can be achieved in the last term of Eq. (1). Since X is discrete, the optimization problem (1) is not easier than the Quadratic Assignment Proble which is known to be NP-hardm [1]. To overcome this issue we relax the binary constraints and force instead the continuous solution to the boundaries of the feasible range by maximizing the additional term λ3∥X −0.5∥2 F using the Frobenius norm. We condition S′ to be positive semi-definite by thresholding its eigenvectors and projecting onto the resulting base. Since also p < 1 the previous objective function is a difference of convex functions 4 Figure 3: Visual example of a resulting batch of cliques for long jump category of Olympic Sports dataset. Each clique contains at least 20 samples and is represented as their average. u(X) −v(X), where u(X) = tr (XS′X⊤) −λ1 B X b=1 ∥xbC∥p p −λ2∥1XC∥p p (3) v(X) = tr(X diag (S′)X⊤) + λ3∥X −0.5∥2 F (4) It can be solved using the CCCP Algorithm [24]. In each iteration of CCCP the following convex optimization problem is solved, argmin X∈[0,1]B×Ku(X) −vec (X)⊤vec (∇v(Xt)), (5) s.t. X1⊤ K = r1⊤ B (6) where ∇v(Xt) = 2X ⊙(1 diag (S′)) + 2X −1 and ⊙denotes the Hadamard product. We solve this constrained optimization problem by means of the interior-point method. Fig. 3 shows a visual example of a selected batch of cliques. 2.4 CNN Training We successively train a CNN on the different batches xb obtained using Eq. (1). In each batch, classifying samples according to the clique they are in then serves as a pretext task for learning sample similarities. One of the key properties of CNNs is the training using SGD and backpropagation [14]. The backpropagated gradient is estimated only over a subset (batch) of training samples, so it depends only on the subset of cliques in xb. Following this observation, the clique categorization problem is effectively decoupled into a set of smaller sub-tasks—the individual batches of cliques. During training, we randomly pick a batch b in each iteration and compute the stochastic gradient, using the softmax loss L(W), L(W) ≈1 M X j∈xb fW(dj) + λr(W) (7) Vt+1 = µVt −α∇L(Wt), Wt+1 = Wt + Vt+1 , (8) where M is the SGD batch size, Wt denotes the CNN weights at iteration t, and Vt denotes the weight update of the previous iteration. Parameters α and µ denote the learning rate and momentum, respectively. We then compute similarities between exemplars by simply measuring correlation on the learned feature representation extracted from the CNN (see Sect. 3.1 for details). 2.5 Similarity Imputation By alternating between the different batches, which contain cliques with mutually inconsistent similarities, the CNN learns a single representation for samples from all batches. In effect, this consolidates similarities between cliques in different batches. It generalizes from a subset of initial cliques to new, previously unreliable relations between samples in different batches by utilizing transitivity relationships implied by the cliques. After a training round over all batches we impute the similarities using the representation learned by the CNN. The resulting similarities are more reliable and enable the grouping algorithm from Sect. 2.2 to find larger cliques of mutually related samples. As there are fewer unreliable similarities, 5 (a) Frame ranking 0 1000 2000 3000 4000 5000 6000 7000 Similarity score 20 40 60 80 100 120 140 160 180 200 Query exemplar Frames sorted by exemplar similarity score (b) Figure 4: (a) Cumulative distribution of the spectrum of the similarity matrices obtained by our method and the HOG-LDA initialization. (b) Sorted similarities with respect to one exemplar, where only similarities at the ends of the distribution can be trusted. more samples can be comprised in a batch and overall less batches already cover the same fraction of data as before. Consequently, we alternately train the CNN and recompute cliques and batches using the similarities inferred in the previous iteration of CNN training. This alternating imputation of similarities and update of the classifier follows the idea of multiple-instance learning and has shown to converge quickly in less than four iterations. To evaluate the improvement of the similarities Fig. 4 analyzes the eigenvalue spectrum of S on the Olympic Sports dataset, see Sect. 3.1. The plot shows the normalized cumulative sum of the eigenvalues as the function of the number of eigenvectors. Compared to the initialization, transitivity relations are learned and the approach can generalize from an exemplar to more related samples. Therefore, the similarity matrix becomes more structured (cf. Fig. 1) and random noisy relations disappear. As a consequence it can be represented using very few basis vectors. In a further experiment we evaluate the number of reliable similarities and dissimilarities within and between cliques per batch. Recall that samples can only be part of the same batch, if their similarity is reliable. So the goal of similarity learning is to remove transitivity conflicts and reconcile relations between samples to yield larger batches. We now observe that after the iterative update of similarities, the average number of similarities and dissimilarities in a batch has increased by a factor of 2.34 compared to the batches at initialization. 3 Experimental Evaluation We provide a quantitative and qualitative analysis of our exemplar-based approach for unsupervised similarity learning. For evaluation, three different settings are considered: posture analysis on Olympic Sports [16], pose estimation on Leeds Sports [12], and object classification on PASCAL VOC 2007. 3.1 Olympic Sports Dataset: Posture Analysis The Olympic Sports dataset [16] is a video compilation of different sports competitions. To evaluate fine-scale pose similarity, for each sports category we had independent annotators manually label 20 positive (similar) and negative (dissimilar) samples for 1033 exemplars. Note that these annotations are solely used for testing, since we follow an unsupervised approach. We compare the proposed method with the Exemplar-CNN [4], the two-stream approach of Doersch et. al [3], 1-sample CNN and NN-CNN models (in a very similar spirit to [20]), Alexnet [13], Exemplar-SVMs [15], and HOG-LDA [10]. Due to its performance in object and person detection, we use the approach of [7] to compute person bounding boxes. (i) The evaluation should investigate the benefit of the unsupervised gathering of batches of cliques for deep learning of exemplars using standard CNN architectures. Therefore we incarnate our approach by adopting the widely used model of Krizhevsky et al. [13]. Batches for training the network are obtained by solving the optimization problem in Eq. (1) with B = 100, K = 100, and r = 20 and fine-tuning the model for 105 iterations. Thereafter we compute similarities using features extracted from layer fc7 in the caffe implementation of [13]. (ii) Exemplar-CNN is trained using the best performing parameters reported in [4] and the 64c5-128c5-256c5-512f architecture. Then we use the output of fc4 and compute 4-quadrant max pooling. (iii) Exemplar-SVM was trained on the exemplar frames using the HOG descriptor. The samples for hard negative mining come from all categories except the one that an exemplar is from. We performed cross-validation to find an optimal number of negative mining rounds (less than three). The class weights of the linear SVM were set as C1 = 0.5 and C2 = 0.01. (iv) LDA whitened HOG 6 HOG-LDA [10] Ex-SVM [15] Ex-CNN [4] Alexnet [13] 1-s CNN NN-CNN Doersch et. al [3] Ours 0.58 0.67 0.56 0.65 0.62 0.65 0.58 0.79 Table 1: Avg. AUC for each method on Olympic Sports dataset. was computed as specified in [10]. (v) The 1-sample CNN was trained by defining a separate class for each exemplar sample plus a negative category containing all other samples. (vi) In a similar fashion, the NN-CNN was trained using the exemplar plus 10 nearest neighbours obtained using the whitened HOG similarities. As implementation for both CNNs we again used the model of [13] fine-tuned for 105 iterations. Each image in the training set is augmented with 10 transformed versions by performing random translation, scaling, rotation and color transformation, to improve invariance with respect to these. Tab. 1 reports the average AuC for each method over all categories of the Olympic Sports dataset. Our approach obtains a performance improvement of at least 10% w.r.t. the other methods. In particular, the experiments show that the 1-sample CNN fails to model the positive distribution, due to the high imbalance between positives and negatives and the resulting biased gradient. In comparison, additional nearest neighbours to the exemplar (NN-CNN) yield a better model of withinclass variability of the exemplar leading to a 3% performance increase over the 1-sample CNN. However NN-CNN also sees a large set of negatives, which are partially similar and dissimilar. Due to this unstructuredness of the negative set, the approach fails to thoroughly capture the fine-grained similarity structure over the negative samples. To circumvent this issue we compute sets of mutually distant compact cliques resulting in a relative performance increase of 12% over NN-CNN. Furthermore, Fig. 1 presents the similarity structures, which the different approaches extract when analyzing human postures. Fig. 2 further highlights the similarities and the relations between neighbors. For each method the top 50 nearest neighbours for a randomly chosen exemplar frame in the Olympic Sports dataset are blended. We can see how the neighbors obtained by our approach depict a sharper average posture, since they result from compact cliques of mutually similar samples. Therefore they retain more details and are more similar to the original than in case of the other methods. 3.2 Leeds Sports Dataset: Pose Estimation The Leeds Sports Dataset [12] is the most widely used benchmark for pose estimation. For training we employ 1000 images from the dataset combined with 4000 images from the extended version of this dataset, where each image is annotated with 14 joint locations. We use the visual similarities learned by our approach to find frames similar in posture to a query frame. Since our training is unsupervised, joint labels are not available. At test time we therefore estimate the pose of a query person by identifying the nearest neighbor from the training set. To compare against the supervised methods, the pose of the nearest neighbor is then compared against ground-truth. Now we evaluate our visual similarity learning and the resulting identification of nearest postures. For comparison, similar postures are also retrieved using HOG-LDA [10] and Alexnet [13]. In addition, we also report an upper bound on the performance that can be achieved by the nearest neighbor using ground-truth similarities. Therefore, the nearest training pose for a query is identified by minimizing the average distance between their ground-truth pose annotation. This is the best one can do by finding the most similar frame, when not provided with a supervised parametric model (the performance gap to 100% shows the difference between training and test poses). For completeness, we compare with a fully supervised state-of-the-art approach for pose estimation [18]. We use the same experimental settings described in Sect. 3.1. Tab. 2 reports the Percentage of Correct Parts (PCP) for the different methods. The prediction for a part is considered correct when its endpoints are within 50% part length of the corresponding ground truth endpoints. Our approach significantly improves the visual similarities learned using Alexnet and HOG-LDA. It is note-worthy that even though our approach for estimating the pose is fully unsupervised it attains a competitive performance when compared to the upper-bound of supervised ground truth similarities. In addition, Fig. 5 presents success (a) and failure (c) cases of our method. In Fig.5(a) we can see that the pose is correctly transferred from the nearest neighbor (b) from the training set, resulting in a PCP score of 0.6 for that particular image. Moreover, Fig.5(c), (d) show that the representation learnt 7 Method Torso Upper legs Lower legs Upper arms Lower arms Head Total Ours 80.1 50.1 45.7 27.2 12.6 45.5 43.5 HOG-LDA[10] 73.7 41.8 39.2 23.2 10.3 42.2 38.4 Alexnet[13] 76.9 47.8 41.8 26.7 11.2 42.4 41.1 Ground Truth 93.7 78.8 74.9 58.7 36.4 72.4 69.2 Pose Machines [18] 93.1 83.6 76.8 68.1 42.2 85.4 72.0 Table 2: PCP measure for each method on Leeds Sports dataset. (a) (b) (c) (d) Figure 5: Pose prediction results. (a) and (c) are test images with the superimposed ground truth skeleton depicted in red and the predicted skeleton in green. (b) and (d) are corresponding nearest neighbours, which were used to transfer pose. by our method is invariant to front-back flips (matching a person facing away from the camera to one facing the camera). Since our approach learns pose similarity in an unsupervised manner, it becomes invariant to changes in appearance as long as the shape is similar, thus explaining this confusion. Adding additional training data or directly incorporating face detection-based features could resolve this. 3.3 PASCAL VOC 2007: Object Classification The previous sections have analyzed the learning of pose similarities. Now we evaluate the learning of similarities over object categories. Therefore, we classify object bounding boxes of the PASCAL VOC 2007 dataset. To initialize our model we now use the visual similarities of Wang et al. [22] without applying any fine tuning on PASCAL and also compare against this approach. Thus, neither ImageNet nor Pascal VOC labels are utilized. For comparison we evaluate against HOG-LDA [10], [22], and R-CNN [9]. For our method and HOG-LDA we use the same experimental settings as described in Sect. 3.1, initializing our method and network with the similarities obtained by [22]. For all methods, the k nearest neighbors are computed using similarities (Pearson correlation) based on fc6. In Tab. 3 we show the classification accuracies for all approaches for k = 5. Our approach improves upon the initial similarities of the unsupervised approach of [22] to yield a performance gain of 3% without requiring any supervision information or fine-tuning on PASCAL. HOG-LDA Wang et. al [22] Wang et. al [22] + Ours RCNN 0.1180 0.4501 0.4812 0.6825 Table 3: Classification results for PASCAL VOC 2007 4 Conclusion We have proposed an approach for unsupervised learning of similarities between large numbers of exemplars using CNNs. CNN training is made applicable in this context by addressing crucial problems resulting from the single positive exemplar setup, the imbalance between exemplar and negatives, and inconsistent labels within SGD batches. Optimization of a single cost function yields SGD batches of compact, mutually dissimilar cliques of samples. Learning exemplar similarities is then posed as a categorization task on individual batches. In the experimental evaluation the approach has shown competitive performance compared to the state-of-the-art, providing significantly finer similarity structure that is particularly crucial for detailed posture analysis. This research has been funded in part by the Ministry for Science, Baden-Württemberg and the Heidelberg Academy of Sciences, Heidelberg, Germany. We are grateful to the NVIDIA corporation for donating a Titan X GPU. 8 References [1] R. E. Burkard, E. Çela, P. M. Pardalos, and L. Pitsoulis. The quadratic assignment problem. In P. M. Pardalos and D.-Z Du, editors, Handbook of Combinatorial Optimization. 1998. [2] C. Doersch, S. Singh, A. Gupta, J. Sivic, and A. Efros. What makes paris look like paris? ACM TOG, 31(4), 2012. [3] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In ICCV, pages 1422–1430, 2015. [4] Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In NIPS, pages 766–774, 2014. [5] A. Eigenstetter, M. Takami, and B. Ommer. Randomized max-margin compositions for visual recognition. In CVPR ’14. [6] I. El-Naqa, Y. Yang, N. P. Galatsanos, R. M. Nishikawa, and M. N. Wernick. A similarity learning approach to content-based image retrieval: application to digital mammography. TMI, 23(10):1233–1244, 2004. [7] Pedro Felzenszwalb, David McAllester, and Deva Ramanan. A discriminatively trained, multiscale, deformable part model. In CVPR, pages 1–8. IEEE, 2008. [8] V. Ferrari, M. Marin-Jimenez, and A. Zisserman. Pose search: retrieving people using their pose. In CVPR, pages 1–8. IEEE, 2009. [9] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pages 580–587, 2014. [10] Bharath Hariharan, Jitendra Malik, and Deva Ramanan. Discriminative decorrelation for clustering and classification. In ECCV, pages 459–472. Springer, 2012. [11] X. He and S. Gould. An exemplar-based crf for multi-instance object segmentation. In CVPR. IEEE, 2014. [12] Sam Johnson and Mark Everingham. Learning effective human pose estimation from inaccurate annotation. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2011. [13] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [14] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989. [15] Tomasz Malisiewicz, Abhinav Gupta, and Alexei A Efros. Ensemble of exemplar-svms for object detection and beyond. In ICCV, pages 89–96. IEEE, 2011. [16] Juan Carlos Niebles, Chih-Wei Chen, and Li Fei-Fei. Modeling temporal structure of decomposable motion segments for activity classification. In ECCV, pages 392–405. Springer, 2010. [17] H. Pirsiavash and D. Ramanan. Parsing videos of actions with segmental grammars. In CVPR, 2014. [18] V. Ramakrishna, D. Munoz, M. Hebert, J. A. Bagnell, and Y. Sheikh. Pose machines: Articulated pose estimation via inference machines. In ECCV ’14. Springer, 2014. [19] J. Rubio, A. Eigenstetter, and B. Ommer. Generative regularization with latent topics for discriminative object recognition. PR, 48:3871–3880, 2015. [20] Nataliya Shapovalova and Greg Mori. Clustered exemplar-svm: Discovering sub-categories for visual recognition. In ICIP, pages 93–97. IEEE, 2015. [21] Jiang Wang, Yang Song, Thomas Leung, Chuck Rosenberg, Jingbin Wang, James Philbin, Bo Chen, and Ying Wu. Learning fine-grained image similarity with deep ranking. In CVPR, pages 1386–1393, 2014. [22] X. Wang and A. Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. [23] Hao Xia, Steven CH Hoi, Rong Jin, and Peilin Zhao. Online multiple kernel similarity learning for visual search. TPAMI, 36(3):536–549, 2014. [24] A. L. Yuille and Anand Rangarajan. The concave-convex procedure (CCCP). Neural computation, 15(4):915–936, 2003. [25] S. Zagoruyko and N. Komodakis. Learning to compare image patches via convolutional neural networks. In CVPR ’14. 9 | 2016 | 231 |
6,141 | Computing and maximizing influence in linear threshold and triggering models Justin Khim Department of Statistics The Wharton School University of Pennsylvania Philadelphia, PA 19104 jkhim@wharton.upenn.edu Varun Jog Electrical & Computer Engineering Department University of Wisconsin - Madison Madison, WI 53706 vjog@wisc.edu Po-Ling Loh Electrical & Computer Engineering Department University of Wisconsin - Madison Madison, WI 53706 loh@ece.wisc.edu Abstract We establish upper and lower bounds for the influence of a set of nodes in certain types of contagion models. We derive two sets of bounds, the first designed for linear threshold models, and the second more broadly applicable to a general class of triggering models, which subsumes the popular independent cascade models, as well. We quantify the gap between our upper and lower bounds in the case of the linear threshold model and illustrate the gains of our upper bounds for independent cascade models in relation to existing results. Importantly, our lower bounds are monotonic and submodular, implying that a greedy algorithm for influence maximization is guaranteed to produce a maximizer within a 1 −1 e -factor of the truth. Although the problem of exact influence computation is NP-hard in general, our bounds may be evaluated efficiently. This leads to an attractive, highly scalable algorithm for influence maximization with rigorous theoretical guarantees. 1 Introduction Many datasets in contemporary scientific applications possess some form of network structure [20]. Popular examples include data collected from social media websites such as Facebook and Twitter [1], or electrical recordings gathered from a physical network of firing neurons [22]. In settings involving biological data, a common goal is to construct an abstract network representing interactions between genes, proteins, or other biomolecules [8]. Over the last century, a vast body of work has been developed in the epidemiology literature to model the spread of disease [10]. The most popular models include SI (susceptible, infected), SIS (susceptible, infected, susceptible), and SIR (susceptible, infected, recovered), in which nodes may infect adjacent neighbors according to a certain stochastic process. These models have recently been applied to social network and viral marketing settings by computer scientists [6, 14]. In particular, the notion of influence, which refers to the expected number of infected individuals in a network at the conclusion of an epidemic spread, was studied by Kempe et al. [9]. However, determining an influence-maximizing seed set of a certain cardinality was shown to be NP-hard—in fact, even computing the influence exactly in certain simple models is #P-hard [3, 5]. Recent work in theoretical computer science has therefore focused on maximizing influence up to constant factors [9, 2]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. A series of recent papers [12, 21, 13] establish computable upper bounds on the influence when information propagates in a stochastic manner according to an independent cascade model. In such a model, the infection spreads in rounds, and each newly infected node may infect any of its neighbors in the succeeding round. Central to the bounds is a matrix known as the hazard matrix, which encodes the transmission probabilities across edges in the graph. A recent paper by Lee et al. [11] leverages “sensitive” edges in the network to obtain tighter bounds via a conditioning argument. Such bounds could be maximized to obtain a surrogate for the influence-maximizing set in the network; however, the tightness of the proposed bounds is yet unknown. The independent cascade model may be viewed as a special case of a more general triggering model, in which the infection status of each node in the network is determined by a random subset of neighbors [9]. The class of triggering models also includes another popular stochastic infection model known as the linear threshold model, and bounds for the influence function in linear threshold models have been explored in an independent line of work [5, 23, 4]. Naturally, one might wonder whether influence bounds might be derived for stochastic infection models in the broader class of triggering models, unifying and extending the aforementioned results. We answer this question affirmatively by establishing upper and lower bounds for the influence in general triggering models. Our derived bounds are attractive for two reasons: First, we are able to quantify the gap between our upper and lower bounds in the case of linear threshold models, expressed in terms of properties of the graph topology and edge probabilities governing the likelihood of infection. Second, maximizing a lower bound on the influence is guaranteed to yield a lower bound on the true maximum influence in the graph. Furthermore, as shown via the theory of submodular functions, the lower bounds in our paper may be maximized efficiently up to a constantfactor approximation via a greedy algorithm, leading to a highly-scalable algorithm with provable guarantees. To the best of our knowledge, the only previously established bounds for influence maximization are those mentioned above for the special cases of independent cascade and linear threshold models, and no theoretical or computational guarantees were known. The remainder of our paper is organized as follows: In Section 2, we fix notation to be used in the paper and describe the aforementioned infection models in greater detail. In Section 3, we establish upper and lower bounds for the linear threshold model, which we extend to triggering models in Section 4. Section 5 addresses the question of maximizing the lower bounds established in Sections 3 and 4, and discusses theoretical guarantees achievable using greedy algorithms and convex relaxations of the otherwise intractable influence maximization problem. We report the results of simulations in Section 6, and conclude the paper with a selection of open research questions in Section 7. 2 Preliminaries In this section, we introduce basic notation and define the infection models to be analyzed in our paper. The network of individuals is represented by a directed graph G = (V, E), where V is the set of vertices and E ⊆V × V is the set of edges. Furthermore, each directed edge (i, j) possesses a weight bij, whose interpretation changes with the specific model we consider. We denote the weighted adjacency matrix of G by B = (bij). We distinguish nodes as either being infected or uninfected based on whether or not the information contagion has reached them. Let ¯A := V \ A. 2.1 Linear threshold models We first describe the linear threshold model, introduced by Kempe et al. [9]. In this model, the edge weights (bij) denote the influence that node i has on node j. The chance that a node is infected depends on two quantities: the set of infected neighbors at a particular time instant and a random node-specific threshold that remains constant over time. For each i ∈V , we impose the condition P j bji ≤1. The thresholds {θi : i ∈V } are i.i.d. uniform random variables on [0, 1]. Beginning from an initially infected set A ⊆V , the contagion proceeds in discrete time steps, as follows: At every time step, each vertex i computes the total incoming weight from all infected neighbors, i.e., P j is infected bji. If this quantity exceeds θi, vertex i becomes infected. Once a node becomes infected, it remains infected for every succeeding time step. Note that the process necessarily stabilizes after at most |V | time steps. The expected size of the infection when the process stabilizes is known as the influence of A and is denoted by I(A). We may interpret the threshold θi as the level of immunity of node i. 2 Kempe et al. [9] established the monotonicity and submodularity of the function I : 2V →R. As discussed in Section 5.1, these properties are key to the problem of influence maximization, which concerns maximizing I(A) for a fixed size of the set A. An important step used in describing the submodularity of I is the “reachability via live-edge paths" interpretation of the linear threshold model. Since this interpretation is also crucial to our analysis, we describe it below. Reachability via live-edge paths: Consider the weighted adjacency matrix B of the graph. We create a subgraph of G by selecting a subset of “live" edges, as follows: Each vertex i designates at most one incoming edge as a live edge, with edge (j, i) being selected with probability bji. (No neighboring edge is selected with probability 1 −P j bji.) The “reach" of a set A is defined as the set of all vertices i such that a path exists from A to i consisting only of live edges. The distribution of the set of nodes infected in the final state of the threshold model is identical to the distribution of reachable nodes under the live-edges model, when both are seeded with the same set A. 2.2 Independent cascade models Kempe et al. [9] also analyzed the problem of influence maximization in independent cascade models, a class of models motivated by interacting particle systems in probability theory [7, 15]. Similar to the linear threshold model, the independent cascade models begins with a set A of initially infected nodes in a directed graph G = (V, E), and the infection spreads in discrete time steps. If a vertex i becomes infected at time t, it attempts to infect each uninfected neighbor j via the edge from i to j at time t + 1. The entries (bij) capture the probability that i succeeds in infecting j. This process continues until no more infections occur, which again happens after at most |V | time steps. The influence function for this model was also shown to be monotonic and submodular, where the main step again relied on a “reachability via live-edge paths" model. In this case, the interpretation is straightforward: Given a graph G, every edge (i, j) ∈E is independently designated as a live edge with probability bij. It is then easy to see that the reach of A again has the same distribution as the set of infected nodes in the final state of the independent cascade model. 2.3 Triggering models To unify the above models, Kempe et al. [9] introduced the “triggering model," which evolves as follows: Each vertex i chooses a random subset of its neighbors as triggers, where the choice of triggers for a given node is independent of the choice for all other nodes. If a node i is uninfected at time t but a vertex in its trigger set becomes infected, vertex i becomes infected at time t + 1. Note that the triggering model may be interpreted as a “reachability via live-edge paths" model if edge (j, i) is designated as live when i chooses j to be in its trigger set. The entry bij represents the probability that edge (i, j) is live. Clearly, the linear threshold and independent cascade models are special cases of the triggering model when the distributions of the trigger sets are chosen appropriately. 2.4 Notation Finally, we introduce some notational conventions. For a matrix M ∈Rn×n, we write ρ(M) to denote the spectral radius of M. We write ∥M∥∞,∞to denote the ℓ∞-operator norm of M. The matrix Diag(M) denotes the matrix with diagonal entries equal to the diagonal entries of M and all other entries equal to 0. We write 1S to denote the all-ones vector supported on a set S. For a given vertex subset A ⊆V in the graph with weighted adjacency matrix B, define the vector b ¯ A ∈R| ¯ A| indexed by i ∈¯A, such that b ¯ A(i) = P j∈A bji. Thus, b ¯ A(i) records the total incoming weight from A into i. A walk in the graph G is a sequence of vertices {v1, v2, . . . , vr} such that (vi, vi+1) ∈E, for 1 ≤i ≤r −1. A path is a walk with no repeated vertices. We define the weight of a walk to be ω(w) := Q e∈w be, where the product is over all edges e ∈E included in w. (The weight of a walk of length 0 is defined to be 1.) For a set of walks W = {w1, w2, . . . , wr}, we denote the sum of the weights of all walks in W by ω(W) = Pr i ω(wi). 3 Influence bounds for linear threshold models We now derive upper and lower bounds for the influence of a set A ⊆V in the linear threshold model. 3 3.1 Upper bound We begin with upper bounds. We have the following main result, which bounds the influence as a function of appropriate sub-blocks of the weighted adjacency matrix: Theorem 1. For any set A ⊆V , we have the bound I(A) ≤|A| + bT ¯ A(I −B ¯ A ¯ A)−11 ¯ A. (1) In fact, the proof of Theorem 1 shows that the bound (1) may be strengthened to I(A) ≤|A| + bT ¯ A n−|A| X i=1 Bi−1 ¯ A, ¯ A 1 ¯ A, (2) since the upper bound is contained by considering paths from vertices in A to vertices in ¯A and summing over paths of various lengths (see also Theorem 4 below). The bound (2) is exact when the underlying graph G is a directed acyclic graph (DAG). However, the bound (1) may be preferable in some cases from the point of view of computation or interpretation. 3.2 Lower bounds We also establish lower bounds on the influence. The following theorem provides a family of lower bounds, indexed by m ≥1: Theorem 2. For any m ≥1, we have the following natural lower bound on the influence of A: I(A) ≥ m X k=0 ω(P k A), (3) where P k A are all paths from A to ¯A of length k, such that only the starting vertex lies in A. We note some special cases when the bounds may be written explicitly: m = 1 : I(A) ≥|A| + bT ¯ A1 ¯ A := LB1(A) (4) m = 2 : I(A) ≥|A| + bT ¯ A(I + B ¯ A, ¯ A)1 ¯ A := LB2(A) (5) m = 3 : I(A) ≥|A| + bT ¯ A(I + B ¯ A, ¯ A + B2 ¯ A, ¯ A −Diag(B2 ¯ A, ¯ A))1 ¯ A. (6) Remark: As noted in Chen et al. [5], computing exact influence is #-P hard precisely because it is difficult to write down an expression for ω(P k A) for arbitrary values of k. When m > 3, we may use the techniques in Movarraei et al. [18, 16, 17] to obtain explicit lower bounds when m ≤7. Note that as m increases, the sequence of lower bounds approaches the true value of I(A). The lower bound (4) has a very simple interpretation. When |A| is fixed, the function LB1(A) computes the aggregate weight of edges from A to ¯A. Furthermore, we may show that the function LB1 is monotonic. Hence, maximizing LB1 with respect to A is equivalent to finding a maximum cut in the directed graph. (For more details, see Section 5.) The lower bounds (5) and (6) also take into account the weight of paths of length 2 and 3 from A to ¯A. 3.3 Closeness of bounds A natural question concerns the proximity of the upper bound (1) to the lower bounds in Theorem 2. The bounds may be far apart in general, as illustrated by the following example: Example: Consider a graph G with vertex set {1, 2, . . . , n}, and edge weights given by wij = 0.5, if i = 1 and j = 2, 0.5, if i = 2 and 3 ≤j ≤n, 0, otherwise. Let A = {1}. We may check that LB1(A) = 1.5. Furthermore, I(A) = n+2 4 , and any upper bound necessarily exceeds this quantity. Hence, the gap between the upper and lower bounds may grow linearly in the number of vertices. (Similar examples may be computed for LB2, as well.) 4 The reason for the linear gap in the above example is that vertex 2 has a very large outgoing weight; i.e., it is highly infectious. Our next result shows that if the graph does not contain any highlyinfectious vertices, the upper and lower bounds are guaranteed to differ by a constant factor. The result is stated in terms of the maximum row sum λ ¯ A,∞=
B ¯ A, ¯ A
∞,∞, which corresponds to the maximum outgoing weight of the nodes in ¯A. Theorem 3. Suppose λ ¯ A,∞< 1. Then UB LB1 ≤ 1 1−λ ¯ A,∞and UB LB2 ≤ 1 1−λ2 ¯ A,∞. Since the column sums of B are bounded above by 1 in a linear threshold model, we have the following corollary: Corollary 1. Suppose B is symmetric and A ⊊V . Then UB LB1 ≤ 1 1−λ ¯ A,∞and UB LB2 ≤ 1 1−λ2 ¯ A,∞. Note that if λ∞= ∥B∥∞,∞, we certainly have λ ¯ A,∞≤λ∞for any choice of A ⊆V . Hence, Theorem 3 and Corollary 1 hold a fortiori with λ ¯ A,∞replaced by λ∞. 4 Influence bounds for triggering models We now generalize our discussion to the broader class of triggering models. Recall that in this model, bij records the probability that (i, j) is a live edge. 4.1 Upper bound We begin by deriving an upper bound, which shows that inequality (2) holds for any triggering model: Theorem 4. In a general triggering model, the influence of A ⊆V satisfies inequality (2). The approach we use for general triggering models relies on slightly more sophisticated observations than the proof for linear threshold models. Furthermore, the finite sum in inequality (2) may not in general be replaced by an infinite sum, as in the statement of Theorem 1 for the case of linear threshold models. This is because if ρ B ¯ A, ¯ A > 1, the infinite series will not converge. 4.2 Lower bound We also have a general lower bound: Theorem 5. Let A ⊆V . The influence of A satisfies the inequality I(A) ≥ X i∈V sup p∈PA→i ω(p) := LBtrig(A), (7) where PA→i is the set of all paths from A to i such that only the starting vertex lies in A. The proof of Theorem 5 shows that the bound (7) is sharp when at most one path exists from A to each vertex i. In the case of linear threshold models, the bound (7) is not directly comparable to the bounds stated in Theorem 2, since it involves maximal-weight paths rather than paths of certain lengths. Hence, situations exist in which one bound is tighter than the other, and vice versa (e.g., see the Example in Section 3.3). 4.3 Independent cascade models We now apply the general bounds obtained for triggering models to the case of independent cascade models. Theorem 4 implies the following “worst-case" upper bounds on influence, which only depends on |A|: Theorem 6. The influence of A ⊆V in an independent cascade model satisfies I(A) ≤|A| + λ∞|A| · 1 −λn−|A| ∞ 1 −λ∞ . (8) In particular, if λ∞< 1, we have I(A) ≤ |A| 1 −λ∞ . (9) 5 Note that when λ∞> 1, the bound (8) exceeds n for all large enough n, so the bound is trivial. It is instructive to compare Theorem 6 with the results of Lemonnier et al. [13]. The hazard matrix of an independent cascade model with weighted adjacency matrix (bij) is defined by Hij = −log(1 −bij), ∀(i, j). The following result is stated in terms of the spectral radius ρ = ρ H+HT 2 : Proposition 1 (Corollary 1 in Lemonnier et al. [13]). Let A ⊊V , and suppose ρ < 1 −δ, where δ = |A| 4(n−|A|) 1/3 . Then I(A) ≤|A| + q ρ 1−ρ p |A|(n −|A|). As illustrated in the following example, the bound in Theorem 6 may be significantly tighter than the bound provided in Proposition 1: Example: Consider a directed Erdös-Rényi graph on n vertices, where each edge (i, j) is independently present with probability c n. Suppose c < 1. For any set |A|, the bound (9) gives I(A) ≤ |A| 1 −c. (10) It is easy to check that ρ H+HT 2 = −(n −1) log 1 −c n . For large values of n, we have ρ(H) → c < 1, so Proposition 1 implies the (approximate) bound I(A) ≤|A| + q c 1−c p |A|(n −|A|). In particular, this bound increases with n, unlike our bound (10). Although the example is specific to Erdös-Rényi graphs, we conjecture that whenever ∥B∥∞,∞< 1, the bound in Theorem 6 is tighter than the bound in Proposition 1. 5 Maximizing influence We now turn to the question of choosing a set A ⊆V of cardinality at most k that maximizes I(A). 5.1 Submodular maximization We begin by reviewing the notion of submodularity, which will be crucial in our discussion of influence maximization algorithms. We have the following definition: Definition 1 (Submodularity). A set function f : 2V →R is submodular if either of the following equivalent conditions holds: (i) For any two sets S, T ⊆V , f(S ∪T) + f(S ∩T) ≤f(S) + f(T). (11) (ii) For any two sets S ⊆T ⊆V and any x /∈T, the following inequality holds: f(T ∪{x}) −f(T) ≤f(S ∪{x}) −f(x). (12) The left and right sides of inequality (12) are the discrete derivatives of f evaluated at T and S. Submodular functions arise in a wide variety of applications. Although submodular functions resemble convex and concave functions, optimization may be quite challenging; in fact, many submodular function maximization problems are NP-hard. However, positive submodular functions may be maximized efficiently if they are also monotonic, where monotonicity is defined as follows: Definition 2 (Monotonicity). A function f : 2V →R is monotonic if for any two sets S ⊆T ⊆V , f(S) ≤f(T). Equivalently, a function is monotonic if its discrete derivative is nonnegative at all points. We have the following celebrated result, which guarantees that the output of the greedy algorithm provides a 1 −1 e -approximation to the cardinality-constrained maximization problem: Proposition 2 (Theorem 4.2 of Nemhauser and Wolsey [19]). Let f : 2V →R+ be a monotonic submodular function. For any k ≥0, define m∗(k) = max|S|≤k f(S). Suppose we construct a sequence of sets {S0 = φ, S1, . . . , Sk} in a greedy fashion, such that Si+1 = Si ∪{x}, where x maximizes the discrete derivative of f evaluated at Si. Then f(Sk) ≥ 1 −1 e m∗(k). 6 5.2 Greedy algorithms Kempe et al. [9] leverage Proposition 2 and the submodularity of the influence function to derive guarantees for a greedy algorithm for influence maximization in the linear threshold model. However, due to the intractability of exact influence calculations, each step of the greedy algorithm requires approximating the influence of several augmented sets. This leads to an overall runtime of O(nk) times the runtime for simulations and introduces an additional source of error. As the results of this section establish, the lower bounds {LBm}m≥1 and LBtrig appearing in Theorems 2 and 5 are also conveniently submodular, implying that Proposition 2 also applies when a greedy algorithm is employed. In contrast to the algorithm studied by Kempe et al. [9], however, our proposed greedy algorithms do not involve expensive simulations, since the functions LBm and LBtrig are relatively straightforward to evaluate. This means the resulting algorithm is extremely fast to compute even on large networks. Theorem 7. The lower bounds {LBm}m≥1 are monotone and submodular. Thus, for any k ≤n, a greedy algorithm that maximizes LBm at each step yields a 1 −1 e -approximation to maxA⊆V :|A|≤k LBm(A). Theorem 8. The function LBtrig is monotone and submodular. Thus, for any k ≤ n, a greedy algorithm that maximizes LBtrig at each step yields a 1 −1 e -approximation to maxA⊆V :|A|≤k LBtrig(A). Note that maximizing LBm(A) or LBtrig(A) necessarily provides a lower bound on maxA⊆V I(A). 6 Simulations In this section, we report the results of various simulations. In the first set of simulations, we generated an Erdös-Renyi graph with 900 vertices and edge probability 2 n; a preferential attachment graph with 900 vertices, 10 initial vertices, and 3 edges for each added vertex; and a 30 × 30 grid. We generated 33 instances of edge probabilities for each graph, as follows: For each instance and each vertex i, we chose γ(i) uniformly in [γmin, 0.8], where γmin ranged from 0.0075 to 0.75 in increments of 0.0075. The probability that the incoming edge was chosen was 1−γ d(i) , where d(i) is the degree of i. An initial infection set A of size 10 was chosen at random, and 50 simulations of the infection process were run to estimate the true influence. The upper and lower bounds and value of I(A) computed via simulations are shown in Figure 1. Note that the gap between the upper and lower bounds indeed controlled for smaller values of λ ¯ A,∞, agreeing with the predictions of Theorem 3. For the second set of simulations, we generated 10 of each of the following graphs: an Erdös-Renyi graph with 100 vertices and edge probability 2 n; a preferential attachment graph with 100 vertices, 10 initial vertices, and 3 additional edges for each added vertex; and a grid graph with 100 vertices. For each of the 10 realizations, we also picked a value of γ(i) for each vertex i uniformly in [0.075, 0.8]. The corresponding edge probabilities were assigned as before. We then selected sets A of size 10 using greedy algorithms to maximize LB1, LB2, and UB, as well as the estimated influence based on 50 simulated infections. Finally, we used 200 simulations to approximate the actual influence of each resulting set. The average influences, along with the average influence of a uniformly random subset of vertices of size 10, are plotted in Figure 2. Note that the greedy algorithms all perform comparably, although the sets selected using LB2 and UB appear slightly better. The fact that the algorithm that uses UB performs well is somewhat unsurprising, since it takes into account the influence from all paths. However, note that maximizing UB does not lead to the theoretical guarantees we have derived for LB1 and LB2. In Table 1, we report the runtimes scaled by the runtime of the LB1 algorithm. As expected, the LB1 algorithm is fastest, and the other algorithms may be much slower. 7 Discussion We have developed novel upper and lower bounds on the influence function in various contagion models, and studied the problem of influence maximization subject to a cardinality constraint. Note that all of our methods may be extended via the conditional expectation decomposition employed by Lee et al. [11], to obtain sharper influence bounds for certain graph topologies. It would be interesting to derive theoretical guarantees for the quality of improvement in such cases; we leave this 7 1 1.5 2 2.5 3 λ ¯A,∞ 10 12 14 16 18 20 22 vertices infected LB1 LB2 Simulation UB 4 6 8 10 12 λ ¯A,∞ 10 20 30 40 50 vertices infected LB1 LB2 Simulation UB 0.2 0.4 0.6 0.8 1 λ ¯A,∞ 12 14 16 18 20 22 24 vertices infected LB1 LB2 Simulation UB Figure 1: Lower bounds, upper bounds, and simulated influence for Erdös-Renyi, preferential attachment, and 2D-grid graphs, respectively. For small values of λ ¯ A,∞, our bounds are tight. 2 4 6 8 10 |A| 0 5 10 15 20 25 30 influence LB1 LB2 Simulation UB Random 2 4 6 8 10 |A| 0 10 20 30 40 50 influence LB1 LB2 Simulation UB Random 2 4 6 8 10 |A| 0 5 10 15 20 25 influence LB1 LB2 Simulation UB Random Figure 2: Simulated influence for sets |A| selected by greedy algorithms and uniformly at random on Erdös-Renyi, preferential attachment, and 2D-grid graphs respectively. All greedy algorithms perform similarly, but the algorithms maximizing the simulated influence and UB are much more computationally intensive. LB1 LB2 UB Simulation Erdös-Renyi 1.00 2.36 27.43 710.58 Preferential attachment 1.00 2.56 28.49 759.83 2D-grid 1.00 2.43 47.08 1301.73 Table 1: Runtimes for the influence maximization algorithms, scaled by the runtime of the greedy LB1 algorithm. The corresponding lower bounds are much easier to compute, allowing for faster algorithms. exploration for future work. Other open questions involve quantifying the gap between the upper and lower bounds derived in the case of general triggering models, and obtaining theoretical guarantees for non-greedy algorithms in our lower bound maximization problem. References [1] L. A. Adamic and E. Adar. Friends and neighbors on the Web. Social Networks, 25(3):211 – 230, 2003. [2] C. Borgs, M. Brautbar, J. Chayes, and B. Lucier. Maximizing social influence in nearly optimal time. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 946–957. SIAM, 2014. [3] W. Chen, C. Wang, and Y. Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1029–1038. ACM, 2010. [4] W. Chen, Y. Wang, and S. Yang. Efficient influence maximization in social networks. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 199–208. ACM, 2009. [5] W. Chen, Y. Yuan, and L. Zhang. Scalable influence maximization in social networks under the linear threshold model. In Proceedings of the 2010 IEEE International Conference on Data Mining, ICDM ’10, pages 88–97, Washington, DC, USA, 2010. IEEE Computer Society. 8 [6] P. Domingos and M. Richardson. Mining the network value of customers. In Proceedings of the seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 57–66. ACM, 2001. [7] R. Durrett. Lecture Notes on Particle Systems and Percolation. Wadsworth & Brooks/Cole statistics/probability series. Wadsworth & Brooks/Cole Advanced Books & Software, 1988. [8] M. Hecker, S. Lambeck, S. Toepfer, E. Van Someren, and R. Guthke. Gene regulatory network inference: data integration in dynamic models—a review. Biosystems, 96(1):86–103, 2009. [9] D. Kempe, J. Kleinberg, and É. Tardos. Maximizing the spread of influence through a social network. In Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’03, pages 137–146, New York, NY, USA, 2003. ACM. [10] W. O. Kermack and A. G. McKendrick. A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 115(772):700–721, 1927. [11] E. J. Lee, S. Kamath, E. Abbe, and S. R. Kulkarni. Spectral bounds for independent cascade model with sensitive edges. In 2016 Annual Conference on Information Science and Systems (CISS), pages 649–653, March 2016. [12] R. Lemonnier, K. Scaman, and N. Vayatis. Tight bounds for influence in diffusion networks and application to bond percolation and epidemiology. In Advances in Neural Information Processing Systems, pages 846–854, 2014. [13] R. Lemonnier, K. Scaman, and N. Vayatis. Spectral Bounds in Random Graphs Applied to Spreading Phenomena and Percolation. ArXiv e-prints, March 2016. [14] J. Leskovec, L. A. Adamic, and B. A. Huberman. The dynamics of viral marketing. ACM Transactions on the Web (TWEB), 1(1):5, 2007. [15] T. Liggett. Interacting Particle Systems, volume 276. Springer Science & Business Media, 2012. [16] N. Movarraei and S. Boxwala. On the number of paths of length 5 in a graph. International Journal of Applied Mathematical Research, 4(1):30–51, 2015. [17] N. Movarraei and S. Boxwala. On the number of paths of length 6 in a graph. International Journal of Applied Mathematical Research, 4(2):267–280, 2015. [18] N. Movarraei and M. Shikare. On the number of paths of lengths 3 and 4 in a graph. International Journal of Applied Mathematical Research, 3(2):178–189, 2014. [19] 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. [20] M. E. J. Newman. The structure and function of complex networks. SIAM review, 45(2):167– 256, 2003. [21] K. Scaman, R. Lemonnier, and N. Vayatis. Anytime influence bounds and the explosive behavior of continuous-time diffusion networks. In Advances in Neural Information Processing Systems, pages 2017–2025, 2015. [22] O. Sporns. The human connectome: A complex network. Annals of the New York Academy of Sciences, 1224(1):109–125, 2011. [23] C. Zhou, P. Zhang, J. Guo, and L. Guo. An upper bound based greedy algorithm for mining top-k influential nodes in social networks. In Proceedings of the 23rd International Conference on World Wide Web, pages 421–422. ACM, 2014. 9 | 2016 | 232 |
6,142 | Data Programming: Creating Large Training Sets, Quickly Alexander Ratner, Christopher De Sa, Sen Wu, Daniel Selsam, Christopher Ré Stanford University {ajratner,cdesa,senwu,dselsam,chrismre}@stanford.edu Abstract Large labeled training sets are the critical building blocks of supervised learning methods and are key enablers of deep learning techniques. For some applications, creating labeled training sets is the most time-consuming and expensive part of applying machine learning. We therefore propose a paradigm for the programmatic creation of training sets called data programming in which users express weak supervision strategies or domain heuristics as labeling functions, which are programs that label subsets of the data, but that are noisy and may conflict. We show that by explicitly representing this training set labeling process as a generative model, we can “denoise” the generated training set, and establish theoretically that we can recover the parameters of these generative models in a handful of settings. We then show how to modify a discriminative loss function to make it noise-aware, and demonstrate our method over a range of discriminative models including logistic regression and LSTMs. Experimentally, on the 2014 TAC-KBP Slot Filling challenge, we show that data programming would have led to a new winning score, and also show that applying data programming to an LSTM model leads to a TAC-KBP score almost 6 F1 points over a state-of-the-art LSTM baseline (and into second place in the competition). Additionally, in initial user studies we observed that data programming may be an easier way for non-experts to create machine learning models when training data is limited or unavailable. 1 Introduction Many of the major machine learning breakthroughs of the last decade have been catalyzed by the release of a new labeled training dataset.1 Supervised learning approaches that use such datasets have increasingly become key building blocks of applications throughout science and industry. This trend has also been fueled by the recent empirical success of automated feature generation approaches, notably deep learning methods such as long short term memory (LSTM) networks [14], which ameliorate the burden of feature engineering given large enough labeled training sets. For many real-world applications, however, large hand-labeled training sets do not exist, and are prohibitively expensive to create due to requirements that labelers be experts in the application domain. Furthermore, applications’ needs often change, necessitating new or modified training sets. To help reduce the cost of training set creation, we propose data programming, a paradigm for the programmatic creation and modeling of training datasets. Data programming provides a simple, unifying framework for weak supervision, in which training labels are noisy and may be from multiple, potentially overlapping sources. In data programming, users encode this weak supervision in the form of labeling functions, which are user-defined programs that each provide a label for some subset of the data, and collectively generate a large but potentially overlapping set of training labels. Many different weak supervision approaches can be expressed as labeling functions, such 1http://www.spacemachine.net/views/2016/3/datasets-over-algorithms 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. as strategies which utilize existing knowledge bases (as in distant supervision [22]), model many individual annotator’s labels (as in crowdsourcing), or leverage a combination of domain-specific patterns and dictionaries. Because of this, labeling functions may have widely varying error rates and may conflict on certain data points. To address this, we model the labeling functions as a generative process, which lets us automatically denoise the resulting training set by learning the accuracies of the labeling functions along with their correlation structure. In turn, we use this model of the training set to optimize a stochastic version of the loss function of the discriminative model that we desire to train. We show that, given certain conditions on the labeling functions, our method achieves the same asymptotic scaling as supervised learning methods, but that our scaling depends on the amount of unlabeled data, and uses only a fixed number of labeling functions. Data programming is in part motivated by the challenges that users faced when applying prior programmatic supervision approaches, and is intended to be a new software engineering paradigm for the creation and management of training sets. For example, consider the scenario when two labeling functions of differing quality and scope overlap and possibly conflict on certain training examples; in prior approaches the user would have to decide which one to use, or how to somehow integrate the signal from both. In data programming, we accomplish this automatically by learning a model of the training set that includes both labeling functions. Additionally, users are often aware of, or able to induce, dependencies between their labeling functions. In data programming, users can provide a dependency graph to indicate, for example, that two labeling functions are similar, or that one “fixes” or “reinforces” another. We describe cases in which we can learn the strength of these dependencies, and for which our generalization is again asymptotically identical to the supervised case. One further motivation for our method is driven by the observation that users often struggle with selecting features for their models, which is a traditional development bottleneck given fixed-size training sets. However, initial feedback from users suggests that writing labeling functions in the framework of data programming may be easier [12]. While the impact of a feature on end performance is dependent on the training set and on statistical characteristics of the model, a labeling function has a simple and intuitive optimality criterion: that it labels data correctly. Motivated by this, we explore whether we can flip the traditional machine learning development process on its head, having users instead focus on generating training sets large enough to support automatically-generated features. Summary of Contributions and Outline Our first contribution is the data programming framework, in which users can implicitly describe a rich generative model for a training set in a more flexible and general way than in previous approaches. In Section 3, we first explore a simple model in which labeling functions are conditionally independent. We show here that under certain conditions, the sample complexity is nearly the same as in the labeled case. In Section 4, we extend our results to more sophisticated data programming models, generalizing related results in crowdsourcing [17]. In Section 5, we validate our approach experimentally on large real-world text relation extraction tasks in genomics, pharmacogenomics and news domains, where we show an average 2.34 point F1 score improvement over a baseline distant supervision approach—including what would have been a new competition-winning score for the 2014 TAC-KBP Slot Filling competition. Using LSTM-generated features, we additionally would have placed second in this competition, achieving a 5.98 point F1 score gain over a state-of-the-art LSTM baseline [32]. Additionally, we describe promising feedback from a usability study with a group of bioinformatics users. 2 Related Work Our work builds on many previous approaches in machine learning. Distant supervision is one approach for programmatically creating training sets. The canonical example is relation extraction from text, wherein a knowledge base of known relations is heuristically mapped to an input corpus [8, 22]. Basic extensions group examples by surrounding textual patterns, and cast the problem as a multiple instance learning one [15,25]. Other extensions model the accuracy of these surrounding textual patterns using a discriminative feature-based model [26], or generative models such as hierarchical topic models [1, 27, 31]. Like our approach, these latter methods model a generative process of training set creation, however in a proscribed way that is not based on user input as in our approach. There is also a wealth of examples where additional heuristic patterns used to label training data are collected from unlabeled data [7] or directly from users [21,29], in a similar manner to our approach, but without any framework to deal with the fact that said labels are explicitly noisy. 2 Crowdsourcing is widely used for various machine learning tasks [13,18]. Of particular relevance to our problem setting is the theoretical question of how to model the accuracy of various experts without ground truth available, classically raised in the context of crowdsourcing [10]. More recent results provide formal guarantees even in the absence of labeled data using various approaches [4, 9,16,17,24,33]. Our model can capture the basic model of the crowdsourcing setting, and can be considered equivalent in the independent case (Sec. 3). However, in addition to generalizing beyond getting inputs solely from human annotators, we also model user-supplied dependencies between the “labelers” in our model, which is not natural within the context of crowdsourcing. Additionally, while crowdsourcing results focus on the regime of a large number of labelers each labeling a small subset of the data, we consider a small set of labeling functions each labeling a large portion of the dataset. Co-training is a classic procedure for effectively utilizing both a small amount of labeled data and a large amount of unlabeled data by selecting two conditionally independent views of the data [5]. In addition to not needing a set of labeled data, and allowing for more than two views (labeling functions in our case), our approach allows explicit modeling of dependencies between views, for example allowing observed issues with dependencies between views to be explicitly modeled [19]. Boosting is a well known procedure for combining the output of many “weak” classifiers to create a strong classifier in a supervised setting [28]. Recently, boosting-like methods have been proposed which leverage unlabeled data in addition to labeled data, which is also used to set constraints on the accuracies of the individual classifiers being ensembled [3]. This is similar in spirit to our approach, except that labeled data is not explicitly necessary in ours, and richer dependency structures between our “heuristic” classifiers (labeling functions) are supported. The general case of learning with noisy labels is treated both in classical [20] and more recent contexts [23]. It has also been studied specifically in the context of label-noise robust logistic regression [6]. We consider the more general scenario where multiple noisy labeling functions can conflict and have dependencies. 3 The Data Programming Paradigm In many applications, we would like to use machine learning, but we face the following challenges: (i) hand-labeled training data is not available, and is prohibitively expensive to obtain in sufficient quantities as it requires expensive domain expert labelers; (ii) related external knowledge bases are either unavailable or insufficiently specific, precluding a traditional distant supervision or co-training approach; (iii) application specifications are in flux, changing the model we ultimately wish to learn. In such a setting, we would like a simple, scalable and adaptable approach for supervising a model applicable to our problem. More specifically, we would ideally like our approach to achieve ϵ expected loss with high probability, given O(1) inputs of some sort from a domain-expert user, rather than the traditional ˜O(ϵ−2) hand-labeled training examples required by most supervised methods (where ˜O notation hides logarithmic factors). To this end, we propose data programming, a paradigm for the programmatic creation of training sets, which enables domain-experts to more rapidly train machine learning systems and has the potential for this type of scaling of expected loss. In data programming, rather than manually labeling each example, users instead describe the processes by which these points could be labeled by providing a set of heuristic rules called labeling functions. In the remainder of this paper, we focus on a binary classification task in which we have a distribution π over object and class pairs (x, y) ∈X × {−1, 1}, and we are concerned with minimizing the logistic loss under a linear model given some features, l(w) = E(x,y)∼π h log(1 + exp(−wT f(x)y)) i , where without loss of generality, we assume that ∥f(x)∥≤1. Then, a labeling function λi : X 7→ {−1, 0, 1} is a user-defined function that encodes some domain heuristic, which provides a (non-zero) label for some subset of the objects. As part of a data programming specification, a user provides some m labeling functions, which we denote in vectorized form as λ : X 7→{−1, 0, 1}m. Example 3.1. To gain intuition about labeling functions, we describe a simple text relation extraction example. In Figure 1, we consider the task of classifying co-occurring gene and disease mentions as either expressing a causal relation or not. For example, given the sentence “Gene A causes disease B”, the object x = (A, B) has true class y = 1. To construct a training set, the user writes three labeling 3 def lambda_1 ( x ) : return 1 i f ( x . gene , x . pheno ) in KNOWN_RELATIONS_1 e l s e 0 def lambda_2 ( x ) : return -1 i f re . match ( r ’ . ∗not ␣cause . ∗’ , x . text_between ) e l s e 0 def lambda_3 ( x ) : return 1 i f re . match ( r ’ . ∗a s s o c i a t e d . ∗’ , x . text_between ) and ( x . gene , x . pheno ) in KNOWN_RELATIONS_2 e l s e 0 (a) An example set of three labeling functions written by a user. Y λ1 λ2 λ3 (b) The generative model of a training set defined by the user input (unary factors omitted). Figure 1: An example of extracting mentions of gene-disease relations from the scientific literature. functions (Figure 1a). In λ1, an external structured knowledge base is used to label a few objects with relatively high accuracy, and is equivalent to a traditional distant supervision rule (see Sec. 2). λ2 uses a purely heuristic approach to label a much larger number of examples with lower accuracy. Finally, λ3 is a “hybrid” labeling function, which leverages a knowledge base and a heuristic. A labeling function need not have perfect accuracy or recall; rather, it represents a pattern that the user wishes to impart to their model and that is easier to encode as a labeling function than as a set of hand-labeled examples. As illustrated in Ex. 3.1, labeling functions can be based on external knowledge bases, libraries or ontologies, can express heuristic patterns, or some hybrid of these types; we see evidence for the existence of such diversity in our experiments (Section 5). The use of labeling functions is also strictly more general than manual annotations, as a manual annotation can always be directly encoded by a labeling function. Importantly, labeling functions can overlap, conflict, and even have dependencies which users can provide as part of the data programming specification (see Section 4); our approach provides a simple framework for these inputs. Independent Labeling Functions We first describe a model in which the labeling functions label independently, given the true label class. Under this model, each labeling function λi has some probability βi of labeling an object and then some probability αi of labeling the object correctly; for simplicity we also assume here that each class has probability 0.5. This model has distribution µα,β(Λ, Y) = 1 2 m Y i=1 βiαi1{Λi=Y} + βi(1 −αi)1{Λi=−Y} + (1 −βi)1{Λi=0} , (1) where Λ ∈{−1, 0, 1}m contains the labels output by the labeling functions, and Y ∈{−1, 1} is the predicted class. If we allow the parameters α ∈Rm and β ∈Rm to vary, (1) specifies a family of generative models. In order to expose the scaling of the expected loss as the size of the unlabeled dataset changes, we will assume here that 0.3 ≤βi ≤0.5 and 0.8 ≤αi ≤0.9. We note that while these arbitrary constraints can be changed, they are roughly consistent with our applied experience, where users tend to write high-accuracy and high-coverage labeling functions. Our first goal will be to learn which parameters (α, β) are most consistent with our observations—our unlabeled training set—using maximum likelihood estimation. To do this for a particular training set S ⊂X, we will solve the problem (ˆα, ˆβ) = arg max α,β X x∈S log P(Λ,Y)∼µα,β (Λ = λ(x)) = arg max α,β X x∈S log X y′∈{−1,1} µα,β(λ(x), y′) (2) In other words, we are maximizing the probability that the observed labels produced on our training examples occur under the generative model in (1). In our experiments, we use stochastic gradient descent to solve this problem; since this is a standard technique, we defer its analysis to the appendix. Noise-Aware Empirical Loss Given that our parameter learning phase has successfully found some ˆα and ˆβ that accurately describe the training set, we can now proceed to estimate the parameter w which minimizes the expected risk of a linear model over our feature mapping f, given ˆα, ˆβ. To do so, we define the noise-aware empirical risk Lˆα,ˆβ with regularization parameter ρ, and compute the noise-aware empirical risk minimizer ˆw = arg min w Lˆα,ˆβ(w; S ) = arg min w 1 |S | X x∈S E(Λ,Y)∼µˆα,ˆβ h log 1 + e−wT f(x)YΛ = λ(x) i + ρ ∥w∥2 (3) 4 This is a logistic regression problem, so it can be solved using stochastic gradient descent as well. We can in fact prove that stochastic gradient descent running on (2) and (3) is guaranteed to produce accurate estimates, under conditions which we describe now. First, the problem distribution π needs to be accurately modeled by some distribution µ in the family that we are trying to learn. That is, for some α∗and β∗, ∀Λ ∈{−1, 0, 1}m, Y ∈{−1, 1}, P(x,y)∼π∗(λ(x) = Λ, y = Y) = µα∗,β∗(Λ, Y). (4) Second, given an example (x, y) ∼π∗, the class label y must be independent of the features f(x) given the labels λ(x). That is, (x, y) ∼π∗⇒y ⊥f(x) | λ(x). (5) This assumption encodes the idea that the labeling functions, while they may be arbitrarily dependent on the features, provide sufficient information to accurately identify the class. Third, we assume that the algorithm used to solve (3) has bounded generalization risk such that for some parameter χ, E ˆw ES h Lˆα,ˆβ( ˆw; S ) i −min w ES h Lˆα,ˆβ(w; S ) i ≤χ. (6) Under these conditions, we make the following statement about the accuracy of our estimates, which is a simplified version of a theorem that is detailed in the appendix. Theorem 1. Suppose that we run data programming, solving the problems in (2) and (3) using stochastic gradient descent to produce (ˆα, ˆβ) and ˆw. Suppose further that our setup satisfies the conditions (4), (5), and (6), and suppose that m ≥2000. Then for any ϵ > 0, if the number of labeling functions m and the size of the input dataset S are large enough that |S | ≥356 ϵ2 log m 3ϵ then our expected parameter error and generalization risk can be bounded by E h ∥ˆα −α∗∥2i ≤mϵ2 E
ˆβ −β∗
2 ≤mϵ2 E l( ˆw) −min w l(w) ≤χ + ϵ 27ρ. We select m ≥2000 to simplify the statement of the theorem and give the reader a feel for how ϵ scales with respect to |S |. The full theorem with scaling in each parameter (and for arbitrary m) is presented in the appendix. This result establishes that to achieve both expected loss and parameter estimate error ϵ, it suffices to have only m = O(1) labeling functions and |S | = ˜O(ϵ−2) training examples, which is the same asymptotic scaling exhibited by methods that use labeled data. This means that data programming achieves the same learning rate as methods that use labeled data, while requiring asymptotically less work from its users, who need to specify O(1) labeling functions rather than manually label ˜O(ϵ−2) examples. In contrast, in the crowdsourcing setting [17], the number of workers m tends to infinity while here it is constant while the dataset grows. These results provide some explanation of why our experimental results suggest that a small number of rules with a large unlabeled training set can be effective at even complex natural language processing tasks. 4 Handling Dependencies In our experience with data programming, we have found that users often write labeling functions that have clear dependencies among them. As more labeling functions are added as the system is developed, an implicit dependency structure arises naturally amongst the labeling functions: modeling these dependencies can in some cases improve accuracy. We describe a method by which the user can specify this dependency knowledge as a dependency graph, and show how the system can use it to produce better parameter estimates. Label Function Dependency Graph To support the injection of dependency information into the model, we augment the data programming specification with a label function dependency graph, G ⊂D × {1, . . . , m} × {1, . . . , m}, which is a directed graph over the labeling functions, each of the edges of which is associated with a dependency type from a class of dependencies D appropriate to the domain. From our experience with practitioners, we identified four commonly-occurring types of dependencies as illustrative examples: similar, fixing, reinforcing, and exclusive (see Figure 2). For example, suppose that we have two functions λ1 and λ2, and λ2 typically labels only when (i) λ1 also labels, (ii) λ1 and λ2 disagree in their labeling, and (iii) λ2 is actually correct. We call this a fixing dependency, since λ2 fixes mistakes made by λ1. If λ1 and λ2 were to typically agree rather than disagree, this would be a reinforcing dependency, since λ2 reinforces a subset of the labels of λ1. 5 Y λ1 λ2 s lambda_1 ( x ) = f ( x . word ) lambda_2 ( x ) = f ( x . lemma ) S i m i l a r ( lambda_1 , lambda_2 ) Y λ2 λ1 λ3 f r lambda_1 ( x ) = f ( ’ . ∗cause . ∗’ ) lambda_2 ( x ) = f ( ’ . ∗not ␣cause . ∗’ ) lambda_3 ( x ) = f ( ’ . ∗cause . ∗’ ) Fixes ( lambda_1 , lambda_2 ) R e i n f o r c e s ( lambda_1 , lambda_3 ) Y λ1 λ2 e lambda_1 ( x ) = x in DISEASES_A lambda_2 ( x ) = x in DISEASES_B Excludes ( lambda_1 , lambda_2 ) Figure 2: Examples of labeling function dependency predicates. Modeling Dependencies The presence of dependency information means that we can no longer model our labels using the simple Bayesian network in (1). Instead, we model our distribution as a factor graph. This standard technique lets us describe the family of generative distributions in terms of a known factor function h : {−1, 0, 1}m × {−1, 1} 7→{−1, 0, 1}M (in which each entry hi represents a factor), and an unknown parameter θ ∈RM as µθ(Λ, Y) = Z−1 θ exp(θTh(Λ, Y)), where Zθ is the partition function which ensures that µ is a distribution. Next, we will describe how we define h using information from the dependency graph. To construct h, we will start with some base factors, which we inherit from (1), and then augment them with additional factors representing dependencies. For all i ∈{1, . . . , m}, we let h0(Λ, Y) = Y, hi(Λ, Y) = ΛiY, hm+i(Λ, Y) = Λi, h2m+i(Λ, Y) = Λ2 i Y, h3m+i(Λ, Y) = Λ2 i . These factors alone are sufficient to describe any distribution for which the labels are mutually independent, given the class: this includes the independent family in (1). We now proceed by adding additional factors to h, which model the dependencies encoded in G. For each dependency edge (d, i, j), we add one or more factors to h as follows. For a nearduplicate dependency on (i, j), we add a single factor hι(Λ, Y) = 1{Λi = Λ j}, which increases our prior probability that the labels will agree. For a fixing dependency, we add two factors, hι(Λ, Y) = −1{Λi = 0 ∧Λ j , 0} and hι+1(Λ, Y) = 1{Λi = −Y ∧Λ j = Y}, which encode the idea that λj labels only when λi does, and that λj fixes errors made by λi. The factors for a reinforcing dependency are the same, except that hι+1(Λ, Y) = 1{Λi = Y ∧Λ j = Y}. Finally, for an exclusive dependency, we have a single factor hι(Λ, Y) = −1{Λi , 0 ∧Λj , 0}. Learning with Dependencies We can again solve a maximum likelihood problem like (2) to learn the parameter ˆθ. Using the results, we can continue on to find the noise-aware empirical loss minimizer by solving the problem in (3). In order to solve these problems in the dependent case, we typically invoke stochastic gradient descent, using Gibbs sampling to sample from the distributions used in the gradient update. Under conditions similar to those in Section 3, we can again provide a bound on the accuracy of these results. We define these conditions now. First, there must be some set Θ ⊂RM that we know our parameter lies in. This is analogous to the assumptions on αi and βi we made in Section 3, and we can state the following analogue of (4): ∃θ∗∈Θ s.t. ∀(Λ, Y) ∈{−1, 0, 1}m × {−1, 1}, P(x,y)∼π∗(λ(x) = Λ, y = Y) = µθ∗(Λ, Y). (7) Second, for any θ ∈Θ, it must be possible to accurately learn θ from full (i.e. labeled) samples of µθ. More specifically, there exists an unbiased estimator ˆθ(T) that is a function of some dataset T of independent samples from µθ such that, for some c > 0 and for all θ ∈Θ, Cov ˆθ(T) ⪯(2c |T|)−1I. (8) Third, for any two feasible models θ1 and θ2 ∈Θ, E(Λ1,Y1)∼µθ1 h Var(Λ2,Y2)∼µθ2 (Y2|Λ1 = Λ2) i ≤cM−1. (9) That is, we’ll usually be reasonably sure in our guess for the value of Y, even if we guess using distribution µθ2 while the the labeling functions were actually sampled from (the possibly totally different) µθ1. We can now prove the following result about the accuracy of our estimates. 6 KBP (News) Genomics Pharmacogenomics Features Method Prec. Rec. F1 Prec. Rec. F1 Prec. Rec. F1 Hand-tuned ITR 51.15 26.72 35.10 83.76 41.67 55.65 68.16 49.32 57.23 DP 50.52 29.21 37.02 83.90 43.43 57.24 68.36 54.80 60.83 LSTM ITR 37.68 28.81 32.66 69.07 50.76 58.52 32.35 43.84 37.23 DP 47.47 27.88 35.78 75.48 48.48 58.99 37.63 47.95 42.17 Table 1: Precision/Recall/F1 scores using data programming (DP), as compared to distant supervision ITR approach, with both hand-tuned and LSTM-generated features. Theorem 2. Suppose that we run stochastic gradient descent to produce ˆθ and ˆw, and that our setup satisfies the conditions (5)-(9). Then for any ϵ > 0, if the input dataset S is large enough that |S | ≥ 2 c2ϵ2 log 2 ∥θ0 −θ∗∥2 ϵ ! , then our expected parameter error and generalization risk can be bounded by E
ˆθ −θ∗
2 ≤Mϵ2 E l( ˆw) −min w l(w) ≤χ + cϵ 2ρ. As in the independent case, this shows that we need only |S | = ˜O(ϵ−2) unlabeled training examples to achieve error O(ϵ), which is the same asymptotic scaling as supervised learning methods. This suggests that while we pay a computational penalty for richer dependency structures, we are no less statistically efficient. In the appendix, we provide more details, including an explicit description of the algorithm and the step size used to achieve this result. 5 Experiments We seek to experimentally validate three claims about our approach. Our first claim is that data programming can be an effective paradigm for building high quality machine learning systems, which we test across three real-world relation extraction applications. Our second claim is that data programming can be used successfully in conjunction with automatic feature generation methods, such as LSTM models. Finally, our third claim is that data programming is an intuitive and productive framework for domain-expert users, and we report on our initial user studies. Relation Mention Extraction Tasks In the relation mention extraction task, our objects are relation mention candidates x = (e1, e2), which are pairs of entity mentions e1, e2 in unstructured text, and our goal is to learn a model that classifies each candidate as either a true textual assertion of the relation R(e1, e2) or not. We examine a news application from the 2014 TAC-KBP Slot Filling challenge2, where we extract relations between real-world entities from articles [2]; a clinical genomics application, where we extract causal relations between genetic mutations and phenotypes from the scientific literature3; and a pharmacogenomics application where we extract interactions between genes, also from the scientific literature [21]; further details are included in the Appendix. For each application, we or our collaborators originally built a system where a training set was programmatically generated by ordering the labeling functions as a sequence of if-then-return statements, and for each candidate, taking the first label emitted by this script as the training label. We refer to this as the if-then-return (ITR) approach, and note that it often required significant domain expert development time to tune (weeks or more). For this set of experiments, we then used the same labeling function sets within the framework of data programming. For all experiments, we evaluated on a blind hand-labeled evaluation set. In Table 1, we see that we achieve consistent improvements: on average by 2.34 points in F1 score, including what would have been a winning score on the 2014 TAC-KBP challenge [30]. We observed these performance gains across applications with very different labeling function sets. We describe the labeling function summary statistics—coverage is the percentage of objects that had at least one label, overlap is the percentage of objects with more than one label, and conflict is 2http://www.nist.gov/tac/2014/KBP/ 3https://github.com/HazyResearch/dd-genomics 7 the percentage of objects with conflicting labels—and see in Table 2 that even in scenarios where m is small, and conflict and overlap is relatively less common, we still realize performance gains. Additionally, on a disease mention extraction task (see Usability Study), which was written from scratch within the data programming paradigm, allowing developers to supply dependencies of the basic types outlined in Sec. 4 led to a 2.3 point F1 score boost. Application # of LFs Coverage |S λ,0| Overlap Conflict F1 Score Improvement HT LSTM KBP (News) 40 29.39 2.03M 1.38 0.15 1.92 3.12 Genomics 146 53.61 256K 26.71 2.05 1.59 0.47 Pharmacogenomics 7 7.70 129K 0.35 0.32 3.60 4.94 Diseases 12 53.32 418K 31.81 0.98 N/A N/A Table 2: Labeling function (LF) summary statistics, sizes of generated training sets S λ,0 (only counting non-zero labels), and relative F1 score improvement over baseline IRT methods for hand-tuned (HT) and LSTM-generated (LSTM) feature sets. Automatically-generated Features We additionally compare both hand-tuned and automaticallygenerated features, where the latter are learned via an LSTM recurrent neural network (RNN) [14]. Conventional wisdom states that deep learning methods such as RNNs are prone to overfitting to the biases of the imperfect rules used for programmatic supervision. In our experiments, however, we find that using data programming to denoise the labels can mitigate this issue, and we report a 9.79 point boost to precision and a 3.12 point F1 score improvement on the benchmark 2014 TAC-KBP (News) task, over the baseline if-then-return approach. Additionally for comparison, our approach is a 5.98 point F1 score improvement over a state-of-the-art LSTM approach [32]. Usability Study One of our hopes is that a user without expertise in ML will be more productive iterating on labeling functions than on features. To test this, we arranged a hackathon involving a handful of bioinformatics researchers, using our open-source information extraction framework Snorkel4 (formerly DDLite). Their goal was to build a disease tagging system which is a common and important challenge in the bioinformatics domain [11]. The hackathon participants did not have access to a labeled training set nor did they perform any feature engineering. The entire effort was restricted to iterative labeling function development and the setup of candidates to be classified. In under eight hours, they had created a training set that led to a model which scored within 10 points of F1 of the supervised baseline; the gap was mainly due to recall issue in the candidate extraction phase. This suggests data programming may be a promising way to build high quality extractors, quickly. 6 Conclusion and Future Work We introduced data programming, a new approach to generating large labeled training sets. We demonstrated that our approach can be used with automatic feature generation techniques to achieve high quality results. We also provided anecdotal evidence that our methods may be easier for domain experts to use. We hope to explore the limits of our approach on other machine learning tasks that have been held back by the lack of high-quality supervised datasets, including those in other domains such imaging and structured prediction. Acknowledgements Thanks to Theodoros Rekatsinas, Manas Joglekar, Henry Ehrenberg, Jason Fries, Percy Liang, the DeepDive and DDLite users and many others for their helpful conversations. The authors acknowledge the support of: DARPA FA8750-12-2-0335; NSF IIS-1247701; NSFCCF1111943; DOE 108845; NSF CCF-1337375; DARPA FA8750-13-2-0039; NSF IIS-1353606;ONR N000141210041 and N000141310129; NIH U54EB020405; DARPA’s SIMPLEX program; Oracle; NVIDIA; Huawei; SAP Labs; Sloan Research Fellowship; Moore Foundation; American Family Insurance; Google; and Toshiba. The views and conclusions expressed in this material are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA, AFRL, NSF, ONR, NIH, or the U.S. Government. 4snorkel.stanford.edu 8 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 ACL. [2] G. Angeli, S. Gupta, M. Jose, C. D. Manning, C. Ré, J. Tibshirani, J. Y. Wu, S. Wu, and C. Zhang. Stanford’s 2014 slot filling systems. TAC KBP, 695, 2014. [3] A. Balsubramani and Y. Freund. Scalable semi-supervised aggregation of classifiers. In Advances in Neural Information Processing Systems, pages 1351–1359, 2015. [4] D. Berend and A. Kontorovich. Consistency of weighted majority votes. In NIPS 2014. [5] 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. [6] J. Bootkrajang and A. Kabán. Label-noise robust logistic regression and its applications. In Machine Learning and Knowledge Discovery in Databases, pages 143–158. Springer, 2012. [7] R. Bunescu and R. Mooney. Learning to extract relations from the web using minimal supervision. In Annual meeting-association for Computational Linguistics, volume 45, page 576, 2007. [8] M. Craven, J. Kumlien, et al. Constructing biological knowledge bases by extracting information from text sources. In ISMB, volume 1999, pages 77–86, 1999. [9] N. Dalvi, A. Dasgupta, R. Kumar, and V. Rastogi. Aggregating crowdsourced binary ratings. In Proceedings of the 22Nd International Conference on World Wide Web, WWW ’13, pages 285–294, 2013. [10] A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the em algorithm. Applied statistics, pages 20–28, 1979. [11] R. I. Do˘gan and Z. Lu. An improved corpus of disease mentions in pubmed citations. In Proceedings of the 2012 workshop on biomedical natural language processing. [12] H. R. Ehrenberg, J. Shin, A. J. Ratner, J. A. Fries, and C. Ré. Data programming with ddlite: putting humans in a different part of the loop. In HILDA@ SIGMOD, page 13, 2016. [13] H. Gao, G. Barbier, R. Goolsby, and D. Zeng. Harnessing the crowdsourcing power of social media for disaster relief. Technical report, DTIC Document, 2011. [14] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [15] 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 ACL. [16] M. Joglekar, H. Garcia-Molina, and A. Parameswaran. Comprehensive and reliable crowd assessment algorithms. In Data Engineering (ICDE), 2015 IEEE 31st International Conference on. [17] D. R. Karger, S. Oh, and D. Shah. Iterative learning for reliable crowdsourcing systems. In Advances in neural information processing systems, pages 1953–1961, 2011. [18] 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. [19] M.-A. Krogel and T. Scheffer. Multi-relational learning, text mining, and semi-supervised learning for functional genomics. Machine Learning, 57(1-2):61–81, 2004. [20] G. Lugosi. Learning with an unreliable teacher. Pattern Recognition, 25(1):79 – 87, 1992. [21] E. K. Mallory, C. Zhang, C. Ré, and R. B. Altman. Large-scale extraction of gene interactions from full-text literature using deepdive. Bioinformatics, 2015. [22] 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, 2009. [23] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari. Learning with noisy labels. In Advances in Neural Information Processing Systems 26. [24] F. Parisi, F. Strino, B. Nadler, and Y. Kluger. Ranking and combining multiple predictors without labeled data. Proceedings of the National Academy of Sciences, 111(4):1253–1258, 2014. [25] S. Riedel, L. Yao, and A. McCallum. Modeling relations and their mentions without labeled text. In Machine Learning and Knowledge Discovery in Databases, pages 148–163. Springer, 2010. [26] B. Roth and D. Klakow. Feature-based models for improving the quality of noisy training data for relation extraction. In Proceedings of the 22nd ACM Conference on Knowledge management. [27] B. Roth and D. Klakow. Combining generative and discriminative model scores for distant supervision. In EMNLP, pages 24–29, 2013. [28] R. E. Schapire and Y. Freund. Boosting: Foundations and algorithms. MIT press, 2012. [29] 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. [30] M. Surdeanu and H. Ji. Overview of the english slot filling track at the tac2014 knowledge base population evaluation. In Proc. Text Analysis Conference (TAC2014), 2014. [31] S. Takamatsu, I. Sato, and H. Nakagawa. Reducing wrong labels in distant supervision for relation extraction. In Proceedings of the ACL. [32] P. Verga, D. Belanger, E. Strubell, B. Roth, and A. McCallum. Multilingual relation extraction using compositional universal schema. arXiv preprint arXiv:1511.06396, 2015. [33] Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. In Advances in Neural Information Processing Systems 27, pages 1260–1268. 2014. 9 | 2016 | 233 |
6,143 | Flexible Models for Microclustering with Application to Entity Resolution Giacomo Zanella∗ Department of Decision Sciences Bocconi University giacomo.zanella@unibocconi.it Brenda Betancourt∗ Department of Statistical Science Duke University bb222@stat.duke.edu Hanna Wallach Microsoft Research hanna@dirichlet.net Jeffrey Miller Department of Biostatistics Harvard University jwmiller@hsph.harvard.edu Abbas Zaidi Department of Statistical Science Duke University amz19@stat.duke.edu Rebecca C. Steorts Departments of Statistical Science and Computer Science Duke University beka@stat.duke.edu Abstract Most generative models for clustering implicitly assume that the number of data points in each cluster grows linearly with the total number of data points. Finite mixture models, Dirichlet process mixture models, and Pitman–Yor process mixture models make this assumption, as do all other infinitely exchangeable clustering models. However, for some applications, this assumption is inappropriate. For example, when performing entity resolution, the size of each cluster should be unrelated to the size of the data set, and each cluster should contain a negligible fraction of the total number of data points. These applications require models that yield clusters whose sizes grow sublinearly with the size of the data set. We address this requirement by defining the microclustering property and introducing a new class of models that can exhibit this property. We compare models within this class to two commonly used clustering models using four entity-resolution data sets. 1 Introduction Many clustering applications require models that assume cluster sizes grow linearly with the size of the data set. These applications include topic modeling, inferring population structure, and discriminating among cancer subtypes. Infinitely exchangeable clustering models, including finite mixture models, Dirichlet process mixture models, and Pitman–Yor process mixture models, all make this lineargrowth assumption, and have seen numerous successes when used in these contexts. For other clustering applications, such as entity resolution, this assumption is inappropriate. Entity resolution (including record linkage and de-duplication) involves identifying duplicate2 records in noisy databases [1, 2], traditionally by directly linking records to one another. Unfortunately, this traditional approach is computationally infeasible for large data sets—a serious limitation in “the age of big data” [1, 3]. As a ∗Giacomo Zanella and Brenda Betancourt are joint first authors. 2In the entity resolution literature, the term “duplicate records” does not mean that the records are identical, but rather that the records are corrupted, degraded, or otherwise noisy representations of the same entity. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. result, researchers increasingly treat entity resolution as a clustering problem, where each entity is implicitly associated with one or more records and the inference goal is to recover the latent entities (clusters) that correspond to the observed records (data points) [4, 5, 6]. In contrast to other clustering applications, the number of data points in each cluster should remain small, even for large data sets. Applications like this require models that yield clusters whose sizes grow sublinearly with the total number of data points [7]. To address this requirement, we define the microclustering property in section 2 and, in section 3, introduce a new class of models that can exhibit this property. In section 4, we compare two models within this class to two commonly used infinitely exchangeable clustering models. 2 The Microclustering Property To cluster N data points x1, . . . , xN using a partition-based Bayesian clustering model, one first places a prior over partitions of [N] = {1, . . . , N}. Then, given a partition CN of [N], one models the data points in each part c ∈CN as jointly distributed according to some chosen distribution. Finally, one computes the posterior distribution over partitions and, e.g., uses it to identify probable partitions of [N]. Mixture models are a well-known type of partition-based Bayesian clustering model, in which CN is implicitly represented by a set of cluster assignments z1, . . . , zN. These cluster assignments can be regarded as the first N elements of an infinite sequence z1, z2, . . ., drawn a priori from π ∼H and z1, z2, . . . | π iid∼π, (1) where H is a prior over π and π is a vector of mixture weights with P l πl = 1 and πl ≥0 for all l. Commonly used mixture models include (a) finite mixtures where the dimensionality of π is fixed and H is usually a Dirichlet distribution; (b) finite mixtures where the dimensionality of π is a random variable [8, 9]; (c) Dirichlet process (DP) mixtures where the dimensionality of π is infinite [10]; and (d) Pitman–Yor process (PYP) mixtures, which generalize DP mixtures [11]. Equation 1 implicitly defines a prior over partitions of N = {1, 2, . . .}. Any random partition CN of N induces a sequence of random partitions (CN : N = 1, 2, . . .), where CN is a partition of [N]. Via the strong law of large numbers, the cluster sizes in any such sequence obtained via equation 1 grow linearly with N because, with probability one, for all l, 1 N PN n=1 I(zn =l) →πl as N →∞, where I(·) denotes the indicator function. Unfortunately, this linear growth assumption is not appropriate for entity resolution and other applications that require clusters whose sizes grow sublinearly with N. To address this requirement, we therefore define the microclustering property: A sequence of random partitions (CN : N = 1, 2, . . .) exhibits the microclustering property if MN is op(N), where MN is the size of the largest cluster in CN, or, equivalently, if MN / N →0 in probability as N →∞. A clustering model exhibits the microclustering property if the sequence of random partitions implied by that model satisfies the above definition. No mixture model can exhibit the microclustering property (unless its parameters are allowed to vary with N). In fact, Kingman’s paintbox theorem [12, 13] implies that any exchangeable partition of N, such as a partition obtained using equation 1, is either equal to the trivial partition in which each part contains one element or satisfies lim infN→∞MN / N > 0 with positive probability. By Kolmogorov’s extension theorem, a sequence of random partitions (CN : N = 1, 2, . . .) corresponds to an exchangeable random partition of N whenever (a) each CN is finitely exchangeable (i.e., its probability is invariant under permutations of {1, . . . , N}) and (b) the sequence is projective (also known as consistent in distribution)—i.e., if N ′ <N, the distribution over CN ′ coincides with the marginal distribution over partitions of [N ′] induced by the distribution over CN. Therefore, to obtain a nontrivial model that exhibits the microclustering property, we must sacrifice either (a) or (b). Previous work [14] sacrificed (a); in this paper, we instead sacrifice (b). Sacrificing finite exchangeability and sacrificing projectivity have very different consequences. If a partition-based Bayesian clustering model is not finitely exchangeable, then inference will depend on the order of the data points. For most applications, this consequence is undesirable—there is no reason to believe that the order of the data points is meaningful. In contrast, if a model lacks projectivity, then the implied joint distribution over a subset of the data points in a data set will not be the same as the joint distribution obtained by modeling the subset directly. In the context of entity resolution, sacrificing projectivity is a more natural and less restrictive choice than sacrificing finite exchangeability. 2 3 Kolchin Partition Models for Microclustering We introduce a new class of Bayesian models for microclustering by placing a prior on the number of clusters K and, given K, modeling the cluster sizes N1, . . . , NK directly. We start by defining K ∼κ and N1, . . . , NK | K iid∼µ, (2) where κ = (κ1, κ2, . . . ) and µ = (µ1, µ2, . . . ) are probability distributions over N = {1, 2, . . .}. We then define N = PK k=1 Nk and, given N1, . . . , NK, generate a set of cluster assignments z1, . . . , zN by drawing a vector uniformly at random from the set of permutations of (1, . . . , 1 | {z } N1 times , 2, . . . , 2 | {z } N2 times , . . . . . . , K, . . . , K | {z } NK times ). The cluster assignments z1, . . . , zN induce a random partition CN of [N], where N is itself a random variable—i.e., CN is a random partition of a random number of elements. We refer to the resulting class of marginal distributions over CN as Kolchin partition (KP) models [15, 16] because the form of equation 2 is closely related to Kolchin’s representation theorem for Gibbs-type partitions (see, e.g., 16, theorem 1.2). For appropriate choices of κ and µ, KP models can exhibit the microclustering property (see appendix B for an example). If CN denotes the set of all possible partitions of [N], then S∞ N=1 CN is the set of all possible partitions of [N] for all N ∈N. The probability of any given partition CN ∈S∞ N=1 CN is P(CN) = |CN|! κ|CN| N! Y c∈CN |c|! µ|c| ! , (3) where | · | denotes the cardinality of a set, |CN| is the number of clusters in CN, and |c| is the number of elements in cluster c. In practice, however, N is usually observed. Conditioned on N, a KP model implies that P(CN | N) ∝|CN|! κ|CN| Q c∈CN |c|! µ|c| . Equation 3 leads to a “reseating algorithm”—much like the Chinese restaurant process (CRP)—derived by sampling from P(CN | N, CN \n), where CN \n is the partition obtained by removing element n from CN: • for n = 1, . . . , N, reassign element n to – an existing cluster c ∈CN \n with probability ∝(|c| + 1) µ(|c|+1) µ|c| – or a new cluster with probability ∝(|CN \n| + 1) κ(|CN\n|+1) κ|CN\n| µ1. We can use this reseating algorithm to draw samples from P(CN | N); however, unlike the CRP, it does not produce an exact sample if it is used to incrementally construct a partition from the empty set. In practice, this limitation does not lead to any negative consequences because standard posterior inference sampling methods do not rely on this property. When a KP model is used as the prior in a partition-based clustering model—e.g., as an alternative to equation 1—the resulting Gibbs sampling algorithm for CN is similar to this reseating algorithm, but accompanied by likelihood terms. Unfortunately, this algorithm is slow for large data sets. In appendix C, we therefore propose a faster Gibbs sampling algorithm—the chaperones algorithm—that is particularly well suited to microclustering. In sections 3.1 and 3.2, we introduce two related KP models for microclustering, and in section 3.4 we explain how KP models can be applied in the context of entity resolution with categorical data. 3.1 The NBNB Model We start with equation 3 and define κ = NegBin (a, q) and µ = NegBin (r, p) , (4) where NegBin(a, q) and NegBin(r, p) are negative binomial distributions truncated to N = {1, 2, . . . }. We assume that a > 0 and q ∈(0, 1) are fixed hyperparameters, while r and p are distributed as r ∼Gam(ηr, sr) and p ∼Beta(up, vp) for fixed ηr, sr, up and vp.3 We refer to the resulting marginal distribution over CN as the negative binomial–negative binomial (NBNB) model. 3We use the shape-and-rate parameterization of the gamma distribution. 3 5 6 7 8 9 −6 −4 log(N) log(M N / N) 5 6 7 8 9 −6 −4 −2 log(N) log(M N / N) Figure 1: The NBNB (left) and NBD (right) models appear to exhibit the microclustering property. By substituting equation 4 into equation 3, we obtain the probability of CN conditioned N: P(CN | N, a, q, r, p) ∝Γ (|CN| + a) β|CN| Y c∈CN Γ (|c| + r) Γ (r) , (5) where β = q (1−p)r 1−(1−p)r . We provide the complete derivation of equation 5, along with the conditional posterior distributions over r and p, in appendix A.2. Posterior inference for the NBNB model involves alternating between (a) sampling CN from P(CN | N, a, q, r, p) using the chaperones algorithm and (b) sampling r and p from their respective conditional posteriors using, e.g., slice sampling [17]. 3.2 The NBD Model Although κ = NegBin (a, q) will yield plausible values of K, µ = NegBin (r, p) may not be sufficiently flexible to capture realistic properties of N1, . . . , NK, especially when K is large. For example, in a record-linkage application involving two otherwise noise-free databases containing thousands of records, K will be large and each Nk will be at most two. A negative binomial distribution cannot capture this property. We therefore define a second KP model—the negative binomial–Dirichlet (NBD) model—by taking a nonparametric approach to modeling N1, . . . , NK and drawing µ from an infinite-dimensional Dirichlet distribution over the positive integers: κ = NegBin (a, q) and µ | α, µ(0) ∼Dir α, µ(0) , (6) where α > 0 is a fixed concentration parameter and µ(0) = (µ(0) 1 , µ(0) 2 , · · · ) is a fixed base measure with P∞ m=1 µ(0) m = 1 and µ(0) m ≥0 for all m. The probability of CN conditioned on N and µ is P(CN | N, a, q, µ) ∝Γ (|CN| + a) q|CN| Y c∈CN |c|! µ|c|. (7) Posterior inference for the NBD model involves alternating between (a) sampling CN from P(CN | N, a, q, µ) using the chaperones algorithm and (b) sampling µ from its conditional posterior: µ | CN, α, µ(0) ∼Dir α µ(0) 1 + L1, α µ(0) 2 + L2, . . . , (8) where Lm is the number of clusters of size m in CN. Although µ is an infinite-dimensional vector, only the first N elements affect P(CN | a, q, µ). Therefore, it is sufficient to sample the (N + 1)-dimensional vector (µ1, . . . , µN, 1 −PN m=1 µm) from equation 8, modified accordingly, and retain only µ1, . . . , µN. We provide complete derivations of equations 7 and 8 in appendix A.3. 3.3 The Microclustering Property for the NBNB and NBD Models Figure 1 contains empirical evidence suggesting that the NBNB and NBD models both exhibit the microclustering property. For each model, we generated samples of MN / N for N = 100, . . . , 104. For the NBNB model, we set a = 1, q = 0.5, r = 1, and p = 0.5 and generated the samples using rejection sampling. For the NBD model, we set a = 1, q = 0.5, and α = 1 and set µ(0) to be a geometric distribution over N = {1, 2, . . .} with a parameter of 0.5. We generated the samples using MCMC methods. For both models, MN / N appears to converge to zero in probability as N →∞, as desired. In appendix B, we also prove that a variant of the NBNB model exhibits the microclustering property. 4 3.4 Application to Entity Resolution KP models can be used to perform entity resolution. In this context, the data points x1, . . . , xN are observed records and the K clusters are latent entities. If each record consists of F categorical fields, then CN ∼KP model (9) θfk | δf, γf ∼Dir δf, γf (10) zn ∼ζ(CN, n) (11) xfn | zn, θf1, . . . , θfK ∼Cat (θfzn) (12) for f = 1, . . . , F, k = 1, . . . , K, and n = 1, . . . , N, where ζ(CN, n) maps the nth record to a latent cluster assignment zn according to CN. We assume that δf > 0 is distributed as δf ∼Gam (1, 1), while γf is fixed. Via Dirichlet–multinomial conjugacy, we can marginalize over θ11, . . . , θF K to obtain a closed-form expression for P(x1, . . . , xN | z1, . . . , zN, δf, γf). Posterior inference involves alternating between (a) sampling CN from P(CN | x1, . . . , xN, δf) using the chaperones algorithm accompanied by appropriate likelihood terms, (b) sampling the parameters of the KP model from their conditional posteriors, and (c) sampling δf from its conditional posterior using slice sampling. 4 Experiments In this section, we compare two entity resolution models based on the NBNB model and the NBD model to two similar models based on the DP mixture model [10] and the PYP mixture model [11]. All four models use the likelihood in equations 10 and 12. For the NBNB model and the NBD model, we set a and q to reflect a weakly informative prior belief that E[K] = p Var[K] = N 2 . For the NBNB model, we set ηr = sr = 1 and up = vp = 2.4 For the NBD model, we set α = 1 and set µ(0) to be a geometric distribution over N = {1, 2, . . .} with a parameter of 0.5. This base measure reflects a prior belief that E[Nk] = 2. Finally, to ensure a fair comparison between the two different classes of model, we set the DP and PYP concentration parameters to reflect a prior belief that E[K] = N 2 . We assess how well each model “fits” four data sets typical of those arising in real-world entity resolution applications. For each data set, we consider four statistics: (a) the number of singleton clusters, (b) the maximum cluster size, (c) the mean cluster size, and (d) the 90th percentile of cluster sizes. We compare each statistic’s true value to its posterior distribution according to each of the models. For each model and data set combination, we also consider five entity-resolution summary statistics: (a) the posterior expected number of clusters, (b) the posterior standard error, (c) the false negative rate, (d) the false discovery rate, and (e) the posterior expected value of δf = δ for f = 1, . . . , F. The false negative and false discovery rates are both invariant under permutations of 1, . . . , K [5, 18]. 4.1 Data Sets We constructed four realistic data sets, each consisting of N records associated with K entities. Italy: We derived this data set from the Survey on Household Income and Wealth, conducted by the Bank of Italy every two years. There are nine categorical fields, including year of birth, employment status, and highest level of education attained. Ground truth is available via unique identifiers based upon social security numbers; roughly 74% of the clusters are singletons. We used the 2008 and 2010 databases from the Fruili region to create a record-linkage data set consisting of N = 789 records; each Nk is at most two. We discarded the records themselves, but preserved the number of fields, the empirical distribution of categories for each field, the number of clusters, and the cluster sizes. We then generated synthetic records using equations 10 and 12. We created three variants of this data set, corresponding to δ = 0.02, 0.05, 0.1. For all three, we used the empirical distribution of categories for field f as γf. By generating synthetic records in this fashion, we preserve the pertinent characteristics of the original data, while making it easy to isolate the impacts of the different priors over partitions. NLTCS5000: We derived this data set from the National Long Term Care Survey (NLTCS)5—a longitudinal survey of older Americans, conducted roughly every six years. We used four of the 4We used p ∼Beta (2, 2) because a uniform prior implies an unrealistic prior belief that E[Nk] = ∞. 5http://www.nltcs.aas.duke.edu/ 5 available fields: date of birth, sex, state of residence, and regional office. We split date of birth into three separate fields: day, month, and year. Ground truth is available via social security numbers; roughly 68% of the clusters are singletons. We used the 1982, 1989, and 1994 databases and down-sampled the records, preserving the proportion of clusters of each size and the maximum cluster size, to create a record-linkage data set of N = 5, 000 records; each Nk is at most three. We then generated synthetic records using the same approach that we used to create the Italy data set. Syria2000 and SyriaSizes: We constructed these data sets from data collected by four human-rights groups between 2011 and 2014 on people killed in the Syrian conflict [19, 20]. Hand-matched ground truth is available from the Human Rights Data Analysis Group. Because the records were hand matched, the data are noisy and potentially biased. Performing entity resolution is non-trivial because there are only three categorical fields: gender, governorate, and date of death. We split date of death, which is present for most records, into three separate fields: day, month, and year. However, because the records only span four years, the year field conveys little information. In addition, most records are male, and there are only fourteen governorates. We created the Syria2000 data set by down-sampling the records, preserving the proportion of clusters of each size, to create a data set of N = 2, 000 records; the maximum cluster size is five. We created the SyriaSizes data set by down-sampling the records, preserving some of the larger clusters (which necessarily contain withindatabase duplications), to create a data set of N = 6, 700 records; the maximum cluster size is ten. We provide the empirical distribution over cluster sizes for each data set in appendix D. We generated synthetic records for both data sets using the same approach that we used to create the Italy data set. 4.2 Results We report the results of our experiments in table 1 and figure 2. The NBNB and NBD models outperformed the DP and PYP models for almost all variants of the Italy and NLTCS5000 data sets. In general, the NBD model performed the best of the four, and the differences between the models’ performance grew as the value of δ increased. For the Syria2000 and SyriaSizes data sets, we see no consistent pattern to the models’ abilities to recover the true values of the data-set statistics. Moreover, all four models had poor false negative rates, and false discovery rates—most likely because these data sets are extremely noisy and contain very few fields. We suspect that no entity resolution model would perform well for these data sets. For three of the four data sets, the exception being the Syria2000 data set, the DP model and the PYP model both greatly overestimated the number of clusters for larger values of δ. Taken together, these results suggest that the flexibility of the NBNB and NBD models make them more appropriate choices for most entity resolution applications. 5 Summary Infinitely exchangeable clustering models assume that cluster sizes grow linearly with the size of the data set. Although this assumption is reasonable for some applications, it is inappropriate for others. For example, when entity resolution is treated as a clustering problem, the number of data points in each cluster should remain small, even for large data sets. Applications like this require models that yield clusters whose sizes grow sublinearly with the size of the data set. We introduced the microclustering property as one way to characterize models that address this requirement. We then introduced a highly flexible class of models—KP models—that can exhibit this property. We presented two models within this class—the NBNB model and the NBD model—and showed that they are better suited to entity resolution applications than two infinitely exchangeable clustering models. We therefore recommend KP models for applications where the size of each cluster should be unrelated to the size of the data set, and each cluster should contain a negligible fraction of the total number of data points. Acknowledgments We thank Tamara Broderick, David Dunson, Merlise Clyde, and Abel Rodriguez for conversations that helped form the ideas in this paper. In particular, Tamara Broderick played a key role in developing the idea of microclustering. We also thank the Human Rights Data Analysis Group for providing us with data. This work was supported in part by NSF grants SBE-0965436, DMS-1045153, and IIS-1320219; NIH grant 5R01ES017436-05; the John Templeton Foundation; the Foerster-Bernstein Postdoctoral Fellowship; the UMass Amherst CIIR; and an EPSRC Doctoral Prize Fellowship. 6 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 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 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 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 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 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 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 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 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 G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 350 400 450 500 Singleton Clusters 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 2 3 4 5 6 7 8 Maximum Cluster Size 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 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 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 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 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 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 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 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 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 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 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 G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.25 1.30 1.35 1.40 Mean Cluster Size DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.5 2.0 2.5 90th Percentile of Cluster Sizes (a) Italy: NBD model > NBNB model > PYP mixture model > DP mixture model. 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 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 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 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 G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1600 1700 1800 Singleton Clusters 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 DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 3 4 5 6 7 8 9 Maximum Cluster Size 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 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 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 DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.58 1.60 1.62 1.64 1.66 1.68 1.70 Mean Cluster Size DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 2.0 2.5 3.0 3.5 4.0 90th Percentile of Cluster Sizes (b) NLTCS5000: NBD model > NBNB model > PYP mixture model > DP mixture model. 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 G G G G G G G G G G G G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1000 1200 1400 1600 Singleton Clusters 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 2 4 6 8 10 Maximum Cluster Size 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.10 1.15 1.20 1.25 1.30 1.35 Mean Cluster Size 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 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 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 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 G G G G G G G G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.0 1.2 1.4 1.6 1.8 2.0 90th Percentile of Cluster Sizes (c) Syria2000: the models perform similarly because there are so few fields. 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 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 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 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 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 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 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 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 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 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 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 G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 2000 2500 3000 Singleton Clusters 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 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 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 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 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 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 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 G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 6 8 10 12 14 16 18 Maximum Cluster Size 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 1.4 1.5 1.6 1.7 1.8 Mean Cluster Size 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 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 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 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 G G G G G G G G G G DP(0.02) PYP(0.02) NBNB(0.02) NDB(0.02) DP(0.05) PYP(0.05) NBNB(0.05) NDB(0.05) DP(0.1) PYP(0.1) NBNB(0.1) NDB(0.1) 2.0 2.2 2.4 2.6 2.8 3.0 90th Percentile of Cluster Sizes (d) SyriaSizes: the models perform similarly because there are so few fields. Figure 2: Box plots depicting the true value (dashed line) of each data-set statistic for each variant of each data set, as well as its posterior distribution according to each of the four entity resolution models. 7 Table 1: Entity-resolution summary statistics—the posterior expected number of clusters, the posterior standard error, the false negative rate (lower is better), the false discovery rate (lower is better), and the posterior expected value of δ—for each variant of each data set and each of the four models. Data Set True K Variant Model E[K] Std. Err. FNR FDR E[δ] Italy 587 δ = 0.02 DP 594.00 4.51 0.07 0.03 0.02 PYP 593.90 4.52 0.07 0.03 0.02 NBNB 591.00 4.43 0.04 0.03 0.02 NBD 590.50 3.64 0.03 0.00 0.02 δ = 0.05 DP 601.60 5.89 0.13 0.03 0.03 PYP 601.50 5.90 0.13 0.03 0.04 NBNB 596.40 5.79 0.11 0.04 0.04 NBD 592.60 5.20 0.09 0.04 0.04 δ = 0.1 DP 617.40 7.23 0.27 0.06 0.07 PYP 617.40 7.22 0.27 0.05 0.07 NBNB 610.90 7.81 0.24 0.06 0.08 NBD 596.60 9.37 0.18 0.05 0.10 NLTCS5000 3,061 δ = 0.02 DP 3021.70 24.96 0.02 0.11 0.03 PYP 3018.70 25.69 0.03 0.11 0.03 NBNB 3037.80 25.18 0.02 0.07 0.02 NBD 3028.20 5.65 0.01 0.09 0.03 δ = 0.05 DP 3024.00 26.15 0.05 0.13 0.06 PYP 3045.80 23.66 0.05 0.10 0.05 NBNB 3040.90 24.86 0.04 0.06 0.05 NBD 3039.30 10.17 0.03 0.07 0.06 δ = 0.1 DP 3130.50 21.44 0.12 0.09 0.10 PYP 3115.10 25.73 0.13 0.10 0.10 NBNB 3067.30 25.31 0.11 0.08 0.11 NBD 3049.10 16.48 0.09 0.08 0.12 Syria2000 1,725 δ = 0.02 DP 1695.20 25.40 0.70 0.27 0.07 PYP 1719.70 36.10 0.71 0.26 0.04 NBNB 1726.80 27.96 0.70 0.28 0.05 NBD 1715.20 51.56 0.67 0.28 0.02 δ = 0.05 DP 1701.80 31.15 0.77 0.31 0.07 PYP 1742.90 24.33 0.75 0.32 0.04 NBNB 1738.30 25.48 0.74 0.31 0.04 NBD 1711.40 47.10 0.69 0.32 0.03 δ = 0.1 DP 1678.10 40.56 0.81 0.19 0.18 PYP 1761.20 39.38 0.81 0.22 0.08 NBNB 1779.40 29.84 0.77 0.26 0.04 NBD 1757.30 73.60 0.74 0.25 0.03 SyriaSizes 4,075 δ = 0.02 DP 4175.70 66.04 0.65 0.17 0.01 PYP 4234.30 68.55 0.64 0.19 0.01 NBNB 4108.70 70.56 0.65 0.19 0.01 NBD 3979.50 70.85 0.68 0.20 0.03 δ = 0.05 DP 4260.00 77.18 0.71 0.21 0.02 PYP 4139.10 104.22 0.75 0.18 0.04 NBNB 4047.10 55.18 0.73 0.20 0.04 NBD 3863.90 68.05 0.75 0.22 0.07 δ = 0.1 DP 4507.40 82.27 0.80 0.19 0.03 PYP 4540.30 100.53 0.80 0.20 0.03 NBNB 4400.60 111.91 0.80 0.23 0.03 NBD 4251.90 203.23 0.82 0.25 0.04 8 References [1] P. Christen. Data Matching: Concepts and Techniques for Record Linkage, Entity Resolution, and Duplicate Detection. Springer, 2012. [2] P. Christen. A survey of indexing techniques for scalable record linkage and deduplication. IEEE Transactions on Knowledge and Data Engineering, 24(9), 2012. [3] W. E. Winkler. Overview of record linkage and current research directions. Technical report, U.S. Bureau of the Census Statistical Research Division, 2006. [4] R. C. Steorts, R. Hall, and S. E. Fienberg. A Bayesian approach to graphical record linkage and de-duplication. Journal of the American Statistical Society, In press. [5] R. C. Steorts. Entity resolution with empirically motivated priors. Bayesian Analysis, 10(4):849– 875, 2015. [6] R. C. Steorts, R. Hall, and S. E. Fienberg. SMERED: A Bayesian approach to graphical record linkage and de-duplication. Journal of Machine Learning Research, 33:922–930, 2014. [7] T. Broderick and R. C. Steorts. Variational bayes for merging noisy databases. In NIPS 2014 Workshop on Advances in Variational Inference, 2014. arXiv:1410.4792. [8] S. Richardson and P. J. Green. On Bayesian analysis of mixtures with an unknown number of components. Journal of the Royal Statistical Society Series B, pages 731–792, 1997. [9] J. W. Miller and M. T. Harrison. Mixture models with a prior on the number of components. arXiv:1502.06241, 2015. [10] J. Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [11] H. Ishwaran and L. F. James. Generalized weighted Chinese restaurant processes for species sampling mixture models. Statistica Sinica, 13(4):1211–1236, 2003. [12] J. F. .C Kingman. The representation of partition structures. Journal of the London Mathematical Society, 2(2):374–380, 1978. [13] D. Aldous. Exchangeability and related topics. École d’Été de Probabilités de Saint-Flour XIII—1983, pages 1–198, 1985. [14] H. M. Wallach, S. Jensen, L. Dicker, and K. A. Heller. An alternative prior process for nonparametric Bayesian clustering. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics, 2010. [15] V. F. Kolchin. A problem of the allocation of particles in cells and cycles of random permutations. Theory of Probability & Its Applications, 16(1):74–90, 1971. [16] J. Pitman. Combinatorial stochastic processes. École d’Été de Probabilités de Saint-Flour XXXII—2002, 2006. [17] R. M. Neal. Slice sampling. Annals of Statistics, 31:705–767, 2003. [18] R. C. Steorts, S. L. Ventura, M. Sadinle, and S. E. Fienberg. A comparison of blocking methods for record linkage. In International Conference on Privacy in Statistical Databases, pages 253–268, 2014. [19] M. Price, J. Klingner, A. Qtiesh, and P. Ball. Updated statistical analysis of documentation of killings in the Syrian Arab Republic, 2013. United Nations Office of the UN High Commissioner for Human Rights. [20] M. Price, J. Klingner, A. Qtiesh, and P. Ball. Updated statistical analysis of documentation of killings in the Syrian Arab Republic. Human Rights Data Analysis Group, Geneva, 2014. 9 | 2016 | 234 |
6,144 | Blind Regression: Nonparametric Regression for Latent Variable Models via Collaborative Filtering Christina E. Lee Yihua Li Devavrat Shah Dogyoon Song Laboratory for Information and Decision Systems Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology {celee, liyihua, devavrat, dgsong}@mit.edu Abstract We introduce the framework of blind regression motivated by matrix completion for recommendation systems: given m users, n movies, and a subset of user-movie ratings, the goal is to predict the unobserved user-movie ratings given the data, i.e., to complete the partially observed matrix. Following the framework of nonparametric statistics, we posit that user u and movie i have features x1(u) and x2(i) respectively, and their corresponding rating y(u, i) is a noisy measurement of f(x1(u), x2(i)) for some unknown function f. In contrast with classical regression, the features x = (x1(u), x2(i)) are not observed, making it challenging to apply standard regression methods to predict the unobserved ratings. Inspired by the classical Taylor’s expansion for differentiable functions, we provide a prediction algorithm that is consistent for all Lipschitz functions. In fact, the analysis through our framework naturally leads to a variant of collaborative filtering, shedding insight into the widespread success of collaborative filtering in practice. Assuming each entry is sampled independently with probability at least max(m−1+δ, n−1/2+δ) with δ > 0, we prove that the expected fraction of our estimates with error greater than ϵ is less than γ2/ϵ2 plus a polynomially decaying term, where γ2 is the variance of the additive entry-wise noise term. Experiments with the MovieLens and Netflix datasets suggest that our algorithm provides principled improvements over basic collaborative filtering and is competitive with matrix factorization methods. 1 Introduction In this paper, we provide a statistical framework for performing nonparametric regression over latent variable models. We are initially motivated by the problem of matrix completion arising in the context of designing recommendation systems. In the popularized setting of Netflix, there are m users, indexed by u ∈[m], and n movies, indexed by i ∈[n]. Each user u has a rating for each movie i, denoted as y(u, i). The system observes ratings for only a small fraction of user-movie pairs. The goal is to predict ratings for the rest of the unknown user-movie pairs, i.e., to complete the partially observed m × n rating matrix. To be able to obtain meaningful predictions from the partially observed matrix, it is essential to impose a structure on the data. We assume each user u and movie i is associated to features x1(u) ∈X1 and x2(i) ∈X2 for some compact metric spaces X1, X2 equipped with Borel probability measures. Following the philosophy of non-parametric statistics, we assume that there exists some function f : X1 × X2 →R such that the rating of user u for movie i is given by y(u, i) = f(x1(u), x2(i)) + ηui, (1) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. where ηui is some independent bounded noise. We observe ratings for a subset of the user-movie pairs, and the goal is to use the given data to predict f(x1(u), x2(i)) for all (u, i) ∈[m] × [n] whose rating is unknown. In classical nonparametric regression, we observe input features x1(u), x2(i) along with the rating y(u, i) for each datapoint, and thus we can approximate the function f well using local approximation techniques as long as f satisfies mild regularity conditions. However, in our setting, we do not observe the latent features x1(u), x2(i), but instead we only observe the indices (u, i). Therefore, we use blind regression to refer to the challenge of performing regression with unobserved latent input variables. This paper addresses the question, does there exist a meaningful prediction algorithm for general nonparametric regression when the input features are unobserved? Related Literature. Matrix completion has received enormous attention in the past decade. Matrix factorization based approaches, such as low-rank approximation, and neighborhood based approaches, such as collaborative filtering, have been the primary ways to address the problem. In the recent years, there has been exciting intellectual development in the context of matrix factorization based approaches. Since any matrix can be factorized, its entries can be described by a function f in (1) with the form f(x1, x2) = xT 1 x2, and the goal of factorization is to recover the latent features for each row and column. [25] was one of the earlier works to suggest the use of low-rank matrix approximation, observing that a low-rank matrix has a comparatively small number of free parameters. Subsequently, statistically efficient approaches were suggested using optimization based estimators, proving that matrix factorization can fill in the missing entries with sample complexity as low as rn log n, where r is the rank of the matrix [5, 23, 11, 21, 10]. There has been an exciting line of ongoing work to make the resulting algorithms faster and scalable [7, 17, 4, 15, 24, 20]. Many of these approaches are based on the structural assumption that the underlying matrix is low-rank and the matrix entries are reasonably “incoherent”. Unfortunately, the low-rank assumption may not hold in practice. The recent work [8] makes precisely this observation, showing that a simple non-linear, monotonic transformation of a low-rank matrix could easily produce an effectively highrank matrix, despite few free model parameters. They provide an algorithm and analysis specific to the form of their model, which achieves sample complexity of O((mn)2/3). However, their algorithm only applies to functions f which are a nonlinear monotonic transformation of the inner product of the latent features. [6] proposes the universal singular value thresholding estimator (USVT), and they provide an analysis under a similar model in which they assume f to be a bounded Lipschitz function. They achieve a sample complexity, or the required fraction of measurements over the total mn entries, which scales with the latent space dimension q according to Ω m−2/(q+2) for a square matrix, whereas we achieve a sample complexity of Ω(m−1/2+δ) (which is independent of q) as long as the latent dimension scales as o(log n). The term collaborative filtering was coined in [9], and this technique is widely used in practice due to its simplicity and ability to scale. There are two main paradigms in neighborhood-based collaborative filtering: the user-user paradigm and the item-item paradigm. To recommend items to a user in the user-user paradigm, one first looks for similar users, and then recommends items liked by those similar users. In the item-item paradigm, in contrast, items similar to those liked by the user are found and subsequently recommended. Much empirical evidence exists that the item-item paradigm performs well in many cases [16, 14, 22], however the theoretical understanding of the method has been limited. In recent works, Latent mixture models or cluster models have been introduced to explain the collaborative filtering algorithm as well as the empirically observed superior performance of item-item paradigms, c.f. [12, 13, 1, 2, 3]. However, these results assume a specific parametric model, such as a mixture distribution model for preferences across users and movies. We hope that by providing an analysis for collaborative filtering within our broader nonparametric model, we can provide a more complete understanding of the potentials and limitations of collaborative filtering. The algorithm that we propose in this work is inspired by local functional approximations, specifically Taylor’s approximation and classical kernel regression, which also relies on local smoothed approximations, c.f. [18, 26]. However, since kernel regression and other similar methods use explicit knowledge of the input features, their analysis and proof techniques do not extend to our context of Blind regression, in which the features are latent. Although our estimator takes a similar form of computing a convex combination of nearby datapoints weighted according to a function of the latent distance, the analysis required is entirely different. 2 Contributions. The key contribution of our work is in providing a statistical framework for nonparametric regression over latent variable models. We refrain from any specific modeling assumptions on f, keeping mild regularity conditions aligned with the philosophy of non-parametric statistics. We assume that the latent features are drawn independently from an identical distribution (IID) over bounded metric spaces; the function f is Lipschitz with respect to the latent spaces; entries are observed independently with some probability p; and the additive noise in observations is independently distributed with zero mean and bounded support. In spite of the minimal assumptions of our model, we provide a consistent matrix completion algorithm with finite sample error bounds. Furthermore, as a coincidental by-product, we find that our framework provides an explanation of the practical mystery of “why collaborative filtering algorithms work well in practice”. There are two conceptual parts to our algorithm. First, we derive an estimate of f(x1(u), x2(i)) for an unobserved index pair (u, i) by using first order local Taylor approximation expanded around the points corresponding to (u, i′), (u′, i), and (u′, i′). This leads to estimation that ˆy(u, i) ≡y(u′, i) + y(u, i′) −y(u′, i′) ≈f(x1(u), x2(i)), (2) as long as x1(u′) is close to x1(u) or x2(i′) is close to x2(i). In kernel regression, distances between input features are used to upper bound the error of individual estimates, but since the latent features are not observed, we need another method to determine which of these estimates are reliable. Secondly, under mild regularity conditions, we upper bound the squared error of the estimate in (2) by the the variance of the squared difference between commonly observed entries in rows (u, v) or columns (i, j). We empirically estimate this quantity and use it similarly to distance in the latent space in order to appropriately weight individual estimates to a final prediction. If we choose only the datapoints with minimum empirical row variance, we recover user-user nearest neighbor collaborative filtering. Inspired by kernel regression, we also propose using computing the weights according to a Gaussian kernel applied to the minimum of the row or column sample variances. As the main technical result, we show that the user-user nearest neighbor variant of collaborative filtering method with our similarity metric yields a consistent estimator for any Lipschitz function as long as we observe max(m−1+δ, n−1/2+δ) fraction of the matrix with δ > 0. In the process, we obtain finite sample error bounds, whose details are stated in Theorem 1. We compared the Gaussian kernel variant of our algorithm to classic collaborative filtering algorithms and a matrix factorization based approach (softImpute) on predicting user-movie ratings for the Netflix and MovieLens datasets. Experiments suggest that our method improves over existing collaborative filtering methods, and sometimes outperforms matrix-factorization-based approaches depending on the dataset. 2 Setup Operating assumptions. There are m users and n movies. The rating of user u ∈[m] for movie i ∈[n] is given by (1), taking the form y(u, i) = f (x1(u), x2(i)) + ηu,i. We make the following assumptions. (a) X1 and X2 are compact metric spaces endowed with metric dX1 and dX2 respectively: dX1(x1, x′ 1) ≤BX , ∀x1, x′ 1 ∈X1, and dX2(x2, x′ 2) ≤BX , ∀x2, x′ 2 ∈X2. (3) (b) f : X1 × X2 →R is L−Lipschitz with respect to ∞-product metric: |f(x1, x2) −f(x′ 1, x′ 2)| ≤L max {dX1(x1, x′ 1), dX2(x2, x′ 2)} , ∀x1, x′ 1 ∈X1, x2, x′ 2 ∈X2. (c) The latent features of each user u and movie i, x1(u) and x2(i), are sampled independently according to Borel probability measures PX1 and PX2 on (X1, TX1) and (X2, TX2), where TX denotes the Borel σ-algebra of a metric space X. (d) The additive noise for all data points are independent and bounded with mean zero and variance γ2: for all u ∈[m], i ∈[n], ηu,i ∈[−Bη, Bη], E[ηu,i] = 0, Var[ηu,i] = γ2. (4) (e) Rating of each entry is revealed (observed) with probability p, independently. 3 Notation. Let random variable Mui = 1 if the rating of user u and movie i is revealed and 0 otherwise. Mui is an independent Bernoulli random variable with parameter p. Let N1(u) denote the set of column indices of observed entries in row u. Similarly, let N2(i) denote the set of row indices of observed entries in column i. That is, N1(u) ≜{i : M(u, i) = 1} and N2(i) ≜{u : M(u, i) = 1}. (5) For rows v ̸= u, N1(u, v) ≜N1(u) ∩N1(v) denotes column indices of commonly observed entries of rows (u, v). For columns i ̸= j, N2(i, j) ≜N2(i) ∩N2(j) denotes row indices of commonly observed entries of columns (i, j). We refer to this as the overlap between two rows or columns. 3 Algorithm Intuition Local Taylor Approximation. We propose a prediction algorithm for unknown ratings based on insights from the classical Taylor approximation of a function. Suppose X1 ∼= X2 ∼= R, and we wish to predict unknown rating, f(x1(u), x2(i)), of user u ∈[m] for movie i ∈[n]. Using the first order Taylor expansion of f around (x1(v), x2(j)) for some u ̸= v ∈[m], i ̸= j ∈[n], it follows that f(x1(u), x2(i)) ≈f(x1(v), x2(j)) + (x1(u) −x1(v)) ∂f(x1(v),x2(j)) ∂x1 + (x2(i) −x2(j)) ∂f(x1(v),x2(j)) ∂x2 . We are not able to directly compute this expression, as we do not know the latent features, the function f, or the partial derivatives of f. However, we can again apply Taylor expansion for f(x1(v), x2(i)) and f(x1(u), x2(j)) around (x1(v), x2(j)), which results in a set of equations with the same unknown terms. It follows from rearranging terms and substitution that f(x1(u), x2(i)) ≈f(x1(v), x2(i)) + f(x1(u), x2(j)) −f(x1(v), x2(j)), as long as the first order Taylor approximation is accurate. Thus if the noise term in (1) is small, we can approximate f(x1(u), x2(i)) by using observed ratings y(v, j), y(u, j) and y(v, i) according to ˆy(u, i) = y(u, j) + y(v, i) −y(v, j). (6) Reliability of Local Estimates. We will show that the variance of the difference between two rows or columns upper bounds the estimation error. Therefore, in order to ensure the accuracy of the above estimate, we use empirical observations to estimate the variance of the difference between two rows or columns, which directly relates to an error bound. By expanding (6) according to (1), the error f(x1(u), x2(i)) −ˆy(u, i) is equal to (f(x1(u), x2(i)) −f(x1(v), x2(i))) −(f(x1(u), x2(j)) −f(x1(v), x2(j))) −ηvi + ηvj −ηuj. If we condition on x1(u) and x1(v), E h (Error)2 | x1(u), x1(v) i = 2 Varx∼X2 [f(x1(u), x) −f(x1(v), x) | x1(u), x1(v)] + 3γ2. Similarly, if we condition on x2(i) and x2(j) it follows that the expected squared error is bounded by the variance of the difference between the ratings of columns i and j. This theoretically motivates weighting the estimates according to the variance of the difference between the rows or columns. 4 Algorithm Description We provide the algorithm for predicting an unknown entry in position (u, i) using available data. Given a parameter β ≥2, define β-overlapping neighbors of u and i respectively as Sβ u(i) = {v s.t. v ∈N2(i), v ̸= u, |N1(u, v)| ≥β}, Sβ i (u) = {j s.t. j ∈N1(u), j ̸= i, |N2(i, j)| ≥β}. For each v ∈Sβ u(i), compute the empirical row variance between u and v, s2 uv = 1 2|N1(u, v)|(|N1(u, v)| −1) X i,j∈N1(u,v) ((y(u, i) −y(v, i)) −(y(u, j) −y(v, j)))2 . (7) 4 Similarly, compute empirical column variances between i and j, for all j ∈Sβ i (u), s2 ij = 1 2|N2(i, j)|(|N2(i, j)| −1) X u,v∈N2(i,j) ((y(u, i) −y(u, j)) −(y(v, i) −y(v, j)))2 . (8) Let Bβ(u, i) denote the set of positions (v, j) such that the entries y(v, j), y(u, j) and y(v, i) are observed, and the commonly observed ratings between (u, v) and between (i, j) are at least β. Bβ(u, i) = n (v, j) ∈Sβ u(i) × Sβ i (u) s.t. M(v, j) = 1 o . Compute the final estimate as a convex combination of estimates derived in (6) for (v, j) ∈Bβ(u, i), ˆy(u, i) = P (v,j)∈Bβ(u,i) wui(v, j) (y(u, j) + y(v, i) −y(v, j)) P (v,j)∈Bβ(u,i) wui(v, j) , (9) where the weights wui(v, j) are defined as a function of (7) and (8). We proceed to discuss a few choices for the weight function, each of which results in a different algorithm. User-User or Item-Item Nearest Neighbor Weights. We can evenly distribute the weights only among entries in the nearest neighbor row, i.e., the row with minimal empirical variance, wvj = I(v = u∗), for u∗∈arg min v∈Sβ u(i) s2 uv. If we substitute these weights in (9), we recover an estimate which is asymptotically equivalent to the mean-adjusted variant of the classical user-user nearest neighbor (collaborative filtering) algorithm, ˆy(u, i) = y(u∗, i) + muu∗, where muu∗is the empirical mean of the difference of ratings between rows u and u∗. For any u, v, muv = 1 |N1(u, v)| X j∈N1(u,v) (y(u, j) −y(v, j)). Equivalently, we can evenly distribute the weights among entries in the nearest neighbor columns, i.e., the column with minimal empirical variance, recovering the classical mean-adjusted item-item nearest neighbor collaborative filtering algorithm. Theorem 1 proves that this simple algorithm produces a consistent estimator, and we provide the finite sample error analysis. Due to the similarities, our analysis also directly implies the proof of correctness and consistency for the classic user-user and item-item collaborative filtering method. User-Item Gaussian Kernel Weights. Inspired by kernel regression, we introduce a variant of the algorithm which computes the weights according to a Gaussian kernel function with bandwith parameter λ, substituting in the minimum row or column sample variance as a proxy for the distance, wvj = exp(−λ min{s2 uv, s2 ij}). When λ = ∞, the estimate only depends on the basic estimates whose row or column has the minimum sample variance. When λ = 0, the algorithm equally averages all basic estimates. We applied this variant of our algorithm to both movie recommendation and image inpainting data, which show that our algorithm improves upon user-user and item-item classical collaborative filtering. Connections to Cosine Similarity Weights. In our algorithm, we determine reliability of estimates as a function of the sample variance, which is equivalent to the squared distance of the meanadjusted values. In classical collaborative filtering, cosine similarity is commonly used, which can be approximated as a different choice of the weight kernel over the squared difference. 5 Main Theorem Let E ⊂[m] × [n] denote the set of user-movie pairs for which the algorithm predicts a rating. For ε > 0, the overall ε-risk of the algorithm is the fraction of estimates whose error is larger than ε, Riskε = 1 |E| X (u,i)∈E I(|f(x1(u), x2(i)) −ˆy(u, i)| > ε). (10) 5 In Theorem 1, we upper bound the expected ε-Risk, proving that the user-user nearest neighbor estimator is consistent, i.e., in the presence of no noise, estimates converge to the true values as m, n go to infinity. We may assume m ≤n without loss of generality. Theorem 1. For a fixed ε > 0, as long as p ≥max{m−1+δ, n−1/2+δ} (where δ > 0), for any ρ = ω(n−2δ/3), the user-user nearest-neighbor variant of our method with β = np2/2 achieves E[Riskε] ≤3ρ + γ2 ε2 1 + 3 · 21/3 ε n−2 3 δ + O exp −1 4Cmδ + mδ exp −1 5B2 n 2 3 δ . where B = 2(LBX + Bη), and C = h p ρ L2 ∧1 6 for h(r) := infx0∈X1 Px∼PX1 (dX1(x, x0) ≤r). For a generic β, we can also provide precise error bounds of a similar form, with modified rates of convergence. Choosing β to grow with np2 ensures that as n goes to infinity, the required overlap between rows also goes to infinity, thus the empirical mean and variance computed in the algorithm converge precisely to the true mean and variance. The parameter ρ in Theorem 1 is introduced purely for the purpose of analysis, and is not used within the implementation of the the algorithm. The function h behaves as a lower bound of the cumulative distribution function of PX1, and it always exists under our assumptions that X1 is compact. It is used to ensure that for any u ∈[m], with high probability, there exists another row v ∈Sβ u(i) such that dX1(x1(u), x1(v)) is small, implying by the Lipschitz condition that we can use the values of row v to approximate the values of row u well. For example, if PX1 is a uniform distribution over a unit cube in q dimensional Euclidean space, then h(r) = min(1, r)q, and our error bound becomes meaningful for n ≥(L2/ρ)q/2δ. On the other hand, if PX1 is supported over finitely many points, then h(r) = minx∈supp(PX1) PX1(x) is a positive constant, and the role of the latent dimension becomes irrelevant. Intuitively, the “geometry” of PX1 through h near 0 determines the impact of the latent space dimension on the sample complexity, and our results hold as long as the latent dimension q = o(log n). 6 Proof Sketch For any evaluation set of unobserved entries E, the expectation of ε-risk is E[Riskε] = 1 |E| X (u,i)∈E P(|f(x1(u), x2(i)) −ˆy(u, i)| > ε) = P(|f(x1(u), x2(i)) −ˆy(u, i)| > ε), because the indexing of the entries are exchangeable and identically distributed. To bound the expected risk, it is sufficient to provide a tail bound for the probability of the error. For any fixed a, b ∈X1, and random variable x ∼PX2, we denote the mean and variance of the difference f(a, x) −f(b, x) by µab ≜Ex[f(a, x) −f(b, x)] = E[muv|x1(u) = a, x1(v) = b], σ2 ab ≜Varx[f(a, x) −f(b, x)] = E[s2 uv|x1(u) = a, x1(v) = b] −2γ2, which we point out is also equivalent to the expectation of the empirical means and variances computed by the algorithm when we condition on the latent representations of the users. The computation of ˆy(u, i) involves two steps: first the algorithm determines the neighboring row with the minimum sample variance, u∗= arg minv∈Sβ u(i) s2 uv, and then it computes the estimate by adjusting according to the empirical mean, ˆy(u, i) := y(u∗, i) + muu∗. The proof involves three key steps, each stated within a lemma. Lemma 1 proves that with high probability the observations are dense enough such that there is sufficient number of rows with overlap of entries larger than β, i.e., the number of the candidate rows, |Sβ u(i)|, concentrates around (m −1)p. This relies on concentration of Binomial random variables via Chernoff’s bound. Lemma 1. Given p > 0, 2 ≤β ≤np2/2 and α > 0, for any (u, i) ∈[m] × [n], P |Sβ u(i)| /∈(1 ± α)(m −1)p ≤2 exp −α2(m −1)p 3 + (m −1) exp −np2 8 . Lemma 2 proves that since the latent features are sampled iid from a bounded metric space, for any index pair (u, i), there exists a “good” neighboring row v ∈Sβ u(i), whose σ2 x1(u)x1(v) is small. 6 Lemma 2. Consider u ∈[n] and set S ⊂[n] \ {u}. Then for any ρ > 0, P min v∈S σ2 x1(u)x1(v) > ρ ≤ 1 −h r ρ L2 |S| , where h(r) := infx0∈X1 Px∼PX1 (dX1(x, x0) ≤r). Subsequently, conditioned on the event that |Sβ u(i)| ≈(m −1)p, Lemmas 3 and 4 prove that the sample mean and sample variance of the differences between two rows concentrate around the true mean and true variance with high probability. This involves using the Lipschitz and bounded assumptions on f and X1, as well as the Bernstein and Maurer-Pontil inequalities. Lemma 3. Given u, v ∈[m], i ∈[n] and β ≥2, for any α > 0, P µx1(u)x1(v) −muv > α | v ∈Sβ u(i) ≤exp − 3βα2 6B2 + 2Bα , where recall that B = 2(LBX + Bη). Lemma 4. Given u ∈[m], i ∈[n], and β ≥2, for any ρ > 0, P s2 uv −(σ2 x1(u)x1(v) + 2γ2) > ρ v ∈Sβ u(i) ≤2 exp − βρ2 4B2(2LB2 X + 4γ2 + ρ) , where recall that B = 2(LBX + Bη). Given that there exists a neighbor v ∈Sβ u(i) whose true variance σ2 x1(u)x1(v) is small, and conditioned on the event that all the sample variances concentrate around the true variance, it follows that the true variance between u and its nearest neighbor u∗is small with high probability. Finally, conditioned on the event that |Sβ u(i)| ≈(m −1)p and the true variance between the target row and the nearest neighbor row is small, we provide a bound on the tail probability of the estimation error by using Chevyshev inequalities. The only term in the error probability which does not decay to zero is the error from Chebyshev’s inequality, which dominates the final expression, leading to the final result. 7 Experiments We evaluated the performance of our algorithm to predict user-movie ratings on the MovieLens 1M and Netflix datasets. For the implementation of our method, we used user-item Gaussian kernel weights for the final estimator. We chose overlap parameter β = 2 to ensure the algorithm is able to compute an estimate for all missing entries. When β is larger, the algorithm enforces rows (or columns) to have more commonly rated movies (or users). Although this increases the reliability of the estimates, it also reduces the fraction of entries for which the estimate is defined. We optimized the λ bandwidth parameter of the Gaussian kernel by evaluating the method with multiple values for λ and choosing the value which minimizes the error. We compared our method with user-user collaborative filtering, item-item collaborative filtering, and softImpute from [20]. We chose the classic mean-adjusted collaborative filtering method, in which the weights are proportional to the cosine similarity of pairs of users or items (i.e. movies). SoftImpute is a matrix-factorization-based method which iteratively replaces missing elements in the matrix with those obtained from a soft-thresholded SVD. For both MovieLens and Netflix data sets, the ratings are integers from 1 to 5. From each dataset, we generated 100 smaller user-movie rating matrices, in which we randomly subsampled 2000 users and 2000 movies. For each rating matrix, we randomly select and withhold a percentage of the known ratings for the test set, while the remaining portion of the data set is revealed to the algorithm for computing the estimates. After the algorithm computes its predictions for unrevealed movie-user pairs, we evaluate the Root Mean Squared Error (RMSE) of the predictions compared with the withheld test set, where RMSE is defined as the square root of the mean of squared prediction error over the evaluation set. Figure 1 plots the RMSE of our method along with classic collaborative filtering and softImpute evaluated against 10%, 30%, 50%, and 70% withheld test sets. The RMSE is averaged over 100 subsampled rating matrices, and 95% confidence intervals are provided. 7 Figure 1: Performance of algorithms on Netflix and MovieLens datasets with 95% confidence interval. λ values used by our algorithm are 2.8 (10%), 2.3 (30%), 1.7 (50%), 1 (70%) for MovieLens, and 1.8 (10%), 1.7 (30%), 1.6 (50%), 1.5 (70%) for Netflix. Figure 1 suggests that our algorithm achieves a systematic improvement over classical user-user and item-item collaborative filtering. SoftImpute performs the worst on the MovieLens dataset, but it performs the best on the Netflix dataset. This behavior could be due to different underlying assumptions of low rank for matrix factorization methods as opposed to Lipschitz for collaborative filtering methods, which could lead to dataset dependent performance outcomes. 8 Discussion We introduced a generic framework of blind regression, i.e., nonparametric regression over latent variable models. We allow the model to be any Lipschitz function f over any bounded feature space X1, X2, while imposing the limitation that the input features are latent. This is applicable to a wide variety of problems, including recommendation systems, but also includes social network analysis, community detection, crowdsourcing, and product demand prediction. Many parametric models (e.g. low rank assumptions) can be framed as a specific case of our model. Despite the generality and limited assumptions of our model, we present a simple similarity based estimator, and we provide theoretical guarantees bounding its error within the noise level γ2. The analysis provides theoretical grounds for the popularity of similarity based methods. To the best of our knowledge, this is the first provable guarantee on the performance of neighbor-based collaborative filtering within a fully nonparametric model. Our algorithm and analysis follows from local Taylor approximation, along with an observation that the sample variance between rows or columns is a good indicator of “closeness”, or the similarity of their function values. The algorithm essentially estimates the local metric information between the latent features from observed data, and then performs local smoothing in a similar manner as classical kernel regression. Due to the local nature of our algorithm, our sample complexity does not depend on the latent dimension, whereas Chatterjee’s USVT estimator [6] requires sampling almost every entry when the latent dimension is large. This difference is due to the fact that Chatterjee’s result stems from showing that a Lipschitz function can be approximated by a piecewise constant function, which upper bound the rank of the target matrix. This discretization results in a large penalty with regards to the dimension of the latent space. Since our method follows from local approximations, we only require sufficent sampling such that locally there are enough close neighbor points. The connection of our framework to regression implies many natural future directions. We can extend model (1) to multivariate functions f, which translates to the problem of higher order tensor completion. Variations of the algorithm and analysis that we provide for matrix completion can extend to tensor completion, due to the flexible and generic assumptions of our model. It would also be useful to extend the results to capture general noise models, sparser sampling regimes, or mixed models with both parametric and nonparametric or both latent and observed variables. Acknowledgements: This work is supported in parts by ARO under MURI award 133668-5079809, by NSF under grants CMMI-1462158 and CMMI-1634259, and additionally by a Samsung Scholarship, Siebel Scholarship, NSF Graduate Fellowship, and Claude E. Shannon Research Assistantship. 8 References [1] S. Aditya, O. Dabeer, and B. K. Dey. A channel coding perspective of collaborative filtering. IEEE Transactions on Information Theory, 57(4):2327–2341, 2011. [2] G. Bresler, G. H. Chen, and D. Shah. A latent source model for online collaborative filtering. In Advances in Neural Information Processing Systems, pages 3347–3355, 2014. [3] G. Bresler, D. Shah, and L. F. Voloch. Collaborative filtering with low regret. arXiv preprint arXiv:1507.05371, 2015. [4] D. Cai, X. He, X. Wu, and J. Han. Non-negative matrix factorization on manifold. In Data Mining, 2008. ICDM’08. Eighth IEEE International Conference on, pages 63–72. IEEE, 2008. [5] E. J. Candès and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [6] S. Chatterjee et al. Matrix estimation by universal singular value thresholding. The Annals of Statistics, 43(1):177–214, 2015. [7] M. Fazel, H. Hindi, and S. P. Boyd. Log-det heuristic for matrix rank minimization with applications to hankel and euclidean distance matrices. In Proceedings of ACC, volume 3, pages 2156–2162. IEEE, 2003. [8] R. S. Ganti, L. Balzano, and R. Willett. Matrix completion under monotonic single index models. In Advances in Neural Information Processing Systems, pages 1864–1872, 2015. [9] D. Goldberg, D. Nichols, B. M. Oki, and D. Terry. Using collaborative filtering to weave an information tapestry. Commun. ACM, 1992. [10] P. Jain, P. Netrapalli, and S. Sanghavi. Low-rank matrix completion using alternating minimization. In Proceedings of the 45th annual ACM symposium on Theory of computing, pages 665–674. ACM, 2013. [11] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. IEEE Trans. Inf. Theory, 56(6), 2009. [12] J. Kleinberg and M. Sandler. Convergent algorithms for collaborative filtering. In Proceedings of the 4th ACM conference on Electronic commerce, pages 1–10. ACM, 2003. [13] J. Kleinberg and M. Sandler. Using mixture models for collaborative filtering. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pages 569–578. ACM, 2004. [14] Y. Koren and R. Bell. Advances in collaborative filtering. In Recommender Systems Handbook, pages 145–186. Springer US, 2011. [15] Z. Lin, A. Ganesh, J. Wright, L. Wu, M. Chen, and Y. Ma. Fast convex optimization algorithms for exact recovery of a corrupted low-rank matrix. CAMSAP, 61, 2009. [16] G. Linden, B. Smith, and J. York. Amazon.com recommendations: Item-to-item collaborative filtering. IEEE Internet Computing, 7(1):76–80, 2003. [17] Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM Journal on Matrix Analysis and Applications, 31(3):1235–1256, 2010. [18] Y. Mack and B. W. Silverman. Weak and strong uniform consistency of kernel regression estimates. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 61(3):405–415, 1982. [19] A. Maurer and M. Pontil. Empirical Bernstein Bounds and Sample Variance Penalization. ArXiv e-prints, July 2009. [20] R. Mazumder, T. Hastie, and R. Tibshirani. Spectral regularization algorithms for learning large incomplete matrices. The Journal of Machine Learning Research, 11:2287–2322, 2010. [21] S. Negahban and M. J. Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. The Journal of Machine Learning Research, 13(1):1665–1697, 2012. [22] X. Ning, C. Desrosiers, and G. Karypis. Recommender Systems Handbook, chapter A Comprehensive Survey of Neighborhood-Based Recommendation Methods, pages 37–76. Springer US, 2015. [23] A. Rohde, A. B. Tsybakov, et al. Estimation of high-dimensional low-rank matrices. The Annals of Statistics, 39(2):887–930, 2011. [24] B.-H. Shen, S. Ji, and J. Ye. Mining discrete patterns via binary matrix factorization. In Proceedings of the 15th ACM SIGKDD international conference, pages 757–766. ACM, 2009. [25] N. Srebro, N. Alon, and T. S. Jaakkola. Generalization error bounds for collaborative prediction with low-rank matrices. In Advances In Neural Information Processing Systems, pages 1321–1328, 2004. [26] M. P. Wand and M. C. Jones. Kernel smoothing. Crc Press, 1994. 9 | 2016 | 235 |
6,145 | An Ensemble Diversity Approach to Supervised Binary Hashing Miguel ´A. Carreira-Perpi˜n´an EECS, University of California, Merced mcarreira-perpinan@ucmerced.edu Ramin Raziperchikolaei EECS, University of California, Merced rraziperchikolaei@ucmerced.edu Abstract Binary hashing is a well-known approach for fast approximate nearest-neighbor search in information retrieval. Much work has focused on affinity-based objective functions involving the hash functions or binary codes. These objective functions encode neighborhood information between data points and are often inspired by manifold learning algorithms. They ensure that the hash functions differ from each other through constraints or penalty terms that encourage codes to be orthogonal or dissimilar across bits, but this couples the binary variables and complicates the already difficult optimization. We propose a much simpler approach: we train each hash function (or bit) independently from each other, but introduce diversity among them using techniques from classifier ensembles. Surprisingly, we find that not only is this faster and trivially parallelizable, but it also improves over the more complex, coupled objective function, and achieves state-of-the-art precision and recall in experiments with image retrieval. Information retrieval tasks such as searching for a query image or document in a database are essentially a nearest-neighbor search [33]. When the dimensionality of the query and the size of the database is large, approximate search is necessary. We focus on binary hashing [17], where the query and database are mapped onto low-dimensional binary vectors, where the search is performed. This has two speedups: computing Hamming distances (with hardware support) is much faster than computing distances between high-dimensional floating-point vectors; and the entire database becomes much smaller, so it may reside in fast memory rather than disk (for example, a database of 1 billion real vectors of dimension 500 takes 2 TB in floating point but 8 GB as 64-bit codes). Constructing hash functions that do well in retrieval measures such as precision and recall is usually done by optimizing an affinity-based objective function that relates Hamming distances to supervised neighborhood information in a training set. Many such objective functions have the form of a sum of pairwise terms that indicate whether the training points xn and xm are neighbors: minh L(h) = PN n,m=1 L(zn, zm; ynm) where zm = h(xm), zn = h(xn). Here, X = (x1, . . . , xN) is the dataset of high-dimensional feature vectors (e.g., SIFT features of an image), h: RD →{−1, +1}b are b binary hash functions and z = h(x) is the b-bit code vector for input x ∈RD, minh means minimizing over the parameters of the hash function h (e.g. over the weights of a linear SVM), and L(·) is a loss function that compares the codes for two images (often through their Hamming distance ∥zn −zm∥) with the ground-truth value ynm that measures the affinity in the original space between the two images xn and xm (distance, similarity or other measure of neighborhood). The sum is often restricted to a subset of image pairs (n, m) (for example, within the k nearest neighbors of each other in the original space), to keep the runtime low. The output of the algorithm is the hash function h and the binary codes Z = (z1, . . . , zN) for the training points, where zn = h(xn) for n = 1, . . . , N. Examples of these objective functions are Supervised Hashing with Kernels (KSH) [28], Binary Reconstructive Embeddings (BRE) [21] and the binary Laplacian loss (an extension of the Laplacian Eigenmaps objective; [2]) where L(zn, zm; ynm) is: 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. KSH: (zT nzm −bynm)2 BRE: 1 b ∥zn −zm∥2 −ynm 2 LAP: ynm ∥zn −zm∥2 (1) where for KSH ynm is 1 if xn, xm are similar and −1 if they are dissimilar; for BRE ynm = 1 2 ∥xn −xm∥2 (where the dataset X is normalized so the Euclidean distances are in [0, 1]); and for the Laplacian loss ynm > 0 if xn, xm are similar and < 0 if they are dissimilar (“positive” and “negative” neighbors). Other examples of these objectives include models developed for dimension reduction, be they spectral such as Locally Linear Embedding [32] or Anchor Graphs [27], or nonlinear such as the Elastic Embedding [7] or t-SNE; as well as objectives designed specifically for binary hashing, such as Semi-supervised sequential Projection Learning Hashing (SPLH) [34]. They all can produce good hash functions. We will focus on the Laplacian loss in this paper. In designing these objective functions, one needs to eliminate two types of trivial solutions. 1) In the Laplacian loss, mapping all points to the same code, i.e., z1 = · · · = zN, is the global optimum of the positive neighbors term (this also arises if the codes zn are real-valued, as in Laplacian eigenmaps). This can be avoided by having negative neighbors. 2) Having all hash functions (all b bits of each vector) being identical to each other, i.e., zn1 = · · · = znb for each n = 1, . . . , N. This can be avoided by introducing constraints, penalty terms or other mathematical devices that couple the b bits. For example, in the Laplacian loss (1) we can encourage codes to be orthogonal through a constraint ZT Z = NI [35] or a penalty term ∥ZT Z −NI∥2 (with a hyperparameter that controls the weight of the penalty) [14], although this generates dense matrices of N × N. In the KSH or BRE (1), squaring the dot product or Hamming distance between the codes couples the b bits. An important downside of these approaches is the difficulty of their optimization. This is due to the fact that the objective function is nonsmooth (implicitly discrete) because of the binary output of the hash function. There is a large number of such binary variables (bN), a larger number of pairwise interactions (O(N 2), less if using sparse neighborhoods) and the variables are coupled by the said constraints or penalty terms. The optimization is approximated in different ways. Most papers ignore the binary nature of the Z codes and optimize over them as real values, then binarize them by truncation (possibly with an optimal rotation; [16]), and finally fit a classifier (e.g. linear SVM) to each of the b bits separately. For example, for the Laplacian loss with constraints this involves solving an eigenproblem on Z as in Laplacian eigenmaps [2, 35, 36], or approximated using landmarks [27]. This is fast, but relaxing the codes in the optimization is generally far from optimal. Some recent papers try to respect the binary nature of the codes during their optimization, using techniques such as alternating optimization, min-cut and GraphCut [4, 14, 26] or others [25], and then fit the classifiers, or use alternating optimization directly on the hash function parameters [28]. Even more recently, one can optimize jointly over the binary codes and hash functions [8, 14, 31]. Most of these approaches are slow and limited to small datasets (a few thousand points) because of the quadratic number of pairwise terms in the objective. We propose a different, much simpler approach. Rather than coupling the b hash functions into a single objective function, we train each hash function independently from each other and using a single-bit objective function of the same form. We show that we can avoid trivial solutions by injecting diversity into each hash function’s training using techniques inspired from classifier ensemble learning. Section 1 discusses relevant ideas from the ensemble learning literature, section 2 describes our independent Laplacian hashing algorithm, section 3 gives evidence with image retrieval datasets that this simple approach indeed works very well, and section 4 further discusses the connection between hashing and ensembles. 1 Ideas from learning classifier ensembles At first sight, optimizing Laplacian loss without constraints does not seem like a good idea: since ∥zn −zm∥2 separates over the b bits, we obtain b independent identical objectives, one over each hash function, and so they all have the same global optimum. And, if all hash functions are equal, they are equivalent to using just one of them, which will give a much lower precision/recall. In fact, the very same issue arises when training an ensemble of classifiers [10, 22]. Here, we have a training set of input vectors and output class labels, and want to train several classifiers whose outputs are then combined (usually by majority vote). If the classifiers are all equal, we gain nothing over a single classifier. Hence, it is necessary to introduce diversity among the classifiers so that they disagree in their predictions. The ensemble learning literature has identified several mechanisms to inject diversity. The most important ones that apply to our binary hashing setting are as follows: Using different data for each classifier This can be done by: 1) Using different feature subsets for each classifier. This works best if the features are somewhat redundant. 2) Using different 2 training sets for each classifier. This works best for unstable algorithms (whose resulting classifier is sensitive to small changes in the training data), such as decision trees or neural nets, and unlike linear or nearest neighbor classifiers. A prominent example is bagging [6], which generates bootstrap datasets and trains a model on each. Injecting randomness in the training algorithm This is only possible if local optima exist (as for neural nets) or if the algorithm is randomized (as for decision trees). This can be done by using different initializations, adding noise to the updates or using different choices in the randomized operations (e.g. the choice of split in decision trees, as in random forests; [5]). Using different classifier models For example, different parameters (e.g. the number of neighbors in a nearest-neighbor classifier), different architectures (e.g. neural nets with different number of layers or hidden units), or different types of classifiers altogether. 2 Independent Laplacian Hashing (ILH) with diversity The connection of binary hashing with ensemble learning offers many possible options, in terms of the choice of type of hash function (“base learner”), binary hashing (single-bit) objective function, optimization algorithm, and diversity mechanism. In this paper we focus on the following choices. We use linear and kernel SVMs as hash functions. Without loss of generality (see later), we use the Laplacian objective (1), which for a single bit takes the form E(z) = PN n,m=1 ynm(zn −zm)2, zn = h(xn) ∈{−1, 1}, n = 1, . . . , N. (2) To optimize it, we use a two-step approach, where we first optimize (2) over the N bits and then learn the hash function by fitting to it a binary classifier. (It is also possible to optimize over the hash function directly with the method of auxiliary coordinates; [8, 31], which essentially iterates over optimizing (2) and fitting the classifier.) The Laplacian objective (2) is NP-complete if we have negative neighbors (i.e., some ynm < 0). We approximately optimize it using a min-cut algorithm (as implemented in [4]) applied in alternating fashion to submodular blocks as described in Lin et al. [24]. This first partitions the N points into disjoint groups containing only nonnegative weights. Each group defines a submodular function (specifically, quadratic with nonpositive coefficients) whose global minimum can be found in polynomial time using min-cut. The order in which the groups are optimized over is randomized at each iteration (this improves over using a fixed order). The approximate optimizer found depends on the initial z ∈{−1, 1}N. Finally, we consider three types of diversity mechanism (as well as their combination): Different initializations (ILHi) Each hash function is initialized from a random N-bit vector z. Different training sets (ILHt) Each hash function uses a training set of N points that is different and (if possible) disjoint from that of other hash functions. We can afford to do this because in binary hashing the training sets are potentially very large, and the computational cost of the optimization limits the training sets to a few thousand points. Later we show this outperforms using bootstrapped training sets. Different feature subsets (ILHf) Each hash function is trained on a random subset of 1 ≤d ≤D features sampled without replacement (so the d features are distinct). The subsets corresponding to different hash functions may overlap. These mechanisms are applicable to other objective functions beyond (2). We could also use the same training set but construct differently the weight matrix in (2) (e.g. using different numbers of positive and negative neighbors). Equivalence of objective functions in the single-bit case Several binary hashing objectives that differ in the general case of b > 1 bits become essentially identical in the b = 1 case. For example, expanding the pairwise terms in (1) (noting that z2 n = 1 if zn ∈{−1, +1}) gives L(zn, zm; ynm) as KSH: −2ynmznzm+constant BRE: −4(2−ynm)znzm+constant LAP: −2ynmznzm+constant. So all the three objectives are in fact identical and can be written in the form of a binary quadratic function without linear term (or a Markov random field with quadratic potentials only): minz E(z) = zT Az with z ∈{−1, +1}N (3) with an appropriate, data-dependent neighborhood symmetric matrix A of N × N. This problem is NP-complete in general [3, 13, 18], when A has both positive and negative elements, as well as zeros. It is submodular if A has only nonpositive elements, in which case it is equivalent to a min-cut/max-flow problem and it can be solved in polynomial time [3]. 3 More generally, any function of a binary vector z that has the form E(z) = PN n,m=1 fnm(zn, zm) and which only depends on Hamming distances between bits zn, zm can be written as fnm(zn, zm) = anmznzm + bnm. Even more, an arbitrary function of 3 binary variables that depends only on their Hamming distances can be written as a quadratic function of the 3 variables. However, for 4 variables or more this is not generally true (see supplementary material). Computational advantages Training the hash functions independently has some important advantages. First, training the b functions can be parallelized perfectly. This is a speedup of one to two orders of magnitude for typical values of b (32 to 200 in our experiments). Coupled objective functions such as KSH do not exhibit obvious parallelism, because they are trained with alternating optimization, which is inherently sequential. Second, even in a single processor, b binary optimizations over N variables each is generally easier than one binary optimization over bN variables. This is so because the search spaces contain b2N and 2bN states, respectively, so enumeration is much faster in the independent case (even though it is still impractical). If using an approximate polynomial-time algorithm, the independent case is also faster if the runtime is superlinear on the number of variables: the asymptotic runtimes will be O(bN α) and O((bN)α) with α > 1, respectively. This is the case for the best practical GraphCut [4] and max-flow/min-cut algorithms [9]. Third, the solution exhibits “nesting”, that is, to get the solution for b + 1 bits we just need to take a solution with b bits and add one more bit (as happens with PCA). This is unlike most methods based on a coupled objective function (such as KSH), where the solution for b + 1 bits cannot be obtained by adding one more bit, we have to solve for b + 1 bits from scratch. For ILHf, both the training and test time are lower than if using all D features for each hash function. The test runtime for a query is d/D times smaller. Model selection for the number of bits b Selecting the number of bits (hash functions) to use has not received much attention in the binary hashing literature. The most obvious way to do this would be to maximize the precision on a test set over b (cross-validation) subject to b not exceeding a preset limit (so applying the hash function is fast with test queries). The nesting property of ILH makes this computationally easy: we simply keep adding bits until the test precision stabilizes or decreases, or until we reach the maximum b. We can still benefit from parallel processing: if P processors are available, we train P hash functions in parallel and evaluate their precision, also in parallel. If we still need to increase b, we train P more hash functions, etc. 3 Experiments We use the following labeled datasets (all using the Euclidean distance in feature space): (1) CIFAR [19] contains 60 000 images in 10 classes. We use D = 320 GIST features [30] from each image. We use 58 000 images for training and 2 000 for test. (2) Infinite MNIST [29]. We generated, using elastic deformations of the original MNIST handwritten digit dataset, 1 000 000 images for training and 2 000 for test, in 10 classes. We represent each image by a D = 784 vector of raw pixels. The supplementary material contains experiments on additional datasets. Because of the computational cost of affinity-based methods, previous work has used training sets limited to a few thousand points [14, 21, 25, 28]. Unless otherwise indicated, we train the hash functions in a subset of 5 000 points of the training set, and report precision and recall by searching for a test query on the entire dataset (the base set). As hash functions (for each bit), we use linear SVMs (trained with LIBLINEAR; [12]) and kernel SVMs (with 500 basis functions centered at a random subset of training points). We report precision and recall for the test set queries using as ground truth (set of true neighbors in original space) all the training points with the same label as the query. The retrieved set contains the k nearest neighbors of the query point in the Hamming space. We report precision for different values of k to test the robustness of different algorithms. Diversity mechanisms with ILH To understand the effect of diversity, we evaluate the 3 mechanisms ILHi, ILHt and ILHf, and their combination ILHitf, over a range of number of bits b (32 to 128) and training set size N (2 000 to 20 000). As baseline coupled objective, we use KSH [28] but using the same two-step training as ILH: first we find the codes using the alternating min-cut method described earlier (initialized from an all-ones code, and running one iteration of alternating min-cut) and then we fit the classifiers. This is faster and generally finds better optima than the original KSH optimization [26]. We denote it as KSHcut. 4 ILHi ILHt ILHf ILHitf KSHcut linear h 0.2 0.5 1 2 x 10 4 30 35 40 45 0.2 0.5 1 2 x 10 4 30 35 40 45 b=32 b=64 b=128 0.2 0.5 1 2 x 10 4 30 35 40 45 0.2 0.5 1 2 x 10 4 30 35 40 45 0.2 0.5 1 2 x 10 4 30 35 40 45 kernel h 0.2 0.5 1 2 x 10 4 40 44 48 52 N 0.2 0.5 1 2 x 10 4 40 44 48 52 b=32 b=64 b=128 N 0.2 0.5 1 2 x 10 4 40 44 48 52 N 0.2 0.5 1 2 x 10 4 40 44 48 52 N 0.2 0.5 1 2 x 10 4 40 44 48 52 N Figure 1: Diversity mechanisms vs baseline (KSHcut). Precision on CIFAR dataset, as a function of the training set size N (2, 000 to 20 000) and number of bits b (32 to 128). Ground truth: all points with the same label as the query. Retrieved set: k = 500 nearest neighbors of the query. Errorbars shown only for ILHt (over 5 random training sets) to avoid clutter. Top to bottom: linear and kernel hash functions. Left to right: diversity mechanisms, their combination, and the baseline KSHcut. Fig. 1 shows the results. The clearly best diversity mechanism is ILHt, which works better than the other mechanisms, even when combined with them, and significantly better than KSHcut. We explain this as follows. Although all 3 mechanisms introduce diversity, ILHt has a distinct advantage (also over KSHcut): it effectively uses b times as much training data, because each hash function has its own disjoint dataset. Using bN training points in KSHcut would be orders of magnitude slower. ILHt is equal or even better than the combined ILHitf because 1) since there is already enough diversity in ILHt, the extra diversity from ILHi and ILHf does not help; 2) ILHf uses less data (it discards features), which can hurt the precision; this is also seen in fig. 2 (panel 2). The precision of all methods saturates as N increases; with b = 128 bits, ILHt achieves nearly maximum precision with only 5 000 points. In fact, if we continued to increase the per-bit training set size N in ILHt, eventually all bits would use the same training set (containing all available data), diversity would disappear and the precision would drop drastically to the precision of using a single bit (≈12%). Practical image retrieval datasets are so large that this is unlikely to occur unless N is very large (which would make the optimization too slow anyway). Linear SVMs are very stable classifiers known to benefit less from ensembles than less stable classifiers such as decision trees or neural nets [22]. Remarkably, they strongly benefit from the ensemble in our case. This is because each hash function is solving a different classification problem (different output labels), so the resulting SVMs are in fact quite different from each other. The conclusions for kernel hash functions are similar. In fig. 1, the kernel functions are using the same, common 500 centers for the radial basis functions. Nonlinear classifiers are less stable than linear ones. In our case they do not benefit much more than linear SVMs from the diversity. They do achieve higher precision since they are more powerful models. See supplementary material for more results. Fig. 2 shows the results on infinite MNIST dataset (see supp. mat for the results on CIFAR). Panel 1 shows the results in ILHf of varying the number of features 1 ≤d ≤D used by each hash function. Intuitively, very low d is bad because each classifier receives too little information and will make near-random codes. Indeed, for low d the precision is comparable to that of LSH (random projections) in panel 4. Very high d will also work badly because it would eliminate the diversity and drop to the precision of a single bit for d = D. This does not happen because there is an additional source of diversity: the randomization in the alternating min-cut iterations. This has an effect similar to that of ILHi, and indeed a comparable precision. The highest precision is achieved with a proportion d/D ≈30% for ILHf, indicating some redundancy in the features. When combined with the other diversity mechanisms (ILHitf, panel 2), the highest precision occurs for d = D, because diversity is already provided by the other mechanisms, and using more data is better. Fig. 2 (panel 3) shows the results of constructing the b training sets for ILHt as a random sample from the base set such that they are “bootstrapped” (sampled with replacement), “disjoint” (sampled without replacement) or “random” (sampled without replacement but reset for each bit, so the training sets may overlap). As expected, “disjoint” (closely followed by “random”) is consistently and notably better than “bootstrap” because it introduces more independence between the hash functions and learns from more data overall (since each hash function uses the same training set size). 5 ILHf ILHitf ILHt: train set sampling Incremental ILHt precision 0.01 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60 70 80 d/D b = 32 b = 64 b = 128 0.01 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60 70 80 d/D b = 32 b = 64 b = 128 32 64 128 10 20 30 40 50 60 70 80 disjoint random bootstrap number of bits b 0 40 80 120 160 200 10 20 30 40 50 60 70 80 ILHt KSHcut−ILHt KSHcut tPCA Bagged PCA LSH number of bits b Figure 2: Panels 1–2: effect of the proportion of features d/D used in ILHf and ILHitf. Panel 3: bootstrap vs random vs disjoint training sets in ILHt. Panel 4: precision as a function of the number of hash functions b for different methods. All results show precision using a training set of N = 5 000 points of infinite MNIST dataset. Errorbars over 5 random training sets. Ground truth: all points with the same label as the query. Retrieved set: k = 10 000 nearest neighbors of the query. Precision as a function of b Fig. 2 (panel 4) shows the precision (in the test set) as a function of the number of bits b for ILHt, where the solution for b + 1 bits is obtained by adding a new bit to the solution for b. Since the hash functions obtained depend on the order in which we add the bits, we show 5 such orders (red curves). Remarkably, the precision increases nearly monotonically and continues increasing beyond b = 200 bits (note the prediction error in bagging ensembles typically levels off after around 25–50 decision trees; [22, p. 186]). This is (at least partly) because the effective training set size is proportional to b. The variance in the precision decreases as b increases. In contrast, for KSHcut the variance is larger and the precision barely increases after b = 80. The higher variance for KSHcut is due to the fact that each b value involves training from scratch and we can converge to a relatively different local optimum. As with ILHt, adding LSH random projections (again 5 curves for different orders) increases precision monotonically, but can only reach a low precision at best, since it lacks supervision. We also show the curve for thresholded PCA (tPCA), whose precision tops at around b = 30 and decreases thereafter. A likely explanation is that highorder principal components essentially capture noise rather than signal, i.e., random variation in the data, and this produces random codes for those bits, which destroy neighborhood information. Bagging tPCA (here, using ensembles where each member has 16 principal components, i.e., 16 bits) [23] does make tPCA improve monotonically with b, but the result is still far from competitive. The reason is the low diversity among the ensemble members, because the top principal components can be accurately estimated even from small samples. Is the precision gap between KSH and ILHt due to an incomplete optimization of the KSH objective, or to bad local optima? We verified that 1) random perturbations of the KSHcut optimum lower the precision; 2) optimizing KSHcut using the ILHt codes as initialization (“KSHcut-ILHt” curve) increases the precision but it still remains far from that of ILHt. This confirms that the optimization algorithm is doing its job, and that the ILHt diversity mechanism is superior to coupling the hash functions in a joint objective. Are the codes orthogonal? The result of learning binary hashing is b functions, represented by a matrix Wb×D of real weights for linear SVMs, and a matrix ZN×b of binary (−1, +1) codes for the entire dataset. We define a measure of code orthogonality as follows. Define b × b matrices CZ = 1 N ZT Z for the codes and CW = WWT for the weights (assuming normalized SVM weights). Each C matrix has entries in [−1, 1], equal to a normalized dot product of codes or weight vectors, and diagonal entries equal to 1. (Note that any matrix SCS where S is diagonal with ±1 entries is equivalent, since reverting a hash function’s output does not alter the Hamming distances.) Perfect orthogonality happens when C = I, and is encouraged by many binary hashing methods. Fig. 3 shows this for ILHt in CIFAR (N = 58 000 training points of dim. D = 320). It plots CZ as an image, as well as the histogram of the entries of CZ and CW. The histograms also contain, as a control, the histogram corresponding to normalized dot products of random vectors (of dimension N or D, respectively), which is known to tend to a delta function at 0 as the dimension grows. Although CW has some tendency to orthogonality as the number of bits b increases, it is clear that, for both codes and weight vectors, the distribution of dot products is wide, far from strict orthogonality. Hence, enforcing orthogonality does not seem necessary to achieve good hash functions and codes. Comparison with other binary hashing methods We compare with both the original KSH [28] and its min-cut optimization KSHcut [26], and a representative subset of affinity-based and unsupervised hashing methods: Supervised Binary Reconstructive Embeddings (BRE) [21], Supervised Self-Taught Hashing (STH) [36], Spectral Hashing (SH) [35], Iterative Quantization (ITQ) [16], Bi6 b = 32 b = 64 b = 200 b × b matrix CZ −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.6 −0.2 0 0.2 0.6 1 0 0.2 0.4 0.6 0.8 32bits 64bits 128bits 200bits random entries (zT n zm)/N of CZ −1 −0.6 −0.2 0 0.2 0.6 1 0 0.05 0.1 0.15 0.2 32bits 64bits 128bits 200bits random entries wT d we of CW Figure 3: Orthogonality of codes (b × b images and left histogram) and of hash function weight vectors (right histogram) in CIFAR. nary Autoencoder (BA) [8], thresholded PCA (tPCA), and Locality-Sensitive Hashing (LSH) [1]. We create affinities ynm for all the affinity-based methods using the dataset labels. For each training point xn, we use as similar neighbors 100 points with the same labels as xn; and as dissimilar neighbors 100 points chosen randomly among the points whose labels are different from that of xn. For all datasets, all the methods are trained using a subset of 5 000 points. Given that KSHcut already performs well [26] and that ILHt consistently outperforms it both in precision and runtime, we expect ILHt to be competitive with the state-of-the-art. Fig. 4 shows this is generally the case, particularly as the number of bits b increases, when ILHt beats all other methods, which are not able to increase precision as much as ILHt does. Runtime Training a single ILHt hash function (in a single processor) for CIFAR dataset with N = 2 000, 5 000 and 20 000 takes 1.2, 2.8 and 22.5 seconds, respectively. This is much faster than other affinity-based hashing methods (for example, for 128 bits with 5 000 points, BRE did not converge after 12 hours). KSHcut is among the faster methods. Its runtime per min-cut pass over a single bit is comparable to ours, but it needs b sequential passes to complete just one alternating optimization iteration, while our b functions can be trained in parallel. Summary ILHt achieves a remarkably high precision compared to a coupled KSH objective using the same optimization algorithm but introducing diversity by feeding different data to independent hash functions rather than by jointly optimizing over them. It also compares well with state-of-theart methods in precision/recall, being competitive if few bits are used and the clear winner as more bits are used, and is very fast and embarrassingly parallel. 4 Discussion We have revealed for the first time a connection between supervised binary hashing and ensemble learning that could open the door to many new hashing algorithms. Although we have focused on a specific objective and identified as particularly successful with it a specific diversity mechanism (disjoint training sets), other choices may be better depending on the application. The core idea we propose is the independent training of the hash functions via the introduction of diversity by means other than coupling terms in the objective or constraints. This may come as a surprise in the area of learning binary hashing, where most work has focused on proposing complex objective functions that couple all b hash functions and developing sophisticated optimization algorithms for them. Another surprise is that orthogonality of the codes or hash functions seems unnecessary. ILHt creates codes and hash functions that do differ from each other but are far from being orthogonal, yet they achieve good precision that keeps growing as we add bits. Thus, introducing diversity through different training data seems a better mechanism to make hash functions differ than coupling the codes through an orthogonality constraint or otherwise. It is also far simpler and faster to train independent single-bit hash functions. A final surprise is that the wide variety of affinity-based objective functions in the b-bit case reduces to a binary quadratic problem in the 1-bit case regardless of the form of the b-bit objective (as long as it depends on Hamming distances only). In this sense, there is a unique objective in the 1-bit case. There has been a prior attempt to use bagging (bootstrapped samples) with truncated PCA [23]. Our experiments show that, while this improves truncated PCA, it performs poorly in supervised hashing. This is because PCA is unsupervised and does not use the user-provided similarity information, which may disagree with Euclidean distances in image space; and because estimating principal components from samples has low diversity. Also, PCA is computationally simple and there is little gain by bagging it, unlike the far more difficult optimization of supervised binary hashing. Some supervised binary hashing work [28, 34] has proposed to learn the b hash functions sequentially, where the ith function has an orthogonality-like constraint to force it to differ from the previ7 b = 64 b = 64 b = 128 b = 128 CIFAR precision 500 600 700 800 900 1000 20 25 30 35 40 45 ILHt KSHcut KSH STH CCA−ITQ SH LSH BRE 20 40 60 80 100 10 20 30 40 45 ILHt KSHcut KSH STH CCA−ITQ SH LSH BRE 500 600 700 800 900 1000 20 25 30 35 40 45 20 40 60 80 100 10 20 30 40 45 Inf. MNIST precision 5000 6000 7000 8000 9000 10000 40 50 60 70 80 ILHt KSHcut KSH STH CCA−ITQ SH LSH BRE k 20 40 60 80 100 10 20 30 40 50 60 70 80 90 ILHt KSHcut KSH STH CCA−ITQ SH LSH BRE recall 5000 6000 7000 8000 9000 10000 40 50 60 70 80 k 20 40 60 80 100 10 20 30 40 50 60 70 80 90 recall Figure 4: Comparison with binary hashing methods in precision and precision/recall, using linear SVMs as hash functions and different numbers of bits b, for CIFAR and Inf. MNIST. ous functions. Hence, this does not learn the functions independently and can be seen as a greedy optimization of a joint objective over all b functions. Binary hashing does differ from ensemble learning in one important point: the predictions of the b classifiers (= b hash functions) are not combined into a single prediction, but are instead concatenated into a binary vector (which can take 2b possible values). The “labels” (the binary codes) for the “classifiers” (the hash functions) are unknown, and are implicitly or explicitly learned together with the hash functions themselves. This means that well-known error decompositions such as the errorambiguity decomposition [20] and the bias-variance decomposition [15] do not apply. Also, the real goal of binary hashing is to do well in information retrieval measures such as precision and recall, but hash functions do not directly optimize this. A theoretical understanding of why diversity helps in learning binary hashing is an important topic of future work. In this respect, there is also a relation with error-correcting output codes (ECOC) [11], an approach for multiclass classification. In ECOC, we represent each of the K classes with a b-bit binary vector, ensuring that b is large enough for the vectors to be sufficiently separated in Hamming distance. Each bit corresponds to partitioning the K classes into two groups. We then train b binary classifiers, such as decision trees. Given a test pattern, we output as class label the one closest in Hamming distance to the b-bit output of the b classifiers. The redundant error-correcting codes allow for small errors in the individual classifiers and can improve performance. An ECOC can also be seen as an ensemble of classifiers where we manipulate the output targets (rather than the input features or training set) to obtain each classifier, and we apply majority vote on the final result (if the test output in classifier i is 1, then all classes associated with 1 get a vote). The main benefit of ECOC seems to be in variance reduction, as in other ensemble methods. Binary hashing can be seen as an ECOC with N classes, one per training point, with the ECOC prediction for a test pattern (query) being the nearest-neighbor class codes in Hamming distance. However, unlike in ECOC, in binary hashing the codes are learned so they preserve neighborhood relations between training points. Also, while ideally all N codes should be different (since a collision makes two originally different patterns indistinguishable, which will degrade some searches), this is not guaranteed in binary hashing. 5 Conclusion Much work in supervised binary hashing has focused on designing sophisticated objectives of the hash functions that force them to compete with each other while trying to preserve neighborhood information. We have shown, surprisingly, that training hash functions independently is not just simpler, faster and parallel, but also can achieve better retrieval quality, as long as diversity is introduced into each hash function’s objective function. This establishes a connection with ensemble learning and allows one to borrow techniques from it. We showed that having each hash function optimize a Laplacian objective on a disjoint subset of the data works well, and facilitates selecting the number of bits to use. Although our evidence is mostly empirical, the intuition behind it is sound and in agreement with the many results (also mostly empirical) showing the power of ensemble classifiers. The ensemble learning perspective suggests many ideas for future work, such as pruning a large ensemble or using other diversity techniques. It may also be possible to characterize theoretically the performance in precision of binary hashing depending on the diversity of the hash functions. Acknowledgments Work supported by NSF award IIS–1423515. 8 References [1] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Comm. ACM, 51(1):117–122, Jan. 2008. [2] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, June 2003. [3] E. Boros and P. L. Hammer. Pseudo-boolean optimization. Discrete Applied Math., Nov. 15 2002. [4] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. PAMI, 2001. [5] L. Breiman. Random forests. Machine Learning, 45(1):5–32, Oct. 2001. [6] L. J. Breiman. Bagging predictors. Machine Learning, 24(2):123–140, Aug. 1996. [7] M. ´A. Carreira-Perpi˜n´an. The elastic embedding algorithm for dimensionality reduction. ICML 2010. [8] M. ´A. Carreira-Perpi˜n´an and R. Raziperchikolaei. Hashing with binary autoencoders. CVPR, 2015. [9] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 2009. [10] T. G. Dietterich. Ensemble methods in machine learning. Springer-Verlag, 2000. [11] T. G. Dietterich and G. Bakiri. Solving multi-class learning problems via error-correcting output codes. J. Artificial Intelligence Research, 2:253–286, 1995. [12] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A library for large linear classification. J. Machine Learning Research, 9:1871–1874, Aug. 2008. [13] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman, 1979. [14] T. Ge, K. He, and J. Sun. Graph cuts for supervised binary coding. ECCV, 2014. [15] S. Geman, E. Bienenstock, and R. Doursat. Neural networks and the bias/variance dilemma. Neural Computation, 4(1):1–58, Jan. 1992. [16] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A Procrustean approach to learning binary codes for large-scale image retrieval. PAMI, 2013. [17] K. Grauman and R. Fergus. Learning binary hash codes for large-scale image search. In Machine Learning for Computer Vision, pages 49–87. Springer-Verlag, 2013. [18] V. Kolmogorov and R. Zabih. What energy functions can be minimized via graph cuts? PAMI, 2003. [19] A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, Apr. 8 2009. [20] A. Krogh and J. Vedelsby. Neural network ensembles, cross validation, and active learning. NIPS, 1995. [21] B. Kulis and T. Darrell. Learning to hash with binary reconstructive embeddings. NIPS, 2009. [22] L. I. Kuncheva. Combining Pattern Classifiers: Methods and Algorithms. John Wiley & Sons, 2014. [23] C. Leng, J. Cheng, T. Yuan, X. Bai, and H. Lu. Learning binary codes with bagging PCA. ECML, 2014. [24] B. Lin, J. Yang, X. He, and J. Ye. Geodesic distance function learning via heat flows on vector fields. ICML, 2014. [25] G. Lin, C. Shen, D. Suter, and A. van den Hengel. A general two-step approach to learning-based hashing. ICCV, 2013. [26] G. Lin, C. Shen, Q. Shi, A. van den Hengel, and D. Suter. Fast supervised hashing with decision trees for high-dimensional data. CVPR, 2014. [27] W. Liu, J. Wang, S. Kumar, and S.-F. Chang. Hashing with graphs. ICML, 2011. [28] W. Liu, J. Wang, R. Ji, Y.-G. Jiang, and S.-F. Chang. Supervised hashing with kernels. CVPR, 2012. [29] G. Loosli, S. Canu, and L. Bottou. Training invariant support vector machines using selective sampling. In Large Scale Kernel Machines, Neural Information Processing Series, pages 301–320. MIT Press, 2007. [30] A. Oliva and A. Torralba. Modeling the shape of the scene: A holistic representation of the spatial envelope. Int. J. Computer Vision, 42(3):145–175, May 2001. [31] R. Raziperchikolaei and M. ´A. Carreira-Perpi˜n´an. Optimizing affinity-based binary hashing using auxiliary coordinates. NIPS, 2016. [32] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290(5500):2323–2326, Dec. 22 2000. [33] G. Shakhnarovich, P. Indyk, and T. Darrell, editors. Nearest-Neighbor Methods in Learning and Vision. Neural Information Processing Series. MIT Press, Cambridge, MA, 2006. [34] J. Wang, S. Kumar, and S.-F. Chang. Semi-supervised hashing for large scale search. PAMI, 2012. [35] Y. Weiss, A. Torralba, and R. Fergus. Spectral hashing. NIPS, 2009. [36] D. Zhang, J. Wang, D. Cai, and J. Lu. Self-taught hashing for fast similarity search. SIGIR, 2010. 9 | 2016 | 236 |
6,146 | Learning Influence Functions from Incomplete Observations Xinran He Ke Xu David Kempe Yan Liu University of Southern California, Los Angeles, CA 90089 {xinranhe, xuk, dkempe, yanliu.cs}@usc.edu Abstract We study the problem of learning influence functions under incomplete observations of node activations. Incomplete observations are a major concern as most (online and real-world) social networks are not fully observable. We establish both proper and improper PAC learnability of influence functions under randomly missing observations. Proper PAC learnability under the Discrete-Time Linear Threshold (DLT) and Discrete-Time Independent Cascade (DIC) models is established by reducing incomplete observations to complete observations in a modified graph. Our improper PAC learnability result applies for the DLT and DIC models as well as the Continuous-Time Independent Cascade (CIC) model. It is based on a parametrization in terms of reachability features, and also gives rise to an efficient and practical heuristic. Experiments on synthetic and real-world datasets demonstrate the ability of our method to compensate even for a fairly large fraction of missing observations. 1 Introduction Many social phenomena, such as the spread of diseases, behaviors, technologies, or products, can naturally be modeled as the diffusion of a contagion across a network. Owing to the potentially high social or economic value of accelerating or inhibiting such diffusions, the goal of understanding the flow of information and predicting information cascades has been an active area of research [10, 7, 9, 14, 1, 20]. A key task here is learning influence functions, mapping sets of initial adopters to the individuals who will be influenced (also called active) by the end of the diffusion process [10]. Many methods have been developed to solve the influence function learning problem [9, 7, 5, 8, 3, 16, 18, 24, 25]. Most approaches are based on fitting the parameters of a diffusion model based on observations, e.g., [8, 7, 18, 9, 16]. Recently, Du et al. [3] proposed a model-free approach to learn influence functions as coverage functions; Narasimhan et al. [16] establish proper PAC learnability of influence functions under several widely-used diffusion models. All existing approaches rely on the assumption that the observations in the training dataset are complete, in the sense that all active nodes are observed as being active. However, this assumption fails to hold in virtually all practical applications [15, 6, 2, 21]. For example, social media data are usually collected through crawlers or acquired with public APIs provided by social media platforms, such as Twitter or Facebook. Due to non-technical reasons and established restrictions on the APIs, it is often impossible to obtain a complete set of observations even for a short period of time. In turn, the existence of unobserved nodes, links, or activations may lead to a significant misestimation of the diffusion model’s parameters [19, 15]. We take a step towards addressing the problem of learning influence functions from incomplete observations. Missing data are a complicated phenomenon, but to address it meaningfully and rigorously, one must make at least some assumptions about the process resulting in the loss of data. We focus on random loss of observations: for each activated node independently, the node’s activation is observed only with probability r, the retention rate, and fails to be observed with probability 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 1 −r. Random observation loss naturally occurs when crawling data from social media, where rate restrictions are likely to affect all observations equally. We establish both proper and improper PAC learnability of influence functions under incomplete observations for two popular diffusion models: the Discrete-Time Independent Cascade (DIC) and Discrete-Time Linear Threshold (DLT) models. In fact, randomly missing observations do not even significantly increase the required sample complexity. The result is proved by interpreting the incomplete observations as complete observations in a transformed graph, The PAC learnability result implies good sample complexity bounds for the DIC and DLT models. However, the PAC learnability result does not lead to an efficient algorithm, as it involves marginalizing a large number of hidden variables (one for each node not observed to be active). Towards designing more practical algorithms and obtaining learnability under a broader class of diffusion models, we pursue improper learning approaches. Concretely, we use the parameterization of Du et al. [3] in terms of reachability basis functions, and optimize a modified loss function suggested by Natarajan et al. [17] to address incomplete observations. We prove that the algorithm ensures improper PAC learning for the DIC, DLT and Continuous-Time Independent Cascade (CIC) models. Experimental results on synthetic cascades generated from these diffusion models and real-world cascades in the MemeTracker dataset demonstrate the effectiveness of our approach. Our algorithm achieves nearly a 20% reduction in estimation error compared to the best baseline methods on the MemeTracker dataset. Several recent works also aim to address the issue of missing observations in social network analysis, but with different emphases. For example, Chierichetti et al. [2] and Sadikov et al. [21] mainly focus on recovering the size of a diffusion process, while our task is to learn the influence functions from several incomplete cascades. Myers et al. [15] mainly aim to model unobserved external influence in diffusion. Duong et al. [6] examine learning diffusion models with missing links from complete observations, while we learn influence functions from incomplete cascades with missing activations. Most related to our work are papers by Wu et al. [23] and simultaneous work by Lokhov [13]. Both study the problem of network inference under incomplete observations. Lokhov proposes a dynamic message passing approach to marginalize all the missing activations, in order to infer diffusion model parameters using maximum likelihood estimation, while Wu et al. develop an EM algorithm. Notice that the goal of learning the model parameters differs from our goal of learning the influence functions directly. Both [13] and [23] provide empirical evaluation, but do not provide theoretical guarantees. 2 Preliminaries 2.1 Models of Diffusion and Incomplete Observations Diffusion Model. We model propagation of opinions, products, or behaviors as a diffusion process over a social network. The social network is represented as a directed graph G = (V, E), where n = |V | is the number of nodes, and m = |E| is the number of edges. Each edge e = (u, v) is associated with a parameter wuv representing the strength of influence user u has on v. We assume that the graph structure (the edge set E) is known, while the parameters wuv are to be learned. Depending on the diffusion model, there are different ways to represent the strength of influence between individuals. Nodes can be in one of two states, inactive or active. We say that a node gets activated if it adopts the opinion/product/behavior under the diffusion process. In this work, we focus on progressive diffusion models, where a node remains active once it gets activated. The diffusion process begins with a set of seed nodes (initial adopters) S, who start active. It then proceeds in discrete or continuous time: according to a probabilistic process, additional nodes may become active based on the influence from their neighbors. Let N(v) be the in-neighbors of node v and At the set of nodes activated by time t. We consider the following three diffusion models: Discrete-time Linear Threshold (DLT) model [10]: Each node v has a threshold ✓v drawn independently and uniformly from the interval [0, 1]. The diffusion under the DLT model unfolds in discrete time steps: a node v becomes active at step t if the total incoming weight from its active neighbors exceeds its threshold: P u2N(v)\At−1 wuv ≥✓v. Discrete-time Independent Cascade (DIC) model [10]: The DIC model is also a discrete-time model. The weight wuv 2 [0, 1] captures an activation probability. When a node u becomes active in step t, it attempts to activate all currently inactive neighbors in step t + 1. For each neighbor v, it 2 succeeds with probability wuv. If it succeeds, v becomes active; otherwise, v remains inactive. Once u has made all these attempts, it does not get to make further activation attempts at later times. Continuous-time Independent Cascade (CIC) model [8]: The CIC model unfolds in continuous time. Each edge e = (u, v) is associated with a delay distribution with wuv as its parameter. When a node u becomes newly active at time t, for every neighbor v that is still inactive, a delay time duv is drawn from the delay distribution. duv is the duration it takes u to activate v, which could be infinite (if u does not succeed in activating v). Nodes are considered activated by the process if they are activated within a specified observation window [0, ⌧]. Fix one of the diffusion models defined above and its parameters. For each seed set S, let ∆S be the distribution of final active sets. (In the case of the DIC and DLT model, this is the set of active nodes when no new activations occur; for the CIC model, it is the set of nodes active at time ⌧.) For any node v, let Fv(S) = ProbA⇠∆S[v 2 A] be the (marginal) probability that v is activated according to the dynamics of the diffusion model with initial seeds S. Then, define the influence function F : 2V ! [0, 1]n mapping seed sets to the vector of marginal activation probabilities: F (S) = [F1(S), . . . , Fn(S)]. Notice that the marginal probabilities do not capture the full information about the diffusion process contained in ∆S (since they do not observe co-activation patterns), but they are sufficient for many applications, such as influence maximization [10] and influence estimation [4]. Cascades and Incomplete Observations. We focus on the problem of learning influence functions from cascades. A cascade C = (S, A) is a realization of the random diffusion process; S is the set of seeds and A ⇠∆S, A ◆S is the set of activated nodes at the end of the random process. Similar to Narasimhan et al. [16], we focus on activation-only observations, namely, we only observe which nodes were activated, but not when these activations occurred.1 To capture the fact that some of the node activations may have been unobserved, we use the following model of independently randomly missing data: for each (activated) node v 2 A \ S, the activation of v is actually observed independently with probability r. With probability 1 −r, the node’s activation is unobservable. For seed nodes v 2 S, the activation is never lost. Formally, define ˜A as follows: each v 2 S is deterministically in ˜A, and each v 2 A \ S is in ˜A independently with probability r. Then, the incomplete cascade is denoted by ˜C = (S, ˜A). 2.2 Objective Functions and Learning Goals To measure estimation error, we primarily use a quadratic loss function, as in [16, 3]. For two n-dimensional vectors x, y, the quadratic loss is defined as `sq(x, y) = 1 n · ||x −y||2 2. We also use this notation when one or both arguments are sets: when an argument is a set S, we formally mean to use the indicator function χS as a vector, where χS(v) = 1 if v 2 S, and χS(v) = 0 otherwise. In particular, for an activated set A, we write `sq(A, F (S)) = 1 n||χA −F (S)||2 2. We now formally define the problem of learning influence functions from incomplete observations. Let P be a distribution over seed sets (i.e., a distribution over 2V ), and fix a diffusion model M and parameters, together giving rise to a distribution ∆S for each seed set. The algorithm is given a set of M incomplete cascades ˜C = {(S1, ˜A1), . . . , (SM, ˜AM)}, where each Si is drawn independently from P, and ˜Ai is obtained by the incomplete observation process described above from the (random) activated set Ai ⇠∆Si. The goal is to learn an influence function F that accurately captures the diffusion process. Accuracy of the learned influence function is measured in terms of the squared error with respect to the true model: errsq[F ] = ES⇠P,A⇠∆S [`sq(A, F (S))]. That is, the expectation is over the seed set and the randomness in the diffusion process, but not the data loss process. PAC Learnability of Influence Functions. We characterize the learnability of influence functions under incomplete observations using the Probably Approximately Correct (PAC) learning framework [22]. Let FM be the class of influence functions under the diffusion model M, and FL the class of influence functions the learning algorithm is allowed to choose from. We say that FM is PAC learnable if there exists an algorithm A with the following property: for all ", δ 2 (0, 1), all parametrizations of the diffusion model, and all distributions P over seed sets S: when given activation-only 1Narasimhan et al. [16] refer to this model as partial observations; we change the terminology to avoid confusion with “incomplete observations.” 3 and incomplete training cascades ˜C = {(S1, ˜A1), . . . , (SM, ˜AM)} with M ≥poly(n, m, 1/", 1/δ), A outputs an influence function F 2 FL satisfying Prob ˜C[errsq[F ] −errsq[F ⇤] ≥"] δ. Here, F ⇤2 FM is the ground truth influence function. The probability is over the training cascades, including the seed set generation, the stochastic diffusion process, and the missing data process. We say that an influence function learning algorithm A is proper if FL ✓FM; that is, the learned influence function is guaranteed to be an instance of the true diffusion model. Otherwise, we say that A is an improper learning algorithm. 3 Proper PAC Learning under Incomplete Observations In this section, we establish proper PAC learnability of influence functions under the DIC and DLT models. For both diffusion models, FM can be parameterized by an edge parameter vector w, whose entries we are the activation probabilities (DIC model) or edge weights (DLT model). Our goal is to find an influence function F w 2 FM that outputs accurate marginal activation probabilities. While our goal is proper learning — meaning that the function must be from FM — we do not require that the inferred parameters match the true edge parameters w. Our main theoretical results are summarized in Theorems 1 and 2. Theorem 1. Let λ 2 (0, 0.5). The class of influence functions under the DIC model in which all edge activation probabilities satisfy we 2 [λ, 1 −λ] is PAC learnable under incomplete observations with retention rate r. The sample complexity2 is ˜O( n3m "2r4 ). Theorem 2. Let λ 2 (0, 0.5), and consider the class of influence functions under the DLT model such that the edge weight for every edge satisfies we 2 [λ, 1−λ], and for every node v, 1−P u2N(v) wuv 2 [λ, 1 −λ]. This class is PAC learnable under incomplete observations with retention rate r. The sample complexity is ˜O( n3m "2r4 ). In this section, we present the intuition and a proof sketch for the two theorems. Details of the proof are provided in Appendix B. The key idea of the proof of both theorems is that a set of incomplete cascades ˜C on G under the two models can be considered as essentially complete cascades on a transformed graph ˆG = ( ˆV , ˆE). The influence functions of nodes in ˆG can be learned using a modification of the result of Narasimhan et al. [16]. Subsequently, the influence functions for G are directly obtained from the influence functions for ˆG, by exploiting that influence functions only focus on the marginal activation probabilities. The transformed graph ˆG is built by adding a layer of n nodes to the graph G. For each node v 2 V of the original graph, we add a new node v0 2 V 0 and a directed edge (v, v0) with known and fixed edge parameter ˆwvv0 = r. (The same parameter value serves as activation probability under the DIC model and as edge weight under the DLT model.) The new nodes V 0 have no other incident edges, and we retain all edges e = (u, v) 2 E. Inferring their parameters is the learning task. For each observed (incomplete) cascade (Si, ˜Ai) on G (with Si ✓˜Ai), we produce an observed activation set A0 i as follows: (1) for each v 2 ˜Ai \ Si, we let v0 2 A0 i deterministically; (2) for each v 2 Si independently, we include v0 2 A0 i with probability r. This defines the training cascades ˆC = {(Si, A0 i)}. Now consider any edge parameters w, applied to both G and the first layer of ˆG. Let F (S) denote the influence function on G, and ˆF (S) = [ ˆF10(S), . . . , ˆFn0(S)] the influence function of the nodes in the added layer V 0 of ˆG. Then, by the transformation, for all nodes v 2 V , we get that ˆFv0(S) = r · Fv(S). (1) And by the definition of the observation loss process, Prob[v 2 ˜Ai] = r · Fv(S) = ˆFv0(S) for all non-seed nodes v /2 Si. While the cascades ˆC are not complete on all of ˆG, in a precise sense, they provide complete information on the activation of nodes in V 0. In Appendix B, we show that Theorem 2 of Narasimhan et al. [16] can be extended to provide identical guarantees for learning ˆF (S) from the modified 2The ˜O notation suppresses poly-logarithmic dependence on 1/λ, 1/δ, n, and m. 4 observed cascades ˆC. For the DIC model, this is a straightforward modification of the proof from [16]. For the DLT model, [16] had not established PAC learnability3, so we provide a separate proof. Because the results of [16] and our generalizations ensure proper learning, they provide edge weights w between the nodes of V . We use these exact same edge weights to define the learned influence functions in G. Equation (1) then implies that the learned influence functions on V satisfy Fv(S) = 1 r · ˆFv0(S). The detailed analysis in Appendix B shows that the learning error only scales by a multiplicative factor 1 r2 . The PAC learnability result shows that there is no information-theoretical obstacle to influence function learning under incomplete observations. However, it does not imply an efficient algorithm. The reason is that a hidden variable would be associated with each node not observed to be active, and computing the objective function for empirical risk minimization would require marginalizing over all of the hidden variables. The proper PAC learnability result also does not readily generalize to the CIC model and other diffusion models, even under complete observations. This is due to the lack of a succinct characterization of influence functions as under the DIC and DLT models. Therefore, in the next section, we explore improper learning approaches with the goal of designing practical algorithms and establishing learnability under a broader class of diffusion models. 4 Efficient Improper Learning Algorithm Instead of parameterizing the influence functions using the edge parameters, we adopt the model-free influence function learning framework, InfluLearner, proposed by Du et al. [3] to represent the influence function as a sum of weighted basis functions. From now on, we focus on the influence function Fv(S) of a single fixed node v. Influence Function Parameterization. For all three diffusion models (CIC, DIC and DLT), the diffusion process can be characterized equivalently using live-edge graphs. Concretely, the results of [10, 4] state that for each instance of the CIC, DIC, and DLT models, there exists a distribution Γ over live-edge graphs H assigning probability γH to each live-edge graph H such that F ⇤ v (S) = P H:at least one node in S has a path to v in H γH. To reduce the representation complexity, notice that from the perspective of activating v, two different live-edge graphs H, H0 are “equivalent” if v is reachable from exactly the same nodes in H and H0. Therefore, for any node set T, let β⇤ T := P H:exactly the nodes in T have paths to v in H γH. We then use characteristic vectors as feature vectors rT = χT , where we will interpret the entry for node u as u having a path to v in a live-edge graph. More precisely, let φ(x) = min{x, 1}, and χS the characteristic vector of the seed set S. Then, φ(χ> S · rT ) = 1 if and only if v is reachable from S, and we can write F ⇤ v (S) = P T β⇤ T · φ(χ> S · rT ). This representation still has exponentially many features (one for each T). In order to make the learning problem tractable, we sample a smaller set T of K features from a suitably chosen distribution, implicitly setting the weights βT of all other features to 0. Thus, we will parametrize the learned influence function as F β v (S) = P T 2T βT · φ(χ> S · rT ). The goal is then to learn weights βT for the sampled features. (They will form a distribution, i.e., ||β||1 = 1 and β ≥0.) The crux of the analysis is to show that a sufficiently small number K of features (i.e., sampled sets) suffices for a good approximation, and that the weights can be learned efficiently from a limited number of observed incomplete cascades. Specifically, we consider the log likelihood function `(t, y) = y log t + (1 −y) log(1 −t), and learn the parameter vector (a distribution) by maximizing the likelihood PM i=1 `(F β v (Si), χAi(v)). Handling Incomplete Observations. The maximum likelihood estimation cannot be directly applied to incomplete cascades, as we do not have access to Ai (only the incomplete version ˜Ai). To address this issue, notice that the MLE problem is actually a binary classification problem with log loss and yi = χAi(v) as the label. From this perspective, incompleteness is simply class-conditional noise on the labels. Let ˜yi = χ ˜ Ai(v) be our observation of whether v was activated or not under the incomplete cascade i. Then, Prob[˜yi = 1|yi = 1] = r and Prob[˜yi = 1|yi = 0] = 0. In words, 3[16] shows that the DLT model with fixed thresholds is PAC learnable under complete cascades. We study the DLT model when the thresholds are uniformly distributed random variables. 5 the incomplete observation ˜yi suffers from one-sided error compared to the complete observation yi. By results of Natarajan et al. [17], we can construct an unbiased estimator of `(t, y) using only the incomplete observations ˜y, as in the following lemma. Lemma 3 (Corollary of Lemma 1 of [17]). Let y be the true activation of node v and ˜y the incomplete observation. Then, defining ˜`(t, y) := 1 ry log t + 2r−1 r (1 −y) log(1 −t), for any t, we have E˜y h ˜`(t, ˜y) i = `(t, y). Based on this lemma, we arrive at the final algorithm of solving the maximum likelihood estimation problem with the adjusted likelihood function ˜`(t, y): Maximize PM i=1 ˜`(F β v (Si), χ ˜ Ai(v)) (2) subject to ||β||1 = 1, β ≥0. We analyze conditions under which the solution to (2) provides improper PAC learnability under incomplete observations; these conditions will apply for all three diffusion models. These conditions are similar to those of Lemma 1 in the work of Du et al. [3], and concern the approximability of the reachability distribution β⇤ T . Specifically, let q be a distribution over node sets T such that q(T) Cβ⇤ T for all node sets T. Here, C is a (possibly very large) number that we will want to bound below. Let T1, . . . , TK be K i.i.d. samples drawn from the distribution q. The features are then rk = χTk. We use the truncated version of the function F β,λ v (S) with parameter4 λ as in [3]: F β,λ v (S) = (1 −2λ)F β v (S) + λ. Let Mλ be the class of all such truncated influence functions, and F ˜β,λ v 2 Mλ the influence functions obtained from the optimization problem (2). The following theorem (proved in Appendix C) establishes the accuracy of the learned functions. Theorem 4. Assume that the learning algorithm uses K = ˜⌦( C2 "2 ) features in the influence function it constructs, and observes5 M = ˜⌦( log C "4r2 ) incomplete cascades with retention rate r. Then, with probability at least 1 −δ, the learned influence functions F ˜β,λ v for each node v and seed distribution P satisfy ES⇠P h (F ˜β,λ v (S) −F ⇤ v (S))2i ". The theorem implies that with enough incomplete cascades, an algorithm can approximate the ground truth influence function to arbitrary accuracy. Therefore, all three diffusion models are improperly PAC learnable under incomplete observations. The final sample complexity does not contain the graph size, but is implicitly captured by C, which will depend on the graph and how well the distribution β⇤ T can be approximated. Notice that with r = 1, our bound on M has logarithmic dependency on C instead of polynomial, as in [3]. The reason for this improvement is discussed further in Appendix C. Efficient Implementation. As mentioned above, the features T cannot be sampled from the exact reachability distribution β⇤ T , because it is inaccessible (and complex). In order to obtain useful guarantees from Theorem 4, we follow the approach of Du et al. [3], and approximate the distribution β⇤ T with the product of the marginal distributions, estimated from observed cascades. The optimization problem (2) is convex and can therefore be solved in time polynomial in the number of features K. However, the guarantees in Theorem 4 require a possibly large number of features. In order to obtain an efficient algorithm for practical use and our experiments, we sacrifice the guarantee and use a fixed number of features. 5 Experiments In this section, we experimentally evaluate the algorithm from Section 4. Since no other methods explicitly account for incomplete observations, we compare it to several state-of-the-art methods for influence function learning with full information. Hence, the main goal of the comparison is to examine to what extent the impact of missing data can be mitigated by being aware of it. We compare 4The proof of Theorem 4 in Appendix C will show how to choose λ. 5The ˜⌦notation suppresses all logarithmic terms except log C, as C could be exponential or worse in the number of nodes. 6 (a) CIC (b) DIC (c) DLT Figure 1: MAE of estimated influence as a function of the retention rate on synthetic datasets for (a) CIC model, (b) DIC model, (c) DLT model. The error bars show one standard deviation. our algorithm to the following approaches: (1) CIC fits the parameters of a CIC model, using the NetRate algorithm [7] with exponential delay distribution. (2) DIC fits the activation probabilities of a DIC model using the method in [18]. (3) InfluLearner is the model-free approach proposed by Du et al. in [3] and discussed in Section 4. (4) Logistic uses logistic regression to learn the influence functions Fu(S) = f(χ> S ·cu +b) for each u independently, where cu is a learnable weight vector and f(x) = 1 1+e−x is the logistic function. (5) Linear uses linear regression to learn the total influence σ(S) = c> · χS + b of the set S. Notice that the CIC and DIC methods have access to the activation time of each node in addition to the final activation status, giving them an inherent advantage. 5.1 Synthetic cascades Data generation. We generate synthetic networks with core-peripheral structure following the Kronecker graph model [12] with parameter matrix [0.9, 0.5; 0.5, 0.3].6 Each generated network has 512 nodes and 1024 edges. Subsequently, we generate 8192 cascades as training data using the CIC, DIC and DLT models, with random seed sets whose sizes are power law distributed. The retention rate is varied between 0.1 and 0.9. The test set contains 200 independently sampled seed sets generated in the same way as the training data. Details of the data generation process are provided in Appendix A. Algorithm settings. We apply all algorithms to cascades generated from all three models; that is, we also consider the results under model misspecification. Whenever applicable, we set the hyperparameters of the five comparison algorithms to the ground truth values. When applying the NetRate algorithm to discrete-time cascades, we set the observation window to 10.0. When applying the method in [18] to continuous-time cascades, we round activation times up to the nearest multiple of 0.1, resulting in 10 discrete time steps. For the model-free approaches (InfluLearner and our algorithm), we use K = 200 features. Results. Figure 1 shows the Mean Absolute Error (MAE) between the estimated total influence σ(S) and the true influence value, averaged over all testing seed sets. For each setting (diffusion model and retention rate), the reported MAE is averaged over five independent runs. The main insight is that accounting for missing observations indeed strongly mitigates their effect: notice that for retention rates as small as 0.5, our algorithm can almost completely compensate for the data loss, whereas both the model-free and parameter fitting approaches deteriorate significantly even for retention rates close to 1. For the parameter fitting approaches, even such large retention rates can lead to missing and spurious edges in the inferred networks, and thus significant estimation errors. Additional observations include that fitting influence using (linear or logistic) regression does not perform well at all, and that the CIC inference approach appears more robust to model misspecification than the DIC approach. Sensitivity of retention rate. We presented the algorithms as knowing r. Since r itself is inferred from noisy data, it may be somewhat misestimated. Figure 2 shows the impact of misestimating r. We generate synthetic cascades from all three diffusion models with a true retention rate of 0.8, and 6We also experimented on Kronecker graphs with hierarchical community structure ([0.9, 0.1; 0.1, 0.9]) and random structure ([0.5, 0.5; 0.5, 0.5]). The results are similar and omitted due to space constraints. 7 !10 !5 0 5 10 15 20 25 30 35 40 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 CIC DIC DLT Figure 2: Relative error in MAE under retention rate misspecification. x-axis: retention rate r used by the algorithm. y-axis: relative difference of MAE compared to using the true retention rate 0.8. 0 5 10 15 20 25 30 35 1 2 3 4 5 6 7 MAE Groups2of2memes Linear Logistic DIC CIC InfluLearner Our3Method Figure 3: MAE of influence estimation on seven sets of real-world cascades with 20% of activations missing. then apply our algorithm with (incorrect) retention rate r 2 {0.6, 0.65, . . . , 0.95, 1}. The results are averaged over five independent runs. While the performance decreases as the misestimation gets worse (after all, with r = 1, the algorithm is basically the same as InfluLearner), the degradation is graceful. 5.2 Influence Estimation on real cascades We further evaluate the performance of our method on the real-world MemeTracker7 dataset [11]. The dataset consists of the propagation of short textual phrases, referred to as Memes, via the publication of blog posts and main-stream media news articles between March 2011 and February 2012. Specifically, the dataset contains seven groups of cascades corresponding to the propagation of Memes with certain keywords, namely “apple and jobs”, “tsunami earthquake”, “william kate marriage”’, “occupy wall-street”, “airstrikes”, “egypt” and “elections.” Each cascade group consists of 1000 nodes, with a number of cascades varying from 1000 to 44000. We follow exactly the same evaluation method as Du et al. [3] with a training/test set split of 60%/40%. To test the performance of influence function learning under incomplete observations, we randomly delete 20% of the occurrences, setting r = 0.8. The results for other retention rates are similar and omitted. Figure 3 shows the MAE of our methods and the five baselines, averaged over 100 random draws of test seed sets, for all groups of memes. While some baselines perform very poorly, even compared to the best baseline (InfluLearner), our algorithm provides an 18% reduction in MAE (averaged over the seven groups), showing the potential of data loss awareness to mitigate its effects. 6 Extensions and Future Work In the full version available on arXiv, we show both experimentally and theoretically how to generalize our results to non-uniform (but independent) loss of node activations, and how to deal with a misestimation of the retention rate r. Any non-trivial partial information about r leads to positive PAC learnability results. A much more significant departure for future work would be dependent loss of activations, e.g., losing all activations of some randomly chosen nodes. As another direction, it would be worthwhile to generalize the PAC learnability results to other diffusion models, and to design an efficient algorithm with PAC learning guarantees. Acknowledgments We would like to thank anonymous reviewers for useful feedback. The research was sponsored in part by NSF research grant IIS-1254206 and by the U.S. Defense Advanced Research Projects Agency (DARPA) under the Social Media in Strategic Communication (SMISC) program, Agreement Number W911NF-12-1-0034. The views and conclusions are those of the authors and should not be interpreted as representing the official policies of the funding agency or the U.S. Government. 7We use the preprocessed version of the dataset released by Du et al. [3] and available at http://www.cc. gatech.edu/~ndu8/InfluLearner.html. Notice that the dataset is semi-real, as multi-node seed cascades are artificially created by merging single-node seed cascades. 8 References [1] K. Amin, H. Heidari, and M. Kearns. Learning from contagion (without timestamps). In Proc. 31st ICML, pages 1845–1853, 2014. [2] F. Chierichetti, D. Liben-Nowell, and J. M. Kleinberg. Reconstructing Patterns of Information Diffusion from Incomplete Observations. In Proc. 23rd NIPS, pages 792–800, 2011. [3] N. Du, Y. Liang, M.-F. Balcan, and L. Song. Influence Function Learning in Information Diffusion Networks. In Proc. 31st ICML, pages 2016–2024, 2014. [4] N. Du, L. Song, M. Gomez-Rodriguez, and H. Zha. Scalable Influence Estimation in ContinuousTime Diffusion Networks. In Proc. 25th NIPS, pages 3147–3155, 2013. [5] N. Du, L. Song, S. Yuan, and A. J. Smola. Learning Networks of Heterogeneous Influence. In Proc. 24th NIPS, pages 2780–2788. 2012. [6] Q. Duong, M. P. Wellman, and S. P. Singh. Modeling information diffusion in networks with unobserved links. In SocialCom/PASSAT, pages 362–369, 2011. [7] M. Gomez-Rodriguez, D. Balduzzi, and B. Schölkopf. Uncovering the temporal dynamics of diffusion networks. In Proc. 28th ICML, pages 561–568, 2011. [8] M. Gomez-Rodriguez, J. Leskovec, and A. Krause. Inferring networks of diffusion and influence. ACM Transactions on Knowledge Discovery from Data, 5(4), 2012. [9] A. Goyal, F. Bonchi, and L. V. S. Lakshmanan. Learning influence probabilities in social networks. In Proc. 3rd WSDM, pages 241–250, 2010. [10] D. Kempe, J. Kleinberg, and E. Tardos. Maximizing the Spread of Influence in a Social Network. In Proc. 9th KDD, pages 137–146, 2003. [11] J. Leskovec, L. Backstrom, and J. Kleinberg. Meme-tracking and the dynamics of the news cycle. In Proc. 15th KDD, pages 497–506, 2009. [12] J. Leskovec, D. Chakrabarti, J. Kleinberg, C. Faloutsos, and Z. Ghahramani. Kronecker graphs: An approach to modeling networks. The Journal of Machine Learning Research, 11:985–1042, 2010. [13] A. Lokhov. Reconstructing parameters of spreading models from partial observations. In Proc. 28th NIPS, pages 3459–3467, 2016. [14] S. A. Myers and J. Leskovec. On the convexity of latent social network inference. In Proc. 22nd NIPS, pages 1741–1749, 2010. [15] S. A. Myers, C. Zhu, and J. Leskovec. Information Diffusion and External Influence in Networks. In Proc. 18th KDD, pages 33–41, 2012. [16] H. Narasimhan, D. C. Parkes, and Y. Singer. Learnability of Influence in Networks. In Proc. 27th NIPS, pages 3168–3176, 2015. [17] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari. Learning with noisy labels. In Proc. 25th NIPS, pages 1196–1204, 2013. [18] N. Praneeth and S. Sujay. Learning the Graph of Epidemic Cascades. In Proc. 12th ACM Sigmetrics, pages 211–222, 2012. [19] D. Quang, W. M. P, and S. S. P. Modeling Information Diffusion in Networks with Unobserved Links. In SocialCom, pages 362–369, 2011. [20] N. Rosenfeld, M. Nitzan, and A. Globerson. Discriminative learning of infection models. In Proc. 9th WSDM, pages 563–572, 2016. [21] E. Sadikov, M. Medina, J. Leskovec, and H. Garcia-Molina. Correcting for missing data in information cascades. In Proc. 4th WSDM, pages 55–64, 2011. [22] L. G. Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [23] X. Wu, A. Kumar, D. Sheldon, and S. Zilberstein. Parameter learning for latent network diffusion. In Proc. 29th IJCAI, pages 2923–2930, 2013. [24] S.-H. Yang and H. Zha. Mixture of Mutually Exciting Processes for Viral Diffusion. In Proc. 30th ICML, pages 1–9, 2013. [25] K. Zhou, H. Zha, and L. Song. Learning Social Infectivity in Sparse Low-rank Network Using Multi-dimensional Hawkes Processes. In Proc. 30th ICML, pages 641–649, 2013. 9 | 2016 | 237 |
6,147 | Backprop KF: Learning Discriminative Deterministic State Estimators Tuomas Haarnoja, Anurag Ajay, Sergey Levine, Pieter Abbeel {haarnoja, anuragajay, svlevine, pabbeel}@berkeley.edu Department of Computer Science, University of California, Berkeley Abstract Generative state estimators based on probabilistic filters and smoothers are one of the most popular classes of state estimators for robots and autonomous vehicles. However, generative models have limited capacity to handle rich sensory observations, such as camera images, since they must model the entire distribution over sensor readings. Discriminative models do not suffer from this limitation, but are typically more complex to train as latent variable models for state estimation. We present an alternative approach where the parameters of the latent state distribution are directly optimized as a deterministic computation graph, resulting in a simple and effective gradient descent algorithm for training discriminative state estimators. We show that this procedure can be used to train state estimators that use complex input, such as raw camera images, which must be processed using expressive nonlinear function approximators such as convolutional neural networks. Our model can be viewed as a type of recurrent neural network, and the connection to probabilistic filtering allows us to design a network architecture that is particularly well suited for state estimation. We evaluate our approach on synthetic tracking task with raw image inputs and on the visual odometry task in the KITTI dataset. The results show significant improvement over both standard generative approaches and regular recurrent neural networks. 1 Introduction State estimation is an important component of mobile robotic applications, including autonomous driving and flight [22]. Generative state estimators based on probabilistic filters and smoothers are one of the most popular classes of state estimators. However, generative models are limited in their ability to handle rich observations, such as camera images, since they must model the full distribution over sensor readings. This makes it difficult to directly incorporate images, depth maps, and other high-dimensional observations. Instead, the most popular methods for vision-based state estimation (such as SLAM [22]) are based on domain knowledge and geometric principles. Discriminative models do not need to model the distribution over sensor readings, but are more complex to train for state estimation. Discriminative models such as CRFs [16] typically do not use latent variables, which means that training data must contain full state observations. Most real-world state estimation problem settings only provide partial labels. For example, we might observe noisy position readings from a GPS sensor and need to infer the corresponding velocities. While discriminative models can be augmented with latent state [18], this typically makes them harder to train. We propose an efficient and scalable method for discriminative training of state estimators. Instead of performing inference in a probabilistic latent variable model, we instead construct a deterministic computation graph with equivalent representational power. This computation graph can then be optimized end-to-end with simple backpropagation and gradient descent methods. This corresponds to a type of recurrent neural network model, where the architecture of the network is informed by the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. structure of the probabilistic state estimator. Aside from the simplicity of the training procedure, one of the key advantages of this approach is the ability to incorporate arbitrary nonlinear components into the observation and transition functions. For example, we can condition the transitions on raw camera images processed by multiple convolutional layers, which have been shown to be remarkably effective for interpreting camera images. The entire network, including the observation and transition functions, is trained end-to-end to optimize its performance on the state estimation task. The main contribution of this work is to draw a connection between discriminative probabilistic state estimators and recurrent computation graphs, and thereby derive a new discriminative, deterministic state estimation method. From the point of view of probabilistic models, we propose a method for training expressive discriminative state estimators by reframing them as representationally equivalent deterministic models. From the point of view of recurrent neural networks, we propose an approach for designing neural network architectures that are well suited for state estimation, informed by successful probabilistic state estimation models. We evaluate our approach on a visual tracking problem, which requires processing raw images and handling severe occlusion, and on estimating vehicle pose from images in the KITTI dataset [8]. The results show significant improvement over both standard generative methods and standard recurrent neural networks. 2 Related Work xt−1 xt xt+1 ot−1 ot ot+1 Figure 1: A generative state space model with hidden states xi and observation ot generated by the model. ot are observed at both training and test time. Some of the most successful methods for state estimation have been probabilistic generative state space models (SSMs) based on filtering and smoothing (Figure 1). Kalman filters are perhaps the best known state estimators, and can be extended to the case of nonlinear dynamics through linearization and the unscented transform. Nonparametric filtering methods, such as particle filtering, are also often used for tasks with multimodal posteriors. For a more complete review of state estimation, we refer the reader to standard references on this topic [22]. Generative models aim to estimate the distribution over state observation sequences o1:T as originating from some underlying hidden state x1:T , which is typically taken to be the state space of the system. This becomes impractical when the observation space is extremely high dimensional, and when the observation is a complex, highly nonlinear function of the state, as in the case of vision-based state estimation, where ot corresponds to an image viewed from a robot’s on-board camera. The challenges of generative state space estimation can be mitigated by using complex observation models [14] or approximate inference [15], but building effective generative models of images remains a challenging open problem. As an alternative to generative models, discriminative models such as conditional random fields (CRFs) can directly estimate p(xt|o1:t) [16]. A number of CRFs and conditional state space models (CSSMs) have been applied to state estimation [21, 20, 12, 17, 9], typically using a log-linear representation. More recently, discriminative fine-tuning of generative models with nonlinear neural network observations [6], as well as direct training of CRFs with neural network factors [7], have allowed for training of nonlinear discriminative models. However, such models have not been extensively applied to state estimation. Training CRFs and CSSMs typically requires access to true state labels, while generative models only require observations, which often makes them more convenient for physical systems where the true underlying state is unknown. Although CRFs have also been combined with latent states [18], the difficulty of CRF inference makes latent state CRF models difficult to train. Prior work has also proposed to optimize SSM parameters with respect to a discriminative loss [1]. In contrast to this work, our approach incorporates rich sensory observations, including images, and allows for training of highly expressive discriminative models. Our method optimizes the state estimator as a deterministic computation graph, analogous to recurrent neural network (RNN) training. The use of recurrent neural networks (RNNs) for state estimation has been explored in several prior works [24, 4, 23, 19], but has generally been limited to simple tasks without complex sensory inputs such as images. Part of the reason for this is the difficulty of training general-purpose RNNs. Recently, innovative RNN architectures have been successful at mitigating this problem, through models such as the long short-term memory (LSTM) [10] and the 2 xt−1 xt xt+1 zt−1 zt zt+1 ot−1 ot ot+1 yt−1 yt yt+1 (a) κ st−2 κ st−1 κ st st+1 gθ zt−1 gθ zt gθ zt+1 ot−1 ot ot+1 q st−1 q st q st+1 φyt−1 φyt φyt+1 (b) Figure 2: (a) Standard two-step engineering approach for filtering with high-dimensional observations. The generative part has hidden state xt and two observations, yt and zt, where the latter observation is actually the output of a second deterministic model zt = gθ(ot), denoted by dashed lines and trained explicitly to predict zt. (b) Computation graph that jointly optimizes both models in (a), consisting of the deterministic map gθ and a deterministic filter that infers the hidden state given zt. By viewing the entire model as a single deterministic computation graph, it can be trained end-to-end using backpropagation as explained in Section 4. gated recurrent unit (GRU) [5]. LSTMs have been combined with vision for perception tasks such as activity recognition [3]. However, in the domain of state estimation, such black-box models ignore the considerable domain knowledge that is available. By drawing a connection between filtering and recurrent networks, we can design recurrent computation graphs that are particularly well suited to state estimation and, as shown in our evaluation, can achieve improved performance over standard LSTM models. 3 Preliminaries Performing state estimation with a generative model directly using high-dimensional observations ot, such as camera images, is very difficult, because these observations are typically produced by a complex and highly nonlinear process. However, in practice, a low-dimensional vector, zt, which can be extracted from ot, can fully capture the dependence of the observation on the underlying state of the system. Let xt denote this state, and let yt denote some labeling of the states that we wish to be able to infer from ot. For example, ot might correspond to pairs of images from a camera on an automobile, zt to its velocity, and yt to the location of the vehicle. In that case, we can first train a discriminative model gθ(ot) to predict zt from ot in feedforward manner, and then filter the predictions to output the desired state labels y1:t. For example, a Kalman filter with hidden state xt could be trained to use the predicted zt as observations, and then perform inference over xt and yt at test time. This standard approach for state estimation with high-dimensional observations is illustrated in Figure 2a. While this method may be viewed as an engineering solution without a probabilistic interpretation, it has the advantage that gθ(ot) is trained discriminatively, and the entire model is conditioned on ot, with xt acting as an internal latent variable. This is why the model does not need to represent the distribution over observations explicitly. However, the function gθ(ot) that maps the raw observations ot to low-dimensional predictions zt is not trained for optimal state estimation. Instead, it is trained to predict an intermediate variable zt that can be readily integrated into the generative filter. 4 Discriminative Deterministic State Estimation Our contribution is based on a generalized view of state estimation that subsumes the naïve, piecewisetrained models discussed in the previous section and allows them to be trained end-to-end using simple and scalable stochastic gradient descent methods. In the naïve approach, the observation function gθ(ot) is trained to directly predict zt, since a standard generative filter model does not provide for a straightforward way to optimize gθ(ot) with respect to the accuracy of the filter on the labels y1:T . However, the filter can be viewed as a computation graph unrolled through time, as shown in Figure 2b. In this graph, the filter has an internal state defined by the posterior over xt. For 3 example, in a Kalman filter with Gaussian posteriors, we can represent the internal state with the tuple st = (µxt, Σxt). In general, we will use st to refer to the state of any filter. We also augment this graph with an output function q(st) = φyt that outputs the parameters of a distribution over labels yt. In the case of a Kalman filter, we would simply have q(st) = (Cyµxt, CyΣxtCT y), where the matrix Cy defines a linear observation function from xt to yt. Viewing the filter as a computation graph in this way, gθ(ot) can be trained discriminatively on the entire sequence, rather than individually on single time steps. Let l(φyt) be a loss function on the output distribution of the computation graph, which might, for example, be given by l(φyt) = −log pφyt (yt), where pφyt is the distribution induced by the parameters φyt, and yt is the label. Let L(θ) = P t l(φyt) be the loss on an entire sequence with respect to θ. Furthermore, let κ(st, zt+1) denote the operation performed by the filter to compute st+1 based on st and zt+1. We can compute the gradient of l(θ) with respect to the parameters θ by first recursively computing the gradient of the loss with respect to the filter state st from the back to the front according to the following recursion: dL dst−1 = dφyt−1 dst dL dφyt−1 + dst dst−1 dL dst , (1) and then applying the chain rule to obtain ∇θL(θ) = T X t=1 dzt dθ dst dzt dL dst . (2) All of the derivatives in these equations can be obtained from gθ(ot), κ(st−1, zt), q(st), and l(φyt): dst dst−1 = ∇st−1κ(st−1, zt), dst dzt = ∇ztκ(st−1, zt), dL dφyt = ∇φyt l(φyt), dφyt dst = ∇stq(st), dzt dθ = ∇θgθ(ot). (3) The parameters θ can be optimized with gradient descent using these gradients. This is an instance of backpropagation through time (BPTT), a well known algorithm for training recurrent neural networks. Recognizing this connection between state-space models and recurrent neural networks allows us to extend this generic filtering architecture and explore the continuum of models between filters with a discriminatively trained observation model gθ(ot) all the way to fully general recurrent neural networks. In our experimental evaluation, we use a standard Kalman filter update as κ(st, zt+1), but we use a nonlinear convolutional neural network observation function gθ(ot). We found that this provides a good trade-off between incorporating domain knowledge and end-to-end learning for the task of visual tracking and odometry, but other variants of this model could be explored in future work. 5 Experimental Evaluation In this section, we compare our deterministic discriminatively trained state estimator with a set of alternative methods, including simple feedforward convolutional networks, piecewise-trained Kalman filter, and fully general LSTM models. We evaluate these models on two tasks that require processing of raw image input: synthetic task of tracking a red disk in the presence of clutter and severe occlusion; and the KITTI visual odometry task [8]. 5.1 State Estimation Models Our proposed model, which we call the “backprop Kalman filter” (BKF), is a computation graph made up of a Kalman filter (KF) and a feedforward convolutional neural network that distills the observation ot into a low-dimensional signal zt, which serves as the observation for the KF. The neural network outputs both a point observation zt and an observation covariance matrix Rt. Since the network is trained together with the filter, it can learn to use the covariance matrix to communicate the desired degree of uncertainty about the observation, so as to maximize the accuracy of the final filter prediction. 4 ot conv resp_norm ReLU max_pool conv h1 resp_norm ReLU max_pool fc h2 ReLU fc h3 ReLU fc zt fc ˆLt h4 reshape diag exp Lt LtLT t Rt AΣxt−1AT + BwQBT w Σ′ xt Σxt−1 Σ′ xtCT z CzΣ′ xtCT z + Rt −1 Kt Aµxt−1 µ′ xt µxt−1 µ′ xt + Kt zt −Czµ′ xt (I −KtCz) Σ′ xt Σxt PN i=1 PT t=1 1 2T N
Cyµ(i) xt −y(i) t
2 2 µxt yt Feedforward network Kalman filter Loss Figure 3: Illustration of the computation graph for the BKF. The graph is composed of a feedforward part, which processes the raw images ot and outputs intermediate observations zt and a matrix ˆLt that is used to form a positive definite observation covariance matrix Rt, and a recurrent part that integrates zt through time to produce filtered state estimates. See Appendix A for details. We compare the backprop KF to three alternative state estimators: the “feedforward model”, the “piecewise KF”, and the “LSTM model”. The simplest of the models, the feedforward model, does not consider the temporal structure in the task at all, and consists only of a feedforward convolutional network that takes in the observations ot and outputs a point estimate ˆyt of the label yt. This approach is viable only if the label information can be directly inferred from ot, such as when tracking an object. On the other hand, tasks that require long term memory, such as visual odometry, cannot be solved with a plain feedforward network. The piecewise KF model corresponds to the simple generative approach described in Section 3, which combines the feedforward network with a Kalman filter that filters the network predictions zt to produce a distribution over the state estimate ˆxt. The piecewise model is based on the same computation graph as the BKF, but does not optimize the filter and network together end-to-end, instead training the two pieces separately. The only difference between the two graphs is that the piecewise KF does not implement the additional pathway for propagating the uncertainty from the feedforward network into the filter, but instead, the filter needs to learn to handle the uncertainty in zt independently. An example instantiation of BKF is depicted in Figure 3. A detailed overview of the computational blocks shown in the figure is deferred to Appendix A. Finally, we compare to a recurrent neural network based on LSTM hidden units [10]. This model resembles the backprop KF, except that the filter portion of the graph is replaced with a generic LSTM layer. The LSTM model learns the dynamics from data, without incorporating the domain knowledge present in the KF. 5.2 Neural Network Design A special aspect of our network design is a novel response normalization layer that is applied to the convolutional activations before applying the nonlinearity. The response normalization transforms the activations such that the activations of layer i have always mean µi and variance σ2 i regardless of the input to the layer. The parameters µi and σ2 i are learned along with other parameters. This normalization is used in all of the convolutional networks in our evaluation, and resembles batch normalization [11] in its behavior. However, we found this approach to be substantially more effective for recurrent models that require backpropagation through time, compared to the more standard batch normalization approach, which is known to require additional care when applied to recurrent networks. It has been since proposed independently from our work in [2], which gives an in-depth analysis of the method. The normalization is followed by a rectified linear unit (ReLU) and a max pooling layer. 5.3 Synthetic Visual State Estimation Task Our state estimation task is meant to reflect some of the typical challenges in visual state estimation: the need for long-term tracking to handle occlusions, the presence of noise, and the need to process raw pixel data. The task requires tracking a red disk from image observations, as shown in Figure 4. Distractor disks with random colors and radii are added into the scene to occlude the red disk, and the trajectories of all disks follow linear-Gaussian dynamics, with a linear spring force that pulls the disks toward the center of the frame and a drag force that prevents high velocities. The disks can temporally leave the frame since contacts are not modeled. Gaussian noise is added to perturb the motion. While these model parameters are assumed to be known in the design of the filter, it is a straightforward to learn also the model parameters. The difficulty of the task can be adjusted by increasing or decreasing the number of distractor disks, which affects the frequency of occlusions. 5 Figure 4: Illustration of six consecutive frames of two training sequences. The objective is to track the red disk (circled in the the first frame for illustrative purposes) throughout the 100-frame sequence. The distractor disks are sampled for each sequence at random and overlaid on top of the target disk. The upper row illustrates an easy sequence (9 distractors), while the bottom row is a sequence of high difficulty (99 distractors). Note that the target is very rarely visible in the hardest sequences. Table 1: Benchmark Results State Estimation Model # Parameters RMS test error ±σ feedforward model 7394 0.2322 ± 0.1316 piecewise KF 7397 0.1160 ± 0.0330 LSTM model (64 units) 33506 0.1407 ± 0.1154 LSTM model (128 units) 92450 0.1423 ± 0.1352 BKF (ours) 7493 0.0537 ± 0.1235 The easiest variants of the task are solvable with a feedforward estimator, while the hardest variants require long-term tracking through occlusion. To emphasize the sample efficiency of the models, we trained them using 100 randomly sampled sequences. The results in Table 1 show that the BKF outperforms both the standard probabilistic KF-based estimators and the more powerful and expressive LSTM estimators. The tracking error of the simple feedforward model is significantly larger due to the occlusions, and the model tends to predict the mean coordinates when the target is occluded. The piecewise model performs better, but because the observation covariance is not conditioned on ot, the Kalman filter learns to use a very large observation covariance, which forces it to rely almost entirely on the dynamics model for predictions. On the other hand, since the BKF learns to output the observation covariances conditioned on ot that optimize the performance of the filter, it is able to find a compromise between the observations and the dynamics model. Finally, although the LSTM model is the most general, it performs worse than the BKF, since it does not incorporate prior knowledge about the structure of the state estimation problem. 0 20 40 60 80 100 # distractors 10-3 10-2 10-1 100 RMS error feedforward piecewise LSTM Figure 5: The RMS error of various models trained on a single training set that contained sequences of varying difficulty. The models were then evaluated on several test sets of fixed difficulty. To test the robustness of the estimator to occlusions, we trained each model on a training set of 1000 sequences of varying amounts of clutter and occlusions. We then evaluated the models on several test sets, each corresponding to a different level of occlusion and clutter. The tracking error as the test set difficulty is varied is shown Figure 5. Note that even in the absence of distractors, BKF and LSTM models outperform the feedforward model, since the target occasionally leaves the field of view. The performance of the piecewise KF does not change significantly as the difficulty increases: due to the high amount of clutter during training, the piecewise KF learns to use a large observation covariance and rely primarily on feedforward estimates for prediction. The BKF achieves the lowest error in nearly all cases. At the same time, the BKF also has dramatically fewer parameters than the LSTM models, since the transitions correspond to simple Kalman filter updates. 6 Figure 6: Example image sequence from the KITTI dataset (top row) and the corresponding difference image that is obtained by subtracting the RGB values of the previous image from the current image (bottom row). The observation ot is formed by concatenating the two images into a six-channel feature map which is then treated as an input to a convolutional neural network. The figure shows every fifth sample from the original sequence for illustrative purpose. Table 2: KITTI Visual Odometry Results Test 100 Test 100/200/400/800 # training trajectories 3 6 10 3 6 10 Translational Error [m/m] piecewise KF 0.3257 0.2452 0.2265 0.3277 0.2313 0.2197 LSTM model (128 units) 0.5022 0.3456 0.2769 0.5491 0.4732 0.4352 LSTM model (256 units) 0.5199 0.3172 0.2630 0.5439 0.4506 0.4228 BKF (ours) 0.3089 0.2346 0.2062 0.2982 0.2031 0.1804 Rotational Error [deg/m] piecewise KF 0.1408 0.1028 0.0978 0.1069 0.0768 0.0754 LSTM model (128 units) 0.5484 0.3681 0.3767 0.4123 0. 3573 0.3530 LSTM model (256 units) 0.4960 0.3391 0.2933 0.3845 0.3566 0.3221 BKF (ours) 0.1207 0.0901 0.0801 0.0888 0.0587 0.0556 5.4 KITTI Visual Odometry Experiment Next, we evaluated the state estimation models on visual odometry task in the KITTI dataset [8] (Figure 6, top row). The publicly available training set contains 11 trajectories of ego-centric video sequences of a passenger car driving in suburban scenes, along with ground truth position and orientation. The dataset is challenging since it is relatively small for learning-based algorithms, and the trajectories are visually very diverse. For training the Kalman filter variants, we used a simplified state-space model with three of the state variables corresponding to the vehicle’s 2D pose (two spatial coordinates and heading) and two for the forward and angular velocities. Because the dynamics model is non-linear, we equipped our model-based state estimators with extended Kalman filters, which is a straightforward addition to the BKF framework. The objective of the task is to estimate the relative change in the pose during fixed-length subsequences. However, because inferring the pose requires integration over all past observations, a simple feedforward model cannot be used directly. Instead, we trained a feedforward network, consisting of four convolutional and two fully connected layers and having approximately half a million parameters, to estimate the velocities from pairs of images at consecutive time steps. In practice, we found it better to use a difference image, corresponding to the change in the pixel intensities between the images, along with the current image as an input to the feedforward network (Figure 6). The ground truth velocities, which were used to train the piecewise KF as well as to pretrain the other models, were computed by finite differencing from the ground truth positions. The recurrent models–piecewise KF, the BKF, and the LSTM model–were then fine-tuned to predict the vehicle’s pose. Additionally, for the LSTM model, we found it crucial to pretrain the recurrent layer to predict the pose from the velocities before fine-tuning. We evaluated each model using 11-fold cross-validation, and we report the average errors of the held-out trajectories over the folds. We trained the models by randomly sampling subsequences of 100 time steps. For each fold, we constructed two test sets using the held-out trajectory: the first set contains all possible subsequences of 100 time steps, and the second all subsequences of lengths 100, 200, 400, and 800.1 We repeated each experiment using 3, 6, or all 10 of the sequences in each training fold to evaluate the resilience of each method to overfitting. 1The second test set aims to mimic the official (publicly unavailable) test protocol. Note, however, that because the methods are not tested on the same sequences as the official test set, they are not directly comparable to results on the official KITTI benchmark. 7 Table 2 lists the cross-validation results. As expected, the error decreases consistently as the number of training sequences becomes larger. In each case, BKF outperforms the other variants in both predicting the position and heading of the vehicle. Because both the piecewise KF and the BKF incorporate domain knowledge, they are more data-efficient. Indeed, the performance of the LSTM degrades faster as the number of training sequences is decreased. Although the models were trained on subsequences of 100 time steps, they were also tested on a set containing a mixture of different sequence lengths. The LSTM model generally failed to generalize to longer sequences, while the Kalman filter variants perform slightly better on mixed sequence lengths. 6 Discussion In this paper, we proposed a discriminative approach to state estimation that consists of reformulating probabilistic generative state estimation as a deterministic computation graph. This makes it possible to train our method end-to-end using simple backpropagation through time (BPTT) methods, analogously to a recurrent neural network. In our evaluation, we present an instance of this approach that we refer to as the backprop KF (BKF), which corresponds to a (extended) Kalman filter combined with a feedforward convolutional neural network that processes raw image observations. Our approach to state estimation has two key benefits. First, we avoid the need to construct generative state space models over complex, high-dimensional observation spaces such as raw images. Second, by reformulating the probabilistic state-estimator as a deterministic computation graph, we can apply simple and effective backpropagation and stochastic gradient descent optimization methods to learn the model parameters. This avoids the usual challenges associated with inference in continuous, nonlinear conditional probabilistic models, while still preserving the same representational power as the corresponding approximate probabilistic inference method, which in our experiments corresponds to approximate Gaussian posteriors in a Kalman filter. Our approach also can be viewed as an application of ideas from probabilistic state-space models to the design of recurrent neural networks. Since we optimize the state estimator as a deterministic computation graph, it corresponds to a particular type of deterministic neural network model. However, the architecture of this neural network is informed by principled and well-motivated probabilistic filtering models, which provides us with a natural avenue for incorporating domain knowledge into the system. Our experimental results indicate that end-to-end training of a discriminative state estimators can improve their performance substantially when compared to a standard piecewise approach, where a discriminative model is trained to process the raw observations and produce intermediate lowdimensional observations that can then be integrated into a standard generative filter. The results also indicate that, although the accuracy of the BKF can be matched by a recurrent LSTM network with a large number of hidden units, BKF outperforms the general-purpose LSTM when the dataset is limited in size. This is due to the fact that BKF incorporates domain knowledge about the structure of probabilistic filters into the network architecture, providing it with a better inductive bias when the training data is limited, which is the case in many real-world robotic applications. In our experiments, we primarily focused on models based on the Kalman filter. However, our approach to state estimation can equally well be applied to other probabilistic filters for which the update equations (approximate or exact) can be written in closed form, including the information filter, the unscented Kalman filter, and the particle filter, as well as deterministic filters such as state observers or moving average processes. As long as the filter can be expressed as a differentiable mapping from the observation and previous state to the new state, we can construct and differentiate the corresponding computation graph. An interesting direction for future work is to extend discriminative state-estimators with complex nonlinear dynamics and larger latent state. For example, one could explore the continuum of models that span the space between simple KF-style state estimators and fully general recurrent networks. The trade-off between these two extremes is between generality and domain knowledge, and striking the right balance for a given problem could produce substantially improved results even with relative modest amounts of training data. Acknowledgments This research was funded in part by ONR through a Young Investigator Program award, by the Army Research Office through the MAST program, and by the Berkeley DeepDrive Center. 8 References [1] P. Abbeel, A. Coates, M. Montemerlo, A. Y. Ng, and S. Thrun. Discriminative training of kalman filters. In Robotics: Science and Systems (R:SS), 2005. [2] J. L. Ba, J. R. Kiros, and G. E. Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. [3] M. Baccouche, F. Mamalet, C. Wolf, C. Garcia, and A. Baskurt. Sequential deep learning for human action recognition. In Second International Conference on Human Behavior Unterstanding, pages 29–39, Berlin, Heidelberg, 2011. Springer-Verlag. [4] O. Bobrowski, R. Meir, S. Shoham, and Y. C. Eldar. A neural network implementing optimal state estimation based on dynamic spike train decoding. In Advances in Neural Information Processing Systems (NIPS), 2007. [5] K. Cho, B. van Merrienboer, C. Gulcehre, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [6] G. E. Dahl, D. Yu, L. Deng, and A. Acero. Context-dependent pre-trained deep neural networks for large-vocabulary speech recognition. Audio, Speech, and Language Processing, IEEE Transactions on, 20(1):30–42, 2012. [7] T. Do, T. Arti, et al. Neural conditional random fields. In International Conference on Artificial Intelligence and Statistics, pages 177–184, 2010. [8] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun. Vision meets robotics: The KITTI dataset. International Journal of Robotics Research (IJRR), 2013. [9] R. Hess and A. Fern. Discriminatively trained particle filters for complex multi-object tracking. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 240–247. IEEE, 2009. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [11] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), 2015. [12] M. Kim and V. Pavlovic. Conditional state space models for discriminative motion estimation. In Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on, pages 1–8. IEEE, 2007. [13] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [14] J. Ko and D. Fox. GP-BayesFilters: Bayesian filtering using Gaussian process prediction and observation models. Autonomous Robots, 27(1):75–90, 2009. [15] R. G. Krishnan, U. Shalit, and D. Sontag. Deep kalman filters. arXiv preprint arXiv:1511.05121, 2015. [16] J. Lafferty, A. McCallum, and F. C. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 2001. [17] B. Limketkai, D. Fox, and L. Liao. CRF-filters: Discriminative particle filters for sequential state estimation. In International Conference on Robotics and Automation (ICRA), 2007. [18] L.-P. Morency, A. Quattoni, and T. Darrell. Latent-dynamic discriminative models for continuous gesture recognition. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pages 1–8. IEEE, 2007. [19] P. Ondruska and I. Posner. Deep tracking: Seeing beyond seeing using recurrent neural networks. arXiv preprint arXiv:1602.00991, 2016. [20] D. A. Ross, S. Osindero, and R. S. Zemel. Combining discriminative features to infer complex trajectories. In Proceedings of the 23rd international conference on Machine learning, pages 761–768. ACM, 2006. [21] C. Sminchisescu, A. Kanaujia, Z. Li, and D. Metaxas. Discriminative density propagation for 3d human motion estimation. In Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on, volume 1, pages 390–397. IEEE, 2005. [22] S. Thrun, W. Burgard, and D. Fox. Probabilistic Robotics. The MIT Press, 2005. [23] R. Wilson and L. Finkel. A neural implementation of the kalman filter. In Advances in neural information processing systems, pages 2062–2070, 2009. [24] N. Yadaiah and G. Sowmya. Neural network based state estimation of dynamical systems. In International Joint Conference on Neural Networks (IJCNN), 2006. 9 | 2016 | 238 |
6,148 | On the Recursive Teaching Dimension of VC Classes Xi Chen Department of Computer Science Columbia University xichen@cs.columbia.edu Yu Cheng Department of Computer Science University of Southern California yu.cheng.1@usc.edu Bo Tang Department of Computer Science Oxford University tangbonk1@gmail.com Abstract The recursive teaching dimension (RTD) of a concept class C ⊆{0, 1}n, introduced by Zilles et al. [ZLHZ11], is a complexity parameter measured by the worst-case number of labeled examples needed to learn any target concept of C in the recursive teaching model. In this paper, we study the quantitative relation between RTD and the well-known learning complexity measure VC dimension (VCD), and improve the best known upper and (worst-case) lower bounds on the recursive teaching dimension with respect to the VC dimension. Given a concept class C ⊆{0, 1}n with VCD(C) = d, we first show that RTD(C) is at most d · 2d+1. This is the first upper bound for RTD(C) that depends only on VCD(C), independent of the size of the concept class |C| and its domain size n. Before our work, the best known upper bound for RTD(C) is O(d2d log log |C|), obtained by Moran et al. [MSWY15]. We remove the log log |C| factor. We also improve the lower bound on the worst-case ratio of RTD(C) to VCD(C). We present a family of classes {Ck}k≥1 with VCD(Ck) = 3k and RTD(Ck) = 5k, which implies that the ratio of RTD(C) to VCD(C) in the worst case can be as large as 5/3. Before our work, the largest ratio known was 3/2 as obtained by Kuhlmann [Kuh99]. Since then, no finite concept class C has been known to satisfy RTD(C) > (3/2) · VCD(C). 1 Introduction In computational learning theory, one of the fundamental challenges is to understand how different information complexity measures arising from different learning models relate to each other. These complexity measures determine the worst-case number of labeled examples required to learn any concept from a given concept class. For example, one of the most notable results along this line of research is that the sample complexity in PAC-learning is linearly related to the VC dimension [BEHW89]. Recall that the VC dimension of a concept class C ⊆{0, 1}n [VC71], denoted by VCD(C), is the maximum size of a shattered subset of [n] = {1, . . . , n}, where we say Y ⊆[n] is shattered if for every binary string b of length |Y |, there is a concept c ∈C such that c |Y = b. Here we use c |X to denote the projection of c on X. As the best-studied information complexity measure, VC dimension is known to be closely related to many other complexity parameters, and it serves as a natural parameter to compare against across various models of learning and teaching. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Instead of the PAC-learning model where the algorithm takes random samples, we consider an interactive learning model where a helpful teacher selects representative examples and present them to the learner, with the objective of minimizing the number of examples needed. The notion of a teaching set was introduced in mathematical models for teaching. The teaching set of a concept c ∈C is a set of indices (or examples) X ⊆[n] that uniquely identifies c from C. Formally, given a concept class C ⊆{0, 1}n (a set of binary strings of length n), X ⊆[n] is a teaching set for a concept c ∈C (a binary string in C) if X satisfies c|X ̸= c′|X, for all other concepts c′ ∈C. The teaching dimension of a concept class C is the smallest number t such that every c ∈C has a teaching set of size no more than t [GK95, SM90]. However, teaching dimension does not always capture the cooperation in teaching and learning (as we will see in Example 2), and a more optimistic and realistic notion of recursive teaching dimension has been introduced and studied extensively in the literature [Kuh99, DSZ10, ZLHZ11, WY12, DFSZ14, SSYZ14, MSWY15]. Definition 1. The recursive teaching dimension of a class C ⊆{0, 1}n, denoted by RTD(C), is the smallest number t where one can order all the concepts of C as an ordered sequence c1, . . . , c|C| such that every concept ci, i < |C|, has a teaching set of size no more than t in {ci, . . . , c|C|}. Hence, RTD(C) measures the worst-case number of labeled examples needed to learn any target concept in C, if the teacher and the learner are cooperative. We would like to emphasize that an optimal ordered sequence (as in Definition 1) can be derived by the teacher and learner separately without any communication: They can put all concepts in C that have the smallest teaching dimension appear at the beginning of the sequence, then remove these concepts from C and proceeds recursively. By definition, RTD(C) is always bounded from above by the teaching dimension of C but can be much smaller than the teaching dimension. We use the following example to illustrate the difference between the teaching dimension and the recursive teaching dimension. Example 2. Consider the class C ⊆{0, 1}n with n + 1 concepts: the empty concept 0 and all the singletons. For example when n = 3, C = {000, 100, 010, 001}. Each singleton concept has teaching dimension 1, while the teaching dimension for the empty concept 0 is n, because the teacher has to reveal all labels to distinguish 0 from the other concepts. However, if the teacher and the learner are cooperative, every concept can be taught with one label: If the teacher reveals a “0” label, the learner can safely assume that the target concept must be 0, because otherwise the teacher would present a “1” label instead for the other concepts. Equivalently, in the setting of Definition 1, the teacher and the learner can order the concepts so that the singleton concepts appear before the empty concept 0. Then every concept has a teaching set of size 1 to distinguish it from the later concepts in the sequence, and thus the recursive teaching dimension of C is 1. In this paper, we study the quantitative relationship between the recursive teaching dimension (RTD) and the VC dimension (VCD). A bound on the RTD that depends only on the VCD would imply a close connection between learning from random samples and teaching (under the recursive teaching model). The same structural properties that make a concept class easy to learn would also give a bound on the number of examples needed to teach it. Moreover, the recursive teaching dimension is known to be closely related to sample compression schemes [LW86, War03, DKSZ16], and a better understanding of the relationship between RTD and VCD might help resolve the long-standing sample compression conjecture [War03], which states that every concept class has a sample compression scheme of size linear in its VCD. 1.1 Our Results Our main result (Theorem 3) is an upper bound of d · 2d+1 on RTD(C) when VCD(C) = d. This is the first upper bound for RTD(C) that depends only on VCD(C), but not on |C|, the size of the concept class, or n, the domain size. Previously, Moran et al. [MSWY15] showed an upper bound of O(d2d log log |C|) for RTD(C); our result removes the log log |C| factor, and answers positively an open problem posed in [MSWY15]. Our proof tries to reveal examples iteratively to minimize the number of the remaining concepts. Given a concept class C ⊆{0, 1}n, we pick a set of examples Y ⊆[n] and their labels b ∈{0, 1}Y , so that the set of remaining concepts (with the projection c |Y = b) is nonempty and has the smallest size among all choices of Y and b. We then prove by contradiction (with the assumption of VCD(C) = d) 2 that, if the size of Y is large enough (but still depends on only VCD(C)), the remaining concepts must have VC dimension at most d −1. This procedure gives us a recursive formula, which we solve and obtain the claimed upper bound on RTD of classes of VC dimension d. We also improve the lower bound on the worst-case factor by which RTD may exceed VCD. We present a family of classes {Ck}k≥1 (Figure 4) with VCD(Ck) = 3k and RTD(Ck) = 5k, which shows that the worst-case ratio between RTD(C) and VCD(C) is at least 5/3. Before our work, the largest known multiplicative gap between RTD(C) and VCD(C) was a ratio of 3/2, given by Kuhlmann [Kuh99]. (Later Doliwa et al. [DFSZ14] showed the smallest class CW with RTD(CW ) = (3/2) · VCD(CW ) (Warmuth’s class)). Since then, no finite concept class C with RTD(C) > (3/2) · VCD(C) has been found. Instead of exhaustively searching through all small concept classes, our improvement on the lower bound is achieved by formulating the existence of a concept class with the desired RTD, VCD and domain size, as a boolean satisfiability problem. We then run the state-of-the-art SAT solvers on these formulae to discover a concept class C0 with VCD(C0) = 3 and RTD(C0) = 5. Based on the concept class C0, one can produce a family of concept classes {Ck}k≥1 with VCD(Ck) = 3k and RTD(Ck) = 5k, by taking the Cartesian product of k copies of C0: Ck = C0 × . . . × C0. 2 Upper Bound on the Recursive Teaching Dimension In this section, we prove the following upper bound on RTD(C) with respect to VCD(C). Theorem 3. Let C ⊆{0, 1}n be a class with VCD(C) = d. Then RTD(C) ≤2d+1(d −2) + d + 4. Given a class C, we use TSmin(C) to denote the smallest integer t such that at least one concept c ∈C has a teaching set of size t. Notice that TSmin(C) is different from teaching dimension. Teaching dimension is defined as the smallest t such that every c ∈C has a teaching set of size at most t.) Theorem 3 follows directly from Lemma 4 and the observation that the VC dimension of a concept class does not increase after a concept is removed. (After removing a concept from C, the new class C′ still has VCD(C′) ≤d, and one can apply Lemma 4 again to obtain another concept that has a teaching set of the desired size in C′ and repeat this process.) Lemma 4. Let C ⊆{0, 1}n be a class with VCD(C) = d. Then TSmin(C) ≤2d+1(d −2) + d + 4. We start with some intuition by reviewing the proof of Kuhlmann [Kuh99] that every class C with VCD(C) = 1 must have a concept c ∈C with a teaching set of size 1. Given an index i ∈[n] and a bit b ∈{0, 1}, we use Ci b to denote the set of concepts c ∈C such that ci = b. The proof starts by picking an index i and a bit b such that Ci b is nonempty and has the smallest size among all choices of i and b. The proof then proceeds to show that Ci b contains a unique concept, which by the definition of Ci b has a teaching set {i} of size 1. To see why Ci b must be a singleton set, we assume for contradiction that it contains more than one concept. Then there exists an index j ̸= i and two concepts c, c′ ∈Ci b such that cj = 0 and c′ j = 1. Since C has VCD(C) = 1, {i, j} cannot be shattered and thus, all the concepts c∗∈C with c∗ i = 1 −b must share the same c∗ j, say c∗ j = 0. As a result, it is easy to verify that Cj 1 is a nonempty proper subset of Ci b, contradicting the choice of i and b at the beginning. Moran et al. [MSWY15] used a similar approach to show that every so-called (3, 6)-class C has TSmin(C) at most 3. They define a class C ⊆{0, 1}n to be a (3, 6)-class if for any three indices i, j, k ∈[n], the projection of C onto {i, j, k} has at most 6 patterns. (In contrast, VCD(C) = 2 means that the projection of C has at most 7 patterns. So C being a (3, 6)-class is a stronger condition than VCD(C) = 2.) The proof of [MSWY15] starts by picking two indices i, j ∈[n] and two bits b1, b2 ∈{0, 1} such that Ci,j b1,b2, i.e., the set of c ∈C such that ci = b1 and cj = b2, is nonempty and has the smallest size among all choices of i, j and b1, b2. They then prove by contradiction that VCD(Ci,j b1,b2) = 1, and combine with [Kuh99] to conclude that TSmin(C) ≤3. Our proof extends this approach further. Given a concept class C ⊆{0, 1}n with VCD(C) = d, let k = 2d(d −1) + 1 and we pick a set Y ∗⊂[n] of k indices and a string b∗∈{0, 1}k such that CY ∗ b∗, the set of c ∈C such that the projection c |Y ∗= b∗, is nonempty and has the smallest size among all choices of Y and b. We then prove by contradiction (with the assumption of VCD(C) = d) that CY ∗ b∗ must have VC dimension at most d −1. This gives us a recursive formula that bounds the TSmin of classes of VC dimension d, which we solve to obtain the upper bound stated in Lemma 4. We now prove Lemma 4. 3 Proof of Lemma 4. We prove by induction on d. Let f(d) = max C :VCD(C)≤d TSmin(C). Our goal is to prove the following upper bound for f(d): f(d) ≤2d+1(d −2) + d + 4, for all d ≥1. (1) The base case of d = 1 follows directly from [Kuh99]. For the induction step, we show that condition (1) holds for some d > 1, assuming that it holds for d −1. Take any concept class C ⊆{0, 1}n with VCD(C) ≤d. Let k = 2d(d −1) + 1. If n ≤k then we are already done because TSmin(C) ≤n ≤k = 2d(d −1) + 1 ≤2d+1(d −2) + d + 4, where the last inequality holds for all d ≥1. Assume in the rest of the proof that n > k. Then any set of k indices Y ⊂[n] partitions C into 2k (possibly empty) subsets, denoted by CY b = {c ∈C : c |Y = b}, for each b ∈{0, 1}k. We follow the approach of [Kuh99] and [MSWY15] to choose a set of k indices Y ∗⊂[n] as well as a string b∗∈{0, 1}k such that CY ∗ b∗is nonempty and has the smallest size among all nonempty CY b , over all choices of Y and b. Without loss of generality we assume below that Y ∗= [k] and b∗= 0 is the all-zero string. For notational convenience, we also write Cb to denote CY ∗ b for b ∈{0, 1}k. Notice that if Cb∗= CY ∗ b∗has VC dimension at most d −1, then we have TSmin(C) ≤k + f(d −1) ≤2d+1(d −2) + d + 4, using the inductive hypothesis. This is because according to the definition of f, one of the concepts c ∈Cb∗has a teaching set T ⊆[n] \ Y ∗of size at most f(d −1) to distinguish it from other concepts of Cb∗. Thus, [k] ∪T is a teaching set of c in the original class C, of size at most k + f(d −1). 0 0 0 0 0 0 0 0 1 1 0 1 1 1 XXX 0 0 1 XXX 0 1 1 XXX 1 0 1 XXX 1 1 1 XXX 0 0 Figure 1: An illustration for the proof of Lemma 4, TSmin(C) ≤6 when d = 2. We prove by contradiction that the smallest nonempty set CY ∗ b∗, after fixing five bits, has VCD(CY ∗ b∗) = 1, where Y ∗= {1, 2, 3, 4, 5} and b∗= 0. In this example, we have Z = {6, 7}, Y ′ = {2, 3, 4, 6, 7} and b′ = 0. Note that CY ′ 0 is indeed a nonempty proper subset of CY ∗ 0 . Finally, we prove by contradiction that Cb∗has VC dimension at most d −1. Assume that Cb∗has VC dimension d. Then by definition there exists a set Z ⊆[n] \ Y ∗of d indices that is shattered by Cb∗(i.e., all the 2d possible strings appear in Cb∗on Z). Observe that for each i ∈Y ∗, the union of all Cb with bi = 1 (recall that b∗is the all-zero string) must miss at least one string on Z, which we denote by pi (choose one arbitrarily if more than one are missing); otherwise, C has a shattered set of size d + 1, i.e., Z ∪{i}, contradicting with the assumption that VCD(C) ≤d. (See Figure 1 for an example when d = 2 and k = 5.) However, given that there are only 2d possibilities for each pi (and |Y ∗| = k = 2d(d −1) + 1), it follows from the pigeonhole principle that there exists a subset K ⊂Y ∗of size d such that pi = p for every i ∈K, for some p ∈{0, 1}d. Let Y ′ = (Y ∗\ K) ∪Z be a new set of k indices and let b′ = 0k−d ◦p. Then CY ′ b′ is a nonempty and proper subset of CY ∗ b∗, a contradiction with our choice of Y ∗and b∗. This finishes the induction and the proof of the lemma. 4 3 Lower Bound on the Worst-Case Recursive Teaching Dimension We also improve the lower bound on the worst-case factor by which RTD may exceed VCD. In this section, we present an improved lower bound on the worst-case factor by which RTD(C) may exceed VCD(C). Recall the definition of TSmin(C), which denotes the number of examples needed to teach some concept in c ∈C. By definition we always have RTD(C) ≥TSmin(C) for any class C. Kuhlmann [Kuh99] first found a class C such that RTD(C) = TSmin(C) = 3 and VCD(C) = 2, with domain size n = 16 and |C| = 24. Since then, no class C with RTD(C) > (3/2) · VCD(C) has been found. Recently, Doliwa et al. [DFSZ14] gave the smallest such class CW (Warmuth’s class, as shown in Figure 2), with RTD(CW ) = TSmin(CW ) = 3, VCD(CW ) = 2, n = 5, and |CW | = 10. We can view CW as taking all five possible rotations of the two concepts (0, 0, 0, 1, 1) and (0, 1, 0, 1, 1). x1 x2 x3 x4 x5 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 (a) x1 x2 x3 x4 x5 0 0 0 1 1 0 1 0 1 1 (b) Figure 2: (a) Warmuth’s class CW with RTD(CW ) = 3 and VCD(CW ) = 2; (b) The succinct representation of CW with one concept selected from each rotation-equivalent set of concepts. The teaching set of each concept is marked with underline. Given CW one can obtain a family of classes {Ck}k≥1 by taking the Cartesian product of k copies: Ck = Ck W = CW × · · · × CW , and it follows from the next lemma that RTD(Ck) = TSmin(Ck) = 3k and VCD(Ck) = 2k. Lemma 5 (Lemma 16 of [DFSZ14]). Given two concept classes C1 and C2. Let C1 × C2 = {(c1, c2) | c1 ∈C1, c2 ∈C2}. Then TSmin(C1 × C2) = TSmin(C1) + TSmin(C2), RTD(C1 × C2) ≤RTD(C1) + RTD(C2), and VCD(C1 × C2) = VCD(C1) + VCD(C2). Lemma 5 allows us to focus on finding small concept classes with RTD(C) > (3/2) · VCD(C). The first attempt to find such classes is to exhaustively search over all possible binary matrices and then compute and compare their VCD and RTD. But brute-force search quickly becomes infeasible as the domain size n gets larger. For example, even the class CW has fifty 0/1 entries. Instead, we formulate the existence of a class with certain desired RTD, VCD, and domain size, as a boolean satisfiability problem, and then run state-of-the-art Boolean Satisfiability (SAT) solvers to see whether the boolean formula is satisfiable or not. We briefly describe how to construct an equivalent boolean formula in conjunctive normal form (CNF). For a fixed domain size n, we have 2n basic variables xc, each describing whether a concept c ∈{0, 1}n is included in C or not. We need VC dimension to be at most VCD, which is equivalent to requiring that every set S ⊆[n] of size |S| = VCD + 1 is not shattered by C. So we define auxiliary variables y(S,b) for each set S of size |S| = VCD + 1, and every string b ∈{0, 1}S, indicating whether a specific pattern b appears in the projection of C on S or not. These auxiliary variables are decided by the basic variables, and for every S, at least one of the 2|S| patterns must be missing on S. 5 For the minimum teaching dimension to be at least RTD, we cannot teach any row with RTD −1 labels. So for every concept c, and every set of indices T ⊆[n] of size |T| = RTD −1, we need at least one other concept c′ ̸= c satisfying c |T = c′ |T so that c′ is there to “confuse” c on T. As an example, we list one clause of each type, from the SAT instance with n = 5, VCD = 2, and RTD = 3: x01011 →y({1,2,3},010), _ b ¬ y({1,2,3},b), x01011 → _ b̸=011 x(01,b). Note that there are many ways to formulate our problem as a SAT instance. For example, we could directly use a boolean variable for each entry of the matrix. But in our experiments, the SAT solvers run faster using the formulation described above. The SAT solvers we use are Lingeling [Bie15] and Glucose [AS14] (based on MiniSAT [ES03]). We are able to rediscover CW and rule out the existence of concept classes for certain small values of (VCD, RTD, n); see Figure 3. VCD(C) RTD(C) n (domain size) Satisfiable Concept Class 2 3 5 Yes CW (Figure 2) 2 4 7 No 3 5 7 No 3 6 8 No 4 6 7 No 4 7 8 No 3 5 12 Yes Figure 4 Figure 3: The satisfiability of the boolean formulae for small values of VCD(C), RTD(C), and n. Unfortunately for n > 8, even these SAT solvers are no longer feasible. We use another heuristic to speed up the SAT solvers when we conjecture the formula to be satisfiable — adding additional clauses to the SAT formula so that it has fewer solutions (but hopefully still satisfiable), and faster to solve. More specifically, we bundle all the rotation-equivalent concepts, that is if we include a concept, we must also include all its rotations. Note that with this restriction, we can reduce the number of variables by having one for each rotation-equivalent set; we can also reduce the number of clauses, since if S is not shattered, then we know all rotations of S are also not shattered. We manage to find a class C0 with RTD(C0) = TSmin(C0) = 5 and VCD(C) = 3, and domain size n = 12. A succinct representation of C0 is given in Figure 4, where all rotation-equivalent concepts (i.e. rows) are omitted. The first 8 rows each represents 12 concepts, and the last row represents 4 concepts (because it is more symmetric), with a total of |C0| = 100 concepts. We also include a text file with the entire concept class C0 (as a 100 × 12 matrix) in the supplemental material. Applying Lemma 5, we obtain a family of concept classes {Ck}k≥1, where Ck = C0 × · · · × C0 is the Cartesian product of k copies of C0, that satisfy RTD(Ck) = 5k and VCD(Ck) = 3k. 4 Conclusion and Open Problem We improve the best known upper and lower bounds for the worst-case recursive teaching dimension with respect to VC dimension. Given a concept class C with d = VCD(C) we improve the upper bound RTD(C) = O(d2d log log |C|) of Moran et al. [MSWY15] to 2d+1(d −2) + d + 4, removing the log log |C| factor as well as the dependency on |C|. In addition, we improve the lower bound maxC(RTD(C)/VCD(C)) ≥3/2 of Kuhlmann [Kuh99] to maxC(RTD(C)/VCD(C)) ≥5/3. Our results are a step towards answering the following question: Is RTD(C) = O(VCD(C))? posed by Simon and Zilles [SZ15]. While Kuhlmann [Kuh99] showed that RTD(C) = 1 when VCD(C) = 1, the simplest case that is still open is to give a tight bound on RTD(C) when VCD(C) = 2: Doliwa et al. [DFSZ14] presented a concept class C (Warmuth’s class) with RTD(C) = 3, while our Theorem 3 shows that RTD(C) ≤6. 6 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 Figure 4: The succinct representation of a concept class C0 with RTD(C0) = 5 and VCD(C0) = 3. The teaching set of each concept is marked with underline. Acknowledgments We thank the anonymous reviewers for their helpful comments and suggestions. We also thank Joseph Bebel for pointing us to the SAT solvers. This work was done in part while the authors were visiting the Simons Institute for the Theory of Computing. Xi Chen is supported by NSF grants CCF-1149257 and CCF-1423100. Yu Cheng is supported in part by Shang-Hua Teng’s Simons Investigator Award. Bo Tang is supported by ERC grant 321171. References [AS14] G. Audemard and L. Simon. Glucose 4.0. 2014. Available at http://www.labri.fr/perso/lsimon/glucose. [BEHW89] A. Blumer, A. Ehrenfeucht, D. Haussler, and M. K. Warmuth. Learnability and the Vapnik-Chervonenkis dimension. J. ACM, 36(4):929–965, 1989. [Bie15] A. Biere. Lingeling, Plingeling and Treengeling. 2015. Available at http://fmv.jku.at/lingeling. [DFSZ14] T. Doliwa, G. Fan, H.-U. Simon, and S. Zilles. Recursive teaching dimension, VC-dimension and sample compression. Journal of Machine Learning Research, 15(1):3107–3131, 2014. [DKSZ16] M. Darnstädt, T. Kiss, H. U. Simon, and S. Zilles. Order compression schemes. Theor. Comput. Sci., 620:73–90, 2016. [DSZ10] T. Doliwa, H.-U. Simon, and S. Zilles. Recursive teaching dimension, learning complexity, and maximum classes. In Proceedings of the 21st International Conference on Algorithmic Learning Theory, pages 209–223, 2010. [ES03] N. Eén and N. Sörensson. An extensible SAT-solver. In Theory and Applications of Satisfiability Testing, 6th International Conference, SAT 2003., pages 502–518, 2003. [GK95] S. A. Goldman and M. J. Kearns. On the complexity of teaching. Journal of Computer and System Sciences, 50(1):20–31, 1995. [Kuh99] C. Kuhlmann. On teaching and learning intersection-closed concept classes. In Proceedings of the 4th European Conference on Computational Learning Theory, pages 168–182, 1999. [LW86] N. Littlestone and M. Warmuth. Relating data compression and learnability. Technical report, University of California, Santa Cruz, 1986. 7 [MSWY15] S. Moran, A. Shpilka, A. Wigderson, and A. Yehudayoff. Compressing and teaching for low VC-dimension. In Proceedings of the 56th IEEE Annual Symposium on Foundations of Computer Science, pages 40–51, 2015. [SM90] A. Shinohara and S. Miyano. Teachability in computational learning. In ALT, pages 247–255, 1990. [SSYZ14] R. Samei, P. Semukhin, B. Yang, and S. Zilles. Algebraic methods proving Sauer’s bound for teaching complexity. Theoretical Computer Science, 558:35–50, 2014. [SZ15] H.-U. Simon and S. Zilles. Open problem: Recursive teaching dimension versus VC dimension. In Proceedings of the 28th Conference on Learning Theory, pages 1770–1772, 2015. [VC71] V. N. Vapnik and A. Ya. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and Its Applications, 16:264–280, 1971. [War03] M. K. Warmuth. Compressing to VC dimension many points. In Proceedings of the 16th Annual Conference on Computational Learning Theory and 7th Kernel Workshop, COLT/Kernel 2003, pages 743–744, 2003. [WY12] A. Wigderson and A. Yehudayoff. Population recovery and partial identification. In Proceedings of the 53rd IEEE Annual Symposium on Foundations of Computer Science, pages 390–399, 2012. [ZLHZ11] S. Zilles, S. Lange, R. Holte, and M. Zinkevich. Models of cooperative teaching and learning. Journal of Machine Learning Research, 12:349–384, 2011. 8 | 2016 | 239 |
6,149 | A Sparse Interactive Model for Matrix Completion with Side Information Jin Lu Guannan Liang Jiangwen Sun Jinbo Bi University of Connecticut Storrs, CT 06269 {jin.lu, guannan.liang, jiangwen.sun, jinbo.bi}@uconn.edu Abstract Matrix completion methods can benefit from side information besides the partially observed matrix. The use of side features that describe the row and column entities of a matrix has been shown to reduce the sample complexity for completing the matrix. We propose a novel sparse formulation that explicitly models the interaction between the row and column side features to approximate the matrix entries. Unlike early methods, this model does not require the low rank condition on the model parameter matrix. We prove that when the side features span the latent feature space of the matrix to be recovered, the number of observed entries needed for an exact recovery is O(log N) where N is the size of the matrix. If the side features are corrupted latent features of the matrix with a small perturbation, our method can achieve an ϵ-recovery with O(log N) sample complexity. If side information is useless, our method maintains a O(N 3/2) sampling rate similar to classic methods. An efficient linearized Lagrangian algorithm is developed with a convergence guarantee. Empirical results show that our approach outperforms three state-of-the-art methods both in simulations and on real world datasets. 1 Introduction Matrix completion has been a basis of many machine learning approaches for computer vision [6], recommender systems [21, 24], signal processing [19, 27], and among many others. Classically, low-rank matrix completion methods are based on matrix decomposition techniques which require only the partially observed data in the matrix [15, 3, 14] by solving the following problem minE ∥E∥∗, subject to RΩ(E) = RΩ(F), (1) where F ∈Rm×n is the partially observed low-rank matrix (with a rank of r) that needs to be recovered, Ω⊆{1, · · · , m}×{1, · · · , n} be the set of indexes where the corresponding components in F are observed, the mapping RΩ(M): Rm×n →Rm×n gives another matrix whose (i, j)-th entry is Mi,j if (i, j) ∈Ω(or 0 otherwise), and ∥E∥∗computes the nuclear norm of E. Early theoretical analysis [4, 5, 20] proves that O(Nr log2 N) entries are sufficient for an exact recovery if the observed entries are uniformly sampled at random where N = max{n, m}. Recent studies start to explore side information for matrix completion and factorization [1, 18, 7, 17, 8]. For example, to infer the missing ratings in a user-movie rating matrix, descriptors of the users and movies are often known and may help to build a content-based recommender system. For instance, kids tend to like cartoons, so the age of a user likely interacts with the cartoon feature of a movie. When few ratings are known, this side information could be the main source for completing the matrix. Although based on empirical studies, several works found that side features are helpful [17, 18], those methods are based on non-convex matrix factorization formulations without any theoretical guarantees. Three recent methods have focussed on convex nuclear-norm regularized objectives, which leads to theoretical guarantees on matrix recovery [13, 28, 9, 16]. These methods all construct an inductive model XT GY so that RΩ(XT GY) = RΩ(F) where the side matrices 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. X and Y consist of side features, respectively, for the row entities (e.g., users) and column entities (e.g., movies) of a (rating) matrix. This inductive model has a parameter matrix G which is either required to be low rank [13] or to have a minimal nuclear norm ∥G∥∗[28]. Recovering G of a (usually) smaller size is argued to be easier than directly recovering the matrix F. With a very strong assumption on ‘perfect’ side information, i.e., both X and Y are orthonormal matrices and respectively in the latent column and row space of the matrix F, the method in [28] is proved to require much reduced sample complexity O(log N) for an exact recovery of F. Because most side features X and Y are not perfect in practice, a very recent work [9] proposes to use a residual matrix N to handle the noisy side features. This method constructs an inductive model XT GY + N to approximate F and requires both G and N to be low rank, or have a low nuclear norm. It uses the nuclear norm of the residual to quantify the usefulness of side information, and proves O(log N) sampling rate for an ϵ-recovery when X and Y span the full latent feature space of F, and o(N) sample complexity when X and Y contain corrupted latent features of F. An ϵ-recovery is defined as that the expected discrepancy between the predicted matrix and the true matrix is less than an arbitrarily small ϵ > 0 under a certain probability. In this paper, we propose a new method for matrix recovery by constructing a sparse interactive model XT GY to approximate F where G can be sparse but does not need to be low rank. The (i, j)-th element of G determines the role of the interaction between the i-th feature of users and the j-th feature of products. The low-rank property of F is commonly assumed to characterize the observation that similar users tend to rate similar products similarly [4]. When using an inductive approximation F = XT GY, rank(F) ≤rank(G), so a low-rank requirement on G can be a sufficient condition on the low-rank condition of F. Previous relevant methods [13, 28, 9] all impose the low-rank condition on G, which is however not a necessary condition for F to be low rank (only becomes a necessary condition when X and Y are full rank). Given general side matrices X ∈Rd1×m and Y ∈Rd2×n where the numbers of features d1, d2 ≪N, limiting the interactive model of G ∈Rd1×d2 to be low rank can be an over-restrictive constraint. In our model, we use a low-rank matrix E to directly approximate F and then estimate E from the interactive model of X and Y with a sparse regularizer on G. We show empirically that a low-rank F can be recovered from a corresponding full (or high) rank G. Our contributions are summarized as follows: (i) We propose a new formulation that estimates both E and G by imposing a nuclear-norm constraint on E but a general regularizer on G, e.g., the sparse regularizer ∥G∥1. The proposed model has recovery guarantees depending on the quality of the side features: (1) when X and Y are full row rank and span the entire latent feature space of F (but are not required to satisfy the much stronger condition of being orthonormal as in [28]), O(log N) observations are still sufficient for our method to achieve an exact recovery of F. (2) When the side matrices are not full rank and corrupted from the original latent features of F, i.e., X and Y do not contain enough basis to exactly recover F, O(log N) observed entries can be sufficient for an ϵ-recovery. (ii) A new linearized alternating direction method of multipliers (LADMM) is developed to efficiently solve the proposed formulation. Existing methods that use side information are solved by standard block-wise coordinate descent algorithms which have convergence guarantee to a global solution only when each block-wise subproblem has a unique solution [26]. Our LADMM has stronger convergence property [29] and benefits from the linear convergence rate of ADMM [11, 23]. (iii) Prior methods focus on the recovery of F, and little light has been shed to understand whether the interactive model of G can be retrieved. Because of the explicit use of E and G, our method aims to directly recover both. The unique G in the case of exact recovery of F can be attained by our algorithm. When G is not unique in the ϵ-recovery case, our algorithm converges to a point in the optimal solution set. 2 The Proposed Interactive Model To utilize the side information in X and Y to complete F, we consider to build a predictive model from the observed components that predicts the missing ones. One can simply build a linear model: f = xT u + yT v + g, where x and y are the feature vectors respectively for a user and a product, and u, v and g are model parameters. In real life applications, interactive terms between the features in X and Y can be very important. For example, male users tend to rate science fiction and action movies higher than female, which can be informative when predicting their ratings. Therefore, a linear model considering no interactive terms can be oversimple and have low predictive power for missing entries. We hence add interactive terms by introducing an interaction matrix Hd1×d2 into the predictive model, which can be written as: f = xT Hy + xT u + yT v + g. By defining 2 ¯x = [xT 1]T , ¯y = [yT 1]T and G(a=d1+1)×(b=d2+1) = H u vT g the above model can be simplified to: f = ¯xT G¯y. The following optimization problem can be solved to obtain the model parameter G. min G,E g(G) + λE∥E∥∗, subject to ¯X T G ¯Y = E, RΩ(E) = RΩ(F), where E is a completed version of F, ¯X a×m and ¯Y b×n are two matrices that are created by augmenting one row of all ones to X and to Y, respectively, and g(G) and ∥E∥∗are used to incorporate the (sparsity) prior of G and low rank prior of E. Because the side information data can be noisy and not all the features and their interactions are helpful to the prediction of F, a sparse G is often expected. Our implementation has used g(G) = ∥G∥1. It is natural to impose low rank requirement on E because it is a completed version of a low rank matrix F. The tuning parameter λE is used to balance the two priors in the objective. Without loss of generality and for convenience of notation, we simply use X and Y to denote the augmented matrices. Denote the Frobenius norm of a matrix by || · ||F . To account for Gaussian noise, we relax the equality constraint XT GY = E and replace it by minimizing their squared residual: ∥XT GY −E∥2 F and solve the following convex optimization problem to obtain G and E: min G,E 1 2∥XT GY −E∥2 F + λGg(G) + λE∥E∥∗, subject to RΩ(E) = RΩ(F). (2) where λG is another tuning parameter that together with λE balances the three terms in the objective. Especially, the regularizer g(·) in our theoretical analysis can take any general matrix norm that satisfies ∥M∥∗≤Cg(M)), ∀M, for a constant C, so for instance g(·) can be ∥G∥1, or ||G||F , or ∥G∥2. Throughout this paper, the matrices X (and Y) refer to, i.e., either the original Xd1×m (and Yd2×n) or the augmented ¯X a×m (and ¯Y b×n) depending on the user-specified model. Our formulation (2) differs from existing methods that make use of side information for matrix completion in several ways. Existing methods [28, 13, 9] solve the problem by finding ˆH that minimizes ∥H∥∗subject to RΩ(XT HY) = RΩ(F), but we expand it to include the linear term within the interactive model. The proposed model adds the flexibility to consider both linear and quadratically interactive terms, and allows the algorithm to determine the terms that should be used in the model by enforcing the sparsity in H (or G). Because E = XT GY, the rank of G bounds that of E from above. The existing methods all control the rank of G (e.g. by minimizing ∥G∥∗) to incorporate the prior of low rank E (and thus low rank F) in their formulations. However, when the rank of G is not properly chosen during the tuning of hyperparameters, it may not even be a sufficient condition to ensure low rank E (if rank(E) ≪the pre-specified rank(G)). It is easy to see that besides G a low-rank X or Y can lead to a low-rank E as well. Enforcing a low-rank condition on H or G may limit the search space of the interactive model and thus impair the prediction performance on missing matrix entries, which are demonstrated in our empirical results. Moreover, one can observe that when λG is sufficiently large, Eq.(2) is reduced to the standard matrix completion problem (1) without side information because G may be degenerated into a zero matrix, so our formulation is applicable when no access to useful side information. 3 Recovery Analysis Let E0 and G0 be the two matrices such that RΩ(F) = RΩ(E0) and E0 = XT G0Y. In this section, we give our theoretical results on the sample complexity for achieving an exact recovery of E0 and G0 when X and Y are both full row rank (i.e., rank(X) = a and rank(Y) = b), and an ϵ-recovery of E0 when the two side matrices are corrupted and less informative. The proofs of all theorems are given in supplementary materials. 3.1 Sample Complexity for Exact Recovery Before presenting our results, we give a few definitions. Let F = UΣVT , XT = UXΣXVT X and YT = UYΣYVT Y be the singular value decomposition of F, XT and YT , respectively, where all Σ matrices are full rank, meaning that singular vectors corresponding to the singular value 0 are not included in the respective U and V matrices. Let PU = UUT ∈Rm×m, PV = VVT ∈Rn×n, PX = UXUT X = XT VXΣ−2 X VT XX ∈Rm×m, PY = UYUT Y = YT VYΣ−2 Y VT YY ∈Rn×n, 3 where PU, PV, PX and PY project a vector onto the subspaces spanned, respectively, by the columns in U, V and rows in X, and Y. For any matrix Mm×n that satisfies M = PXMPY, we define two linear operators: PT : Rm×n →Rm×n and PT ⊥: Rm×n →Rm×n as follows: PT (M) = PUMPY + PXMPV −PUMPV PT ⊥(M) = (PX −PU)M(PY −PV) = PX⊥MPY⊥. Let µ0 and µ1 be the two coherence measures of F and be defined as follows as discussed in [4, 16]: µ0 = max m r max 1≤i≤m ∥PUei∥2, n r max 1≤j≤n ∥PVej∥2 , µ1 = max i,j mn r ([UVT ]i,j)2, where ei is the unit vector with the ith entry equal to 1. Let µXY be the coherence measurement between X and Y and be defined as: µXY = max max 1≤i≤m m∥xi∥2 2 a , max 1≤j≤n n∥yj∥2 2 b ! . With the above definitions, we show in the following theorem that when X and Y are both full row rank, (G0, E0) is the unique solution to Eq.(2) with high probability as long as there are O(r log N) observed components in F. In other words, with a sampling rate of O(r log N), our method can fully recover both E0 and G0 with a high probability when X and Y are full row rank. Theorem 1 Let µ = max(µ0, µXY), σ = max(∥Σ−1 X ∥∗, ∥Σ−1 Y ∥∗), N = max(m, n), q0 = 1 2(1 + log a −log r), T0 = 128p 3 σµ max(µ1, µ)r(a + b) log N and T1 = 8p 3 σ2µ2(ab + r2) log N, where p is a constant. Assume T1 ≥q0T0, X and Y are both full row rank. For any p > 1, with a probability at least 1 −4(q0 + 1)N −p+1 −2q0N −p+2, (G0, E0) is the unique optimizer to Problem (2) with necessary sampling rate as few as O(r log N). More precisely, the sampling size |Ω| should satisfy that |Ω| ≥64p 3 σµ max(µ1, µ)(1 + log a −log r)r(a + b) log N. When r ≪N and r = O(1), the sampling rate for the exact recovery of both E0 and G0 reduces to O(log N). A similar sampling rate for a full recovery of E0 has been developed in [28] where both X and Y, however, need to be orthonormal matrices in their derivation. In Theorem 1, because σ is mainly determined by the smallest singular values of the side information matrices, and sampling rate increases when σ increases, it suggests that side information matrices of lower rank would require more observed F entries for a full recovery of F. An advanced model without the orthonormal assumption has been given in [9], but exact recovery is not discussed. In our case, the two matrices are only required to be full row rank. Moreover, the theoretical or empirical results in our work give the first careful investigation on the recovery of both G0 and E0. 3.2 Sample Complexity for ϵ-Recovery The condition for full-rank side information matrices may not be satisfied in some cases to fully recover E0 (or F). We analyze the error bound of our model and prove a reduced sample complexity in comparison with standard matrix completion methods for an ϵ-recovery when the side information matrices are not full row rank or their rank is difficult to attain. Theorem 2 Denote ∥E∥∗≤α, ∥G∥1 ≤γ, ∥XT GY −E∥F ≤φ and the perfect side feature matrices (containing latent features of F) are corrupted with ∆X and ∆Y where ∥∆X∥F ≤ s1, ∥∆Y∥F ≤s2 and S = max(s1, s2). To ϵ-recover F that the expected loss E[l(f, F)] < ϵ for a given arbitrarily small ϵ > 0, O(min((γ2 + φ2) log N, S2α √ N)/ϵ2) observations are sufficient for our model when corrupted factors of side information are bounded. Theorem 2 can be inferred from the fact that the trace norm of E and the ℓ1-norm of G affect sample complexity of our model. It meets the intuition that higher rank matrix ought to require more observations to recover. Besides, for the discovery of G, a sparse interactive matrix can lead to the decrease of the sample complexity, which implies that the side information, even though when it is not perfect, could be informative enough such that the original matrix can be compressed by sparse coding via the estimated interaction between the features of row and column entities of the matrix. Our empirical evaluations have confirmed the utility of even imperfect side features. When the rank of the original data matrix r = O(1) (r ≪N), and correspondingly α = O(1), Theorem 2 points out that only O(log N) sampling rate is required for an ϵ-recovery. The classic matrix completion analysis without side information shows that under certain conditions, one 4 can achieve O(Npoly log N) sample complexity for both perfect recovery [4] and ϵ-recovery [25], which is higher than our complexity. However, the condition for these existing bounds is that the observed entries follow a certain distribution. Recent studies [22] found that if no specific distribution is pre-assumed for observed entries, O(N 3/2) sampling rate is sufficient for an ϵ-recovery. Compared to those results, our analysis does not require any assumption on the distribution of observed entries. When X and Y contain insufficient interaction information about F and ∥E∥∗= O(N), the sample complexity of our method increases to O(N 3/2) in the worst case, which means that our model maintains the same complexity as the classic methods. 4 Adaptive LADMM Algorithm In this section, we develop an adaptive LADMM algorithm [29] to solve problem (2). First, we show that the ADMM is applicable in our problem and we then derive LADMM steps. A convergence proof is established to guarantee the performance of our algorithm. Because it requires separable blocks of variables in order to use ADMM, we first define C = E − XT GY and use it in Eq.(2). Then the augmented Lagrangian function of (2) is given by L(E, G, C, M1, M2, β) =1 2∥C∥2 F + λE∥E∥∗+ λG∥G∥1 + ⟨M1, RΩ(E −F)⟩+ + D M2, E −XT GY −C E +β 2 ∥RΩ(E −F)∥2 F + β 2 ∥E −XT GY −C∥2 F (3) where M1, M2 ∈Rm×n are Lagrange multipliers and β > 0 is the penalty parameter. Given Ck, Gk, Ek, Mk 1 and Mk 2 at iteration k, each group of the variables yields their respective subproblems: Ck+1 = arg min C L(Ek, Gk, Mk 2, C, βk), Gk+1 = arg min G L(Ek, G, Mk 2, Ck+1, βk), Ek+1 = arg min E L(E, Gk+1, Mk 1, Mk 2, Ck+1, βk), (4) After solving these subproblems, we update the multipliers M1 and M2 as follows; Mk+1 1 =Mk 1 + βk(RΩ(Ek+1 −F)), Mk+1 2 =Mk 2 + βk(Ek+1 −XT Gk+1Y −Ck+1). (5) We focus on demonstrating the iterative steps of the adaptive LADMM. Given Ck, Gk Ek, Mk 1 and Mk 2, Algorithm 1 describes how to obtain the next iterate (C, E, G, M1, M2). A closed-form solution has been derived for each subproblem in the supplementary material. Algorithm 1 The adaptive LADMM algorithm to solve Ck, Gk, Ek, k = 1, ..., K Input: X, Y and RΩ(F) with parameters λG, λE, τA, τB, ρ and βmax. Output: C, G, E; 1: Initialize E0, G0, M0 1, M0 2. Compute A = YT ⊗XT . k = 0, repeat; 2: Ck+1 = βk βk+1(Ek −XT GkY + Mk 2/βk); 3: Gk+1 = reshape(max(|gk −f k 1 /τA|− λG τAβk , 0)⊙sgn(gk −f k 1 /τA)) where f k 1 = AT (Agk + ck −bk 1) = AT (Agk + ck −ek −mk 2/βk) and e = vec(E), g = vec(G), m = vec(M), c = vec(C). 4: Ek+1 = SV T(Ek −(f k 2 + f k 3 )/(2τB), λE/2(βkτB)) where f k 2 = RΩ(Ek −F + Mk 1/βk); f k 3 = Ek −XT Gk+1Y −Ck + Mk 2/βk. 5: Mk+1 1 = Mk 1 + βk(RΩ(Ek+1 −F)). 6: Mk+1 2 = Mk 2 + βk(Ek+1 −XT Gk+1Y −Ck+1). 7: βk+1 = min(βmax, ρβk). 8: k = k + 1 until convergence; Return C, G, E; The adaptive parameter in Algorithm 1 is ρ > 1, and βmax controls the upper bound of {βk}. The operator reshape(g) converts a vector g ∈Rab into a matrix G ∈Ra×b, which is the inverse 5 operator of vec(G). The operator SV T(E, t) is the singular value thresholding process defined in [3] for soft-thresholding the singular values of an arbitrary matrix E by a threshold t. The matrix A = YT ⊗XT where ⊗indicates the Kronecker product. In the initialization step, M0 1, M0 2 are randomly drawn from the standard Gaussian distribution; we initialize E0 and G0 by the iterative soft-thresholding algorithm [2] and SV T operator respectively. The adaptive LADMM can effectively solve the proposed optimization problem in several aspects. First, the convergence of the commonly-used block-wise coordinate descent (BCD) method, sometimes referred to as alternating minimization methods, requires typically that the optimization problem be strictly convex (or quasiconvex but hemivariate). The strongest result for BCD so far is established in [26] which requires the alternating subproblems to be optimized in each iteration to its unique optimal solution. This requirement is often restrictive in practice. Our convex (but not strictly convex) problem can be solved by the adaptive LADMM with the global convergence guarantee which is characterized in Theorem 3. Second, two of the subproblems are non-smooth due to the ℓ1-norm or the nuclear norm, so it can be difficult to obtain a closed-form formula to efficiently compute a solution by standard optimization tools; however, adaptive LADMM utilizes the linearization technique which leads to a closed-form solution for each linearized subproblem, and significantly enhances the efficiency of the iterative process. Third, adaptive LADMM can be practically parallelizable by a similar scheme to that of ADMM. It is also noted that the convergence rate of LADMM [11] and parallel LADMM is O(1/k) [23] whereas the BCD method still lacks of clear theoretical results of its convergence rate. Theorem 3 Define the operators A and B as A(G) = 0 −XT GY , B(E) = RΩ(E) E , and let M = M1 M2 . If βk is non-decreasing and upper-bounded, τA > ∥A∥2, and τB > ∥B∥2, then the sequence {(Ck, Gk, Ek, Mk)} generated by the adaptive LADMM Algorithm 1 converges to a global minimizer of Eq. (2). 5 Experimental Results We validated our method in both simulations and the analysis of two real world datasets: MovieLens (movie rating) and NCI-DREAM (drug discovery) datasets. Three most recent matrix completion methods that also utilized side information, MAXIDE[28], IMC[13] and DirtyIMC[9], were compared against our method. The design of our experiments focused on demonstrating the effectiveness of our method in practice. The performance of all methods was measured by the relative mean squared error (RMSE) calculated on missing entries: ∥R̸Ω(XT GY −F)∥2 2/∥R̸Ω(F)∥2 2. For both synthetic and real-world datasets, we randomly set q percent of the components in each observed matrix F to be missing. The hyperparameters λ’s and the rank of G (required by IMC and DirtyIMC) were tuned via the same cross validation process: we randomly picked 10% of the given entries to form a validation set. Then models were obtained by applying each method to the remaining entries with a specific choice of λ from 10−3, 10−2, ..., 104. The average validation RMSE was examined by repeating the above procedure six times. The hyperparameter values that gave the best average validation RMSE were chosen for each method. For IMC and DirtyIMC, the best rank of G was chosen from = 1 to 15 within each data split. For each choice of q, we repeated the above entire procedure six times and reported the average RMSE on the missing entries. 5.1 Synthetic Datasets We created two different simulation tests with and without full row rank X and Y. For all the synthetic datasets, we first randomly created X and Y. In order to make our simulations reminiscent real situations where distributions of side features can be heterogeneous, data for each feature in both X and Y were generated according to a distribution that was randomly selected from Gaussian, Poisson and Gamma distributions. We created the sparse G matrices as follows. The location of the non-zero entries of G were randomly picked but their values were generated by multiplying a value drawn from N(0, 100), which we repeated several times to chose the matrices that showed full or high rank. We then generated F with F = XT GY + N where N represents noise and each component Ni,j was drawn from N(0, 1). For each simulated F, we ran all methods with q ∈[10% −80%] with an increase step of 10%. We compared the different methods in three settings, which were labeled as synthetic experiment I, II and III in our results. In the first setting, the dimension of X and Y was set to 15 × 50 and 6 20 × 140 and all features in these two matrices were randomly generated to make them full row rank. Both the last two settings corresponded to the second test where X and Y were not full row rank. The dimension of X and Y was set to 16 × 50, 21 × 140 and 20 × 50, 25 × 140, respectively, for these two settings where the first 15 features in X and 20 features in Y were randomly created, but the remaining features were generated by arbitrarily linear combinations of the randomly created features. For all three settings, we used 10 synthetic datasets and reported mean and standard deviation of RMSE on missing values as shown in Figure 1. Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment III Our approach MAXIDE IMC DirtyIMC Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment III Our approach MAXIDE IMC DirtyIMC Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment II Our approach MAXIDE IMC DirtyIMC Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment II Our approach MAXIDE IMC DirtyIMC Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment I Our approach MAXIDE IMC DirtyIMC Missing percentage 0.2 0.4 0.6 0.8 RMSE 0 0.2 0.4 0.6 0.8 1 Synthetic Experiment I Our approach MAXIDE IMC DirtyIMC Figure 1: The Comparison of RMSE for Experiments I, II, and III. Our approach outperformed all other compared methods significantly in almost all these settings. When the missing rate q increased, the RMSE of our method grew much slower than other methods. We studied the rank of the recovered G and E in the first setting. For all methods, the corresponding G and E that gave the best performance were examined. The ranks of G and E from our method, MAXIDE, IMC, DirtyIMC were 15, 8, 1, 1 and 15, 15, 1, 2, respectively. These results suggested that incorporating the strong prior of low rank G might hurt the recovery performance. The retrieved model matrices G of all compared methods (when using q =10% of missing entries in one of the 10 synthetic datasets) together with the true G are plotted in Figure 2. Only our method was able to recover the true G and all the other methods merely found approximations. Figure 2: The heatmap of the true G and recovered G matrices in Synthetic Experiment I. 5.2 Real-world Datasets We used two relatively large datasets that we could find as suitable for our empirical evaluation. Note that early methods employing side information were often tested on datasets with either X or Y but not both although some of them might be larger than the two datasets we used. 5.2.1. MovieLens. This dataset was downloaded from [12] and contained 100,000 user ratings (integers from 1 to 5) from 943 users on 1682 movies. There were 20 movie features such as genre and release date, as well as 24 user features describing users’ demographic information such as age and gender. We compared all methods with four different q values: 20-50%. The RMSE values of each method are shown in Table 1, which shows that our approach significantly outperformed other methods, especially when q was large. Figure 3 shows the constructed G matrix that shows some interesting observations. For instance, male users tend to rate action, science fiction, thriller and war movies high but low for children’ movies, exhibiting some common intuitions. 5.2.2 NCI-DREAM Challenge. The data on the reactions of 46 breast cancer cell lines to 26 drugs and the expression data of 18633 genes for all the cell lines were provided by NCI-DREAM Chal7 MovieLens Data NCI-Dream Challenge Methods 20% 30% 40% 50% 20% 30% 40% 50% Our approach 0.276 (± 0.001) 0.279 (± 0.002) 0.284 (± 0.001) 0.292 (± 0.001) 0.181 (± 0.069) 0.139 (± 0.010) 0.145 (± 0.018) 0.190 (± 0.031) MAXIDE 0.424 (±0.016) 0.425 (±0.013) 0.419 (±0.008) 0.421 (±0.013) 0.268 (±0.036) 0.240 (±0.007) 0.255 (±0.016) 0.288 (±0.022) IMC 0.935 (±0.001) 0.943 (±0.001) 0.945 (±0.001) 0.959 (±0.001) 0.437 (±0.031) 0.489 (±0.003) 0.557 (±0.013) 0.637 (±0.011) DirtyIMC 0.705 (±0.001) 0.738 (±0.001) 0.775 (±0.001) 0.814 (±0.001) 0.432 (±0.033) 0.475 (±0.008) 0.551 (±0.018) 0.632 (±0.011) Table 1: The Comparison of RMSE values of different methods on real-world datasets. lenge [10]. For each drug, we had 14 features that describes their chemical and physical properties such as molecular weight, XLogP3 and hydrogen bond donor count, and were downloaded from National Center for Biotechnology Information (http://pubchem.ncbi.nlm.nih.gov/). For the cell line features, we ran principle component analysis (PCA) and used the top 45 principal components that accounted for more than 99.99% of the total data variance. We compared the four different methods with four different q values: 20-50%. The RMSE values of all methods are provided in Table 1 where our method again shows the best performance. We examined the ranks of both G and E obtained by all the methods. They were 15, 15, 1, 1 for G and 2, 15, 1, 2 for E, respectively, for our approach, MAXIDE, IMC and DirtyIMC in sequence. This demonstrates that a low rank E but a high rank G give the best performance on this dataset. In other words, requiring a low rank G may hurt the performance of recovering a low rank E. The constructed G by our method is plotted in Figure 4, where columns represent cell line features (i.e., principle components) and rows represent drug features. Please refer to the supplementary material for the names of these features. According to this figure, drug features: XlogP (F2), hydrogen bond donor (HBD) (F3), Hydrogen bond acceptor (HBA) (F4) and Rotatable Bond number (F5) all played important roles in drug sensitivity. This result aligns well with biological knowledge, as all these four features are very important descriptors for cellular entry and retention. Figure 3: HeatMap of G for MovieLens Figure 4: HeatMap of sign(G) log(|G|) for NCIDREAM for a better illustration 6 Conclusion In this paper, we have proposed a novel sparse inductive model that utilizes side features describing the row and column entities of a partially observed matrix to predict its missing entries. This method models the linear predictive power of side features as well as interaction between the features of row and column entities. Theoretical analysis shows that this model has advantages of reduced sample complexity over classical matrix completion methods, requiring only O(log N) observed entries to achieve a perfect recovery of the original matrix when the side features reflect the true latent feature space of the matrix. When the side features are less informative, our model requires O(log N) observations for an ϵ-recovery of the matrix. Unlike early methods that use a BCD algorithm, we have developed a LADMM algorithm to optimize the proposed formulation. Given the optimization problem is convex, this algorithm can converge to a global solution. Computational results demonstrate the superior performance of this method over three recent methods. Future work includes the examination of other types and quality of side information and the understanding of whether our method will benefit a variety of relevant problems, such as multi-label learning, and semi-supervised clustering etc. Acknowledgments Jinbo Bi and her students Jin Lu, Guannan Liang and Jiangwen Sun were supported by NSF grants IIS-1320586, DBI-1356655, and CCF-1514357 and NIH R01DA037349. 8 References [1] J. Abernethy, F. Bach, T. Evgeniou, and J.-P. Vert. A new approach to collaborative filtering: Operator estimation with spectral regularization. The Journal of Machine Learning Research, 10:803–826, 2009. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1):183–202, 2009. [3] J.-F. Cai, E. J. Cand`es, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM J. on Optimization, 20(4):1956–1982, Mar. 2010. [4] E. J. Cand`es and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [5] E. J. Cand`es and T. Tao. The power of convex relaxation: Near-optimal matrix completion. Information Theory, IEEE Transactions on, 56(5):2053–2080, 2010. [6] P. Chen and D. Suter. Recovering the missing components in a large noisy low-rank matrix: Application to sfm. IEEE Trans. Pattern Anal. Mach. Intell., 26(8):1051–1063, Aug. 2004. [7] T. Chen, W. Zhang, Q. Lu, K. Chen, Z. Zheng, and Y. Yu. Svdfeature: a toolkit for feature-based collaborative filtering. The Journal of Machine Learning Research, 13(1):3619–3622, 2012. [8] K.-Y. Chiang, C.-J. Hsieh, and E. I. S. Dhillon. Robust principal component analysis with side information. In Proceedings of The 33rd International Conference on Machine Learning, pages 2291–2299, 2016. [9] K.-Y. Chiang, C.-J. Hsieh, and I. S. Dhillon. Matrix completion with noisy side information. Advances in Neural Information Processing Systems 28, pages 3429–3437, 2015. [10] A. Daemen, O. L. Griffith, L. M. Heiser, N. J. Wang, O. M. Enache, Z. Sanborn, F. Pepin, S. Durinck, J. E. Korkola, M. Griffith, et al. Modeling precision treatment of breast cancer. Genome Biol, 14(10):R110, 2013. [11] E. X. Fang, B. He, H. Liu, and X. Yuan. Generalized alternating direction method of multipliers: new theoretical insights and applications. Mathematical Programming Computation, 7(2):149–187, 2015. [12] F. M. Harper and J. A. Konstan. The movielens datasets: History and context. ACM Trans. Interact. Intell. Syst., 5(4):19:1–19:19, Dec. 2015. [13] P. Jain and I. S. Dhillon. Provable inductive matrix completion. arXiv preprint arXiv:1306.0626, 2013. [14] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. Information Theory, IEEE Transactions on, 56(6):2980–2998, June 2010. [15] Z. Lin, M. Chen, and Y. Ma. The Augmented Lagrange Multiplier Method for Exact Recovery of Corrupted Low-Rank Matrices. Mathematical Programming, 2010. [16] G. Liu and P. Li. Low-rank matrix completion in the presence of high coherence. IEEE Transactions on Signal Processing, 64(21):5623–5633, Nov 2016. [17] A. K. Menon, K.-P. Chitrapura, S. Garg, D. Agarwal, and N. Kota. Response prediction using collaborative filtering with hierarchies and side-information. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 141–149. ACM, 2011. [18] N. Natarajan and I. S. Dhillon. Inductive matrix completion for predicting gene–disease associations. Bioinformatics, 30(12):i60–i68, 2014. [19] X. Ning and G. Karypis. Sparse linear methods with side information for top-n recommendations. In Proceedings of the Sixth ACM Conference on Recommender Systems, RecSys ’12, pages 155–162, New York, NY, USA, 2012. ACM. [20] B. Recht. A simpler approach to matrix completion. The Journal of Machine Learning Research, 12:3413–3430, 2011. [21] J. D. M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22Nd International Conference on Machine Learning, ICML ’05, pages 713–719, New York, NY, USA, 2005. ACM. [22] O. Shamir and S. Shalev-Shwartz. Matrix completion with the trace norm: learning, bounding, and transducing. The Journal of Machine Learning Research, 15(1):3401–3423, 2014. [23] W. Shi, Q. Ling, G. Wu, and W. Yin. A proximal gradient algorithm for decentralized composite optimization. IEEE Transactions on Signal Processing, 63(22):6013–6023, Nov 2015. [24] V. Sindhwani, S. Bucak, J. Hu, and A. Mojsilovic. One-class matrix completion with low-density factorizations. In Data Mining (ICDM), 2010 IEEE 10th International Conference on, pages 1055–1060, Dec 2010. [25] N. Srebro and A. Shraibman. Rank, trace-norm and max-norm. pages 545–560, 2005. [26] P. Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of optimization theory and applications, 109(3):475–494, 2001. [27] Z. Weng and X. Wang. Low-rank matrix completion for array signal processing. In Acoustics, Speech and Signal Processing (ICASSP), 2012 IEEE International Conference on, pages 2697–2700. IEEE, 2012. [28] M. Xu, R. Jin, and Z. hua Zhou. Speedup matrix completion with side information: Application to multi-label learning. Advances in Neural Information Processing Systems 26, pages 2301–2309, 2013. [29] J. Yang and X.-M. Yuan. Linearized augmented lagrangian and alternating direction methods for nuclear norm minimization. Math. Comput., 82, 2013. 9 | 2016 | 24 |
6,150 | Generalized Correspondence-LDA Models (GC-LDA) for Identifying Functional Regions in the Brain Timothy N. Rubin SurveyMonkey Oluwasanmi Koyejo Univ. of Illinois, Urbana-Champaign Michael N. Jones Indiana University Tal Yarkoni University of Texas at Austin Abstract This paper presents Generalized Correspondence-LDA (GC-LDA), a generalization of the Correspondence-LDA model that allows for variable spatial representations to be associated with topics, and increased flexibility in terms of the strength of the correspondence between data types induced by the model. We present three variants of GC-LDA, each of which associates topics with a different spatial representation, and apply them to a corpus of neuroimaging data. In the context of this dataset, each topic corresponds to a functional brain region, where the region’s spatial extent is captured by a probability distribution over neural activity, and the region’s cognitive function is captured by a probability distribution over linguistic terms. We illustrate the qualitative improvements offered by GC-LDA in terms of the types of topics extracted with alternative spatial representations, as well as the model’s ability to incorporate a-priori knowledge from the neuroimaging literature. We furthermore demonstrate that the novel features of GC-LDA improve predictions for missing data. 1 Introduction One primary goal of cognitive neuroscience is to find a mapping from neural activity onto cognitive processes–that is, to identify functional networks in the brain and the role they play in supporting macroscopic functions. A major milestone towards this goal would be the creation of a “functionalanatomical atlas” of human cognition, where, for each putative cognitive function, one could identify the regions and brain networks within the region that support the function. Efforts to create such functional brain atlases are increasingly common in recent years. Most studies have proceeded by applying dimensionality reduction or source decomposition methods such as Independent Component Analysis (ICA) [4] and clustering analysis [9] to large fMRI datasets such as the Human Connectome Project [10] or the meta-analytic BrainMap database [8]. While such work has provided valuable insights, these approaches also have significant drawbacks. In particular, they typically do not jointly estimate regions along with their mapping onto cognitive processes. Instead, they first extract a set of neural regions (e.g., via ICA performed on resting-state data), and then in a separate stage—if at all—estimate a mapping onto cognitive functions. Such approaches do not allow information regarding cognitive function to constrain the spatial characterization of the regions. Moreover, many data-driven parcellation approaches involve a hard assignment of each brain voxel to a single parcel or cluster, an assumption that violates the many-to-many nature of functional brain networks. Ideally, a functional-anatomical atlas of human cognition should allow the spatial and functional correlates of each atom or unit to be jointly characterized, where the function of each region constrains its spatial boundaries, and vice-versa. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In the current work, we propose Generalized Correspondence LDA (GC-LDA) – a novel generalization of the Correspondence-LDA model [2] for modeling multiple data types, where one data type describes the other. While the proposed approach is general and can be applied to a variety of data, our work is motivated by its application to neuroimaging meta-analysis. To that end, we consider several GC-LDA models that we apply to the Neurosynth [12] corpus, consisting of the document text and neural activation data from a large body of neuroimaging publications. In this context, the models extract a set of neural “topics”, where each topic corresponds to a functional brain region. For each topic, the model describes its spatial extent (captured via probability distributions over neural activation) and cognitive function (captured via probability distributions over linguistic terms). These models provide a novel approach for jointly identifying the spatial location and cognitive mapping of functional brain regions, that is consistent with the many-to-many nature of functional brain networks. Furthermore, to the best of our knowledge, one of the GC-LDA variants provides the first automated measure of the lateralization of cognitive functions based on large-scale imaging data. The GC-LDA and Correspondence-LDA models are extensions of Latent Dirichlet Allocation (LDA) [3]. Several Bayesian methods with similarities (or equivalences) to LDA have been applied to different types of neuroimaging data. Poldrack et al. (2012) used standard LDA to derive topics from the text of the Neurosynth database and then projected the topics onto activation space based on document-topic loadings [7]. Yeo et al. (2014) used a variant of the Author-Topic model to model the BrainMap Database [13]. Manning et al. (2014) described a Bayesian method “Topographic Factor Analysis” to identify brain regions based on the raw fMRI images (but not text) extracted from a set of controlled experiments, which can later be mapped on functional categories [5]. Relative to the Correspondence-LDA model, the GC-LDA model incorporates: (i) the ability to associate different types of spatial distributions with each topic, (ii) flexibility in how strictly the model enforces a correspondence between the textual and spatial data within each document, and (iii) the ability to incorporate a-priori spatial structure, e.g., encouraging relatively homologous functional regions located in each brain hemisphere. As we show, these aspects of GC-LDA have a significant effect on the quality of the estimated topics, as well as on the models’ ability to predict missing data. 2 Models In this paper we propose a set of unsupervised generative models based on the Correspondence-LDA model [2] that we use to jointly model text and brain activations from the Neurosynth meta-analytic database [12]. Each of these models, as well as Correspondence-LDA, can be viewed as special cases of a broader model that we will refer to as Generalized Correspondence-LDA (GC-LDA). In the section below, we describe the GC-LDA model and its relationship to Correspondence-LDA. We then detail the specific instances of the model that we use throughout the remainder of the paper. A summary of the notation used throughout the paper is provided in Table 1. 2.1 Generalized Correspondence LDA (GC-LDA) Each document d in the corpus is comprised of two types of data: a set of word tokens w(d) 1 , w(d) 2 , ..., w(d) N (d) w consisting of unigrams and/or n-grams, and a set of peak activation tokens x(d) 1 , x(d) 2 , ..., x(d) N (d) x , where N (d) w and N (d) x are the number of word and activation tokens in document d, respectively. In the target application, each token xi is a 3-dimensional vector corresponding to the peak activation coordinates of a value reported in fMRI publications. However, we note that this model can be directly applied to other types of data, such as segmented images, where each xi corresponds to a vector of real-valued features extracted from each image segment (c.f. [2]). GC-LDA is described by the following generative process (depicted in Figure 1.A): 1. For each topic t ∈ 1, ..., T 1: (a) Sample a Multinomial distribution over word types φ(t) ∼Dirichlet(β) 2. For each document d ∈{1, ..., D}: 1To make the model fully generative, one could additionally put a prior on the spatial distribution parameters Λ(t) and sample them. For the purposes of the present paper we do not specify a prior on these parameters, and therefore leave this out of the generative process. 2 Table 1: Table of notation used throughout the paper Model specification Notation Meaning wi, xi The ith word token and peak activation token in the corpus, respectively N (d) w , N (d) x The number of word tokens and peak activation tokens in document d, respectively D The number of documents in the corpus T The number of topics in the model R The number of components/subregions in each topic’s spatial distribution (subregions model) zi Indicator variable assigning word token wi to a topic yi Indicator variable assigning activation token xi to a topic z(d), y(d) The set of all indicator variables for word tokens and activation tokens in document d N Y D td The number of activation tokens within document d that are assigned to topic t ci Indicator variable assigning activation token yi to a subregion (subregion models) Λ(t) Placeholder for all spatial parameters for topic t µ(t), σ(t) Gaussian parameters for topic t µ(t) r , σ(t) r Gaussian parameters for subregion r in topic t (subregion models) φ(t) Multinomial distribution over word types for topic t φ(t) w Probability of word type w given topic t θ(d) Multinomial distribution over topics for document d θ(d) t Probability of topic t given document d π(t) Multinomial distribution over subregions for topic t (subregion models) π(t) r Probability of subregion r given topic t (subregion models) β, α, γ Model hyperparameters δ Model hyperparameter (subregion models) (a) Sample a Multinomial distribution over topics θ(d) ∼Dirichlet(α) (b) For each peak activation token xi, i ∈ 1, ..., N (d) x : i. Sample indicator variable yi from Multinomial(θ(d)) ii. Sample a peak activation token xi from the spatial distribution: xi ∼f(Λ(yi)) (c) For each word token wi, i ∈ 1, ..., N (d) w : i. Sample indicator variable zi from Multinomial NY D 1d +γ N(d) x +γ∗T , NY D 2d +γ N(d) x +γ∗T , ..., NY D T d +γ N(d) x +γ∗T , where N Y D td is the number of activation tokens y in document d that are assigned to topic t, N (d) x is the total number of activation tokens in d, and γ is a hyperparameter ii. Sample a word token wi from Multinomial(φ(zi)) Intuitively, in the present application of GC-LDA, each topic corresponds to a functional region of the brain, where the linguistic features for the topic describe the cognitive processes associated with the spatial distribution of the topic. The resulting joint distribution of all observed peak activation tokens, word tokens, and latent parameters for each individual document in the GC-LDA model is as follows: p(x, w, z, y, θ) = p(θ|α)· N (d) x Y i=1 p(yi|θ(d))p(xi|Λ(yi)) · N (d) w Y j=1 p(zj|y(d), γ)p(wj|φ(zj)) (1) Note that when γ = 0, and the spatial distribution for each topic is specified as a single multivariate Gaussian distribution, the model becomes equivalent to a smoothed version of the Correspondence LDA model described by Blei & Jordan (2003) [2].2 2We note that [2] uses a different generative description for how the zi variables are sampled conditional on the y(d) i indicator variables; in [2], zi is sampled uniformly from (1, ..., N (d) y ), and then wi is sampled from the multinomial distribution of the topic y(d) i that zi points to. This ends up being functionally equivalent to the generative description for zi given here when γ = 0. Additionally, in [2], no prior is put on φ(t), unlike in GC-LDA. Therefore, when using GC-LDA with a single multivariate Gaussian and γ = 0, it is equivalent to a smoothed version of Correspondence-LDA. Dirichlet priors have been demonstrated to be beneficial to model performance [1], so including a prior on φ(t) in GC-LDA should have a positive impact. 3 T R D NW γ w NX y x θ α T φ β µ σ z D NW γ w NX y x θ α φ β µ σ z π c δ D NW γ w NX y x θ α T φ β λ1 λN … z (A) (B) (C) Figure 1: (A) Graphical model for the Generalized Correspondence-LDA model, GC-LDA. (B) Graphical model for GC-LDA with spatial distributions modeled as a single multivariate Gaussian (equivalent to a smoothed version of Correspondence-LDA if γ = 0)2. (C) Graphical model for GC-LDA with subregions, with spatial distributions modeled as a mixture of multivariate Gaussians A key aspect of this model is that it induces a correspondence between the number of activation tokens and the number of word tokens within a document that will be assigned to the same topic. The hyperparameter γ controls the strength of this correspondence. If γ = 0, then there is zero probability that a word for document d will be sampled from topic t if no peak activations in d were sampled from t. As γ becomes larger, this constraint is relaxed. Although intuitively one might want γ to be zero in order to maximize the correspondence between the spatial and linguistic information, we have found that setting γ > 0 leads to significantly better model performance. We conjecture that using a non-zero γ allows the parameter space to be more efficiently explored during inference, and that it improves the model’s ability to handle data sparsity and noise in high dimensional spaces, similar to the role that the α and β hyperparameters serve in standard LDA [1]. 2.2 Versions of GC-LDA Employed in Current Paper There are multiple reasonable choices for the spatial distribution p(xi|Λ(yi)) in GC-LDA, depending upon the application and the goals of the modeler. For the purposes of the current paper, we considered three variants that are motivated by the target application. The first model shown in Figure 1.B employs a single multivariate Gaussian distribution for each topic’s spatial distribution – and is therefore equivalent to a smoothed version of Correspondence-LDA if setting γ = 0. The generative process for this model is the same as specified above, with generative step (b.ii) modified as follows: Sample peak activation token xi from from a Gaussian distribution with parameters µ(yi) and σ(yi). We refer to this model as the “no-subregions” model. The second model and third model both employ Gaussian mixtures with R = 2 components for each topic’s spatial distribution, and are shown in Figure 1.C. Employing a Gaussian mixture gives the model more flexibility in terms of the types of spatial distributions that can be associated with a topic. This is notably useful in modeling spatial distributions associated with neural activity, as it allows the model to learn topics where a single cognitive function (captured by the linguistic distribution) is associated with spatially discontiguous patterns of activations. In the second GC-LDA model we present—which we refer to as the “unconstrained subregions” model—the Gaussian mixture components are unconstrained. In the third version of GC-LDA—which we refer to as the “constrained subregions” model—the Gaussian components are constrained to have symmetric means with respect to their distance from the origin along the horizontal spatial axis (a plane corresponding to the longitudinal fissure in the brain). This constraint is consistent with results from meta-analyses of the fMRI literature, where most studied functions display a high degree of bilateral symmetry [6, 12]. The use of mixture models for representing the spatial distribution in GC-LDA requires the additional parameters c, π, and hyperparameter δ, as well as additional modifications to the description of the generative process. Each topic’s spatial distribution in these models is now associated with a multinomial probability distribution π(t) giving the probability of sampling each component r from each topic t, where π(t) r is the probability of sampling the rth component (which we will refer to as a 4 subregion) from the tth topic. Variable ci is an indicator variable that assigns each activation token xi to a subregion r of the topic to which it is assigned via yi. A full description of the generative process for these models is provided in Section 1 of the supplementary materials3. 2.3 Inference for GC-LDA Exact probabilistic inference for the GC-LDA model is intractable. We employed collapsed Gibbs sampling for posterior inference – collapsing out θ(d), φ(t), and π(t) while sampling the indicator variables yi, zi and ci. Spatial distribution parameters Λ(t) are estimated via maximum likelihood. The per-iteration computational complexity of inference is O(T(NW + NXR)), where T is the number of topics, R is the number of subregions, and NW and NX are the total number of word tokens and activation tokens in the corpus, respectively. Details of the inference methods and sampling equations are provided in Section 2 of the supplement. 3 Experimental Evaluation We refer to the three versions of GC-LDA described in Section 2 as (1) the “no subregions” model, for the model in which each topic’s spatial distribution is a single multivariate Gaussian distribution, (2) the “unconstrained subregions” model, for the model in which each topic’s spatial distribution is a mixture of R = 2 unconstrained Gaussian distributions, and (3) the “constrained subregions” model, for the model in which each topic’s spatial distribution is a mixture of R = 2 Gaussian distributions whose means are constrained to be symmetric along the horizontal spatial dimension with respect to their distance from the origin. Our empirical evaluations of the GC-LDA model are based on the application of these models to the Neurosynth meta-analytic database [12]. We first illustrate and contrast the qualitative properties of topics that are extracted by the three versions of GC-LDA4. We then provide a quantitative model comparison, in which the models are evaluated in terms of their ability to predict held out data. These results highlight the promise of GC-LDA and this type of modeling for jointly extracting the spatial extent and cognitive functions of neuroanatomical brain regions. Neurosynth Database: Neurosynth [12] is a publicly available database consisting of data automatically extracted from a large collection of functional magnetic resonance imaging (fMRI) publications5. For each publication, the database contains the abstract text and all reported 3-dimensional peak activation coordinates (in MNI space) in the study. The text was pre-processed to remove common stop-words. For the version of the Neurosynth database employed in the current paper, there were 11,362 total publications, which had on average 35 peak activation tokens and 46 word tokens after preprocessing (corresponding to approximately 400k activation and 520k word tokens in total). 3.1 Visualizing GC-LDA Topics In Figure 2 we present several illustrative examples of topics for all three GC-LDA variants that we considered. For each topic, we illustrate the topic’s distribution over word types via a word cloud, where the sizes of words are proportional to their probabilities φ(t) w in the model. Each topic’s spatial distribution over neural activations is illustrated via a kernel-smoothed representation of all activation tokens that were assigned to the topic, overlaid on an image of the brain. For the models that represent spatial distributions using Gaussian mixtures (the unconstrained and constrained subregions models), activations are color-coded based on which subregion they are assigned to, and the mixture weights for the subregions π(t) r are depicted above the activation image on the left. In the constrained subregions model (where the means of the two Gaussians were constrained to be symmetric along the horizontal axis) the two subregions correspond to a ‘left’ and ‘right’ hemisphere subregion. The following parameter settings were used for generating the images in Figure 2: T = 200, α = .1, β = .01, γ = .01, and for the models with subregions, δ = 1.0. 3Note that these models are still instances of GC-LDA as presented in Figure 1.1; they can be equivalently formulated by marginalizing out the ci variables, such that the probability f(xi|Λ(t)) depends directly on the parameters of each component, and the component probabilities given by π(t). 4A brief discussion of the stability of topics extracted by GC-LDA is provided in Section 3 of the supplement 5Additional details and Neurosynth data can be found at http://neurosynth.org/ 5 Figure 2: Illustrative examples of topics extracted for the three GC-LDA variants. Probability distributions over word types φ(t) are represented via word clouds, where word sizes are proportional to φ(t) w . Spatial distributions are illustrated using kernel-smoothed representations of all activation tokens assigned to each topic. For the models with subregions, each activation token’s color (blue or red) corresponds to the subregion r that the token is assigned to. For nearly all of the topics shown in Figure 2, the spatial and linguistic distributions closely correspond to functional regions that are extensively described in the literature (e.g., motor function in primary motor cortex; face processing in the fusiform gyrus, etc.). We note that a key feature of all versions of the GC-LDA model, relative to the majority of existing methods in the literature, is that the model is able to capture the one-to-many mapping from neural regions onto cognitive functions. For example, in all model variants, we observe topics corresponding to auditory processing and language processing (e.g., the topics shown in panels B1 and B3 for the subregions model). While these cognitive processes are distinct, they have partial overlap with respect to the brain networks they recruit – specifically, the superior temporal sulcus in the left hemisphere. For functional regions that are relatively medial, the no-subregions model is able to capture bilateral homologues by consolidating them into a single distribution (e.g., the topic shown in A2, which spans the medial primary somatomotor cortex in both hemispheres). However, for functional regions that are more laterally localized, the model cannot capture bilateral homologues using a single topic. For cognitive processes that are highly lateralized (such as language processing, shown in A1, B1 6 and C1) this poses no concern. However, for functional regions that are laterally distant and do have spatial symmetry, the model ends up distributing the functional region across multiple topics–see, e.g., the topics shown in A3 and A4 in the no-subregions model, which correspond to the auditory cortex in the left and right hemisphere respectively. Given that these two topics (and many other pairs of topics that are not shown) correspond to a single cognitive function, it would be preferable if they were represented using a single topic. This can potentially be achieved by increasing the flexibility of the spatial representations associated with each topic, such that the model can capture functional regions with distant lateral symmetry or other discontiguous spatial features using a single topic. This motivates the unconstrained and constrained subregions models, in which topic’s spatial distributions are represented by Gaussian mixtures. In Figure 2, the topics in panels B3 and C3 illustrate how the subregions models are able to handle symmetric functional regions that are located on the lateral surface of the brain. The lexical distribution for each of these individual topics in the subregions models is similar to that of both the topics shown in A3 and A4 of the no-subregions model. However, the spatial distributions in B3 and C3 each capture a summation of the two topics from the no subregions model. In the case of the constrained subregion model, the symmetry between the means of the spatial distributions for the subregions is enforced, while for the unconstrained model the symmetry is data-driven and falls out of the model. We note that while the unconstrained subregions model picks up spatial symmetry in a significant subset of topics, it does not always do so. In the case of language processing (panel A1), the lack of spatial symmetry is consistent with a large fMRI literature demonstrating that language processing is highly left-lateralized [11]. And in fact, the two subregions in this topic correspond approximately to Wernicke’s and Broca’s areas, which are integral to language comprehension and production, respectively. In other cases, (e.g., the topics in panels B2 and B4), the unconstrained subregions model partially captures spatial symmetry with a highly-weighted subregion near the horizontal midpoint, but also has an additional low-weighted region that is lateralized. While this result is not necessarily wrong per se, it is somewhat inelegant from a neurobiological standpoint. Moreover, there are theoretical reasons to prefer a model in which subregions are always laterallysymmetrical. Specifically, in instances where the subregions are symmetric (the topic in panel B3 for the unconstrained subregions model and all topics for the constrained subregions model), the subregion weights provide a measure of the relative lateralization of function. For example, the language topic in panel C1 of the constrained subregions model illustrates that while there is neural activation corresponding to linguistic processing in the right hemisphere of the brain, the function is strongly left-lateralized (and vice-versa for face processing, illustrated in panel C2). By enforcing the lateral symmetry in the constrained subregions model, the subregion weights π(t) r (illustrated above the left activation images) for each topic inherently correspond to an automated measure of the lateralization of the topic’s function. Thus, the constrained model produces what is, to our knowledge, the first data-driven estimation of region-level functional hemispheric asymmetry across the whole brain. 3.2 Predicting Held Out Data This section describes quantitative comparisons between three GC-LDA models in terms of their ability to predict held-out data. We split the Neurosynth dataset into a training and test set, where approximately 20% of all data in the corpus was put into the test set. For each document, we randomly removed j .2N (d) x k peak activation tokens and j .2N (d) w k word tokens from each document. We trained the models on the remaining data, and then for each model we computed the log-likelihood of the test data, both for the word tokens and peak tokens. The space of possible hyperparameters to explore in GC-LDA is vast, so we restrict our comparison to the aspects of the model which are novel relative to the original Correspondence-LDA model. Specifically, for all three model variants, we compared the log-likelihood of the test data across different values of γ, where γ ∈ 0, 0.001, 0.01, 0.1, 1 . We note again here that the no-subregions model with γ = 0 is equivalent to a smoothed version of Correspondence-LDA [2] (see footnote 2 for additional clarification). The remainder of the parameters were fixed as follows (chosen based on a combination of precedent from the topic modeling literature and preliminary model exploration): T = 100, α = .1, and β = .01 for all models, and δ = 1.0 for the models with subregions. All models were trained for 1000 iterations. 7 Figure 3 presents the held out log-likelihoods for all models across different settings of γ, in terms of (i) the total log-likelihood for both activation tokens and word tokens (left) (ii) log-likelihood for activation tokens only (middle), and (iii) log likelihood for word tokens only (right). For both activation tokens and word tokens, for all three versions of GC-LDA, using a non-zero γ leads to significant improvement in performance. In terms of predicting activation tokens alone, there is a monotonic relationship between the size of γ and log-likelihood. This is unsurprising, since increasing γ reduces the extent that word tokens constrain the spatial fit of the model. In terms of predicting word tokens (and overall log-likelihood), the effect of γ shows an inverted-U function, with the best performance in the range of .01 to .1. These patterns were consistent across all three variants of GC-LDA. Taken together, our results suggest that using a non-zero γ results in a significant improvement over the Correspondence-LDA model. In terms of comparisons across model variants, we found that both subregions models were significant improvements over the no-subregions models in terms of total log-likelihood, although the nosubregions model performed slightly better than the constrained subregions model at predicting word tokens. In terms of the two subregions models, performance is overall fairly similar. Generally, the constrained subregions model performs slightly better than the unconstrained model in terms of predicting peak tokens, but slightly worse in terms of predicting word tokens. The differences between the two subregions models in terms of total log-likelihood were negligible. These results do not provide a strong statistical case for choosing one subregions model over the other; instead, they suggest that the modeler ought to choose between models based on their respective theoretical or qualitative properties (e.g., biological plausibility, as discussed in Section 3.1). Activations only Words only Activations + Words Log-Likelihood Figure 3: Log Likelihoods of held out data for the three GC-LDA models as a function of model parameter γ. Left: total log-likelihood (activation tokens + word tokens). Middle: log-likelihood of activation tokens only. Right: log-likelihood of word tokens only. 4 Summary We have presented generalized correspondence LDA (GC-LDA) – a generalization of the Correspondence-LDA model, with a focus on three variants that capture spatial properties motivated by neuroimaging applications. We illustrated how this model can be applied to a novel type of metadata—namely, the spatial peak activation coordinates reported in fMRI publications—and how it can be used to generate a relatively comprehensive atlas of functional brain regions. Our quantitative comparisons demonstrate that the GC-LDA model outperforms the original Correspondence-LDA model at predicting both missing word tokens and missing activation peak tokens. This improvement was demonstrated in terms of both the introduction of the γ parameter, and with respect to alternative parameterizations of topics’ spatial distributions. Beyond these quantitative results, our qualitative analysis demonstrates that the model can recover interpretable topics corresponding closely to known functional regions of the brain. We also showed that one variant of the model can recover known features regarding the hemispheric lateralization of certain cognitive functions. These models show promise for the field of cognitive neuroscience, both for summarizing existing results and for generating novel hypotheses. We also expect that novel features of GC-LDA can be carried over to other extensions of Correspondence-LDA in the literature. In future work, we plan to explore other spatial variants of these models that may better capture the morphological features of distinct brain regions – e.g., using hierarchical priors that can capture the hierarchical organization of brain systems. We also hope to improve the model by incorporating features such as the correlation between topics. Applications and extensions of our approach for more standard image processing applications may also be a fruitful area of research. 8 References [1] Arthur Asuncion, Max Welling, Padhraic Smyth, and Yee Whye Teh. On smoothing and inference for topic models. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, pages 27–34. AUAI Press, 2009. [2] David M Blei and Michael I Jordan. Modeling annotated data. In Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, pages 127–134. ACM, 2003. [3] David M Blei, Andrew Y Ng, and Michael I Jordan. Latent dirichlet allocation. the Journal of machine Learning research, 3:993–1022, 2003. [4] Vince D Calhoun, Jingyu Liu, and Tülay Adalı. A review of group ica for fmri data and ica for joint inference of imaging, genetic, and erp data. Neuroimage, 45(1):S163–S172, 2009. [5] Jeremy R Manning, Rajesh Ranganath, Kenneth A Norman, and David M Blei. Topographic factor analysis: a bayesian model for inferring brain networks from neural data. PloS one, 9(5):e94914, 2014. [6] Adrian M Owen, Kathryn M McMillan, Angela R Laird, and Ed Bullmore. N-back working memory paradigm: A meta-analysis of normative functional neuroimaging studies. Human brain mapping, 25(1):46– 59, 2005. [7] Russell A Poldrack, Jeanette A Mumford, Tom Schonberg, Donald Kalar, Bishal Barman, and Tal Yarkoni. Discovering relations between mind, brain, and mental disorders using topic mapping. PLoS Comput Biol, 8(10):e1002707, 2012. [8] Stephen M Smith, Peter T Fox, Karla L Miller, David C Glahn, P Mickle Fox, Clare E Mackay, Nicola Filippini, Kate E Watkins, Roberto Toro, Angela R Laird, et al. Correspondence of the brain’s functional architecture during activation and rest. Proceedings of the National Academy of Sciences, 106(31):13040– 13045, 2009. [9] Bertrand Thirion, Gaël Varoquaux, Elvis Dohmatob, and Jean-Baptiste Poline. Which fmri clustering gives good brain parcellations? Frontiers in neuroscience, 8(167):13, 2014. [10] David C Van Essen, Stephen M Smith, Deanna M Barch, Timothy EJ Behrens, Essa Yacoub, Kamil Ugurbil, WU-Minn HCP Consortium, et al. The wu-minn human connectome project: an overview. Neuroimage, 80:62–79, 2013. [11] Mathieu Vigneau, Virginie Beaucousin, Pierre-Yves Herve, Hugues Duffau, Fabrice Crivello, Olivier Houde, Bernard Mazoyer, and Nathalie Tzourio-Mazoyer. Meta-analyzing left hemisphere language areas: phonology, semantics, and sentence processing. Neuroimage, 30(4):1414–1432, 2006. [12] Tal Yarkoni, Russell A Poldrack, Thomas E Nichols, David C Van Essen, and Tor D Wager. Large-scale automated synthesis of human functional neuroimaging data. Nature methods, 8(8):665–670, 2011. [13] BT Thomas Yeo, Fenna M Krienen, Simon B Eickhoff, Siti N Yaakub, Peter T Fox, Randy L Buckner, Christopher L Asplund, and Michael WL Chee. Functional specialization and flexibility in human association cortex. Cerebral Cortex, page bhu217, 2014. 9 | 2016 | 240 |
6,151 | Fast ϵ-free Inference of Simulation Models with Bayesian Conditional Density Estimation George Papamakarios School of Informatics University of Edinburgh g.papamakarios@ed.ac.uk Iain Murray School of Informatics University of Edinburgh i.murray@ed.ac.uk Abstract Many statistical models can be simulated forwards but have intractable likelihoods. Approximate Bayesian Computation (ABC) methods are used to infer properties of these models from data. Traditionally these methods approximate the posterior over parameters by conditioning on data being inside an ϵ-ball around the observed data, which is only correct in the limit ϵ→0. Monte Carlo methods can then draw samples from the approximate posterior to approximate predictions or error bars on parameters. These algorithms critically slow down as ϵ→0, and in practice draw samples from a broader distribution than the posterior. We propose a new approach to likelihood-free inference based on Bayesian conditional density estimation. Preliminary inferences based on limited simulation data are used to guide later simulations. In some cases, learning an accurate parametric representation of the entire true posterior distribution requires fewer model simulations than Monte Carlo ABC methods need to produce a single sample from an approximate posterior. 1 Introduction A simulator-based model is a data-generating process described by a computer program, usually with some free parameters we need to learn from data. Simulator-based modelling lends itself naturally to scientific domains such as evolutionary biology [1], ecology [24], disease epidemics [10], economics [8] and cosmology [23], where observations are best understood as products of underlying physical processes. Inference in these models amounts to discovering plausible parameter settings that could have generated our observed data. The application domains mentioned can require properly calibrated distributions that express uncertainty over plausible parameters, rather than just point estimates, in order to reach scientific conclusions or make decisions. As an analytical expression for the likelihood of parameters given observations is typically not available for simulator-based models, conventional likelihood-based Bayesian inference is not applicable. An alternative family of algorithms for likelihood-free inference has been developed, referred to as Approximate Bayesian Computation (ABC). These algorithms simulate the model repeatedly and only accept parameter settings which generate synthetic data similar to the observed data, typically gathered in a real-world experiment. Rejection ABC [21], the most basic ABC algorithm, simulates the model for each setting of proposed parameters, and rejects parameters if the generated data is not within a certain distance from the observations. The accepted parameters form a set of independent samples from an approximate posterior. Markov Chain Monte Carlo ABC (MCMC-ABC) [13] is an improvement over rejection ABC which, instead of independently proposing parameters, explores the parameter space by perturbing the most recently accepted parameters. Sequential Monte Carlo ABC (SMC-ABC) [2, 5] uses importance sampling to simulate a sequence of slowly-changing distributions, the last of which is an approximation to the parameter posterior. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Conventional ABC algorithms such as the above suffer from three drawbacks. First, they only represent the parameter posterior as a set of (possibly weighted or correlated) samples. A samplebased representation easily gives estimates and error bars of individual parameters, and model predictions. However these computations are noisy, and it is not obvious how to perform some other computations using samples, such as combining posteriors from two separate analyses. Second, the parameter samples do not come from the correct Bayesian posterior, but from an approximation based on assuming a pseudo-observation that the data is within an ϵ-ball centred on the data actually observed. Third, as the ϵ-tolerance is reduced, it can become impractical to simulate the model enough times to match the observed data even once. When simulations are expensive to perform, good quality inference becomes impractical. We propose a parametric approach to likelihood-free inference, which unlike conventional ABC does not suffer from the above three issues. Instead of returning samples from an ϵ-approximation to the posterior, our approach learns a parametric approximation to the exact posterior, which can be made as accurate as required. Preliminary fits to the posterior are used to guide future simulations, which can reduce the number of simulations required to learn an accurate approximation by orders of magnitude. Our approach uses conditional density estimation with Bayesian neural networks, and draws upon advances in parametric density estimation, stochastic variational inference, and recognition networks, as discussed in the related work section. 2 Bayesian conditional density estimation for likelihood-free inference 2.1 Simulator-based models and ABC Let θ be a vector of parameters controlling a simulator-based model, and let x be a data vector generated by the model. The model may be provided as a probabilistic program that can be easily simulated, and implicitly defines a likelihood p(x | θ), which we assume we cannot evaluate. Let p(θ) encode our prior beliefs about the parameters. Given an observation xo, we are interested in the parameter posterior p(θ | x = xo) ∝p(x = xo | θ) p(θ). As the likelihood p(x = xo | θ) is unavailable, conventional Bayesian inference cannot be carried out. The principle behind ABC is to approximate p(x = xo | θ) by p(∥x −xo∥< ϵ | θ) for a sufficiently small value of ϵ, and then estimate the latter—e.g. by Monte Carlo—using simulations from the model. Hence, ABC approximates the posterior by p(θ | ∥x −xo∥< ϵ), which is typically broader and more uncertain. ABC can trade off computation for accuracy by decreasing ϵ, which improves the approximation to the posterior but requires more simulations from the model. However, the approximation becomes exact only when ϵ →0, in which case simulations never match the observations, p(∥x −xo∥< ϵ | θ) →0, and existing methods break down. In this paper, we refer to p(θ | x = xo) as the exact posterior, as it corresponds to setting ϵ = 0 in p(θ | ∥x −xo∥< ϵ). In most practical applications of ABC, x is taken to be a fixed-length vector of summary statistics that is calculated from data generated by the simulator, rather than the raw data itself. Extracting statistics is often necessary in practice, to reduce the dimensionality of the data and maintain p(∥x −xo∥< ϵ | θ) to practically acceptable levels. For the purposes of this paper, we will make no distinction between raw data and summary statistics, and we will regard the calculation of summary statistics as part of the data generating process. 2.2 Learning the posterior Rather than using simulations from the model in order to estimate an approximate likelihood, p(∥x −xo∥< ϵ | θ), we will use the simulations to directly estimate p(θ | x = xo). We will run simulations for parameters drawn from a distribution, ˜p(θ), which we shall refer to as the proposal prior. The proposition below indicates how we can then form a consistent estimate of the exact posterior, using a flexible family of conditional densities, qφ(θ | x), parameterized by a vector φ. Proposition 1. We assume that each of a set of N pairs (θn, xn) was independently generated by θn ∼˜p(θ) and xn ∼p(x | θn). (1) In the limit N →∞, the probability of the parameter vectors Q n qφ(θn | xn) is maximized w.r.t. φ if and only if qφ(θ | x) ∝˜p(θ) p(θ) p(θ | x), (2) 2 provided a setting of φ that makes qφ(θ | x) proportional to ˜p(θ) p(θ) p(θ | x) exists. Intuition: if we simulated enough parameters from the prior, the density estimator qφ would learn a conditional of the joint prior model over parameters and data, which is the posterior p(θ | x). If we simulate parameters drawn from another distribution, we need to “importance reweight” the result. A more detailed proof can be found in Section A of the supplementary material. The proposition above suggests the following procedure for learning the posterior: (a) propose a set of parameter vectors {θn} from the proposal prior; (b) for each θn run the simulator to obtain a corresponding data vector xn; (c) train qφ with maximum likelihood on {θn, xn}; and (d) estimate the posterior by ˆp(θ | x = xo) ∝p(θ) ˜p(θ) qφ(θ | xo). (3) This procedure is summarized in Algorithm 2. 2.3 Choice of conditional density estimator and proposal prior In choosing the types of density estimator qφ(θ | x) and proposal prior ˜p(θ), we need to meet the following criteria: (a) qφ should be flexible enough to represent the posterior but easy to train with maximum likelihood; (b) ˜p(θ) should be easy to evaluate and sample from; and (c) the right-hand side expression in Equation (3) should be easily evaluated and normalized. We draw upon work on conditional neural density estimation and take qφ to be a Mixture Density Network (MDN) [3] with fully parameterized covariance matrices. That is, qφ takes the form of a mixture of K Gaussian components qφ(θ | x) = P k αk N(θ | mk, Sk), whose mixing coefficients {αk}, means {mk} and covariance matrices {Sk} are computed by a feedforward neural network parameterized by φ, taking x as input. Such an architecture is capable of representing any conditional distribution arbitrarily accurately—provided the number of components K and number of hidden units in the neural network are sufficiently large—while remaining trainable by backpropagation. The parameterization of the MDN is detailed in Section B of the supplementary material. We take the proposal prior to be a single Gaussian ˜p(θ) = N(θ | m0, S0), with mean m0 and full covariance matrix S0. Assuming the prior p(θ) is a simple distribution (uniform or Gaussian, as is typically the case in practice), then this choice allows us to calculate ˆp(θ | x = xo) in Equation (3) analytically. That is, ˆp(θ | x = xo) will be a mixture of K Gaussians, whose parameters will be a function of {αk, mk, Sk} evaluated at xo (as detailed in Section C of the supplementary material). 2.4 Learning the proposal prior Simple rejection ABC is inefficient because the posterior p(θ | x = xo) is typically much narrower than the prior p(θ). A parameter vector θ sampled from p(θ) will rarely be plausible under p(θ | x = xo) and will most likely be rejected. Practical ABC algorithms attempt to reduce the number of rejections by modifying the way they propose parameters; for instance, MCMC-ABC and SMC-ABC propose new parameters by perturbing parameters they already consider plausible, in the hope that nearby parameters remain plausible. In our framework, the key to efficient use of simulations lies in the choice of proposal prior. If we take ˜p(θ) to be the actual prior, then qφ(θ | x) will learn the posterior for all x, as can be seen from Equation (2). Such a strategy however is grossly inefficient if we are only interested in the posterior for x = xo. Conversely, if ˜p(θ) closely matches p(θ | x = xo), then most simulations will produce samples that are highly informative in learning qφ(θ | x) for x = xo. In other words, if we already knew the true posterior, we could use it to construct an efficient proposal prior for learning it. We exploit this idea to set up a fixed-point system. Our strategy becomes to learn an efficient proposal prior that closely approximates the posterior as follows: (a) initially take ˜p(θ) to be the prior p(θ); (b) propose N samples {θn} from ˜p(θ) and corresponding samples {xn} from the simulator, and train qφ(θ | x) on them; (c) approximate the posterior using Equation (3) and set ˜p(θ) to it; (d) repeat until ˜p(θ) has converged. This procedure is summarized in Algorithm 1. In the procedure above, as long as qφ(θ | x) has only one Gaussian component (K = 1) then ˜p(θ) remains a single Gaussian throughout. Moreover, in each iteration we initialize qφ with the density 3 Algorithm 1: Training of proposal prior initialize qφ(θ | x) with one component ˜p(θ) ←p(θ) repeat for n = 1..N do sample θn ∼˜p(θ) sample xn ∼p(x | θn) end retrain qφ(θ | x) on {θn, xn} ˜p(θ) ←p(θ) ˜p(θ) qφ(θ | xo) until ˜p(θ) has converged; Algorithm 2: Training of posterior initialize qφ(θ | x) with K components // if qφ available by Algorithm 1 // initialize by replicating its // one component K times for n = 1..N do sample θn ∼˜p(θ) sample xn ∼p(x | θn) end train qφ(θ | x) on {θn, xn} ˆp(θ | x = xo) ←p(θ) ˜p(θ) qφ(θ | xo) estimator learnt in the iteration before, thus we keep training qφ throughout. This initialization allows us to use a small sample size N in each iteration, thus making efficient use of simulations. As we shall demonstrate in Section 3, the procedure above learns Gaussian approximations to the true posterior fast: in our experiments typically 4–6 iterations of 200–500 samples each were sufficient. This Gaussian approximation can be used as a rough but cheap approximation to the true posterior, or it can serve as a good proposal prior in Algorithm 2 for efficiently fine-tuning a non-Gaussian multi-component posterior. If the second strategy is adopted, then we can reuse the single-component neural density estimator learnt in Algorithm 1 to initialize qφ in Algorithm 2. The weights in the final layer of the MDN are replicated K times, with small random perturbations to break symmetry. 2.5 Use of Bayesian neural density estimators To make Algorithm 1 as efficient as possible, the number of simulations per iteration N should be kept small, while at the same time it should provide a sufficient training signal for qφ. With a conventional MDN, if N is made too small, there is a danger of overfitting, especially in early iterations, leading to over-confident proposal priors and an unstable procedure. Early stopping could be used to avoid overfitting; however a significant fraction of the N samples would have to be used as a validation set, leading to inefficient use of simulations. As a better alternative, we developed a Bayesian version of the MDN using Stochastic Variational Inference (SVI) for neural networks [12]. We shall refer to this Bayesian version of the MDN as MDN-SVI. An MDN-SVI has two sets of adjustable parameters of the same size, the means φm and the log variances φs. The means correspond to the parameters φ of a conventional MDN. During training, Gaussian noise of variance exp φs is added to the means independently for each training example (θn, xn). The Bayesian interpretation of this procedure is that it optimizes a variational Gaussian posterior with a diagonal covariance matrix over parameters φ. At prediction time, the noise is switched off and the MDN-SVI behaves like a conventional MDN with φ = φm. Section D of the supplementary material details the implementation and training of MDN-SVI. We found that using an MDN-SVI instead of an MDN improves the robustness and efficiency of Algorithm 1 because (a) MDN-SVI is resistant to overfitting, allowing us to use a smaller number of simulations N; (b) no validation set is needed, so all samples can be used for training; and (c) since overfitting is not an issue, no careful tuning of training time is necessary. 3 Experiments We showcase three versions of our approach: (a) learning the posterior with Algorithm 2 where qφ is a conventional MDN and the proposal prior ˜p(θ) is taken to be the actual prior p(θ), which we refer to as MDN with prior; (b) training a proposal prior with Algorithm 1 where qφ is an MDN-SVI, which we refer to as proposal prior; and (c) learning the posterior with Algorithm 2 where qφ is an MDN-SVI and the proposal prior ˜p(θ) is taken to be the one learnt in (b), which we refer to as MDN with proposal. All MDNs were trained using Adam [11] with its default parameters. We compare to three ABC baselines: (a) rejection ABC [21], where parameters are proposed from the prior and are accepted if ∥x −xo∥< ϵ; (b) MCMC-ABC [13] with a spherical Gaussian proposal, whose variance we manually tuned separately in each case for best performance; and (c) SMC4 −3 −2 −1 0 1 2 3 θ True posterior MDN with prior Proposal prior MDN with proposal −15 −10 −5 0 5 10 15 x −10 −5 0 5 10 θ Mean 75% of mass 99% of mass xo = 0 −15 −10 −5 0 5 10 15 x −10 −5 0 5 10 θ Mean 75% of mass 99% of mass xo = 0 Figure 1: Results on mixture of two Gaussians. Left: approximate posteriors learnt by each strategy for xo = 0. Middle: full conditional density qφ(θ|x) leant by the MDN trained with prior. Right: full conditional density qφ(θ|x) learnt by the MDN-SVI trained with proposal prior. Vertical dashed lines show the location of the observation xo = 0. ABC [2], where the sequence of ϵ’s was exponentially decayed, with a decay rate manually tuned separately in each case for best performance. MCMC-ABC was given the unrealistic advantage of being initialized with a sample from rejection ABC, removing the need for an otherwise necessary burn-in period. Code for reproducing the experiments is provided in the supplementary material and at https://github.com/gpapamak/epsilon_free_inference. 3.1 Mixture of two Gaussians The first experiment is a toy problem where the goal is to infer the common mean θ of a mixture of two 1D Gaussians, given a single datapoint xo. The setup is p(θ) = U(θ | θα, θβ) and p(x | θ) = α N x | θ, σ2 1 + (1 −α) N x | θ, σ2 2 , (4) where θα = −10, θβ = 10, α = 0.5, σ1 = 1, σ2 = 0.1 and xo = 0. The posterior can be calculated analytically, and is proportional to an equal mixture of two Gaussians centred at xo with variances σ2 1 and σ2 2, restricted to [θα, θβ]. This problem is often used in the SMC-ABC literature to illustrate the difficulty of MCMC-ABC in representing long tails. Here we use it to demonstrate the correctness of our approach and its ability to accurately represent non-Gaussian long-tailed posteriors. Figure 1 shows the results of neural density estimation using each strategy. All MDNs have one hidden layer with 20 tanh units and 2 Gaussian components, except for the proposal prior MDN which has a single component. Both MDN with prior and MDN with proposal learn good parametric approximations to the true posterior, and the proposal prior is a good Gaussian approximation to it. We used 10K simulations to train the MDN with prior, whereas the prior proposal took 4 iterations of 200 simulations each to train, and the MDN with proposal took 1000 simulations on top of the previous 800. The MDN with prior learns the posterior distributions for a large range of possible observations x (middle plot of Figure 1), whereas the MDN with proposal gives accurate posterior probabilities only near the value actually observed (right plot of Figure 1). 3.2 Bayesian linear regression In Bayesian linear regression, the goal is to infer the parameters θ of a linear map from noisy observations of outputs at known inputs. The setup is p(θ) = N(θ | m, S) and p(x | θ) = Q i N xi | θT ui, σ2 , (5) where we took m = 0, S = I, σ = 0.1, randomly generated inputs {ui} from a standard Gaussian, and randomly generated observations xo from the model. In our setup, θ and x have 6 and 10 dimensions respectively. The posterior is analytically tractable, and is a single Gaussian. All MDNs have one hidden layer of 50 tanh units and one Gaussian component. ABC methods were run for a sequence of decreasing ϵ’s, up to their failing points. To measure the approximation quality to the posterior, we analytically calculated the KL divergence from the true posterior to the learnt posterior (which for ABC was taken to be a Gaussian fit to the set of returned posterior samples). The left of Figure 2 shows the approximation quality vs ϵ; MDN methods are shown as horizontal 5 10−1 100 101 ϵ 10−2 10−1 100 101 102 103 KL divergence Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. 10−2 10−1 100 101 102 103 104 KL divergence 100 101 102 103 104 105 106 107 # simulations (per effective sample for ABC) Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. −0.20 −0.15 −0.10 −0.05 0.00 0.05 θ1 True posterior MDN with prior Proposal prior MDN with prop. MCMC-ABC SMC-ABC Figure 2: Results on Bayesian linear regression. Left: KL divergence from true posterior to approximation vs ϵ; lower is better. Middle: number of simulations vs KL divergence; lower left is better. Note that number of simulations is total for MDNs, and per effective sample for ABC. Right: Posterior marginals for θ1 as computed by each method. ABC posteriors (represented as histograms) correspond to the setting of ϵ that minimizes the KL in the left plot. lines. As ϵ is decreased, ABC methods sample from an increasingly better approximation to the true posterior, however they eventually reach their failing point, or take prohibitively long. The best approximations are achieved by MDN with proposal and a very long run of SMC-ABC. The middle of Figure 2 shows the increase in number of simulations needed to improve approximation quality (as ϵ decreases). We quote the total number of simulations for MDN training, and the number of simulations per effective sample for ABC. Section E of the supplementary material describes how the number of effective samples is calculated. The number of simulations per effective sample should be multiplied by the number of effective samples needed in practice. Moreover, SMC-ABC will not work well with only one particle, so many times the quoted cost will always be needed. Here, MDNs make more efficient use of simulations than Monte Carlo ABC methods. Sequentially fitting a prior proposal was more than ten times cheaper than training with prior samples, and more accurate. 3.3 Lotka–Volterra predator-prey population model The Lotka–Volterra model is a stochastic Markov jump process that describes the continuous time evolution of a population of predators interacting with a population of prey. There are four possible reactions: (a) a predator being born, (b) a predator dying, (c) a prey being born, and (d) a prey being eaten by a predator. Positive parameters θ = (θ1, θ2, θ3, θ4) control the rate of each reaction. Given a set of statistics xo calculated from an observed population time series, the objective is to infer θ. We used a flat prior over log θ, and calculated a set of 9 statistics x. The full setup is detailed in Section F of the supplementary material. The Lotka–Volterra model is commonly used in the ABC literature as a realistic model which can be simulated, but whose likelihood is intractable. One of the properties of Lotka–Volterra is that typical nature-like observations only occur for very specific parameter settings, resulting in narrow, Gaussian-like posteriors that are hard to recover. The MDN trained with prior has two hidden layers of 50 tanh units each, whereas the MDN-SVI used to train the proposal prior and the MDN-SVI trained with proposal have one hidden layer of 50 tanh units. All three have one Gaussian component. We found that using more than one components made no difference to the results; in all cases the MDNs chose to use only one component and switch the rest off, which is consistent with our observation about the near-Gaussianity of the posterior. We measure how well each method retrieves the true parameter values that were used to generate xo by calculating their log probability under each learnt posterior; for ABC a Gaussian fit to the posterior samples was used. The left panel of Figure 3 shows how this log probability varies with ϵ, demonstrating the superiority of MDN methods over ABC. In the middle panel we can see that MDN training with proposal makes efficient use of simulations compared to training with prior and ABC; note that for ABC the number of simulations is only for one effective sample. In the right panel, we can see that the estimates returned by MDN methods are more confident around the true parameters compared to ABC, because the MDNs learn the exact posterior rather than an inflated version of it like ABC does (plots for the other three parameters look similar). We found that when training an MDN with a well-tuned proposal that focuses on the plausible region, an MDN with fewer parameters is needed compared to training with the prior. This is because the 6 10−2 10−1 100 101 ϵ −5 0 5 10 15 Neg. log probability of true parameters Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. −5 0 5 10 15 Neg. log probability of true parameters 100 101 102 103 104 105 106 # simulations (per effective sample for ABC) Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. Rej. ABC MCMC ABC SMC ABC MDN prior Prop. prior MDN prop. −5.0 −4.8 −4.6 −4.4 −4.2 −4.0 −3.8 log θ1 True value Figure 3: Results on Lotka–Volterra. Left: negative log probability of true parameters vs ϵ; lower is better. Middle: number of simulations vs negative log probability; lower left is better. Note that number of simulations is total for MDNs, but per effective sample for ABC. Right: Estimates of log θ1 with 2 standard deviations. ABC estimates used many more simulations with the smallest feasible ϵ. MDN trained with proposal needs to learn only the local relationship between x and θ near xo, as opposed to in the entire domain of the prior. Hence, not only are savings achieved in number of simulations, but also training the MDN itself becomes more efficient. 3.4 M/G/1 queue model The M/G/1 queue model describes the processing of a queue of continuously arriving jobs by a single server. In this model, the time the server takes to process each job is independently and uniformly distributed in the interval [θ1, θ2]. The time interval between arrival of two consecutive jobs is independently and exponentially distributed with rate θ3. The server observes only the time intervals between departure of two consecutive jobs. Given a set of equally-spaced percentiles xo of inter-departure times, the task is to infer parameters θ = (θ1, θ2, θ3). This model is easy to simulate but its likelihood is intractable, and it has often been used as an ABC benchmark [4, 16]. Unlike Lotka–Volterra, data x is weakly informative about θ, and hence the posterior over θ tends to be broad and non-Gaussian. In our setup, we placed flat independent priors over θ1, θ2 −θ1 and θ3, and we took x to be 5 equally spaced percentiles, as detailed in Section G of the supplementary material. The MDN trained with prior has two hidden layers of 50 tanh units each, whereas the MDN-SVI used to train the proposal prior and the one trained with proposal have one hidden layer of 50 tanh units. As observed in the Lotka–Volterra demo, less capacity is required when training with proposal, as the relationship to be learned is local and hence simpler, which saves compute time and gives a more accurate final posterior. All MDNs have 8 Gaussian components (except the MDN-SVI used to train the proposal prior, which always has one), which, after experimentation, we determined are enough for the MDNs to represent the non-Gaussian nature of the posterior. Figure 4 reports the log probability of the true parameters under each posterior learnt—for ABC, the log probability was calculated by fitting a mixture of 8 Gaussians to posterior samples using Expectation-Maximization—and the number of simulations needed to achieve it. As before, MDN methods are more confident compared to ABC around the true parameters, which is due to ABC computing a broader posterior than the true one. MDN methods make more efficient use of simulations, since they use all of them for training and, unlike ABC, do not throw a proportion of them away. 4 Related work Regression adjustment. An early parametric approach to ABC is regression adjustment, where a parametric regressor is trained on simulation data in order to learn a mapping from x to θ. The learnt mapping is then used to correct for using a large ϵ, by adjusting the location of posterior samples gathered by e.g. rejection ABC. Beaumont et al. [1] used linear regressors, and later Blum and François [4] used neural networks with one hidden layer that separately predicted the mean and variance of θ. Both can be viewed as rudimentary density estimators and as such they are a predecessor to our work. However, they were not flexible enough to accurately estimate the posterior, and they were only used within some other ABC method to allow for a larger ϵ. In our work, we make conditional density estimation flexible enough to approximate the posterior accurately. 7 10−4 10−3 10−2 10−1 ϵ −3 −2 −1 0 1 2 3 4 Neg. log probability of true parameters Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. −3 −2 −1 0 1 2 3 Neg. log probability of true parameters 100 101 102 103 104 105 106 107 108 # simulations (per effective sample for ABC) Rej. ABC MCMC-ABC SMC-ABC MDN with prior Proposal prior MDN with prop. Rej. ABC MCMC ABC SMC ABC MDN prior Prop. prior MDN prop. 0 2 4 6 8 10 12 θ2 True value Figure 4: Results on M/G/1. Left: negative log probability of true parameters vs ϵ; lower is better. Middle: number of simulations vs negative log probability; lower left is better. Note that number of simulations is total for MDNs, and per effective sample for ABC. Right: Estimates of θ2 with 2 standard deviations; ABC estimates correspond to the lowest setting of ϵ used. Synthetic likelihood. Another parametric approach is synthetic likelihood, where parametric models are used to estimate the likelihood p(x | θ). Wood [24] used a single Gaussian, and later Fan et al. [7] used a mixture Gaussian model. Both of them learnt a separate density model of x for each θ by repeatedly simulating the model for fixed θ. More recently, Meeds and Welling [14] used a Gaussian process model to interpolate Gaussian likelihood approximations between different θ’s. Compared to learning the posterior, synthetic likelihood has the advantage of not depending on the choice of proposal prior. Its main disadvantage is the need of further approximate inference on top of it in order to obtain the posterior. In our work we directly learn the posterior, eliminating the need for further inference, and we address the problem of correcting for the proposal prior. Efficient Monte Carlo ABC. Recent work on ABC has focused on reducing the simulation cost of sample-based ABC methods. Hamiltonian ABC [15] improves upon MCMC-ABC by using stochastically estimated gradients in order to explore the parameter space more efficiently. Optimization Monte Carlo ABC [16] explicitly optimizes the location of ABC samples, which greatly reduces rejection rate. Bayesian optimization ABC [10] models p(∥x −xo∥| θ) as a Gaussian process and then uses Bayesian optimization to guide simulations towards the region of small distances ∥x −xo∥. In our work we show how a significant reduction in simulation cost can also be achieved with parametric methods, which target the posterior directly. Recognition networks. Our use of neural density estimators for learning posteriors is reminiscent of recognition networks in machine learning. A recognition network is a neural network that is trained to invert a generative model. The Helmholtz machine [6], the variational auto-encoder [12] and stochastic backpropagation [22] are examples where a recognition network is trained jointly with the generative network it is designed to invert. Feedforward neural networks have been used to invert black-box generative models [18] and binary-valued Bayesian networks [17], and convolutional neural networks have been used to invert a physics engine [25]. Our work illustrates the potential of recognition networks in the field of likelihood-free inference, where the generative model is fixed, and inference of its parameters is the goal. Learning proposals. Neural density estimators have been employed in learning proposal distributions for importance sampling [20] and Sequential Monte Carlo [9, 19]. Although not our focus here, our fit to the posterior could also be used within Monte Carlo inference methods. In this work we see how far we can get purely by fitting a series of conditional density estimators. 5 Conclusions Bayesian conditional density estimation improves likelihood-free inference in three main ways: (a) it represents the posterior parametrically, as opposed to as a set of samples, allowing for probabilistic evaluations later on in the pipeline; (b) it targets the exact posterior, rather than an ϵ-approximation of it; and (c) it makes efficient use of simulations by not rejecting samples, by interpolating between samples, and by gradually focusing on the plausible parameter region. Our belief is that neural density estimation is a tool with great potential in likelihood-free inference, and our hope is that this work helps in establishing its usefulness in the field. 8 Acknowledgments We thank Amos Storkey for useful comments. George Papamakarios is supported by the Centre for Doctoral Training in Data Science, funded by EPSRC (grant EP/L016427/1) and the University of Edinburgh, and by Microsoft Research through its PhD Scholarship Programme. References [1] M. A. Beaumont, W. Zhang, and D. J. Balding. Approximate Bayesian Computation in population genetics. Genetics, 162:2025–2035, Dec. 2002. [2] M. A. Beaumont, J.-M. Cornuet, J.-M. Marin, and C. P. Robert. Adaptive Approximate Bayesian Computation. Biometrika, 96(4):983–990, 2009. [3] C. M. Bishop. Mixture density networks. Technical Report NCRG/94/004, Aston University, 1994. [4] M. G. B. Blum and O. François. Non-linear regression models for Approximate Bayesian Computation. Statistics and Computing, 20(1):63–73, 2010. [5] F. V. Bonassi and M. West. Sequential Monte Carlo with adaptive weights for Approximate Bayesian Computation. Bayesian Analysis, 10(1):171–187, Mar. 2015. [6] P. Dayan, G. E. Hinton, R. M. Neal, and R. S. Zemel. The Helmholtz machine. Neural Computation, 7: 889–904, 1995. [7] Y. Fan, D. J. Nott, and S. A. Sisson. Approximate Bayesian Computation via regression density estimation. Stat, 2(1):34–48, 2013. [8] C. Gouriéroux, A. Monfort, and E. Renault. Indirect inference. Journal of Applied Econometrics, 8(S1): S85–S118, 1993. [9] S. Gu, Z. Ghahramani, and R. E. Turner. Neural adaptive Sequential Monte Carlo. Advances in Neural Information Processing Systems 28, pages 2629–2637, 2015. [10] M. U. Gutmann and J. Corander. Bayesian optimization for likelihood-free inference of simulator-based statistical models. arXiv e-prints, abs/1501.03291v3, 2015. [11] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. Proceedings of the 3rd International Conference on Learning Representations, 2014. [12] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. Proceedings of the 2nd International Conference on Learning Representations, 2013. [13] P. Marjoram, J. Molitor, V. Plagnol, and S. Tavaré. Markov chain Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences, 100(26):15324–15328, Dec. 2003. [14] E. Meeds and M. Welling. GPS-ABC: Gaussian Process Surrogate Approximate Bayesian Computation. Proceedings of the 30th Conference on Uncertainty in Artificial Intelligence, 30, 2014. [15] E. Meeds, R. Leenders, and M. Welling. Hamiltonian ABC. Proceedings of the 31st Conference on Uncertainty in Artificial Intelligence, pages 582–591, 2015. [16] T. Meeds and M. Welling. Optimization Monte Carlo: Efficient and embarrassingly parallel likelihood-free inference. Advances in Neural Information Processing Systems 28, pages 2071–2079, 2015. [17] Q. Morris. Recognition networks for approximate inference in BN20 networks. Proceedings of the 17th Conference on Uncertainty in Artificial Intelligence, pages 370–377, 2001. [18] V. Nair, J. Susskind, and G. E. Hinton. Analysis-by-synthesis by learning to invert generative black boxes. Proceedings of the 18th International Conference on Artificial Neural Networks, 5163:971–981, 2008. [19] B. Paige and F. Wood. Inference networks for Sequential Monte Carlo in graphical models. Proceedings of the 33rd International Conference on Machine Learning, 2016. [20] G. Papamakarios and I. Murray. Distilling intractable generative models. Probabilistic Integration Workshop at Neural Information Processing Systems, 2015. [21] J. K. Pritchard, M. T. Seielstad, A. Perez-Lezaun, and M. W. Feldman. Population growth of human Y chromosomes: a study of Y chromosome microsatellites. Molecular Biology and Evolution, 16(12): 1791–1798, 1999. [22] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. Proceedings of the 31st International Conference on Machine Learning, pages 1278–1286, 2014. [23] C. M. Schafer and P. E. Freeman. Likelihood-free inference in cosmology: Potential for the estimation of luminosity functions. Statistical Challenges in Modern Astronomy V, pages 3–19, 2012. [24] S. N. Wood. Statistical inference for noisy nonlinear ecological dynamic systems. Nature, 466(7310): 1102–1104, 2010. [25] J. Wu, I. Yildirim, J. J. Lim, B. Freeman, and J. Tenenbaum. Galileo: Perceiving physical object properties by integrating a physics engine with deep learning. Advances in Neural Information Processing Systems 28, pages 127–135, 2015. 9 | 2016 | 241 |
6,152 | Ladder Variational Autoencoders Casper Kaae Sønderby⇤ casperkaae@gmail.com Tapani Raiko† tapani.raiko@aalto.fi Lars Maaløe‡ larsma@dtu.dk Søren Kaae Sønderby⇤ skaaesonderby@gmail.com Ole Winther⇤,‡ olwi@dtu.dk Abstract Variational autoencoders are powerful models for unsupervised learning. However deep models with several layers of dependent stochastic variables are difficult to train which limits the improvements obtained using these highly expressive models. We propose a new inference model, the Ladder Variational Autoencoder, that recursively corrects the generative distribution by a data dependent approximate likelihood in a process resembling the recently proposed Ladder Network. We show that this model provides state of the art predictive log-likelihood and tighter log-likelihood lower bound compared to the purely bottom-up inference in layered Variational Autoencoders and other generative models. We provide a detailed analysis of the learned hierarchical latent representation and show that our new inference model is qualitatively different and utilizes a deeper more distributed hierarchy of latent variables. Finally, we observe that batch-normalization and deterministic warm-up (gradually turning on the KL-term) are crucial for training variational models with many stochastic layers. 1 Introduction The recently introduced variational autoencoder (VAE) [10, 19] provides a framework for deep generative models. In this work we study how the variational inference in such models can be improved while not changing the generative model. We introduce a new inference model using the same top-down dependency structure in both the inference and generative models achieving state-of-the-art generative performance. VAEs, consisting of hierarchies of conditional stochastic variables, are highly expressive models retaining the computational efficiency of fully factorized models, Figure 1 a). Although highly flexible these models are difficult to optimize for deep hierarchies due to multiple layers of conditional stochastic layers. The VAEs considered here are trained by optimizing a variational approximate posterior lower bounding the intractable true posterior. Recently used inference are calculated purely bottom-up with no interaction between the inference and generative models [10, 18, 19]. We propose a new structured inference model using the same top-down dependency structure in both the inference and generative models. Here the approximate posterior distribution can be viewed as merging information from a bottom up computed approximate likelihood term with top-down prior information from the generative distribution, see Figure 1 b). The sharing of information (and parameters) with the generative model gives the inference model knowledge of the current state of the generative model in each layer. The top down-pass then recursively corrects the generative distribution with a data dependent approximating the log-likelihood using a simple precision-weighted addition. ⇤Bioinformatics Centre, Department of Biology, University of Copenhagen, Denmark †Department of Computer Science, Aalto University, Finland ‡Department of Applied Mathematics and Computer Science, Technical University of Denmark 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. z1 z2 a) b) d1 d2 x x z1 z2 x z1 z2 shared z1 z2 x Figure 1: Inference (or encoder/recognition) and generative (or decoder) models for a) VAE and b) LVAE. Circles are stochastic variables and diamonds are deterministic variables. Figure 2: MNIST train (full lines) and test (dashed lines) set log-likelihood using one importance sample during training. The LVAE improves performance significantly over the regular VAE. This parameterization allows interactions between the bottom-up and top-down signals resembling the recently proposed Ladder Network [22, 17], and we therefore denote it Ladder-VAE (LVAE). For the remainder of this paper we will refer to VAEs as both the inference and generative model seen in Figure 1 a) and similarly LVAE as both the inference and generative model in Figure 1 b). We stress that the VAE and LVAE have identical generative models and only differ in the inference models. Previous work on VAEs have been restricted to shallow models with one or two layers of stochastic latent variables. The performance of such models are constrained by the restrictive mean field approximation to the intractable posterior distribution. Here we found that purely bottom-up inference optimized with gradient ascent are only to a limited degree able to utilize more than two layers of stochastic latent variables. We initially show that a warm-up period [2, 16, Section 6.2] to support stochastic units staying active in early training and batch-normalization (BN) [7] can significantly improve performance of VAEs. Using these VAE models as competitive baselines we show that LVAE improves the generative performance achieving as good or better performance than other (often complicated) methods for creating flexible variational distributions such as: The Variational Gaussian Processes [21], Normalizing Flows [18], Importance Weighted Autoencoders [3] or Auxiliary Deep Generative Models[13]. Compared to the bottom-up inference in VAEs we find that LVAE: 1) have better generative performance 2) provides a tighter bound on the true log-likelihood and 3) can utilize deeper and more distributed hierarchies of stochastic variables. Lastly we study the learned latent representations and find that these differ qualitatively between the LVAE and VAE with the LVAE capturing more high level structure in the datasets. In summary our contributions are: • A new inference model combining a Gaussian term, akin to an approximate Gaussian likelihood, with the generative model resulting in better generative performance than the normally used bottom-up VAE inference. • We provide a detailed study of the learned latent distributions and show that LVAE learns both a deeper and more distributed representation when compared to VAE. • We show that a deterministic warm-up period and batch-normalization are important for training deep stochastic models. 2 Methods VAEs and LVAEs simultaneously train a generative model p✓(x, z) = p✓(x|z)p✓(z) for data x using latent variables z, and an inference model qφ(z|x) by optimizing a variational lower bound to the likelihood p✓(x) = R p✓(x, z)dz. In the generative model p✓, the latent variables z are split into L layers zi, i = 1 . . . L, and each stochastic layer is a fully factorized Gaussian distribution conditioned 2 on the layer above: p✓(z) = p✓(zL) L−1 Y i=1 p✓(zi|zi+1) (1) p✓(zi|zi+1) = N # zi|µp,i(zi+1), σ2 p,i(zi+1) $ , p✓(zL) = N (zL|0, I) (2) p✓(x|z1) = N # x|µp,0(z1), σ2 p,0(z1) $ or P✓(x|z1) = B (x|µp,0(z1)) (3) where the observation model is matching either continuous-valued (Gaussian N) or binary-valued (Bernoulli B) data, respectively. We use subscript p (and q) to highlight if µ or σ2 belongs to the generative or inference distributions respectively. Note that while individual conditional distributions are fully factorized, the hierarchical specification allows the lower layers of the latent variables to be highly correlated. The variational principle provides a tractable lower bound on the log likelihood which can be used as a training criterion L. log p(x) ≥Eqφ(z|x) log p✓(x, z) qφ(z|x) & = L(✓, φ; x) (4) = −KL(qφ(z|x)||p✓(z)) + Eqφ(z|x) [log p✓(x|z)] , (5) where KL is the Kullback-Leibler divergence. A strictly tighter bound on the likelihood may be obtained at the expense of a K-fold increase of samples by using the importance weighted bound [3]: log p(x) ≥Eqφ(z(1)|x) . . . Eqφ(z(K)|x) " log K X k=1 p✓(x, z(k)) qφ(z(k)|x) # = LK(✓, φ; x) ≥L(✓, φ; x) . (6) The generative and inference parameters, ✓and φ, are jointly trained by optimizing Eq. (5) using stochastic gradient descent where we use the reparametrization trick for stochastic backpropagation through the Gaussian latent variables [10, 19]. The KL[qφ|p✓] is calculated analytically at each layer when possible and otherwise approximated using Monte Carlo sampling. 2.1 Variational autoencoder inference model VAE inference models are parameterized as a bottom-up process similar to [3, 9]. Conditioned on the stochastic layer below each stochastic layer is specified as a fully factorized Gaussian distribution: qφ(z|x) = qφ(z1|x) L Y i=2 qφ(zi|zi−1) (7) qφ(z1|x) = N # z1|µq,1(x), σ2 q,1(x) $ (8) qφ(zi|zi−1) = N # zi|µq,i(zi−1), σ2 q,i(zi−1) $ , i = 2 . . . L. (9) In this parameterization the inference and generative distributions are computed separately with no explicit sharing of information. In the beginning of the training procedure this might cause problems since the inference models have to approximately match the highly variable generative distribution in order to optimize the likelihood. The functions µ(·) and σ2(·) in the generative and VAE inference models are implemented as: d(y) =MLP(y) (10) µ(y) =Linear(d(y)) (11) σ2(y) =Softplus(Linear(d(y))) , (12) where MLP is a two layered multilayer perceptron network, Linear is a single linear layer, and Softplus applies log(1 + exp(·)) nonlinearity to each component of its argument vector ensuring positive variances. In our notation, each MLP(·) or Linear(·) gives a new mapping with its own parameters, so the deterministic variable d is used to mark that the MLP-part is shared between µ and σ2 whereas the last Linear layer is not shared. 2.2 Ladder variational autoencoder inference model We propose a new inference model that recursively corrects the generative distribution with a data dependent approximate likelihood term. First a deterministic upward pass computes the Gaussian 3 Figure 3: MNIST log-likelihood values for VAEs and the LVAE model with different number of latent layers, Batch-normalization (BN) and Warm-up (WU). a) Train log-likelihood, b) test log-likelihood and c) test log-likelihood with 5000 importance samples. likelihood like contributions: dn =MLP(dn−1) (13) ˆµq,i =Linear(di), i = 1 . . . L (14) ˆσ2 q,i =Softplus(Linear(di)), i = 1 . . . L (15) where d0 = x. This is followed by a stochastic downward pass recursively computing both the approximate posterior and generative distributions: qφ(z|x) =qφ(zL|x) L−1 Y i=1 qφ(zi|zi+1, x) (16) σq,i = 1 ˆσ−2 q,i + σ−2 p,i (17) µq,i = ˆµq,iˆσ−2 q,i + µp,iσ−2 p,i ˆσ−2 q,i + σ−2 p,i (18) qφ(zi|·) = N # zi|µq,i, σ2 q,i $ , (19) where µq,L = ˆµq,L and σ2 q,L = ˆσ2 q,L. The inference model is a precision-weighted combination of ˆµq and ˆσ2 q carrying bottom-up information and µp and σ2 p from the generative distribution carrying top-down prior information. This parameterization has a probabilistic motivation by viewing ˆµq and ˆσ2 q as an approximate Gaussian likelihood that is combined with a Gaussian prior µp and σ2 p from the generative distribution. Together these form the approximate posterior distribution q✓(z|x) using the same top-down dependency structure both in the inference and generative model. A line of motivation, already noted in [4], see [1] for a recent approach, is that a purely bottom-up inference process as in i.e. VAEs does not correspond well with real perception, where iterative interaction between bottom-up and top-down signals produces the final activity of a unit4. Notably it is difficult for the purely bottom-up inference networks to model the explaining away phenomenon, see [23, Chapter 5] for a recent discussion on this phenomenon. The LVAE model provides a framework with the wanted interaction, while not increasing the number of parameters. 2.3 Warm-up from deterministic to variational autoencoder The variational training criterion in Eq. (5) contains the reconstruction term p✓(x|z) and the variational regularization term. The variational regularization term causes some of the latent units to become uninformative during training [14] because the approximate posterior for unit k, q(zi,k| . . . ) is regularized towards its own prior p(zi,k| . . . ), a phenomenon also recognized in the VAE setting [3, 2]. This can be seen as a virtue of automatic relevance determination, but also as a problem when many units collapse early in training before they learned a useful representation. We observed that such units remain uninformative for the rest of the training, presumably trapped in a local minima or saddle point at KL(qi,k|pi,k) ⇡0, with the optimization algorithm unable to re-activate them. 4The idea was dismissed at the time, since it could introduce substantial theoretical complications. 4 We alleviate the problem by initializing training using the reconstruction error only (corresponding to training a standard deterministic auto-encoder), and then gradually introducing the variational regularization term: L(✓, φ; x)W U = −βKL(qφ(z|x)||p✓(z)) + Eqφ(z|x) [log p✓(x|z)] , (20) where β is increased linearly from 0 to 1 during the first Nt epochs of training. We denote this scheme warm-up (abbreviated WU in tables and graphs) because the objective goes from having a delta-function solution (corresponding to zero temperature) and then move towards the fully stochastic variational objective. This idea have previously been considered in [16, Section 6.2] and more recently in [2]. 3 Experiments To test our models we use the standard benchmark datasets MNIST, OMNIGLOT [11] and NORB [12]. The largest models trained used a hierarchy of five layers of stochastic latent variables of sizes 64, 32, 16, 8 and 4, going from bottom to top. We implemented all mappings using MLP’s with two layers of deterministic hidden units. In all models the MLP’s between x and z1 or d1 were of size 512. Subsequent layers were connected by MLP’s of sizes 256, 128, 64 and 32 for all connections in both the VAE and LVAE. Shallower models were created by removing latent variables from the top of the hierarchy. We sometimes refer to the five layer models as 64-32-16-8-4, the four layer models as 64-32-16-8 and so fourth. The models were trained end-to-end using the Adam [8] optimizer with a mini-batch size of 256. We report the train and test log-likelihood lower bounds, Eq. (5) as well as the approximated true log-likelihood calculated using 5000 importance weighted samples, Eq. (6). The models were implemented using the Theano [20], Lasagne [5] and Parmesan5 frameworks. The source code is available at github6 For MNIST, we used a sigmoid output layer to predict the mean of a Bernoulli observation model and leaky rectifiers (max(x, 0.1x)) as nonlinearities in the MLP’s. The models were trained for 2000 epochs with a learning rate of 0.001 on the complete training set. Models using warm-up used Nt = 200. Similarly to [3], we resample the binarized training values from the real-valued images using a Bernoulli distribution after each epoch which prevents the models from over-fitting. Some of the models were fine-tuned by continuing training for 2000 epochs while multiplying the learning rate with 0.75 after every 200 epochs and increase the number of Monte Carlo and importance weighted samples to 10 to reduce the variance in the approximation of the expectations in Eq. (4) and improve the inference model, respectively. Models trained on the OMNIGLOT dataset7, consisting of 28x28 binary images images were trained similar to above except that the number of training epochs was 1500. Models trained on the NORB dataset8, consisting of 32x32 grays-scale images with color-coding rescaled to [0, 1], used a Gaussian observation model with mean and variance predicted using a linear and a softplus output layer respectively. The settings were similar to the models above except that hyperbolic tangent was used as nonlinearities in the MLP’s and the number of training epochs was 2000. 3.1 Generative log-likelihood performance In Figure 3 we show the train and test set log-likelihood on the MNIST dataset for a series of different models with varying number of stochastic layers. Consider the Ltest 1 , Figure 3 b), the VAE without batch-normalization and warm-up does not improve for additional stochastic layers beyond one whereas VAEs with batch-normalization and warm-up improve performance up to three layers. The LVAE models performs better improving performance for each additional layer reaching Ltest 1 = −85.23 with five layers which is significantly higher than the best VAE score at −87.49 using three layers. As expected the improvement in performance is 5https://github.com/casperkaae/parmesan 6https://github.com/casperkaae/LVAE 7The OMNIGLOT data was partitioned and preprocessed as in [3], https://github.com/yburda/iwae/tree/master/datasets/OMNIGLOT 8The NORB dataset was downloaded in resized format from github.com/gwtaylor/convnet_matlab 5 Figure 4: log KL(q|p) for each latent unit is shown at different training epochs. Low KL (white) corresponds to an uninformative unit. The units are sorted for visualization. It is clear that vanilla VAE cannot train the higher latent layers, while introducing batch-normalization helps. Warm-up creates more active units early in training, some of which are then gradually pruned away during training, resulting in a more distributed final representation. Lastly, we see that the LVAE activates the highest number of units in each layer. log p((x)) VAE 1-layer + NF [18] -85.10 IWAE, 2-layer + IW=1 [3] -85.33 IWAE, 2-layer + IW=50 [3] -82.90 VAE, 2-layer + VGP [21] -81.90 LVAE, 5-layer -82.12 LVAE, 5-layer + finetuning -81.84 LVAE, 5-layer + finetuning + IW=10 -81.74 Table 1: Test set MNIST performance for importance weighted autoencoder (IWAE), VAE with normalizing flows (NF) and VAE with variational Gaussian process (VGP). Number of importance weighted (IW) samples used for training is one unless otherwise stated. decreasing for each additional layer, but we emphasize that the improvements are consistent even for the addition of the top-most layers. We found batch-normalization improved performance for all models, however especially for LVAE we found batch-normalization to be important. In Figure 3 c) the approximated true log-likelihood estimated using 5000 importance weighted samples is seen. Again the LVAE models performs better than the VAE reaching Ltest 5000 = −82.12 compared to the best VAE at −82.74. These results show that the LVAE achieves both a higher approximate log-likelihood score, but also a significantly tighter lower bound on the log-likelihood Ltest 1 . The models in Figure 3 were trained using fixed learning rate and one Monte Carlo and importance weighted sample. To improve performance we fine-tuned the best performing five layer LVAE models by training these for a further 2000 epochs with annealed learning rate and increasing the number of IW samples and see a slight improvements in the test set log-likelihood values, Table 1. We saw no signs of over-fitting for any of our models even though the hierarchical latent representations are highly expressive as seen in Figure 2. Comparing the results obtained here with current state-of-the art results on permutation invariant MNIST, Table 1, we see that the LVAE performs better than the normalizing flow VAE and importance weighted VAE and comparable to the Variational Gaussian Process VAE. However we note that these results are not directly comparable to these due to differences in the training procedure. To test the models on more challenging data we used the OMNIGLOT dataset, consisting of characters from 50 different alphabets with 20 samples of each character. The log-likelihood values, Table 2, shows similar trends as for MNIST with the LVAE achieving the best performance using five layers 6 VAE VAE +BN VAE +BN +WU LVAE +BN +WU OMNIGLOT 64 −111.21 −105.62 −104.51 − 64-32 −110.58 −105.51 −102.61 −102.63 64-32-16 −111.26 −106.09 −102.52 −102.18 64-32-16-8 −111.58 −105.66 −102.66 −102.21 64-32-16-8-4 −110.46 −105.45 −102.48 -102.11 NORB 64 2741 3198 3338 − 64-32 2792 3224 3483 3272 64-32-16 2786 3235 3492 3519 64-32-16-8 2689 3201 3482 3449 64-32-16-8-4 2654 3198 3422 3455 Table 2: Test set log-likelihood scores for models trained on the OMNIGLOT and NORB datasets. The left most column show dataset and the number of latent variables i each model. of latent variables, see the appendix for further results. The best log-likelihood results obtained here, −102.11, is higher than the best results from [3] at −103.38, which were obtained using more latent variables (100-50 vs 64-32-16-8-4) and further using 50 importance weighted samples for training. We tested the models using a continuous Gaussian observation model on the NORB dataset consisting of gray-scale images of 5 different toy objects under different illuminations and observation angles. The LVAE achieves a slightly higher score than the VAE, however none of the models see an increase in performance for more using more than three stochastic layers. We found the Gaussian observation models to be harder to optimize compared to the Bernoulli models, a finding also recognized in [24], which might explain the lower utilization of the topmost latent layers in these models. 3.2 Latent representations The probabilistic generative models studied here automatically tune the model complexity to the data by reducing the effective dimension of the latent representation due to the regularization effect of the priors in Eq. (4). However, as previously identified [16, 3], the latent representation is often overly sparse with few stochastic latent variables propagating useful information. To study the importance of individual units, we split the variational training criterion L into a sum of terms corresponding to each unit k in each layer i. For stochastic latent units, this is the KLdivergence between q(zi,k|·) and p(zi,k|zi+1). Figure 4 shows the evolution of these terms during training. This term is zero if the inference model is collapsed onto the prior carrying no information about the data, making the unit uninformative. For the models without warm-up we find that the KL-divergence for each unit is stable during all training epochs with only very few new units activated during training. For the models trained with warm-up we initially see many active units which are then gradually pruned away as the variational regularization term is introduced. At the end of training warm-up results in more active units indicating a more distributed representation and further that the LVAE model produces both the deepest and most distributed latent representation. We also study the importance of layers by splitting the training criterion layer-wise as seen in Figure 5. This measures how much of the representation work (or innovation) is done in each layer. The VAEs use the lower layers the most whereas the highest layers are not (or only to a limited degree) used. Contrary to this, the LVAE puts much more importance to the higher layers which shows that it learns both a deeper and qualitatively different hierarchical latent representation which might explain the better performance of the model. To qualitatively study the learned representations, PCA plots of zi ⇠q(zi|·) are seen in Figure 6. For vanilla VAE, the latent representations above the second layer are completely collapsed on a standard normal prior. Including Batch-normalization and warm-up activates one additional layer each in the VAE. The LVAE utilizes all five latent layers and the latent representation shows progressively more clustering according to class, which is clearly seen in the 7 Figure 5: Layer-wise KL[q|p] divergence going from the lowest to the highest layers. In the VAE models the KL divergence is highest in the lowest layers whereas it is more distributed in the LVAE model Figure 6: PCA-plots of samples from q(zi|zi−1) for 5-layer VAE and LVAE models trained on MNIST. Color-coded according to true class label topmost layer of this model. These findings indicate that the LVAE produce a structured high-level latent representations that are likely useful for semi-supervised learning. 4 Conclusion and Discussion We presented a new inference model for VAEs combining a bottom-up data-dependent approximate likelihood term with prior information from the generative distribution. We showed that this parameterization 1) increases the approximated log-likelihood compared to VAEs, 2) provides a tighter bound on the log-likelihood and 3) learns a deeper and qualitatively different latent representation of the data. Secondly we showed that deterministic warm-up and batch-normalization are important for optimizing deep VAEs and LVAEs. Especially the large benefits in generative performance and depth of learned hierarchical representations using batch-normalization were surprising given the additional noise introduced. This is something that is not fully understood and deserves further investigation and although batch-normalization is not novel we believe that this finding in the context of VAEs are important. The inference in LVAE is computed recursively by correcting the generative distribution with a data-dependent approximate likelihood contribution. Compared to purely bottom-up inference, this parameterization makes the optimization easier since the inference is simply correcting the generative distribution instead of fitting the two models separately. We believe this explicit parameter sharing between the inference and generative distribution can generally be beneficial in other types of recursive variational distributions such as DRAW [6] where the ideas presented here are directly applicable. Further the LVAE is orthogonal to other methods for improving the inference distribution such as Normalizing flows [18], Variational Gaussian Process [21] or Auxiliary Deep generative models [13] and combining with these might provide further improvements. Other directions for future work include extending these models to semi-supervised learning which will likely benefit form the learned deep structured hierarchies of latent variables and studying more elaborate inference schemes such as a k-step iterative inference in the LVAE [15]. References [1] J. Bornschein, S. Shabanian, A. Fischer, and Y. Bengio. Bidirectional helmholtz machines. arXiv preprint arXiv:1506.03877, 2015. 8 [2] S. R. Bowman, L. Vilnis, O. Vinyals, A. M. Dai, R. Jozefowicz, and S. Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015. [3] Y. Burda, R. Grosse, and R. Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015. [4] P. Dayan, G. E. Hinton, R. M. Neal, and R. S. Zemel. The Helmholtz machine. Neural computation, 7(5):889–904, 1995. [5] S. Dieleman, J. Schlüter, C. Raffel, E. Olson, S. K. Sønderby, D. Nouri, A. van den Oord, and E. B. and. Lasagne: First release., Aug. 2015. [6] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. [7] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [8] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [9] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems, 2014. [10] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013. [11] B. M. Lake, R. R. Salakhutdinov, and J. Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in neural information processing systems, 2013. [12] Y. LeCun, F. J. Huang, and L. Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In Computer Vision and Pattern Recognition. IEEE, 2004. [13] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther. Auxiliary deep generative models. Proceedings of the 33nd International Conference on Machine Learning, 2016. [14] D. J. MacKay. Local minima, symmetry-breaking, and model pruning in variational free energy minimization. Inference Group, Cavendish Laboratory, Cambridge, UK, 2001. [15] T. Raiko, Y. Li, K. Cho, and Y. Bengio. Iterative neural autoregressive distribution estimator NADE-k. In Advances in Neural Information Processing Systems, 2014. [16] T. Raiko, H. Valpola, M. Harva, and J. Karhunen. Building blocks for variational Bayesian learning of latent variable models. The Journal of Machine Learning Research, 8, 2007. [17] A. Rasmus, M. Berglund, M. Honkala, H. Valpola, and T. Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, 2015. [18] D. J. Rezende and S. Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015. [19] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. [20] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. [21] D. Tran, R. Ranganath, and D. M. Blei. Variational Gaussian process. arXiv preprint arXiv:1511.06499, 2015. [22] H. Valpola. From neural PCA to deep unsupervised learning. 2015. arXiv preprint arXiv:1411.7783. [23] G. van den Broeke. What auto-encoders could learn from brains - generation as feedback in unsupervised deep learning and inference, 2016. MSc thesis, Aalto University, Finland. [24] A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. 9 | 2016 | 242 |
6,153 | Improved Deep Metric Learning with Multi-class N-pair Loss Objective Kihyuk Sohn NEC Laboratories America, Inc. ksohn@nec-labs.com Abstract Deep metric learning has gained much popularity in recent years, following the success of deep learning. However, existing frameworks of deep metric learning based on contrastive loss and triplet loss often suffer from slow convergence, partially because they employ only one negative example while not interacting with the other negative classes in each update. In this paper, we propose to address this problem with a new metric learning objective called multi-class N-pair loss. The proposed objective function firstly generalizes triplet loss by allowing joint comparison among more than one negative examples – more specifically, N-1 negative examples – and secondly reduces the computational burden of evaluating deep embedding vectors via an efficient batch construction strategy using only N pairs of examples, instead of (N+1)×N. We demonstrate the superiority of our proposed loss to the triplet loss as well as other competing loss functions for a variety of tasks on several visual recognition benchmark, including fine-grained object recognition and verification, image clustering and retrieval, and face verification and identification. 1 Introduction Distance metric learning aims to learn an embedding representation of the data that preserves the distance between similar data points close and dissimilar data points far on the embedding space [15, 30]. With success of deep learning [13, 20, 23, 5], deep metric learning has received a lot of attention. Compared to standard distance metric learning, it learns a nonlinear embedding of the data using deep neural networks, and it has shown a significant benefit by learning deep representation using contrastive loss [3, 7] or triplet loss [27, 2] for applications such as face recognition [24, 22, 19] and image retrieval [26]. Although yielding promising progress, such frameworks often suffer from slow convergence and poor local optima, partially due to that the loss function employs only one negative example while not interacting with the other negative classes per each update. Hard negative data mining could alleviate the problem, but it is expensive to evaluate embedding vectors in deep learning framework during hard negative example search. As to experimental results, only a few has reported strong empirical performance using these loss functions alone [19, 26], but many have combined with softmax loss to train deep networks [22, 31, 18, 14, 32]. To address this problem, we propose an (N+1)-tuplet loss that optimizes to identify a positive example from N-1 negative examples. Our proposed loss extends triplet loss by allowing joint comparison among more than one negative examples; when N=2, it is equivalent to triplet loss. One immediate concern with (N+1)-tuplet loss is that it quickly becomes intractable when scaling up since the number of examples to evaluate in each batch grows in quadratic to the number of tuplets and their length N. To overcome this, we propose an efficient batch construction method that only requires 2N examples instead of (N+1)N to build N tuplets of length N+1. We unify the (N+1)tuplet loss with our proposed batch construction method to form a novel, scalable and effective deep metric learning objective, called multi-class N-pair loss (N-pair-mc loss). Since the N-pair-mc 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. f f + f f f + f f DNN x .. .. .. .. f N-2 f + N-1 f + 2 f + N-2 f f + f + 2 f + 4 f + 3 ... f f + f + 4 f + 3 ... f + N-1 1 1 1 1 Figure 1: Deep metric learning with (left) triplet loss and (right) (N+1)-tuplet loss. Embedding vectors f of deep networks are trained to satisfy the constraints of each loss. Triplet loss pulls positive example while pushing one negative example at a time. On the other hand, (N+1)-tuplet loss pushes N-1 negative examples all at once, based on their similarity to the input example. loss already considers comparison to N-1 negative examples in its training objectives, negative data mining won’t be necessary in learning from small or medium-scale datasets in terms of the number of output classes. For datasets with large number of output classes, we propose a hard negative “class” mining scheme which greedily adds examples to form a batch from a class that violates the constraint with the previously selected classes in the batch. In experiment, we demonstrate the superiority of our proposed N-pair-mc loss to the triplet loss as well as other competing metric learning objectives on visual recognition, verification, and retrieval tasks. Specifically, we report much improved recognition and verification performance on our finegrained car and flower recognition datasets. In comparison to the softmax loss, N-pair-mc loss is as competitive for recognition but significantly better for verification. Moreover, we demonstrate substantial improvement in image clustering and retrieval tasks on Online product [21], Car-196 [12], and CUB-200 [25], as well as face verification and identification accuracy on LFW database [8]. 2 Preliminary: Distance Metric Learning Let x ∈X be an input data and y ∈{1, · · · , L} be its output label. We use x+ and x−to denote positive and negative examples of x, meaning that x and x+ are from the same class and x−is from different class to x. The kernel f(·; θ) : X →RK takes x and generates an embedding vector f(x). We often omit x from f(x) for simplicity, while f inherits all superscripts and subscripts. Contrastive loss [3, 7] takes pairs of examples as input and trains a network to predict whether two inputs are from the same class or not. Specifically, the loss is written as follows: Lm cont(xi, xj; f) = 1{yi = yj}∥fi −fj∥2 2 + 1{yi ̸= yj} max 0, m −∥fi −fj∥2 2 (1) where m is a margin parameter imposing the distance between examples from different classes to be larger than m. Triplet loss [27, 2, 19] shares a similar spirit to contrastive loss, but is composed of triplets, each consisting of a query, a positive example (to the query), and a negative example: Lm tri(x, x+, x−; f) = max 0, ∥f −f +∥2 2 −∥f −f −∥2 2 + m (2) Compared to contrastive loss, triplet loss only requires the difference of (dis-)similarities between positive and negative examples to the query point to be larger than a margin m. Despite their wide use, both loss functions are known to suffer from slow convergence and they often require expensive data sampling method to provide nontrivial pairs or triplets to accelerate the training [2, 19, 17, 4]. 3 Deep Metric Learning with Multiple Negative Examples The fundamental philosophy behind triplet loss is the following: for an input (query) example, we desire to shorten the distances between its embedding vector and those of positive examples while enlarging the distances between that of negative examples. However, during one update, the triplet loss only compares an example with one negative example while ignoring negative examples from the rest of the classes. As a consequence, the embedding vector for an example is only guaranteed to be far from the selected negative class but not necessarily the others. Thus we can end up only differentiating an example from a limited selection of negative classes yet still maintain a small distance from many other classes. In practice, the hope is that, after looping over sufficiently many randomly sampled triplets, the final distance metric can be balanced correctly; but individual update can still be unstable and the convergence would be slow. Specifically, towards the end of training, most randomly selected negative examples can no longer yield non-zero triplet loss error. 2 An evident way to improve the vanilla triplet loss is to select a negative example that violates the triplet constraint. However, hard negative data mining can be expensive with a large number of output classes for deep metric learning. We seek an alternative: a loss function that recruits multiple negatives for each update, as illustrated by Figure 1. In this case, an input example is being compared against negative examples from multiple classes and it needs to be distinguishable from all of them at the same time. Ideally, we would like the loss function to incorporate examples across every class all at once. But it is usually not attainable for large scale deep metric learning due to the memory bottleneck from the neural network based embedding. Motivated by this thought process, we propose a novel, computationally feasible loss function, illustrated by Figure 2, which approximates our ideal loss by pushing N examples simultaneously. 3.1 Learning to identify from multiple negative examples We formalize our proposed method, which is optimized to identify a positive example from multiple negative examples. Consider an (N+1)-tuplet of training examples {x, x+, x1, · · · , xN−1}: x+ is a positive example to x and {xi}N−1 i=1 are negative. The (N+1)-tuplet loss is defined as follows: L({x, x+, {xi}N−1 i=1 }; f) = log 1 + N−1 X i=1 exp(f ⊤fi −f ⊤f +) (3) where f(·; θ) is an embedding kernel defined by deep neural network. Recall that it is desirable for the tuplet loss to involve negative examples across all classes but it is impractical in the case when the number of output classes L is large; even if we restrict the number of negative examples per class to one, it is still too heavy-lifting to perform standard optimization, such as stochastic gradient descent (SGD), with a mini-batch size as large as L. When N = 2, the corresponding (2+1)-tuplet loss highly resembles the triplet loss as there is only one negative example for each pair of input and positive examples: L(2+1)-tuplet({x, x+, xi}; f) = log 1 + exp(f ⊤fi −f ⊤f +) ; (4) Ltriplet({x, x+, xi}; f) = max 0, f ⊤fi −f ⊤f + . (5) Indeed, under mild assumptions, we can show that an embedding f minimizes L(2+1)-tuplet if and only if it minimizes Ltriplet, i.e., two loss functions are equivalent.1When N > 2, we further argue the advantages of (N+1)-tuplet loss over triplet loss. We compare (N+1)-tuplet loss with the triplet loss in terms of partition function estimation of an ideal (L+1)-tuplet loss, where an (L+1)-tuplet loss coupled with a single example per negative class can be written as follows: log 1 + L−1 X i=1 exp(f ⊤fi −f ⊤f +) = −log exp(f ⊤f +) exp(f ⊤f +) + PL−1 i=1 exp(f ⊤fi) (6) Equation (6) is similar to the multi-class logistic loss (i.e., softmax loss) formulation when we view f as a feature vector, f + and fi’s as weight vectors, and the denominator on the right hand side of Equation (6) as a partition function of the likelihood P(y = y+). We observe that the partition function corresponding to the (N+1)-tuplet approximates that of (L+1)-tuplet, and larger the value of N, more accurate the approximation. Therefore, it naturally follows that (N+1)-tuplet loss is a better approximation than the triplet loss to an ideal (L+1)-tuplet loss. 3.2 N-pair loss for efficient deep metric learning Suppose we directly apply the (N+1)-tuplet loss to the deep metric learning framework. When the batch size of SGD is M, there are M×(N+1) examples to be passed through f at one update. Since the number of examples to evaluate for each batch grows in quadratic to M and N, it again becomes impractical to scale the training for a very deep convolutional networks. Now, we introduce an effective batch construction to avoid excessive computational burden. Let {(x1, x+ 1 ), · · · , (xN, x+ N)} be N pairs of examples from N different classes, i.e., yi ̸= yj, ∀i ̸= j. We build N tuplets, denoted as {Si}N i=1, from the N pairs, where Si = {xi, x+ 1 , x+ 2 , · · · , x+ N}. Here, xi is the query for Si, x+ i is the positive example and x+ j , j ̸= i are the negative examples. 1We assume f to have unit norm in Equation (5) to avoid degeneracy. 3 f1 f1 f1 + fN fN fN + f2 f2 f2 + (a) Triplet loss f1 f1 f1, 1 + fN fN + f2 f2 + f1, 2 f1,N-1 f2,N-1 fN,N-1 f2, 1 f2, 2 fN,1 fN,2 (b) (N+1)-tuplet loss f1 f1 + fN fN + f2 f2 + f3 f3 + f2 + f2 + f3 + f1 + fN + fN-1 + (c) N-pair-mc loss Figure 2: Triplet loss, (N+1)-tuplet loss, and multi-class N-pair loss with training batch construction. Assuming each pair belongs to a different class, the N-pair batch construction in (c) leverages all 2 × N embedding vectors to build N distinct (N+1)-tuplets with {fi}N i=1 as their queries; thereafter, we congregate these N distinct tuplets to form the N-pair-mc loss. For a batch consisting of N distinct queries, triplet loss requires 3N passes to evaluate the necessary embedding vectors, (N+1)-tuplet loss requires (N+1)N passes and our N-pair-mc loss only requires 2N. Figure 2(c) illustrates this batch construction process. The corresponding (N+1)-tuplet loss, which we refer to as the multi-class N-pair loss (N-pair-mc), can be formulated as follows:2 LN-pair-mc({(xi, x+ i )}N i=1; f) = 1 N N X i=1 log 1 + X j̸=i exp(f ⊤ i f + j −f ⊤ i f + i ) (7) The mathematical formulation of our N-pair loss shares similar spirits with other existing methods, such as the neighbourhood component analysis (NCA) [6] and the triplet loss with lifted structure [21].3 Nevertheless, our batch construction is designed to achieve the utmost potential of such (N+1)-tuplet loss, when using deep CNNs as embedding kernel on large scale datasets both in terms of training data and number of output classes. Therefore, the proposed N-pair-mc loss is a novel framework consisting of two indispensable components: the (N+1)-tuplet loss, as the building block loss function, and the N-pair construction, as the key to enable highly scalable training. Later in Section 4.4, we empirically show the advantage of our N-pair-mc loss framework in comparison to other variations of mini-batch construction methods. Finally, we note that the tuplet batch construction is not specific to the (N+1)-tuplet loss. We call the set of loss functions using tuplet construction method an N-pair loss. For example, when integrated into the standard triplet loss, we obtain the following one-vs-one N-pair loss (N-pair-ovo): LN-pair-ovo({(xi, x+ i )}N i=1; f) = 1 N N X i=1 X j̸=i log 1 + exp(f ⊤ i f + j −f ⊤ i f + i ) . (8) 3.2.1 Hard negative class mining The hard negative data mining is considered as an essential component to many triplet-based distance metric learning algorithms [19, 17, 4] to improve convergence speed or the final discriminative performance. When the number of output classes are not too large, it may be unnecessary for Npair loss since the examples from most of the negative classes are considered jointly already. When we train on the dataset with large output classes, the N-pair loss can be benefited from carefully selected impostor examples. Evaluating deep embedding vectors for multiple examples from large number of classes is computationally demanding. Moreover, for N-pair loss, one theoretically needs N classes that are negative to one another, which substantially adds to the challenge of hard negative search. To overcome such difficulty, we propose negative “class” mining, as opposed to negative “instance” mining, which greedily selects negative classes in a relatively efficient manner. More specifically, the negative class mining for N-pair loss can be executed as follows: 2We also consider the symmetric loss to Equation (7) that swaps f and f + to maximize the efficacy. 3Our N-pair batch construction can be seen as a special case of lifted structure [21] where the batch includes only positive pairs that are from disjoint classes. Besides, the loss function in [21] is based on the max-margin formulation, whereas we optimize the log probability of identification loss directly. 4 1. Evaluate Embedding Vectors: choose randomly a large number of output classes C; for each class, randomly pass a few (one or two) examples to extract their embedding vectors. 2. Select Negative Classes: select one class randomly from C classes from step 1. Next, greedily add a new class that violates triplet constraint the most w.r.t. the selected classes till we reach N classes. When a tie appears, we randomly pick one of tied classes [28]. 3. Finalize N-pair: draw two examples from each selected class from step 2. 3.2.2 L2 norm regularization of embedding vectors The numerical value of f ⊤f + can be influenced by not only the direction of f + but also its norm, even though the classification decision should be determined merely by the direction. Normalization can be a solution to avoid such situation, but it is too stringent for our loss formulation since it bounds the value of |f ⊤f +| to be less than 1 and makes the optimization difficult. Instead, we regularize the L2 norm of the embedding vectors to be small. 4 Experimental Results We assess the impact of our proposed N-pair loss functions, such as multi-class N-pair loss (N-pairmc) or one-vs-one N-pair loss (N-pair-ovo), on several generic and fine-grained visual recognition and verification tasks. As a baseline, we also evaluate the performance of triplet loss with negative data mining4 (triplet-nm). In our experiments, we draw a pair of examples from two different classes and then form two triplets: each with one of the positive examples as query, the other one as positive, (any) one of the negative examples as negative. Thus, a batch of 2N training examples can produce N = 2N 4 × 2 triplets, which is more efficient than the formulation in Equation (2) that we need 3N examples to form N triplets. We adapt the smooth upper bound of triplet loss in Equation (4) instead of large-margin formulation [27] in all our experiments to be consistent with N-pair-mc losses. We use Adam [11] for mini-batch stochastic gradient descent with data augmentation, namely horizontal flips and random crops. For evaluation, we extract a feature vector and compute the cosine similarity for verification. When more than one feature vectors are extracted via horizontal flip or from multiple crops, we use the cosine similarity averaged over all possible combinations between feature vectors of two examples. For all our experiments except for the face verification, we use ImageNet pretrained GoogLeNet5 [23] for network initialization; for face verification, we use the same network architecture as CasiaNet [31] but trained from scratch without the last fully-connected layer for softmax classification. Our implementation is based on Caffe [10]. 4.1 Fine-grained visual object recognition and verification We evaluate deep metric learning algorithms on fine-grained object recognition and verification tasks. Specifically, we consider car and flower recognition problems on the following database: • Car-333 [29] dataset is composed of 164, 863 images of cars from 333 model categories collected from the internet. Following the experimental protocol [29], we split the dataset into 157, 023 images for training and 7, 840 for testing. • Flower-610 dataset contains 61, 771 images of flowers from 610 different flower species and among all collected, 58, 721 images are used for training and 3, 050 for testing. We train networks for 40k iterations with 144 examples per batch. This corresponds to 72 pairs per batch for N-pair losses. We perform 5-fold cross-validation on the training set and report the average performance on the test set. We evaluate both recognition and verification accuracy. Specifically, we consider verification setting where there are different number of negative examples from different classes, and determine as success only when the positive example is closer to the query example than any other negative example. Since the recognition task is involved, we also evaluate the performance of deep networks trained with softmax loss. The summary results are given in Table 1. We observe consistent improvement of 72-pair loss models over triplet loss models. Although the negative data mining could bring substantial improvement to the baseline models, the performance is not as competitive as 72-pair loss models. Moreover, the 72-pair loss models are trained without negative data mining, thus should be more effective for deep metric learning framework. Between 4Throughout experiments, negative data mining refers to the negative class mining for both triplet and N-pair loss instead of negative instance mining. 5https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet 5 Database, evaluation metric triplet triplet-nm 72-pair-ovo 72-pair-mc softmax Car-333 Recognition 70.24±0.38 83.22±0.09 86.84±0.13 88.37±0.05 89.21±0.16 88.69±0.20† VRF (neg=1) 96.78±0.04 97.39±0.07 98.09±0.07 97.92±0.06 96.19±0.07 VRF (neg=71) 48.96±0.35 65.14±0.24 73.05±0.25 76.02±0.30 55.36±0.30 Flower-610 Recognition 71.55±0.26 82.85±0.22 84.10±0.42 85.57±0.25 84.38±0.28 84.59±0.21† VRF (neg=1) 98.73±0.03 99.15±0.03 99.32±0.03 99.50±0.02 98.72±0.04 VRF (neg=71) 73.04±0.13 83.13±0.15 87.42±0.18 88.63±0.14 78.44±0.33 Table 1: Mean recognition and verification accuracy with standard error on the test set of Car-333 and Flower-610 datasets. The recognition accuracy of all models are evaluated using kNN classifier; for models with softmax classifier, we also evaluate recognition accuracy using softmax classifier (†). The verification accuracy (VRF) is evaluated at different numbers of negative examples. N-pair loss models, the multi-class loss (72-pair-mc) shows better performance than the one-vs-one loss (72-pair-ovo). As discussed in Section 3.1, superior performance of multi-class formulation is expected since the N-pair-ovo loss is decoupled in the sense that the individual losses are generated for each negative example independently. When it compares to the softmax loss, the recognition performance of the 72-pair-mc loss models are competitive, showing slightly worse on Car-333 but better on Flower-610 datasets. However, the performance of softmax loss model breaks down severely on the verification task. We argue that the representation of the model trained with classification loss is not optimal for verification tasks. For example, examples near the classification decision boundary can still be classified correctly, but are prone to be missed for verification when there are examples from different class near the boundary. 4.2 Distance metric learning for unseen object recognition Distance metric learning allows to learn a metric that can be generalized to an unseen categories. We highlight this aspect of deep metric learning on several visual object recognition benchmark. Following the experimental protocol in [21], we evaluate on the following three datasets: • Stanford Online Product [21] dataset is composed of 120, 053 images from 22, 634 online product categories, and is partitioned into 59, 551 images of 11, 318 categories for training and 60, 502 images of 11, 316 categories for testing. • Stanford Car-196 [12] dataset is composed of 16, 185 images of cars from 196 model categories. The first 98 model categories are used for training and the rest for testing. • Caltech-UCSD Birds (CUB-200) [25] dataset is composed of 11, 788 images of birds from 200 different species. Similarly, we use the first 100 categories for training. Unlike in Section 4.1, the object categories between train and test sets are disjoint. This makes the problem more challenging since deep networks can easily overfit to the categories in the train set and generalization of distance metric to unseen object categories could be difficult. We closely follow experimental setting of [21]. For example, we initialize the network using ImageNet pretrained GoogLeNet and train for 20k iterations using the same network architecture (e.g., 64 dimensional embedding for Car-196 and CUB-200 datasets and 512 dimensional embedding for Online product dataset) and the number of examples (e.g., 120 examples) per batch. Besides, we use Adam for stochastic optimization and other hyperparameters such as learning rate are tuned accordingly via 5-fold cross-validation on the train set. We report the performance for both clustering and retrieval tasks using F1 and normalized mutual information (NMI) [16] scores for clustering as well as recall@K [9] score for retrieval in Table 2. We observe similar trend as in Section 4.1. The triplet loss model performs the worst among all losses considered. Negative data mining can alleviate the model to escape from the local optimum, but the N-pair loss models outperforms even without additional computational cost for negative data mining. The performance of N-pair loss further improves when combined with the proposed negative data mining. Overall, we improve by 9.6% on F1 score, 1.99% on NMI score, and 14.41% on recall@1 score on Online product dataset compared to the baseline triplet loss models. Lastly, our model outperforms the performance of triplet loss with lifted structure [21], which demonstrates the effectiveness of the proposed N pair batch construction. 6 Online product triplet triplet-nm triplet-lifted 60-pair-ovo 60-pair-ovo 60-pair-mc 60-pair-mc structure [21] -nm -nm F1 19.59 24.27 25.6 23.13 25.31 26.53 28.19 NMI 86.11 87.23 87.5 86.98 87.45 87.77 88.10 K=1 53.32 62.39 61.8 60.71 63.85 65.25 67.73 K=10 72.75 79.69 79.9 78.74 81.22 82.15 83.76 K=100 87.66 91.10 91.1 91.03 91.89 92.60 92.98 K=1000 96.43 97.25 97.3 97.50 97.51 97.92 97.81 Car-196 CUB-200 triplet triplet-nm 60-pair-ovo 60-pair-mc triplet triplet-nm 60-pair-ovo 60-pair-mc F1 24.73 27.86 33.52 33.55 21.88 24.37 25.21 27.24 NMI 58.25 59.94 63.87 63.95 55.83 57.87 58.55 60.39 K=1 53.84 61.62 69.52 71.12 43.30 46.47 48.73 50.96 K=2 66.02 73.48 78.76 79.74 55.84 58.58 60.48 63.34 K=4 75.91 81.88 85.80 86.48 67.30 71.03 72.08 74.29 K=8 84.18 87.81 90.94 91.60 77.48 80.17 81.62 83.22 Table 2: F1, NMI, and recall@K scores on the test set of online product [21], Car-196 [12], and CUB-200 [25] datasets. F1 and NMI scores are averaged over 10 different random seeds for kmeans clustering but standard errors are omitted due to space limit. The best performing model and those with overlapping standard errors are bold-faced. triplet triplet-nm 192-pair-ovo 192-pair-mc 320-pair-mc VRF 95.88±0.30 96.68±0.30 96.92±0.24 98.27±0.19 98.33±0.17 Rank-1 55.14 60.93 66.21 88.58 90.17 DIR@FIR=1% 25.96 34.60 34.14 66.51 71.76 Table 3: Mean verification accuracy (VRF) with standard error, rank-1 accuracy of closed set identification and DIR@FAR=1% rate of open-set identification [1] on LFW dataset. The number of examples per batch is fixed to 384 for all models except for 320-pair-mc model. 4.3 Face verification and identification Finally, we apply our deep metric learning algorithms on face verification and identification, a problem that determines whether two face images are the same identities (verification) and a problem that identifies the face image of the same identity from the gallery with many negative examples (identification). We train our networks on the WebFace database [31], which is composed of 494, 414 images from 10, 575 identities, and evaluate the quality of embedding networks trained with different metric learning objectives on Labeled Faces in the Wild (LFW) [8] database. We follow the network architecture in [31]. All networks are trained for 240k iterations, while the learning rate is decreased from 0.0003 to 0.0001 and 0.00003 at 160k and 200k iterations, respectively. We report the performance of face verification. The summary result is provided in Table 3. The triplet loss model shows 95.88% verification accuracy, but the performance breaks down on identification tasks. Although negative data mining helps, the improvement is limited. Compared to these, the N-pair-mc loss model improves the performance by a significant margin. Furthermore, we observe additional improvement by increasing N to 320, obtaining 98.33% for verification, 90.17% for closed-set and 71.76% for open-set identification accuracy. It is worth noting that, although it shows better performance than the baseline triplet loss models, the N-pair-ovo loss model performs much worse than the N-pair-mc loss on this problem. Interestingly, the N-pair-mc loss model also outperforms the model trained with combined contrastive loss and softmax loss whose verification accuracy is reported as 96.13% [31]. Since this model is trained on the same dataset using the same network architecture, this clearly demonstrates the effectiveness of our proposed metric learning objectives on face recognition tasks. Nevertheless, there are other works reported higher accuracy for face verification. For example, [19] demonstrated 99.63% test set verification accuracy on LFW database using triplet network trained with hundred millions of examples and [22] reported 98.97% by training multiple deep neural networks from different facial keypoint regions with combined contrastive loss and softmax loss. Since our contribution is complementary to the scale of the training data or the network architecture, it is expected to bring further improvement by replacing the existing training objectives into our proposal. 7 0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
0
40000
80000
120000
160000
200000
240000
tri,
tri
tri,
192
192p-‐ovo,
tri
192p-‐ovo,
192
192p-‐mc,
tri
192p-‐mc,
192
(a) Triplet and 192-pair loss 0
10
20
30
40
50
60
70
80
90
100
0
40000
80000
120000
160000
200000
240000
tri,
tri
tri,
192
192p-‐ovo,
tri
192p-‐ovo,
192
192p-‐mc,
tri
192p-‐mc,
192
(b) Triplet and 192-way classification accuracy Figure 3: Training curve of triplet, 192-pair-ovo, and 192-pair-mc loss models on WebFace database. We measure both (a) triplet and 192-pair loss as well as (b) classification accuracy. Online product Car-196 CUB-200 60 × 2 30 × 4 60 × 2 30 × 4 10 × 12 60 × 2 30 × 4 10 × 12 F1 26.53 25.01 33.55 31.92 29.87 27.24 27.54 26.66 NMI 87.77 87.40 63.87 62.94 61.84 60.39 60.43 59.37 K=1 65.25 63.58 71.12 69.30 65.49 50.96 50.91 49.65 192 × 2 96 × 4 64 × 6 32 × 12 VRF 98.27±0.19 98.25±0.25 97.98±0.22 97.57±0.33 Rank-1 88.58 87.53 83.96 79.61 DIR@FIR=1% 66.51 66.22 64.38 56.46 Table 4: F1, NMI, and recall@1 scores on online product, Car-196, and CUB-200 datasets, and verification and rank-1 accuracy on LFW database. For model name of N × M, we refer N the number of different classes in each batch and M the number of positive examples per class. Finally, we provide training curve in Figure 3. Since the difference of triplet loss between models is relatively small, we also measure 192-pair loss (and accuracy) of three models at every 5k iteration. We observe significantly faster training progress using 192-pair-mc loss than triplet loss; it only takes 15k iterations to reach at the loss at convergence of triplet loss model (240k iteration). 4.4 Analysis on tuplet construction methods In this section, we highlight the importance of the proposed tuplet construction strategy using N pairs of examples by conducting control experiments using different numbers of distinguishable classes per batch while fixing the total number of examples per batch the same. For example, if we are to use N/2 different classes per batch rather than N different classes, we select 4 examples from each class instead of a pair of examples. Since N-pair loss is not defined to handle multiple positive examples, we follow the definition of NCA in this experiments as follows: L = 1 2N X i −log P j̸=i:yj=yi exp(f ⊤ i fj) P j̸=i exp(f ⊤ i fj) (9) We repeat experiments in Section 4.2 and 4.3 and provide the summary results in Table 4. We observe a certain degree of performance drop as we decrease the number of classes. Despite, all of these results are substantially better than those of triplet loss, confirming the importance of training with multiple negative classes, and suggesting to train with as many negative classes as possible. 5 Conclusion Triplet loss has been widely used for deep metric learning, even though with somewhat unsatisfactory convergence. We present a scalable novel objective, multi-calss N-pair loss, for deep metric learning, which significantly improves upon the triplet loss by pushing away multiple negative examples jointly at each update. We demonstrate the effectiveness of N-pair-mc loss on fine-grained visual recognition and verification, as well as visual object clustering and retrieval. Acknowledgments We express our sincere thanks to Wenling Shang for her support in many parts of this work from algorithm development to paper writing. We also thank Junhyuk Oh and Paul Vernaza for helpful discussion. 8 References [1] L. Best-Rowden, H. Han, C. Otto, B. F. Klare, and A. K. Jain. Unconstrained face recognition: Identifying a person of interest from a media collection. IEEE Transactions on Information Forensics and Security, 9(12):2144–2157, 2014. [2] G. Chechik, V. Sharma, U. Shalit, and S. Bengio. Large scale online learning of image similarity through ranking. Journal of Machine Learning Research, 11:1109–1135, 2010. [3] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. [4] Y. Cui, F. Zhou, Y. Lin, and S. Belongie. Fine-grained categorization and dataset bootstrapping using deep metric learning with humans in the loop. In CVPR, 2016. [5] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Region-based convolutional networks for accurate object detection and segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, PP(99):1–1, 2015. [6] J. Goldberger, G. E. Hinton, S. T. Roweis, and R. Salakhutdinov. Neighbourhood components analysis. In NIPS, 2004. [7] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006. [8] G. B. Huang, M. Narayana, and E. Learned-Miller. Towards unconstrained face recognition. In CVPR Workshop, 2008. [9] H. Jegou, M. Douze, and C. Schmid. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1):117–128, 2011. [10] 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. [11] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [12] J. Krause, M. Stark, J. Deng, and L. Fei-Fei. 3d object representations for fine-grained categorization. In ICCV Workshop, 2013. [13] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. [14] J. Liu, Y. Deng, T. Bai, and C. Huang. Targeting ultimate accuracy: Face recognition via deep embedding. CoRR, abs/1506.07310, 2015. [15] D. G. Lowe. Similarity metric learning for a variable-kernel classifier. Neural computation, 7(1):72–85, 1995. [16] C. D. Manning, P. Raghavan, H. Sch¨utze, et al. Introduction to information retrieval, volume 1. Cambridge university press Cambridge, 2008. [17] M. Norouzi, D. J. Fleet, and R. R. Salakhutdinov. Hamming distance metric learning. In NIPS, 2012. [18] O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. BMVC, 2015. [19] F. Schroff, D. Kalenichenko, and J. Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. [20] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [21] H. O. Song, Y. Xiang, S. Jegelka, and S. Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, 2016. [22] Y. Sun, Y. Chen, X. Wang, and X. Tang. Deep learning face representation by joint identification-verification. In NIPS, 2014. [23] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. [24] Y. Taigman, M. Yang, M. Ranzato, and L. Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014. [25] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. [26] J. Wang, Y. Song, T. Leung, C. Rosenberg, J. Wang, J. Philbin, B. Chen, and Y. Wu. Learning fine-grained image similarity with deep ranking. In CVPR, 2014. [27] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In NIPS, 2005. [28] J. Weston, S. Bengio, and N. Usunier. Wsabie: Scaling up to large vocabulary image annotation. In IJCAI, volume 11, pages 2764–2770, 2011. [29] S. Xie, T. Yang, X. Wang, and Y. Lin. Hyper-class augmented and regularized deep learning for fine-grained image classification. In CVPR, 2015. [30] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning with application to clustering with side-information. 2003. [31] D. Yi, Z. Lei, S. Liao, and S. Z. Li. Learning face representation from scratch. CoRR, abs/1411.7923, 2014. [32] X. Zhang, F. Zhou, Y. Lin, and S. Zhang. Embedding label structures for fine-grained feature representation. In CVPR, 2016. 9 | 2016 | 243 |
6,154 | Learning Sparse Gaussian Graphical Models with Overlapping Blocks Mohammad Javad Hosseini1 Su-In Lee1,2 1Department of Computer Science & Engineering, University of Washington, Seattle 2Department of Genome Sciences, University of Washington, Seattle {hosseini, suinlee}@cs.washington.edu Abstract We present a novel framework, called GRAB (GRaphical models with overlApping Blocks), to capture densely connected components in a network estimate. GRAB takes as input a data matrix of p variables and n samples and jointly learns both a network of the p variables and densely connected groups of variables (called ‘blocks’). GRAB has four major novelties as compared to existing network estimation methods: 1) It does not require blocks to be given a priori. 2) Blocks can overlap. 3) It can jointly learn a network structure and overlapping blocks. 4) It solves a joint optimization problem with the block coordinate descent method that is convex in each step. We show that GRAB reveals the underlying network structure substantially better than four state-of-the-art competitors on synthetic data. When applied to cancer gene expression data, GRAB outperforms its competitors in revealing known functional gene sets and potentially novel cancer driver genes. 1 Introduction Many real-world networks contain subsets of variables densely connected to one another, a property called modularity (Fig 1A); however, standard network inference methods do not incorporate this property. As an example, biologists are increasingly interested in understanding how thousands of genes interact with each other on the basis of gene expression data that measure expression levels of p genes across n samples. This has stimulated considerable research into the structure estimation of a network from high-dimensional data (p ≫n). It is well-known that the network structure corresponds to the non-zero pattern of the inverse covariance matrix, ⌃−1 [1]. Thus, obtaining a sparse estimate of ⌃−1 by using `1 penalty has been a standard approach to inferring a network, a method called graphical lasso [2]. However, applying an `1 penalty to each edge fails to reflect the fact that genes involved in similar functions are more likely to be connected with each other and that how genes are organized into functional modules are often not known. We present a novel structural prior, called GRAB prior, which encourages the network estimate to be dense within a block (i.e, a subset of variables) and sparse between blocks, where blocks are not given a priori. Fig 1B illustrates the effectiveness of the GRAB prior (bottom) in a high-dimensional setting (p = 200 and n = 100), where it is difficult to reveal the true underlying network by using the graphical lasso (GLasso) (top). The major novelty of GRAB is four-fold: First, unlike previous work [3, 4, 5], GRAB allows each variable to belong to more than one block, which is an important property of many real-world networks. For example, genes important in disease processes are often involved in multiple functional modules [6], and identifying such genes would be of great scientific interest (Section 4.2). Although existing methods to learn non-overlapping blocks allow edges between different blocks, they use stronger regularization parameters for between-block edges, which decreases the power to detect variables associated with multiple blocks. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Second, GRAB jointly learns the network structure and the assignment of variables into overlapping blocks (Fig 2). Existing methods to incorporate blocks in network learning either use blocks given a priori or use a sequential approach to learn blocks and then learn a network given the blocks held fixed. Interestingly, the GRAB algorithm can be viewed as a generalization of the joint learning of the distance metric among p variables and graph-cut clustering of p variables into blocks (Section 3.4) Third, GRAB solves a joint optimization problem with the block coordinate descent method that is convex in each step. This is a powerful feature that is difficult to be achieved by existing methods to cluster variables into blocks. This property guarantees the convergence of the learning algorithm (Section 3). Finally, the GRAB framework we presented in this paper uses the Gaussian graphical model as a baseline model. However, the GRAB prior, formulated as tr ! ZZ||⇥| " (Section 2.2), can be used in any kind of network models such as pairwise Markov random fields. In the following sections, we show that GRAB outperforms the graphical lasso [2] and existing methods to learn blocks and network estimates [3, 4] on synthetic data and cancer gene expression data. We also demonstrate GRAB’s potential to identify novel genes that drive cancer. x2
x3
x1
x4
x5
x6
x7
x8
x8
x7
x6
x5
x4
x3
x2
x1
x8
x7
x6
x5
x4
x3
x2
x1
(A)$ (B)$ Figure 1: (A) A network with overlapping blocks (top) and its adjacency matrix (bottom). (B) Network estimates of GLasso (top) and GRAB (bottom) in a toy example. Z:#assignment#matrix# Zi# Zj T# (ZZT)ij# The#similarity#between#ith# and#jth#variables## Z.step# θ.step# ZZT# Learning#θ## Block#1# Block#3# θ# !# Block#2# p# K# K# p# ZT# p# p# p# p# (A)# (B)# (D)# (E)#GRAB# SBM# λ1# λ2# λw# λb# λw:#within?block# λb:#between?block# p# K# p# !# Sparsity#paBern# encouraged#by#ZZT# K# Learning#Z## Z# ZT# (C)# λ1,#λ2:#based#on#Z# Figure 2: The GRAB framework – an iterative algorithm that jointly learns ⇥and Z. 2 GGM with Overlapping Blocks 2.1 Background: High-Dimensional Gaussian Graphical Model (GGM) We aim to learn a GGM of p variables on the basis of n observations (p ≫n). That is, suppose that X(1), . . . , X(n) are i.i.d. N(µ, ⌃), where µ 2 Rp and ⌃is a p ⇥p positive definite matrix. It is well known that the sparsity pattern of ⌃−1 determines the conditional independence structure of the p variables; there is an edge between the ith and jth variables if and only if the (i, j) element of ⌃−1 is non-zero [1]. A number of authors have proposed to estimate ⌃−1 using the graphical lasso [2, 7, 8]: maximize ⇥⌫0 log det ⇥−tr(S⇥) −λk⇥k1, (1) where the solution b⇥is an estimate of ⌃−1, S denotes the empirical covariance matrix, and λ is a nonnegative tuning parameter that controls the strength of the `1 penalty applied to the elements of ⇥. This amounts to maximizing a penalized log-likelihood. 2 2.2 GGM with the Overlapping Block Prior Here, we present the GRAB prior, formulated as tr ! ZZ||⇥| " , that encourages ⇥to have overlapping blocks. Let X = {X1, . . . , Xp} be variables in the network and Z be a real matrix of size p ⇥K, where K is the total number of blocks. Each element −1 Zik 1 can be interpreted as a score representing how likely the ith variable Xi belongs to the kth block Bk. The ith row of Z, denoted by Zi, can be interpreted as a low-rank embedding for the variable Xi showing its block assignment scores. Then, the (i, j) element (ZZ|)ij = ⌃K k=1ZikZjk (the dot product of Zi and Zj) represents the similarity between variables Xi and Xj in their embeddings. To more clearly understand the impact of the GRAB prior on the sparsity structure of ⇥, let us assume a hard assignment model in which we assign variables to blocks. Then, Z becomes a binary matrix and the sparsity pattern of ZZ| would indicate the region covered by all K blocks (Fig 2A-B). Then, jointly learning Z and ⇥to increase ⌃i,j(ZZ|)ij|⇥ij| would encourage ⇥to have a sparsity structure imposed by (ZZ|). In the continuous case, it would encourage |⇥ij| to be non-zero when Xi and Xj have similar embeddings (i.e., a dot product of Zi and Zj is large). Incorporating the GRAB prior into Eq (1) as a structural prior leads to: maximize ⇥⌫0,Z2D log det ⇥−tr(S⇥) −λ ⇣ k⇥k1 −tr ! ZZ||⇥| "⌘ , (2) where λ is a non-negative tuning parameter. We can re-write Eq (2) as: maximize ⇥⌫0,Z2D log det ⇥−tr(S⇥) − X i,j λ ⇣ 1 −(ZZ|)ij ⌘ |⇥ij|. (3) We use the value of the sparsity tuning parameter λ ! 1 −(ZZ|)ij " for each (i, j) element ⇥ij. A network edge that corresponds to two variables with similar embeddings would be penalized less. The set D ⇢[−1, 1]p⇥K contains matrices Z satisfying the following constraints: (a) kZik2 1, where Zi denotes the ith row of Z. This constraint ensures the regularization parameters of all (i, j) pairs of variables are non-negative. (b) kZkF β. In addition to the variable specific constraint on each Zi in (a), we need a global constraint on Z to prevent all regularization parameters from becoming zero (8i, j : (ZZT )ij = 1). (c) kZk2 ⌧, where k.k2 of a matrix is its maximum singular value. This constraint prevents the case where all variables are assigned to one block. There are two hyperparameters, β and ⌧; however we describe below that we set ⌧= β p K and that has an effect to guarantee that there are at least K non-empty blocks. In our experiments, we set the hyper-parameter β = p p 2, which, intuitively, would allow each variable to get on average half of its largest possible squared norm. Given that kZk2 F = Pp i=1 σ2 i where σi is the ith singular value of Z, from the constraint (b), Pp i=1 σ2 i β2. We set ⌧= β p K , where ⌧means the upper bound of the maximum singular value, given the constraint (c). This means that there would be at least K non-empty blocks given that the constraint (b) is tight. We show in Section 3 that this choice of hyperparameters makes our learning algorithm simpler (see Lemma 3.2). 2.3 Probabilistic Interpretation The joint distribution over X, ⇥and Z is as: P(X, ⇥, Z) = P(X|⇥)P(⇥|Z)P(Z). The first two terms, log det(⇥) −trace(S⇥), in Eq (3) correspond to log P(X|⇥), the log-likelihood of GGM given a particular parameter ⇥(i.e., an estimate of ⌃−1), as described in Section 2.1. For ⇥⌫0, P(⇥|Z) = Q P(⇥ij|Z), where P(⇥ij|Z) represents a conditional probability over ⇥ij given the block assignment scores of Xi and Xj. We use the Laplacian prior with the sparsity parameter value λ(1 −(ZZ|)ij). For ⇥⌫0, P(⇥|Z) is: 1 D Q (i,j) exp(−(λ(1 −(ZZ|)ij))|⇥ij|), where D is the normalization constant. The prior probability P(Z) is proportional to D. 2.4 Related Work To our knowledge, GRAB is the first attempt to jointly learn the overlapping blocks and the structure of a conditional dependence network such as a GGM. Related work consists of 3 categories: 3 1) Learning blocks with a network held fixed: This category includes (a) stochastic block model (SBM) [9], (b) spectral clustering [10], and (c) a screening rule to identify non-overlapping blocks based on the empirical covariance matrix [11]. 2) Learning a network with blocks given a priori and held fixed: This category includes a) a method to solve graphical lasso with group `1 penalty to encourage group sparsity of edges within pairs of blocks [12], and b) an efficient learning algorithm for GGMs given a set of overlapping blocks [13]. 3) Learning non-overlapping blocks first and then the network given the blocks: (a) Marlin et al. (2009) extend the prior work [12] to identify non-overlapping blocks which are then used to learn a network [3]. (b) Another method assigns each variable to one block, and use different regularization parameters for within-block and between-block edges [14]. (c) Tan et al. (2015) propose to use hierarchical clustering (complete-linkage and average-linkage) to cluster variables into non-overlapping blocks, and apply graphical lasso to each block [4]. 3 GRAB Learning Algorithm 3.1 Overview Our learning algorithm jointly learns the block assignment scores Z and the network estimate ⇥by solving Eq (2). We adopt the block coordinate descent (BCD) method to iteratively learn Z and ⇥. Our learning algorithm essentially performs adaptive distance (similarity) metric learning and clustering of variables into blocks simultaneously (Section 3.4). Given the current assignment of variables into blocks, Z, we learn a network among variables, ⇥. Then, |⇥| is used as a similarity matrix among variables to update the assignment of variables to blocks, Z. We iterate until convergence. Convergence is theoretically guaranteed. Since our objective function is continuous on a compact level set, based on Theorem 4.1 in [15], the solution sequence of our method is defined and bounded. Every coordinate block found by the ⇥-step and Z-step is a stationary point of GRAB. We indeed observed the value of the objective function monotonically increases until convergence. In the following, we show that the BCD method will be convex in each step. We first re-write Eq (2) with all the constraints explicitly: maximize ⇥⌫0,Z log det ⇥−tr(S⇥) −λ ⇣ k⇥k1 −tr ! ZZ||⇥| "⌘ subject to kZk2 ⌧, kZik2 1, kZkF β, (i 2 {1, . . . p})). (4) Now, we state the following lemma, the proof of which can be found in the Appendix. Lemma 3.1 Eq (4) is equivalent to the following: maximize ⇥⌫0,W⌫0 log det ⇥−tr(S⇥) −λ ⇣ k⇥k1 −tr ! W|⇥| "⌘ subject to rank(W) K, W ⪯⌧2I, diag(W) 1, tr(W) β2, (5) where W is a p ⇥p matrix, K means the number of blocks, and I is the identity matrix of size p.1 Corollary 3.1.1 Suppose that (⇥⇤, W⇤) is the optimal solution of the optimization problem (5). Then, ⇥⇤, Z⇤= U p D is the optimal solution of problem 4, where U 2 Rp⇥K is a matrix with columns containing K eigenvectors of W corresponding to the largest eigenvalues and D is a diagonal matrix of the corresponding eigenvalues. 3.2 Learning ⇥(⇥-step) To estimate ⇥given Z, based on Eq (3), we solve the following problem: maximize ⇥⌫0 log det ⇥−tr(S⇥) −P (i,j) ⇤ij|⇥ij|, (6) where ⇤ij = λ(1−(ZZ|)ij). This is the graphical lasso with edge-specific regularization parameters ⇤ij. Eq (6) is a convex problem and we solve it by adopting a standard solver for graphical lasso [16]. 1 In this paper, we assume diag is an operator that maps a vector to a diagonal matrix with the vector as its diagonal, and maps a matrix to a vector containing its diagonal. 4 3.3 Learning Z (Z-step) Here we describe how to learn Z given ⇥. Instead of solving (4), we solve (5) because (5) is a convex optimization problem with respect to W. Interestingly, we can remove the rank constraint, rank(W) K; in Lemma 3.2, we show that with the choice of ⌧= β p K , the rank constraint is automatically satisfied. This leads to the following optimization problem: maximize W⌫0 tr ! W|⇥| " subject to W ⪯⌧2I, diag(W) 1, tr(W) β2. (7) This W-step is a semi-definite programming problem. We solve the dual of Eq (7) that leads to an efficient optimization problem.2 We introduce three dual variables: 1) a matrix Y ⌫0 for the `2 norm constraint, 2) a vector v 2 Rp + for the constraints on the diagonal and 3) a scalar y ≥0 for the constraint on trace. The Lagrangian is: L(W, Y, v, y) = tr ! W|⇥| " + tr ! (⌧2I −W)Y " + y(β2 −tr(W)) + vT (1 −diag(W)). (8) The dual function is as: sup W⌫0 tr ! W|⇥| " + tr ! (⌧2I −W)Y " + y(β2 −tr ! W)) + v|(1 −diag(W)) = sup W⌫0 tr ! W(|⇥| −Y −yI −diag(v)) " + ⌧2tr(Y ) + yβ + v|1 = ⇢⌧2tr(Y ) + yβ + vT 1 if Y ⌫|⇥| −yI −diag(v) +1 otherwise . (9) consequently, we get the following dual problem for Eq (7): minimize Y,y,v ⌧2tr(Y ) + yβ2 + v|1 subject to Y ⌫ ! |⇥| −yI −diag(v) " , Y ⌫0, y ≥0, v ≥0. (10) Eq (10) has a closed form solution in Y and y given that v is fixed. The dual problem boils down to: minimize v≥0 g(v) = minimize v≥0 ⌧2 K X i=1 ! C " +,i + v|1, (11) where we have replaced β2 ⌧2 with K (because ⌧= β/ p K). We define C = (|⇥| −diag(v)) and assume it has eigenvalues (λ1, . . . λp) in descending order and (C)+,i = max(0, λi). We solve Eq (11) by projected subgradient descent method where the subgradient direction is: rvg(v) = −⌧2 diag ! UC1K(DC)U | C " + 1. (12) DC is the diagonal matrix of eigenvalues in descending order and UC is the matrix containing orthonormal eigenvectors of C as its columns. We define 1K(DC) as a binary vector of size p with jth element equal to 1 if and only if j K and λj > 0. After finding the optimal v⇤, the optimal solution W⇤can be obtained by: W⇤= argmax W⌫0 tr ! W(|⇥| −diag(v⇤)) " subject to W ⪯⌧2I, tr(W) β2. (13) One can see that the solution of problem (13) is W ⇤ = ⌧2UC⇤1β2/⌧2(DC⇤)U | C⇤ = ⌧2UC⇤1K(DC⇤)U | C⇤, where C⇤, UC⇤, DC⇤and 1K(DC⇤) are defined similarly to (12). By definition, 1K(.) is a diagonal matrix with at most K nonzeros elements. Therefore, W ⇤will have rank at most K, which means that we do not need the rank constraint on W. This leads to the following lemma. Lemma 3.2 If we set ⌧= β p K in (5), the constraint rank(W) K will be automatically satisfied. Finally, we construct Z⇤= U p D as instructed in corollary 3.1.1. Note that in the intermediate iterations, we do not need to compute Z; we need to construct the matrix Z⇤to find the overlapping blocks after the learning algorithm will converge3. 2The primal problem has a strictly feasible solution ✏I, where ✏is a small number and I is the identity matrix; therefore strong duality holds. 3The source code is available at: http://suinlee.cs.washington.edu/software/grab 5 3.4 A special case: K-way graph cut algorithm Here, we show that GRAB algorithm generalizes the K-way graph cut algorithm in two ways: 1) GRAB allows each variable to be in multiple blocks with soft membership; and 2) GRAB updates a network structure ⇥, used as a similarity matrix, in each iteration. The proof is in the Appendix. Lemma 3.3 Say that we use a binary matrix Z (hard assignment) with the following constraints: a) For all variables i, kZik2 1, where Zi denotes the ith row of Z. b) For all blocks k, kZkk2 >= 1, where Zk denotes the kth column of Z. This means that each variable can belong to only one block (i.e., non-overlapping blocks), and each block has at least one variable. Then GRAB is equivalent to iterating between K-way graph-cut on |⇥| to find Z and solving graphical lasso problem to find ⇥. 4 Experimental Results We present results on synthetically generated data and real data. Comparison. Three state-of-the-art competitors are considered: UGL1 - unknown group `1 regularization [3]; CGL - cluster graphical lasso [4]; and GLasso - standard graphical lasso [2]. CGL has two variants depending on the type of hierarchical clustering used: average linkage clustering (CGL:ALC) and complete linkage clustering (CGL:CLC). Each method selects the regularization parameter using the standard cross-validation (or held out validation) procedure. CGL and UGL1 have their own ways of selecting the number of blocks K [4, 3]. GRAB selects K based on the validation-set log-likelihood in initialization. We initialize GRAB by constructing the Z matrix. We first perform spectral clustering on |S|, where S denotes the empirical covariance matrix, then add overlap by assigning a random subset of variables to clusters with the highest average correlation. Then, we project the Z matrix into the convex set defined in Section 2.2 and form W = ZZ|. In the Z-step of the GRAB learning algorithm, we use step size 1/ p t, where t is the iteration number and iterate until the relative change in the objective function is less than 10−6 (Section 3.3). We use the warm-start technique between the BCD iterations. Evaluation criteria. In the synthetic data experiments (sectoin 4.1), we evaluate each method based on the learned network with the optimal regularization parameter chosen for each method based on only training-set. For the AML dataset (Section 4.2), we evaluate the learned blocks for varying regularization parameters (x-axis) to better illustrate the difference among the methods in terms of their performances. In all experiments, we standardize the data and show the average results over 10 runs and the standard deviations as error bars. 4.1 Synthetic Data Experiments Data generation. We first generate overlapping blocks forming a chain, a random tree or a lattice. In each case, two neighboring blocks overlap each other by o (the ratio of the variables shared between two overlapping blocks). Then, we randomly generate a true underlying network of p variables with density of 20%, and convert it to the precision matrix following the procedure of [17]. We generate 100 training samples and 50 validation samples from the multivariate Gaussian distribution with mean zero and the covariance matrix equal to the inverse of the precision matrix. We consider a varying number of true blocks 2 {9, 25, 49} and overlap ratio o = .25. For = 25, we consider o 2 {.1, .25, .4}. We vary the number of variables p 2 {400, 800} for the lattice-structured blocks. The results on the chain and random tree blocks are similar and so we provide only the results for p = 400 for these block structures. For all methods, we considered the regularization parameter λ 2 [.02, .4] with step size .02. Results. Fig 3 compares five methods when a regularization parameter was selected for each method based on the 50 validation samples. Each of the four plots correspond to different block structure or number of variables. Each bar group corresponds to a particular (, o, ⌘), in which we computed the modularity measure ⌘as (fraction of edges that fall within groups - expected fraction if edges were distributed at random), as was done by [18]. Fig 3A shows how accurately each method recovers the true network. For each method m, we compared the learned edges (EZ,m) and that from the underlying network (EZ). By comparing EZ,m and EZ, we can compute the precision and recall 6 Chain:'p=400,n=100' La/ce:'p=800,n=100' κ=9' o=.25' η=0.85' κ=25' o=.4' η=0.88' κ=25' o=.25' η=0.91' ' κ=25' o=.1' η=0.96' κ=49' o=.25' η=0.93' κ=9' o=.25' η=0.85' κ=25' o=.4' η=0.88' κ=25' o=.25' η=0.91' ' κ=25' o=.1' η=0.96' κ=49' o=.25' η=0.93' La/ce:'p=400,n=100' Random:'p=400,n=100' κ=10' o=.25' η=0.85' κ=30' o=.4' η=0.94' κ=30' o=.25' η=0.95' ' κ=30' o=.1' η=0.96' κ=50' o=.25' η=0.97' κ=10' o=.25' η=0.87' κ=30' o=.4' η=0.93' κ=30' o=.25' η=0.96' ' κ=30' o=.1' η=0.97' κ=50' o=.25' η=0.96' Figure 3: Comparison based on average network recovery F1 on synthetic data from lattice blocks, when p = 400 (first panel) and p = 800 (second panel), chain blocks (third panel) and random blocks (fourth panel) when p = 400. Each bar group corresponds to a particular (number of blocks , overlap ratio o, modularity ⌘). of network recovery. Since it is not enough to get only high precision or recall, we use the F1 (or F-measure) = 2 pr⇤rec pr+rec as an evaluation metric. A number of authors have shown that identifying the underlying network structure is very challenging in the high-dimensional setting, resulting in low accuracies even on synthetic data [14, 19, 4]. Our results also show that the F1 scores for network are lower than 0.40. Despite that, GRAB identifies network edges much more accurately than its competitors. 4.2 Cancer Gene Expression Data We consider the MILE data [20] that measure the mRNA expression levels of 16,853 genes in 541 patients with acute myeloid leukemia (AML), an aggressive blood cancer. For a better visualization of the network in limited space (Fig 5), we selected 500 genes4, consisting of 488 highest varying genes in MILE and 12 genes highly associated with AML: FLT3, NPM1, CEBPA, KIT, N-RAS, MLL, WT1, IDH1/2, TET2, DNMT3A, and ASXL1. These genes are identified by [21] in a large study on 1,185 patients with AML to be significantly mutated in these AML patients. These genes are well-known to have significant role in driving AML. Here, we evaluate GRAB and the other methods qualitatively in terms of how useful each method is for cancer biologists to make discovery from data. For that, we fix the number of blocks to be K = 10 across all methods such that we get average of over 50 variables per block, which is considered close to the average number of genes in known pathways [22]. We varied K and obtained similar results. Genes in the same block are likely to share similar functions. Statistical significance of the overlap between gene clusters (here, blocks) and known functional gene sets have been widely used as an evaluation criteria [23, 5]. We show how to obtain blocks from the learned Z. Obtaining blocks from Z. After the GRAB algorithm converges, we obtain a network estimate ⇥ and a block membership matrix Z. We find K overlapping blocks satisfying two constraints: a) maximum number of assignments is C; and b) each variable is assigned to ≥1 block. Here, we used C = 1.3p. We perform the following greedy procedure: 1) We first run k-means clustering algorithm on the p rows of the matrix Z.5. 2) We compute the similarity of variables i to blocks Bk as 1 |Bk| P j2Bk(ZZ|)ij, where |Bk| is the number of variables in Bk. Then, we add overlap by assigning C −p variables to blocks with highest similarity. To evaluate the blocks, we used 4,722 curated gene sets from the molecular signature database [24] and computed a p-value to measure the significance of the overlap between each block and each gene set. We consider the (block, gene set) pairs with false discovery rate (FDR)-corrected p < 0.05 to be significantly overlapping pairs. When a block is significantly overlapped with a gene set, we consider the gene set to be revealed by the corresponding block. We compare GRAB with the 4GRAB runs for 0.5-1.5 hours for 500 genes and up to 20 hours for 2,000 genes on a computer with 2.5 GHz Intel Core i5 processor 5This resembles spectral clustering (equivalently, kmeans on eigenvectors of Laplacian matrix) 7 methods introduced in section 4.1. Since we only need the blocks for this experiment, we added two more competitors: k-means and spectral clustering methods applied to |S|, where S denotes the empirical covariance matrix. Fig 4 shows the number of gene sets that are revealed by any block (FDR-corrected p < 0.05) in each method. GRAB significantly outperforms, which indicates the importance of learning overlapping blocks; GRAB’s overlapping blocks reveal known functional organization of genes better than other methods. Fig 4 shows the average results of 10 random initializations. Fig 5 compares the learned networks ⇥by GLasso (A) and GRAB (B) when the regularization parameters are set such that the networks show a similar level of sparsity. For GRAB, we removed the between-block edges and reordered genes such that the genes in the same blocks tend to appear next to each other. GRAB shows more interpretable network structure, highlighting the genes that belong to multiple blocks. The key innovation of GRAB is to allow for overlap between blocks. Interestingly, the 12 well-known AML genes are significantly enriched for the genes assigned to 3 or more blocks: FLT3, NPM1, TET2 and DNMT3A belong to 3 blocks while there are only 24 such genes out of 500 genes (p-value: 0.001) (Fig 5B). This supports our claim that variables assigned to multiple blocks are likely important. Out of the 24 genes assigned to ≥3 blocks, 12 are known to be involved in myeloid differentiation (the process impaired in AML) or other types of cancer. This can lead to new discovery on the genes that drive AML. These genes include CCNA1 that has shown to be significantly differentially expressed in AML patients [25]. TSPAN7 is expressed in acute myelocytic leukemia of some patients6. Several genes are associated with other types of cancer. For example, CCL20 is associated with pancreatic cancer [26]. ELOVL7 is involved in prostate cancer growth [27]. SCRN1 is a novel marker for prognosis in colorectal cancer [28]. These genes assigned to many blocks and have been implicated in other cancers or leukemias can lead the discovery of novel AML driver genes. Figure 4: Average number of gene sets highly associated with blocks at a varying regularization parameter. The cross-validation results are consistent with these results. (A)$ (B)$ (C)$ (B)$ (A)$ NPM1$ DNMT3A$ TET2$ FLT3$ Figure 5: Learned networks of: (A) GLasso and (B) GRAB. For GRAB, we have sorted the genes based on the blocks and highlighted the following 4 genes (out of the 12 highly associated genes with AML) that belong to many blocks: NPM1, FLT3, DNMT3A and TET2. 5 Discussion and Future Work We present a novel general framework, called GRAB, that can explicitly model densely connected network components that can overlap with each other in a graphical model. The novel GRAB structural prior encourages the network estimate to be dense within each block (i.e., a densely connected group of variables) and sparse between the variables in different blocks. The GRAB learning algorithm adopts BCD and is convex in each step. We demonstrate the effectiveness of our framework in synthetic data and cancer gene expression dataset. Our framework is general and can be applied to other kinds of graphical models, such as pairwise Markov random fields. Acknowledgements: We give warm thanks to Reza Eghbali and Amin Jalali for many useful discussions. This work was supported by the National Science Foundation grant DBI-1355899 and the American Cancer Society Research Scholar Award 127332-RSG-15-097-01-TBG. 6http://www.genecards.org/cgi-bin/carddisp.pl?gene=TSPAN7 8 References [1] S. L. Lauritzen. Graphical Models. Oxford Science Publications, 1996. [2] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9:432–441, 2007. [3] B. M. Marlin and K. P. Murphy. Sparse gaussian graphical models with unknown block structure. pages 705–712, 2009. [4] K. M. Tan, D. Witten, and A. Shojaie. The cluster graphical lasso for improved estimation of gaussian graphical models. Computational statistics & data analysis, 85:23–36, 2015. [5] S. Celik, B. A. Logsdon, and S.-I. Lee. Efficient dimensionality reduction for high-dimensional network estimation. ICML, 2014. [6] A. Lasorella, R. Benezra, and A. Iavarone. The id proteins: master regulators of cancer stem cells and tumour aggressiveness. Nature Reviews Cancer, 14(2):77–91, 2014. [7] M. Yuan and Y. Lin. Model selection and estimation in the Gaussian graphical model. Biometrika, 94(10):19–35, 2007. [8] A. Rothman, E. Levina, and J. Zhu. Sparse permutation invariant covariance estimation. Electronic Journal of Statistics, 2:494–515, 2008. [9] P. W. Holland, K. B. Laskey, and S. Leinhardt. Stochastic blockmodels: Some first steps. Social Networks, 5(2):109–137, 1983. [10] J. Shi and J. Malik. Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(8):888–905, 2000. [11] D. M. Witten, J. H. Friedman, and N. Simon. New insights and faster computations for the graphical lasso. Journal of Computational and Graphical Statistics, 20(4):892–900, 2011. [12] J. Duchi, S. Gould, and D. Koller. Projected subgradient methods for learning sparse gaussians. UAI, 2008. [13] M. Grechkin, M. Fazel, D. Witten, and S.-I. Lee. Pathway graphical lasso. 2015. [14] C. Ambroise, J. Chiquet, and C. Matias. Inferring sparse gaussian graphical models with latent structure. Electron. J. Statist., 3:205–238, 2009. [15] P. Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 109(3):475–494, 2001. [16] Cho-Jui Hsieh, Inderjit S Dhillon, Pradeep K Ravikumar, and Mátyás A Sustik. Sparse inverse covariance matrix estimation using quadratic approximation. In Advances in neural information processing systems, pages 2330–2338, 2011. [17] Q. Liu and A. T. Ihler. Learning scale free networks by reweighted l1 regularization. In International Conference on Artificial Intelligence and Statistics, pages 40–8, 2011. [18] Mark EJ Newman. Modularity and community structure in networks. Proceedings of the National Academy of Sciences, 103(23):8577–8582, 2006. [19] K. Mohan, M. Chung, S. Han, D. Witten, S.-I. Lee, and M. Fazel. Structured learning of gaussian graphical models. In NIPS, pages 620–628, 2012. [20] T. Haferlach, A. Kohlmann, L. Wieczorek, et al. Clinical utility of microarray-based gene expression profiling in the diagnosis and subclassification of leukemia. Journal of Clinical Oncology, 28(15):2529– 2537, 2010. [21] Y. Shen, Y.-M. Zhu, X. Fan, et al. Gene mutation patterns and their prognostic impact in a cohort of 1185 patients with acute myeloid leukemia. Blood, 118(20):5593–5603, 2011. [22] E. Segal, M. Shapira, A. Regev, D. Pe’er, D. Botstein, D. Koller, and N. Friedman. Module networks: identifying regulatory modules and their condition-specific regulators from gene expression data. Nature genetics, 34(2):166–176, 2003. [23] S.-I. Lee and S. Batzoglou. Ica-based clustering of genes from microarray expression data. In Advances in Neural Information Processing Systems, volume 16, 2003. [24] A. Liberzon, A. Subramanian, R. Pinchback, H. Thorvaldsdóttir, P. Tamayo, and J. P. Mesirov. Molecular signatures database (msigdb) 3.0. Bioinformatics, 27(12):1739–1740, 2011. [25] Y. Fang, L. N. Xie, X. M. Liu, et al. Dysregulated module approach identifies disrupted genes and pathways associated with acute myelocytic leukemia. Eur Rev Med Pharmacol Sci, 19(24):4811–4826, 2015. [26] C. Rubie, V. O. Frick, P. Ghadjar, et al. Research ccl20/ccr6 expression profile in pancreatic cancer. 2010. [27] K. Tamura, A. Makino, et al. Novel lipogenic enzyme elovl7 is involved in prostate cancer growth through saturated long-chain fatty acid metabolism. Cancer Research, 69(20):8133–8140, 2009. [28] N. Miyoshi, H. Ishii, K. Mimori, et al. Scrn1 is a novel marker for prognosis in colorectal cancer. Journal of surgical oncology, 101(2):156–159, 2010. 9 | 2016 | 244 |
6,155 | Probabilistic Inference with Generating Functions for Poisson Latent Variable Models Kevin Winner1 and Daniel Sheldon1,2 {kwinner,sheldon}@cs.umass.edu 1 College of Information and Computer Sciences, University of Massachusetts Amherst 2 Department of Computer Science, Mount Holyoke College Abstract Graphical models with latent count variables arise in a number of fields. Standard exact inference techniques such as variable elimination and belief propagation do not apply to these models because the latent variables have countably infinite support. As a result, approximations such as truncation or MCMC are employed. We present the first exact inference algorithms for a class of models with latent count variables by developing a novel representation of countably infinite factors as probability generating functions, and then performing variable elimination with generating functions. Our approach is exact, runs in pseudo-polynomial time, and is much faster than existing approximate techniques. It leads to better parameter estimates for problems in population ecology by avoiding error introduced by approximate likelihood computations. 1 Introduction A key reason for the success of graphical models is the existence of fast algorithms that exploit the graph structure to perform inference, such as Pearl’s belief propagation [19] and related propagation algorithms [13, 16, 23] (which we refer to collectively as “message passing” algorithms), and variable elimination [27]. For models with a simple enough graph structure, these algorithms can compute marginal probabilities exponentially faster than direct summation. However, these fast exact inference methods apply only to a relatively small class of models—those for which the basic operations of marginalization, conditioning, and multiplication of constituent factors can be done efficiently. In most cases, this means that the user is limited to models where the variables are either discrete (and finite) or Gaussian, or they must resort to some approximate form of inference. Why are Gaussian and discrete models tractable while others are not? The key issue is one of representation. If we start with factors that are all discrete or all Gaussian, then: (1) factors can be represented exactly and compactly, (2) conditioning, marginalization, and multiplication can be done efficiently in the compact representation, and (3) each operation produces new factors of the same type, so they can also be represented exactly and compactly. Many models fail the restriction of being discrete or Gaussian even though they are qualitatively “easy”. The goal of this paper is to expand the class of models amenable to fast exact inference by developing and exploiting a novel representation for factors with properties similar to the three above. In particular, we investigate models with latent count variables, and we develop techniques to represent and manipulate factors using probability generating functions. Figure 1 provides a simple example to illustrate the main ideas. It shows a model that is commonly used to interpret field surveys in ecology, where it is known as an N-mixture model [22]. The latent variable n ⇠Poisson(λ) represents the unknown number of individual animals at a given site. Repeated surveys are conducted at the site during which the observer detects each individual with 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. n yk k=1:K n ⇠Poisson(λ) yk|n ⇠Binomial(n, ⇢) n 0 10 20 30 40 0 0.05 0.1 0.15 p(n) prior posterior Generating Function F(s) = 1 X n=0 p(n, y1 =2, y2 =5, y3 =3)sn = " 0.0061s5+0.1034s6+0.5126s7 +1.0000s8+0.8023s9+0.2184s10# ⇥exp(8.4375s −15.4101) (a) (b) (c) Figure 1: The N-mixture model [22] is a simple model with a Poisson latent variable for which no exact inference algorithm is known: (a) the model, (b) the prior and posterior for λ = 20, ⇢= 0.25, y1 = 2, y2 = 5, y3 = 3, (c) a closed form representation of the generating function of the unnormalized posterior, which is a compact and exact description of the posterior. probability ⇢, so each observation yk is Binomial(n, ⇢). From these observations (usually across many sites with shared λ), the scientist wishes to infer n and fit λ and ⇢. This model is very simple: all variables are marginally Poisson, and the unnormalized posterior has a simple form (e.g., see Figure 1b). However, until recently, there was no known algorithm to exactly compute the likelihood p(y1:K). The naive way is to sum the unnormalized posterior p(n, y1, . . . , yK) over all possible values of n. However, n has a countably infinite support, so this is not possible. In practice, users of this and related models truncate the infinite sum at a finite value [22]. A recent paper developed an exact algorithm for the N-mixture model, but one with running time that is exponential in K [8]. For a much broader class of models with Poisson latent variables [5, 7, 11, 15, 28], there are no known exact inference algorithms. Current methods either truncate the support [5, 7, 11], which is slow (e.g., see [4]) and interacts poorly with parameter estimation [6, 8], or use MCMC [15, 28], which is slow and for which convergence is hard to assess. The key difficulty with these models is that we lack finite and computationally tractable representations of factors over variables with a countably infinite support, such as the posterior distribution in the N-mixture model, or intermediate factors in exact inference algorithms. The main contribution of this paper is to develop compact and exact representations of countably infinite factors using probability generating functions (PGFs) and to show how to perform variable elimination in the domain of generating functions. We provide the first exact pseudo-polynomial time inference algorithms (i.e., polynomial in the magnitude of the observed variables) for a class of Poisson latent variable models, including the N-mixture model and a more general class of Poisson HMMs. For example, the generating function of the unnormalized N-mixture posterior is shown in Figure 1c, from which we can efficiently recover the likelihood p(y1 = 2, y2 = 5, y3 = 3) = F(1) = 0.0025. For Poisson HMMs, we first develop a PGF-based forward algorithm to compute the likelihood, which enables efficient parameter estimatation. We then develop a “tail elimination” approach to compute posterior marginals. Experiments show that our exact algorithms are much faster than existing approximate approaches, and lead to better parameter estimation. Related work. Several previous works have used factor transformations for inference. Bickson and Guestrin [2] show how to perform inference in the space of characteristic functions (see also [17]) for a certain class of factor graphs. Xue et al. [26] perform variable elimination in discrete models using Walsh-Hadamard transforms. Jha et al. [14] use generating functions (over finite domains) to compute the partition function of Markov logic networks. McKenzie [18] describes the use of PGFs in discrete time series models, which are related to our models except they are fully observed, and thus require no inference. 2 The Poisson Hidden Markov Model Although our PGF-based approaches will apply more broadly, the primary focus of our work is a Poisson hidden Markov model (HMM) that captures a number of models from different disciplines. To describe the model, we first introduce notation for an operation called binomial thinning [24]. 2 n1 y1 y2 n2 yK nK ... Figure 2: Poisson HMM Write z = ⇢◦n to mean that z|n ⇠Binomial(n, ⇢), i.e., z is the result of “thinning” the n individuals so that each remains with probability ⇢. The Poisson HMM model is given by: nk = Poisson(λk) + δk−1 ◦nk−1, yk = ⇢k ◦nk. for k ≥1, with the initialization condition n0 = 0. The variables n1, . . . , nK describe the size of a population at sampling times t1 < t2 < . . . < tK. At time tk, the population consists of a Poisson(λk) number of new arrivals, plus δk−1 ◦nk−1 survivors from the previous time step (each individual survives with probability δk). A noisy count yk = ⇢k ◦nk is made of the population at time tk, where ⇢k is the detection probability of each individual. This model is broadly applicable. It models situations where individuals arrive in an iid fashion, and the time they remain is “memoryless”. Versions of this model are used in ecology to model surveys of “open populations” (individuals arrive and depart over time) [7] and the timing and abundance of insect populations [12, 25, 29], and it also capture models from queueing theory [9] and generic time series models for count data [1, 18]. Existing approaches. Two classes of methods have been applied for inference in Poisson HMMs and related models. The first is to truncate the support of the Poisson variables at a large but finite value Nmax [5, 7, 11, 22]. Then, for example, the Poisson HMM reduces to a standard discrete HMM. This is unsatisfactory because it is slow (a smart implementation that uses the fast Fourier transform takes time O(KN 2 max log Nmax)), and the choice of Nmax is intertwined with the unknown Poisson parameters λk, so the approximation interacts poorly with parameter estimation [6, 8]. The second class of approximate methods that has been applied to these problems is MCMC [28]. This is undesirable because it is also slow, and because the problem has a simple structure that should admit fast algorithms. 3 Variable Elimination with Generating Functions Our approach to inference in Poisson HMMs will be to implement the same abstract set of operations as variable elimination, but using a representation based on probability generating functions. Because variable elimination will produce intermediate factors on larger sets of variables, and to highlight the ability of our methods to generalize to a larger class of models, we first abstract from the Poisson HMM to introduce notation general for graphical models with multivariate factors, and their corresponding multivariate generating functions. Factors. Let x = (x1, . . . , xd) be a vector of nonnegative integer-valued random variables where xi 2 Xi ✓Z≥0. The set Xi may be finite (e.g., to model binary or finite discrete variables), but we assume without loss of generality that Xi = Z≥0 for all i by defining factors to take value zero for integers outside of Xi. For any set ↵✓{1, . . . , d}, define the subvector x↵:= (xi, i 2 ↵). We consider probability models of the form p(x) = 1 Z Q ↵2A ↵(x↵), where Z is a normalization constant and { ↵} is a set of factors ↵: Z≥0 ! R+ indexed by subsets ↵✓{1, . . . , d} in a collection A. Generating Functions. A general factor ↵on integer-valued variables cannot be finitely represented. We instead use the formalization of probability generating functions (PGFs). Let s = (s1, . . . , sd) be a vector of indeterminates corresponding to the random variables x. The joint PGF of a factor ↵is F↵(s↵) = X x↵ ↵(x↵) · Y i2↵ sxi i = X x↵ ↵(x↵) · sx↵ ↵. Here, for two vectors a and b with the same index set I, we have defined ab = Q i2I abi i . The sum is over all vectors x↵of non-negative integers. Univariate PGFs of the form F(s) = P1 x=0 Pr(X = x)sx = E[sX], where X is a nonnegative integer-valued random variable, are widely used in probability and statistics [3, 21], and have a number of nice properties. A PGF uniquely encodes the distribution of X, and there are formulas to recover moments and entries of the the probability mass function from the PGF. Most common distributions have closed-form PGFs, e.g., F(s) = exp{λ(s −1)} when X ⇠Poisson(λ). Similarly, the joint PGF F↵uniquely encodes the factor ↵, and we will develop a set of useful operations on joint PGFs. Note that we abuse terminology slightly by referring to the generating function of the 3 factor ↵as a probability generating function; however, it is consistent with the view of ↵as an unnormalized probability distribution. 3.1 Operations on Generating Functions Our goal is to perform variable elimination using factors represented as PGFs. To do this, the basic operations we need to support are are multiplication, marginalization, and “entering evidence” into factors (reducing the factor by fixing the value of one variable). In this section we state a number of results about PGFs that show how to perform such operations. For the most part, these are either well known or variations on well known facts about PGFs (e.g., see [10], Chapters 11, 12). All proofs can be found in the supplementary material. First, we see that marginalization of factors is very easy in the PGF domain: Proposition 1 (Marginalization). Let ↵\i(x↵\i) := P xi2Xi ↵(x↵\i, xi) be the factor obtained from marginalizing i out of ↵. The joint PGF of ↵\i is F↵\i(s↵\i) = F↵(s↵\i, 1). The normalization constant P x↵ ↵(x↵) is equal to F↵(1, . . . , 1). Entering evidence is also straightforward: Proposition 2 (Evidence). Let ↵\i(x↵\i) := ↵(x↵\i, a) be the factor resulting from observing the value xi = a in ↵. The joint PGF of ↵\i is F↵\i(s↵\i) = 1 a! @a @sa i F↵(s↵) %% si=0. Multiplication in the PGF domain—i.e., computing the PGF of the product ↵(x↵) β(xβ) of two factors ↵and β—is not straightforward in general. However, for certain types of factors, multiplication is possible. We give two cases. Proposition 3 (Multiplication: Binomial thinning). Let ↵[j(x↵, xj)= ↵(x↵)·Binomial(xj|xi, ⇢) be the factor resulting from expanding ↵to introduce a thinned variable xj := ⇢◦xi, where i 2 ↵ and j /2 ↵. The joint PGF of ↵[j is F↵[j(s↵, sj) = F↵(s↵\i, si(⇢sj + 1 −⇢)). Proposition 4 (Multiplication: Addition of two variables). Let γ(x↵, xβ, xk) := ↵(x↵) β(xβ)I{xk = xi + xj} be the joint factor resulting from the introduction of a new variable xk = xi + xj, where i 2 ↵, j 2 β, k /2 ↵[ β, γ := ↵[ β [ {k}. The joint PGF of γ is Fγ(s↵, sβ, sk) = F↵(s↵\i, sksi)Fβ(sβ\j, sksj). The four basic operations above are enough to perform variable elimination on a large set of models. In practice, it is useful to introduce additional operations that combine two of the above operations. Proposition 5 (Thin then observe). Let 0 ↵(x↵) := ↵(x↵)·Binomial(a|xi, ⇢) be the factor resulting from observing the thinned variable ⇢◦xi = a for i 2 ↵. The joint PGF of 0 ↵is F 0 ↵(s↵) = 1 a!(si⇢)a @a @ta i F↵(s↵\i, ti) %%% ti=si(1−⇢). Proposition 6 (Thin then marginalize). Let (↵\i)[j(x↵\i, xj) := P xi ↵(x↵) · Binomial(xj|xi, ⇢) be the factor resulting from introducing xj := ⇢◦xi and then marginalizing xi for i 2 ↵, j /2 ↵. The joint PGF of (↵\i)[j is F(↵\i)[j(s↵\i, sj) = F↵(s↵\i, ⇢sj + 1 −⇢). Proposition 7 (Add then marginalize). Let γ(x↵\i, xβ\j, xk) := P xi,xj ↵(x↵) β(xβ)I{xk = xi + xj} be the factor resulting from the deterministic addition xi + xj = xk followed by marginalization of xi and xj, where i 2 ↵, j 2 β, k /2 ↵[ β, γ := (↵\ i) [ (β \ j) [ {k}. The joint PGF of γ is Fγ(s↵\i, sβ\j, sk) = F↵(s↵\i, sk)Fβ(sβ\j, sk). 3.2 The PGF-Forward Algorithm for Poisson HMMs We now use the operations from the previous section to implement the forward algorithm for Poisson HMMs in the domain of PGFs. The forward algorithm is an instance of variable elimination, but in HMMs is more easily described using the following recurrence for the joint probability p(nk, y1:k): p(nk, y1:k) | {z } ↵k(nk) = X nk−1 p(nk−1, y1:k−1) | {z } ↵k−1(nk−1) p(nk|nk−1)p(yk|nk) We can compute the “forward messages” ↵k(nk) := p(nk, y1:k) in a sequential forward pass, assuming it is possible to enumerate all possible values of nk to store the messages and compute the recurrence. In our case, nk can take on an infinite number of values, so this is not possible. 4 Algorithm 1 FORWARD 1: 1(z1) := I{z1 = 0} 2: for k = 1 to K do 3: γk(nk) := P zk,mk k(zk)p(mk)I{nk = zk+mk} 4: ↵k(nk) := γk(nk)p(yk | nk) 5: if k < K then 6: k+1(zk+1) := P nk ↵k(nk)p(zk+1 | nk) 7: end if 8: end for Algorithm 2 PGF-FORWARD 1: 1(s) := 1 2: for k = 1 to K do 3: Γk(s) := k(s) · exp{λk(s −1)} 4: Ak(s):= 1 yk!(s⇢k)ykΓ(yk) k " s(1 −⇢k) # 5: if k < K then 6: k+1(s) := Ak " δks + 1 −δk # 7: end if 8: end for nk–1 yk–1 yk nk zk mk !k–1 !k !k "k Figure 3: Expanded model. We proceed instead using generating functions. To apply the operations from the previous section, it is useful to instantiate explicit random variables mk and zk for the number of new arrivals in step k and survivors from step k −1, respectively, to get the model (see Figure 3): mk ⇠Poisson(λk), zk = δk−1 ◦nk−1, nk = mk + zk, yk = ⇢k ◦nk. We can now expand the recurrence for ↵k(nk) as: ↵k(nk) = p(yk|nk) 1 X mk=0 1 X zk=0 p(mk)p(nk|zk, mk) k(zk) z }| { 1 X nk−1=0 ↵k−1(nk−1)p(zk|nk−1) | {z } γk(nk) (1) We have introduced the intermediate factors k(zk) and γk(nk) to clarify the implementation. FORWARD (Algorithm 1) is a dynamic programming algorithm based on this recurrence to compute the ↵k messages for all k. However, it cannot be implemented due to the infinite sums. PGF-FORWARD (Algorithm 2) instead performs the same operations in the domain of generating functions— k, Γk, and Ak are the PGFs of k, γk, and ↵k, respectively. Each line in PGF-FORWARD implements the operation in the corresponding line of FORWARD using the operations given in Section 3.1. In Line 1, 1(s) = P z1 1(z1)sz1 = 1 is the PGF of 1. Line 3 uses “Add then marginalize” (Proposition 7) combined with the fact that the Poisson PGF for mk is exp{λk(s −1)}. Line 4 uses “Thin then observe” (Proposition 5), and Line 6 uses “Thin then marginalize” (Proposition 6). Implementation and Complexity. The PGF-FORWARD algorithm as stated is symbolic. It remains to see how it can be implemented efficiently. For this, we need to respresent and manipulate the PGFs in the algorithm efficiently. We do so based on the following result: Theorem 1. All PGFs in the PGF-FORWARD algorithm have the form f(s) exp{as + b} where f is a polynomial with degree at most Y = P k yk. Proof. We verify the invariant inductively. It is clearly satisfied in Line 1 of PGF-FORWARD (f(s) = 1, a = b = 0). We check that it is preserved for each operation within the loop. In Line 3, suppose k(s) = f(s) exp{as + b}. Then Γk(s) = f(s) exp{(a + λk)s + (b −λk)} has the desired form. In Line 4, assume that Γk(s) = f(s) exp{as + b}. Then one can verify by taking the ykth derivative of Γk(s) that Ak(s) is given by: Ak(s) = (a⇢k)yk · syk yk X `=0 f (`)(s(1 −⇢k)) a``!(yk −`)! ! · exp{a(1 −⇢k)s + b} The scalar (a⇢)yk can be combined with the polynomial coefficients or the scalar exp(b) in the exponential. The second term is a polynomial of degree yk + deg(f). The third term has the form exp{a0s + b0}. Therefore, in Line 4, Ak(s) has the desired form, and the degree of the polynomial part of the representation increases by yk. 5 In Line 6, suppose Ak(s) = f(s) exp{as+b}. Then k+1(s) = g(s) exp , aδks+ b+a(1−δk) . , where g(s) is the composition of f with the affine function δks + 1 −δk, so g is a polynomial of the same degree as f. Therefore, k+1(s) has the desired form. We have shown that each PGF retains the desired form, and the degree of the polynomial is initially zero and increases by yk each time through the loop, so it is always bounded by Y = P k yk. The important consequence of Theorem 1 is that we can represent and manipulate PGFs in PGFFORWARD by storing at most Y coefficients for the polynomial f plus the scalars a and b. An efficient implementation based on this principle and the proof of the previous theorem is given in the supplementary material. Theorem 2. The running time of PGF-FORWARD for Poisson HMMs is O(KY 2). 3.3 Computing Marginals by Tail Elimination Algorithm 3 PGF-TAIL-ELIMINATE Output: PGF of unnormalized marginal p(ni, y1:K) 1: Φi,i+1(s, t) := Ai(s(δit + 1 −δi)) 2: for j = i + 1 to K do 3: Hij(s, t) := Φij(s, t) exp{λk(t −1)} 4: ⇥ij(s, t):= 1 yj! (t⇢j)yj @yj Hij(s,u) @uyj %%% u=t(1−⇢j) 5: if j < K then 6: Φi,j+1(s, t) := ⇥ij(s, δjt + 1 −δj) 7: end if 8: end for 9: return ⇥iK(s, 1) PGF-FORWARD allows us to efficiently compute the likelihood in a Poisson HMM. We would also like to compute posterior marginals, the standard approach for which is the forward-backward algorithm [20]. A natural question is whether there is an efficient PGF implementation of the backward algorithm for Poisson HMMs. While we were able to derive this algorithm symbolically, the functional form of the PGFs is more complex and we do not know of a polynomial-time implementation. Instead, we adopt a variable elimination approach that is less efficient in terms of the number of operations performed on factors (O(K2) instead of O(K) to compute all posterior marginals) but with the significant advantage that those operations are efficient. The key principle is to always eliminate predecessors before successors in the Poisson HMM. This allows us to apply operations similar to those in PGF-FORWARD. Define ✓ij(ni, nj) := p(ni, nj, y1:j) for j > i. We can write a recurrence for ✓ij similar to Equation (1). For j > i + 1: ✓ij(ni, nj) = p(yj|nj) X mj,zj p(mj)p(nj|zj, mj) φij(ni,zj) z }| { X nj−1 ✓i,j−1(ni, nj−1)p(zj|nj−1) | {z } ⌘ij(ni,nj) . We have again introduced intermediate factors, with probabilistic meanings φij(ni, zj) = p(ni, zj, y1:j−1) and ⌘ij(ni, nj) = p(ni, nj, y1:j−1). PGF-TAIL-ELIMINATE (Algorithm 3) is a PGF-domain dynamic programming algorithm based on this recurrence to compute the PGFs of the ✓ij factors for all j 2 {i + 1, . . . , K}. The non-PGF version of the algorithm appears in the supplementary material for comparison. We use ⇥ij, Φij, and Hij to represent the joint PGFs of ✓ij, φij, and ⌘ij, respectively. The algorithm can also be interpreted as variable elimination using the order zi+1, ni+1, . . . , zK, nK, after having already eliminated variables n1:i−1 and z1:i−1 in the forward algorithm, and therefore starting with the PGF of ↵i(ni). PGF-TAIL-ELIMINATE concludes by marginalizing nK from ⇥iK to obtain the PGF of the unnormalized posterior marginal p(ni, y1:K). Each line of PGF-TAIL-ELIMINATE uses the same operations given in Section 3.1. Line 1 uses “Binomial thinning” (Proposition 3), Line 3 uses “Add then marginalize” (Proposition 7), Line 4 uses “Thin then observe” (Proposition 5) and Line 6 uses “Thin then marginalize” (Proposition 6). Implementation and Complexity. The considerations for implementating PGF-TAIL-ELIMINATE are similar to those of PGF-FORWARD, with the details being slightly more complex due to the larger factors. We state the main results here and include proofs and implementation details in the supplementary material. Theorem 3. All PGFs in the PGF-TAIL-ELIMINATE algorithm have the form f(s, t) exp{ast + bs + ct + d} where f is a bivariate polynomial with maximum exponent most Y = P k yk. 6 10-1 100 101 102 103 $; 10-4 10-3 10-2 10-1 100 Mean runtime (s) $; vs Runtime FA - Poiss FA - Oracle PGFFA 0 100 200 300 400 500 $; 0 1 2 3 4 5 6 7 8 9 Mean runtime (s) #10-3 $; vs Runtime of PGFFA PGFFA Figure 4: Runtime of PGF-FORWARD and truncated algorithm vs. ⇤⇢. Left: log-log scale. Right: PGF-FORWARD only, linear scale. 10 30 50 70 90 110 130 150 6 0 20 40 60 80 100 120 140 160 180 200 ^6 6 Recovery Trunc PGFFA True 6 Figure 5: Parameter estimation w/ PGF-FORWARD Theorem 4. PGF-TAIL-ELIMINATE can be implemented to run in time O(Y 3(log Y + K)), and the PGFs for all marginals can be computed in time O(KY 3(log Y + K)). 3.4 Extracting Posterior Marginals and Moments After computing the PGF of the posterior marginals, we wish to compute the actual probabilities and other quantities, such as the moments, of the posterior distribution. This can be done efficiently: Theorem 5. The PGF of the unnormalized posterior marginal p(ni, y1:K) has the form F(s) = f(s) exp{as + b} where f(s) = Pm j=0 cjsj is a polynomial of degree m Y . Given the parameters of the PGF, the posterior mean, the posterior variance, and an arbitrary entry of the posterior probability mass function can each be computed in O(m) = O(Y ) time as follows, where Z = f(1) exp{a + b}: (i) µ := E[ni | y1:k] = ea+b−log Z Pm j=0(a + m)cj (ii) σ2 := Var(ni | y1:k) = µ −µ2 + ea+b−log Z Pm j=0((a + m)2 −m)cj (iii) Pr(ni = ` | y1:k) = eb−log Z Pmin{m,`} j=0 cj a`−i (`−i)! 4 Experiments We conducted experiments to demonstrate that our method is faster than standard approximate approaches for computing the likelihood in Poisson HMMs, that it leads to better parameter estimates, and to demonstrate the computation of posterior marginals on an ecological data set. Running time. We compared the runtimes of PGF-FORWARD and the truncated forward algorithm, a standard method for Poisson HMMs in the ecology domain [7]. The runtime of our algorithm depends on the magnitude of the observed counts. The runtime of the truncated forward is very sensitive to the setting of the trunctation parameter Nmax: smaller values are faster, but may underestimate the likelihood. Selecting Nmax large enough to yield correct likelihoods but small enough to be fast is difficult [4, 6, 8]. We evaluated two strategies to select Nmax. The first is an oracle strategy, where we first searched for the smallest value of Nmax for which the error in the likelihood is at most 0.001, and then compared vs. the runtime for that value (excluding the search time). The second strategy, adapted from [8], is to set Nmax such that the maximum discarded tail probability of the Poisson prior over any nk is less than 10−5. To explore these issues we generated data from models with arrival rates λ = ⇤⇥ [0.0257, 0.1163, 0.2104, 0.1504, 0.0428] and survival rates δ = [0.2636, 0.2636, 0.2636, 0.2636] based on a model for insect populations [29]. We varied the overall population size parameter ⇤2 {10, 20, . . . , 100, 125, 150, . . . , 500}, and detection probability ⇢2 {0.05, 0.10, . . . , 1.00}. For each parameter setting, we generated 25 data sets and recorded the runtime of both methods. Figure 4 shows that PGF-FORWARD is 2–3 orders of magnitude faster than even the oracle truncated algorithm. The runtime is plotted against ⇤⇢/ E[Y ], the primary parameter controlling the runtime of PGF-FORWARD. Empirically, the runtime depends linearly instead of quadratically, as predicted, 7 on the magnitude of observed counts—this is likely due to the implementation, which is dominated by loops that execute O(Y ) times, with much faster vectorized O(Y ) operations within the loops. Parameter Estimation. We now examine the impact of exact vs. truncated likelihood computations on parameter estimation in the N-mixture model [22]. A well-known feature of this and related models is that it is usually easy to estimate the product of the population size parameter λ and detection probability ⇢, which determines the mean of the observed counts, but, without enough data, it is difficult to estimate both parameters accurately, especially as ⇢! 0 (e.g., see [8]). It was previously shown that truncating the likelihood can artificially suppress instances where the true maximum-likelihood estimates are infinite [8], a phenomenon that we also observed. We designed a different, simple, experiment to reveal another failure case of the truncated likelihood, which is avoided by our exact methods. In this case, the modeler is given observed counts over 50 time steps (K = 50) at 20 iid locations. She selects a heuristic fixed value of Nmax approximately 5 times the average observed count based on her belief that the detection probability is not too small and this will capture most of the probability mass. To evaluate the accuracy of parameter estimates obtained by numerically maximizing the truncated and exact likelihoods using this heuristic for Nmax we generated true data from different values of λ and ⇢with λ⇢= E[y] fixed to be equal to 10—the modeler does not know the true parameters, and in each cases chooses Nmax = 5E[y] = 50. Figure 5 shows the results. As the true λ increases close to and beyond Nmax, the truncated method cuts off significant portions of the probability mass and severely underestimates λ. Estimation with the exact likelihood is noisier as λ increases and ⇢! 0, but not biased by truncation. While this result is not surprising, it reflects a realistic situation faced by the practitioner who must select this trunctation parameter. Figure 6: Posterior marginals for abundance of Northern Dusky Salamanders at 1 site. See text. Marginals. We demonstrate the computation of posterior marginals and parameter estimation on an end-to-end case study to model the abundance of Northern Dusky Salamanders at 15 sites in the mid-Atlantic US using data from [28]. The data consists of 14 counts at each site, conducted in June and July over 7 years. We first fit a Poisson HMM by numerically maximizing the likelihood as computed by PGF-FORWARD. The model has three parameters total, which are shared across sites and time: arrival rate, survival rate, and detection probability. Arrivals are modeled as a homogenous Poisson process, and survival is modeled by assuming indvidual lifetimes are exponentially distributed. The fitted parameters indicated an arrival rate of 0.32 individuals per month, a mean lifetime of 14.25 months, and detection probability of 0.58. Figure 6 shows the posterior marginals as computed by PGF-TAIL-ELIMINATE with the fitted parameters, which are useful both for model diagnostics and for population status assessments. The crosses show the posterior mean, and color intensity indicates the actual PMF. Overall, computing maximum likelihood estimates required 189 likelihood evaluations and thus 189 ⇥15 = 2835 calls to PGF-FORWARD, which took 24s total. Extracting posterior marginals at each site required 14 executions of the full PGF-TAIL-ELIMINATE routine (at all 14 latent variables), and took 1.6s per site. Extracting the marginal probabilities and posterior mean took 0.0012s per latent variable. 5 Conclusion We have presented techniques for exact inference in countably infinite latent variable models using probability generating functions. Although many aspects of the methodology are general, the current method is limited to HMMs with Poisson latent variables, for which we can represent and manipulate PGFs efficiently (cf. Theorems 1 and 3). Future work will focus on extending the methods to graphical models with more complex structures and to support a larger set of distributions, for example, including the negative binomial, geometric, and others. One path toward these goals is to find a broader parametric representation for PGFs that can be manipulated efficiently. Acknowledgments. This material is based upon work supported by the National Science Foundation under Grant No. 1617533. 8 References [1] M. A. Al-Osh and A. A. Alzaid. First-order integer-valued autoregressive (INAR(1)) process. Journal of Time Series Analysis, 8(3):261–275, 1987. [2] D. Bickson and C. Guestrin. Inference with Multivariate Heavy-Tails in Linear Models. In Advances in Neural Information Processing Systems (NIPS), 2010. [3] G. Casella and R. Berger. Statistical Inference. Duxbury advanced series in statistics and decision sciences. Thomson Learning, 2002. ISBN 9780534243128. [4] R. Chandler. URL http://www.inside-r.org/packages/cran/unmarked/docs/pcountOpen. [5] R. B. Chandler, J. A. Royle, and D. I. King. Inference about density and temporary emigration in unmarked populations. Ecology, 92(7):1429–1435, 2011. [6] T. Couturier, M. Cheylan, A. Bertolero, G. Astruc, and A. Besnard. Estimating abundance and population trends when detection is low and highly variable: A comparison of three methods for the Hermann’s tortoise. Journal of Wildlife Management, 77(3):454–462, 2013. [7] D. Dail and L. Madsen. Models for estimating abundance from repeated counts of an open metapopulation. Biometrics, 67(2):577–87, 2011. [8] E. B. Dennis, B. J. Morgan, and M. S. Ridout. Computational aspects of n-mixture models. Biometrics, 71 (1):237–246, 2015. [9] S. G. Eick, W. A. Massey, and W. Whitt. The physics of the Mt/G/1 queue. Operations Research, 41 (4):731–742, 1993. [10] W. Feller. An Introduction to Probability Theory and Its Applications. Wiley, 1968. [11] I. J. Fiske and R. B. Chandler. unmarked: An R package for fitting hierarchical models of wildlife occurrence and abundance. Journal of Statistical Software, 43:1–23, 2011. [12] K. Gross, E. J. Kalendra, B. R. Hudgens, and N. M. Haddad. Robustness and uncertainty in estimates of butterfly abundance from transect counts. Population Ecology, 49(3):191–200, 2007. [13] F. V. Jensen, S. L. Lauritzen, and K. G. Olesen. Bayesian updating in causal probabilistic networks by local computations. Computational statistics quarterly, 1990. [14] A. Jha, V. Gogate, A. Meliou, and D. Suciu. Lifted inference seen from the other side: The tractable features. In Advances in Neural Information Processing Systems (NIPS), pages 973–981, 2010. [15] M. Kéry, R. M. Dorazio, L. Soldaat, A. Van Strien, A. Zuiderwijk, and J. A. Royle. Trend estimation in populations with imperfect detection. Journal of Applied Ecology, 46:1163–1172, 2009. [16] S. L. Lauritzen and D. J. Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological), pages 157–224, 1988. [17] Y. Mao and F. R. Kschischang. On factor graphs and the Fourier transform. IEEE Transactions on Information Theory, 51(5):1635–1649, 2005. [18] E. McKenzie. Ch. 16. discrete variate time series. In Stochastic Processes: Modelling and Simulation, volume 21 of Handbook of Statistics, pages 573 – 606. Elsevier, 2003. [19] J. Pearl. Fusion, propagation, and structuring in belief networks. Artificial intelligence, 29(3):241–288, 1986. [20] L. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, Feb 1989. [21] S. I. Resnick. Adventures in stochastic processes. Springer Science & Business Media, 2013. [22] J. A. Royle. N-Mixture Models for Estimating Population Size from Spatially Replicated Counts. Biometrics, 60(1):108–115, 2004. [23] P. P. Shenoy and G. Shafer. Axioms for probability and belief-function propagation. In Uncertainty in Artificial Intelligence, 1990. [24] C. H. Weiß. Thinning operations for modeling time series of counts—a survey. AStA Advances in Statistical Analysis, 92(3):319–341, 2008. [25] K. Winner, G. Bernstein, and D. Sheldon. Inference in a partially observed queueing model with applications in ecology. In Proceedings of the 32nd International Conference on Machine Learning (ICML), volume 37, pages 2512–2520, 2015. [26] Y. Xue, S. Ermon, R. Lebras, C. P. Gomes, and B. Selman. Variable Elimination in Fourier Domain. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 1–10, 2016. [27] N. L. Zhang and D. Poole. A simple approach to bayesian network computations. In Proc. of the Tenth Canadian Conference on Artificial Intelligence, 1994. [28] E. F. Zipkin, J. T. Thorson, K. See, H. J. Lynch, E. H. C. Grant, Y. Kanno, R. B. Chandler, B. H. Letcher, and J. A. Royle. Modeling structured population dynamics using data from unmarked individuals. Ecology, 95(1):22–29, 2014. [29] C. Zonneveld. Estimating death rates from transect counts. Ecological Entomology, 16(1):115–121, 1991. 9 | 2016 | 245 |
6,156 | Achieving the KS threshold in the general stochastic block model with linearized acyclic belief propagation Emmanuel Abbe Applied and Computational Mathematics and EE Dept. Princeton University eabbe@princeton.edu Colin Sandon Department of Mathematics Princeton University sandon@princeton.edu Abstract The stochastic block model (SBM) has long been studied in machine learning and network science as a canonical model for clustering and community detection. In the recent years, new developments have demonstrated the presence of threshold phenomena for this model, which have set new challenges for algorithms. For the detection problem in symmetric SBMs, Decelle et al. conjectured that the so-called Kesten-Stigum (KS) threshold can be achieved efficiently. This was proved for two communities, but remained open for three and more communities. We prove this conjecture here, obtaining a general result that applies to arbitrary SBMs with linear size communities. The developed algorithm is a linearized acyclic belief propagation (ABP) algorithm, which mitigates the effects of cycles while provably achieving the KS threshold in O(n ln n) time. This extends prior methods by achieving universally the KS threshold while reducing or preserving the computational complexity. ABP is also connected to a power iteration method on a generalized nonbacktracking operator, formalizing the spectral-message passing interplay described in Krzakala et al., and extending results from Bordenave et al. 1 Introduction The stochastic block model (SBM) is widely used as a model for community detection and as a benchmark for clustering algorithms. The model emerged in multiple scientific communities, in machine learning and statistics under the SBM [1, 2, 3, 4], in computer science as the planted partition model [5, 6, 7], and in mathematics as the inhomogeneous random graph model [8]. Although the model was defined as far back as the 80s, mainly studied for the exact recovery problem, it resurged in the recent years due in part to fascinating conjectures on the detection problem, established in [9] (and backed in [10]) from deep but non-rigorous statistical physics arguments. For efficient algorithms, the following was conjectured: Conjecture 1. (See formal definitions below) In the stochastic block model with n vertices, k balanced communities, edge probability a/n inside the communities and b/n across, it is possible to detect communities in polynomial time if and only if (a −b)2 k(a + (k −1)b) > 1. (1) In other words, the problem of detecting efficiently communities is conjectured to have a sharp threshold at the above, which is called the Kesten-Stigum (KS) threshold. Establishing such thresholds is of primary importance for the developments of algorithms. A prominent example is Shannon’s coding theorem, that gives a sharp threshold for coding algorithms at the channel capacity, and which has led the development of coding algorithms used in communication standards. In the area of 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. clustering, where establishing rigorous benchmarks is a challenge, the quest of sharp thresholds is likely to also have fruitful outcomes. Interestingly, classical clustering algorithms do not seem to suffice for achieving the threshold in (1). This includes spectral methods based on the adjacency matrix or Laplacians, as well as SDPs. For standard spectral methods, a first issue is that the fluctuations in the node degrees produce high-degree nodes that disrupt the eigenvectors from concentrating on the clusters. This issue is further enhanced on real networks where degree variations are important. A classical trick is to trim such high-degree nodes [11, 12], throwing away some information, but this does not seem to suffice. SDPs are a natural alternative, but they also stumble before the threshold [13, 14], focusing on the most likely rather than typical clusterings. Significant progress has already been achieved on Conjecture 1. In particular, the conjecture is set for k = 2, with the achievability part proved in [15, 16] and [17], and the impossibility part in [10]. Achievability results were also obtained in [17] for SBMs with multiple communities that satisfy a certain asymmetry condition (see Theorem 5 in [17]). Conjecture 1 remained open for k ≥3. In their original paper [9], Decelle et al. conjectured that belief propagation (BP) achieves the KS threshold. The main issue when applying BP to the SBM is the classical one: the presence of cycles in the graph makes the behavior of the algorithm difficult to understand, and BP is susceptible to settle down in the wrong fixed points. While empirical studies of BP on loopy graph have shown that convergence still takes place in some cases [18], obtaining rigorous results in the context of loopy graphs remains a long standing challenge for message passing algorithms, and achieving the KS threshold requires precisely running BP to an extent where the graph is not even tree-like. We address this challenge in the present paper, with a linearized version of BP that mitigates cycles. Note that establishing formally the converse of Conjecture 1 (i.e., that efficient detection is impossible below the threshold) for arbitrary k seems out of reach at the moment, as the problem behaves very differently for small rather than arbitrary k. Indeed, except for a few low values of k, it is proven in [19, 20] that the threshold in (1) does not coincide with the information-theoretic threshold. Since it is possible to detect below the threshold with non-efficient algorithms, proving formally the converse of Conjecture 1 would require major headways in complexity theory. On the other hand, [9] provides already non-rigourous arguments that the converse hold. 1.1 This paper This paper proves the achievability part of conjecture 1. Our main result applies to a more general context, with a generalized notion of detection that applies to arbitrary SBMs. In particular, • we show that an approximate belief propagation (ABP) algorithm that mitigates cycles achieves the KS threshold universally. The simplest linearized1 version of BP is to repeatedly update beliefs about a vertex’s community based on its neighbor’s suspected communities while avoiding backtrack. However, this only works ideally if the graph is a tree. The correct response to a cycle would be to discount information reaching the vertex along either branch of the cycle to compensate for the redundancy of the two branches. Due to computational issues we simply prevent information from cycling around constant size cycles. • we show how ABP can be interpreted as a power iteration method on a generalized rnonbacktracking operator, i.e., a spectral algorithm that uses a matrix counting the number of r-nonbacktracking walks rather than the adjacency matrix. The random initialization of the beliefs in ABP corresponds to the random vector to which the power iteration is applied, formalizing the connection described in [22]. While using r = 2 backtracks may suffice to achieve the threshold, larger backtracks are likely to help mitigating the presence of small loops in networks. Our results are closest to [16, 17], while diverging in several key parts. A few technical expansions in the paper are similar to those carried in [16], such as the weighted sums over nonbacktracking walks and the SAW decomposition in [16], similar to our compensated nonbacktracking walk counts and Shard decomposition. Our modifications are developed to cope with the general SBM, in particular to compensation for the dominant eigenvalues in the latter setting. Our algorithm complexity is also slightly reduced by a logarithmic factor. 1Other forms of approximate message passing algorithms have been studied for dense graphs, in particular [21] for compressed sensing. 2 Our algorithm is also closely related to [17], which focuses on extracting the eigenvectors of the standard nonbacktracking operator. Our proof technique is different than the one in [17], so that we can cope with the setting of Conjecture 1. We also implement the eigenvector extractions in a belief propagation fashion. Another difference with [17] is that we rely on nonbacktracking operators of higher orders r. While r = 2 is arguably the simplest implementation and may suffice for the sole purpose of achieving the KS threshold, a larger r is likely to be beneficial in practice. For example, an adversary may add triangles for which ABP with r = 2 would fail while larger r would succeed. Finally, the approach of ABP can be extended beyond the linearized setting to move from detection to an optimal accuracy as discussed in Section 5. 2 Results 2.1 A general notion of detection The stochastic block model (SBM) is a random graph model with clusters defined as follows. Definition 1. For k ∈Z+, a probability distribution p ∈(0, 1)k, a k × k symmetric matrix Q with nonnegative entries, and n ∈Z+, we define SBM(n, p, Q/n) as the probability distribution over ordered pairs (σ, G) of an assignment of vertices to one of k communities and an n-vertex graph generated by the following procedure. First, each vertex v ∈V (G) is independently assigned a community σv under the probability distribution p. Then, for every v ̸= v′, an edge is drawn in G between v and v′ with probability Qσv,σv′ /n, independently of other edges. We sometimes say that G is drawn under SBM(n, p, Q/n) without specifying σ and define Ωi = {v : σv = i}. Definition 2. The SBM is called symmetric if p is uniform and if Q takes the same value on the diagonal and the same value off the diagonal. Our goal is to find an algorithm that can distinguish between vertices from one community and vertices from another community in a non trivial way. Definition 3. Let A be an algorithm that takes a graph as input and outputs a partition of its vertices into two sets. A solves detection (or weak recovery) in graphs drawn from SBM(n, p, Q/n) if there exists ϵ > 0 such that the following holds. When (σ, G) is drawn from SBM(n, p, Q/n) and A(G) divides its vertices into S and Sc, with probability 1 −o(1), there exist i, j ∈[k] such that |Ωi ∩S|/|Ωi| −|Ωj ∩S|/|Ωj| > ϵ. In other words, an algorithm solves detection if it divides the graph’s vertices into two sets such that vertices from different communities have different probabilities of being assigned to one of the sets. An alternate definition (see for example Decelle et al. [9]) requires the algorithm to divide the vertices into k sets such that there exists ϵ > 0 for which there exists an identification of the sets with the communities labelling at least max pi + ϵ of the vertices correctly with high probability. In the 2 community symmetric case, the two definitions are equivalent. In a two community asymmetric case where p = (.2, .8), an algorithm that could find a set containing 2/3 of the vertices from the large community and 1/3 of the vertices from the small community would satisfy Definition 3, however, it would not satisfy previous definition due to the biased prior. If all communities have the same size, this distinction is meaningless and we have the following equivalence: Lemma 1. Let k > 0, Q be a k × k symmetric matrix with nonnegative entries, p be the uniform distribution over k sets, and A be an algorithm that solves detection in graphs drawn from SBM(n, p, Q/n). Then A also solves detection according to Decelle et al.’s criterion [9], provided that we consider it as returning k −2 empty sets in addition to its actual output. Proof. Let (σ, G) ∼SBM(n, p, Q/n) and A(G) return S and S′. There exists ϵ > 0 such that with high probability (whp) there exist i, j such that |Ωi ∩S|/|Ωi| −|Ωj ∩S|/|Ωj| > ϵ. So, if we map S to community i and S′ to community j, the algorithm classifies at least |Ωi ∩S|/n + |Ωj ∩S′|/n = |Ωj|/n + |Ωi ∩S|/n −|Ωj ∩S|/n ≥1/k + ϵ/k −o(1) of the vertices correctly whp. 2.2 Achieving efficiently and universally the KS threshold Given parameters p and Q for the SBM, let P be the diagonal matrix such that Pi,i = pi for each i ∈[k]. Also, let λ1, ..., λh be the distinct eigenvalues of PQ in order of nonincreasing magnitude. 3 Definition 4. The signal to noise ratio of SBM(n, p, Q/n) is defined by SNR := λ2 2/λ1. Theorem 1. Let k ∈Z+, p ∈(0, 1)k be a probability distribution, Q be a k × k symmetric matrix with nonnegative entries, and G be drawn under SBM(n, p, Q/n). If SNR > 1, then there exist r ∈Z+, c > 0, and m : Z+ →Z+ such that ABP(G, m(n), r, c, (λ1, ..., λh)) described in the next section solves detection and runs in O(n log n) time. For the symmetric SBM, this settles the achievability part of Conjecture 1, as the condition SNR > 1 reads in this case SNR = ( a−b k )2/( a+(k−1)b k ) = (a −b)2/(k(a + (k −1)b)) > 1. 3 The linearized acyclic belief propagation algorithm (ABP) 3.1 Vanilla version We present first a simplified version of our algorithm that captures the essence of the algorithm while avoiding technicalities required for the proof, described in Section 3.3. ABP∗(G, m, r, λ1): 1. For each vertex v, randomly draw xv with a Normal distribution. For all adjacent v, v′ in G, set y(1) v,v′ = xv′ and set y(t) v,v′ = 0 whenever t < 1. 2. For each 1 < t ≤m, set z(t−1) v,v′ = y(t−1) v,v′ − 1 2|E(G)| X (v′′,v′′′)∈E(G) y(t−1) v′′,v′′′ (2) for all adjacent v, v′. For each adjacent v, v′ that are not part of a cycle of length r or less, set y(t) v,v′ = X v′′:(v′,v′′)∈E(G),v′′̸=v z(t−1) v′,v′′ and for the other adjacent v, v′ in G, let the other vertex in the cycle that is adjacent to v be v′′′, the length of the cycle be r′, and set y(t) v,v′ = X v′′:(v′,v′′)∈E(G),v′′̸=v z(t−1) v′,v′′ − X v′′:(v,v′′)∈E(G),v′′̸=v′,v′′̸=v′′′ z(t−r′) v,v′′ unless t = r′, in which case, set y(t) v,v′ = P v′′:(v′,v′′)∈E(G),v′′̸=v z(t−1) v′,v′′ −z(1) v′′′,v. 3. Set y′ v = P v′:(v′,v)∈E(G) y(m) v,v′ for every v ∈G and return ({v : y′ v > 0}, {v : y′ v ≤0}). Remarks. (1) In the r = 2 case, one can exit step 2 after the second line. As mentioned above, we rely on a less compact version of the algorithm to prove the theorem, but expect that the above also succeeds at detection as long as m > 2 ln(n)/ ln(SNR). (2) What the algorithm does if (v, v′) is in multiple cycles of length r or less is unspecified as there is no such edge with probability 1 −o(1) in the sparse SBM. This can be modified for more general settings, applying the adjustment independently for each such cycle, setting y(t) v,v′ = P v′′:(v′,v′′)∈E(G),v′′̸=v z(t−1) v′,v′′ − Pr r′=1 P v′′′:(v,v′′′)∈E(G) C(r′) v′′′,v,v′ P v′′:(v,v′′)∈E(G),v′′̸=v′,v′′̸=v′′′ z(t−r′) v,v′′ , where C(r′) v′′′,v,v′ denotes the number of length r′ cycles that contain v′′′, v, v′ as consecutive vertices. (3) The purpose of setting z(t−1) v,v′ as in step (2) is to ensure that the average value of the y(t) is approximately 0, and thus that the eventual division of the vertices into two sets is roughly even. An alternate way of doing this is to simply let z(t−1) v,v′ = y(t−1) v,v′ and then compensate for any bias of y(t) towards positive or negative values at the end. More specifically, define Y to be the n×m matrix such that for all t and v, Yv,t = P v′:(v′,v)∈E(G) y(t) v,v′, and M to be the m × m matrix such that Mi,i = 1 and Mi,i+1 = −λ1 for all i, and all other entries of M are equal to 0. Then set y′ = Y M m′em, where em ∈Rm denotes the unit vector with 1 in the m-th entry, and m′ is a suitable integer. 4 3.2 Spectral implementation One way of looking at this algorithm for r = 2 is the following. Given a vertex v in community i, the expected number of vertices v′ in community j that are adjacent to v is approximately ej · PQei. For any such v′ the expected number of vertices in community j′ that are adjacent to v′ not counting v is approximately ej′ · PQej, and so on. In order to explore this connection, define the graph’s nonbacktracking walk matrix W as the 2|E(G)| × 2|E(G)| matrix such that for all v ∈V (G) and all distinct v′ and v′′ adjacent to v, W(v,v′′),(v′,v) = 1, and all other entries in W are 0. Now, let w be an eigenvector of PQ with eigenvalue λi and w ∈R2|E(G)| be the vector such that w(v,v′) = wσv′ /pσv′ for all (v, v′) ∈E(G). For any small t, we would expect that w · W tw ≈ λt i||w||2 2, which strongly suggests that w is correlated with an eigenvector of W with eigenvalue λi. For any such w with i > 1, dividing G’s vertices into those with positive entries in w and those with negative entries in w would put all vertices from some communities in the first set, and all vertices from the other communities in the second. So, we suspect that an eigenvector of W with its eigenvalue of second greatest magnitude would have entries that are correlated with the corresponding vertices’ communities. We could simply extract this eigenvector, but a faster approach would be to take a random vector y and then compute W my for some suitably large m. That will be approximately equal to a linear combination of W’s dominant eigenvectors. Its dominant eigenvector is expected to have an eigenvalue of approximately λ1 and to have all of its entries approximately equal, so if instead we compute (W − λ1 2|E(G)|J)my where J is the vector with all entries equal to 1, the component of y proportional to W’s dominant eigenvector will be reduced to negligable magnitude, leaving a vector that is approximately proportional to W’s eigenvector of second largest eigenvalue. This is essentially what the ABP algorithm does for r = 2. This vanilla approach does however not extend obviously to the case with multiple eigenvalues. In such cases, we will have to subtract multiples of the identity matrix instead of J because we will not know enough about W’s eigenvectors to find a matrix that cancels out one of them in particular. These are significant challenges to overcome to prove the general result and Conjecture 1. For higher values of r, the spectral view of ABP can be understood as described above but introducing the following generalized nonbacktracking operator as a replacement to W: Definition 5. Given a graph, define the r-nonbacktracking matrix W (r) of dimension equal to the number of r −1 directed paths in the graph and with entry W (r) (v1,v2,...,vr),(v′ 1,v′ 2,...,v′ r) equal to 1 if v′ i+1 = vi for each 1 ≤i < r and v′ 1 ̸= vr, and equal to 0 otherwise. Figure 1: Two paths of length 3 that contribute to an entry of 1 in W (4). 3.3 Full version The main modifications in the proof are as follows. First, at the end we assign vertices to sets with probabilities that scale linearly with their entries in y′ instead of simply assigning them based on the signs of their entries. This allows us to convert the fact that the average values of y′ v for v in different communities is different into a detection result. Second, we remove a small fraction of the edges from the graph at random at the beginning of the algorithm (the graph-splitting step), defining y′′ v to be the sum of y′ v′ over all v′ connected to v by paths of a suitable length with removed edges at their ends in order to eliminate some dependency issues. Also, instead of just compensating for PQ’s dominant eigenvalue, we also compensate for some of its smaller eigenvalues, and subtract multiples of y(t−1) from y(t) for some t instead of subtracting the average value of y(t) from all of its entries for all t. We refer to [19] for the full description of the algorithm. Note that while it is easier to prove that the ABP algorithm works, the ABP∗algorithm should work at least as well in practice. 5 4 Proof technique For simplicity, consider first the two community symmetric case. Consider determining the community of v using belief propagation, assuming some preliminary guesses about the vertices t edges away from it, and assuming that the subgraph of G induced by the vertices within t edges of v is a tree. For any vertex v′ such that d(v, v′) < t, let Cv′ be the set of the children of v′. If we believe based on either our prior knowledge or propagation of beliefs up to these vertices that v′′ is in community 1 with probability 1 2 + 1 2ϵv′′ for each v′′ ∈Cv′, then the algorithm will conclude that v′ is in community 1 with a probability of Q v′′∈Cv′ ( a+b 2 + a−b 2 ϵv′′) Q v′′∈Cv′ ( a+b 2 + a−b 2 ϵv′′) + Q v′′∈Cv′ ( a+b 2 −a−b 2 ϵv′′). If all of the ϵv′′ are close to 0, then this is approximately equal to (see also [9, 22]) 1 + P v′′∈Cv′ a−b a+bϵv′′ 2 + P v′′∈Cv′ a−b a+bϵv′′ + P v′′∈Cv′ (−1) a−b a+bϵv′′ = 1 2 + a −b a + b X v′′∈Cv′ 1 2ϵv′′. That means that the belief propagation algorithm will ultimately assign an average probability of approximately 1 2 + 1 2( a−b a+b)t P v′′:d(v,v′′)=t ϵv′′ to the possibility that v is in community 1. If there exists ϵ such that Ev′′∈Ω1[ϵv′′] = ϵ and Ev′′∈Ω2[ϵv′′] = −ϵ (recall that Ωi = {v : σv = i}), then on average we would expect to assign a probability of approximately 1 2 + 1 2 (a−b)2 2(a+b) t ϵ to v being in its actual community, which is enhanced as t increases when SNR > 1. Note that since the variance in the probability assigned to the possibility that v is in its actual community will also grow as (a−b)2 2(a+b) t , the chance that this will assign a probability of greater than 1/2 to v being in its actual community will be 1 2 + Θ (a−b)2 2(a+b) t/2 . One idea for the initial estimate is to simply guess the vertices’ communities at random, in the expectation that the fractions of the vertices from the two communities assigned to a community will differ by θ(1/√n) by the Central Limit Theorem. Unfortunately, for any t large enough that (a−b)2 2(a+b) t/2 > √n, we have that (a+b) 2 t > n which means that our approximation breaks down before t gets large enough to detect communities. In fact, t would have to be so large that not only would neighborhoods not be tree like, but vertices would have to be exhausted. One way to handle this would be to stop counting vertices that are t edges away from v, and instead count each vertex a number of times equal to the number of length t paths from v to it.2 Unfortunately, finding all length t paths starting at v can be done efficiently enough only for values of t that are smaller than what is needed to amplify a random guess to the extent needed here. We could instead calculate the number of length t walks from v to each vertex more quickly, but this count would probably be dominated by walks that go to a high degree vertex and then leave and return to it repeatedly, which would throw the calculations off. On the other hand, most reasonably short nonbacktracking walks are likely to be paths, so counting each vertex a number of times equal to the number of nonbacktracking walks of length t from v to it seems like a reasonable modification. That said, it is still possible that there is a vertex that is in cycles such that most nonbacktracking walks simply leave and return to it many times. In order to mitigate this, we use r-nonbacktracking walks, walks in which no vertex reoccurs within r steps of a previous occurrence, such that walks cannot return to any vertex more than t/r times. Unfortunately, this algorithm would not work because the original guesses will inevitably be biased towards one community or the other. So, most of the vertices will have more r-nonbacktracking walks of length t from them to vertices that were suspected of being in that community than the other. One way to deal with this bias would be to subtract the average number of r-nonbacktracking walks to vertices in each set from each vertex’s counts. Unfortunately, that will tend to undercompensate for the bias when applied to high degree vertices and overcompensate for it when applied to low 2This type of approach is considered in [23]. 6 degree vertices. So, we modify the algorithm that counts the difference between the number of r-nonbacktracking walks leading to vertices in the two sets to subtract off the average at every step in order to prevent a major bias from building up. One of the features of our approach is that it extends fairly naturally to the general SBM. Despite the potential presence of more than 2 communities, we still only assign one value to each vertex, and output a partition of the graph’s vertices into two sets in the expectation that different communities will have different fractions of their vertices in the second set. One complication is that the method of preventing the results from being biased towards one comunity does not work as well in the general case. The problem is, by only assigning one value to each vertex, we compress our beliefs onto one dimension. That means that the algorithm cannot detect biases orthogonal to that dimension, and thus cannot subtract them off. So, we cancel out the bias by subtracting multiples of the counts of the numbers of r-nonbacktracking walks of some shorter length that will also have been affected by it. More concretely, we assign each vertex an initial value, xv, at random. Then, we compute a matrix Y such that for each v ∈G and 0 ≤t ≤m, Yv,t is the sum over all r-nonbacktracking walks of length t ending at v of the initial values associated with their starting vertices. Next, for each v we compute a weighted sum of Yv,1, Yv,2, ..., Yv,m where the weighting is such that any biases in the entries of Y resulting from the initial values should mostly cancel out. We then use these to classify the vertices. Proof outline for Theorem 1. If we were going to prove that ABP∗worked, we would probably define Wr[S]((v0, ..., vm)) to be 1 if for every consecutive subsequence (i1, . . . , im′) ⊆ S, we have that vi1−1, ..., vim′ is a r-nonbacktracking walk, and 0 otherwise. Next, define Wr((v0, ..., vm)) = P S⊆(1,...,m)(−2|E(G)|)−|S|Wr[S]((v0, ..., vm)) and Wm(x, v) = P v0,...,vm∈G:vm=v xv0Wr((v0, ..., vm)), and we would have that y′ v = Wm(x, v) for x and y′ as in ABP ∗. As explained above, we rely on a different approach to cope with the general SBM. In order to prove that the algorithm works, we make the following definitions. Definition 6. For any r ≥1 and series of vertices v0, ..., vm, let Wr((v0, ..., vm)) be 1 if v0, ..., vm is an r-nonbacktracking walk and 0 otherwise. Also, for any r ≥1, series of vertices v0, ..., vm and c0, ..., cm ∈Rm+1, let W(c0,...,cm)[r]((v0, ..., vm)) = X (i0,...,im′)∈(0,...,m) Y i̸∈(i0,...,im′) (−ci/n) Wr((vi0, vi1, ..., vim′ )). In other words, W(c0,...,cm)[r]((v0, ..., vm)) is the sum over all subsequences of (v0, ..., vm) that form r-nonbacktracking walks of the products of the negatives of the ci/n corresponding to the elements of (v0, ..., vm) that are not in the walks. Finally, let Wm/{ci}(x, v) = X v0,...,vm∈G:vm=v xv0W(c0,...,cm)[r]((v0, ..., vm)). The reason these definitions are important is that for each v and t, we have that Yv,t = X v0,...,vt∈G:vt=v xv0Wr((v0, ..., vt)) and y(m) v is equal to Wm/{ci}(x, v) for suitable (c0, ..., cm). For the full ABP algorithm, both terms in the above equality refer to G as it is after some of its edges are removed at random in the ‘graph splitting’ step (which explains the presence of 1 −γ factors in [19]). One can easily prove that if v0, ..., vt are distinct, σv0 = i and σvt = j, then E[W(c0,...,ct)[r]((v0, ..., vt))] = ei · P −1(PQ)tej/nt, and most of the rest of the proof centers around showing that W(c0,...,cm)[r]((v0, ..., vm)) such that v0, ..., vm are not all distinct do not contribute enough to the sums to matter. That starts with a bound on |E[W(c0,...,cm)[r]((v0, ..., vm))]| whenever there is no i, j ̸= j′ such that vj = vj′, |i−j| ≤r, and ci ̸= 0; and continues with an explanation of how to re-express any W(c0,...,cm)[r]((v0, ..., vm)) as a linear combination of expressions of the form W(c′ 0,...,c′ m′)[r]((v′ 0, ..., v′ m′)) which have this property. 7 Then we use these to prove that for suitable (c0, ..., cm), the sum of |E[W(c0,...,cm)[r]((v0, ..., vm))]| for all sufficiently repetitive (v0, ..., vm) is sufficiently small. Next, we observe that W(c0,...,cm)[r]((v0, ..., vm))W(c′′ 0 ,...,c′′ m)[r]((v′′ 0, ..., v′′ m)) = W(c0,...,cm,0,...,0,c′′ m,...,c′′ 0 )[r]((v0, ..., vm, u1, ..., ur, v′′ n, ...v′′ 0)) if u1, ..., ur are new vertices that are connected to all other vertices, and use that fact to translate bounds on expected values to bounds on variances. That allows us to show that if m and (c0, ..., cm) have the appropriate properties and w is an eigenvector of PQ with eigenvalue λj and magnitude 1, then with high probability | X v∈V (G) wσv/pσvWm/{ci}(x, v)| = O(√n Y 0≤i≤m |λj −ci| + √n log(n) Y 0≤i≤m |λs −ci|) and | X v∈V (G) wσv/pσvWm/{ci}(x, v)| = Ω(√n Y 0≤i≤m |λj −ci|). We also show that under appropriate conditions Var[Wm/{ci}(x, v)] = O((1/n) Q 0≤i≤m(λs−ci)2). Together, these facts would allow us to prove that the differences between the average values of Wm/{ci}(x, v) in different communities are large enough relative to the variance of Wm/{ci}(x, v) to let us detect communities, except for one complication. Namely, these bounds are not quite good enough to rule out the possibility that there is a constant probability scenario in which the empirical variance of {Wm/{ci}(x, v)} is large enough to disrupt our efforts at using Wm/{ci}(x, v) for detection. Although we do not expect this to actually happen, we rely on the graph splitting step described in Section 3.3 to discard this potential scenario. 5 Conclusions and extensions This algorithm is intended to classify vertices with an accuracy nontrivially better than that attained by guessing randomly, but it is not hard to convert this to an algorithm that classifies vertices with optimal accuracy. Once one has reasonable initial guesses of which communities the vertices are in, one can simply run full belief propagation on these guesses. This requires bridging the gap from dividing the vertices into two sets that are correlated with their communities in an unknown way, and assigning each vertex a nontrivial probability distribution for how likely it is to be in each community. One way to do this is to divide G’s vertices into those that have positive and negative values of y′, and divide its directed edges into those that have positive and negative values of y(m). We would generally expect that edges from vertices in different communities will have different probabilities of corresponding to positive values of y(m). Now, let d′ be the largest integer such that at least √n of the vertices have degree at least d′, let S be the set of vertices with degree exactly d′, and for each v ∈S, let ξv = |{v′ : (v, v′) ∈E(G), y′ (v,v′) > 0}|. We would expect that for any given community i, the probability distribution of ξv for v ∈Ωi would be essentially a binomial distribution with parameters d′ and some unknown probability. So, compute probabilities such that the observed distribution of values of ξv approximately matches the appropriate weighted sum of k binomial distributions. Next, go through all identifications of the communities with these binomial distributions that are consistent with the community sizes and determine which one most accurately predicts the connectivity rates between vertices that have each possible value of ξ when the edge in question is ignored, and treat this as the mapping of communities to binomial distributions. Then, for each adjacent v and v′, determine the probability distribution of what community v is in based on the signs of y′ (v′′,v) for all v′′ ̸= v′. Finally, use these as the starting probabilities for BP with a depth of ln(n)/3 ln(λ1). Acknowledgments This research was supported by NSF CAREER Award CCF-1552131 and ARO grant W911NF-16-10051. 8 References [1] P. W. Holland, K. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109–137, 1983. [2] Peter J. Bickel and Aiyou Chen. A nonparametric view of network models and Newman-Girvan and other modularities. Proceedings of the National Academy of Sciences, 106(50):21068–21073, 2009. [3] B. Karrer and M. E. J. Newman. Stochastic blockmodels and community structure in networks. Phys. Rev. E, 83:016107, Jan 2011. [4] C. Gao, Z. Ma, A. Y. Zhang, and H. H. Zhou. Achieving Optimal Misclassification Proportion in Stochastic Block Model. ArXiv e-prints, May 2015. [5] T.N. Bui, S. Chaudhuri, F.T. Leighton, and M. Sipser. Graph bisection algorithms with good average case behavior. Combinatorica, 7(2):171–191, 1987. [6] R.B. Boppana. Eigenvalues and graph bisection: An average-case analysis. In 28th Annual Symposium on Foundations of Computer Science, pages 280–285, 1987. [7] F. McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537, 2001. [8] Béla Bollobás, Svante Janson, and Oliver Riordan. The phase transition in inhomogeneous random graphs. Random Struct. Algorithms, 31(1):3–122, August 2007. [9] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Phys. Rev. E, 84:066106, December 2011. [10] Elchanan Mossel, Joe Neeman, and Allan Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, 162(3):431–461, 2015. [11] A. Coja-Oghlan. Graph partitioning via adaptive spectral techniques. Comb. Probab. Comput., 19(2):227– 284, March 2010. [12] V. Vu. A simple svd algorithm for finding hidden partitions. ArXiv:1404.3918, April 2014. [13] Olivier Guédon and Roman Vershynin. Community detection in sparse networks via grothendieck’s inequality. Probability Theory and Related Fields, 165(3):1025–1049, 2016. [14] Andrea Montanari and Subhabrata Sen. Semidefinite programs on sparse random graphs and their application to community detection. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, pages 814–827, New York, NY, USA, 2016. ACM. [15] L. Massoulié. Community detection thresholds and the weak Ramanujan property. In STOC 2014: 46th Annual Symposium on the Theory of Computing, pages 1–10, New York, United States, June 2014. [16] E. Mossel, J. Neeman, and A. Sly. A proof of the block model threshold conjecture. Available online at arXiv:1311.4115 [math.PR], January 2014. [17] Charles Bordenave, Marc Lelarge, and Laurent Massoulie. Non-backtracking spectrum of random graphs: Community detection and non-regular ramanujan graphs. In FOCS ’15, pages 1347–1357, Washington, DC, USA, 2015. IEEE Computer Society. [18] Kevin P. Murphy, Yair Weiss, and Michael I. Jordan. Loopy belief propagation for approximate inference: An empirical study. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence, UAI’99, pages 467–475, San Francisco, CA, USA, 1999. Morgan Kaufmann Publishers Inc. [19] E. Abbe and C. Sandon. Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic BP, and the information-computation gap. ArXiv:1512.09080, Dec. 2015. [20] J. Banks and C. Moore. Information-theoretic thresholds for community detection in sparse networks. ArXiv:1601.02658, January 2016. [21] David L. Donoho, Arian Maleki, and Andrea Montanari. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, 106(45):18914–18919, 2009. [22] Florent Krzakala, Cristopher Moore, Elchanan Mossel, Joe Neeman, Allan Sly, Lenka Zdeborova, and Pan Zhang. Spectral redemption in clustering sparse networks. Proceedings of the National Academy of Sciences, 110(52):20935–20940, 2013. [23] S. Bhattacharyya and P. J. Bickel. Community Detection in Networks using Graph Distance. ArXiv:1401.3915, January 2014. 9 | 2016 | 246 |
6,157 | A Unified Approach for Learning the Parameters of Sum-Product Networks Han Zhao Machine Learning Dept. Carnegie Mellon University han.zhao@cs.cmu.edu Pascal Poupart School of Computer Science University of Waterloo ppoupart@uwaterloo.ca Geoff Gordon Machine Learning Dept. Carnegie Mellon University ggordon@cs.cmu.edu Abstract We present a unified approach for learning the parameters of Sum-Product networks (SPNs). We prove that any complete and decomposable SPN is equivalent to a mixture of trees where each tree corresponds to a product of univariate distributions. Based on the mixture model perspective, we characterize the objective function when learning SPNs based on the maximum likelihood estimation (MLE) principle and show that the optimization problem can be formulated as a signomial program. We construct two parameter learning algorithms for SPNs by using sequential monomial approximations (SMA) and the concave-convex procedure (CCCP), respectively. The two proposed methods naturally admit multiplicative updates, hence effectively avoiding the projection operation. With the help of the unified framework, we also show that, in the case of SPNs, CCCP leads to the same algorithm as Expectation Maximization (EM) despite the fact that they are different in general. 1 Introduction Sum-product networks (SPNs) are new deep graphical model architectures that admit exact probabilistic inference in linear time in the size of the network [14]. Similar to traditional graphical models, there are two main problems when learning SPNs: structure learning and parameter learning. Parameter learning is interesting even if we know the ground truth structure ahead of time; structure learning depends on parameter learning , so better parameter learning can often lead to better structure learning. Poon and Domingos [14] and Gens and Domingos [6] proposed both generative and discriminative learning algorithms for parameters in SPNs. At a high level, these approaches view SPNs as deep architectures and apply projected gradient descent (PGD) to optimize the data log-likelihood. There are several drawbacks associated with PGD. For example, the projection step in PGD hurts the convergence of the algorithm and it will often lead to solutions on the boundary of the feasible region. Also, PGD contains an additional arbitrary parameter, the projection margin, which can be hard to set well in practice. In [14, 6], the authors also mentioned the possibility of applying EM algorithms to train SPNs by viewing sum nodes in SPNs as hidden variables. They presented an EM update formula without details. However, the update formula for EM given in [14, 6] is incorrect, as first pointed out and corrected by [12]. In this paper we take a different perspective and present a unified framework, which treats [14, 6] as special cases, for learning the parameters of SPNs. We prove that any complete and decomposable SPN is equivalent to a mixture of trees where each tree corresponds to a product of univariate distributions. Based on the mixture model perspective, we can precisely characterize the functional form of the objective function based on the network structure. We show that the optimization problem associated with learning the parameters of SPNs based on the MLE principle can be formulated as a signomial program (SP), where both PGD and exponentiated gradient (EG) can be viewed as first order approximations of the signomial program after suitable transformations of the objective 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. function. We also show that the signomial program formulation can be equivalently transformed into a difference of convex functions (DCP) formulation, where the objective function of the program can be naturally expressed as a difference of two convex functions. The DCP formulation allows us to develop two efficient optimization algorithms for learning the parameters of SPNs based on sequential monomial approximations (SMA) and the concave-convex procedure (CCCP), respectively. Both proposed approaches naturally admit multiplicative updates, hence effectively deal with the positivity constraints of the optimization. Furthermore, under our unified framework, we also show that CCCP leads to the same algorithm as EM despite that these two approaches are different from each other in general. Although we mainly focus on MLE based parameter learning, the mixture model interpretation of SPN also helps to develop a Bayesian learning method for SPNs [21]. PGD, EG, SMA and CCCP can all be viewed as different levels of convex relaxation of the original SP. Hence the framework also provides an intuitive way to compare all four approaches. We conduct extensive experiments on 20 benchmark data sets to compare the empirical performance of PGD, EG, SMA and CCCP. Experimental results validate our theoretical analysis that CCCP is the best among all 4 approaches, showing that it converges consistently faster and with more stability than the other three methods. Furthermore, we use CCCP to boost the performance of LearnSPN [7], showing that it can achieve results comparable to state-of-the-art structure learning algorithms using SPNs with much smaller network sizes. 2 Background 2.1 Sum-Product Networks To simplify the discussion of the main idea of our unified framework, we focus our attention on SPNs over Boolean random variables. However, the framework presented here is general and can be easily extended to other discrete and continuous random variables. We first define the notion of network polynomial. We use Ix to denote an indicator variable that returns 1 when X = x and 0 otherwise. Definition 1 (Network Polynomial [4]). Let f(·) ≥0 be an unnormalized probability distribution over a Boolean random vector X1:N. The network polynomial of f(·) is a multilinear function P x f(x) QN n=1 Ixn of indicator variables, where the summation is over all possible instantiations of the Boolean random vector X1:N. A Sum-Product Network (SPN) over Boolean variables X1:N is a rooted DAG that computes the network polynomial over X1:N. The leaves are univariate indicators of Boolean variables and internal nodes are either sum or product. Each sum node computes a weighted sum of its children and each product node computes the product of its children. The scope of a node in an SPN is defined as the set of variables that have indicators among the node’s descendants. For any node v in an SPN, if v is a terminal node, say, an indicator variable over X, then scope(v) = {X}, else scope(v) = S ˜v2Ch(v) scope(˜v). An SPN is complete iff each sum node has children with the same scope. An SPN is decomposable iff for every product node v, scope(vi) T scope(vj) = ? where vi, vj 2 Ch(v), i 6= j. The scope of the root node is {X1, . . . , XN}. In this paper, we focus on complete and decomposable SPNs. For a complete and decomposable SPN S, each node v in S defines a network polynomial fv(·) which corresponds to the sub-SPN (subgraph) rooted at v. The network polynomial of S, denoted by fS, is the network polynomial defined by the root of S, which can be computed recursively from its children. The probability distribution induced by an SPN S is defined as PrS(x) , fS(x) P x fS(x). The normalization constant P x fS(x) can be computed in O(|S|) in SPNs by setting the values of all the leaf nodes to be 1, i.e., P x fS(x) = fS(1) [14]. This leads to efficient joint/marginal/conditional inference in SPNs. 2.2 Signomial Programming (SP) Before introducing SP, we first introduce geometric programming (GP), which is a strict subclass of SP. A monomial is defined as a function h : Rn ++ 7! R: h(x) = dxa1 1 xa2 2 · · · xan n , where the domain is restricted to be the positive orthant (Rn ++), the coefficient d is positive and the exponents ai 2 R, 8i. A posynomial is a sum of monomials: g(x) = PK k=1 dkxa1k 1 xa2k 2 · · · xank n . One of the key properties of posynomials is positivity, which allows us to transform any posynomial into the log 2 domain. A GP in standard form is defined to be an optimization problem where both the objective function and the inequality constraints are posynomials and the equality constraints are monomials. There is also an implicit constraint that x 2 Rn ++. A GP in its standard form is not a convex program since posynomials are not convex functions in general. However, we can effectively transform it into a convex problem by using the logarithmic transformation trick on x, the multiplicative coefficients of each monomial and also each objective/constraint function [3, 1]. An SP has the same form as GP except that the multiplicative constant d inside each monomial is not restricted to be positive, i.e., d can take any real value. Although the difference seems to be small, there is a huge difference between GP and SP from the computational perspective. The negative multiplicative constant in monomials invalidates the logarithmic transformation trick frequently used in GP. As a result, SPs cannot be reduced to convex programs and are believed to be hard to solve in general [1]. 3 Unified Approach for Learning In this section we will show that the parameter learning problem of SPNs based on the MLE principle can be formulated as an SP. We will use a sequence of optimal monomial approximations combined with backtracking line search and the concave-convex procedure to tackle the SP. Due to space constraints, we refer interested readers to the supplementary material for all the proof details. 3.1 Sum-Product Networks as a Mixture of Trees We introduce the notion of induced trees from SPNs and use it to show that every complete and decomposable SPN can be interpreted as a mixture of induced trees, where each induced tree corresponds to a product of univariate distributions. From this perspective, an SPN can be understood as a huge mixture model where the effective number of components in the mixture is determined by its network structure. The method we describe here is not the first method for interpreting an SPN (or the related arithmetic circuit) as a mixture distribution [20, 5, 2]; but, the new method can result in an exponentially smaller mixture, see the end of this section for more details. Definition 2 (Induced SPN). Given a complete and decomposable SPN S over X1:N, let T = (TV , TE) be a subgraph of S. T is called an induced SPN from S if 1. Root(S) 2 TV . 2. If v 2 TV is a sum node, then exactly one child of v in S is in TV , and the corresponding edge is in TE. 3. If v 2 TV is a product node, then all the children of v in S are in TV , and the corresponding edges are in TE. Theorem 1. If T is an induced SPN from a complete and decomposable SPN S, then T is a tree that is complete and decomposable. As a result of Thm. 1, we will use the terms induced SPNs and induced trees interchangeably. With some abuse of notation, we use T (x) to mean the value of the network polynomial of T with input vector x. Theorem 2. If T is an induced tree from S over X1:N, then T (x) = Q (vi,vj)2TE wij QN n=1 Ixn, where wij is the edge weight of (vi, vj) if vi is a sum node and wij = 1 if vi is a product node. Remark. Although we focus our attention on Boolean random variables for the simplicity of discussion and illustration, Thm. 2 can be extended to the case where the univariate distributions at the leaf nodes are continuous or discrete distributions with countably infinitely many values, e.g., Gaussian distributions or Poisson distributions. We can simply replace the product of univariate distributions term, QN n=1 Ixn, in Thm. 2 to be the general form QN n=1 pn(Xn), where pn(Xn) is a univariate distribution over Xn. Also note that it is possible for two unique induced trees to share the same product of univariate distributions, but in this case their weight terms Q (vi,vi)2TE wij are guaranteed to be different. As we will see shortly, Thm. 2 implies that the joint distribution over {Xn}N n=1 represented by an SPN is essentially a mixture model with potentially exponentially many components in the mixture. 3 Definition 3 (Network cardinality). The network cardinality ⌧S of an SPN S is the number of unique induced trees. Theorem 3. ⌧S = fS(1|1), where fS(1|1) is the value of the network polynomial of S with input vector 1 and all edge weights set to be 1. Theorem 4. S(x) = P⌧S t=1 Tt(x), where Tt is the tth unique induced tree of S. Remark. The above four theorems prove the fact that an SPN S is an ensemble or mixture of trees, where each tree computes an unnormalized distribution over X1:N. The total number of unique trees in S is the network cardinality ⌧S, which only depends on the structure of S. Each component is a simple product of univariate distributions. We illustrate the theorems above with a simple example in Fig. 1. + ⇥ ⇥ ⇥ X1 X1 X2 X2 w1 w2 w3 = w1 + ⇥ X1 X2 +w2 + ⇥ X1 X2 +w3 + ⇥ X1 X2 Figure 1: A complete and decomposable SPN is a mixture of induced trees. Double circles indicate univariate distributions over X1 and X2. Different colors are used to highlight unique induced trees; each induced tree is a product of univariate distributions over X1 and X2. Zhao et al. [20] show that every complete and decomposable SPN is equivalent to a bipartite Bayesian network with a layer of hidden variables and a layer of observable random variables. The number of hidden variables in the bipartite Bayesian network is equal to the number of sum nodes in S. A naive expansion of such Bayesian network to a mixture model will lead to a huge mixture model with 2O(M) components, where M is the number of sum nodes in S. Here we complement their theory and show that each complete and decomposable SPN is essentially a mixture of trees and the effective number of unique induced trees is given by ⌧S. Note that ⌧S = fS(1|1) depends only on the network structure, and can often be much smaller than 2O(M). Without loss of generality, assuming that in S layers of sum nodes are alternating with layers of product nodes, then fS(1|1) = ⌦(2h), where h is the height of S. However, the exponentially many trees are recursively merged and combined in S such that the overall network size is still tractable. 3.2 Maximum Likelihood Estimation as SP Let’s consider the likelihood function computed by an SPN S over N binary random variables with model parameters w and input vector x 2 {0, 1}N. Here the model parameters in S are edge weights from every sum node, and we collect them together into a long vector w 2 RD ++, where D corresponds to the number of edges emanating from sum nodes in S. By definition, the probability distribution induced by S can be computed by PrS(x|w) , fS(x|w) P x fS(x|w) = fS(x|w) fS(1|w). Corollary 5. Let S be an SPN with weights w 2 RD ++ over input vector x 2 {0, 1}N, the network polynomial fS(x|w) is a posynomial: fS(x|w) = PfS(1|1) t=1 QN n=1 I(t) xn QD d=1 w Iwd2Tt d , where Iwd2Tt is the indicator variable whether wd is in the t-th induced tree Tt or not. Each monomial corresponds exactly to a unique induced tree SPN from S. The above statement is a direct corollary of Thm. 2, Thm. 3 and Thm. 4. From the definition of network polynomial, we know that fS is a multilinear function of the indicator variables. Corollary 5 works as a complement to characterize the functional form of a network polynomial in terms of w. It follows that the likelihood function LS(w) , PrS(x|w) can be expressed as the ratio of two posynomial functions. We now show that the optimization problem based on MLE is an SP. Using the definition of Pr(x|w) and Corollary 5, let ⌧= fS(1|1), the MLE problem can be rewritten as maximizew fS(x|w) fS(1|w) = P⌧ t=1 QN n=1 I(t) xn QD d=1 w Iwd2Tt d P⌧ t=1 QD d=1 w Iwd2Tt d subject to w 2 RD ++ (1) 4 Proposition 6. The MLE problem for SPNs is a signomial program. Being nonconvex in general, SP is essentially hard to solve from a computational perspective [1, 3]. However, despite the hardness of SP in general, the objective function in the MLE formulation of SPNs has a special structure, i.e., it is the ratio of two posynomials, which makes the design of efficient optimization algorithms possible. 3.3 Difference of Convex Functions Both PGD and EG are first-order methods and they can be viewed as approximating the SP after applying a logarithmic transformation to the objective function only. Although (1) is a signomial program, its objective function is expressed as the ratio of two posynomials. Hence, we can still apply the logarithmic transformation trick used in geometric programming to its objective function and to the variables to be optimized. More concretely, let wd = exp(yd), 8d and take the log of the objective function; it becomes equivalent to maximize the following new objective without any constraint on y: maximize log 0 @ ⌧(x) X t=1 exp D X d=1 ydIyd2Tt !1 A −log ⌧ X t=1 exp D X d=1 ydIyd2Tt !! (2) Note that in the first term of Eq. 2 the upper index ⌧(x) ⌧, fS(1|1) depends on the current input x. By transforming into the log-space, we naturally guarantee the positivity of the solution at each iteration, hence transforming a constrained optimization problem into an unconstrained optimization problem without any sacrifice. Both terms in Eq. 2 are convex functions in y after the transformation. Hence, the transformed objective function is now expressed as the difference of two convex functions, which is called a DC function [9]. This helps us to design two efficient algorithms to solve the problem based on the general idea of sequential convex approximations for nonlinear programming. 3.3.1 Sequential Monomial Approximation Let’s consider the linearization of both terms in Eq. 2 in order to apply first-order methods in the transformed space. To compute the gradient with respect to different components of y, we view each node of an SPN as an intermediate function of the network polynomial and apply the chain rule to back-propagate the gradient. The differentiation of fS(x|w) with respect to the root node of the network is set to be 1. The differentiation of the network polynomial with respect to a partial function at each node can then be computed in two passes of the network: the bottom-up pass evaluates the values of all partial functions given the current input x and the top-down pass differentiates the network polynomial with respect to each partial function. Following the evaluation-differentiation passes, the gradient of the objective function in (2) can be computed in O(|S|). Furthermore, although the computation is conducted in y, the results are fully expressed in terms of w, which suggests that in practice we do not need to explicitly construct y from w. Let f(y) = log fS(x|exp(y)) −log fS(1|exp(y)). It follows that approximating f(y) with the best linear function is equivalent to using the best monomial approximation of the signomial program (1). This leads to a sequential monomial approximations of the original SP formulation: at each iteration y(k), we linearize both terms in Eq. 2 and form the optimal monomial function in terms of w(k). The additive update of y(k) leads to a multiplicative update of w(k) since w(k) = exp(y(k)), and we use a backtracking line search to determine the step size of the update in each iteration. 3.3.2 Concave-convex Procedure Sequential monomial approximation fails to use the structure of the problem when learning SPNs. Here we propose another approach based on the concave-convex procedure (CCCP) [18] to use the fact that the objective function is expressed as the difference of two convex functions. At a high level CCCP solves a sequence of concave surrogate optimizations until convergence. In many cases, the maximum of a concave surrogate function can only be solved using other convex solvers and as a result the efficiency of the CCCP highly depends on the choice of the convex solvers. However, we show that by a suitable transformation of the network we can compute the maximum of the concave surrogate in closed form in time that is linear in the network size, which leads to a very efficient 5 algorithm for learning the parameters of SPNs. We also prove the convergence properties of our algorithm. Consider the objective function to be maximized in DCP: f(y) = log fS(x| exp(y)) − log fS(1| exp(y)) , f1(y) + f2(y) where f1(y) , log fS(x| exp(y)) is a convex function and f2(y) , −log fS(1| exp(y)) is a concave function. We can linearize only the convex part f1(y) to obtain a surrogate function ˆf(y, z) = f1(z) + rzf1(z)T (y −z) + f2(y) (3) for 8y, z 2 RD. Now ˆf(y, z) is a concave function in y. Due to the convexity of f1(y) we have f1(y) ≥f1(z) + rzf1(z)T (y −z), 8y, z and as a result the following two properties always hold for 8y, z: ˆf(y, z) f(y) and ˆf(y, y) = f(y). CCCP updates y at each iteration k by solving y(k) 2 arg maxy ˆf(y, y(k−1)) unless we already have y(k−1) 2 arg maxy ˆf(y, y(k−1)), in which case a generalized fixed point y(k−1) has been found and the algorithm stops. It is easy to show that at each iteration of CCCP we always have f(y(k)) ≥f(y(k−1)). Note also that f(y) is computing the log-likelihood of input x and therefore it is bounded above by 0. By the monotone convergence theorem, limk!1 f(y(k)) exists and the sequence {f(y(k))} converges. We now discuss how to compute a closed form solution for the maximization of the concave surrogate ˆf(y, y(k−1)). Since ˆf(y, y(k−1)) is differentiable and concave for any fixed y(k−1), a sufficient and necessary condition to find its maximum is ry ˆf(y, y(k−1)) = ry(k−1)f1(y(k−1)) + ryf2(y) = 0 (4) In the above equation, if we consider only the partial derivative with respect to yij(wij), we obtain w(k−1) ij fvj(x|w(k−1)) fS(x|w(k−1)) @fS(x|w(k−1)) @fvi(x|w(k−1)) = wijfvj(1|w) fS(1|w) @fS(1|w) @fvi(1|w) (5) Eq. 5 leads to a system of D nonlinear equations, which is hard to solve in closed form. However, if we do a change of variable by considering locally normalized weights w0 ij (i.e., w0 ij ≥0 and P j w0 ij = 1 8i), then a solution can be easily computed. As described in [13, 20], any SPN can be transformed into an equivalent normal SPN with locally normalized weights in a bottom up pass as follows: w0 ij = wijfvj(1|w) P j wijfvj(1|w) (6) We can then replace wijfvj(1|w) in the above equation by the expression it is equal to in Eq. 5 to obtain a closed form solution: w0 ij / w(k−1) ij fvj(x|w(k−1)) fS(x|w(k−1)) @fS(x|w(k−1)) @fvi(x|w(k−1)) (7) Note that in the above derivation both fvi(1|w)/fS(1|w) and @fS(1|w)/@fvi(1|w) can be treated as constants and hence absorbed since w0 ij, 8j are constrained to be locally normalized. In order to obtain a solution to Eq. 5, for each edge weight wij, the sufficient statistics include only three terms, i.e, the evaluation value at vj, the differentiation value at vi and the previous edge weight w(k−1) ij , all of which can be obtained in two passes of the network for each input x. Thus the computational complexity to obtain a maximum of the concave surrogate is O(|S|). Interestingly, Eq. 7 leads to the same update formula as in the EM algorithm [12] despite the fact that CCCP and EM start from different perspectives. We show that all the limit points of the sequence {w(k)}1 k=1 are guaranteed to be stationary points of DCP in (2). Theorem 7. Let {w(k)}1 k=1 be any sequence generated using Eq. 7 from any positive initial point, then all the limiting points of {w(k)}1 k=1 are stationary points of the DCP in (2). In addition, limk!1 f(y(k)) = f(y⇤), where y⇤is some stationary point of (2). We summarize all four algorithms and highlight their connections and differences in Table 1. Although we mainly discuss the batch version of those algorithms, all of the four algorithms can be easily adapted to work in stochastic and/or parallel settings. 6 Table 1: Summary of PGD, EG, SMA and CCCP. Var. means the optimization variables. Algo Var. Update Type Update Formula PGD w Additive w(k+1) d PR✏ ++ n w(k) d + γ(rwdf1(w(k)) −rwdf2(w(k))) o EG w Multiplicative w(k+1) d w(k) d exp{γ(rwdf1(w(k)) −rwdf2(w(k)))} SMA log w Multiplicative w(k+1) d w(k) d exp{γw(k) d ⇥(rwdf1(w(k)) −rwdf2(w(k)))} CCCP log w Multiplicative w(k+1) ij / w(k) ij ⇥rvifS(w(k)) ⇥fvj(w(k)) 4 Experiments 4.1 Experimental Setting We conduct experiments on 20 benchmark data sets from various domains to compare and evaluate the convergence performance of the four algorithms: PGD, EG, SMA and CCCP (EM). These 20 data sets are widely used in [7, 15] to assess different SPNs for the task of density estimation. All the features in the 20 data sets are binary features. All the SPNs that are used for comparisons of PGD, EG, SMA and CCCP are trained using LearnSPN [7]. We discard the weights returned by LearnSPN and use random weights as initial model parameters. The random weights are determined by the same random seed in all four algorithms. Detailed information about these 20 datasets and the SPNs used in the experiments are provided in the supplementary material. 4.2 Parameter Learning We implement all four algorithms in C++. For each algorithm, we set the maximum number of iterations to 50. If the absolute difference in the training log-likelihood at two consecutive steps is less than 0.001, the algorithms are stopped. For PGD, EG and SMA, we combine each of them with backtracking line search and use a weight shrinking coefficient set at 0.8. The learning rates are initialized to 1.0 for all three methods. For PGD, we set the projection margin ✏to 0.01. There is no learning rate and no backtracking line search in CCCP. We set the smoothing parameter to 0.001 in CCCP to avoid numerical issues. We show in Fig. 2 the average log-likelihood scores on 20 training data sets to evaluate the convergence speed and stability of PGD, EG, SMA and CCCP. Clearly, CCCP wins by a large margin over PGD, EG and SMA, both in convergence speed and solution quality. Furthermore, among the four algorithms, CCCP is the most stable one due to its guarantee that the log-likelihood (on training data) will not decrease after each iteration. As shown in Fig. 2, the training curves of CCCP are more smooth than the other three methods in almost all the cases. These 20 experiments also clearly show that CCCP often converges in a few iterations. On the other hand, PGD, EG and SMA are on par with each other since they are all first-order methods. SMA is more stable than PGD and EG and often achieves better solutions than PGD and EG. On large data sets, SMA also converges faster than PGD and EG. Surprisingly, EG performs worse than PGD in some cases and is quite unstable despite the fact that it admits multiplicative updates. The “hook shape” curves of PGD in some data sets, e.g. Kosarak and KDD, are due to the projection operations. Table 2: Average log-likelihoods on test data. Highest log-likelihoods are highlighted in bold. " shows statistically better log-likelihoods than CCCP and # shows statistically worse log-likelihoods than CCCP. The significance is measured based on the Wilcoxon signed-rank test. Data set CCCP LearnSPN ID-SPN Data set CCCP LearnSPN ID-SPN NLTCS -6.029 #-6.099 #-6.050 DNA -84.921 #-85.237 "-84.693 MSNBC -6.045 #-6.113 -6.048 Kosarak -10.880 #-11.057 -10.605 KDD 2k -2.134 #-2.233 #-2.153 MSWeb -9.970 #-10.269 -9.800 Plants -12.872 #-12.955 "-12.554 Book -35.009 #-36.247 "-34.436 Audio -40.020 #-40.510 -39.824 EachMovie -52.557 #-52.816 "-51.550 Jester -52.880 #-53.454 #-52.912 WebKB -157.492 #-158.542 "-153.293 Netflix -56.782 #-57.385 "-56.554 Reuters-52 -84.628 #-85.979 "-84.389 Accidents -27.700 #-29.907 "-27.232 20 Newsgrp -153.205 #-156.605 "-151.666 Retail -10.919 #-11.138 -10.945 BBC -248.602 #-249.794 #-252.602 Pumsb-star -24.229 #-24.577 "-22.552 Ad -27.202 #-27.409 #-40.012 7 Figure 2: Negative log-likelihood values versus number of iterations for PGD, EG, SMA and CCCP. The computational complexity per update is O(|S|) in all four algorithms. CCCP often takes less time than the other three algorithms because it takes fewer iterations to converge. We list detailed running time statistics for all four algorithms on the 20 data sets in the supplementary material. 4.3 Fine Tuning We combine CCCP as a “fine tuning” procedure with the structure learning algorithm LearnSPN and compare it to the state-of-the-art structure learning algorithm ID-SPN [15]. More concretely, we keep the model parameters learned from LearnSPN and use them to initialize CCCP. We then update the model parameters globally using CCCP as a fine tuning technique. This normally helps to obtain a better generative model since the original parameters are learned greedily and locally during the structure learning algorithm. We use the validation set log-likelihood score to avoid overfitting. The algorithm returns the set of parameters that achieve the best validation set log-likelihood score as output. Experimental results are reported in Table. 2. As shown in Table 2, the use of CCCP after LearnSPN always helps to improve the model performance. By optimizing model parameters on these 20 data sets, we boost LearnSPN to achieve better results than state-of-the-art ID-SPN on 7 data sets, where the original LearnSPN only outperforms ID-SPN on 1 data set. Note that the sizes of the SPNs returned by LearnSPN are much smaller than those produced by ID-SPN. Hence, it is remarkable that by fine tuning the parameters with CCCP, we can achieve better performance despite the fact that the models are smaller. For a fair comparison, we also list the size of the SPNs returned by ID-SPN in the supplementary material. 5 Conclusion We show that the network polynomial of an SPN is a posynomial function of the model parameters, and that parameter learning yields a signomial program. We propose two convex relaxations to solve the SP. We analyze the convergence properties of CCCP for learning SPNs. Extensive experiments are conducted to evaluate the proposed approaches and current methods. We also recommend combining CCCP with structure learning algorithms to boost the modeling accuracy. Acknowledgments HZ and GG gratefully acknowledge support from ONR contract N000141512365. HZ also thanks Ryan Tibshirani for the helpful discussion about CCCP. 8 References [1] S. Boyd, S.-J. Kim, L. Vandenberghe, and A. Hassibi. A tutorial on geometric programming. Optimization and Engineering, 8(1):67–127, 2007. [2] H. Chan and A. Darwiche. On the robustness of most probable explanations. In In Proceedings of the Twenty Second Conference on Uncertainty in Artificial Intelligence. [3] M. Chiang. Geometric programming for communication systems. Now Publishers Inc, 2005. [4] A. Darwiche. A differential approach to inference in Bayesian networks. Journal of the ACM (JACM), 50(3):280–305, 2003. [5] A. Dennis and D. Ventura. Greedy structure search for sum-product networks. In International Joint Conference on Artificial Intelligence, volume 24, 2015. [6] R. Gens and P. Domingos. Discriminative learning of sum-product networks. In Advances in Neural Information Processing Systems, pages 3248–3256, 2012. [7] R. Gens and P. Domingos. Learning the structure of sum-product networks. In Proceedings of The 30th International Conference on Machine Learning, pages 873–880, 2013. [8] A. Gunawardana and W. Byrne. Convergence theorems for generalized alternating minimization procedures. The Journal of Machine Learning Research, 6:2049–2073, 2005. [9] P. Hartman et al. On functions representable as a difference of convex functions. Pacific J. Math, 9(3):707–713, 1959. [10] J. Kivinen and M. K. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–63, 1997. [11] G. R. Lanckriet and B. K. Sriperumbudur. On the convergence of the concave-convex procedure. pages 1759–1767, 2009. [12] R. Peharz. Foundations of Sum-Product Networks for Probabilistic Modeling. PhD thesis, Graz University of Technology, 2015. [13] R. Peharz, S. Tschiatschek, F. Pernkopf, and P. Domingos. On theoretical properties of sumproduct networks. In AISTATS, 2015. [14] H. Poon and P. Domingos. Sum-product networks: A new deep architecture. In Proc. 12th Conf. on Uncertainty in Artificial Intelligence, pages 2551–2558, 2011. [15] A. Rooshenas and D. Lowd. Learning sum-product networks with direct and indirect variable interactions. In ICML, 2014. [16] R. Salakhutdinov, S. Roweis, and Z. Ghahramani. On the convergence of bound optimization algorithms. UAI, 2002. [17] C. J. Wu. On the convergence properties of the EM algorithm. The Annals of Statistics, pages 95–103, 1983. [18] A. L. Yuille, A. Rangarajan, and A. Yuille. The concave-convex procedure (CCCP). Advances in Neural Information Processing Systems, 2:1033–1040, 2002. [19] W. I. Zangwill. Nonlinear programming: a unified approach, volume 196. Prentice-Hall Englewood Cliffs, NJ, 1969. [20] H. Zhao, M. Melibari, and P. Poupart. On the Relationship between Sum-Product Networks and Bayesian Networks. In ICML, 2015. [21] H. Zhao, T. Adel, G. Gordon, and B. Amos. Collapsed variational inference for sum-product networks. In ICML, 2016. 9 | 2016 | 247 |
6,158 | The Multiscale Laplacian Graph Kernel Risi Kondor Department of Computer Science Department of Statistics University of Chicago Chicago, IL 60637 risi@cs.uchicago.edu Horace Pan Department of Computer Science University of Chicago Chicago, IL 60637 hopan@uchicago.edu Abstract Many real world graphs, such as the graphs of molecules, exhibit structure at multiple different scales, but most existing kernels between graphs are either purely local or purely global in character. In contrast, by building a hierarchy of nested subgraphs, the Multiscale Laplacian Graph kernels (MLG kernels) that we define in this paper can account for structure at a range of different scales. At the heart of the MLG construction is another new graph kernel, called the Feature Space Laplacian Graph kernel (FLG kernel), which has the property that it can lift a base kernel defined on the vertices of two graphs to a kernel between the graphs. The MLG kernel applies such FLG kernels to subgraphs recursively. To make the MLG kernel computationally feasible, we also introduce a randomized projection procedure, similar to the Nystr¨om method, but for RKHS operators. 1 Introduction There is a wide range of problems in applied machine learning from web data mining [1] to protein function prediction [2] where the input space is a space of graphs. A particularly important application domain is chemoinformatics, where the graphs capture the structure of molecules. In the pharmaceutical industry, for example, machine learning algorithms are regularly used to screen candidate drug compounds for safety and efficacy against specific diseases [3]. Because kernel methods neatly separate the issue of data representation from the statistical learning component, it is natural to formulate graph learning problems in the kernel paradigm. Starting with [4], a number of different graph kernels have appeared in the literature (for an overview, see [5]). In general, a graph kernel k(G1, G2) must satisfy the following requirements: 1. The kernel should capture the right notion of similarity between G1 and G2. For example, if G1 and G2 are social networks, then k might capture to what extent their clustering structure, degree distribution, etc. match. If, on the other hand, G1 and G2 are molecules, then we are probably more interested in what functional groups are present, and how they are arranged relative to each other. 2. The kernel is usually computed from the adjacency matrices A1 and A2 of the two graphs, but it must be invariant to the ordering of the vertices. In other words, writing the kernel explicitly in terms of A1 and A2, we must have k(A1, A2) = k(A1,PA2P ⊤) for any permutation matrix P. Permutation invariance has proved to be the central constraint around which much of the graph kernels literature is organized, effectively stipulating that graph kernels must be built out of graph invariants. Efficiently computable graph invariants offered by the mathematics literature tend to fall in one of two categories: 1. Local invariants, which can often be reduced to simply counting some local properties, such as the number of triangles, squares, etc. that appear in G as subgraphs. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2. Spectral invariants, which can be expressed as functions of the eigenvalues of the adjacency matrix or the graph Laplacian. Correspondingly, while different graph kernels are motivated in very different ways from random walks [4] through shortest paths [6, 7] to Fourier transforms on the symmetric group [8], most graph kernels in the literature ultimately reduce to computing a function of the two graphs that is either purely local or purely spectral. Any of the kernels based on the “subgraph counting” idea (e.g., [9]) are local. On the other hand, most of the random walk based kernels are reducible to a spectral form involving the eigenvalues of either the two graphs individually, or their Kronecker product [5] and therefore are really only sensitive to the large scale structure of graphs. In practice, it would be desirable to have a kernel that can take structure into account at multiple different scales. A kernel between molecules, for example, should not only be sensitive to the overall large-scale shape of the graphs (whether they are more like a chain, a ring, a chain that branches, etc.), but also to what smaller structures (e.g., functional groups) are present in the graphs, and how they are related to the global structure (e.g., whether a particular functional group is towards the middle or one of the ends of a chain). For the most part, such a multiscale graph kernel has been missing from the literature. Two notable exceptions are the Weisfeiler–Lehman kernel [10] and Propagation Kernel [11]. The WL kernel uses a combination of message passing and hashing to build summaries of the local neighborhoods of vertices at different scales. While shown to be effective, the Weisfeiler–Lehman kernel’s hashing step is somewhat ad-hoc; perturbing the edges by a small amount leads to completely different hash features. Similarly, the propagation kernel monitors how the distribution of node/edge labels spreads through the graph and then uses locality sensitivity hashing to efficiently bin the label distributions into feature vectors. Most recently, structure2vec[12] attempts to represent each graph with a latent variable model and then embeds them into a feature space, using the inner product as a kernel. This approach compares favorably to the standard kernel methods in both accuracy and computational efficiency. In this paper we present a new graph kernel, the Multiscale Laplacian Graph Kernel (MLG kernel), which, we believe, is the first kernel in the literature that can truly compare structure in graphs simultaneously at multiple different scales. We begin by introducing the Feature Space Laplacian Graph Kernel(FLG kernel) in Section 2. The FLG kernel operates at a single scale, while combining information from the nodes’s vertex features with topological information through its Laplacian. An important property of the FLG kernel is that it can work with vertex labels provided as a “base kernel” on the vertices, which allows us to apply the FLG kernel recursively. The MLG kernel, defined in Section 3, uses the FLG kernel’s recursive property to build a hierarchy of subgraph kernels that are sensitive to both the topological relationships between individual vertices, and between subgraphs of increasing sizes. Each kernel is defined in terms of the preceding kernel in the hierarchy. Efficient computability is a major concern in our paper, and recursively defined kernels on combinatorial data structures, can be very expensive. Therefore, in Section 4 we describe a strategy based on a combination of linearizing each level of the kernel (relative to a given dataset) and a randomized low rank projection step, which reduces every stage of the kernel computation to simple operations involving small matrices, leading to a very fast algorithm. Finally, section 5 presents experimental comparisons of our kernel with competing methods. 2 Laplacian Graph Kernels Let G be a weighted undirected graph with vertex set V = {v1, . . . , vn} and edge set E. Recall that the graph Laplacian of G is an n × n matrix LG, with LG i,j = −wi,j if {vi, vj} ∈E P j : {vi,vj}∈E wi,j if i = j 0 otherwise, where wi,j is the weight of edge {vi, vj}. The graph Laplacian is positive semi-definite, and in terms of the adjacency matrix A and the weighted degree matrix D it can be expressed as L = D −A. 2 Spectral graph theory tells us that the low eigenvalue eigenvectors of LG are informative about the overall shape of G. One way of seeing this is to note that for any vector z ∈Rn z⊤LG z = X {i,j}∈E wi,j(zi −zj)2, so the low eigenvalue eigenvectors are the smoothest functions on G, in the sense that they vary the least between adjacent vertices. An alternative interpretation emerges if we use G to construct a Gaussian graphical model (Markov Random Field or MRF) over n variables x1, . . . , xn with clique potentials φ(xi, xj) = e−wi,j(xi−xj)2/2 for each edge and ψ(xi) = e−ηx2 i /2 for each vertex. The joint distribution of x = (x1, . . . , xn)⊤is then p(x) ∝ Y {vi,vj}∈E e−wi,j(xi−xj)2/2 Y vi∈V e−ηx2 i /2 = e−x⊤(L+ηI)x/2, (1) showing that the covariance matrix of x is (LG + ηI)−1. Note that the ψ factors were added to ensure that the distribution is normalizable, and η is typically just a small constant “regularizer”: LG actually has a zero eigenvalue eigenvector (namely the constant vector n−1/2(1, 1, . . . , 1)⊤), so without adding ηI we would not be able to invert it. In the following we will call LG + ηI the regularized Laplacian, and denote it simply by L. Both the above views suggest that if we want define a kernel between graphs that is sensitive to their overall shape, comparing the low eigenvalue eigenvectors of their Laplacians is a good place to start. Previous work by [13] also used the graph Laplacian for constructing a similarity function on graphs. Following the MRF route, given two graphs G1 and G2 of n vertices, we can define the kernel between them to be a kernel between the corresponding distributions p1 = N(0, L−1 1 ) and p2 = N(0, L−1 2 ). Specifically, we will use the Bhattacharyya kernel [14] k(p1, p2) = Z p p1(x) p p2(x) dx, (2) because for Gaussian distributions it can be computed in closed form, giving k(p1, p2) = 1 2L1 + 1 2L2 −11/2 L−1 1 1/4 L−1 2 1/4 . If some of the eigenvalues of L−1 1 or L−1 2 are zero or very close to zero, along certain directions in space the two distributions in (2) become very flat, leading to vanishingly small kernel values (unless the “flat” directions of the two Gaussians are perfectly aligned). To remedy this problem, similarly to [15], we “soften” (or regularize) the kernel by adding some small constant γ times the identity to L−1 1 and L−1 2 . This leads to what we call the Laplacian Graph Kernel. Definition 1. Let G1 and G2 be two graphs with n vertices with (regularized) Laplacians L1 and L2, respectively. We define the Laplacian graph kernel (LG kernel) with parameter γ between G1 and G2 as kLG(G1, G2) = 1 2S−1 1 + 1 2S−1 2 −11/2 |S1|1/4 |S2|1/4 , (3) where S1 = L−1 1 +γI and S2 = L−1 2 +γI. By virtue of (2), the LG kernel is positive semi-definite, and because the value of the overlap integral is largely determined by the extent to which the subspaces spanned by the largest eigenvalue eigenvectors of L−1 1 and L−1 2 are aligned, it effectively captures similarity between the overall shapes of G1 and G2. However, the LG kernel does suffer from three major limitations: it assumes that both graphs have the same number of vertices, it is only sensitive to the overall structure of the two graphs, and it is not invariant to permuting the vertices. Our goal for the rest of this paper is to overcome each of these limitations, while retaining the LG kernel’s attractive spectral interpretation. 2.1 The feature space Laplacian graph kernel (FLG kernel) In the probabilistic view of the LG kernel, every graph generates random vectors x = (x1, . . . , xn)⊤ according to (1), and the kernel between two graphs is determined by comparing the corresponding 3 distributions. The invariance problem arises because the ordering of the variables x1, . . . , xn is arbitrary: even if G1 and G2 are topologically the same, kLG(G1, G2) might be low if their vertices happen to be numbered differently. One of the central ideas of this paper is to address this issue by transforming from the “vertex space variables” x1, . . . , xn to “feature space variables” y1, . . . , ym, where yi = P j ti,j(xj), and each ti,j function may only depend on j through local and reordering invariant properties of vertex vj. If we then compute an analogous kernel to the LG kernel, but now between the distributions of the y’s rather than the x’s, the resulting kernel will be permutation invariant. In the simplest case, the ti,j functions are linear, i.e., ti,j(xj) = φi(vj) · xj, where (φ1, . . . , φm) is a collection of m local (and permutation invariant) vertex features. For example, φi(vj) may be the degree of vertex vj, or the value of hβ(vj, vj), where h is the diffusion kernel on G with length scale parameter β (c.f., [16]). In the chemoinformatics setting, the φi’s might be some way of encoding what type of atom is located at vertex vj. The linear transform of a multivariate normal random variable is multivariate normal. In our case, defining Ui,j = φi(vj)i,j and y = Ux, we have E(y) = 0 and Cov(y, y) = U Cov(x, x)U ⊤= UL−1U ⊤, leading to the following kernel, which is the workhorse of the present paper. Definition 2. Let G1 and G2 be two graphs with regularized Laplacians L1 and L2, respectively, γ ≥ 0 a parameter, and (φ1, . . . , φm) a collection of m local vertex features. Define the corresponding feature mapping matrices [U1]i,j = φi(vj) [U2]i,j = φi(v′ j), where vj is the j’th vertex of G1 and v′ j is the j’th vertex of G2. The corresponding Feature space Laplacian graph kernel (FLG kernel) is defined kFLG(G1, G2) = 1 2S−1 1 + 1 2S−1 2 −11/2 |S1|1/4 |S2|1/4 , (4) where S1 = U1L−1 1 U ⊤ 1 +γI and S2 = U2L−1 2 U ⊤ 2 +γI. Since the φ1, . . . , φm vertex features, by definition, are local and invariant to vertex renumbering, the FLG kernel is permutation invariant. Moreover, the distributions now live in the space of features rather than the space defined by the vertices, so we can apply the kernel to two graphs with different numbers of vertices. The major remaining shortcoming of the FLG kernel is that it cannot take into account structure at multiple different scales. 2.2 The “kernelized” FLG kernel The key to boosting kFLG to a multiscale kernel is that it itself can be “kernelized”, i.e., it can be computed from just the inner products between the feature vectors of the vertices (which we call the base kernel) without having to know the actual φi(vj) features values. Definition 3. Given a collection φ = (φ1, . . . , φm)⊤of local vertex features, we define the corresponding base kernel κ between two vertices v and v′ as the dot product of their feature vectors: κ(v, v′) = φ(v)⊤φ(v′). Note that in this definition v and v′ may be two vertices of the same graph, or of two different graphs. We first show that, similarly to other kernel methods [17], to compute kFLG(G1, G2) one only needs to consider the subspace of Rm spanned by the feature vectors of their vertices. Proposition 1. Let G1 and G2 be two graphs with vertex sets V1 = {v1 . . . vn1} and V2 = {v′ 1 . . . v′ n2}, and let {ξ1, . . . , ξp} be an orthonormal basis for the subspace W = span φ(v1), . . . , φ(vn1), φ(v′ 1), . . . , φ(v′ n2) . dim(W) = p. Then, (4) can be rewritten as kFLG(G1, G2) = 1 2S −1 1 + 1 2S −1 2 −11/2 |S1|1/4 |S2|1/4 , (5) where [S1]i,j = ξ⊤ i S1ξj and [S2]i,j = ξ⊤ i S2ξj. In other words, S1 and S2 are the projections of S1 and S2 to W. 4 Similarly to kernel PCA [18] or the Bhattacharyya kernel [15], the easiest way to construct the basis {ξ1, . . . , ξp} required by (5) is to compute the eigendecomposition of the joint Gram matrix of the vertices of the two graphs. Proposition 2. Let G1 and G be as in Proposition 1, V = {v1, . . . , vn1+n2} be the union of their vertex sets (where it is assumed that the first n1 vertices are {v1, . . . , vn1} and the second n2 vertices are v′ 1, . . . , v′ n2 ), and define the joint Gram matrix K ∈R(n1+n2)×(n1+n2) as Ki,j = κ(vi, vj) = φ(vi)⊤φ(vj). Let u1, . . . , up be a maximal orthonormal set of the non-zero eigenvalue eigenvectors of K with corresponding eigenvalues. Then the vectors ξi = 1 √λi n1+n2 X ℓ=1 [ui]ℓφ(vℓ) (6) form an orthonormal basis for W. Moreover, defining Q = [λ1/2 1 u1, . . . , λ1/2 p up] ∈Rp×p and setting Q1 = Q1:n1, : and Q2 = Qn1+1:n2, : (the first n1 and remaining n2 rows of Q, respectively), the matrices S1 and S2 appearing in (5) can be computed as S1 = Q⊤ 1 L−1 1 Q1 + γI, S2 = Q⊤ 2 L−1 2 Q2 + γI. (7) Proofs of these two propositions are given in the Supplemental Material. As in other kernel methods, the significance of Propositions 1 and 2 is not just that they show how kFLG(G1, G2) can be efficiently computed when φ is very high dimensional, but that they make it clear that the FLG kernel may be induced from any base kernel. For completeness, we close this section with the generalized definition of the FLG kernel. Definition 4. Let G1 and G2 be two graphs. Assume that each of their vertices comes from an abstract vertex space V and that κ: V × V →R is a symmetric positive semi-definite kernel on V. The generalized FLG kernel induced from κ is then defined as kκ FLG(G1, G2) = 1 2S −1 1 + 1 2S −1 2 −11/2 |S1|1/4 |S2|1/4 , (8) where S1 and S2 are as defined in Proposition 2. 3 The multiscale Laplacian graph kernel (MLG kernel) By multiscale graph kernel we mean a kernel that is able to capture similarity between graphs not just based on the topological relationships between their individual vertices, but also the topological relationships between subgraphs. The key property of the FLG kernel that allows us to build such a kernel is that it can be applied recursively. In broad terms, the construction goes as follows: 1. Given a graph G, associate each vertex with a subgraph centered around it and compute the FLG kernel between every pair of these subgraphs. 2. Reinterpret the FLG kernel between these subgraphs as a new base kernel between the center vertices of the subgraphs. 3. Consider larger subgraphs centered at each vertex, compute the FLG kernel between them induced from the new base kernel constructed in the previous step, and recurse. To compute the actual multiscale graph kernel K between G and another graph G′, we follow the same process for G′ and then set K(G, G′) equal to the FLG kernel induced from their top level base kernels. The following definitions formalize this construction. Definition 5. Let G be a graph with vertex set V , and κ a positive semi-definite kernel on V . Assume that for each v ∈V we have a nested sequence of L neighborhoods v ∈N1(v) ⊆N2(v) ⊆. . . ⊆NL(v) ⊆V, (9) and for each Nℓ(v), let Gℓ(v) be the corresponding induced subgraph of G. We define the Multiscale Laplacian Subgraph Kernels (MLS kernels), K1, . . . , KL : V × V →R as follows: 1. K1 is just the FLG kernel kκ FLG induced from the base kernel κ between the lowest level subgraphs: K1(v, v′) = kκ FLG(G1(v), G1(v′)). 5 2. For ℓ= 2, 3, . . . , L, Kℓis the FLG kernel induced from Kℓ−1 between Gℓ(v) and Gℓ(v′): Kℓ(v, v′) = kKℓ−1 FLG (Gℓ(v), Gℓ(v′)). Definition 5 defines the MLS kernel as a kernel between different subgraphs of the same graph G. However, if two graphs G1 and G2 share the same base kernel, the MLS kernel can also be used to compare any subgraph of G1 with any subgraph of G2. This is what allows us to define an L+1’th FLG kernel, which compares the two full graphs. Definition 6. Let G be a collection of graphs such that all their vertices are members of an abstract vertex space V endowed with a symmetric positive semi-definite kernel κ: V × V →R. Assume that the MLS kernels K1, . . . , KL are defined as in Definition 5, both for pairs of subgraphs within the same graph and across pairs of different graphs. We define the Multiscale Laplacian Graph Kernel (MLG kernel) between any two graphs G1, G2 ∈G as K(G1, G2) = kKL FLG(G1, G2). Definition 5 leaves open the question of how the neighborhoods N1(v), . . . , NL(v) are to be defined. In the simplest case, we set Nℓ(v) to be the ball Br(v) (i.e., the set of vertices at a distance at most r from v), where r = r0dℓ−1 for some d > 1. 3.1 Computational complexity Definitions 5 and 6 suggest a recursive approach to computing the MLG kernel: computing K(G1, G2) first requires computing KL(v, v′) between all n1+n2 2 pairs of top level subgraphs across G1 and G2; each of these kernel evaluations requires computing KL−1(v, v′) between up to O(n2) level L −1 subgraphs, and so on. Following this recursion blindly would require up to O(n2L+2) kernel evaluations, which is clearly infeasible. The recursive strategy is wasteful because it involves evaluating the same kernel entries over and over again in different parts of the recursion tree. An alternative solution that requires only O(Ln2) kernel evaluations would be to first compute K1(v, v′) for all (v, v′) pairs, then compute K2(v, v′) for all (v, v′) pairs and so on. 4 Linearized Kernels and Low Rank Approximation Computing the MLG kernel between two graphs, as described in the previous section, may involve O(Ln2) kernel evaluations. At the top levels of the hierarchy each Gℓ(v) might have Θ(n) vertices, so the cost of a single FLG kernel evaluation can be as high as O(n3). Somewhat pessimistically, this means that the overall cost of computing kFLG(G1, G2) is O(Ln5). Given a dataset of M graphs, computing their Gram matrix requires repeating this for all {G1, G2} pairs, giving O(LM 2n5), which is even more problematic. The solution that we propose in this section is to compute for each level ℓ= 1, 2, . . . , L + 1 a single joint basis for all subgraphs at the given level across all graphs G1, . . . , GM. For concreteness, we go back to the definition of the FLG kernel. Definition 7. Let G = {G1, . . . , GM} be a collection of graphs, V1, . . . , VM their vertex sets, and assume that V1, . . . , VM ⊆V for some general vertex space V. Further, assume that κ: V ×V →R is a positive semi-definite kernel on V, Hκ is its Reproducing Kernel Hilbert Space, and φ: V →Hκ is the corresponding feature map satisfying κ(v, v′) = ⟨φ(v), φ(v′)⟩for any v, v′ ∈V. The joint vertex feature space of {G1, . . . , GM} is then WG = span SM i=1 S v∈Vi {φ(v)} . WG is just the generalization of the W space defined in Proposition 1 from two graphs to M. The following generalization of Propositions 1 and 2 is then immediate. Proposition 3. Let N = PM i=1 | Vi |, V = (v1, . . . , vN) be the concatenation of the vertex sets V1, . . . , VM, and K the corresponding joint Gram matrix Ki,j = κ(vi, vj) = ⟨φ(vi), φ(vj)⟩. Let u1, . . . , uP be a maximal orthonormal set of non-zero eigenvalue eigenvectors of K with corresponding eigenvalues λ1, . . . , λP , and P = dim(WG). Then the vectors ξi = 1 √λi N X ℓ=1 [ui]ℓφ(vℓ) i = 1, . . . , P 6 form an orthonormal basis for WG. Moreover, defining Q = [λ1/2 1 u1, . . . , λ1/2 p uP ] ∈RP ×P , and setting Q1 to be the submatrix of Q composed of its first |V1| rows; Q2 be the submatrix composed of the next |V2| rows, and so on, for any Gi, Gj ∈G, the generalized FLG kernel induced from κ (Definition 4) can be expressed as kFLG(Gi, Gj) = 1 2S −1 i + 1 2S −1 j −11/2 |Si|1/4 |Sj |1/4 , (10) where Si = Q⊤ i L−1 i Qi + γI and Sj = Q⊤ j L−1 j Qj + γI. The significance of Proposition 3 is that S1, . . . , SM are now fixed matrices that do not need to be recomputed for each kernel evaluation. Once we have constructed the joint basis {ξ1, . . . , ξP }, the Si matrix of each graph Gi can be computed independently, as a precomputation step, and individual kernel evaluations reduce to just plugging them into (10). At a conceptual level, Proposition 3 linearizes the kernel κ by projecting everything down to WG. In particular, it replaces the {φ(vi)} RKHS vectors with explicit finite dimensional feature vectors given by the corresponding rows of Q, just like we had in the “unkernelized” FLG kernel of Definition 2. For our multiscale kernels this is particularly important, because linearizing not just kκ FLG, but also kK1 FLG, kK2 FLG, . . ., allows us to compute the MLG kernel level by level, without recursion. After linearizing the base kernel κ, we attach explicit, finite dimensional vectors to each vertex of each graph. Then we compute compute kK1 FLG between all pairs of lowest level subgraphs, and linearizing this kernel as well, each vertex effectively just gets an updated feature vector. Then we repeat the process for kK2 FLG . . . kKL FLG, and finally we compute the MLG kernel K(G1, G2). 4.1 Randomized low rank approximation The difficulty in the above approach of course is that at each level (3) is a Gram matrix between all vertices of all graphs, so storing it is already very costly, let along computing its eigendecomposition. Morever, P = dim(WG) is also very large, so managing the S1, . . . , SM matrices (each of which is of size P×P) becomes infeasible. The natural alternative is to replace WG by a smaller, approximate joint features space, defined as follows. Definition 8. Let G, κ, Hκ and φ be defined as in Definition 7. Let ˜V = (˜v1, . . . , ˜v ˜ N) be ˜N ≪N vertices sampled from the joint vertex set V = (v1, . . . , vN). Then the corresponding subsampled vertex feature space is ˜WG = span{ φ(˜v) | ˜v ∈˜V }. Let ˜P = dim( ˜WG). Similarly to before, we construct an orthonormal basis {ξ1, . . . , ξ ˜ P } for ˜WG by forming the (now much smaller) Gram matrix ˜Ki,j = κ(˜vi, ˜vj), computing its eigenvalues and eigenvectors, and setting ξi = 1 √λi P ˜ N ℓ=1[ui]ℓφ(˜vℓ). The resulting approximate FLG kernel is kFLG(Gi, Gj) = 1 2 ˜S−1 i + 1 2 ˜S−1 j −11/2 | ˜Si|1/4 | ˜Sj |1/4 , (11) where ˜Si = ˜Q⊤ i L−1 i ˜Qi + γI and ˜Sj = ˜Q⊤ j L−1 j ˜Qj + γI are the projections of Si and Sj to ˜WG. We introduce a further layer of approximation by restricting ˜WG to be the space spanned by the first ˆP < ˜P basis vectors (ordered by descending eigenvalue), effectively doing kernel PCA on {φ(˜v)}˜v∈˜V , equivalently, a low rank approximation of ˜K. Assuming that vg j is the j’th vertex of Gg, in contrast to Proposition 2, now the j’th row of ˜Qs consists of the coordinates of the projection of φ(vg j ) onto ˜WG, i.e., [ ˜Qg]j,i = 1 √λi ˜ N X ℓ=1 [ui]ℓ φ(vg j ), φ(˜vℓ) = 1 √λi ˜ N X ℓ=1 [ui]ℓκ(vg j , ˜vℓ). The above procedure is similar to the popular Nystr¨om approximation for kernel matrices [19, 20], except that in our case the ultimate goal is not to approximate the Gram matrix (3), but the 7 Table 1: Classification Results (Mean Accuracy ± Standard Deviation) Method MUTAG[22] PTC[23] ENZYMES[2] PROTEINS[2] NCI1[24] NCI109[24] WL 84.50(±2.16) 59.97(±1.60) 53.75(±1.37) 75.43(±1.95) 84.76(±0.32) 85.12(±0.29) WL-Edge 82.94(±2.33) 60.18(±2.19) 52.00(±0.72) 73.63(±2.12) 84.65(±0.25) 85.32(±0.34) SP 85.50(±2.50) 59.53(±1.71) 42.31(±1.37) 75.61(±0.45) 73.61(±0.36) 73.23(±0.26) Graphlet 82.44(±1.29) 55.88(±0.31) 30.95(±0.73) 71.63(±0.33) 62.40(±0.27) 62.35(±0.28) p–RW 80.33(±1.35) 59.85(±0.95) 28.17(±0.76) 71.67(±0.78) TIMED OUT TIMED OUT MLG 84.21(±2.61) 63.62(±4.69) 57.92(±5.39) 76.14(±1.95) 80.83(±1.29) 81.30(±0.80) S1, . . . , SM matrices used to form the FLG kernel. In practice, we found that the eigenvalues of K usually drop off very rapidly, suggesting that W can be safely approximated by a surprisingly small dimensional subspace ( ˆP ∼10), and correspondingly the sample size ˜N can be kept quite small as well (on the order of 100). The combination of these two factors makes computing the entire stack of kernels feasible, reducing the complexity of computing the Gram matrix for a dataset of M graphs of θ(n) vertices each to O(ML ˜N 2 ˆP 3 + ML ˜N 3 + M 2 ˆP 3). It is also important to note that this linearization step requires the graphs(not the labels) in the test set to be known during training in order to project the features of the test graphs onto the low rank approximation of ˜WG. 5 Experiments We tested the efficacy of the MLG kernel by performing classification on benchmark bioinformatics datasets using a binary C-SVM solver [21], and compared our classification results against those from other representative graph kernels from the literature: the Weisfeiler–Lehman Kernel, the Weisfeiler–Lehman Edge Kernel [9], the Shortest Path Kernel [6], the Graphlet Kernel [9], and the p-random Walk Kernel [5]. We randomly selected 20% of each dataset to be used as a test set. On the other 80% we did 10 fold cross validation to select the parameters for each kernel method to be used on the test set and repeated this setup 10 times. For the Weisfeiler–Lehman kernels, the height parameter h is chosen from {1, 2, ..., 5}, the random walk size p for the p-random walk kernel was chosen from {1, 2, ..., 5}, for the Graphlets kernel the graphlet size n was chosen from {3, 4, 5}. For the parameters of the MLG kernel: we chose η from {0.01, 0.1, 1}, radius size n from {1, 2, 3}, number of levels l from {1, 2, 3}, and fixed gamma to be 0.01. For the MLG kernel, we used the given discrete node labels to create a one-hot binary feature vector for each node and used the dot product between nodes’ binary feature vector labels as the base kernel. All experiments were done on a 16 core Intel E5-2670 @ 2.6GHz processor with 32 GB of memory. We are fairly competitive in accuracy for all datasets except NCI1, and NCI109, where it performs better than all non-Weisfeiler Lehman kernels. The Supplementary Materials give a more detailed discussion of the experiments and datasets. 6 Conclusions In this paper we have proposed two new graph kernels: (1) The FLG kernel, which is a very simple single level kernel that combines information attached to the vertices with the graph Laplacian; (2) The MLG kernel, which is a multilevel, recursively defined kernel that captures topological relationships between not just individual vertices, but also subgraphs. Clearly, designing kernels that can optimally take into account the multiscale structure of actual chemical compounds is a challenging task that will require further work and domain knowledge. However, it is encouraging that even just “straight out of the box”, tuning only two or three parameters, the MLG kernel is competitive with other well known kernels in the literature. Beyond just graphs, the general idea of multiscale kernels is of interest for other types of data as well (such as images) that have multiresolution structure, and the way that the MLG kernel chains together local spectral analysis at multiple scales is potentially applicable to these domains as well, which will be the subject of further research. Acknowledgements This work was completed in part with computing resources provided by the University of Chicago Research Computing Center and with the support of DARPA-D16AP00112 and NSF-1320344. 8 References [1] Akihiro Inokuchi, Takashi Washio, and Hiroshi Motoda. Complete mining of frequent patterns from graphs: Mining graph data. Machine Learning, 50(3):321–354, 2003. [2] K. M. Borgwardt, C. S. Ong, S. Sch¨onauer, S. V. N. Vishwanathan, A. J. Smola, and H.-P. Kriegel. Protein function prediction via graph kernels. In Proceedings of Intelligent Systems in Molecular Biology (ISMB), Detroit, USA, 2005. [3] H. Kubinyi. Drug research: myths, hype and reality. Nature Reviews: Drug Discovery, 2(8):665–668, August 2003. [4] T. G¨artner. Exponential and geometric kernels for graphs. In NIPS*02 workshop on unreal data, volume Principles of modeling nonvectorial data, 2002. [5] S. V. N. Vishwanathan, Karsten Borgwardt, Risi Kondor, and Nicol Schraudolph. On graph kernels. Journal of Machine Learning Research (JMLR), 11, 2010. [6] Karsten M. Borgwardt and Hans Peter Kriegel. Shortest-path kernels on graphs. In Proceedings of the 5th IEEE International Conference on Data Mining(ICDM) 2005), 27-30 November 2005, Houston, Texas, USA, pages 74–81, 2005. [7] Aasa Feragen, Niklas Kasenburg, Jens Petersen, Marleen de Bruijne, and Karsten M. Borgwardt. Scalable kernels for graphs with continuous attributes. In Advances in Neural Information Processing Systemss, 2013. [8] Risi Kondor and Karsten Borgwardt. The skew spectrum of graphs. In Proceedings of the International Conference on Machine Learning (ICML), pages 496–503. ACM, 2008. [9] Nino Shervashidze, S. V. N. Vishwanathan, Tobias Petri, Kurt Mehlhorn, and Karsten M. Borgwardt. Efficient graphlet kernels for large graph comparison. In Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, AISTATS, pages 488–495, 2009. [10] Nino Shervashidze, Pascal Schweitzer, Erik Jan van Leeuwen, Kurt Mehlhorn, and Karsten M. Borgwardt. Weisfeiler-lehman graph kernels. Journal of Machine Learning Research(JMLR), 12:2539–2561, November 2011. [11] Marion Neumann, Roman Garnett, Christian Baukhage, and Kristian Kersting. Propagation kernels: efficient graph kernels from propagated information. In Machine Learning, 2016. [12] Hanjun Dai, Bo Dai, and Le Song. Discriminative embeddings of latent variable models for structured data. In Proceedings of the International Conference on Machine Learning (ICML), 2016. [13] Fredrik D. Johansson and Devdatt Dubhashi. Learning with similarity functions on graphs using matchings of geometric embeddings. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 467–476, 2015. [14] Tony Jebara and Risi Kondor. Bhattacharyya and expected likelihood kernels. In Proceedings of the Annual Conference on Computational Learning Theory and Kernels Workshop (COLT/KW), 2003. [15] Risi Kondor and Tony Jebara. A kernel between sets of vectors. In Proceedings of the International Conference on Machine Learning (ICML), 2003. [16] Marc Alexa, Michael Kazhdan, and Leonidas Guibas. A Concise and Provably Informative Multi-Scale Signature Based on Heat Diffusion. In Processing of Eurographics Symposium on Geometry Processing, volume 28, 2009. [17] Bernhard Sch¨olkopf and Alexander J. Smola. Learning with Kernels. MIT Press, 2002. [18] S. Mika, B. Sch¨olkopf, A. J. Smola, K.-R. M¨uller, Matthias Scholz, and G. R¨atsch. Kernel PCA and de-noising in feature spaces. In Advances in Neural Information Processing Systems 11, pages 536–542, 1999. [19] Christopher K. I. Williams and Mattias Seeger. Using the Nystr¨om method to speed up kernel machines. In Advances in Neural Information Processing Systems (NIPS), 2001. [20] Petros Drineas and Michael W. Mahoney. On the Nystr¨om method for approximating a Gram matrix for improved kernel-based learning. Journal of Machine Learning Research, 6:2153–2175, 2005. [21] Chih-Chung Chang and Chih-Jen Lin. Libsvm: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 3, 2011. [22] A.K. Debnat, R. L. Lopez de Compadre, G. Debnath, A. j. Shusterman, and C. Hansch. Structure-activity relationship of mutagenic aromatic and heteroaromatic nitro compounds. correlation with molecular orbital energies and hydrophobicity. J Med Chem, 34:786–97, 1991. [23] H.Toivonen, A. Srinivasan, R. D. King, S. Kramer, and C. Helma. Statistical evaluation of the predictive toxicology challenge. Bioinformatics, pages 1183–1193, 2003. [24] N. Wale, I. A. Watson, and G. Karypis. Comparison of descriptor spaces for chemical compound retrieval and classification. Knowledge and Information Systems, pages 347–375, 2008. 9 | 2016 | 248 |
6,159 | Learning the Number of Neurons in Deep Networks Jose M. Alvarez∗ Data61 @ CSIRO Canberra, ACT 2601, Australia jose.alvarez@data61.csiro.au Mathieu Salzmann CVLab, EPFL CH-1015 Lausanne, Switzerland mathieu.salzmann@epfl.ch Abstract Nowadays, the number of layers and of neurons in each layer of a deep network are typically set manually. While very deep and wide networks have proven effective in general, they come at a high memory and computation cost, thus making them impractical for constrained platforms. These networks, however, are known to have many redundant parameters, and could thus, in principle, be replaced by more compact architectures. In this paper, we introduce an approach to automatically determining the number of neurons in each layer of a deep network during learning. To this end, we propose to make use of a group sparsity regularizer on the parameters of the network, where each group is defined to act on a single neuron. Starting from an overcomplete network, we show that our approach can reduce the number of parameters by up to 80% while retaining or even improving the network accuracy. 1 Introduction Thanks to the growing availability of large-scale datasets and computation power, Deep Learning has recently generated a quasi-revolution in many fields, such as Computer Vision and Natural Language Processing. Despite this progress, designing a deep architecture for a new task essentially remains a dark art. It involves defining the number of layers and of neurons in each layer, which, together, determine the number of parameters, or complexity, of the model, and which are typically set manually by trial and error. A recent trend to avoid this issue consists of building very deep [Simonyan and Zisserman, 2014] or ultra deep [He et al., 2015] networks, which have proven more expressive. This, however, comes at a significant cost in terms of memory requirement and speed, which may prevent the deployment of such networks on constrained platforms at test time and complicate the learning process due to exploding or vanishing gradients. Automatic model selection has nonetheless been studied in the past, using both constructive and destructive approaches. Starting from a shallow architecture, constructive methods work by incrementally incorporating additional parameters [Bello, 1992] or, more recently, layers to the network [Simonyan and Zisserman, 2014]. The main drawback of this approach stems from the fact that shallow networks are less expressive than deep ones, and may thus provide poor initialization when adding new layers. By contrast, destructive techniques exploit the fact that very deep models include a significant number of redundant parameters [Denil et al., 2013, Cheng et al., 2015], and thus, given an initial deep network, aim at reducing it while keeping its representation power. Originally, this has been achieved by removing the parameters [LeCun et al., 1990, Hassibi et al., 1993] or the neurons [Mozer and Smolensky, 1988, Ji et al., 1990, Reed, 1993] that have little influence on the output. While effective this requires analyzing every parameter/neuron independently, e.g., via the network Hessian, and thus does not scale well to large architectures. Therefore, recent trends ∗http://www.josemalvarez.net. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. to performing network reduction have focused on training shallow or thin networks to mimic the behavior of large, deep ones [Hinton et al., 2014, Romero et al., 2015]. This approach, however, acts as a post-processing step, and thus requires being able to successfully train an initial deep network. In this paper, we introduce an approach to automatically selecting the number of neurons in each layer of a deep architecture simultaneously as we learn the network. Specifically, our method does not require training an initial network as a pre-processing step. Instead, we introduce a group sparsity regularizer on the parameters of the network, where each group is defined to act on the parameters of one neuron. Setting these parameters to zero therefore amounts to canceling the influence of a particular neuron and thus removing it entirely. As a consequence, our approach does not depend on the success of learning a redundant network to later reduce its parameters, but instead jointly learns the number of relevant neurons in each layer and the parameters of these neurons. We demonstrate the effectiveness of our approach on several network architectures and using several image recognition datasets. Our experiments demonstrate that our method can reduce the number of parameters by up to 80% compared to the complete network. Furthermore, this reduction comes at no loss in recognition accuracy; it even typically yields an improvement over the complete network. In short, our approach not only lets us automatically perform model selection, but it also yields networks that, at test time, are more effective, faster and require less memory. 2 Related work Model selection for deep architectures, or more precisely determining the best number of parameters, such as the number of layers and of neurons in each layer, has not yet been widely studied. Currently, this is mostly achieved by manually tuning these hyper-parameters using validation data, or by relying on very deep networks [Simonyan and Zisserman, 2014, He et al., 2015], which have proven effective in many scenarios. These large networks, however, come at the cost of high memory footprint and low speed at test time. Furthermore, it is well-known that most of the parameters in such networks are redundant [Denil et al., 2013, Cheng et al., 2015], and thus more compact architectures could do as good a job as the very deep ones. While sparse, some literature on model selection for deep learning nonetheless exists. In particular, a forerunner approach was presented in [Ash, 1989] to dynamically add nodes to an existing architecture. Similarly, [Bello, 1992] introduced a constructive method that incrementally grows a network by adding new neurons. More recently, a similar constructive strategy was successfully employed by [Simonyan and Zisserman, 2014], where their final very deep network was built by adding new layers to an initial shallower architecture. The constructive approach, however, has a drawback: Shallow networks are known not to handle non-linearities as effectively as deeper ones [Montufar et al., 2014]. Therefore, the initial, shallow architectures may easily get trapped in bad optima, and thus provide poor initialization for the constructive steps. In contrast with constructive methods, destructive approaches to model selection start with an initial deep network, and aim at reducing it while keeping its behavior unchanged. This trend was started by [LeCun et al., 1990, Hassibi et al., 1993] to cancel out individual parameters, and by [Mozer and Smolensky, 1988, Ji et al., 1990, Reed, 1993], and more recently [Liu et al., 2015], when it comes to removing entire neurons. The core idea of these methods consists of studying the saliency of individual parameters or neurons and remove those that have little influence on the output of the network. Analyzing individual parameters/neurons, however, quickly becomes computationally expensive for large networks, particularly when the procedure involves computing the network Hessian and is repeated multiple times over the learning process. As a consequence, these techniques have no longer been pursued in the current large-scale era. Instead, the more recent take on the destructive approach consists of learning a shallower or thinner network that mimics the behavior of an initial deep one [Hinton et al., 2014, Romero et al., 2015], which ultimately also reduces the number of parameters of the initial network. The main motivation of these works, however, was not truly model selection, but rather building a more compact network. As a matter of fact, designing compact models also is an active research focus in deep learning. In particular, in the context of Convolutional Neural Networks (CNNs), several works have proposed to decompose the filters of a pre-trained network into low-rank filters, thus reducing the number of parameters [Jaderberg et al., 2014b, Denton et al., 2014, Gong et al., 2014]. However, this approach, similarly to some destructive methods mentioned above, acts as a post-processing step, and 2 thus requires being able to successfully train an initial deep network. Note that, in a more general context, it has been shown that a two-step procedure is typically outperformed by one-step, direct training [Srivastava et al., 2015]. Such a direct approach has been employed by [Weigend et al., 1991] and [Collins and Kohli, 2014] who have developed regularizers that favor eliminating some of the parameters of the network, thus leading to lower memory requirement. The regularizers are minimized simultaneously as the network is learned, and thus no pre-training is required. However, they act on individual parameters. Therefore, similarly to [Jaderberg et al., 2014b, Denton et al., 2014] and to other parameter regularization techniques [Krogh and Hertz, 1992, Bartlett, 1996], these methods do not perform model selection; the number of layers and neurons per layer is determined manually and won’t be affected by learning. By contrast, in this paper, we introduce an approach to automatically determine the number of neurons in each layer of a deep network. To this end, we design a regularizer-based formulation and therefore do not rely on any pre-training. In other words, our approach performs model selection and produces a compact network in a single, coherent learning framework. To the best of our knowledge, only three works have studied similar group sparsity regularizers for deep networks. However, [Zhou et al., 2016] focuses on the last fully-connected layer to obtain a compact model, and [S. Tu, 2014] and [Murray and Chiang, 2015] only considered small networks. Our approach scales to datasets and architectures two orders of magnitude larger than in these last two works with minimum (and tractable) training overhead. Furthermore, these three methods define a single global regularizer. By contrast, we work in a per-layer fashion, which we found more effective to reduce the number of neurons by large factors without accuracy drop. 3 Deep Model Selection We now introduce our approach to automatically determining the number of neurons in each layer of a deep network while learning the network parameters. To this end, we describe our framework for a general deep network, and discuss specific architectures in the experiments section. A general deep network can be described as a succession of L layers performing linear operations on their input, intertwined with non-linearities, such as Rectified Linear Units (ReLU) or sigmoids, and, potentially, pooling operations. Each layer l consists of Nl neurons, each of which is encoded by parameters θn l = [wn l , bn l ], where wn l is a linear operator acting on the layer’s input and bn l is a bias. Altogether, these parameters form the parameter set Θ = {θl}1≤l≤L, with θl = {θn l }1≤n≤Nl. Given an input signal x, such as an image, the output of the network can be written as ˆy = f(x, Θ), where f(·) encodes the succession of linear, non-linear and pooling operations. Given a training set consisting of N input-output pairs {(xi, yi)}1≤i≤N, learning the parameters of the network can be expressed as solving an optimization of the form min Θ 1 N N X i=1 ℓ(yi, f(xi, Θ)) + r(Θ) , (1) where ℓ(·) is a loss that compares the network prediction with the ground-truth output, such as the logistic loss for classification or the square loss for regression, and r(·) is a regularizer acting on the network parameters. Popular choices for such a regularizer include weight-decay, i.e., r(·) is the (squared) ℓ2-norm, of sparsity-inducing norms, e.g., the ℓ1-norm. Recall that our goal here is to automatically determine the number of neurons in each layer of the network. We propose to do this by starting from an overcomplete network and canceling the influence of some of its neurons. Note that none of the standard regularizers mentioned above achieve this goal: The former favors small parameter values, and the latter tends to cancel out individual parameters, but not complete neurons. In fact, a neuron is encoded by a group of parameters, and our goal therefore translates to making entire groups go to zero. To achieve this, we make use of the notion of group sparsity [Yuan and Lin., 2007]. In particular, we write our regularizer as r(Θ) = L X l=1 λl p Pl Nl X n=1 ∥θn l ∥2 , (2) where, without loss of generality, we assume that the parameters of each neuron in layer l are grouped in a vector of size Pl, and where λl sets the influence of the penalty. Note that, in the general case, 3 this weight can be different for each layer l. In practice, however, we found most effective to have two different weights: a relatively small one for the first few layers, and a larger weight for the remaining ones. This effectively prevents killing too many neurons in the first few layers, and thus retains enough information for the remaining ones. While group sparsity lets us effectively remove some of the neurons, exploiting standard regularizers on the individual parameters has proven effective in the past for generalization purpose [Bartlett, 1996, Krogh and Hertz, 1992, Theodoridis, 2015, Collins and Kohli, 2014]. To further leverage this idea within our automatic model selection approach, we propose to exploit the sparse group Lasso idea of [Simon et al., 2013]. This lets us write our regularizer as r(Θ) = L X l=1 (1 −α)λl p Pl Nl X n=1 ∥θn l ∥2 + αλl∥θl∥1 ! , (3) where α ∈[0, 1] sets the relative influence of both terms. Note that α = 0 brings us back to the regularizer of Eq. 2. In practice, we experimented with both α = 0 and α = 0.5. To solve Problem (1) with the regularizer defined by either Eq. 2 or Eq. 3, we follow a proximal gradient descent approach [Parikh and Boyd, 2014]. In our context, proximal gradient descent can be thought of as iteratively taking a gradient step of size t with respect to the loss PN i=1 ℓ(yi, f(xi, Θ)) only, and, from the resulting solution, applying the proximal operator of the regularizer. In our case, since the groups are non-overlapping, we can apply the proximal operator to each group independently. Specifically, for a single group, this translates to updating the parameters as ˜θn l = argmin θn l 1 2t∥θn l −ˆθn l ∥2 2 + r(Θ) , (4) where ˆθn l is the solution obtained from the loss-based gradient step. Following the derivations of [Simon et al., 2013], and focusing on the regularizer of Eq. 3 of which Eq. 2 is a special case, this problem has a closed-form solution given by ˜θn l = 1 −t(1 −α)λl √Pl ||S(ˆθn l , tαλl)||2) ! + S(ˆθn l , tαλl) , (5) where + corresponds to taking the maximum between the argument and 0, and S(·) is the softthresholding operator defined elementwise as (S(z, τ))j = sign(zj)(|zj| −τ)+ . (6) The learning algorithm therefore proceeds by iteratively taking a gradient step based on the loss only, and updating the variables of all the groups according to Eq. 5. In practice, we follow a stochastic gradient descent approach and work with mini-batches. In this setting, we apply the proximal operator at the end of each epoch and run the algorithm for a fixed number of epochs. When learning terminates, the parameters of some of the neurons will have gone to zero. We can thus remove these neurons entirely, since they have no effect on the output. Furthermore, when considering fully-connected layers, the neurons acting on the output of zeroed-out neurons of the previous layer also become useless, and can thus be removed. Ultimately, removing all these neurons yields a more compact architecture than the original, overcomplete one. 4 Experiments In this section, we demonstrate the ability of our method to automatically determine the number of neurons on the task of large-scale classification. To this end, we study three different architectures and analyze the behavior of our method on three different datasets, with a particular focus on parameter reduction. Below, we first describe our experimental setup and then discuss our results. 4.1 Experimental setup Datasets: For our experiments, we used two large-scale image classification datasets, ImageNet [Russakovsky et al., 2015] and Places2-401 [Zhou et al., 2015]. Furthermore, we conducted 4 additional experiments on the character recognition dataset of [Jaderberg et al., 2014a]. ImageNet contains over 15 million labeled images split into 22, 000 categories. We used the ILSVRC-2012 [Russakovsky et al., 2015] subset consisting of 1000 categories, with 1.2 million training images and 50, 000 validation images. Places2-401 [Zhou et al., 2015] is a large-scale dataset specifically created for high-level visual understanding tasks. It consists of more than 10 million images with 401 unique scene categories. The training set comprises between 5,000 and 30,000 images per category. Finally, the ICDAR character recognition dataset of [Jaderberg et al., 2014a] consists of 185,639 training and 5,198 test samples split into 36 categories. The training samples depict characters collected from text observed in a number of scenes and from synthesized datasets, while the test set comes from the ICDAR2003 training set after removing all non-alphanumeric characters. Architectures: For ImageNet and Places2-401, our architectures are based on the VGG-B network (BNet) [Simonyan and Zisserman, 2014] and on DecomposeMe8 (Dec8) [Alvarez and Petersson, 2016]. BNet consists of 10 convolutional layers followed by three fully-connected layers. In our experiments, we removed the first two fully-connected layers. As will be shown in our results, while this reduces the number of parameters, it maintains the accuracy of the original network. Below, we refer to this modified architecture as BNetC. Following the idea of low-rank filters, Dec8 consists of 16 convolutional layers with 1D kernels, effectively modeling 8 2D convolutional layers. For ICDAR, we used an architecture similar to the one of [Jaderberg et al., 2014b]. The original architecture consists of three convolutional layers with a maxout layer [Goodfellow et al., 2013] after each convolution, followed by one fully-connected layer. [Jaderberg et al., 2014b] first trained this network and then decomposed each 2D convolution into 2 1D kernels. Here, instead, we directly start with 6 1D convolutional layers. Furthermore, we replaced the maxout layers with max-pooling. As shown below, this architecture, referred to as Dec3, yields similar results as the original one, referred to as MaxOut. 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, for ImageNet and Places2-401, we used the torch-7 multi-gpu framework [Collobert et al., 2011] on a Dual Xeon 8-core E5-2650 with 128GB of RAM using three Kepler Tesla K20m GPUs in parallel. All models were trained for a total of 55 epochs with 12, 000 batches per epoch and a batch size of 48 and 180 for BNet and Dec8, respectively. These variations in batch size were mainly due to the memory and runtime limitations of BNet. The learning rate was set to an initial value of 0.01 and then multiplied by 0.1. Data augmentation was done through random crops and random horizontal flips with probability 0.5. For ICDAR, we trained each network on a single Tesla K20m GPU for a total 45 epochs with a batch size of 256 and 1,000 iterations per epoch. In this case, the learning rate was set to an initial value of 0.1 and multiplied by 0.1 in the second, seventh and fifteenth epochs. We used a momentum of 0.9. In terms of hyper-parameters, for large-scale classification, we used λl = 0.102 for the first three layers and λl = 0.255 for the remaining ones. For ICDAR, we used λl = 5.1 for the first layer and λl = 10.2 for the remaining ones. Evaluation: We measure classification performance as the top-1 accuracy using the center crop, referred to as Top-1. We compare the results of our approach with those obtained by training the same architectures, but without our model selection technique. We also provide the results of additional, standard architectures. Furthermore, since our approach can determine the number of neurons per layer, we also computed results with our method starting for different number of neurons, referred to as M below, in the overcomplete network. In addition to accuracy, we also report, for the convolutional layers, the percentage of neurons set to 0 by our approach (neurons), the corresponding percentage of zero-valued parameters (group param), the total percentage of 0 parameters (total param), which additionally includes the parameters set to 0 in non-completely zeroed-out neurons, and the total percentage of zero-valued parameters induced by the zeroed-out neurons (total induced), which additionally includes the neurons in each layer, including the last fully-connected layer, that have been rendered useless by the zeroed-out neurons of the previous layer. 4.2 Results Below, we report our results on ImageNet and ICDAR. The results on Places-2 are provided as supplementary material. ImageNet: We first start by discussing our results on ImageNet. For this experiment, we used BNetC and Dec8, both with the group sparsity (GS) regularizer of Eq. 2. Furthermore, in the case of 5 Table 1: Top-1 accuracy results for several state-of-the art architectures and our method on ImageNet. Model Top-1 acc. (%) BNet 62.5 BNetC 61.1 ResNet50a [He et al., 2015] 67.3 Dec8 64.8 Dec8-640 66.9 Dec8-768 68.1 Model Top-1 acc. (%) Ours-BnetC GS 62.7 Ours-Dec8−GS 64.8 Ours-Dec8-640SGL 67.5 Ours-Dec8-640GS 68.6 Ours-Dec8-768GS 68.0 a Trained over 55 epochs using a batch size of 128 on two TitanX with code publicly available. BNetC on ImageNet (in %) GS neurons 12.70 group param 13.59 total param 13.59 total induced 27.38 accuracy gap 1.6 Figure 1: Parameter reduction on ImageNet using BNetC. (Left) Comparison of the number of neurons per layer of the original network with that obtained using our approach. (Right) Percentage of zeroed-out neurons and parameters, and accuracy gap between our network and the original one. Note that we outperform the original network while requiring much fewer parameters. Dec8, we evaluated two additional versions that, instead of the 512 neurons per layer of the original architecture, have M = 640 and M = 768 neurons per layer, respectively. Finally, in the case of M = 640, we further evaluated both the group sparsity regularizer of Eq. 2 and the sparse group Lasso (SGL) regularizer of Eq. 3 with α = 0.5. Table 1 compares the top-1 accuracy of our approach with that of the original architectures and of other baselines. Note that, with the exception of Dec8-768, all our methods yield an improvement over the original network, with up to 1.6% difference for BNetC and 2.45% for Dec8-640. As an additional baseline, we also evaluated the naive approach consisting of reducing each layer in the model by a constant factor of 25%. The corresponding two instances, Dec25% 8 and Dec25% 8 -640, yield 64.5% and 65.8% accuracy, respectively. More importantly, in Figure 1 and Figure 2, we report the relative saving obtained with our approach in terms of percentage of zeroed-out neurons/parameters for BNetC and Dec8, respectively. For BNetC, in Figure 1, our approach reduces the number of neurons by over 12%, while improving its generalization ability, as indicated by the accuracy gap in the bottom row of the table. As can be seen from the bar-plot, the reduction in the number of neurons is spread all over the layers with the largest difference in the last layer. As a direct consequence, the number of neurons in the subsequent fully connected layer is significantly reduced, leading to 27% reduction in the total number of parameters. For Dec8, in Figure 2, we can see that, when considering the original architecture with 512 neurons per layer, our approach only yields a small reduction in parameter numbers with minimal gain in performance. However, when we increase the initial number of neurons in each layer, the benefits of our approach become more significant. For M = 640, when using the group sparsity regularizer, we see a reduction of the number of parameters of more than 19%, with improved generalization ability. The reduction is even larger, 23%, when using the sparse group Lasso regularizer. In the case of M = 768, we managed to remove 26% of the neurons, which translates to 48% of the parameters. While, here, the accuracy is slightly lower than that of the initial network, it is in fact higher than that of the original Dec8 network, as can be seen in Table 1. Interestingly, during learning, we also noticed a significant reduction in the training-validation accuracy gap when applying our regularization technique. For instance, for Dec8-768, which zeroes out 48.2% of the parameters, we found the training-validation gap to be 28.5% smaller than in the original network (from 14% to 10%). We believe that this indicates that networks trained using our approach have better generalization ability, even if they have fewer parameters. A similar phenomenon was also observed for the other architectures used in our experiments. We now analyze the sensitivity of our method with respect to λl (see Eq. (2)). To this end, we considered Dec8 −768GS and varied the value of the parameter in the range λl = [0.051..0.51]. More specifically, we considered 20 different pairs of values, (λ1, λ2), with the former applied to the 6 Dec8 on ImageNet (in %) Dec8 Dec8-640 Dec8-768 GS SGL GS GS neurons 3.39 12.42 10.08 26.83 group param 2.46 13.69 12.48 31.53 total param 2.46 22.72 12.48 31.63 total induced 2.82 23.33 19.11 48.28 accuracy gap 0.01 0.94 2.45 -0.02 Figure 2: Parameter reduction using Dec8 on ImageNet. Note that we significantly reduce the number of parameters and, in almost all cases, improve recognition accuracy over the original network. Dec3 on ICDAR (in %) SGL GS neurons 38.64 55.11 group param 32.57 66.48 total param 72.41 66.48 total induced 72.08 80.45 accuracy gap 1.24 1.38 Top-1 acc. on ICDAR MaxOutDeca 91.3% MaxOutb 89.8% MaxPool2Dneurons 83.8% Dec3 (baseline) 89.3% Ours-Dec3−SGL 89.9% Ours-Dec3−GS 90.1% a Results from Jaderberg et al. [2014a] using MaxOut layer instead of MaxPooling and decompositions as post-processing step b Results from Jaderberg et al. [2014a] Figure 3: Experimental results on ICDAR using Dec3. Note that our approach reduces the number of parameters by 72% while improving the accuracy of the original network. first three layers and the latter to the remaining ones. The details of this experiment are reported in supplementary material. Altogether, we only observed small variations in validation accuracy (std of 0.33%) and in number of zeroed-out neurons (std of 1.1%). ICDAR: Finally, we evaluate our approach on a smaller dataset where architectures have not yet been heavily tuned. For this dataset, we used the Dec3 architecture, where the last two layers initially contain 512 neurons. Our goal here is to obtain an optimal architecture for this dataset. Figure 3 summarizes our results using GS and SGL regularization and compares them to state-of-the-art baselines. From the comparison between MaxPool2Dneurons and Dec3, we can see that learning 1D filters leads to better performance than an equivalent network with 2D kernels. More importantly, our algorithm reduces by up to 80% the number of parameters, while further improving the performance of the original network. We believe that these results evidence that our algorithm effectively performs automatic model selection for a given (classification) task. 4.3 Benefits at test time We now discuss the benefits of our algorithm at test time. For simplicity, our implementation does not remove neurons during training. However, these neurons can be effectively removed after training, thus yielding a smaller network to deploy at test time. Not only does this entail benefits in terms of memory requirement, as illustrated above when looking at the reduction in number of parameters, but it also leads to speedups compared to the complete network. To demonstrate this, in Table 2, we report the relative runtime speedups obtained by removing the zeroed-out neurons. For BNet and Dec8, these speedups were obtained using ImageNet, while Dec3 was tested on ICDAR. Note that significant speedups can be achieved, depending on the architecture. For instance, using BNetC, we achieve a speedup of up to 13% on ImageNet, while with Dec3 on ICDAR the speedup reaches almost 50%. The right-hand side of Table 2 shows the relative memory saving of our networks. These numbers were computed from the actual memory requirements in MB of the networks. In terms of parameters, for ImageNet, Dec8-768 yields a 46% reduction, while Dec3 increases this saving to more than 80%. When looking at the actual features computed in each layer of the network, we reach a 10% memory saving for Dec8-768 and a 25% saving for Dec3. We believe that these numbers clearly evidence the benefits of our approach in terms of speed and memory footprint at test time. Note also that, once the models are trained, additional parameters can be pruned using, at the level of individual parameters, ℓ1 regularization and a threshold [Liu et al., 2015]. On ImageNet, with our 7 Table 2: Gain in runtime (actual clock time) and memory requirement of our reduced networks. Note that, for some configurations, our final networks achieve a speedup of close to 50%. Similarly, we achieve memory savings of up to 82% in terms of parameters, and up to 25% in terms of the features computed by the network. The runtimes were obtained using a single Tesla K20m and memory estimations using RGB-images of size 224 × 224 for Ours-BNetC, Ours-Dec8-640GS and Ours-Dec8-768GS, and gray level images of size 32 × 32 for Ours-Dec3−GS. Relative speed-up (%) Relative memory-savings Batch size Batch size 1 (%) Model 1 2 8 16 Params Features Ours-BNetC GS 10.04 8.97 13.01 13.69 12.06 18.54 Ours-Dec8-640GS -0.1 5.44 3.91 4.37 26.51 2.13 Ours-Dec8-768GS 15.29 17.11 15.99 15.62 46.73 10.00 Ours-Dec3−GS 35.62 43.07 44.40 49.63 82.35 25.00 Dec8-768GS model and the ℓ1 weight set to 0.0001 as in [Liu et al., 2015], this method yields 1.34M zero-valued parameters, compared to 7.74M for our approach, i.e., a 82% relative reduction in the number of individual parameters for our approach. 5 Conclusions We have introduced an approach to automatically determining the number of neurons in each layer of a deep network. To this end, we have proposed to rely on a group sparsity regularizer, which has allowed us to jointly learn the number of neurons and the parameter values in a single, coherent framework. Not only does our approach estimate the number of neurons, it also yields a more compact architecture than the initial overcomplete network, thus saving both memory and computation at test time. Our experiments have demonstrated the benefits of our method, as well as its generalizability to different architectures. One current limitation of our approach is that the number of layers in the network remains fixed. To address this, in the future, we intend to study architectures where each layer can potentially be bypassed entirely, thus ultimately canceling out its influence. Furthermore, we plan to evaluate the behavior of our approach on other types of problems, such as regression networks and autoencoders. Acknowledgments The authors thank John Taylor and Tim Ho for helpful discussions and their continuous support through using the CSIRO high-performance computing facilities. The authors also thank NVIDIA for generous hardware donations. References J.M. Alvarez and L. Petersson. Decomposeme: Simplifying convnets for end-to-end learning. CoRR, abs/1606.05426, 2016. T. Ash. Dynamic node creation in backpropagation networks. Connection Science, 1(4):365–375, 1989. P. L. Bartlett. For valid generalization the size of the weights is more important than the size of the network. In NIPS, 1996. M. G. Bello. Enhanced training algorithms, and integrated training/architecture selection for multilayer perceptron networks. IEEE Transactions on Neural Networks, 3(6):864–875, Nov 1992. Yu Cheng, Felix X. Yu, Rogério Schmidt Feris, Sanjiv Kumar, Alok N. Choudhary, and Shih-Fu Chang. An exploration of parameter redundancy in deep networks with circulant projections. In ICCV, 2015. M. D. Collins and P. Kohli. Memory Bounded Deep Convolutional Networks. CoRR, abs/1412.1442, 2014. R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011. M. Denil, B. Shakibi, L. Dinh, M.A. Ranzato, and N. de Freitas. Predicting parameters in deep learning. CoRR, abs/1306.0543, 2013. 8 E. L Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NIPS. 2014. Y. Gong, L. Liu, M. Yang, and L. D. Bourdev. Compressing deep convolutional networks using vector quantization. In CoRR, volume abs/1412.6115, 2014. I. J. Goodfellow, D. Warde-farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In ICML, 2013. B. Hassibi, D. G. Stork, and G. J. Wolff. Optimal brain surgeon and general network pruning. In ICNN, 1993. K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. In CoRR, volume abs/1512.03385, 2015. G. E. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In arXiv, 2014. M. Jaderberg, A. Vedaldi, and A. Zisserman. Deep features for text spotting. In ECCV, 2014a. M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up convolutional neural networks with low rank expansions. In BMVC, 2014b. C. Ji, R. R. Snapp, and D. Psaltis. Generalizing smoothness constraints from discrete samples. Neural Computation, 2(2):188–197, June 1990. ISSN 0899-7667. A. Krogh and J. A. Hertz. A simple weight decay can improve generalization. In NIPS, 1992. Y. LeCun, J. S. Denker, and S. A. Solla. Optimal brain damage. In NIPS, 1990. B. Liu, M. Wang, H. Foroosh, M. Tappen, and M. Penksy. Sparse convolutional neural networks. In CVPR, 2015. G. F Montufar, R. Pascanu, K. Cho, and Y. Bengio. On the number of linear regions of deep neural networks. In NIPS. 2014. M. Mozer and P. Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. In NIPS, 1988. K. Murray and D. Chiang. Auto-sizing neural networks: With applications to n-gram language models. CoRR, abs/1508.05051, 2015. N. Parikh and S. Boyd. Proximal algorithms. Found. Trends Optim., 1(3):127–239, January 2014. R. Reed. Pruning algorithms-a survey. IEEE Transactions on Neural Networks, 4(5):740–747, Sep 1993. A. Romero, N. Ballas, S. E. Kahou, A. Chassang, C. Gatta, and Y. Bengio. Fitnets: Hints for thin deep nets. In ICLR, 2015. 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, 2015. J. Wang X. Huang X. Zhang S. Tu, Y. Xue. Learning block group sparse representation combined with convolutional neural networks for rgb-d object recognition. Journal of Fiber Bioengineering and Informatics, 7(4):603, 2014. N. Simon, J. Friedman, T. Hastie, and R. Tibshirani. A sparse-group lasso. Journal of Computational and Graphical Statistics, 2013. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. R. K Srivastava, K. Greff, and J. Schmidhuber. Training very deep networks. In NIPS, 2015. S. Theodoridis. Machine Learning, A Bayesian and Optimization Perspective, volume 8. Elsevier, 2015. A. S. Weigend, D. Rumelhart, and B. A. Huberman. Generalization by weight-elimination with application to forecasting. In NIPS, 1991. M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B, 68(1):49–67, 2007. B. Zhou, A. Khosla, A. Lapedriza, A. Torralba, and A. Oliva. Places: An image database for deep scene understanding. 2015. H. Zhou, J. M. Alvarez, and F. Porikli. Less is more: Towards compact CNNs. In ECCV, 2016. 9 | 2016 | 249 |
6,160 | Bi-Objective Online Matching and Submodular Allocations Hossein Esfandiari University of Maryland College Park, MD 20740 hossein@cs.umd.edu Nitish Korula Google Research New York, NY 10011 nitish@google.com Vahab Mirrokni Google Research New York, NY 10011 mirrokni@google.com Abstract Online allocation problems have been widely studied due to their numerous practical applications (particularly to Internet advertising), as well as considerable theoretical interest. The main challenge in such problems is making assignment decisions in the face of uncertainty about future input; effective algorithms need to predict which constraints are most likely to bind, and learn the balance between short-term gain and the value of long-term resource availability. In many important applications, the algorithm designer is faced with multiple objectives to optimize. In particular, in online advertising it is fairly common to optimize multiple metrics, such as clicks, conversions, and impressions, as well as other metrics which may be largely uncorrelated such as ‘share of voice’, and ‘buyer surplus’. While there has been considerable work on multi-objective offline optimization (when the entire input is known in advance), very little is known about the online case, particularly in the case of adversarial input. In this paper, we give the first results for bi-objective online submodular optimization, providing almost matching upper and lower bounds for allocating items to agents with two submodular value functions. We also study practically relevant special cases of this problem related to Internet advertising, and obtain improved results. All our algorithms are nearly best possible, as well as being efficient and easy to implement in practice. 1 Introduction As a central optimization problem with a wide variety of applications, online resource allocation problems have attracted a large body of research in networking, distributed computing, and electronic commerce. Here, items arrive one at a time (i.e. online), and when each item arrives, the algorithm must irrevocably assign it to an agent; each agent has a limited resource budget / capacity for items assigned to him. A big challenge in developing good algorithms for these problems is to predict future binding constraints or learn future capacity availability, and allocate items one by one to agents who are unlikely to hit their capacity in the future. Various stochastic and adversarial models have been proposed to study such online allocation problems, and many techniques have been developed for these problems. For stochastic input, a natural approach is to build a predicted instance (for instance, via sampling, or using historical data), and some of these techniques solve a dual linear program to learn dual variables that are used by the online algorithm moving forward [6, 10, 2, 23, 16, 18]. However, stochastic approaches may provide poor results on some input (for example, when there are unexpected spikes in supply / demand), and hence such problems have been extensively studied in adversarial models as well. Here, the algorithm typically maintains a careful balance between greedily exploiting the current item by assigning it to agents with high value for it, and assigning the item to a lower-value agent for whom the value is further from the distribution of ‘typical’ items they 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. have received. Again, primal-dual techniques have been applied to learn the dual variables used by the algorithm in an online manner [17, 3, 9]. A central practical application of such online algorithms is the online allocation of impressions or page-views to ads on the Internet [9, 2, 23, 5, 7]. Such problems are present both in the context of sponsored search advertising where advertisers have global budget constraints [17, 6, 3], or in display advertising where each ad campaign has a desired goal or a delivery constraint [9, 10, 2, 23, 5, 7]. Many of these online optimization techniques apply to general optimization problems including the online submodular welfare maximization problem (SWM) [20, 13]. For many real-world optimization problems, the goal is to optimize multiple objective functions [14, 1]. For instance, in Internet advertising, such objectives might include revenue, clicks, or conversions. A variety of techniques have been developed for multi-objective optimization problems; however, in most cases, these techniques are only applicable for offline multi-objective optimization problems [21, 26], and they do not apply to online settings, especially for online competitive algorithms that work against an adversarial input [17, 9] or in the presence of traffic spikes [18, 8] or hard-to-predict traffic patterns [5, 4, 22]. Our contributions. Motivated by the above applications and the increasing need to satisfy multiple objectives, we study a wide class of multi-objective online optimization problems, and present both hardness results and (almost tight) bi-objective approximation algorithms for them. In particular, we study resource allocation problems in which a sequence of items (also referred to as impressions) i from an unknown set I arrive one by one, and we have to allocate each item to one agent (for example, one advertiser) a in a given set of agents A. Each agent a has two monotone submodular set functions fa, ga : 2I →R associated with it. Let Sa be the set of items assigned to bin a as a result of online allocation decisions. The goal of the online allocation algorithm is to maximize two social welfare functions based on fa’s and ga, i.e., P a∈A fa(Sa) and P a∈A ga(Sa). We first present almost tight online approximation algorithms for the general online bi-objective submodular welfare maximization problem (see Theorems 2.3 and 2.5, and Fig. 1). We show that a simple random selection rule along with the greedy algorithm (when each item arrives, randomly pick one objective to greedily optimize) results in almost optimal algorithms. Our allocation rule is thus both very fast to run and trivially easy to implement. The main technical result of this part is the hardness result showing that the achieved approximation factor is almost tight unless P=NP. Furthermore, we consider special cases of this problem motivated by online ad allocation. In particular, for the special cases of online budgeted allocation and online weighted matching, motivated by sponsored search and display advertising (respectively), we present improved primal-dual-based algorithms along with improved hardness results for these problems (see, for example, the tight Theorem 3.1). Related Work. It is known that the greedy algorithm leads to a 1/2-approximation for the submodular social welfare maximization problem (SWM) [11], and this problem admits a 1 −1/e-approximation in the offline setting [24], which is tight [19]. However, for the online setting, the problem does not admit a better than 1/2-approximation algorithm unless P= NP [12]. Bi-objective online allocation problems have been studied in two previous papers [14, 1]. The first paper presents [14] an online bi-objective algorithm for the problem of maximizing a general weight function and the cardinality function, and the second paper [1] presents results for the combined budgeted allocation and cardinality constraints. Our results in this paper improve and generalize those results for more general settings. Submodular partitioning problems have also been studied based on mixed robust/average-case objectives [25]. Our work is related to online ad allocation problems, including the Display Ads Allocation (DA) problem [9, 10, 2, 23], and the Budgeted Allocation (AdWords) problem [17, 6]. In both of these problems, the publisher must assign online impressions to an inventory of ads, optimizing efficiency or revenue of the allocation while respecting pre-specified contracts. The Display Ad (DA) problem is the online matching problem described above with a single weight objective [9, 7]. In the Budgeted Allocation problem, the publisher allocates impressions resulting from search queries. Advertiser a has a budget B(a) on the total spend, instead of a bound n(a) on the number of impressions. Assigning impression i to advertiser a consumes wia units of a’s budget instead of 1 of the n(a) slots, as in the DA problem. For both of these problems, 1 −1 e-approximation algorithms have been designed under the assumption of large capacities [17, 3, 9]. None of the above papers for adversarial models studies multiple objectives at the same time. 2 2 Bi-Objective Online Submodular Welfare Maximization 2.1 Model and Overview For any allocation S, let Sa denote the set of items assigned to agent a ∈A by this allocation. In the classic Submodular Welfare Maximization problem (SWM) for which there is a single monotone submodular objective, each agent a ∈A is associated with a submodular function fa defined on the set of items I. The welfare of allocation S is defined as P a fa(Sa), and the goal of SWM is to maximize this welfare. In the classic SWM, the natural greedy algorithm is to assign each item (when it arrives) to the agent whose gain increases the most. This greedy algorithm (note that it is an online algorithm) is (1/2 + 1/n)-competitive, and this is the best possible [15]. In this section, we consider the extension of online SWM to two monotone submodular functions. Formally, each agent a ∈A is associated with two submodular functions - fa and ga - defined on I. The goal is to find an allocation S that does well on both objectives P a fa(Sa) and P a ga(Sa). We measure the performance of the algorithm by comparison to the offline optimum for each objective: Let S∗f = arg maxallocations S P a fa(Sa) and S∗g = arg maxallocations S P a ga(Sa). An algorithm A is (α, β)-competitive if, for every input, it produces an allocation S such that P a fa(Sa) ≥ α P a fa(S∗f a ) and P a ga(Sa) ≥β P a ga(S∗g a ). A (1, 1)-competitive algorithm would be one that finds an allocation which is simultaneously optimal in both objectives, but since the objectives are distinct, no single allocation may maximize both, even ignoring computational difficulties or lack of knowledge of the future. One could attempt to maximize a linear combination of the two submodular objectives, but since the linear combination is itself submodular, this is no harder than the classic online SWM. Instead, we provide algorithms with the stronger guarantee that they are simultaneously competitive with the optimal solution for each objective separately. Further, our algorithms are parametrized, so the user can balance the importance of the two objectives. Similar to previous approaches for bi-objective online allocation problems [14], we run two simultaneous greedy algorithms, each based on one of the objective functions. Upon arrival of each online item, with probability p we pass the item to the greedy algorithm based on the objective function f, and with probability 1 −p we pass the item to the greedy algorithm based on g. First, as a warmup, we provide a charging argument to show that the greedy algorithm for (singleobjective) SWM is 1/2-competitive. This charging argument is similar to the usual primal-dual analysis for allocation problems. However, since the objective functions are not linear, it may not be possible to interpret the proof using a primal-dual technique. Later, we modify our charging argument and show that if we run the greedy algorithm for SWM but only consider items for allocation with probability p, the competitive ratio is p 1+p. (Note that a naive analysis would yield a competitive ratio of p/2, since we lose a factor of p in the sampling and a factor of 1/2 due to the greedy algorithm.) Since our algorithm for bi-objective online SWM passes items to the ‘first’ greedy algorithm with probability p and passes items to the second greedy algorithm with probability 1 −p, the modified charging argument immediately implies that our algorithm is ( p 1+p, 1−p 2−p) competitive, as we state in Theorem 2.3 below. Also, using a factor-revealing framework, assuming NP ̸= RP, we provide an almost tight hardness result, which holds even if the objective functions have the simpler ‘coverage’ structure. Both our competitive ratio and the associated hardness result are presented in Figure 1. 2.2 Algorithm for Bi-Objective online SWM We define some notation and ideas that we use to bound the competitive ratio of our algorithm. Let Gr be the greedy algorithm and let Opt be a fixed optimum allocation. For an agent j, and an algorithm Alg, let Algj be the set of online items allocated to the agent j by Alg; Optj denotes the set of online items allocated to j in Opt. Trivially, for any two agents j and k, we have Algj ∩Algk = ∅. For each online item i we define a variable αi, and for each agent j we define a variable βj. In order to bound the competitive ratio of the algorithm Alg by c, it suffices to set the values of αis and βjs such that 1) the value of Alg is at least c Pn i=1 αi + Pm j=1 βj and 2) the value of Opt is at most Pn i=1 αi + Pm j=1 βj. 3 Figure 1: The lower (blue) curve is the competitive ratio of our algorithm, and the red curve is the upper bound on the competitive ratio of any algorithm. Theorem 2.1. (Warmup) The greedy algorithm is 0.5-competitive for online SWM. Proof. For each online item i, let αi be the marginal gain by Gr from allocating item i upon its arrival. It is easy to see that Pn i=1 αi is equal to the value of Gr. For each agent j, let βj be the total value of the allocation to j at the end of the algorithm. By definition, we know that Pm j=1 βj is equal to the value of Gr. Thus, the value of Gr is clearly 0.5 Pn i=1 αi + Pm j=1 βj . Recall that fj(.) denotes the valuation function of agent j. Below, we show that fj(Optj) is upperbounded by βj + P i∈Optj αi. Note that for distinct agents j and k, Optj and Optk are disjoint. Thus, by summing over all agents, we can upper-bound the value of Opt by Pn i=1 αi + Pm j=1 βj. This means that the competitive ratio of Gr is 0.5. Now, we just need to show that for any agent j we have fj(Optj) ≤βj + P i∈Optj αi. Note that for any item i ∈Optj, the value of αi is at least the marginal gain that would have been obtained from assigning i to j when it arrives. Applying submodularity of fj, we have αi ≥fj(Grj ∪i) −fj(Grj). Moreover, by definition we have βj = fj(Grj). Thus, we have: βj + X i∈Optj αi ≥fj(Grj) + X i∈Optj (fj(Grj ∪i) −fj(Grj)) ≥fj(Grj) + fj(Grj ∪Optj) −fj(Grj) = fj(Grj ∪Optj) ≥fj(Optj), where the second inequality follows by submodularity, and the last inequality by monotonicity. This completes the proof. Lemma 2.2. Let Grp be an algorithm that with probability p passes each online item to Gr for allocation, and leaves it unmatched otherwise. Grp is p 1+p-competitive for online SWM. Proof. The proof here is fairly similar to Theorem 2.1. For each online item i, set αi to be the marginal gain that would have been achieved from allocating item i upon its arrival (assuming i is passed to Gr), given the current allocation of items. Note that αi is a random variable (depending on the outcome of previous decisions to pass items to Gr or not), but it is independent of the coin toss that determines whether it is passed to Gr, and so the expected marginal gain of allocating item i, (given all previous allocations) is pE[αi]. Thus, by linearity of expectation, the expected value of Grp is pE[Pn i=1 αi]. On the other hand, for each agent j, set βj to be the value of the actual allocations to j at the end of the algorithm. Again, we have Pm j=1 βj equal to the value of Grp. Combining these two, we conclude that the expected value of Grp is equal to 1 1+1/p Pn i=1 E[αi] + Pm j=1 E[βj] . 4 As before, we show that fj(Optj) is upper-bounded by βj + P i∈Optj αi. Therefore, we can conclude that the competitive ratio of Grp is 1 1+1/p = p 1+p. It remains only to show that for any agent j, we have fj(Optj) ≤βj + P i∈Optj αi. This is exactly the same as our proof for Theorem 2.1: By submodularity of fj we have, αi ≥fj(Grp(j) ∪i) − fj(Grp(j)), and by definition we have βj = fj(Grp(j)). We provide the complete proof in the full version. The main theorem of this section follows immediately. Theorem 2.3. For any 0 < p < 1, there is a ( p 1+p, 1−p 2−p)-competitive algorithm for bi-objective online SWM. 2.3 Hardness of Bi-Objective online SWM We now prove that Theorem 2.3 is almost tight, by describing a hard instance for bi-objective online SWM. To describe this instance, we define notions of super nodes and super edges, which capture the hardness of maximizing a submodular function even in the offline setting. Using the properties of super nodes and edges, we construct and analyze a hard example for bi-objective online SWM. Our construction generalizes that of Kapralov et al. [12], who prove the upper bound corresponding to the two points (0.5, 0) and (0, 0.5) in the curve shown in Figure 1. They use the following result: For any fixed c0 and ϵ′ it is NP-hard to distinguish between the following two cases for offline SWM with n agents and m = kn items. This holds even for submodular functions with ‘coverage’ valuations. • There is an allocation with value n. • For any l ≤c0, no allocation allocates kl items and gets a value more than 1 −e−l + ϵ′. Intuitively, in the former case, we can assign k items to each agent and obtain value 1 per agent. In the latter case, even if we assign 2k items (however they are split across agents), we can obtain total value at most 0.865. It also follows that there exist ‘hard’ instances such that there is an optimal solution of value n, but for any l < 1, any assigment of ml edges obtains value at most (1 −e−l + ϵ′)n. We now define a super edge to be a hard instance of offline SWM as defined above. We refer to the set of agents in a super edge as the agent super node, and the set of items in the super edge as the item super node. If two super edges share a super node, it means that they share the agents / items corresponding to that super node in the same order. If (in expectation) we allocate ml items of a super edge, we say the load of that super edge is l. Similarly, if (in expectation) we allocate ml items to an agent super node, we say the load of that super node is l. Using the definition of super edge and super node, the hardness result of Kapralov et al. [12] gives us the following lemma: Lemma 2.4. Assume RP ̸= NP and let ϵ be an arbitrary small constant. If the (expected) load of a randomized polynomial algorithm on an agent super node is l, the expected welfare of all agents is at most (1 −e−l + ϵ)n. Now with Lemma 2.4 in hand, we are ready to present an upper bound for bi-objective online SWM. Theorem 2.5. Assume RP ̸= NP. The competitive ratio (α, β) of any algorithm for bi-objective online SWM is upper bounded by the red curve in Figure 1. More precisely (assuming w.l.o.g. that α ≥β), for any γ ∈[0, 1], there is no algorithm with α > 0.5+γ2/6 1+γ2 and β > γα. 3 Bi-Objective Online Weighted Matching In this section, we consider two special cases of bi-objective online SWM, each of which generalizes the (single objective) online weighted matching problem (with free disposal). Here, each item i has two weights wf ij and wg ij for agent j, and each agent j has (large) capacity Cj. The weights of item i are revealed when it arrives, and the algorithm must allocate it to some agent immediately. In the first model, after the algorithm terminates, and each agent j has received items Sj, it chooses a subset S′ j ⊆Sj of at most Cj items. The total value in the first objective is then P j P i∈S′ j wf ij, and in the second objective P j P i∈S′ j wg ij. Intuitively, each agent must pick a subset of its items, and it 5 Exponential Weight Algorithm. Set βj to 0 for each agent j. Upon arrival of each item i: 1. If there is agent j with wij −βj > 0 (a) Let j be the agent that maximizes wij −βj (b) Assign i to j, and set αi to wij −βj. (c) Let w1, w2, . . . , wCj be the weights of the Cj highest weight items, matched to j in a non-increasing order. (d) Set βj to PCj j=1 wj 1+ 1 Cj j−1 Cj((1+1/Cj)Cj −1) . 2. Else: Leave i unassigned. Figure 2: Exponential weight algorithm for online matching with free disposal. gets paid its (additive) value for these items. In the (single-objective) case where each agent can only be allocated Cj items, this is the online weighted b-matching problem, where vertices are arriving online, and we have edge weights in the bipartite (item, agent) graph. This problem is completely intractable in the online setting, while the free disposal variant [9] in which additional items can be assigned, but at most Cj items count towards the objective, is of theoretical and practical interest. In the second model, after the algorithm terminates and agent j has received items Sj, it chooses two (not necessarily disjoint) subsets S′f j and S′g j ; items in S′f j are counted towards the first objective, and those in S′g j are counted towards the second objective. Theorem 3.1. For any (α, β) such that α + β ≤1 −1 e, there is an (α, β)-competitive algorithm for the first model of the bi-objective online weighted matching. For any constant ϵ > 0, there is no such algorithm when α + β > 1 −1 e + ϵ. To obtain the positive result, with probability p, run the exponential weight algorithm (see Figure 2) for the first objective (for all items), and with probability 1 −p run the exponential weight algorithm for the second objective for all items; this combination is (p(1 −1 e), (1 −p)(1 −1 e))-competitive. We deffer the proof of this and the matching hardness results to the full version. Having given matching upper and lower bounds for the first model, we now consider the second model, where if we assign a set Sj of items / edges to an agent j we can select two subsets S′f j , S′g j ⊆Sj and use them for the first and second objective functions respectively. Theorem 3.2. There is a (p(1 − 1 e1/p ), (1 −p)(1 − 1 e1/(1−p) ))-competitive algorithm for the biobjective online weighted matching problem in the second model as minj{Cj} tends to infinity. Theorem 3.3. The competitive ratio of any algorithm for bi-objective online weighted matching in the second model is upper bounded by the curve in figure 3. 4 Bi-Objective Online Budgeted Allocation In this section, we consider the bi-objective online allocation problem where one of the objectives is a budgeted allocation problem and the other objective function is weighted matching. Here, each item i has a weight wij and a bid bij for agent j. Each agent j has a capacity Cj and a budget Bj. If an agent is allocated items Sj, for the first objective (weighted matching), it chooses a subset S′ j of at most Cj items; its score is P i∈S′ j wij. For the second objective, its score is min{P i∈Sj bij, Bj}. Note that in the second objective, the agent does not need to choose a subset; it obtains the sum of the bids of all items assigned to it, capped at its budget Bj. Clearly, if we set all bids bij to 1, the goal of the budgeted allocation part will be maximizing the cardinality. Thus, this is a clear generalization of the bi-objective online allocation to maximize weight and cardinality, and the same hardness results hold here. 6 Figure 3: The blue curve is the competitive ratio of our algorithm in the second model, while the red line and the green curves are the upper bounds on the competitive ratio of any algorithm. As is standard, throughout this section we assume that the bid of each agent for each item is vanishingly small compared to the budget of each bidder. Interestingly, again here, we provide a (p(1 − 1 e1/p ), (1 −p)(1 − 1 e1/(1−p) ))-competitive algorithm, which is almost tight. At the end, as a corollary of our results, we provide a a (p(1 − 1 e1/p ), (1 −p)(1 − 1 e1/(1−p) ))-competitive algorithm, for the case that both objectives are budgeted allocation problems (with separate budgets). Our algorithm here is roughly the same as for two weight objectives. For each item, with probability 1−p, we pass it to the Exponential Weight algorithm for matching, and allocate it based on its weight. With the remaining probability p, we assign the algorithm based on its bids and count it towards the Budgeted Allocation objective. However, the algorithm we use for Budgeted Allocation is slightly different: We virtually run the Balance algorithm of Mehta et al. [17] for Budgeted Allocation (Fig. 4), as though we were assigning all items (not just those passed to this algorithm), but with each item’s bids scaled down by a factor of p. For those p fraction of items to be assigned by the Budgeted Allocation algorithm, assign them according to the recommendation of the virtual Balance algorithm. Theorem 3.2 from the previous section shows that our algorithm is (1 −p)(1 − 1 e1/(1−p) )-competitive against the optimum weighted matching objective. Thus, in the rest of this section, we only need to show that this algorithm is p(1 − 1 e1/p )-competitive against the optimum Budgeted Allocation solution. First, using a primal dual approach, we show that the outcome of the virtual Balance algorithm (that runs on p fraction of the value of each item) is p(1 − 1 e1/p ) against the optimum with the actual weights. Then, using the Hoeffding inequality, we show that the expected value of our allocation for the budgeted allocation objective is fairly close to the virtual algorithm’s value, i.e. the difference between the competitive ratio of our allocation and the virtual allocation is o(1). Lemma 4.1. When maxi,j bij Bj →0, the total allocation of the virtual balance algorithm that runs on p fraction of the value of each bid is at least p(1 − 1 e1/p ) times that of the optimum with the actual values. The proof of this lemma is similar to the analysis of Buchbinder et al. [3] for the basic Budgeted Allocation problem. We provide this proof in the full version. Lemma 4.2. For any constant p, assuming maxi,j bij Bj →0, the budgeted allocation value of our algorithm tends to the value of Balance with p fraction of each bid, with high probability. In the virtual Balance algorithm, we allocate p fraction of each item, while in our real algorithm, we allocate every item according to the virtual Balance algorithm with probability p. Since each item’s bids are small compared to the budgets, the lemma follows from a straightforward concentration argument. We present the complete proof in the full version. The following lemma is an immediate result of combining Lemma 4.1 and Lemma 4.2. 7 Virtual Balance algorithm on p fraction of values. Set βj and yj to 0 for each agent j. Upon arrival of each item i: 1. If i has a neighbor with bij(1 −βj) > 0 (a) Let j be the agent that maximizes bij(1 −βj) (b) Assign i to j i.e. set xij to 1. (c) Set αi to bij(1 −βj). (d) Increase yj by bij Bj (e) Increase βj by eyj −1/p 1−e−1/p bij Bj 2. Else: Leave i unassigned. Figure 4: Maintaining solution to primal and dual LPs. Lemma 4.3. For any constant p, assuming maxi,jbij Bj →0, our algorithm is p(1 − 1 e1/p )-competitive against the optimum budgeted allocation solution. Lemma 4.3 immediately gives us the following theorem. Theorem 4.4. For any constant p, assuming maxi,jbij Bj →0, there is a (p(1 − 1 e1/p ), (1 −p)(1 − 1 e1/(1−p) ))-competitive algorithm for the bi-objective online allocation with two budgeted allocation objectives. Moreover, if we pass each item to the exponential weight algorithm with probability p, the expected size of the output matching is at least p(1 − 1 e1/p ) that of the optimum [14]. Together with Lemma 4.3, this gives us the following theorem. Theorem 4.5. For any constant p, assuming maxi,jbij Bj →0, there is a (p(1 − 1 e1/p ), (1 −p)(1 − 1 e1/(1−p) ))-competitive algorithm for the bi-objective online allocation with a budgeted allocation objective and a weighted matching objective. 5 Conclusions In this paper, we gave the first algorithms for several bi-objective online allocation problems. Though these are nearly tight, it would be interesting to consider other models for bi-objective online allocation, special cases where one may be able to go beyond our hardness results, and other objectives such as fairness to agents. References [1] Gagan Aggarwal, Yang Cai, Aranyak Mehta, and George Pierrakos. Biobjective online bipartite matching. In WINE, pages 218–231, 2014. [2] Shipra Agrawal, Zizhuo Wang, and Yinyu Ye. A dynamic near-optimal algorithm for online linear programming. Computing Research Repository, 2009. [3] N. Buchbinder, Kamal Jain, and J. Naor. Online primal-dual algorithms for maximizing ad-auctions revenue. In ESA, pages 253–264. Springer, 2007. [4] Dragos Florin Ciocan and Vivek F. Farias. Model predictive control for dynamic resource allocation. Math. Oper. Res., 37(3):501–525, 2012. [5] N. R. Devanur, K. Jain, B. Sivan, and C. A. Wilkens. Near optimal online algorithms and fast approximation algorithms for resource allocation problems. In EC, pages 29–38. ACM, 2011. [6] Nikhil Devanur and Thomas Hayes. The adwords problem: Online keyword matching with budgeted bidders under random permutations. In EC, pages 71–78, 2009. 8 [7] Nikhil R. Devanur, Zhiyi Huang, Nitish Korula, Vahab S. Mirrokni, and Qiqi Yan. Whole-page optimization and submodular welfare maximization with online bidders. In EC, pages 305–322, 2013. [8] Hossein Esfandiari, Nitish Korula, and Vahab Mirrokni. Online allocation with traffic spikes: Mixing stochastic and adversarial inputs. In EC. ACM, 2015. [9] J. Feldman, N. Korula, V. Mirrokni, S. Muthukrishnan, and M. Pal. Online ad assignment with free disposal. In WINE, 2009. [10] Jon Feldman, Monika Henzinger, Nitish Korula, Vahab S. Mirrokni, and Cliff Stein. Online stochastic packing applied to display ad allocation. In ESA, pages 182–194. Springer, 2010. [11] M. L. Fisher, G. L. Nemhauser, and L. A. Wolsey. An analysis of approximations for maximizing submodular set functions. II. Math. Programming Stud., 8:73–87, 1978. Polyhedral combinatorics. [12] Michael Kapralov, Ian Post, and Jan Vondrák. Online submodular welfare maximization: Greedy is optimal. In SODA, pages 1216–1225, 2013. [13] Nitish Korula, Vahab Mirrokni, and Morteza Zadimoghaddam. Online submodular welfare maximization: Greedy beats 1/2 in random order. In STOC, pages 889–898. ACM, 2015. [14] Nitish Korula, Vahab S. Mirrokni, and Morteza Zadimoghaddam. Bicriteria online matching: Maximizing weight and cardinality. In WINE, pages 305–318, 2013. [15] Lehman, Lehman, and N. Nisan. Combinatorial auctions with decreasing marginal utilities. Games and Economic Behaviour, pages 270–296, 2006. [16] Mohammad Mahdian and Qiqi Yan. Online bipartite matching with random arrivals: A strongly factor revealing LP approach. In STOC, pages 597–606, 2011. [17] Aranyak Mehta, Amin Saberi, Umesh Vazirani, and Vijay Vazirani. Adwords and generalized online matching. J. ACM, 54(5):22, 2007. [18] Vahab S. Mirrokni, Shayan Oveis Gharan, and Morteza ZadiMoghaddam. Simultaneous approximations of stochastic and adversarial budgeted allocation problems. In SODA, pages 1690–1701, 2012. [19] Vahab S. Mirrokni, Michael Schapira, and Jan Vondrák. Tight information-theoretic lower bounds for welfare maximization in combinatorial auctions. In EC, pages 70–77, 2008. [20] G. L. Nemhauser, L. A. Wolsey, and M. L. Fisher. An analysis of approximations for maximizing submodular set functions. I. Math. Programming, 14(3):265–294, 1978. [21] Christos H Papadimitriou and Mihalis Yannakakis. On the approximability of trade-offs and optimal access of web sources. In FOCS, pages 86–92. IEEE, 2000. [22] Bo Tan and R Srikant. Online advertisement, optimization and stochastic networks. In CDC-ECC, pages 4504–4509. IEEE, 2011. [23] Erik Vee, Sergei Vassilvitskii, and Jayavel Shanmugasundaram. Optimal online assignment with forecasts. In EC, pages 109–118, 2010. [24] Jan Vondrák. Optimal approximation for the Submodular Welfare Problem in the value oracle model. In STOC, pages 67–74, 2008. [25] Kai Wei, Rishabh K Iyer, Shengjie Wang, Wenruo Bai, and Jeff A Bilmes. Mixed robust/average submodular partitioning: Fast algorithms, guarantees, and applications. In Advances in Neural Information Processing Systems, pages 2233–2241, 2015. [26] Mihalis Yannakakis. Approximation of multiobjective optimization problems. In WADS, page 1, 2001. 9 | 2016 | 25 |
6,161 | Deep Alternative Neural Network: Exploring Contexts as Early as Possible for Action Recognition Jinzhuo Wang, Wenmin Wang, Xiongtao Chen, Ronggang Wang, Wen Gao† School of Electronics and Computer Engineering, Peking University †School of Electronics Engineering and Computer Science, Peking University jzwang@pku.edu.cn, wangwm@ece.pku.edu.cn cxt@pku.edu.cn, rgwang@ece.pku.edu.cn, wgao@pku.edu.cn Abstract Contexts are crucial for action recognition in video. Current methods often mine contexts after extracting hierarchical local features and focus on their high-order encodings. This paper instead explores contexts as early as possible and leverages their evolutions for action recognition. In particular, we introduce a novel architecture called deep alternative neural network (DANN) stacking alternative layers. Each alternative layer consists of a volumetric convolutional layer followed by a recurrent layer. The former acts as local feature learner while the latter is used to collect contexts. Compared with feed-forward neural networks, DANN learns contexts of local features from the very beginning. This setting helps to preserve hierarchical context evolutions which we show are essential to recognize similar actions. Besides, we present an adaptive method to determine the temporal size for network input based on optical flow energy, and develop a volumetric pyramid pooling layer to deal with input clips of arbitrary sizes. We demonstrate the advantages of DANN on two benchmarks HMDB51 and UCF101 and report competitive or superior results to the state-of-the-art. 1 Introduction Contexts contribute semantic clues for action recognition in video. Current leading convolutional neural networks (CNNs) [13, 22, 31] and its shifted version 3D CNNs [11, 28, 29] often aggregate contexts in the late stage. More precisely, in the first layer of a typical CNN, receptive field (RF) starts at the kernel size which is usually small and the outputs only extract local features. As the layer goes deeper, RF expands and contexts start to be involved. These models need to be very deep [32] to preserve rich context topologies and reach competitive trajectory-based works [16, 19, 20, 30]. We speculate this is the main reason that going deeper with convolutions achieves better performance on many visual recognition tasks [23, 26]. However, it is not wise to simply increase layer number due to parameter burden. Besides, these models do not embed context evolutions of local features in the forward flow which is essential for context mining [17, 18]. To this end, we attempt to explore contexts as early as possible and investigate architectures for action recognition. Our motivation also derives from the relations between CNNs and visual systems of brain since they share many properties [9, 10]. One remarkable difference is that abundant recurrent connections exist in the visual system of brain [3] while CNNs only have forward connections. Anatomical evidences have shown that recurrent synapses typically outnumber feed-forward, top-down and feedback synapses in the neocortex [4, 37]. This makes visual recognition tend to be a dynamic procedure. Hence, we investigate to insert recurrent connections in the deployment of our architecture. Recent works utilize recurrent neural networks (RNNs) with long-short term memory (LSTM) units at the end CNN-based features of each frame to exploit semantic combinations [5, 25, 35]. These 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. methods can be regarded as inter-image context learner. In contrast, we attempt to apply recurrent connections to each level of hierarchical features to aggregate their context evolutions. Similar efforts have demonstrated effectivity for image analysis such as object recognition and scene parsing [21, 17, 18]. We extend in temporal domain and study its potential for action recognition. The main contribution of this paper is summarized as follows. First, we propose a deep alternative neural network (DANN) for action recognition. DANN stacks alternative layers consisting of volumetric convolutional layer and recurrent layer. The alternative deployment is used to preserve the contexts of local features as early as possible and embed their evolutions in the hierarchical feature learning procedure. Second, we introduce an adaptive method to determine the temporal size of input video clip based on the density of optical flow energy. Instead of manual choices used in most deep architectures, our method utilizes adaptive input video clips preserving long range dependencies, while not breaking semantic structures. To cope with input video clips of arbitrary sizes, we develop a volumetric pyramid pooling layer to resize the output to fixed-size before fully connected layers. Finally, we conduct extensive experiments and demonstrate the benefits of our method with early context exploration. On two challenging benchmarks HMDB51 and UCF101, we report competitive or superior results to the state-of-the-art. 2 Deep Alternative Neural Network 2.1 Adaptive Network Input The input size of deep networks in temporal domain is often determined empirically since it is hard to evaluate all the choices. Previous methods often consider short intervals such as [11, 13, 27, 28] from 1 to 16 frames. Recent work [29] argues that human actions usually span tens or hundreds of frames and contain characteristic patterns with long-term temporal structure. The authors use 60-frame as the network input and demonstrate its advantage over 16-frame. However, it is still an ad hoc manner and difficult to favor all the action classes. We introduce an adaptive method to automatically select the most discriminative video fragments using the density of optical flow energy. We attempt to preserve as much as motion information and appropriate range dependencies while not breaking their semantic structures in temporal domain. Figure 1: Sample video clip at every 3 frames of class “golfswing” and its optical flow energy with local minima and maxima landmarks where landmarks approximately correspond to motion change. Many evidences show that motion energy intensity induced by human activity exhibits regular periodicity [33]. This signal can be approximately estimated by optical flow computation as shown in Figure 1, and is particularly suitable to address our temporal estimation due to: (1) the local minima and maxima landmarks probably correspond to characteristic gesture and motion; (2) it is relatively robust to changes in camera viewpoint. More specifically, we first compute the optical flow field (vx, vy) for each frame I from a video Q and define its flow energy as e(I) = X (x,y)∈P ∥vx(x, y), vy(x, y)∥2 (1) where P is the pixel level set of selected interest points. The energy of Q is then obtained as E = {e(I1), · · · , e(It)}, which is further smoothed by a Gaussian filter to suppress noise. Subsequently, we locate the local minima and maxima landmarks {t} of E and for each two consecutive landmarks create a video fragment s by extracting the frames s = {It−1, · · · , It}. We average the fragment 2 length of each class and illustrate the distribution in Figure 2, which indicates that using a universal length can not favor all classes. To deal with the different length of video clip, we adopt the idea of spatial pyramid pooling (SPP) in [8] and extend to temporal domain, developing a volumetric pyramid pooling (VPP) layer to transfer video clip of arbitrary size into a universal length in the last alternative layer before fully connected layer, which is presented in Section 2.3. Figure 2: Average fragment length of each class in UCF101 dataset. 2.2 Alternative Layer The key component of DANN is the alternative layer (AL), which consists of a standard volumetric convolutional layer followed by a designed recurrent layer. Specifically, volumetric convolution is first performed to extract features from local spatiotemporal neighborhoods on feature maps in the previous layers. Then a recurrent layer is applied to the output and iteratively proceeds for T times. This procedure makes each unit evolve over discrete time steps and aggregate larger RFs. More formally, the input of a unit at position (x, y, z) in the jth feature map of the ith AL at time t, denoted as uxyz ij (t), is given by uxyz ij (t) = uxyz ij (0) + f(wr ijuxyz ij (t −1)) + bij uxyz ij (0) = f(wc (i−1)juxyz (i−1)j) (2) where uxyz ij (0) denotes the feed-forward output of volumetric convolutional layer, uxyz ij (t −1) is the recurrent input of previous time, wc k and wr k are the vectorized feed-forward kernels and recurrent kernels, bij is the bias for jth feature map in ith layer, f is defined as popular rectified linear unit (ReLU) function followed by a local response normalization (LRN) [14]. The first term is the output of volumetric convolution of previous layer and the second term is induced by the recurrent connections. LRN mimics the lateral inhibition in the cortex where different features compete for large responses. Equation 2 describes the dynamic behavior of AL where contexts are involved after local features are extracted. Unfolding recurrent connection for T time steps results in a feed-forward subnetwork of depth T + 1 as shown in Figure 3. While the recurrent input evolves over iterations, the feed-forward input remains the same in all iterations. When t = 0 only the feed forward input is present. The effective RF of an AL unit in the feature maps of the previous layer expands when the iteration number increases. Figure 3: Illustrations of an alternative layer (left). The unfolding recurrent procedure is on the right. The recurrent connections in AL provide two advantages. First, they enable every unit to incorporate contexts in an arbitrarily large region in the current layer. As the time steps increase, the state of every unit is influenced by other units in a larger and larger neighborhood in the current layer. As 3 a consequence, the size of regions that each unit can “watch” in the input space also increases. In standard volumetric convolutions, the size of effective RFs of the units in the current layer is fixed, and “watching” a larger region is only possible for units in higher layers. But unfortunately the context seen by higher-level units cannot influence the states of the units in the current layer without top-down connections. Second, the recurrent connections increase the network depth while keeping the number of adjustable parameters constant by weight sharing, since AL consumes only extra constant parameters of a recurrent kernel size compared with standard volumetric convolutional layer. 2.3 Volumetric Pyramid Pooling Layer The AL accepts input video clips of arbitrary sizes and produces outputs of variable sizes. However, the fully connected layers require fixed-length vectors. Similar phenomenon can be found in region CNN (R-CNN) [6] where the input image patch is of arbitrary size. To adopt DANN for input video clips of arbitrary sizes, we replace the last pooling layer with a volumetric pyramid pooling layer (VPPL) inspired by the success of spatial pyramid pooling layer (SPPL) [8]. Figure 4 illustrates the structure of VPPL. In each volumetric bin, we pool the responses of each kernel (throughout this paper we use max pooling). The outputs of the volumetric pyramid pooling are kM-dimensional vectors where M is the number of bins and k is the number of kernels in the last alternative layer. The fixed-dimensional vectors are then sent to the fully connected layers. Figure 4: A network structure with volumetric pyramid pooling layer (VPPL) to resize feature maps of arbitrary size to fixed size. With VPPL, the input video clips can be of any sizes. This allows not only arbitrary aspect ratios, but also arbitrary scales. One can apply more compact video clips only containing semantic regions such as action tubes in [7] to DANN with our VPPL to pursue potential improvement. 2.4 Overall Architecture Figure 5: DANN has 6 alternative layers, 5 volumetric pooling layers, 1 volumetric pyramid pooling layer, 3 fully conncected layers and a softmax layer. Number of kernels are denoted in each box. Our network architecture DANN is illustrated in Figure 5. The network has 6 alternative layers with 64, 128, 256, 256, 512 and 512 kernel response maps, followed by a volumetric pyramid pooling layer and 3 fully connected layers of size 2048 each. Following [28] we use 3 × 3 × 3 kernel for volumetric convolutional layer and recurrent layers of all 6 alternative layers. After each alternative layer, the network includes a ReLU and a volumetric max pooling layer. Max pooling kernels are of size 2×2×2 except in the first layer, where it is 2×2×1. All of these volumetric convolutional layers and recurrent layers are applied with appropriate padding and stride in both spatial and temporal dimensions. VPPL is applied to resize the output of the last AL to fixed-size which is the input of fully connected layers. Fully connected layers are followed by ReLU layers and a softmax at the end of the network, which outputs class scores. 4 3 Implementation details The major implementations of DANN including volumetric convolutions, recurrent layers and optimizations are derived from Torch toolbox platform [2]. Data Augmentation. Inspired by the random spatial cropping during training [23], we apply the corresponding augmentation to spatiotemporal dimension, which we call random clipping. During training stage, given an input video, we first determine their temporal size t as discussed in Section 2.1. Then we randomly select point (x, y, z) to sample a video clip of fixed size 80 × 80 × t. A common alternative is to pre-process data by using a sliding window approach to have pre-segmented clips. However, this approach limits the amount of data when the windows are not overlapped as in [28]. Another data augmentation method that we evaluate is a multi-scale cropping similar to [32]. Training. We use SGD applied to mini-batches with negative log likelihood criterion. The size of mini-batch is set 30. Training is performed by minimizing the cross-entropy loss function using the backpropagation through time (BPTT) algorithm [34]. This is equivalent to using the standard BP algorithm on the time-unfolded network. The final gradient of a shared weight is the sum of its gradients over all time steps. The initial learning rate for networks learned from scratch is 3 × 10−3 and it is 3 × 10−4 for networks fine-tuned from pre-trained models. The above schedule is used together with 0.9 dropout ratio. The momentum is set to 0.9 and weight decay is initialized with 5 × 10−3 and reduced by 10−1 factor at every decrease of the learning rate. Testing. At test time, a video is also applied with temporal estimation in Section 2.1 and divided into 80 × 80 × t clips with a temporal stride of 4 frames, where t is the adaptive temporal size. Each clip is further tested with 10 crops, namely 4 corners and the center, together with their horizontal flips. The video-level score is obtained by averaging all the clip-level scores and crop scores. 4 Evaluations 4.1 Datasets The evaluation is performed on UCF101 [24] and HMDB51 [15] benchmarks. Specifically, UCF101 contains 13K videos, annotated into 101 classes while HMDB51 includes 6.8K videos of 51 actions. The evaluation protocol is the same for both datasets: the organisers provide three training and test splits, and the performance is measured by the mean classification accuracy across the splits. Each UCF101 split contains 9.5K training videos while HMDB51 split contains 3.7K training videos. 4.2 Quantitative Results We first evaluate several experimental deployment choices and determine the common settings. Then we study the impact of different configurations of our DANN and investigate the optimal architecture. Finally, we report our best model and compare with state-of-the-art results. Optical flow quality. We used three types of optical flow as input signal. The performance influence is summarized in Table 1(a). We observe that sparse optical flow consistently outperforms RGB. The use of TVL1 suggested in [32] allows an almost 20% increase in performance. This demonstrates that action recognition is more easy to learn from motion information compared to raw pixel values. Given such results, we choose TVL1 optical flow for all remaining experiments in this paper. Data augmentation. Table 1(b) demonstrates the influence of data augmentation. Our baseline is sliding window with 75% overlap. On UCF101 split 1 dataset, we find random clipping and multiscale clipping both outperform the baseline and their combination can further boost the performance. Thus we use the combination strategy in the following experiments. Temporal length. Another issue we discuss is that our DANN takes video clips with adaptive temporal length, which is different from most existing architectures. We examine such setting by comparing 6AL_VPPL_3FC with a new architecture 6AL_3FC using fixed-size temporal length of 16-frame, 32-frame and 64-frame, while removing VPPL. The performance gain by 6AL_VPPL_3FC on UCF101 split 1 is approximate 4.2% as shown in Table 2(a). This result verifies the advantages of our adaptive method to determine temporal length for network input. 5 Table 1: Performance comparison of different input modalities and data augmentation strategies on UCF101 split1. (a) Impact of optical flow quality. Input Clip-level Video-level RGB 64.4 64.9 MPEG [12] 71.3 73.5 Brox [1] 76.7 77.2 TVL1 [36] 78.1 79.6 (b) Impact of data augmentation using TVL1. Method Clip-level Video-level Sliding window 75.4 74.8 Random clipping 78.5 79.6 Multi-scale clipping 81.2 82.4 Combined 81.6 82.3 Additional training data. We conduct experiments to see if our spatio-temporal features learned on one dataset can help to improve the accuracy of the other one. Such additional data is already known to improve results in some gain [22]. The performance from scratch is 56.4% while fine-tuning HMDB51 from UCF101 boosts the performance to 62.5%. Similar conclusion is demonstrated in Table 2(b). We conclude that one can learn generic representations with DANN like C3D [28]. Table 2: Performance impact of temporal length choice and additional training data. (a) Impact of temporal length on UCF101. Temporal length Clip-level Video-level 16-frame 77.2 77.6 32-frame 77.3 77.2 64-frame 79.7 80.1 Adaptive (Ours) 82.8 83.0 (b) Impact of additional training data. Method Accuracy From scratch UCF 80.2 Fine-tuning from HMDB 83.7 From scratch HMDB 56.4 Fine-tuning from UCF 62.5 Model Analysis. In the following we investigate the optimal configuration of our DANN. There are two crucial settings for DANN model. The first one is the AL deployment including its order and number. The other one is the unfolding time T in the recurrent layers. Table 3 shows the details of performance comparison, where VC is the standard volumetric convolutional layer and B_6VC_3FC is a baseline composed of similar configurations with DANN but without ALs and adaptive input size choice. The first column of Table 3(a) only has one AL layer and the accuracy comparison demonstrates the benefits of exploring contexts as early as possible. The right column of Table 3(a) shows the performance gains as the number of AL increases, which verifies the advantages of the inserted recurrent layer. Table 3(b) uses 6AL_VPP_3FC to study the impact of T and the results prove that larger T leads to better performance. This is perhaps due to larger contexts embedded into DANN which are more suitable to capture semantic information. Table 3: Performance comparison with different configurations of DANN on UCF101 split 1. (a) Impact of the order and the number of AL using T = 3. Architecture Acc. Architecture Acc. B_6VC_3FC 80.2 2AL_4VC_VPP_3FC 85.9 AL_5VC_VPP_3FC 85.1 3AL_3VC_VPP_3FC 86.7 VC_AL_4VC_VPP_3FC 83.3 4AL_2VC_VPP_3FC 86.4 2VC_AL_3VC_VPP_3FC 82.4 5AL_VC_VPP_3FC 87.5 3VC_AL_2VC_VPP_3FC 82.7 6AL_VPP_3FC 87.9 4VC_AL_VC_VPP_3FC 81.4 5VC_AL_VPP_3FC 80.9 (b) Impact of T. Architecture Acc. 6AL_VPP_3FC, T = 3 87.9 6AL_VPP_3FC, T = 4 88.5 6AL_VPP_3FC, T = 5 88.3 6AL_VPP_3FC, T = 6 89.0 Combining spatial stream. Recent work [29] demonstrates that combining appearance information learned from spatial stream can improve the performance of pure 3D CNN. We examine this issue and train a network with static RGB frames similar to [22] by inputting 256 × 256 frames and cropping them randomly into 224 × 224 regions. The VGG-16 [23] network pre-trained on ImageNet is fine-tuned on UCF101 and HMDB51 separately. Following good practice in [32], we apply weighted averaging of 0.4 and 0.6 for RGB and DANN scores, respectively. Table 4 reports the final results of our best model and its fusion with spatial stream on the three splits of both datasets. 6 Comparison with the state-of-the-art. Table 4 reports the best DANN model and state-of-the-art approaches over three splits on UCF101 and HMDB51 datasets in terms of video-level accuracy. As can be seen from Table 4, trajectory-based features are still competitive in the area of deep learning, especially with the help of high-order encodings or deep architectures. Fusion strategies often outperform pure single deep networks. Note that all the other deep networks use a pre-defined temporal length to generate video clip as input such as 16-frame [28] and 60-frame [29], while our DANN determines it in an adaptive manner. Combined with spatial stream, DANN achieves the accuracy of 65.9% and 91.6% on HMDB51 and UCF101, separately. Table 4: Comparison with the state-of-the-art on HMDB51 and UCF101 (over three splits). Method HMDB UCF Method HMDB UCF CNN Slow fusion [13] 65.4 Fusion Two-stream [22] 59.4 88.0 C3D [28] 85.2 CNN+deep LSTM [35] 88.6 Two-Stream(spatial) [22] 40.5 73.0 TDD [31] 63.2 90.3 Two-Stream(temporal) [22] 54.6 83.7 TDD+iDT [31] 65.9 91.5 LTC [29] 57.9 83.3 C3D+iDT [28] 90.4 Very deep (temporal) [32] 87.0 Very deep (two-stream) [32] 91.4 Very deep (spatial) [32] 87.0 LTC+spatial 61.5 88.6 Hand IDT+FV [30] 57.2 85.9 Ours DANN 63.3 89.2 IDT+HSV [19] 61.1 87.9 DANN+spatial 65.9 91.6 IDT+MIFS [16] 65.1 89.1 IDT+SFV [20] 66.8 4.3 Qualitative Analysis We present qualitative analysis of DANN and investigate where mistakes exist. We examine the perclass accuracies are computed and the difference between 6AL_VPP_3FC(T = 6) and B_6VC_3FC. The class with the largest improvement when 6AL_VPP_3FC(T = 6) is used instead of B_6VC_3FC is “bowling”. This action is composed of preparing for a few seconds and then throwing a bowl. The adaptive temporal choice determined by DANN can aggregate more reasonable semantic structures while B_6VC_3FC has to choose temporal size manually. Figure 6 illustrates sample frames from class “bowling”. It is clear that DANN is more likely to leverage reasonable video clips as network input. On the other hand, there are also a few classes that B_6VC_3FC outperforms 6AL_VPP_3FC(T = 6) such as “haircut”. We also illustrate its sample frames in Figure 6. We speculate this phenomenon is partly due to the rich contexts provided by 6AL_VPP_3FC(T = 6) are not fit to simple actions performed in simple background. Figure 6: Sample frames of “bowling” and “haircut”. For “bowling” 6AL_VPP_3FC(T = 6) segments video clips with 52 frames (Figure 2) which preserves temporal semantic structures. Such adaptive choice performs worse than baseline for “haircut”, where background and action are simple. 5 Conclusion and Future Work This paper introduces a deep alternative neural network (DANN) for action recognition. DANN stacks alternative layers which consists of a volumetric convolutional layer and a recurrent layer. To preserve motion structures in temporal domain, we present an adaptive method to determine the temporal size of network input and develop a volumetric pyramid pooling layer to resize the output before fully connected layers into fixed-size vector. We demonstrate the advantages of DANN on HMDB51 and UCF101 benchmarks and report competitive or superior results to the state-of-the-art. 7 There still remains some potential area of improvement. The most prominent one is the input size. Although in our model we use adaptive temporal length, the spatial size is still chosen in ad hoc manner. A more compact input such as action tube [7] of arbitrary size will be studied in the future, which only contains key actor and spatiotemporal movement regions. Acknowledgements. The work was supported by Shenzhen Peacock Plan (20130408-183003656). References [1] Thomas Brox, Andrés Bruhn, Nils Papenberg, and Joachim Weickert. High accuracy optical flow estimation based on a theory for warping. In ECCV, pages 25–36. 2004. [2] Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011. [3] Peter Dayan and Laurence F Abbott. Theoretical neuroscience, volume 806. Cambridge, MA: MIT Press, 2001. [4] Gustavo Deco and Tai Sing Lee. The role of early visual cortex in visual integration: a neural model of recurrent interaction. European Journal of Neuroscience, 20(4):1089–1100, 2004. [5] Jeffrey Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In ICCV, pages 2625–2634, 2015. [6] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jagannath Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pages 580–587, 2014. [7] Georgia Gkioxari and Jitendra Malik. Finding action tubes. In CVPR, pages 759–768, 2015. [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. TPAMI, 37(9):1904–1916, 2015. [9] David H Hubel and Torsten N Wiesel. Receptive fields of single neurones in the cat’s striate cortex. The Journal of physiology, 148(3):574–591, 1959. [10] David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962. [11] Shuiwang Ji, Wei Xu, Ming Yang, and Kai Yu. 3d convolutional neural networks for human action recognition. TPAMI, 35(1):221–231, 2013. [12] Vadim Kantorov and Ivan Laptev. Efficient feature extraction, encoding and classification for action recognition. In CVPR, pages 2593–2600, 2014. [13] Andrej Karpathy, George Toderici, Sachin Shetty, Tommy Leung, Rahul Sukthankar, and Li FeiFei. Large-scale video classification with convolutional neural networks. In CVPR, pages 1725–1732, 2014. [14] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [15] Hildegard Kuehne, Hueihan Jhuang, Estíbaliz Garrote, Tomaso Poggio, and Thomas Serre. Hmdb: a large video database for human motion recognition. In ICCV, pages 2556–2563, 2011. [16] Zhengzhong Lan, Ming Lin, Xuanchong Li, Alex G Hauptmann, and Bhiksha Raj. Beyond gaussian pyramid: Multi-skip feature stacking for action recognition. In CVPR, pages 204–212, 2015. [17] Ming Liang and Xiaolin Hu. Recurrent convolutional neural network for object recognition. In CVPR, pages 3367–3375, 2015. [18] Ming Liang, Xiaolin Hu, and Bo Zhang. Convolutional neural networks with intra-layer recurrent connections for scene labeling. In NIPS, pages 937–945, 2015. 8 [19] Xiaojiang Peng, Limin Wang, Xingxing Wang, and Yu Qiao. Bag of visual words and fusion methods for action recognition: Comprehensive study and good practice. arXiv preprint arXiv:1405.4506, 2014. [20] Xiaojiang Peng, Changqing Zou, Yu Qiao, and Qiang Peng. Action recognition with stacked fisher vectors. In ECCV, pages 581–595. 2014. [21] Pedro Pinheiro and Ronan Collobert. Recurrent convolutional neural networks for scene labeling. In ICML, pages 82–90, 2014. [22] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In NIPS, pages 568–576, 2014. [23] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [24] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. [25] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using lstms. In ICML, pages 843–852, 2015. [26] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages 1–9, 2015. [27] Graham W Taylor, Rob Fergus, Yann LeCun, and Christoph Bregler. Convolutional learning of spatio-temporal features. In ECCV, pages 140–153. 2010. [28] Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, pages 4489–4497, 2015. [29] Gül Varol, Ivan Laptev, and Cordelia Schmid. Long-term temporal convolutions for action recognition. arXiv preprint arXiv:1604.04494, 2016. [30] Heng Wang and Cordelia Schmid. Action recognition with improved trajectories. In ICCV, pages 3551–3558, 2013. [31] Limin Wang, Yu Qiao, and Xiaoou Tang. Action recognition with trajectory-pooled deepconvolutional descriptors. In CVPR, pages 4305–4314, 2015. [32] Limin Wang, Yuanjun Xiong, Zhe Wang, and Yu Qiao. Towards good practices for very deep two-stream convnets. arXiv preprint arXiv:1507.02159, 2015. [33] RL Waters and JM Morris. Electrical activity of muscles of the trunk during walking. Journal of anatomy, 111(Pt 2):191, 1972. [34] Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. [35] Joe Yue-Hei Ng, Matthew Hausknecht, Sudheendra Vijayanarasimhan, Oriol Vinyals, Rajat Monga, and George Toderici. Beyond short snippets: Deep networks for video classification. In CVPR, pages 4694–4702, 2015. [36] Christopher Zach, Thomas Pock, and Horst Bischof. A duality based approach for realtime tv-l 1 optical flow. In Pattern Recognition, pages 214–223. 2007. [37] Matthew D Zeiler and Rob Fergus. Stochastic pooling for regularization of deep convolutional neural networks. arXiv preprint arXiv:1301.3557, 2013. 9 | 2016 | 250 |
6,162 | Online ICA: Understanding Global Dynamics of Nonconvex Optimization via Diffusion Processes Chris Junchi Li Zhaoran Wang Han Liu Department of Operations Research and Financial Engineering, Princeton University {junchil, zhaoran, hanliu}@princeton.edu Abstract Solving statistical learning problems often involves nonconvex optimization. Despite the empirical success of nonconvex statistical optimization methods, their global dynamics, especially convergence to the desirable local minima, remain less well understood in theory. In this paper, we propose a new analytic paradigm based on diffusion processes to characterize the global dynamics of nonconvex statistical optimization. As a concrete example, we study stochastic gradient descent (SGD) for the tensor decomposition formulation of independent component analysis. In particular, we cast different phases of SGD into diffusion processes, i.e., solutions to stochastic differential equations. Initialized from an unstable equilibrium, the global dynamics of SGD transit over three consecutive phases: (i) an unstable Ornstein-Uhlenbeck process slowly departing from the initialization, (ii) the solution to an ordinary differential equation, which quickly evolves towards the desirable local minimum, and (iii) a stable Ornstein-Uhlenbeck process oscillating around the desirable local minimum. Our proof techniques are based upon Stroock and Varadhan’s weak convergence of Markov chains to diffusion processes, which are of independent interest. 1 Introduction For solving a broad range of large-scale statistical learning problems, e.g., deep learning, nonconvex optimization methods often exhibit favorable computational and statistical efficiency empirically. However, there is still a lack of theoretical understanding of the global dynamics of these nonconvex optimization methods. In specific, it remains largely unexplored why simple optimization algorithms, e.g., stochastic gradient descent (SGD), often exhibit fast convergence towards local minima with desirable statistical accuracy. In this paper, we aim to develop a new analytic framework to theoretically understand this phenomenon. The dynamics of nonconvex statistical optimization are of central interest to a recent line of work. Specifically, by exploring the local convexity within the basins of attraction, [1, 5–8, 10–13, 20– 22, 24–26, 31, 35, 36, 39, 46–58] establish local fast rates of convergence towards the desirable local minima for a variety statistical problems. Most of these characterizations of local dynamics are based on two decoupled ingredients from statistics and optimization: (i) the local (approximately) convex geometry of the objective functions, which is induced by the underlying statistical models, and (ii) adaptation of classical optimization analysis [19, 34] by incorporating the perturbations induced by nonconvex geometry as well as random noise. To achieve global convergence guarantees, they rely on various problem-specific approaches to obtain initializations that provably fall into the basins of attraction. Meanwhile, for some learning problems, such as phase retrieval and tensor decomposition for latent variable models, it is empirically observed that good initializations within the basins of attraction are not essential to the desirable convergence. However, it remains highly challenging to characterize the global dynamics, especially within the highly nonconvex regions outside the local basins of attraction. In this paper, we address this problem with a new analytic framework based on diffusion processes. In particular, we focus on the concrete example of SGD applied on the tensor decomposition formula30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. tion of independent component analysis (ICA). Instead of adapting classical optimization analysis accordingly to local nonconvex geometry, we cast SGD in different phases as diffusion processes, i.e., solutions to stochastic differential equations (SDE), by analyzing the weak convergence from discrete Markov chains to their continuous-time limits [17, 40]. The SDE automatically incorporates the geometry and randomness induced by the statistical model, which allows us to establish the exact dynamics of SGD. In contrast, classical optimization analysis only yields upper bounds on the optimization error, which are unlikely to be tight in the presence of highly nonconvex geometry, especially around the stationary points that have negative curvatures along certain directions. In particular, we identify three consecutive phases of the global dynamics of SGD, which is illustrated in Figure 1. (i) We consider the most challenging initialization at a stationary point with negative curvatures, which can be cast as an unstable equilibrium of the SDE. Within the first phase, the dynamics of SGD are characterized by an unstable Ornstein-Uhlenbeck process [2, 37], which departs from the initialization at a relatively slow rate and enters the second phase. (ii) Within the second phase, the dynamics of SGD are characterized by the exact solution to an ordinary differential equation. This solution evolves towards the desirable local minimum at a relatively fast rate until it approaches a small basin around the local minimum. (iii) Within the third phase, the dynamics of SGD are captured by a stable Ornstein-Uhlenbeck process [2, 37], which oscillates within a small basin around the local minimum. (i) (ii) (iii) Objective Value Time Local Minima Other Stationary Points Figure 1: Left: an illustration of the objective function for the tensor decomposition formulation of ICA. Note that here we use the spherical coordinate system and add a global offset of 2 to the objective function for better illustration. Right: An illustration of the three phases of diffusion processes. More related work. Our results are connected with a very recent line of work [3, 18, 27, 29, 38, 42– 45] on the global dynamics of nonconvex statistical optimization. In detail, they characterize the global geometry of nonconvex objective functions, especially around their saddle points or local maxima. Based on the geometry, they prove that specific optimization algorithms, e.g., SGD with artificial noise injection, gradient descent with random initialization, and second-order methods, avoid the saddle points or local maxima, and globally converge to the desirable local minima. Among these results, our results are most related to [18], which considers SGD with noise injection on ICA. Compared with this line of work, our analysis takes a completely different approach based on diffusion processes, which is also related to another line of work [14, 15, 30, 32, 33, 41]. Without characterizing the global geometry, we establish the global exact dynamics of SGD, which illustrate that, even starting from the most challenging stationary point, it may be unnecessary to use additional techniques such as noise injection, random initialization, and second-order information to ensure the desirable convergence. In other words, the unstable Ornstein-Uhlenbeck process within the first phase itself is powerful enough to escape from stationary points with negative curvatures. This phenomenon is not captured by the previous upper bound-based analysis, since previous upper bounds are relatively coarse-grained compared with the exact dynamics, which naturally give a sharp characterization simultaneously from upper and lower bounds. Furthermore, in Section 5 we will show that our sharp diffusion process-based characterization provides understanding on different phases of dynamics of our online/SGD algorithm for ICA. A recent work [29] analyzes an online principal component analysis algorithm based on the intuition gained from diffusion approximation. In this paper, we consider a different statistical problem with a rigorous characterization of the diffusion approximations in three separate phases. Our contribution. In summary, we propose a new analytic paradigm based on diffusion processes for characterizing the global dynamics of nonconvex statistical optimization. For SGD on ICA, we identify the aforementioned three phases for the first time. Our analysis is based on Stroock and Varadhan’s weak convergence of Markov chains to diffusion processes, which are of independent interest. 2 2 Background In this section we formally introduce a special model of independent component analysis (ICA) and the associated SGD algorithm. Let {X(i)}n i=1 be the data sample identically distributed as X 2 Rd. We make assumptions for the distribution of X as follows. Let k · k be the `2-norm of a vector. Assumption 1. There is an orthonormal matrix A 2 Rd⇥d such that X = AY , where Y 2 Rd is a random vector that has independent entries satisfying the following conditions: (i) The distribution of each Yi is symmetric about 0; (ii) There is a constant B such that kY k2 B; (iii) The Y1, . . . , Yd are independent with identical m moments for m 8, denoted by m ⌘EY m 1 ; (iv) The 1 = EYi = 0, 2 = EY 2 i = 1, ⌘ 4 6= 3. Assumption 1(iii) above is a generalization of i.i.d. tensor components. Let A = (a1, . . . , ad) whose columns form an orthonormal basis. Our goal is to estimate the orthonormal basis ai from online data X1, . . . , Xn. We first establish a preliminary lemma. Lemma 1. Let T = E(X⌦4) be the 4th-order tensor whose (i, j, k, l)-entry is E (XiXjXkXl). Under Assumption 1, we have T(u, u, u, u) ⌘E ! u>X "4 = 3 + ( −3) d X i=1 (a> i u)4. (2.1) Lemma 1 implies that finding ai’s can be cast into the solution to the following population optimization problem argmin −sign( −3) · E ! u>X "4 = argmin d X i=1 −(a> i u)4 subject to kuk = 1. (2.2) It is straightforward to conclude that all stable equilibria of (2.2) are ±ai whose number linearly grows with d. Meanwhile, by analyzing the Hessian matrices the set of unstable equilibria of (2.2) includes (but not limited to) all v⇤= d−1/2(±1, · · · , ±1), whose number grows exponentially as d increases [18, 44]. Now we introduce the SGD algorithm for solving (2.2) with finite samples. Let Sd−1 = {u : kuk = 1} be the unit sphere in Rd, and denote ⇧u = u/kuk for u 6= 0 the projection operator onto Sd−1. With appropriate initialization, the SGD for tensor method iteratively updates the estimator via the following Eq. (2.3): u(n) = ⇧ ⇢ u(n−1) + sign( −3) · β ⇣ u(n−1) >X(n)⌘3 X(n) ' . (2.3) The SGD algorithms that performs stochastic approximation using single online data sample in each update has the advantage of less temporal and spatial complexity, especially when d is high [18, 29]. An essential issue of this nonconvex optimization problem is how the algorithm escape from unstable equilibria. [18] provides a method of adding artificial noises to the samples, where the noise variables are uniformly sampled from Sd−1. In our work, we demonstrate that under some reasonable distributional assumptions, the online data provide sufficient noise for the algorithm to escape from the unstable equilibria. By symmetry, our algorithm in Eq. (2.3) converges to a uniformly random tensor component from d components. In order to solve the problem completely, one can repeatedly run the algorithm using different set of online samples until all tensor components are found. In the case where d is high, the well-known coupon collector problem [16] implies that it takes ⇡d log d runs of SGD algorithm to obtain all d tensor components. Remark. From Eq. (2.2) we see the tensor structure in Eq. (2.1) is unidentifiable in the case of = 3, see more discussion in [4, 18]. Therefore in Assumption 1 we rule out the value = 3 and call the value | −3| the tensor gap. The reader will see later that, analogous to eigengap in SGD algorithm for principal component analysis (PCA) [29], tensor gap plays a vital role in the time complexity in the algorithm analysis. 3 Markov Processes and Differential Equation Approximation To work on the approximation we first conclude the following proposition. 3 Proposition 1. The iteration u(n), n = 0, 1, . . . generated by Eq. (2.3) forms a discrete-time, timehomogeneous Markov process that takes values on Sd−1. Furthermore, u(n) holds strong Markov property. For convenience of analysis we use the transformed iteration v(n) ⌘A>u(n) in the rest of this paper. The update equation in Eq. (2.3) is equivalently written as v(n) = A>u(n) = ⇧ ⇢ A>u(n−1) ± β ⇣ u(n−1) >AA>X(n)⌘3 A>X(n) ' = ⇧ ⇢ v(n−1) ± β ⇣ v(n−1) >Y (n)⌘3 Y (n) ' . (3.1) Here ±β has the same sign with −3. It is obvious from Proposition 1 that the (strong) Markov property applies to v(n), and one can analyze the iterates v(n) generated by Eq. (3.1) from a perspective of Markov processes. Our next step is to conclude that as the stepsize β ! 0+, the iterates generated by Eq. (2.3), under the time scaling that speeds up the algorithm by a factor β−1, can be globally approximated by the solution to the following ODE system. To characterize such approximation we use theory of weak convergence to diffusions [17, 40] via computing the infinitesimal mean and variance for SGD for the tensor method. We remind the readers of the definition of weak convergence Zβ ) Z in stochastic processes: for any 0 t1 < t2 < · · · < tn the following convergence in distribution occurs as β ! 0+ ! Zβ(t1), Zβ(t2), . . . , Zβ(tn) " d −! (Z(t1), Z(t2), . . . , Z(tn)) . To highlight the dependence on β we add it in the superscipts of iterates vβ,(n) = v(n). Recall that btβ−1c is the integer part of the real number tβ−1. Theorem 1. If for each k = 1, . . . , d, as β ! 0+ vβ,(0) k converges weakly to some constant scalar V o k then the Markov process vβ,(btβ−1c) k converges weakly to the solution of the ODE system dVk dt = | −3| Vk V 2 k − d X i=1 V 4 i ! , k = 1, . . . , d, (3.2) with initial values Vk(0) = V o k . To understand the complex ODE system in Eq. (3.2) we first investigate into the case of d = 2. Consider a change of variable V 2 1 (t) we have by chain rule in calculus and V 2 2 = 1 −V 2 1 the following derivation: dV 2 1 dt = 2V1 · dV1 dt = 2V1 · | −3| V1 ! V 2 1 −V 4 1 −V 4 2 " = 2 | −3| V 2 1 ! V 2 1 −V 4 1 −(1 −V 2 1 )2" = −2 | −3| V 2 1 ✓ V 2 1 −1 2 ◆ (V 2 1 −1). (3.3) Eq. (3.3) is an autonomous, first-order ODE for V 2 1 . Although this equation is complex, a closed-form solution is available: V 2 1 (t) = 0.5 ± 0.5(1 + C exp (−| −3|t))−0.5, and V 2 2 (t) = 1 −V 2 1 (t), where the choices of ± and C depend on the initial value. The above solution allows us to conclude that if the initial vector (V o 1 )2 < (V o 2 )2 (resp. (V o 1 )2 > (V o 2 )2), then it approaches to 1 (resp. 0) as t ! 1. This intuition can be generalized to the case of higher d that the ODE system in Eq. (3.2) converges to the coordinate direction ±ek if (V o k )2 is strictly maximal among (V o 1 )2, . . . , (V o d )2 in the initial vector. To estimate the time of traverse we establish the following Proposition 2. Proposition 2. Fix δ 2 (0, 1/2) and the initial value Vk(0) = V o k that satisfies (V o k0)2 ≥2(V o k )2 for all 1 k d, k 6= k0, then there is a constant (called traverse time) T that depends only on d, δ such that V 2 k0(T) ≥1 −δ. Furthermore T has the following upper bound: let y(t) solution to the following auxillary ODE dy dt = y2 (1 −y) , (3.4) with y(0) = 2/(d + 1). Let T0 be the time that y(T0) = 1 −δ. Then T | −3|−1T0 | −3|−1 ! d −3 + 4 log(2δ)−1" . (3.5) 4 Proposition 2 concludes that, by admitting a gap of 2 between the largest (V o k0)2 and second largest (V o k )2, k 6= k0 the estimate on traverse time can be given, which is tight enough for our purposes in Section 5. Remark. In an earlier paper [29] which focuses on the SGD algorithm for PCA, when the stepsize is small, the algorithm iteration is approximated by the solution to ODE system after appropriate time rescaling. The approximate ODE system for SGD for PCA is dVk dt = −2Vk d X i=1 (λk −λi)V 2 i , k = 1, . . . , d. (3.6) The analysis there also involves computation of infinitesimal mean and variance for each coordinate as the stepsize β ! 0+ and theory of convergence to diffusions [17, 40]. A closed-form solution to Eq. (3.6) is obtained in [29], called the generalized logistic curves. In contrast, to our best knowledge a closed-form solution to Eq. (3.2) is generally not available. 4 Local Approximation via Stochastic Differential Equation The ODE approximation in Section 3 is very informative: it characterizes globally the trajectory of our algorithm for ICA or tensor method in Eq. (2.3) with O(1) approximation errors. However it fails to characterize the behavior near equilibria where the gradients in our ODE system are close to zero. For instance, if the SGD algorithm starts from v⇤, on a microscopic magnitude of O(β1/2) the noises generated by online samples help escaping from a neighborhood of v⇤. Our main goal in this section is to demonstrate that under appropriate spatial and temporal scalings, the algorithm iteration converges locally to the solution to certain stochastic differential equations (SDE). We provide the SDE approximations in two scenarios, separately near an arbitrary tensor component (Subsection 4.1) which indicates that our SGD for tensor method converges to a local minimum at a desirable rate, and a special local maximum (Subsection 4.2) which implies that the stochastic nature of our SGD algorithm for tensor method helps escaping from unstable equilibria. Note that in the algorithm iterates, the escaping from stationary points occurs first, followed by the ODE and then by the phase of convergence to local minimum. We discuss this further in Section 5. 4.1 Neighborhood of Local Minimizers To analyze the behavior of SGD for tensor method we first consider the case where the iterates enter a neighborhood of one local minimizer, i.e. the tensor component. Since the tensor decomposition in Eq. (2.2) is full-rank and symmetric, we consider without loss of generality the neighborhood near e1 the first tensor component. The following Theorem 2 indicates that under appropriate spatial and temporal scalings, the process admits an approximation by Ornstein-Uhlenbeck process. Such approximation is characterized rigorously using weak convergence theory of Markov processes [17, 40]. The readers are referred to [37] for fundamental topics on SDE. Theorem 2. If for each k = 2, . . . , d, β−1/2vβ,(0) k converges weakly to U o k 2 (0, 1) as β ! 0+ then the stochastic process β−1/2vβ,(btβ−1c) k converges weakly to the solution of the stochastic differential equation dUk(t) = −| −3| Uk(t)dt + 1/2 6 dBk(t), (4.1) with initial values Uk(0) = U o k. Here Bk(t) is a standard one-dimensional Brownian motion. We identify the solution to Eq. (4.1) as an Ornstein-Uhlenbeck process which can be expressed in terms of a Itô integral, with Uk(t) = U o k exp (−| −3|t) + 1/2 6 Z t 0 exp (−| −3|(t −s)) dBk(s). (4.2) Itô isometry along with mean-zero property of Itô integral gives E(Uk(t))2 = (U o k)2 exp (−2| −3|t) + 6 Z t 0 exp (−2| −3|(t −s)) ds = 6 2| −3| + ✓ (U o k)2 − 6 2| −3| ◆ exp (−2| −3|t) , which, by taking the limit t ! 1, approaches 6/(2| −3|). From the above analysis we conclude that the Ornstein-Uhlenbeck process has the mean-reverting property that its mean decays exponentially towards 0 with persistent fluctuations at equilibrium. 5 4.2 Escape from Unstable Equilibria In this subsection we consider SGD for tensor method that starts from a sufficiently small neighborhood of a special unstable equilibrium. We show that after appropriate rescalings of both time and space, the SGD for tensor iteration can be approximated by the solution to a second SDE. Analyzing the approximate SDE suggests that our SGD algorithm iterations can get rid of the unstable equilibria (including local maxima and stationary points with negative curvatures) whereas the traditional gradient descent (GD) method gets stuck. In other words, under weak distributional assumptions the stochastic gradient plays a vital role that helps the escape. As a illustrative example, we consider the special stationary points v⇤= d−1/2(±1, . . . , ±1). Consider a submanifold SF ✓Sd−1 where SF = v 2 Sd−1 : there exists 1 k < k0 d such that v2 k = v2 k0 = max1id v2 i . In words, SF consists of all v 2 Sd−1 where the maximum of v2 k is not unique. In the case of d = 3, it is illustrated by Figure 1 that SF is the frame of a 3-dimenisional box, and hence we call SF the frame. Let W β kk0(t) = β−1/2 log ! vβ,(btβ−1c) k "2 −β−1/2 log ! vβ,(btβ−1c) k0 "2, (4.3) The reason we study W β kk0(t) is that these d(d −1) functions of v 2 Sd−1 form a local coordinate map around v⇤and further characterize the distance between v and SF on a spatial scale of β1/2. We define the positive constant ⇤d, as ⇤2 d, = 8d−2 ! 8 + (16d −28) 6 + 15d 2 4 −5(72d2 −228d + 175) 4 + 15(2d −7)(d −2)(d −3) " . (4.4) We have our second SDE approximation result as follows. Theorem 3. Let W β kk0(t) be defined as in Eq. (4.3), and let ⇤d, be as in Eq. (4.4). If for each distinct k, k0 = 1, . . . , d, W β kk0(0) converges weakly to W o kk0 2 (0, 1) as β ! 0+ then the stochastic process W β kk0(t) converges weakly to the solution of the stochastic differential equation dWkk0(t) = 2 | −3| d Wkk0(t)dt + ⇤d, dBkk0(t) (4.5) with initial values Wkk0(0) = W o kk0. Here Bkk0(t) is a standard one-dimensional Brownian motion. We can solve Eq. (4.5) and obtain an unstable Ornstein-Uhlenbeck process as Wkk0(t) = ✓ W o kk0 + ⇤d, Z t 0 exp ✓ −2 | −3| d s ◆ dBkk0(s) ◆ exp ✓2 | −3| d t ◆ . (4.6) Let Ckk0 be defined as Ckk0 ⌘W o kk0 + ⇤d, Z 1 0 exp ✓ −4 | −3| d s ◆ dBkk0(s). (4.7) We conclude that the following holds. (i) Ckk0 is a normal variable with mean W o kk0 and variance d⇤2 d, / (4 | −3|); (ii) When t is large Wkk0(t) has the following approximation Wkk0(t) ⇡Ckk0 exp ✓2 | −3| d t ◆ . (4.8) To verify (i) above we have the Itô integral in Eq. (4.6) E ✓ ⇤d, Z 1 0 exp ✓ −2 | −3| d s ◆ dBkk0(s) ◆ = 0, and by using Itô isometry E ✓ ⇤d, Z 1 0 exp ✓ −2 | −3| d s ◆ dBkk0(s) ◆2 = ⇤2 d, Z t 0 exp ✓ −4 | −3| d s ◆ ds ⇡⇤2 d, Z 1 0 exp ✓ −4 | −3| d s ◆ ds = d⇤2 d, 4 | −3|. The analysis above on the unstable Ornstein-Uhlenbeck process indicates that the process has the momentum nature that when t is large, it can be regarded as at a normally distributed location centered at 0 and grows exponentially. In Section 5 we will see how the result in Theorem 3 provides explanation on the escape from unstable equilibria. 6 5 Phase Analysis In this section, we utilize the weak convergence results in Sections 3 and 4 to understand the dynamics of online ICA in different phases. For purposes of illustration and brevity, we restrict ourselves to the case of starting point v⇤, a local maxima that has negative curvatures in every direction. In below we denote by Zβ ⇣W β as β ! 0+ when the limit of ratio Zβ/W β ! 1. Phase I (Escape from unstable equilibria). Assume we start from v⇤, then W o kk0 = 0 for all k 6= k0. We have from Eqs. (4.6) and (4.7) that log v(n) k v(n) k0 !2 = β1/2W β kk0(nβ) ⇡ β d⇤2 d, 4 | −3| !1/2 χkk0 exp ✓2 | −3| d · βn ◆ . (5.1) Suppose k1 is the index that maximizes ⇣ v (N β 1 ) k ⌘2 and k2 maximizes ⇣ v (N β 1 ) k ⌘2 , k 6= k1. Then by Eq. (5.1) we know χk1k2 is positive. By setting log ⇣ v (N β 1 ) k1 ⌘2 −log ⇣ v (N β 1 ) k2 ⌘2 = log 2, we have from the construction in the proof of Theorem 3 that as β ! 0+ N β 1 = 1 2 | −3|−1 dβ−1 log 0 @ β d⇤2 d, 4 | −3| !−1/2 χ−1 k1k2 log 2 1 A ⇣1 4 | −3|−1 dβ−1 log ! β−1" . Phase II (Deterministic traverse). By (strong) Markov property we can restart the counter of iteration, we have the max and second max ⇣ v(0) k1 ⌘2 = 2 ⇣ v(0) k2 ⌘2 , Proposition 2 implies that it takes time T | −3|−1 ! d −3 + 4 log(2δ)−1" , for the ODE to traverse from V 2 1 = 2/(d + 1) = 2V 2 k for k > 1. Converting to the timescale of the SGD, the second phase has the following relations as β ! 0+ N β 2 ⇣Tβ−1 | −3|−1 ! d −3 + 4 log(2δ)−1" β−1. Phase III (Convergence to stable equilibria). Again restart our counter. We have from the approximation in Theorem 3 and Eq. (4.2) that E(v(n) k )2 = (v(0) k )2 exp (−2| −3|βn) + β 6 Z βn 0 exp (−2| −3|(t −s)) ds = β 6 2| −3| + ✓ (v(0) k )2 − β 6 2| −3| ◆ exp (−2β| −3|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 ODE phase implies that E sin2 \(v(0), e1) = δ, and hence E sin2 \(v(n), e1) = β(d −1) 6 2| −3| + ✓ δ −β(d −1) 6 2| −3| ◆ exp (−2β| −3|n) . By setting E sin2 \(v(N β 3 ), e1) = (C0 + 1) · β(d −1) 6 2| −3| , we conclude that as β ! 0+ N β 3 = 1 2β| −3| log ✓ β−1 · 2| −3|δ −β(d −1) 6 C0(d −1) 6 ◆ ⇣1 2| −3|−1β−1 log ! β−1" . 6 Summary and discussions In this paper, we take online ICA as a first step towards understanding the global dynamics of stochastic gradient descent. For general nonconvex optimization problems such as training deep networks, phaseretrieval, dictionary learning and PCA, we expect similar multiple-phase phenomenon. It is believed 7 that the flavor of asymptotic analysis above can help identify a class of stochastic algorithms for nonconvex optimization with statistical structure. Our continuous-time analysis also reflects the dynamics of the algorithm in discrete time. This is substantiated by Theorems 1, 2 and 3 which rigorously characterize the convergence of iterates to ODE or SDE by shifting to different temporal and spatial scales. In detail, our results imply when β ! 0+: Phase I takes iteration number N β 1 ⇣(1/4)| −3|−1d · β−1 log(β−1); Phase II takes iteration number N β 2 ⇣| −3|−1d · β−1; Phase III takes iteration number N β 3 ⇣(1/2)| −3|−1 · β−1 log(β−1). After the three phases, the iteration reaches a point that is C · ! 6| −3|−1 · dβ "1/2 distant on average to one local minimizer. 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 [28, Chap. 18]. In words, the Phase II where the objective value in Eq. (2.2) drops from 1 −" to " is a short-time phase compared to Phases I and III, so the convergence curve illustrated in the right figure in Figure 1 instead of an exponentially decaying curve. As β ! 0+ we have N β 1 /N β 3 ⇣d/2, which suggests that Phase I of escaping from unstable equlibria dominates Phase III by a factor of d/2. References [1] Agarwal, A., Anandkumar, A., Jain, P. and Netrapalli, P. (2013). Learning sparsely used overcomplete dictionaries via alternating minimization. arXiv preprint arXiv:1310.7991. [2] Aldous, D. (1989). Probability approximations via the Poisson clumping heuristic. Applied Mathematical Sciences, 77. [3] Anandkumar, A. and Ge, R. (2016). Efficient approaches for escaping higher order saddle points in non-convex optimization. arXiv preprint arXiv:1602.05908. [4] Anandkumar, A., Ge, R., Hsu, D., Kakade, S. M. and Telgarsky, M. (2014). Tensor decompositions for learning latent variable models. Journal of Machine Learning Research, 15 2773–2832. [5] Anandkumar, A., Ge, R. and Janzamin, M. (2014). Analyzing tensor power method dynamics in overcomplete regime. arXiv preprint arXiv:1411.1488. [6] Arora, S., Ge, R., Ma, T. and Moitra, A. (2015). Simple, efficient, and neural algorithms for sparse coding. arXiv preprint arXiv:1503.00778. [7] Balakrishnan, S., Wainwright, M. J. and Yu, B. (2014). Statistical guarantees for the EM algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156. [8] Bhojanapalli, S., Kyrillidis, A. and Sanghavi, S. (2015). Dropping convexity for faster semi-definite optimization. arXiv preprint arXiv:1509.03917. [9] Bronshtein, I. N. and Semendyayev, K. A. (1998). Handbook of mathematics. Springer. [10] Cai, T. T., Li, X. and Ma, Z. (2015). Optimal rates of convergence for noisy sparse phase retrieval via thresholded Wirtinger flow. arXiv preprint arXiv:1506.03382. [11] Candès, E., Li, X. and Soltanolkotabi, M. (2014). Phase retrieval via Wirtinger flow: Theory and algorithms. arXiv preprint arXiv:1407.1065. [12] Chen, Y. and Candès, E. (2015). Solving random quadratic systems of equations is nearly as easy as solving linear systems. In Advances in Neural Information Processing Systems. [13] Chen, Y. and Wainwright, M. J. (2015). Fast low-rank estimation by projected gradient descent: General statistical and algorithmic guarantees. arXiv preprint arXiv:1509.03025. [14] Darken, C. and Moody, J. (1991). Towards faster stochastic gradient search. In Advances in Neural Information Processing Systems. [15] De Sa, C., Olukotun, K. and Ré, C. (2014). Global convergence of stochastic gradient descent for some non-convex matrix problems. arXiv preprint arXiv:1411.1134. [16] Durrett, R. (2010). Probability: Theory and examples. Cambridge University Press. [17] Ethier, S. N. and Kurtz, T. G. (1985). Markov processes: Characterization and convergence, vol. 282. John Wiley & Sons. [18] Ge, R., Huang, F., Jin, C. and Yuan, Y. (2015). Escaping from saddle points — online stochastic gradient for tensor decomposition. arXiv preprint arXiv:1503.02101. [19] Golub, G. H. and Van Loan, C. F. (2012). Matrix computations. JHU Press. [20] Gu, Q., Wang, Z. and Liu, H. (2014). Sparse PCA with oracle property. In Advances in neural information processing systems. [21] Gu, Q., Wang, Z. and Liu, H. (2016). Low-rank and sparse structure pursuit via alternating minimization. In International Conference on Artificial Intelligence and Statistics. [22] Hardt, M. (2014). Understanding alternating minimization for matrix completion. In Foundations of Computer Science. [23] Hirsch, M. W., Smale, S. and Devaney, R. L. (2012). Differential equations, dynamical systems, and an introduction to chaos. Academic Press. 8 [24] Jain, P., Jin, C., Kakade, S. M. and Netrapalli, P. (2015). Computing matrix squareroot via non convex local search. arXiv preprint arXiv:1507.05854. [25] Jain, P. and Netrapalli, P. (2014). Fast exact matrix completion with finite samples. arXiv preprint arXiv:1411.1087. [26] Jain, P., Netrapalli, P. and Sanghavi, S. (2013). Low-rank matrix completion using alternating minimization. In Symposium on Theory of Computing. [27] Lee, J. D., Simchowitz, M., Jordan, M. I. and Recht, B. (2016). Gradient descent converges to minimizers. arXiv preprint arXiv:1602.04915. [28] Levin, D. A., Peres, Y. and Wilmer, E. L. (2009). Markov chains and mixing times. American Mathematical Society. [29] Li, C. J., Wang, M., Liu, H. and Zhang, T. (2016). Near-optimal stochastic approximation for online principal component estimation. arXiv preprint arXiv:1603.05305. [30] Li, Q., Tai, C. et al. (2015). Dynamics of stochastic gradient algorithms. arXiv preprint arXiv:1511.06251. [31] Loh, P.-L. and Wainwright, M. J. (2015). Regularized M-estimators with nonconvexity: Statistical and algorithmic theory for local optima. Journal of Machine Learning Research, 16 559–616. [32] Mandt, S., Hoffman, M. D. and Blei, D. M. (2016). A variational analysis of stochastic gradient algorithms. arXiv preprint arXiv:1602.02666. [33] Mobahi, H. (2016). Training recurrent neural networks by diffusion. arXiv preprint arXiv:1601.04114. [34] Nesterov, Y. (2004). Introductory lectures on convex optimization: A basic course, vol. 87. Springer. [35] Netrapalli, P., Jain, P. and Sanghavi, S. (2013). Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems. [36] Netrapalli, P., Niranjan, U., Sanghavi, S., Anandkumar, A. and Jain, P. (2014). Non-convex robust pca. In Advances in Neural Information Processing Systems. [37] Oksendal, B. (2003). Stochastic differential equations. Springer. [38] Panageas, I. and Piliouras, G. (2016). Gradient descent converges to minimizers: The case of non-isolated critical points. arXiv preprint arXiv:1605.00405. [39] Qu, Q., Sun, J. and Wright, J. (2014). Finding a sparse vector in a subspace: Linear sparsity using alternating directions. In Advances in Neural Information Processing Systems. [40] Stroock, D. W. and Varadhan, S. S. (1979). Multidimensional diffusion processes, vol. 233. Springer. [41] Su, W., Boyd, S. and Candès, E. (2014). A differential equation for modeling Nesterov’s accelerated gradient method: Theory and insights. In Advances in Neural Information Processing Systems. [42] Sun, J., Qu, Q. and Wright, J. (2015). Complete dictionary recovery over the sphere i: Overview and the geometric picture. arXiv preprint arXiv:1511.03607. [43] Sun, J., Qu, Q. and Wright, J. (2015). Complete dictionary recovery over the sphere ii: Recovery by Riemannian trust-region method. arXiv preprint arXiv:1511.04777. [44] Sun, J., Qu, Q. and Wright, J. (2015). When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096. [45] Sun, J., Qu, Q. and Wright, J. (2016). A geometric analysis of phase retrieval. arXiv preprint arXiv:1602.06664. [46] Sun, R. and Luo, Z.-Q. (2015). Guaranteed matrix completion via nonconvex factorization. In Foundations of Computer Science. [47] Sun, W., Lu, J., Liu, H. and Cheng, G. (2015). Provable sparse tensor decomposition. arXiv preprint arXiv:1502.01425. [48] Sun, W., Wang, Z., Liu, H. and Cheng, G. (2015). Non-convex statistical optimization for sparse tensor graphical model. In Advances in Neural Information Processing Systems 28. [49] Tan, K. M., Wang, Z., Liu, H. and Zhang, T. (2016). Sparse generalized eigenvalue problem: Optimal statistical rates via truncated rayleigh flow. arXiv preprint arXiv:1604.08697. [50] Tu, S., Boczar, R., Soltanolkotabi, M. and Recht, B. (2015). Low-rank solutions of linear matrix equations via procrustes flow. arXiv preprint arXiv:1507.03566. [51] Wang, Z., Gu, Q., Ning, Y. and Liu, H. (2015). High dimensional EM algorithm: Statistical optimization and asymptotic normality. In Advances in Neural Information Processing Systems. [52] Wang, Z., Liu, H. and Zhang, T. (2014). Optimal computational and statistical rates of convergence for sparse nonconvex learning problems. Annals of statistics, 42 2164. [53] Wang, Z., Lu, H. and Liu, H. (2014). Nonconvex statistical optimization: Minimax-optimal sparse PCA in polynomial time. arXiv preprint arXiv:1408.5352. [54] White, C. D., Sanghavi, S. and Ward, R. (2015). The local convexity of solving systems of quadratic equations. arXiv preprint arXiv:1506.07868. [55] Yang, Z., Wang, Z., Liu, H., Eldar, Y. C. and Zhang, T. (2015). Sparse nonlinear regression: Parameter estimation and asymptotic inference under nonconvexity. arXiv preprint arXiv:1511.04514. [56] Zhang, Y., Chen, X., Zhou, D. and Jordan, M. I. (2014). Spectral methods meet em: A provably optimal algorithm for crowdsourcing. In Advances in neural information processing systems. [57] Zhao, T., Wang, Z. and Liu, H. (2015). A nonconvex optimization framework for low rank matrix estimation. In Advances in Neural Information Processing Systems. [58] Zheng, Q. and Lafferty, J. (2015). A convergent gradient descent algorithm for rank minimization and semidefinite programming from random linear measurements. arXiv preprint arXiv:1506.06081. 9 | 2016 | 251 |
6,163 | Spatio–Temporal Hilbert Maps for Continuous Occupancy Representation in Dynamic Environments Ransalu Senanayake University of Sydney rsen4557@uni.sydney.edu.au Lionel Ott University of Sydney lionel.ott@sydney.edu.au Simon O’Callaghan Data61/CSIRO, Australia simon.ocallaghan@data61.csiro.au Fabio Ramos University of Sydney fabio.ramos@sydney.edu.au Abstract We consider the problem of building continuous occupancy representations in dynamic environments for robotics applications. The problem has hardly been discussed previously due to the complexity of patterns in urban environments, which have both spatial and temporal dependencies. We address the problem as learning a kernel classifier on an efficient feature space. The key novelty of our approach is the incorporation of variations in the time domain into the spatial domain. We propose a method to propagate motion uncertainty into the kernel using a hierarchical model. The main benefit of this approach is that it can directly predict the occupancy state of the map in the future from past observations, being a valuable tool for robot trajectory planning under uncertainty. Our approach preserves the main computational benefits of static Hilbert maps — using stochastic gradient descent for fast optimization of model parameters and incremental updates as new data are captured. Experiments conducted in road intersections of an urban environment demonstrated that spatio-temporal Hilbert maps can accurately model changes in the map while outperforming other techniques on various aspects. 1 Introduction We are in the climax of driverless vehicles research where the perception and learning are no longer trivial problems due to the transition from controlled test environments to real world complex interactions with other road users. Online mapping environments is vital for action planing. In such applications, the state of the observed world with respect to the vehicle changes over time, making modeling and predicting into the future challenging. Despite this, there is a plethora of mapping techniques for static environments but only very few instances of truly dynamic mapping methods. Most existing techniques merely consider a static representation, and as parallel processes, initialize target trackers for the dynamic objects in the scene, updating the map with new information. This approach can be effective from a computational point of view, but it disregards crucial relationships between time and space. By treating the dynamics as a separate problem from the space representation, such methods cannot perform higher level inference tasks such as what are the most likely regions of the environment to be occupied in the future, or when and where a dynamic object is most likely to appear. In occupancy grid maps (GM) [1], the space is divided into a fixed number of non-overlapping cells and the likelihood of occupancy for each individual cell is estimated independently based on sensor measurements. Considering the main drawbacks of the GM, discretization of the world and disregarding spatial relationship among cells, Gaussian process occupancy map (GPOM) [2] enabled 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. continuous probabilistic representation. In spite of its profound formulation, it is less pragmatic for online learning due to O(N 3) computational cost in both learning and inference, where N is the number of data points. Recently, as an alternative, static Hilbert maps (SHMs) [3, 4] was proposed, borrowing the two main advantages of GPOMs but at a much lower computational cost. As a parametric technique, SHMs have a constant cost for updating the model with new observations. Additionally, the parameters can be learned using stochastic gradient descent (SGD) which made it computationally attractive and capable of handling large datasets. Nonetheless, all these techniques assume a static environment. Although attempts to adapt occupancy grid maps to dynamic environments and identify periodic patterns exist [5], to the best of our knowledge, only dynamic Gaussian processes occupancy maps (DGPOM) [6] can model occupancy in dynamic environments in a continuous fashion. There, velocity estimates are linearly added to the inputs of the GP kernel. This approach, similar to the proposed method, can make occupancy predictions into the future. However, being a non-parametric model, the cost of inverting the covariance matrix in DGPOM grows over time and hence the model cannot be run in real-time. In this paper, we propose a method for building continuous spatio-temporal Hilbert maps (STHM) using “hinged” features. This method builds on the main ideas behind SHM and generalize it to dynamic environments. To this end, we formulate a novel methodology to permeate the variability in the temporal domain into the spatial domain, rather than considering time merely as another dimension. This approach can be used to predict the occupancy state of the world, interpolating not only in space but also in time. The representation is demonstrated in highly dynamic urban environments of busy intersections with cars moving and turning in both directions obeying traffic lights. In Section 2, we lay the foundation by introducing SHMs and then, we discuss the proposed method in Section 3, followed by experiments and discussions in Section 4. 2 Static Hilbert maps (SHMs) A static Hilbert map (SHM) [3] is a continuous probabilistic occupancy representation of the space, given a collection of range sensor measurements. As in almost all autonomous vehicles, we assume a training dataset consisting of locations with associated occupancy information obtained from a range sensor — in the case of a laser scanner (i.e. LIDAR), points along the beam are unoccupied while the end point is occupied — the model predicts the occupancy state of different locations given by query points. The SHM model: Formally, let the training dataset be defined as D = {xi, yi}N i=1 with xi ∈RD being a point in 2D or 3D space, and yi ∈{−1, +1} the associated occupancy status. SHM predicts the probability of occupancy for a new point x∗calculated as p(y∗|x∗, w, D), given a set of parameters w and the dataset D. This discriminative model takes the form of a logistic regression classifier with an elastic net regularizer operating on basis functions mapping the point coordinates to a Hilbert space defined by a kernel k(x, x′) : X × X →R where x, x′ ∈X = {location}. This is equivalent to kernel logistic regression [7] which is known to be computationally expensive due to the need of computing the kernel matrix between all points in the dataset. The crucial insight to make the method computationally efficient is to first approximate the kernel by a dot product of basis functions such that k(x, x′) ≈Φ(x)⊤Φ(x′). This can be done using the random kitchen sinks procedure [8, 9] or by directly defining efficient basis functions. Note that, [3] assumes a linear machine w⊤Φ(x). Learning w is done by minimizing the regularized negative-log-likelihood using stochastic gradient descent (SGD) [10]. The probability that a query point x∗is not occupied is given by p(y∗= −1|x∗, w, D) = 1 + exp(w⊤Φ(x∗)) −1, while the probability of being occupied is given by p(y∗= +1|x∗, w, D) = 1 −p(y∗= −1|x∗, w, D). 3 Spatio-temporal hinged features (HF-STHM) In this section, SHMs are generalized into the spatio-temporal domain. Though augmenting the inputs of the SHM kernel X = {location} as X = {(location, time)} or X = {(location, time, velocity)} is the naive method to build instantaneous maps, they cannot be used for predicting into the future mainly because they are not cable of capturing complex and miscellaneous spatio-temporal dependencies. As discussed in Section 3.3, in our approach, the uncertainty of 2 Figure 1: Motion centroids are collected over time from raw data (Section 3.1) and individual GPs are trained (input: centroids, output: motion information) to learn GP-hyperparameters (Section 3.2 and Figure 4). Then, the motion of data points at time t∗(= 0 for present, > 0 for future, < 0 for past) are queried using the trained GPs and this motion distribution is fed into the kernel (Section 3.3). This implicitly embeds motion information into the spatial observations. Then a kernelized logistic regression model logistic(w⊤Φ) is trained to learn w. For a new query point in space, Φ(longitude, latitude) is calculated using Equation 6 followed by sigmoidal(w⊤Φ) to obtain the occupancy probability. These steps are repeated for each new laser scan. dynamic objects is incorporated into the map. This uncertainty is estimated using an underlying Gaussian process (GP) regression model described in Section 3.2. The inputs for the GP are obtained using a further underlying model based on motion cluster data association which is discussed in Section 3.1. This way, locations are no more deterministic but each location has a probability distribution and hence the kernel inputs become X = {mean and variance of location}. Sections 3.1–3.3 explain this three-step hierarchical framework in the bottom-to-top approach which are executed sequentially as new data are received. The method is summarized in Figure 1. Assumptions: WOLOG, we assume that the sensor is not moving; the general case where the sensor moves is trivial if the motion of the platform is known. From a robotics perspective, we treat localization as a separate process and assume it is given for the purpose of introducing the method. Notation: In this section, unless otherwise stated, input x = (x, y, t) are the longitude, latitude and time components and, s = (x, y) are merely the spatial coordinates. A motion vector (displacement) is denoted by v = (vx, vy), where vx and vy are the motion in x and y directions, respectively. A motion field is a mapping from space and time to a motion vector, (x, y, t) 7→(vx, vy). 3.1 Motion observations As the first step, motion observations are extracted from laser scans. Due to occlusions and sensor noise, extracting dynamic parts of a scene is not straightforward. Similarly, as the shapes of observed objects change over time (because the only measurement in laser is depth), morphology based object tracking algorithms and optical flow [11, 12] which are commonly used in computer vision are unsuitable. Therefore, we devise as a method that is robust to occlusions and noise without relying on the shape of the objects present in the scene. To obtain motion observations, taking raw laser scans as inputs and output motion vectors, the following two steps are performed. 3.1.1 Computing centroids of dynamic objects As shown in Figure 2, firstly, a SHM is built from the raw scanner data at time t and then it is binarized to produce a grid map containing occupied and free cells. Based on this grid map, observable areas where dynamic objects can appear are extracted. Next, dynamic objects are obtained by performing logical conjunction between an adaptive binary mask and the raw laser data. The final step is the computation of the centroid for each of these components. 3.1.2 Associating centroids of consecutive frames Having obtained N centroids for frame t and, M centroids for frame t −1 from the previous step, we formulate the centroid–association as the integer program in Equation 1. 3 (a) (b) Figure 2: The various steps involved in computing motion observations discussed in Section 3.1 is shown in (a). The mask (lower left of (b)) is generated by applying morphological operations to the raw scans (top row). Taking the intersection between the mask and a raw scan yields the potential dynamic objects in a scene at a given time (middle row). The final centroid association of such connected components across two consecutive frames is shown in the bottom right frame. minimize M X i=1 N X j=1 dijaij (1a) subject to M X i=1 aij = 1, j = 1, . . . , N (1b) N X j=1 aij = 1, i = 1, . . . , M (1c) aij ∈{0, 1}, (1d) where dij is the Euclidean distance between two centroids and aij are the elements of the assignment matrix. In order to obtain valid assignment solutions aij, we impose that only one centroid from frame t can be assigned to one centroid in frame t −1, Equation 1b, and the vice versa with Equation 1c. Finally, we only allow integer solutions, Equation 1d. The solution to the above problem is obtained using the Hungarian method [13]. The asymptotically cubic computational complexity does not thwart online learning as the number of vehicles in the field of vision is typically very low (say, < 10). This forms the basis for obtaining the motion field which is described in the next section. 3.2 Motion prediction using Gaussian process regression In this section we describe the construction of a model to predict the motion field as a mapping (x, y, t) →(vx, vy). We adopt a Bayesian approach that can provide uncertainty of a query point with a little amount of data. A Gaussian process (GP) regression model is instantiated for each new moving object and motion observations are collected over time until the object disappears from the robot’s view. Each GP model has a different number of data points which grows over time during its lifespan. Nevertheless, this stage does not suffer from O(N 3) asymptotic cost of GPs because objects appear and disappear from the mapped area (say, the number of GPs < 20 and N < 50 for each GP). Let us denote displacements collected over time t = {t −T, . . . , t −2, t −1, t} for any such moving object as V = {vt−T , vt−2, vt−1, . . . , vt}. A Gaussian process (GP) prior is placed on f, such that f ∼GP(0, kGP(t, t′)), and V = f(t) + ϵ is an additive noise ϵ ∼N(0, σ2). This way we can model non-linear relationships between motion and time. As v are observations in 2D, the model is a two dimensional output GP. However, it is also possible to disregard the correlation between response variables vx and vy for simplicity. So as to capture the variations in motions, we adopt a polynomial covariance function of degree 3. Further, as commonly used in kriging methods in geostatistics [14], we explicitly augment the input with a quadratic term ˜t = [t, t2]⊤and build kGP(t, t′) = (˜t˜t′ + 1)3, to improve (verified in pilot experiments) the prediction. Unlike squared-exponential kernels which definitely decay beyond the range of data points, polynomial kernels are suitable for extrapolation into the near future. However, note that polynomials of unnecessarily higher orders would result in over-fitting. 4 The predictive distribution for the motion of a point in the locality of an individual GP at a given time, v∗∼N(E, V), can be then predicted using standard GP prediction equations [15] (Figure 4). Note that hyperparameters of each GP has to be optimized before making any predictions. The associated distribution for the position of a point transformed by p(v(x)) is then, s ∼N(ρ, Σ) ∼N(E, V) ∼N x y + E, V ∼N x + µx y + µy , σxx σxy σyx σyy (2) where we used s(x) to denote the spatial coordinates of x such that s(x) = (x, y). 3.3 Feature embedding With the predicted spatial coordinates for each point x at time t∗, represented as N(ρ, Σ), obtained in the previous step, the HF-STHM (hinged feature STHM) can now be constructed. As there is uncertainty in the motion of a point, this uncertainty needs to be propagated into the map. Denoting H for a reproducing kernel Hilbert space (RKHS) of functions f : S →R with a reproducing kernel k : S ×S →R, the mean map µ from probability space P into H is obtained [16] as µ : P →H, P 7→ R S k(s, ·)dP(s). Then, the kernel between two distributions can be written as, k(Pi, Pj) = Z Z ⟨k(si, ·), k(sj, ·)⟩HdPi(si)dPj(sj) = Z Z k(si, sj)dP(si)dP(sj) = Z Z k(si, sj)p(si; ρi, Σi)p(sj; ρj, Σj)dsidsj, (3) where ⟨·, ·⟩denotes the dot product and Pi := P(si) = N(ρi, Σi) in a probability space P. Theorem 1 [17] If a squared exponential kernel, k(si, sj) = exp{−1 2(si −sj)⊤L−1(si −sj)}, is endowed with P = N(s; ρ, Σ), then there exists an analytical solution in the form, k(Pi, Pj) = I + L−1(Σi + Σj) −1/2 exp −1 2(ρi −ρj)⊤(L + Σi + Σj)−1(ρi −ρj) , (4) where I is the identity matrix and L is the matrix of length scale parameters which determines how fast the magnitude of the exponential decays with ρ. Corollary 1 For point estimates ˜s of Pj, k(Pi,˜s) = I + L−1Σ −1/2 exp −1 2(ρ −˜s)⊤(L + Σ)−1(ρ −˜s) . (5) Corollary 1 is now used to compute k p(s),˜s which defines the feature embedding for HF-STHM. Note that Corollary 1 is equivalent to centering (hinging) the kernels at M fixed points ˜s in space which allows capturing different spatial dependencies over the map dimensions. The pooled-length scales L + Σ of these “hinged” kernels change over time. Typically, these ˜s can be obtained by a pre-defined regular grid. Finally, the feature mapping for each spatial location is obtained by concatenating multiple kernels hinged at supports: Φhinged(x) = k p(s),˜s1 , . . . , k p(s),˜sM ⊤, (6) 5 The method to predict occupancy maps at each iteration is summarized in Algorithm 1. As in SHM, the length-scale of the hinged-feature kernels and the regularization parameter has to be picked heuristically or using grid-search. Data: Set of consecutive laser scans Result: Continuous occupancy map at time t∗at any arbitrary resolution while true do Extract motion observations V (Section 3.1); Build the motion vector field from V using Gaussian process regression (Section 3.2); Generate motion predictions p(v) for t∗(Section 3.2); Compute the feature mapping (Equation 6); Update w of the logistic regression model similar to Section 2; Generate a new spatial map by querying at a desirable resolution similar to Section 2; end Algorithm 1: Querying maps for t∗using HF-STHM algorithm. Being a parametric model, this method can be used to predict past (t∗< 0), present (t∗= 0) and future (t∗> 0) occupancy maps using a fixed number of parameters (M + 1). However, in practice, it may not be required to generate future or past maps at every time step. However, it is required to incorporate new laser data and update w using SGD at each iteration. Therefore, GP predictions and probabilistic feature embedding can be skipped by setting Σ = 0, whenever it is not required to predict future or past maps as the uncertainty of knowing the current location for any laser reflection is zero. 4 Experiments and Discussion In this section we demonstrate how HF-STHM can be effectively used for mapping in dynamic environments. Our main dataset1, named as dataset 1, consists of laser scans, each with 180 beams covering 1800 angle and 30 m radius, collected from a busy intersection [6]. Figure 3 [6] shows an aerial view of the area and the location of the sensor. In Section 4.4, we used an additional dataset1 (dataset 2) of a larger intersection, as this section verifies an important part of our algorithm. 4.1 Motion model Figure 4 shows a real instance where a vehicle breaks and how the GP model is cable of predicting its future locations with associated uncertainty. Although the GP has two outputs vx and vy, only predictions along the direction of motion vx is shown for clarity. There can be several such GP models at a given time as a new GP model is initialized for each new moving object (centroid association) entering the environment and is removed as it disappears. The GP model not only extrapolates the motion into the future, but also provides an estimate of the predictive uncertainty which is crucial for the probabilistic feature embedding techniques discussed in Section 3.3. This location uncertainty around past observations is negligible while it is increasingly high as the more time steps ahead into the future we attempt to predict. However, the variance may also slightly change with the number of data points in the GP and the variability of the motion. As opposed to the two-frame based velocity calculation technique employed in DGPOM, our method uses motion data of dynamic objects collected over several frames which makes the predictions more accurate as it does not make assumptions about the motion of objects such as constant velocity. 4.2 Supports for hinged features Although in Section 3.3 we suggested to hinge the kernels using a regular grid, we compare it with kernels hinged in random locations in this experiment. As shown in Table 1, the area-under-ROCcurve (AUC) averaged over randomly selected maps at t∗= 0 are more accurate for regular grid because random supports cannot cover the entire realm, especially if the number of supports is small. Similarly, a random support based map may not be qualitatively appealing. In general, regular grid requires less amount of features to ensure a qualitatively and quantitatively better map. 1https://goo.gl/f9cTDr 6 Motion map quiver plot Laser returns from street walls Sensor's location Figure 3: Ariel view of dataset 1 environment Figure 4: GP model Table 1: Average AUC – supports for hinged features No. of Regular Random supports grid grid 250 0.95 0.83 500 0.98 0.88 1000 0.99 0.94 5000 0.99 0.98 4.3 Point estimate vs. distribution embedding It is important to understand if distribution embedding discussed in Section 3.3 indeed improves accuracy over point embedding. In order to see this, the accuracy between dynamic clusters of future maps and corresponding ground truth laser values should be compared. Since automatically identifying dynamic clusters is not possible, we semi-automatically extracted them. To this end, dynamic clusters of each predict-ahead map were manually delimited using python graphical user interface tools and negative-log-loss (NLL) between those dynamic clusters and corresponding ground truth laser values were evaluated. Because the maps are probabilistic, NLL is more representative than AUC. Keeping all other variables unaltered, the average decrements of NLL from point estimates to distribution embedding of randomly selected instances for query time steps t∗= 1 to 5 were 0.11, 0.22, 0.34, 0.83, 0.50, 1.36 (note! log scale) where t∗> 0 represents future. Therefore, embedding both mean and variance, rather than merely mean, is crucial for a higher accuracy. Intuitively, though we can never predict the exact future location of a moving vehicle, it is possible to predict the probability of its presence at different locations in the space. 4.4 Spatial maps vs. spatio-temporal maps In order to showcase the importance of spatio-temporal models (HF-STHM) over spatial models (SHM), NLL values of a subset of dataset were calculated similar to Section 4.3 for compare dynamic occupancy grid map (DGM), SHM and HF-STHM. SHM and HF-STHM used 1000 bases. DGM is an extension to [1] which calculates occupancy probability based on few past time steps. In this experiment we considered 10 past time steps and 1 m grid-cell resolution for DGM. The experiments were performed for datasets 1 and 2 and results are given in Table 2. The smaller the NLL, the better the accuracy is. HF-STHM outperforms SHM and this effect becomes more prominent for higher t∗. DGM struggles in dynamic environments because of the fixed grid-size, assumptions about cell independence and it was not explicitly designed for predicting into the future. NLL of DGM increases with t∗as it keeps memory in a decaying-fashion for 10-consecutive-paststeps. Since SHM does not update positions of objects (as it is a spatial model), NLL also increases with t∗. In HF-STHM, NLL increases with t∗because predictive variance increases with t∗in addition to mean error. Figure 5 presents a qualitative comparison. Table 2: NLL - predictions using dynamic occupancy grid map (DGM), static Hilbert map (SHM) and the proposed method (HFSTHM) for future time steps. Dataset 1 Dataset 2 Time DGM SHM STHM DGM SHM STHM t∗= 0 11.20 0.11 0.12 6.00 0.18 0.09 t∗= 1 17.69 0.15 0.15 10.16 0.29 0.12 t∗= 2 19.88 0.28 0.18 12.71 0.82 0.34 t∗= 3 25.24 0.61 0.19 16.54 1.85 0.57 t∗= 4 26.84 1.18 0.48 20.76 2.96 0.16 t∗= 5 27.44 1.46 0.89 25.25 4.00 1.10 t∗= 6 34.54 2.00 1.68 26.78 4.90 1.30 Table 3: AUC of prediction 7 Figure 5: SHM and HF-STHM for t∗-ahead predictions. The robot is at (0,0) facing up. The white points are ground truth laser reflections. Observe that, in HF-STHM, moving objects are predicted-ahead and uncertainty of dynamic areas grows as t∗increases. Differences are encircled for t∗= 7. 4.5 Predicting into the future and retrieving old maps In order to assess the ability of our method to predict the future locations of dynamic objects, we compare the map obtained when predicting a certain number of time steps ahead (t∗) with the measurements made at that time. Then the average is computed and the AUC as a function of how far ahead the model makes predictions. The experiment was carried out similar to [6]We compare our model with DGPOM (AUC values obtained from [6]) as this is the only other method capable of this type of prediction. According to Figure 3 we can see that both methods perform comparably when t∗< 2. However, if we predict further ahead our method maintains high quality while DGPOM start to suffer somewhat. One explanation for this is the way motion predictions are integrated in our method. As discussed in Section 4.3, we embed distributions rather than point observations to the model and hence it allows us to better deal with the uncertainty of the motion of the dynamic objects. On the other hand, our motion model can capture non-linear patterns. In addition to predicting into the future, our method is also capable of extrapolating few steps into the past merely by changing the time index t to negative instead of positive. This allows us to retrieve past maps without having to store the complete dataset. In contrast to DGPOM, the parametric nature and amenability to optimization using SGD makes our method much more efficient in both performing inference and updating with new observations. 4.6 Runtime To add a new observation, i.e. a new laser scan, into the HF-STHM map it takes around 0.5 s with the extraction of the dynamic objects taking up the majority of the time. To query a single map with 0.1 m resolution takes around 0.5 s as well. These numbers are for a simple Python based implementation. 5 Conclusions and future work This paper presented hinged features to model occupancy state of dynamic environments, by generalizing static Hilbert maps into dynamic environments. The method requires only a small number of data points (180) per frame to model the occupancy of a dynamic environment (30 meter radius) at any resolution. To this end, uncertainty of motion predictions were embedded into the map in a probabilistic manner by considering spatio-temporal relationships. Because of the hierarchical nature, the proposed feature embedding technique is amenable for more sophisticated motion prediction models and sensor fusion techniques. The power of this method can be used for planning and safe navigation where knowing the future state of the world is always advantageous. Furthermore, it can be used as a general tool for learning behaviors of moving objects and how they interact with the space around them. 8 References [1] A. Elfes, “Sonar-based real-world mapping and navigation,” IEEE Journal of Robotics and Automation, vol. RA-3(3), pp. 249–265, 1987. [2] S. T. O’Callaghan and F. T. Ramos, “Gaussian process occupancy maps,” The International Journal of Robotics Research (IJRR), vol. 31, no. 1, pp. 42–62, 2012. [3] F. Ramos and L. Ott, “Hilbert maps: scalable continuous occupancy mapping with stochastic gradient descent,” in Proceedings of Robotics: Science and Systems (RSS), 2015. [4] K. Doherty, J. Wang, and B. Englot, “Probabilistic map fusion for fast, incremental occupancy mapping with 3d hilbert maps,” in IEEE International Conference on Robotics and Automation (ICRA), pp. 0–0, 2016. [5] T. Krajnık, P. Fentanes, G. Cielniak, C. Dondrup, and T. Duckett, “Spectral analysis for longterm robotic mapping,” in IEEE International Conference on Robotics and Automation (ICRA), 2014. [6] S. O’Callaghan and F. Ramos, “Gaussian Process Occupancy Maps for Dynamic Environment,” in Proceedings of the International Symposium of Experimental Robotics (ISER), 2014. [7] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning. Springer Series in Statistics, New York, NY, USA: Springer New York Inc., 2001. [8] A. Rahimi and B. Recht, “Random features for large-scale kernel machines,” in Neural Information Processing Systems (NIPS), 2008. [9] A. Rahimi and B. Recht, “Weighted sums of random kitchen sinks: Replacing minimization with randomisation in learning,” in Neural Information Processing Systems (NIPS), 2009. [10] L. Bottou and O. Bousquet, “The tradeoffs of large scale learning,” in Neural Information Processing Systems (NIPS), 2008. [11] D. Fleet and Y. Weiss, “Optical flow estimation,” in Handbook of Mathematical Models in Computer Vision (MMCV), pp. 237–257, Springer, 2006. [12] B. D. Lucas, T. Kanade, et al., “An iterative image registration technique with an application to stereo vision.,” in International Joint Conference on Artificial Intelligence (IJCAI), vol. 81, pp. 674–679, 1981. [13] H. Kuhn, “The hungarian method for the assignment problem,” Naval research logistics quarterly, 1955. [14] H. Wackernagel, Multivariate geostatistics: an introduction with applications. Springer-Verlag Berlin Heidelberg, 2003. [15] C. Rasmussen and C. Williams, Gaussian Processes for Machine Learning. The MIT Press, 2006. [16] A. Smola, A. Gretton, L. Song, and B. Schölkopf, “A hilbert space embedding for distributions,” in International Conference Algorithmic Learning Theory (COLT), pp. 13–31, Springer-Verlag, 2007. [17] A. Girard, C. E. Rasmussen, J. Quinonero-Candela, and R. Murray-Smith, “Gaussian process priors with uncertain inputs: Application to multiple-step ahead time series forecasting,” in Neural Information Processing Systems (NIPS), 2002. 9 | 2016 | 252 |
6,164 | CRF-CNN: Modeling Structured Information in Human Pose Estimation Xiao Chu The Chinese University of Hong Kong xchu@ee.cuhk.edu.hk Wanli Ouyang The Chinese University of Hong Kong wlouyang@ee.cuhk.edu.hk Hongsheng Li The Chinese University of Hong Kong hsli@ee.cuhk.edu.hk Xiaogang Wang The Chinese University of Hong Kong xgwang@ee.cuhk.edu.hk Abstract Deep convolutional neural networks (CNN) have achieved great success. On the other hand, modeling structural information has been proved critical in many vision problems. It is of great interest to integrate them effectively. In a classical neural network, there is no message passing between neurons in the same layer. In this paper, we propose a CRF-CNN framework which can simultaneously model structural information in both output and hidden feature layers in a probabilistic way, and it is applied to human pose estimation. A message passing scheme is proposed, so that in various layers each body joint receives messages from all the others in an efficient way. Such message passing can be implemented with convolution between features maps in the same layer, and it is also integrated with feedforward propagation in neural networks. Finally, a neural network implementation of endto-end learning CRF-CNN is provided. Its effectiveness is demonstrated through experiments on two benchmark datasets. 1 Introduction A lot of efforts have been devoted to structure design of convolutional neural network (CNN). They can be divided into two groups. One is to achieve higher expressive power by making CNN deeper [19, 10, 20]. The other is to model structures among features and outputs, either as post processing [6, 2] or as extra information to guide the learning of CNN [29, 22, 24]. They are complementary. Human pose estimation is to estimate body joint locations from 2D images, which could be applied to assist other tasks such as [4, 14, 26] The very first attempt adopting CNN for human pose estimation is DeepPose [23]. It used CNN to regress joint locations repeatedly without directly modeling the output structure. However, the prediction of body joint locations relies both on their own appearance scores and the prediction of other joints. Hence, the output space for human pose estimation is structured. Later, Chen and Yuille [2] used a graphical model for the spatial relationship between body joints and used it as post processing after CNN. Learning CNN features and structured output together was proposed in [22, 21, 24]. Researchers were also aware of the importance of introducing structures at the feature level [3]. However, the design of CNN for structured output and structured features was heuristic, without principled guidance on how information should be passed. As deep models are shown effective for many practical applications, researchers on statistical learning and deep learning try to use probabilistic models to illustrate the ideas behind deep models [9, 7, 29]. Motivated by these works, we provide a CRF framework that models structures in both output and hidden feature layers in CNN, called CRF-CNN. It provides us with a principled illustration on how to model structured information at various levels in a probabilistic way and what are the assumptions 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. made when incorporating different CRF into CNN. Existing works can be illustrated as special implementations of CRF-CNN. DeepPose [23] only considered the feature-output relationship, and the approaches in [2, 22] considered feature-output and output-output relationships. In contrast, our proposed full CRF-CNN model takes feature-output, output-output, and feature-feature relationships into consideration, which is novel in pose estimation. It also facilitates us in borrowing the idea behind the sum-product algorithm and developing a message passing scheme so that each body joint receives messages from all the others in an efficient way by saving intermediate messages. Given a set of body joints as vertices on a graph, there is no conclusion on whether a tree structured model [28, 8] or a loopy structured model [25, 16] is the best choice. A tree structure has exact inference while a loopy structure can model more complex relationship among vertices. Our proposed message passing scheme is applicable to both. Our contributions can be summarized as follows. (1) A CRF is proposed to simultaneously model structured features and structured body part spatial relationship. We show step by step how approximations are made to use an end-to-end learning CNN for implementing such CRF model. (2) Motivated by the efficient algorithm for marginalization on tree structures, we provide a message passing scheme for our CRF-CNN so that every vertex receives messages from all the others in an efficient way. Message passing can be implemented with convolution between feature maps in the same layer. Because of the approximation used, this message passing can be used for both tree and loopy structures. (3) CRF-CNN is applied to two human pose estimation benchmark datasets and achieve better performance on both dataset compared with previous methods. 2 CRF-CNN The power of combing powerful statistical models with CNN has been proved [6, 3]. In this section we start with a brief review of CRF and study how the pose estimation problem can be formulated under the proposed CRF-CNN framework. It includes estimating body joints independently from CNN features, modeling the spatial relationship of body joints in the output layer of CNN, and modeling the spatial relationship of features in the hidden layers of CNN. Let I denote an image, and z = {z1, ..., zN} denote locations of N body joints. We are interested in modeling the conditional probability p(z|I, Θ) parameterized by Θ, expressed in a Gibbs distribution: p(z|I, Θ) = e−En(z,I,Θ) Z = e−En(z,I,Θ) P z∈Z e−En(z,I,Θ) , (1) where En(Z, I, Θ) is the energy function. The conditional distribution by introducing latent variables h = {h1, h2, . . . , hK} can be modeled as follows: p(z|I, Θ) = X h p(z, h|I, Θ), where p(z, h|I, Θ) = e−En(z,h,I,Θ) P z∈Z,h∈H e−En(z,h,I,Θ) (2) En(z, h, I, Θ) is the energy function to be defined later. The latent variables correspond to features obtained from a neural network in our implementation. We define an undirected graph G = (V, E), where V = z ∪h, E = Ez ∪Eh ∪Ezh. Ez, Eh, and Ezh denote sets of edges connecting body joints, connecting latent variables, and connecting latent variables with body joints, respectively. 2.1 Model 1 Denote ∅as an empty set. If we suppose there is no edge connecting joints and no edge connecting latent variables in the graphical model, i.e. Ez = ∅, Eh = ∅, then p(z, h|I, Θ) = Y i p(zi|h, I, Θ) Y k p(hk|I, Θ), (3) En(z, h, I, Θ) = X (i,k)∈Ezh ψzh(zi, hk) + X k φh(hk, I), (4) where φh(∗) denotes the unary/data term for image I, ψzh(∗, ∗) denotes the terms for the correlations between latent variables h and body joint configurations z. It corresponds to the model in Fig. 1(a) and it is a typical feedforward neural network. 2 ! " # (a) Multi-layer neural network (c) Structured hidden layer (b) Structured output space (d) Our implementation … … v v v … … v v v … … v v v … … v v v $%& $% $& Figure 1: Different implementations of the CRF-CNN framework. Example. In DeepPose [23], CNN features h in the top hidden layer were obtained from images, and could be treated as latent variables and illustrated by term φh(hk, I) in (4). There is no connection between neurons in hidden layers. Body joint locations were estimated from CNN features in [23], which could be illustrated by the term ψzh(zi, hk). The body joints are independently estimated without considering their correlations, which means Ez = ∅. 2.2 Model 2 If we suppose Eh = ∅in the graphical model, p(z, h|I, Θ) becomes p(z, h|I, Θ) = p(z|h, I, Θ) Y k p(hk|I, Θ). (5) Compared with (3), joint locations are no longer independent. The energy function for this model is En(z, h, I, Θ) = X (i,j)∈Ez i<j ψz(zi, zj) + X (i,k)∈Ezh ψzh(zi, hk) + X k φh(hk, I). (6) It corresponds to the model in Fig. 1(b). Compared with (4), ψz(zi, zj) in (6) is added to model the pairwise relationship between joints. Example. To model the spatial relationship among body joints, the approaches in Yang et al. [22] built up pairwise terms and spatial models. They are different implementations of ψz(zi, zj) in (6). 2.3 Our model In our model, h is considered as a set of discrete latent variables and each hk is represented as a 1-of-L L dimensional vector. p(z, h|Θ) and En(z, h, I, Θ) for this model are: p(z, h|I, Θ) = p(z|h, I, Θ)p(h|I, Θ). (7) En(z, h, I, Θ) = X (k,l)∈Eh k<l ψh(hk, hl) + X (i,j)∈Ez i<j ψz(zi, zj) + X (i,k)∈Ezh ψzh(zi, hk) + X k φh(hk, I). (8) It is the model in Fig. 1(c) and exhibits the largest expressive power compared with the models in (4) and (6). ψh(hk, hl) is added to model the pairwise relationship among features/latent variables in (8). Details on the set of edges E. Body joints have structures and it may not be suitable to use a fully connected graph. The tree structure in Fig. 2(b) is widely used since it fits human knowledge on the skeleton of body joints and how body parts articulate. A further benefit for a tree structure with N vertices is that all vertices can receive messages from others with 2N message passing operations. To better define the structure of latent variables h, we group the latent variables so that a joint zi corresponds to a particular group of latent variables denoted by hi, and h = ∪ihi. P (i,k)∈Ezh ψzh(zi, hk) in (8) is simplified into PN i=1 ψzh(zi, hi), i.e. zi is only connected to latent variables in hi. We further constrain connections among feature groups: (hi, hj) ∈Eh ⇐⇒ 3 (zi, zj) ∈Ez. It means that feature groups are connected if and only if their corresponding body joints are connected. Fig. 1(d) shows an example of this model. Our implementation is as follows: En(z, h, I, Θ) = X (i,j)∈Eh i<j ψh(hi, hj) + X (i,j)∈Ez i<j ψz(zi, zj) + N X i=1 ψzh(zi, hi) + K X k=1 φh(hk, I), (9) 3 Implementation with neural networks In order to marginalize latent variables h and obtain p(z|I, Θ), the computational complexity of marginalization in (2) is high, exponentially proportional to the cardinality of h. In order to infer p(z|I, Θ) in a more efficient way, we use the following approximations: p(z|I, Θ) = X h p(z, h|I, Θ) = X h p(z|h, I, Θ)p(h|I, Θ) ≈p(z|˜h, I, Θ), (10) where ˜h = [˜h1, ˜h2, . . . , ˜hN] = E[h] = X h hp(h|I, Θ), (11) In (10) and (11), we replace h by its average configuration ˜h = E[h] and this approximation was also used in greedy layer-wise learning for deep belief net in [11]. p(h|I, Θ) ≈ Y i Q(hi|I, Θ), (12) Q(hi|I, Θ) = 1 Zh,i exp − X hk∈hi φh(hk, I) − X (i,j)∈Eh i<j ψh(hi, Q(hj|I, Θ)) . (13) The target is to marginalize the distribution of h, as shown in 12. We adopt the classical mean-field approximation approach for message passing[15]. p(h|I, Θ) in (11) is approximated by a product of independent Q(hi|I, Θ) in (12) and (13). We first ignore the pairwise term ψh(hi, hj) which will be addressed later in Section 3.1. Suppose φh(hk, I) = hkwT kf, where f is the feature representation of image I. For a binary latent variable hk, ˜hk = E[hk] = X hk hkQ(hk|I, Θ) = sigm(φh(hk, I)) = sigm(wT kf), (14) where sigm(x) = 1/(1 + e−x) is the sigmoid function. Therefore, the mapping from f to ˜h can be implemented with one-layer transformation in a neural network and sigmoid is the activation function. ˜h is a new feature vector derived from f and f can be obtained from lower layers in a network. 3.1 Message passing on tree structured latent variables In order to infer p(z|I, Θ), the key challenge in our framework is to obtain the marginalized distribution of hidden units, i.e. , Q(hi|I, Θ) in (12). One can obtain Q(hi|I, Θ) through message passing and further estimate ˜h Then p(z|˜h, I, Θ) in (10) can be estimated with existing works such as [2, 28]. According to the sum-product algorithm for a tree structure, every node can receive the messages from other nodes through two message passing routes, first from leaves to a root and then from the root to the leaves [13]. The key is to have a planned route and to store the intermediate messages. Our proposed messaging passing algorithm is summarized in Algorithm 1. An example of message passing for a tree structure with 4 nodes as shown in Fig. 2(c). For detailed illustrations of 2, please refer to the supplementary material. We drop I and Θ to be concise. 4 Algorithm 1 Message passing among features on factor graph. 1: procedure BELIEF PROPAGATION(Θ) 2: Uk ←f ⊗wk, for k = 1 to K ▷Initialization 3: for m = 1 to M do ▷Passing messages M times 4: Select a predefined message passing route Sm 5: for e = 1 to |Eh| do 6: Choose an edge (j →k) from Eh according to the route Sm 7: Denote ne(j) as the set of neighboring nodes for node j on the graphical model 8: if k is a factor node denoted by fk then 9: Fj→fk ←Uj + P fp∈ne(j)\k Ffp→j ▷Pass message from factors to variable 10: Qj→fk ←τ(−Fj→k) ▷Normalize 11: else 12: Denote the factor node j by fj 13: Ffj→k ←P p∈par(j)\k Qp→fj ⊗wp→k ▷Pass message to the factor 14: end if 15: end for 16: end for 17: for k = 1 to K do 18: Q(hk) ←τ(Uk + P fp∈ne(k) Ffp→k) 19: end for 20: end procedure ℎ" ℎ# ℎ$ ℎ% &' &( &) (a) (b) (c) (d) (e) ℎ" ℎ# ℎ$ ℎ% &' &( &) Figure 2: Message passing. (a) is the annotation of a person with its tree structure. (b) is the tree structured model employed on the LSP dataset. In (b), the pink colored nodes are linearly interpolated. (c,d) show message passing on a factored graph with different routes. (e) is a loopy model. In (e), the edges in green color are extra edges added on the tree structured model in(b). According to the mean-field approximation algorithm, the above message passing process should be conducted for multiple times with share parameter to converge. To implement ψh(hi, hj), we use matrix multiplication for easier illustration but convolution (which is a special form of matrix multiplication) for implementation in Algorithm 1. Then message passing is implemented with convolution between feature maps. The proposed method is extensible to loopy structured graphs, as shown in Fig. 2(e). The underlying concept of building up probabilistic model at feature level is the same. However, for loopy structures, the key challenge is to define the rule in message passing. Either a sequence of asymmetric message passing order is predefined, which seems not reasonable for symmetric structure of human poses, or use the flooding scheme to repeated collect information for neighborhood joints. We compared tree structure with loop structure with flooding scheme in the experimental section. 3.2 Overall picture of CRF-CNN for human pose estimation An overview of the approach is shown in Fig. 3. In this pipeline, the prediction on ith body part configuration zi is represented by a score map p(zi|h) = {˜z(1,1) i , ˜z(1,2) i , . . .}, where ˜z(x,y) i ∈[0, 1] denotes the predicted confidence on the existence of the ith body joint at the location (x, y). Similarly, the group of features ˜hi used for estimating p(z|h) is represented by ˜hi = {˜h(1,1) i , ˜h(1,2) i , . . .}, 5 VGG Until fc6 \{pooling4,5} ! "# $ %& $ %&$ '()(%&$,"# $) ')("# $, "# -) '((%& $, %&-) … (2) (1) (3) . ℎ0$ (1,2) (3,4) Channel "# Figure 3: CNN implementation of our model. (1) We use the fc6 layer of VGG to obtain features f from an image. (2) The features f are then used for passing messages among latent variables h. (3) Then the estimated latent variables ˜h are used for estimating the predicted body part score maps ˜z. We only show the message passing process between two joints to be concise. Best viewed in color. i = 1, . . . , N. ˜h(x,y) i is a length-L vector. Therefore, the feature group ˜hi is represented by a feature map of L channels, where h(x,y) i contains L channels of features at location (x, y). 1) It comprises a fully convolutional network stage, which takes an image as input and outputs features f. We use the fully convolutional implementation of VGG and the output of fc6 in VGG is used as the feature map f. 2) Messages are passed among features h with Algorithm 1. Initially, data term Uk for the kth feature group is obtained from feature map f by convolution, which is our implementation of term φh(hk, I) in (13) and corresponds to Algorithm 1 line 2. Then CNN is used for passing messages among h using lines 3-19 in Algorithm 1, which implements term ψh(hi, Q(hj|I, Θ)) in (13) by convolution. After message passing, the ˜hi for i = 1, . . . , N is obtained and treated as feature maps to be used. 3) Then the feature maps ˜hi for i = 1, . . . , N are used to obtain the score map for inferring p(z|h, I, Θ) with (10). As a simple example for illustration, we can use ˜z(x,y) i = p z(x,y) i = 1|hi, I = sigm wT i ˜h(x,y) i to obtain the predicted score ˜z(x,y) i for the ith part at location (x, y). In this case, ˜h(x,y) i is the feature with L channels at location (x, y) and wi can be treated as the classifier. Our implementation uses the approach in [2] to infer p(z|h, I, Θ), which also models the spatial relationship among zi. During training, a whole image (or many of them) can be used as the mini-batch and the error at each output location of the network can be computed using an appropriate loss function with respect to the ground truth of the body joints. We use softmax loss with respect to the estimated part configuration z as the approximate loss function. Since we have used CNN from input to features f, ˜hi and ˜z , a single CNN is used for obtaining the score map of body joints from the image. End-to-end learning with softmax loss and standard BP is used. 4 Experiment We conduct experiments on two benchmark datasets: the LSP dataset [12] and the FLIC dataset [18]. LSP contains 2, 000 images. 1, 000 images for training and 1, 000 for test. Each person is annotated with 14 joints. FLIC contains 3, 987 training images and 1, 016 testing images from Hollywood movies with upper body annotated. On both datasets, we use observer centric annotation for training and evaluation. We also use negative samples, i.e. images not containing any person, from the INRIA dataset [5]. In summary, we are consistent with Chen et al. [2] in training data preparation. 6 4.1 Results on the LSP dataset The experimental results for our and previous approaches on LSP are shown in Table 1. For evaluation metric, we choose the prevailing evaluation method: strict Percentage of Correct Parts (PCP). Under this metric, a limb is considered to be detected only if both ends of an limb lie in 50% of the length w.r.t. the ground-truth location. For pose estimation, it is well known that the accuracy of CNN features is higher than handcrafted features. Therefore, we only compare with methods that use CNN features to be concise. Pishchulin et al. [17] use extra training data, so we do not compare with it. Yang et al. [27] learned features and structured body part configurations simultaneously. Our performance is better than them because we model structure among features. Chu et al. [3] learned structured features and heuristically defined a message passing scheme. Using only the LSP training data, these two approaches have the highest PCP (Observer-Centric) reported in [1]. The model in [3] has no probabilistic interpretation and cannot be modeled as CRF. Most vertices in their CNN can only receive information from half of the vertices, while in our message passing scheme each node could receive information from all vertices, since it is developed from CRF and the sum-product algorithm. The approaches in [27, 3] are all based on the VGG structure as ours. By using a more effective message passing scheme, our method reduces the mean error rate by 10%. Table 1: Quantitative results on LSP dataset (PCP) Experiment Torso Head U.arms L.arms U.legs L.legs Mean Chen&Yuille [2] 92.7 87.8 69.2 55.4 82.9 77.0 75.0 Yang et al. [27] 96.5 83.1 78.8 66.7 88.7 81.7 81.1 Chu et al. [3] 95.4 89.6 76.9 65.2 87.6 83.2 81.1 Ours 96.0 91.3 80.0 67.1 89.5 85.0 83.1 4.2 Results on the FLIC dataset We use Percentage of Correct Keypoints (PCK) as the evaluation metric. Because it is widely adopted by previous works on FLIC, it provides convenience for comparison. These published works only reported results on elbow and wrist and we follow the same practice. PCK reports the percentage of predictions that lay in the normalized distance of annotation. Toshev et al. [23], Chen and Yuille [2] and Tompson et al. [21] also used CNN features. When compared with previous state of the art, our method improves the performance of elbow and wrist by 2.7% and 1.7% respectively. Table 2: Quantitative results on FLIC dataset (PCK@0.2) Experiment Elbow Wrist Toshev et al. [23] 92.3 82.0 Tompson et al. [21] 93.1 89.0 Chen and Yuille [2] 95.3 92.4 Ours 98.0 94.1 4.3 Diagnostic Experiments In this subsection, we conduct experiments to compare different message passing schemes, structures, and noniliear functions. The experimental results in Table 3 use the same VGG for feature extraction. Flooding is a message passing schedule, in which all vertices pass the messages to their neighboring vertices simultaneously and locally as follows: Qt+1(hi) = τ φ(hi) + X i′∈VN(i)\i Qt(hi′) ⊗wi′→i , (15) where VN(i) denotes the neighboring vertices of the ith vertex in the graphical model. We adopt the iterative updating scheme in the work of Zheng et al. [29]. In Table 3, Flooding-1itr-tree denotes the result of using flooding to perform message passing once using CNN as in [29]. The tree structure in Fig. 2 (b) is adopted. Flooding-2iter-tree indicates 7 Table 3: Diagnostic Experiments (PCP) Experiment Torso Head U.arms L.arms U.legs L.legs Mean Flooding-1iter-tree 93.0 87.5 73.0 58.9 84.3 76.4 76.6 Flooding-2iter-tree 93.5 86.7 73.0 59.8 83.7 79.0 77.1 Flooding-2iter-loopy 94.0 88.2 74.4 62.1 84.3 80.0 78.4 Serial-tree(ReLU) 95.5 88.9 75.9 63.8 87.1 81.4 80.1 Serial-tree(Softmax) 96.0 91.3 80.0 67.1 89.5 85.0 83.1 the result of using flooding to pass messages twice. The weights across the two message passing iterations are shared. Experimental results show slight improvement of passing twice than once. The result for the loopy structured graph in Fig. 2 (e) is denoted by Flooding-2iter-loopy. The connection of a pair of joints is decided by the following protocol: if 90% of the training sample’s distance is within 48 pixels, which is the receptive field size of our filters, we connect these two joints. Improvement of 1.3% is introduced by these extra connections. These approaches share the same drawbacks: lack of information for making predictions. With one iteration of message passing, each body part could only receive information from neighborhood parts, while with two iterations a part can only receive information from parts of depth 2. However, the largest depth in our graph is 10. Flooding is inefficient for a node to receive the messages from the other nodes. This problem is solved with the serial scheme. Serial scheme passes messages following a predefined order and update information sequentially. For a tree structured graph with N vertices, each vertex can be marginalized by passing the messages within 2N operations using the efficient sum-product algorithm [13]. The result of using serial message passing is denoted by Serial-tree(Softmax) in Table 3. In can be shown that the serial scheme performs better than the flooding scheme. It is well known that softmax leads to vanishing of gradients which make the network training inefficient. In experiment, we replace 1 ze{x} with β 1 ze{αx} to accelerate the training process. We set α ←0.5 and β ←Nc, where Nc is the number of feature channels. With this slight change, the network can converge much faster than softmax without using α and β. The performance of using this softmax, which is derived from our CRF in (13), is 3% higher than Serial-tree(ReLU), which uses ReLU as the non-linear function for passing messages among features, a scheme used in [3]. 5 Conclusion We propose to use CRF for modeling structured features and structured human body part configurations. This CRF is implemented by an end-to-end learning CNN. The efficient sum-product algorithm in the probabilistic model guides us in using an efficient message passing approach so that each vertex receives messages from other nodes in a more efficient way. And the use of CRF also helps us to choose non-linear functions and to know what are the assumptions and approximations made in order to use CNN to implement such CRF. The gain in performance on two benchmark human pose estimation datasets proves the effectiveness of this attempt, which shows a new direction for the structure design of deep neural networks. Acknowledgment: This work is supported by SenseTime Group Limited, Research Grants Council of Hong Kong (Project Number CUHK14206114, CUHK14205615, CUHK14207814, CUHK14203015, and CUHK417011) and National Natural Science Foundation of China (Number 61371192 and 61301269). W. Ouyang and X. Wang are the corresponding authors. References [1] Mpii human pose dataset. http://human-pose.mpi-inf.mpg.de/#related_benchmarks. Accessed: 2016-05-20. [2] X. Chen and A. L. Yuille. Articulated pose estimation by a graphical model with image dependent pairwise relations. In NIPS, 2014. [3] X. Chu, W. Ouyang, H. Li, and X. Wang. Structured feature learning for pose estimation. In CVPR, 2016. 8 [4] X Chu, W Ouyang, W Yang, and X Wang. Multi-task recurrent neural network for immediacy prediction. In ICCV, 2015. [5] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. [6] J. Deng, N. Ding, Y. Jia, A. Frome, K. Murphy, S. Bengio, Y. Li, H. Neven, and H. Adam. Large-scale object classification using label relation graphs. In ECCV. 2014. [7] SM Eslami, N. Heess, T. Weber, Y. Tassa, K. Kavukcuoglu, and G. E. Hinton. Attend, infer, repeat: Fast scene understanding with generative models. arXiv preprint arXiv:1603.08575, 2016. [8] P. F. Felzenszwalb and D. P. Huttenlocher. Pictorial structures for object recognition. IJCV, 61(1):55–79, 2005. [9] Y. Gal and Z. Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. arXiv preprint arXiv:1506.02142, 2015. [10] K. He, X. Zhang, Ss Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. arXiv preprint arXiv:1502.01852, 2015. [11] G. E. Hinton, S. Osindero, and Y. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18:1527–1554, 2006. [12] S. Johnson and M. Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In BMVC, 2010. [13] F. Kschischang, B. Frey, and H-A Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, 47(2):498–519, 2001. [14] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. Deepreid: Deep filter pairing neural network for person re-identification. In CVPR, 2014. [15] G. Lin, C. Shen, I. Reid, and A. van den Hengel. Deeply learning the messages in message passing inference. In NIPS, 2015. [16] W. Ouyang, X. Chu, and X. Wang. Multi-source deep learning for human pose estimation. In CVPR, 2014. [17] L. Pishchulin, E. Insafutdinov, S. Tang, B. Andres, M. Andriluka, P. Gehler, and B.b Schiele. Deepcut: Joint subset partition and labeling for multi person pose estimation. [arXiv], November 2015. [18] B. Sapp and B. Taskar. Modec: Multimodal decomposable models for human pose estimation. In CVPR, 2013. [19] K. Simonyan and A.s Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [20] 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. [21] J. Tompson, R. Goroshin, A. Jain, Y. LeCun, and C. Bregler. Efficient object localization using convolutional networks. In CVPR, 2015. [22] J. Tompson, A. Jain, Y. LeCun, and C. Bregler. Joint training of a convolutional network and a graphical model for human pose estimation. In NIPS, 2014. [23] A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In CVPR, 2014. [24] L. Wan, D. Eigen, and R. Fergus. End-to-end integration of a convolutional network, deformable parts model and non-maximum suppression. arXiv preprint arXiv:1411.5309, 2014. [25] Y. Wang, D. Tran, and Z. Liao. Learning hierarchical poselets for human parsing. In CVPR, 2011. [26] Tong Xiao, Hongsheng Li, Wanli Ouyang, and Xiaogang Wang. Learning deep feature representations with domain guided dropout for person re-identification. In CVPR, 2016. [27] W. Yang, W. Ouyang, H. Li, and X. Wang. End-to-end learning of deformable mixture of parts and deep convolutional neural networks for human pose estimation. In CVPR, 2016. [28] Y. Yang and D. Ramanan. Articulated human detection with flexible mixtures of parts. PAMI, 35(12):2878– 2890, 2013. [29] 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 ICCV, 2015. 9 | 2016 | 253 |
6,165 | Bayesian latent structure discovery from multi-neuron recordings Scott W. Linderman Columbia University swl2133@columbia.edu Ryan P. Adams Harvard University and Twitter rpa@seas.harvard.edu Jonathan W. Pillow Princeton University pillow@princeton.edu Abstract Neural circuits contain heterogeneous groups of neurons that differ in type, location, connectivity, and basic response properties. However, traditional methods for dimensionality reduction and clustering are ill-suited to recovering the structure underlying the organization of neural circuits. In particular, they do not take advantage of the rich temporal dependencies in multi-neuron recordings and fail to account for the noise in neural spike trains. Here we describe new tools for inferring latent structure from simultaneously recorded spike train data using a hierarchical extension of a multi-neuron point process model commonly known as the generalized linear model (GLM). Our approach combines the GLM with flexible graph-theoretic priors governing the relationship between latent features and neural connectivity patterns. Fully Bayesian inference via Pólya-gamma augmentation of the resulting model allows us to classify neurons and infer latent dimensions of circuit organization from correlated spike trains. We demonstrate the effectiveness of our method with applications to synthetic data and multi-neuron recordings in primate retina, revealing latent patterns of neural types and locations from spike trains alone. 1 Introduction Large-scale recording technologies are revolutionizing the field of neuroscience [e.g., 1, 5, 15]. These advances present an unprecedented opportunity to probe the underpinnings of neural computation, but they also pose an extraordinary statistical and computational challenge: how do we make sense of these complex recordings? To address this challenge, we need methods that not only capture variability in neural activity and make accurate predictions, but also expose meaningful structure that may lead to novel hypotheses and interpretations of the circuits under study. In short, we need exploratory methods that yield interpretable representations of large-scale neural data. For example, consider a population of distinct retinal ganglion cells (RGCs). These cells only respond to light within their small receptive field. Moreover, decades of painstaking work have revealed a plethora of RGC types [16]. Thus, it is natural to characterize these cells in terms of their type and the location of their receptive field center. Rather than manually searching for such a representation by probing with different visual stimuli, here we develop a method to automatically discover this structure from correlated patterns of neural activity. Our approach combines latent variable network models [6, 10] with generalized linear models of neural spike trains [11, 19, 13, 20] in a hierarchical Bayesian framework. The network serves as a bridge, connecting interpretable latent features of interest to the temporal dynamics of neural spike trains. Unlike many previous studies [e.g., 2, 3, 17], our goal here is not necessarily to recover true synaptic connectivity, nor is our primary emphasis on prediction. Instead, our aim is to explore and compare latent patterns of functional organization, integrating over possible networks. To do so, we develop an efficient Markov chain Monte Carlo (MCMC) inference algorithm by leveraging 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. cell 1 cell 2 cell 3 cell N cell 1 cell 2 cell 3 cell N Network Firing Rate Spike Train A ∼Dense W ∼Gaussian A ∼Bernoulli W ∼Distance A ∼SBM W ∼SBM A ∼Distance W ∼SBM (a) (b) (c) (d) time time (e) (f) (g) weight Figure 1: Components of the generative model. (a) Neurons influence one another via a sparse weighted network of interactions. (b) The network parameterizes an autoregressive model with a time-varying activation. (c) Spike counts are randomly drawn from a discrete distribution with a logistic link function. Each spike induces an impulse response on the activation of downstream neurons. (d) Standard GLM analyses correspond to a fully-connected network with Gaussian or Laplace distributed weights, depending on the regularization. (e-g) In this work, we consider structured models like the stochastic block model (SBM), in which neurons have discrete latent types (e.g. square or circle), and the latent distance model, in which neurons have latent locations that determine their probability of connection, capturing intuitive and interpretable patterns of connectivity. Pólya-gamma augmentation to derive collapsed Gibbs updates for the network. We illustrate the robustness and scalability of our algorithm with synthetic data examples, and we demonstrate the scientific potential of our approach with an application to retinal ganglion cell recordings, where we recover the true underlying cell types and locations from spike trains alone, without reference to the stimulus. 2 Probabilistic Model Figure 1 illustrates the components of our framework. We begin with a prior distribution on networks that generates a set of weighted connections between neurons (Fig. 1a). A directed edge indicates a functional relationship between the spikes of one neuron and the activation of its downstream neighbor. Each spike induces a weighted impulse response on the activation of the downstream neuron (Fig. 1b). The activation is converted into a nonnegative firing rate from which spikes are stochastically sampled (Fig. 1c). These spikes then feed back into the subsequent activation, completing an autoregressive loop, the hallmark of the GLM [11, 19]. Models like these have provided valuable insight into complex population recordings [13]. We detail the three components of this model in the reverse order, working backward from the observed spike counts through the activation to the underlying network. 2.1 Logistic Spike Count Models Generalized linear models assume a stochastic spike generation mechanism. Consider a matrix of spike counts, S ∈NT ×N, for T time bins and N neurons. The expected number of spikes fired by the n-th neuron in the t-th time bin, E[st,n], is modeled as a nonlinear function of the instantaneous activation, ψt,n, and a static, neuron-specific parameter, νn. Table 1 enumerates the three spike count models considered in this paper, all of which use the logistic function, σ(ψ) = eψ(1 + eψ)−1, to rectify the activation. The Bernoulli distribution is appropriate for binary spike counts, whereas the 2 Distribution p(s | ψ, ν) Standard Form E[s] Var(s) Bern(σ(ψ)) σ(ψ)s σ(−ψ)1−s (eψ)s 1+eψ σ(ψ) σ(ψ) σ(−ψ) Bin(ν, σ(ψ)) ν s σ(ψ)s σ(−ψ)ν−s ν s (eψ)s (1+eψ)ν νσ(ψ) νσ(ψ) σ(−ψ) NB(ν, σ(ψ)) ν+s−1 s σ(ψ)s σ(−ψ)ν ν+s−1 s (eψ)s (1+eψ)ν+s νeψ νeψ/σ(−ψ) Table 1: Table of conditional spike count distributions, their parameterizations, and their properties. binomial and negative binomial have support for s ∈[0, ν] and s ∈[0, ∞), respectively. Notably lacking from this list is the Poisson distribution, which is not directly amenable to the augmentation schemes we derive below; however, both the binomial and negative binomial distributions converge to the Poisson under certain limits. Moreover, these distributions afford the added flexibility of modeling under- and over-dispersed spike counts, a biologically significant feature of neural spiking data [4]. Specifically, while the Poisson has unit dispersion (its mean is equal to its variance), the binomial distribution is always under-dispersed, since its mean always exceeds its variance, and the negative binomial is always over-dispersed, with variance greater than its mean. Importantly, all of these distributions can be written in a standard form, as shown in Table 1. We exploit this fact to develop an efficient Markov chain Monte Carlo (MCMC) inference algorithm described in Section 3. 2.2 Linear Activation Model The instantaneous activation of neuron n at time t is modeled as a linear, autoregressive function of preceding spike counts of neighboring neurons, ψt,n ≜bn + N X m=1 ∆tmax X ∆t=1 hm→n[∆t] · st−∆t,m, (1) where bn is the baseline activation of neuron n and hm→n : {1, . . . , ∆tmax} →R is an impulse response function that models the influence spikes on neuron m have on the activation of neuron n at a delay of ∆t. To model the impulse response, we use a spike-and-slab formulation [8], hm→n[∆t] = am→n K X k=1 w(k) m→n φk[∆t]. (2) Here, am→n ∈{0, 1} is a binary variable indicating the presence or absence of a connection from neuron m to neuron n, the weight wm→n = [w(1) m→n, ..., w(K) m→n] denotes the strength of the connection, and {φk}K k=1 is a collection of fixed basis functions. In this paper, we consider scalar weights (K = 1) and use an exponential basis function, φ1[∆t] = e−∆t/τ, with time constant of τ = 15ms. Since the basis function and the spike train are fixed, we precompute the convolution of the spike train and the basis function to obtain bs(k) t,m = P∆tmax ∆t=1 φk[∆t] · st−∆t,m. Finally, we combine the connections, weights, and filtered spike trains and write the activation as, ψt,n = (an ⊙wn)T bst, (3) where an = [1, a1→n1K, ..., aN→n1K], wn = [bn, w1→n, ..., wN→n], and bst = [1, bs(1) t,1, ..., bs(K) t,N ]. Here, ⊙denotes the Hadamard (elementwise) product and 1K is length-K vector of ones. Hence, all of these vectors are of size 1 + NK. The difference between our formulation and the standard GLM is that we have explicitly modeled the sparsity of the weights in am→n. In typical formulations [e.g., 13], all connections are present and the weights are regularized with ℓ1 and ℓ2 penalties to promote sparsity. Instead, we consider structured approaches to modeling the sparsity and weights. 2.3 Random Network Models Patterns of functional interaction can provide great insight into the computations performed by neural circuits. Indeed, many circuits are informally described in terms of “types” of neurons that perform a particular role, or the “features” that neurons encode. Random network models formalize these 3 Name ρ(um, un, θ) µ(vm, vn, θ) Σ(vm, vn, θ) Dense Model 1 µ Σ Independent Model ρ µ Σ Stochastic Block Model ρum→un µvm→vn Σvm→vn Latent Distance Model σ(−||un −vm||2 2 + γ0) −||vn −vm||2 2 + µ0 η2 Table 2: Random network models for the binary adjacency matrix or the Gaussian weight matrix. intuitive descriptions. Types and features correspond to latent variables in a probabilistic model that governs how likely neurons are to connect and how strongly they influence each other. Let A = {{am→n}} and W = {{wm→n}} denote the binary adjacency matrix and the real-valued array of weights, respectively. Now suppose {un}N n=1 and {vn}N n=1 are sets of neuron-specific latent variables that govern the distributions over A and W . Given these latent variables and global parameters θ, the entries in A are conditionally independent Bernoulli random variables, and the entries in W are conditionally independent Gaussians. That is, p(A, W | {un, vn}N n=1, θ) = N Y m=1 N Y n=1 Bern (am→n | ρ(um, un, θ)) × N (wm→n | µ(vm, vn, θ), Σ(vm, vn, θ)) , (4) where ρ(·), µ(·), and Σ(·) are functions that output a probability, a mean vector, and a covariance matrix, respectively. We recover the standard GLM when ρ(·) ≡1, but here we can take advantage of structured priors like the stochastic block model (SBM) [9], in which each neuron has a discrete type, and the latent distance model [6], in which each neuron has a latent location. Table 2 outlines the various models considered in this paper. We can mix and match these models as shown in Figure 1(d-g). For example, in Fig. 1g, the adjacency matrix is distance-dependent and the weights are block structured. Thus, we have a flexible language for expressing hypotheses about patterns of interaction. In fact, the simple models enumerated above are instances of a rich family of exchangeable networks known as Aldous-Hoover random graphs, which have been recently reviewed by Orbanz and Roy [10]. 3 Bayesian Inference Generalized linear models are often fit via maximum a posteriori (MAP) estimation [11, 19, 13, 20]. However, as we scale to larger populations of neurons, there will inevitably be structure in the posterior that is not reflected with a point estimate. Technological advances are expanding the number of neurons that can be recorded simultaneously, but “high-throughput” recording of many individuals is still a distant hope. Therefore we expect the complexities of our models to expand faster than the available distinct data sets to fit them. In this situation, accurately capturing uncertainty is critical. Moreover, in the Bayesian framework, we also have a coherent way to perform model selection and evaluate hypotheses regarding complex underlying structure. Finally, after introducing a binary adjacency matrix and hierarchical network priors, the log posterior is no longer a concave function of model parameters, making direct optimization challenging (though see Soudry et al. [17] for recent advances in tackling similar problems). These considerations motivate a fully Bayesian approach. Computation in rich Bayesian models is often challenging, but through thoughtful modeling decisions it is sometimes possible to find representations that lead to efficient inference. In this case, we have carefully chosen the logistic models of the preceding section in order to make it possible to apply the Pólya-gamma augmentation scheme [14]. The principal advantage of this approach is that, given the Pólya-gamma auxiliary variables, the conditional distribution of the weights is Gaussian, and hence is amenable to efficient Gibbs sampling. Recently, Pillow and Scott [12] used this technique to develop inference algorithms for negative binomial factor analysis models of neural spike trains. We build on this work and show how this conditionally Gaussian structure can be exploited to derive efficient, collapsed Gibbs updates. 4 3.1 Collapsed Gibbs updates for Gaussian observations Suppose the observations were actually Gaussian distributed, i.e. st,n ∼N(ψt,n, νn). The most challenging aspect of inference is then sampling the posterior distribution over discrete connections, A. There may be many posterior modes corresponding to different patterns of connectivity. Moreover, am→n and wm→n are often highly correlated, which leads to poor mixing of naïve Gibbs sampling. Fortunately, when the observations are Gaussian, we may integrate over possible weights and sample the binary adjacency matrix from its collapsed conditional distribution. We combine the conditionally independent Gaussian priors on {wm→n} and bn into a joint Gaussian distribution, wn | {vn}, θ ∼N(wn | µn, Σn), where Σn is a block diagonal covariance matrix. Since ψt,n is linear in wn (see Eq. 3), a Gaussian likelihood is conjugate with this Gaussian prior, given an and bS = {bst}T t=1. This yields the following closed-form conditional: p(wn | bS, an, µn, Σn) ∝N(wn | µn, Σn) T Y t=1 N(st,n | (an ⊙wn)T bst, νn) ∝N(wn | eµn, eΣn), eΣn = h Σ−1 n + bS T(ν−1 n I)bS ⊙(anaT n) i−1 , eµn = eΣn h Σ−1 n µn + bS T(ν−1 n I)s:,n ⊙an i . Now, consider the conditional distribution of an, integrating out the corresponding weights. The prior distribution over an is a product of Bernoulli distributions with parameters ρn = {ρ(um, un, θ)}N m=1. The conditional distribution is proportional to the ratio of the prior and posterior partition functions, p(an | bS, ρn, µn, Σn) = Z p(an, wn | bS, ρn, µn, Σn) dwn = p(an | ρn) Σn −1 2 exp n −1 2µT nΣ−1 n µn o eΣn −1 2 exp n −1 2 eµT n eΣ −1 n eµn o. Thus, we perform a joint update of an and wn by collapsing out the weights to directly sample the binary entries of an. We iterate over each entry, am→n, and sample it from its conditional distribution given {am′→n}m′̸=m. Having sampled an, we sample wn from its Gaussian conditional. 3.2 Pólya-gamma augmentation for discrete observations Now, let us turn to the non-conjugate case of discrete count observations. The Pólya-gamma augmentation [14] introduces auxiliary variables, ωt,n, conditioned upon which the discrete likelihood appears Gaussian and our collapsed Gibbs updates apply. The integral identity underlying this scheme is c (eψ)a (1 + eψ)b = c 2−beκψ Z ∞ 0 e−ωψ2/2 pPG(ω | b, 0) dω, (5) where κ = a −b/2 and p(ω | b, 0) is the density of the Pólya-gamma distribution PG(b, 0), which does not depend on ψ. Notice that the discrete likelihoods in Table 1 can all be rewritten like the left-hand side of (5), for some a, b, and c that are functions of s and ν. Using (5) along with priors p(ψ) and p(ν), we write the joint density of (ψ, s, ν) as p(s, ν, ψ) = Z ∞ 0 p(ν) p(ψ) c(s, ν) 2−b(s,ν)eκ(s,ν)ψe−ωψ2/2 pPG(ω | b(s, ν), 0) dω. (6) The integrand of Eq. 6 defines a joint density on (s, ν, ψ, ω) which admits p(s, ν, ψ) as a marginal density. Conditioned on the auxiliary variable, ω, the likelihood as a function of ψ is, p(s | ψ, ν, ω) ∝eκ(s,ν)ψe−ωψ2/2 ∝N ω−1κ(s, ν) | ψ, ω−1 . Thus, after conditioning on s, ν, and ω, we effectively have a linear Gaussian likelihood for ψ. We apply this augmentation scheme to the full model, introducing auxiliary variables, ωt,n for each spike count, st,n. Given these variables, the conditional distribution of wn can be computed in closed 5 MAP W , MAPW (d) (e) (f) (a) (b) (c) True True A MCMC Figure 2: Weighted adjacency matrices showing inferred networks and connection probabilities for synthetic data. (a,d) True network. (b,e) Posterior mean using joint inference of network GLM. (c,f) MAP estimation. form, as before. Let κn = [κ(s1,n, νn), . . . , κ(sT,n, νn)] and Ωn = diag([ω1,n, . . . , ωT,n]). Then we have p(wn | sn, bS, an, µn, Σn, ωn, νn) ∝N(wn | eµn, eΣn), where eΣn = h Σ−1 n + bS TΩnbS ⊙(anaT n) i−1 , eµn = eΣn h Σ−1 n µn + bS Tκn ⊙an i . Having introduced auxiliary variables, we must now derive Markov transitions to update them as well. Fortunately, the Pólya-gamma distribution is designed such that the conditional distribution of the auxiliary variables is simply a “tilted” Pólya-gamma distribution, p(ωt,n | st,n, νn, ψt,n) = pPG(ωt,n | b(st,n, νn), ψt,n). These auxiliary variables are conditionally independent given the activation and hence can be sampled in parallel. Moreover, efficient algorithms are available to generate Pólya-gamma random variates [21]. Our Gibbs updates for the remaining parameters and latent variables (νn, un, vn, and θ) are described in the supplementary material. A Python implementation of our inference algorithm is available at https://github.com/slinderman/pyglm. 4 Synthetic Data Experiments The need for network models is most pressing in recordings of large populations where the network is difficult to estimate and even harder to interpret. To assess the robustness and scalability of our framework, we apply our methods to simulated data with known ground truth. We simulate a one minute recording (1ms time bins) from a population of 200 neurons with discrete latent types that govern the connection strength via a stochastic block model and continuous latent locations that govern connection probability via a latent distance model. The spikes are generated from a Bernoulli observation model. First, we show that our approach of jointly inferring the network and its latent variables can provide dramatic improvements over alternative approaches. For comparison, consider the two-step procedure of Stevenson et al. [18] in which the network is fit with an ℓ1-regularized GLM and then a probabilistic network model is fit to the GLM connection weights. The advantage of this strategy is that the expensive GLM fitting is only performed once. However, when the data is limited, both the network and the latent variables are uncertain. Our Bayesian approach finds a very accurate network (Fig. 2b) 6 (a) (b) (c) Figure 3: Scalability of our inference algorithm as a function of: (a) the number of time bins, T; (b) the number of neurons, N; and (c) the average sparsity of the network, ρ. Wall-clock time is divided into time spent sampling auxiliary variables (“Obs.”) and time spent sampling the network (“Net.”). by jointly sampling networks and latent variables. In contrast, the standard GLM does not account for latent structure and finds strong connections as well as spuriously correlated neurons (Fig. 2c). Moreover, our fully Bayesian approach finds a set of latent locations that mimics the true locations and therefore accurately estimates connection probability (Fig. 2e). In contrast, subsequently fitting a latent distance model to the adjacency matrix of a thresholded GLM network finds an embedding that has no resemblance to the true locations, which is reflected in its poor estimate of connection probability (Fig. 2f). Next, we address the scalability of our MCMC algorithm. Three major parameters govern the complexity of inference: the number of time bins, T; the number of neurons, N; and the level of sparsity, ρ. The following experiments were run on a quad-core Intel i5 with 6GB of RAM. As shown in Fig. 3a, the wall clock time per iteration scales linearly with T since we must resample NT auxiliary variables. We scale at least quadratically with N due to the network, as shown in Fig. 3b. However, the total cost could actually be worse than quadratic since the cost of updating each connection could depend on N. Fortunately, the complexity of our collapsed Gibbs sampling algorithm only depends on the number of incident connections, d, or equivalently, the sparsity ρ = d/N. Specifically, we must solve a linear system of size d, which incurs a cubic cost, as seen in Fig. 3c. 5 Retinal Ganglion Cells Finally, we demonstrate the efficacy of this approach with an application to spike trains simultaneously recorded from a population of 27 retinal ganglion cells (RGCs), which have previously been studied by Pillow et al. [13]. Retinal ganglion cells respond to light shown upon their receptive field. Thus, it is natural to characterize these cells by the location of their receptive field center. Moreover, retinal ganglion cells come in a variety of types [16]. This population is comprised of two types of cells, on and off cells, which are characterized by their response to visual stimuli. On cells increase their firing when light is shone upon their receptive field; off cells decrease their firing rate in response to light in their receptive field. In this case, the population is driven by a binary white noise stimulus. Given the stimulus, the cell locations and types are readily inferred. Here, we show how these intuitive representations can be discovered in a purely unsupervised manner given one minute of spiking data alone and no knowledge of the stimulus. Figure 4 illustrates the results of our analysis. Since the data are binned at 1ms resolution, we have at most one spike per bin and we use a Bernoulli observation model. We fit the 12 network models of Table 2 (4 adjacency models and 3 weight models), and we find that, in terms of predictive log likelihood of held-out neurons, a latent distance model of the adjacency matrix and SBM of the weight matrix performs best (Fig. 4a). See the supplementary material for a detailed description of this comparison. Looking into the latent locations underlying the adjacency matrix our network GLM (NGLM), we find that the inferred distances between cells are highly correlated with the distances between the true locations. For comparison, we also fit a 2D Bernoulli linear dynamical system (LDS) — the Bernoulli equivalent of the Poisson LDS [7] — and we take rows of the N×2 emission matrix as locations. In contrast to our network GLM, the distances between LDS locations are nearly uncorrelated with the true distances (Fig. 4b) since the LDS does not capture the fact that distance only affects the probability of connection, not the weight. Not only are our distances accurate, the inferred locations are nearly identical to the true locations, up to affine transformation. In Fig. 4c, semitransparent markers show the inferred on cell locations, which have been rotated and scaled to 7 Weights (a) (b) (c) (d) (e) (f) On Cell Locations Inferred distance [a.u.] Pairwise Distances True distance [a.u.] LDS NGLM Figure 4: Using our framework, retinal ganglion cell types and locations can be inferred from spike trains alone. (a) Model comparison. (b) True and inferred distances between cells. (c) True and inferred cell locations. (d-f) Inferred network, connection probability, and mean weight, respectively. See main text for further details. best align with the true locations shown by the outlined marks. Based solely on patterns of correlated spiking, we have recovered the receptive field arrangements. Fig. 4d shows the inferred network, A ⊙W , under a latent distance model of connection probability and a stochastic block model for connection weight. The underlying connection probabilities from the distance model are shown in Fig. 4e. Finally, Fig. 4f shows that we have discovered not only the cell locations, but also their latent types. With an SBM, the mean weight is a function of latent type, and under the posterior, the neurons are clearly clustered into the two true types that exhibit the expected within-class excitation and between-class inhibition. 6 Conclusion Our results with both synthetic and real neural data provide compelling evidence that our methods can find meaningful structure underlying neural spike trains. Given the extensive work on characterizing retinal ganglion cell responses, we have considerable evidence that the representation we learn from spike trains alone is indeed the optimal way to summarize this population of cells. This lends us confidence that we may trust the representations learned from spike trains recorded from more enigmatic brain areas as well. While we have omitted stimulus from our models and only used it for confirming types and locations, in practice we could incorporate it into our model and even capture type- and location-dependent patterns of stimulus dependence with our hierarchical approach. Likewise, the network GLM could be combined with the PLDS as in Vidne et al. [20] to capture sources of low dimensional, shared variability. Latent functional networks underlying spike trains can provide unique insight into the structure of neural populations. Looking forward, methods that extract interpretable representations from complex neural data, like those developed here, will be key to capitalizing on the dramatic advances in neural recording technology. We have shown that networks provide a natural bridge to connect neural types and features to spike trains, and demonstrated promising results on both real and synthetic data. Acknowledgments. We thank E. J. Chichilnisky, A. M. Litke, A. Sher and J. Shlens for retinal data. SWL is supported by the Simons Foundation SCGB-418011. RPA is supported by NSF IIS-1421780 and the Alfred P. Sloan Foundation. JWP was supported by grants from the McKnight Foundation, Simons Collaboration on the Global Brain (SCGB AWD1004351), NSF CAREER Award (IIS-1150186), and NIMH grant MH099611. 8 References [1] 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, 10(5):413–420, 2013. [2] D. R. Brillinger, H. L. Bryant Jr, and J. P. Segundo. Identification of synaptic interactions. Biological Cybernetics, 22(4):213–228, 1976. [3] F. Gerhard, T. Kispersky, G. J. Gutierrez, E. Marder, M. Kramer, and U. Eden. Successful reconstruction of a physiological circuit with known connectivity from spiking activity alone. PLoS Computational Biology, 9(7):e1003138, 2013. [4] R. L. Goris, J. A. Movshon, and E. P. Simoncelli. Partitioning neuronal variability. Nature Neuroscience, 17(6):858–865, 2014. [5] B. F. Grewe, D. Langer, H. Kasper, B. M. Kampa, and F. Helmchen. High-speed in vivo calcium imaging reveals neuronal network activity with near-millisecond precision. Nature methods, 7(5):399–405, 2010. [6] P. D. Hoff. Modeling homophily and stochastic equivalence in symmetric relational data. Advances in Neural Information Processing Systems 20, 20:1–8, 2008. [7] J. H. Macke, L. Buesing, J. P. Cunningham, M. Y. Byron, K. V. Shenoy, and M. Sahani. Empirical models of spiking in neural populations. In Advances in neural information processing systems, pages 1350–1358, 2011. [8] T. J. Mitchell and J. J. Beauchamp. Bayesian Variable Selection in Linear Regression. Journal of the American Statistical Association, 83(404):1023—-1032, 1988. [9] K. Nowicki and T. A. B. Snijders. Estimation and prediction for stochastic blockstructures. Journal of the American Statistical Association, 96(455):1077–1087, 2001. [10] P. Orbanz and D. M. Roy. Bayesian models of graphs, arrays and other exchangeable random structures. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 37(2):437–461, 2015. [11] L. Paninski. Maximum likelihood estimation of cascade point-process neural encoding models. Network: Computation in Neural Systems, 15(4):243–262, Jan. 2004. [12] J. W. Pillow and J. Scott. Fully bayesian inference for neural models with negative-binomial spiking. In F. Pereira, C. Burges, L. Bottou, and K. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 1898–1906. 2012. [13] J. W. Pillow, J. Shlens, L. Paninski, A. Sher, A. M. Litke, E. Chichilnisky, and E. P. Simoncelli. Spatiotemporal correlations and visual signalling in a complete neuronal population. Nature, 454(7207):995–999, 2008. [14] N. G. Polson, J. G. Scott, and J. Windle. Bayesian inference for logistic models using Pólya–gamma latent variables. Journal of the American Statistical Association, 108(504):1339–1349, 2013. [15] R. Prevedel, Y.-G. Yoon, M. Hoffmann, N. Pak, G. Wetzstein, S. Kato, T. Schrödel, R. Raskar, M. Zimmer, E. S. Boyden, et al. Simultaneous whole-animal 3d imaging of neuronal activity using light-field microscopy. Nature methods, 11(7):727–730, 2014. [16] J. R. Sanes and R. H. Masland. The types of retinal ganglion cells: current status and implications for neuronal classification. Annual review of neuroscience, 38:221–246, 2015. [17] D. Soudry, S. Keshri, P. Stinson, M.-h. Oh, G. Iyengar, and L. Paninski. A shotgun sampling solution for the common input problem in neural connectivity inference. arXiv preprint arXiv:1309.3724, 2013. [18] I. H. Stevenson, J. M. Rebesco, N. G. Hatsopoulos, Z. Haga, L. E. Miller, and K. P. Körding. Bayesian inference of functional connectivity and network structure from spikes. Neural Systems and Rehabilitation Engineering, IEEE Transactions on, 17(3):203–213, 2009. [19] W. Truccolo, U. T. Eden, M. R. Fellows, J. P. Donoghue, and E. N. Brown. A point process framework for relating neural spiking activity to spiking history, neural ensemble, and extrinsic covariate effects. Journal of Neurophysiology, 93(2):1074–1089, 2005. doi: 10.1152/jn.00697.2004. [20] M. Vidne, Y. Ahmadian, J. Shlens, J. W. Pillow, J. Kulkarni, A. M. Litke, E. Chichilnisky, E. Simoncelli, and L. Paninski. Modeling the impact of common noise inputs on the network activity of retinal ganglion cells. Journal of computational neuroscience, 33(1):97–121, 2012. [21] J. Windle, N. G. Polson, and J. G. Scott. Sampling Pólya-gamma random variates: alternate and approximate techniques. arXiv preprint arXiv:1405.0506, 2014. 9 | 2016 | 254 |
6,166 | Latent Attention For If-Then Program Synthesis Xinyun Chen∗ Shanghai Jiao Tong University Chang Liu Richard Shin Dawn Song UC Berkeley Mingcheng Chen† UIUC Abstract Automatic translation from natural language descriptions into programs is a longstanding challenging problem. In this work, we consider a simple yet important sub-problem: translation from textual descriptions to If-Then programs. We devise a novel neural network architecture for this task which we train end-toend. Specifically, we introduce Latent Attention, which computes multiplicative weights for the words in the description in a two-stage process with the goal of better leveraging the natural language structures that indicate the relevant parts for predicting program elements. Our architecture reduces the error rate by 28.57% compared to prior art [3]. We also propose a one-shot learning scenario of If-Then program synthesis and simulate it with our existing dataset. We demonstrate a variation on the training procedure for this scenario that outperforms the original procedure, significantly closing the gap to the model trained with all data. 1 Introduction A touchstone problem for computational linguistics is to translate natural language descriptions into executable programs. Over the past decade, there has been an increasing number of attempts to address this problem from both the natural language processing community and the programming language community. In this paper, we focus on a simple but important subset of programs containing only one If-Then statement. An If-Then program, which is also called a recipe, specifies a trigger and an action function, representing a program which will take the action when the trigger condition is met. On websites, such as IFTTT.com, a user often provides a natural language description of the recipe’s functionality as well. Recent work [16, 3, 7] studied the problem of automatically synthesizing If-Then programs from their descriptions. In particular, LSTM-based sequence-to-sequence approaches [7] and an approach of ensembling a neural network and logistic regression [3] were proposed to deal with this problem. In [3], however, the authors claim that the diversity of vocabulary and sentence structures makes it difficult for an RNN to learn useful representations, and their ensemble approach indeed shows better performance than the LSTM-based approach [7] on the function prediction task (see Section 2). In this paper, we introduce a new attention architecture, called Latent Attention, to overcome this difficulty. With Latent Attention, a weight is learned on each token to determine its importance for prediction of the trigger or the action. Unlike standard attention methods, Latent Attention computes the token weights in a two-step process, which aims to better capture the sentence structure. We show that by employing Latent Attention over outputs of a bi-directional LSTM, our new Latent Attention model can improve over the best prior result [3] by 5 percentage points from 82.5% to 87.5% when predicting the trigger and action functions together, reducing the error rate of [3] by 28.57%. Besides the If-Then program synthesis task proposed by [16], we are also interested in a new scenario. When a new trigger or action is released, the training data will contain few corresponding ∗Part of the work was done while visiting UC Berkeley. †Work was done while visiting UC Berkeley. Mingcheng Chen is currently working at Google [X]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. examples. We refer to this case as a one-shot learning problem. We show that our Latent Attention model on top of dictionary embedding combining with a new training algorithm can achieve a reasonably good performance for the one-shot learning task. 2 If-Then Program Synthesis If-Then Recipes. In this work, we consider an important class of simple programs called IfThen“recipes” (or recipes for short), which are very small programs for event-driven automation of tasks. Specifically, a recipe consists of a trigger and an action, indicating that the action will be executed when the trigger is fulfilled. The simplicity of If-Then recipes makes it a great tool for users who may not know how to code. Even non-technical users can specify their goals using recipes, instead of writing code in a more full-fledged programming language. A number of websites have embraced the If-Then programming paradigm and have been hugely successful with tens of thousands of personal recipes created, including IFTTT.com and Zapier.com. In this paper, we focus on data crawled from IFTTT.com. IFTTT.com allows users to share their recipes publicly, along with short natural language descriptions to explain the recipes’ functionality. A recipe on IFTTT.com consists of a trigger channel, a trigger function, an action channel, an action function, and arguments for the functions. There are a wide range of channels, which can represent entities such as devices, web applications, and IFTTTprovided services. Each channel has a set of functions representing events (i.e., trigger functions) or action executions (i.e., action functions). For example, an IFTTT recipe with the following description Autosave your Instagram photos to Dropbox has the trigger channel Instagram, trigger function Any new photo by you, action channel Dropbox, and action function Add file from URL. Some functions may take arguments. For example, the Add file from URL function takes three arguments: the source URL, the name for the saved file, and the path to the destination folder. Problem Setup. Our task is similar to that in [16]. In particular, for each description, we focus on predicting the channel and function for trigger and action respectively. Synthesizing a valid recipe also requires generating the arguments. As argued by [3], however, the arguments are not crucial for representing an If-Then program. Therefore, we defer our treatment for arguments generation to the supplementary material, where we show that a simple frequency-based method can outperform all existing approaches. In this way, our task turns into two classification problems for predicting the trigger and action functions (or channels). Besides the problem setup in [16], we also introduce a new variation of the problem, a one-shot learning scenario: when some new channels or functions are initially available, there are very few recipes using these channels and functions in the training set. We explore techniques to still achieve a reasonable prediction accuracy on labels with very few training examples. 3 Related Work Recently there has been increasing interests in executable code generation. Existing works have studied generating domain-specific code, such as regular expressions [12], code for parsing input documents [14], database queries [22, 4], commands to robots [10], operating systems [5], smartphone automation [13], and spreadsheets [8]. A recent effort considers translating a mixed natural language and structured specification into programming code [15]. Most of these approaches rely on semantic parsing [19, 9, 1, 16]. In particular, [16] introduces the problem of translating IFTTT descriptions into executable code, and provides a semantic parsing-based approach. Two recent work studied approaches using sequence-to-sequence model [7] and an ensemble of a neural network and a logistic regression model [3] to deal with this problem, and showed better performance than [16]. We show that our Latent Attention method outperforms all prior approaches. Recurrent neural networks [21, 6] along with attention [2] have demonstrated impressive results on tasks such as machine translation [2], generating image captions [20], syntactic parsing [18] and question answering [17]. 2 Description {𝑥𝑖} Softmax Latent Attention Latent Input 𝐷 Column-wise Softmax 𝑙 Active Attention Active Input Output 𝑜 𝑃 Softmax Prediction 𝑉 𝑢 𝑤 Latent Attention 𝐴 𝐸 Weighted Sum Weighted Sum weights weights Embedding 𝜃1 Embedding 𝜃2 Embedding 𝜃3 Figure 1: Network Architecture 4 Latent Attention Model 4.1 Motivation To translate a natural language description into a program, we would like to locate the words in the description that are the most relevant for predicting desired labels (trigger/action channels/functions). For example, in the following description Autosave Instagram photos to your Dropbox folder the blue text “Instagram photos” is the most relevent for predicting the trigger. To capture this information, we can adapt the attention mechanism [2, 17] —first compute a weight of the importance of each token in the sentence, and then output a weighted sum of the embeddings of these tokens. However, our intuition suggests that the weight for each token depends not only on the token itself, but also the overall sentence structure. For example, in Post photos in your Dropbox folder to Instagram “Dropbox” determines the trigger, even though in the previous example, which contains almost the same set of tokens, “Instagram” should play this role. In this example, the prepositions such as “to” hint that the trigger channel is specified in the middle of the description rather than at the end. Taking this into account allows us to select “Dropbox” over “Instagram”. Latent Attention is designed to exploit such clues. We use the usual attention mechanism for computing a latent weight for each token to determine which tokens in the sequence are more relevant to the trigger or the action. These latent weights determine the final attention weights, which we call active weights. As an example, given the presence of the token “to”, we might look at the tokens before “to” to determine the trigger. 4.2 The network The Latent Attention architecture is presented in Figure 1. We follow the convention of using lowercase letters to indicate column vectors, and capital letters for matrices. Our model takes as input a sequence of symbols x1, ..., xJ, with each coming from a dictionary of N words. We denote X = [x1, ..., xJ]. Here, J is the maximal length of a description. We illustrate each layer of the network below. Latent attention layer. We assume each symbol xi is encoded as a one-hot vector of N dimensions. We can embed the input sequence X into a d-dimensional embedding sequence using E = Embedθ1(X), where θ1 is a set of parameters. We will discuss different embedding methods in Section 4.3. Here E is of size d × J. 3 The latent attention layer’s output is computed as a standard softmax on top of E. Specifically, assume that l is the J-dimensional output vector, u is a d-dimensional trainable vector, we have l = softmax(uT Embedθ1(X)) Active attention layer. The active attention layer computes each token’s weight based on its importance for the final prediction. We call these weights active weights. We first embed X into D using another set of parameters θ2, i.e., D = Embedθ2(X) is of size d × J. Next, for each token Di, we compute its active attention input Ai through a softmax: Ai = softmax(V Di) Here, Ai and Di denote the the i-th column vector of A and D respectively, and V is a trainable parameter matrix of size J × d. Notice that V Di = (V D)i, we can compute A by performing column-wise softmax over V D. Here, A is of size J × J. The active weights are computed as the sum of Ai, weighted by the output of latent attention weight: w = J X i=1 liAi = Al Output representation. We use a third set of parameters θ3 to embed X into a d × J embedding matrix, and the final output o, a d-dimensional vector, is the sum of the embedding weighted by the active weights: o = Embedθ3(X)w Prediction. We use a softmax to make the final prediction: ˆf = softmax(Po), where P is a d × M parameter matrix, and M is the number of classes. 4.3 Details Embeddings. We consider two embedding methods for representing words in the vector space. The first is a straightforward word embedding, i.e., Embedθ(X) = θX, where θ is a d × N matrix and the rows of X are one-hot vectors over the vocabulary of size N. We refer to this as “dictionary embedding” later in the paper. θ is not pretrained with a different dataset or objective, but initialized randomly and learned at the same time as all other parameters. We observe that when using Latent Attention, this simple method is effective enough to outperform some recent results [16, 7]. The other approach is to take the word embeddings, run them through a bi-directional LSTM (BDLSTM) [21], and then use the concatenation of two LSTMs’ outputs at each time step as the embedding. This can take into account the context around a token, and thus the embeddings should contain more information from the sequence than from a single token. We refer to such an approach as “BDLSTM embedding”. The details are deferred to the supplementary material. In our experiments, we observe that with the help of this embedding method, Latent Attention can outperform the prior state-of-the-art. In Latent Attention, we have three sets of embedding parameters, i.e., θ1, θ2, θ3. In practice, we find that we can equalize the three without loss of performance. Later, we will show that keeping them separate is helpful for our one-shot learning setting. Normalizing active weights. We find that normalizing the active weights a before computing the output is helpful to improve the performance. Specifically, we compute the output as o = Embedθ(X)normalized(w) = Embedθ(X) w ||w|| where ||w|| is the L2-norm of w. In our experiments, we observe that this normalization can improve the performance by 1 to 2 points. Padding and clipping. Latent Attention requires a fixed-length input sequence. To handle inputs of variable lengths, we perform padding and clipping. If an input’s length is smaller than J, then we pad it with null tokens at the end of the sequence. If an input’s length is greater than J (which is 25 in our experiements), we keep the first 12 and the last 13 tokens, and get rid of all the rest. 4 Vocabulary. We tokenize each sentence by splitting on whitespace and punctuation (e.g., ., !?”′ : ; )( ), and convert all characters into lowercase. We keep all punctuation symbols as tokens too. We map each of the top 4,000 most frequent tokens into themselves, and all the rest into a special token ⟨UNK⟩. Therefore our vocabulary size is 4,001. Our implementation has no special handling for typos. 5 If-Then Program Synthesis Task Evaluation In this section, we evaluate our approaches with several baselines and previous work [16, 3, 7]. We use the same crawler from Quirk et al. [16] to crawl recipes from IFTTT.com. Unfortunately, many recipes are no longer available. We crawled all remaining recipes, ultimately obtaining 68,083 recipes for the training set. [16] also provides a list of 5,171 recipes for validation, and 4,294 recipes for test. All test recipes come with labels from Amazon Mechanical Turk workers. We found that only 4,220 validation recipes and 3,868 test recipes remain available. [16] defines a subset of test recipes, where each recipe has at least 3 workers agreeing on its labels from IFTTT.com, as the gold testset. We find that 584 out of the 758 gold test recipes used in [16] remain available. We refer to these recipes as the gold test set. We present the data statistics in the supplementary material. Evaluated methods. We evaluate two embedding methods as well as the effectiveness of different attention mechanisms. In particular, we compare no attention, standard attention, and Latent Attention. Therefore, we evaluate six architectures in total. When using dictionary embedding with no attention, for each sentence, we sum the embedding of each word, then pass it through a softmax layer for prediction. For convenience, we refer to such a process as standard softmax. For BDLSTM with no attention, we concatenate final states of forward and backward LSTMs, then pass the concatenation through a softmax layer for prediction. The two embedding methods with standard attention mechanism [17] are described in the supplementary material. The Latent Attention models have been presented in Section 4. Training details. For architectures with no attention, they were trained using a learning rate of 0.01 initially, which is multiplied by 0.9 every 1,000 time steps. Gradients with L2 norm greater than 5 were scaled down to have norm 5. For architectures with either standard attention mechanism or Latent Attention, they were trained using a learning rate of 0.001 without decay, and gradients with L2 norm greater than 40 were scaled down to have norm 40. All models were trained using Adam [11]. All weights were initialized uniformly randomly in [−0.1, 0.1]. Mini-batches were randomly shuffled during training. The mini-batch size is 32 and the embedding vector size d is 50. Results. Figure 2 and Figure 3 present the results of prediction accuracy on channel and function respectively. Three previous works’ results are presented as well. In particular, [16] is the first work introducing the If-Then program synthesis task. [7] investigates the approaches using sequence-tosequence models, while [3] proposes an approach to ensemble a feed-forward neural network and a logistic regression model. The numerical values for all data points can be found in the supplementary material. For our six architectures, we use 10 different random initializations to train 10 different models. To ensemble k models, we choose the best k models on the validation set among the 10 models, and average their softmax outputs as the ensembled output. For the three existing approaches [16, 7, 3], we choose the best results from these papers. We train the model to optimize for function prediction accuracy. The channel accuracy in Figure 2 is computed in the following way: to predict the channel, we first predict the function (from a list of all functions in all channels), and the channel that the function belongs to is returned as the predicted channel. We observe that • Latent Attention steadily improves over standard attention architectures and no attention ones using either embedding method. • In our six evaluated architectures, ensembling improves upon using only one model significantly. • When ensembling more than one model, BDLSTM embeddings perform better than dictionary embeddings. We attribute this to that for each token, BDLSTM can encode the 5 Figure 2: Accuracy for Channel Figure 3: Accuracy for Channel+Function information of its surrounding tokens, e.g., phrases, into its embedding, which is thus more effective. • For the channel prediction task in Figure 2, all architectures except dictionary embedding with no attention (i.e., Dict) can outperform [16]. Ensembling only 2 BDLSTM models with either standard attention or Latent Attention is enough to achieve better performance than prior art [7]. By ensembling 10 BDLSTM+LA models, we can improve the latest results [7] and [3] by 1.9 points and 2.5 point respectively. • For the function prediction task in Figure 3, all our six models (including Dict) outperform [16]. Further, ensembling 9 BDLSTM+LA can improve the previous best results [3] by 5 points. In other words, our approach reduces the error rate of [3] by 28.57%. 6 One-Shot Learning We consider the scenario when websites such as IFTTT.com release new channels and functions. In such a scenario, for a period of time, there will be very few recipes using the newly available channels and fucntions; however, we would still like to enable synthesizing If-Then programs using these new functions. The rarity of such recipes in the training set creates a challenge similar to the one-shot learning setting. In this scenario, we want to leverage the large amount of recipes for existing functions, and the goal is to achieve a good prediction accuracy for the new functions without significantly compromising the overall accuracy. 6.1 Datasets to simulate one-shot learning To simulate this scenario with our existing dataset, we build two one-shot variants of it as follows. We first split the set of trigger functions into two sets, based on their frequency. The top100 set contains the top 100 most frequently used trigger functions, while the non-top100 set contains the rest. Given a set of trigger functions S, we can build a skewed training set to include all recipes using functions in S, and 10 randomly chosen recipes for each function not in S. We denote this skewed training set created based on S as (S, S), and refer to functions in S as majority functions and functions in S as minority functions. In our experiments, we construct two new training sets by choosing S to be the top100 set and non-top100 set respectively. We refer to these two training sets as SkewTop100 and SkewNonTop100. The motivation for creating these datasets is to mimic two different scenarios. On one hand, SkewTop100 simulates the case that at the startup phase of a service, popular recipes are first published, while less frequently used recipes are introduced later. On the other hand, SkewNonTop100 captures the opposite situation. The statistics for these two training sets are presented in the supplementary material. While SkewTop100 is more common in real life, the SkewNonTop100 training set is only 15.73% of the entire training set, and thus is more challenging. 6 55 60 65 70 75 80 85 All
Trigger
Function NonTop100
Trigger
Function (a) Trigger Function Accuracy (SkewTop100) 30 35 40 45 50 55 60 65 70 All
Trigger
Function Top100
Trigger
Function (b) Trigger Function Accuracy (SkewNonTop100) Figure 4: One-shot learning experiments. For each column XY-Z, X from {B, D} represents whether the embedding is BDLSTM or Dictionary; Y is either empty, or is from {A, L}, meaning that either no attention is used, or standard attention or Latent Attention is used; and Z is from {S, 2N, 2}, denoting standard training, na¨ıve two-step training or two-step training. 6.2 Training We evaluate three training methods as follows, where the last one is specifically designed for attention mechanisms. In all methods, the training data is either SkewTop100 or SkewNonTop100. Standard training. We do not modify the training process. Na¨ıve two-step training. We do standard training first. Since the data is heavily skewed, the model may behave poorly on the minority functions. From a training set (S, S), we create a rebalanced dataset, by randomly choosing 10 recipes for each function in S and all recipes using functions in S. Therefore, the numbers of recipes using each function are similar in this rebalanced dataset. We recommence the training using this rebalanced training dataset in the second step. Two-step training. We still do standard training first, and then create the rebalanced dataset in the similar way as that in na¨ıve two-step training. However, in the second step, instead of training the entire network, we keep the attention parameters fixed, and train only the parameters in the remaining part of the model. Take the Latent Attention model depicted in Figure 1 as an example. In the second step, we keep parameters θ1, θ2, u, and V fixed, and only update θ3 and P while training on the rebalanced dataset. We based this procedure on the intuition that since the rebalanced dataset is very small, fewer trainable parameters enable easier training. 6.3 Results We compare the three training strategies using our proposed models. We omit the no attention models, which do not perform better than attention models and cannot be trained using two-step training. We only train one model per strategy, so the results are without ensembling. The results are presented in Figure 4. The concrete values can be found in the supplementary material. For reference, the best single BDLSTM+LA model can achieve 89.38% trigger function accuracy: 91.11% on top100 functions, and 85.12% on non-top100 functions. We observe that • Using two-step training, both the overall accuracy and the accuracy on the minority functions are generally better than using standard training and na¨ıve two-step training. • Latent Attention outperforms standard attention when using the same training method. • The best Latent Attention model (Dict+LA) with two-step training can achieve 82.71% and 64.84% accuracy for trigger function on the gold test set, when trained on the SkewTop100 and SkewNonTop100 datasets respectively. For comparison, when using the entire training dataset, trigger function accuracy of Dict+LA is 89.38%. Note that the SkewNonTop100 dataset accounts for only 15.73% of the entire training dataset. • For SkewTop100 training set, Dict+LA model can achieve 78.57% accuracy on minority functions in gold test set. This number for using the full training dataset is 85.12%, although the non-top100 recipes in SkewTop100 make up only 30.54% of those in the full training set. 7 Post your Instagram photos to Tumblr (b) with the , triggered at sunrise. latent 0.75 0.14 trigger 0.8 0.47 action 0.76 trigger action > flickr (d) text tagged #todo, from then quick add event to google calendar. latent 0.81 0.16 0.42 trigger 0.2 0.1 0.15 0.29 0.23 0.12 action 0.13 0.7 0.1 0.18 0.23 trigger action any photos of me to latent 0.83 trigger 0.19 0.24 action 0.18 latent trigger action weights (a) (c) (e) (f) weights label weights label weights 0.39 weather 0.33 0.11 0.15 0.12 0.16 Instagram.Any_new_photo_by_you Tumblr.Create_a_photo_post Weather.Sunrise Google_Drive.Add_row_to_spreadsheet WordPress.Create_a_post Prediction 0.21 Correct Predictions If send IFTTT a Misclassified Examples 0.17 Flickr.Upload_public_photo_from_URL SMS.Send_IFTTT_an_SMS_tagged Google_Calendar.Quick_add_event Instagram.Any_new_photo_by_you 0.8 0.92 Instagram Spreadsheet daily WordPress.Create_a_photo_post Facebook.You_are_tagged_in_a_photo Prediction Android_Photos.Any_new_photo 0.44 0.34 0.85 to Truth (Action) Wordpress 0.57 0.14 0.54 Download dropbox Truth (Trigger) Instagram 0.67 cell phone Figure 5: Examples of attention weights output by Dict+LA. latent, trigger, and action indicate the latent weights and active weights for the trigger and the action respectively. Low values less than 0.1 are omitted. 7 Empirical Analysis of Latent Attention We show some correctly classified and misclassified examples in Figure 5 along with their attention weights. The weights are computed from a Dict+LA model. We choose Dict+LA instead of BDLSTM+LA, because the BDLSTM embedding of each token does not correspond to the token itself only — it will contain the information passing from previous and subsequent tokens in the sequence. Therefore, the attention of BDLSTM+LA is not as easy to interpret as Dict+LA. The latent weights are those used to predict the action functions. In correctly classified examples, we observe that the latent weights are assigned to the prepositions that determine which parts of the sentence are associated with the trigger or the action. An interesting example is (b), where a high latent weight is assigned to “,”. This indicates that LA considers “,” as informative as other English words such as “to”. We observe the similar phenomenon in Example (c), where token “>” has the highest latent weight. In several misclassified examples, we observe that some attention weights may not be assigned correctly. In Example (e), although there is nowhere explicitly showing the trigger should be using a Facebook channel, the phrase “photo of me” hints that “me” should be tagged in the photo. Therefore, a human can infer that this should use a function from the Facebook channel, called “You are tagged in a photo”. The Dict+LA model does not learn this association from the training data. In this example, we expect that the model should assign high weights onto the phrase “of me”, but this is not the case, i.e., the weights assigned to “of” and “me” are 0.01 and 0.007 respectively. This shows that the Dict+LA model does not correlate these two words with the You are tagged in a photo function. BDLSTM+LA, on the other hand, can jointly consider the two tokens, and make the correct prediction. Example (h) is another example where outside knowledge might help: Dict+LA predicts the trigger function to be Create a post since it does not learn that Instagram only consists of photos (and low weight was placed on “Instagram” when predicting the trigger anyway). Again, BDLSTM+LA can predict this case correctly. Acknowledgements. We thank the anonymous reviewers for their valuable comments. This material is based upon work partially supported by the National Science Foundation under Grant No. TWC-1409915, and a DARPA grant FA8750-15-2-0104. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation and DARPA. 8 References [1] Y. Artzi. Broad-coverage ccg semantic parsing with amr. In EMNLP, 2015. [2] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. [3] I. Beltagy and C. Quirk. Improved semantic parsers for if-then statements. In ACL, 2016. [4] J. Berant, A. Chou, R. Frostig, and P. Liang. Semantic parsing on freebase from questionanswer pairs. In EMNLP, 2013. [5] S. R. Branavan, H. Chen, L. S. Zettlemoyer, and R. Barzilay. Reinforcement learning for mapping instructions to actions. In ACL, 2009. [6] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [7] L. Dong and M. Lapata. Language to logical form with neural attention. In ACL, 2016. [8] S. Gulwani and M. Marron. Nlyze: Interactive programming by natural language for spreadsheet data analysis and manipulation. In SIGMOD, 2014. [9] B. K. Jones, M. Johnson, and S. Goldwater. Semantic parsing with bayesian tree transducers. In ACL, 2012. [10] R. J. Kate, Y. W. Wong, and R. J. Mooney. Learning to transform natural to formal languages. In AAAI, 2005. [11] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [12] N. Kushman and R. Barzilay. Using semantic unification to generate regular expressions from natural language. In NAACL, 2013. [13] V. Le, S. Gulwani, and Z. Su. Smartsynth: Synthesizing smartphone automation scripts from natural language. In MobiSys, 2013. [14] T. Lei, F. Long, R. Barzilay, and M. C. Rinard. From natural language specifications to program input parsers. In ACL, 2013. [15] W. Ling, E. Grefenstette, K. M. Hermann, T. Kocisk´y, A. Senior, F. Wang, and P. Blunsom. Latent predictor networks for code generation. CoRR, 2016. [16] C. Quirk, R. Mooney, and M. Galley. Language to code: Learning semantic parsers for if-thisthen-that recipes. In ACL, 2015. [17] S. Sukhbaatar, J. Weston, R. Fergus, et al. End-to-end memory networks. In NIPS, 2015. [18] O. Vinyals, L. Kaiser, T. Koo, S. Petrov, I. Sutskever, and G. Hinton. Grammar as a foreign language. In NIPS, 2015. [19] Y. W. Wong and R. J. Mooney. Learning for semantic parsing with statistical machine translation. In NAACL, 2006. [20] K. Xu, J. Ba, R. Kiros, A. Courville, R. Salakhutdinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. arXiv preprint arXiv:1502.03044, 2015. [21] W. Zaremba, I. Sutskever, and O. Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. [22] J. M. Zelle. Learning to parse database queries using inductive logic programming. In AAAI, 1996. 9 | 2016 | 255 |
6,167 | Understanding Probabilistic Sparse Gaussian Process Approximations Matthias Bauer†‡ Mark van der Wilk† Carl Edward Rasmussen† †Department of Engineering, University of Cambridge, Cambridge, UK ‡Max Planck Institute for Intelligent Systems, T¨ubingen, Germany {msb55, mv310, cer54}@cam.ac.uk Abstract Good sparse approximations are essential for practical inference in Gaussian Processes as the computational cost of exact methods is prohibitive for large datasets. The Fully Independent Training Conditional (FITC) and the Variational Free Energy (VFE) approximations are two recent popular methods. Despite superficial similarities, these approximations have surprisingly different theoretical properties and behave differently in practice. We thoroughly investigate the two methods for regression both analytically and through illustrative examples, and draw conclusions to guide practical application. 1 Introduction Gaussian Processes (GPs) [1] are a flexible class of probabilistic models. Perhaps the most prominent practical limitation of GPs is that the computational requirement of an exact implementation scales as O(N 3) time, and as O(N 2) memory, where N is the number of training cases. Fortunately, recent progress has been made in developing sparse approximations, which retain the favourable properties of GPs but at a lower computational cost, typically O(NM 2) time and O(NM) memory for some chosen M < N. All sparse approximations rely on focussing inference on a small number of quantities, which represent approximately the entire posterior over functions. These quantities can be chosen differently, e.g., function values at certain input locations, properties of the spectral representations [2], or more abstract representations [3]. Similar ideas are used in random feature expansions [4, 5]. Here we focus on methods that represent the approximate posterior using the function value at a set of M inducing inputs (also known as pseudo-inputs). These methods include the Deterministic Training Conditional (DTC) [6] and the Fully Independent Training Conditional (FITC) [7], see [8] for a review, as well as the Variational Free Energy (VFE) approximation [9]. The methods differ both in terms of the theoretical approach in deriving the approximation, and in terms of how the inducing inputs are handled. Broadly speaking, inducing inputs can either be chosen from the training set (e.g. at random) or be optimised over. In this paper we consider the latter, as this will generally allow for the best trade-off between accuracy and computational requirements. Training the GP entails jointly optimizing over inducing inputs and hyperparameters. In this work, we aim to thoroughly investigate and characterise the difference in behaviour of the FITC and VFE approximations. We investigate the biases of the bounds when learning hyperparameters, where each method allocates its modelling capacity, and the optimisation behaviour. In Section 2 we briefly introduce inducing point methods and state the two algorithms using a unifying notation. In Section 3 we discuss properties of the two approaches, both theoretical and practical. Our aim is to understand the approximations in detail in order to know under which conditions each method is likely to succeed or fail in practice. We highlight issues that may arise in practical situations and how to diagnose and possibly avoid them. Some of the properties of the methods have been previously 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. reported in the literature; our aim here is a more complete and comparative approach. We draw conclusions in Section 4. 2 Sparse Gaussian Processes A Gaussian Process is a flexible distribution over functions, with many useful analytical properties. It is fully determined by its mean m(x) and covariance k(x, x′) functions. We assume the mean to be zero, without loss of generality. The covariance function determines properties of the functions, like smoothness, amplitude, etc. A finite collection of function values at inputs {xi} follows a Gaussian distribution N (f; 0, Kff), where [Kff]ij = k(xi, xj). Here we revisit the GP model for regression [1]. We model the function of interest f(·) using a GP prior, and noisy observations at the input locations X = {xi}i are observed in the vector y. p(f) = N (f; 0, Kff) p(y|f) = N Y n=1 N yn; fn, σ2 n (1) Throughout, we employ a squared exponential covariance function k(x, x′) = s2 f exp(−1 2|x − x′|2/ℓ2), but our results only rely on the decay of covariances with distance. The hyperparameter θ contains the signal variance s2 f, the lengthscale ℓand the noise variance σ2 n, and is suppressed in the notation. To make predictions, we follow the common approach of first determining θ by optimising the marginal likelihood and then marginalising over the posterior of f: θ∗= argmax θ p(y|θ) p(y∗|y) = p(y∗, y) p(y) = Z p(y∗|f ∗)p(f ∗|f)p(f|y)dfdf ∗ (2) While the marginal likelihood, the posterior and the predictive distribution all have closed-form Gaussian expressions, the cost of evaluating them scales as O(N 3) due to the inversion of Kff+ σ2 nI, which is impractical for many datasets. Over the years, the two inducing point methods that have remained most influential are FITC [7] and VFE [9]. Unlike previously proposed methods (see [6, 10, 8]), both FITC and VFE provide an approximation to the marginal likelihood which allows both the hyperparameters and inducing inputs to be learned from the data through gradient based optimisation. Both methods rely on the low rank matrix Qff= KfuK−1 uuKuf instead of the full rank Kffto reduce the size of any matrix inversion to M. Note that for most covariance functions, the eigenvalues of Kuu are not bounded away from zero. Any practical implementation will have to address this to avoid numerical instability. We follow the common practice of adding a tiny diagonal jitter term εI to Kuu before inverting. 2.1 Fully Independent Training Conditional (FITC) Over the years, FITC has been formulated in several different ways. A form of FITC first appeared in an online learning setting by Csat´o and Opper [11], derived from the viewpoint of approximating the full GP posterior. Snelson and Ghahramani [7] introduced FITC as approximate inference in a model with a modified likelihood and proposed using its marginal likelihood to train the hyperparameters and inducing inputs jointly. An alternate interpretation where the prior is modified, but exact inference is performed, was presented in [8], unifying it with other techniques. The latest interesting development came with the connection that FITC can be obtained by approximating the GP posterior using Expectation Propagation (EP) [12, 13, 14]. Using the interpretation of modifying the prior to p(f) = N (f; 0, Qff+ diag[Kff−Qff]) (3) we obtain the objective function in Eq. (5). We would like to stress, however, that this modification gives exactly the same procedure as approximating the full GP posterior with EP. Regardless of the fact that that FITC can be seen as a completely different model, we aim to characterise it as an approximation to the full GP. 2 2.2 Variational Free Energy (VFE) Variational inference can also be used to approximate the true posterior. We follow the derivation by Titsias [9] and bound the marginal likelihood, by instantiating extra function values on the latent Gaussian process u at locations Z,1 followed by lower bounding the marginal likelihood. To ensure efficient calculation, q(u, f) is chosen to factorise as q(u)p(f|u). This removes terms with K−1 ff: log p(y) ≥ Z q(u, f) log p(y|f) p(f|u)p(u) p(f|u)q(u) du df (4) The optimal q(u) can be found by variational calculus resulting in the lower bound in Eq. (5). 2.3 Common notation The objective functions for both VFE and FITC look very similar. In the following discussion we will refer to a common notation of their negative log marginal likelihood (NLML) F, which will be minimised to train the methods: F = N 2 log(2π) + 1 2 log |Qff+ G| | {z } complexity penalty + 1 2yT(Qff+ G)−1y | {z } data fit + 1 2σ2n tr(T) | {z } trace term , (5) where GFITC = diag[Kff−Qff] + σ2 nI GVFE = σ2 nI (6) TFITC = 0 TVFE = Kff−Qff. (7) The common objective function has three terms, of which the data fit and complexity penalty have direct analogues to the full GP. The data fit term penalises the data lying outside the covariance ellipse Qff+ G. The complexity penalty is the integral of the data fit term over all possible observations y. It characterises the volume of possible datasets that are compatible with the data fit term. This can be seen as the mechanism of Occam’s razor [16], by penalising the methods for being able to predict too many datasets. The trace term in VFE ensures that the objective function is a true lower bound to the marginal likelihood of the full GP. Without this term, VFE is identical to the earlier DTC approximation [6] which can grossly over-estimate the marginal likelihood. The trace term penalises the sum of the conditional variances at the training inputs, conditioned on the inducing inputs [17]. Intuitively, it ensures that VFE not only models this specific dataset y well, but also approximates the covariance structure of the full GP Kff. 3 Comparative behaviour As our main test case we use the one dimensional dataset2 considered in [7, 9] with 200 input-output pairs. Of course, sparse methods are not necessary for this toy problem, but all of the issues we raise are illustrated nicely in this one dimensional task which can easily be plotted. In Sections 3.1 to 3.3 we illustrate issues relating to the objecctive functions. These properties are independent of how the method is optimised. However, whether they are encountered in practice can depend on optimiser dynamics, which we discuss in Sections 3.4 and 3.5. 3.1 FITC can severely underestimate the noise variance, VFE overestimates it In the full GP with Gaussian likelihood we assume a homoscedastic (input independent) noise model with noise variance parameter σ2 n. It fully characterises the uncertainty left after completely learning the latent function. In this section we show how FITC can also use the diagonal term diag(Kff−Qff) in GFITC as heteroscedastic (input dependent) noise [7] to account for these differences, thus, invalidating the above interpretation of the noise variance parameter. In fact, the FITC objective function encourages underestimation of the noise variance, whereas the VFE bound encourages overestimation. The latter is in line with previously reported biases of variational methods [18]. Fig. 1 shows the configuration most preferred by the FITC objective for a subset of 100 data points of the Snelson dataset, found by an exhaustive manual search for a minimum over hyperparameters, 1Matthews et al. [15] show that this procedure approximates the posterior over the entire process f correctly. 2Obtained from http://www.gatsby.ucl.ac.uk/~snelson/ 3 inducing inputs and number of inducing points. The noise variance is shrunk to practically zero, despite the mean prediction not going through every data point. Note how the mean still behaves well and how the training data lie well within the predictive variance. Only when considering predictive probabilities will this behaviour cause diminished performance. VFE, on the other hand, is able to approximate the posterior predictive distribution almost exactly. FITC (nlml = 23.16, σn = 1.93 · 10−4) VFE (nlml = 38.86, σn = 0.286) Figure 1: Behaviour of FITC and VFE on a subset of 100 data points of the Snelson dataset for 8 inducing inputs (red crosses indicate inducing inputs; red lines indicate mean and 2σ) compared to the prediction of the full GP in grey. Optimised values for the full GP: nlml = 34.15, σn = 0.274 For both approximations, the complexity penalty decreases with decreased noise variance, by reducing the volume of datasets that can be explained. For a full GP and VFE this is accompanied by a data fit penalty for data points lying far away from the predictive mean. FITC, on the other hand, has an additional mechanism to avoid this penalty: its diagonal correction term diag(Kff−Qff). This term can be seen as an input dependent or heteroscedastic noise term (discussed as a modelling advantage by Snelson and Ghahramani [7]), which is zero exactly at an inducing input, and which grows to the prior variance away from an inducing input. By placing the inducing inputs near training data that happen to lie near the mean, the heteroscedastic noise term is locally shrunk, resulting in a reduced complexity penalty. Data points both far from the mean and far from inducing inputs do not incur a data fit penalty, as the heteroscedastic noise term has increased around these points. This mechanism removes the need for the homoscedastic noise to explain deviations from the mean, such that σ2 n can be turned down to reduce the complexity penalty further. This explains the extreme pinching (severely reduced noise variance) observed in Fig. 1, also see, e.g., [9, Fig. 2]. In examples with more densely packed data, there may not be any places where a near-zero noise point can be placed without incurring a huge data-fit penalty. However, inducing inputs will be placed in places where the data happens to randomly cluster around the mean, which still results in a decreased noise estimate, albeit less extreme, see Figs. 2 and 3 where we use all 200 data points. Remark 1 FITC has an alternative mechanism to explain deviations from the learned function than the likelihood noise and will underestimate σ2 n as a consequence. In extreme cases, σ2 n can incorrectly be estimated to be almost zero. As a consequence of this additional mechanism, σ2 n can no longer be interpreted in the same way as for VFE or the full GP. σ2 n is often interpreted as the amount of uncertainty in the dataset which can not be explained. Based on this interpretation, a low σ2 n is often used as an indication that the dataset is being fitted well. Active learning applications rely on a similar interpretation to differentiate between inherent noise, and uncertainty in the latent GP which can be reduced. FITC’s different interpretation of σ2 n will cause efforts like these to fail. VFE, on the other hand, is biased towards over-estimating the noise variance, because of both the data fit and the trace term. Qff+ σ2 nI has N −M eigenvectors with an eigenvalue of σ2 n, since the rank of Qffis M. Any component of y in these directions will result in a larger data fit penalty than for Kff, which can only be reduced by increasing σ2 n. The trace term can also be reduced by increasing σ2 n. Remark 2 The VFE objective tends to over-estimate the noise variance compared to the full GP. 3.2 VFE improves with additional inducing inputs, FITC may ignore them Here we investigate the behaviour of each method when more inducing inputs are added. For both methods, adding an extra inducing input gives it an extra basis function to model the data with. We discuss how and why VFE always improves, while FITC may deteriorate. 4 FITC VFE −10 0 10 ∆F −10 −5 0 Figure 2: Top: Fits for FITC and VFE on 200 data points of the Snelson dataset for M = 7 optimised inducing inputs (black). Bottom: Change in objective function from adding an inducing input anywhere along the x-axis (no further hyperparameter optimisation performed). The overall change is decomposed into the change in the individual terms (see legend). Two particular additional inducing inputs and their effect on the predictive distribution shown in red and blue. Fig. 2 shows an example of how the objective function changes when an inducing input is added anywhere in the input domain. While the change in objective function looks reasonably smooth overall, there are pronounced spikes for both, FITC and VFE. These return the objective to the value without the additional inducing input and occur at the locations of existing inducing inputs. We discuss the general change first before explaining the spikes. Mathematically, adding an inducing input corresponds to a rank 1 update of Qff, and can be shown to always improve VFE’s bound3, see Supplement for a proof. VFE’s complexity penalty increases due to an extra non-zero eigenvalue in Qff, but gains in data fit and trace. Remark 3 VFE’s posterior and marginal likelihood approximation become more accurate (or remain unchanged) regardless of where a new inducing input is placed. For FITC, the objective can change either way. Regardless of the change in objective, the heteroscedastic noise is decreased at all points (see Supplement for proof). For a squared exponential kernel, the decrease is strongest around the newly placed inducing input. This decrease has two effects. One, it reduces the complexity penalty since the diagonal component of Qff+ G is reduced and replaced by a more strongly correlated Qff. Two, it worsens the data fit term as the heteroscedastic term is required to fit the data when the homoscedastic noise is underestimated. Fig. 2 shows reduced error bars with several data points now outside of the 95% prediction bars. Also shown is a case where an additional inducing input improves the objective, where the extra correlations outweigh the reduced heteroscedastic noise. Both VFE and FITC exhibit pathological behaviour (spikes) when inducing inputs are clumped, that is, when they are placed exactly on top of each other. In this case, the objective function has the same value as when all duplicate inducing inputs were removed, see Supplement for a proof. In other words, for all practical purposes, a model with duplicate inducing inputs reduces to a model with fewer, individually placed inducing inputs. Theoretically, these pathologies only occur at single points, such that no gradients towards or away from them could exist and they would never be encountered. In practise, however, these peaks are widend by a finite jitter that is added to Kuu to ensure it remains well conditioned enough to be invertible. This finite width provides the gradients that allow an optimiser to detect these configurations. As VFE always improves with additional inducing inputs, these configurations must correspond to maxima of the optimisation surface and clumping of inducing inputs does not occur for VFE. For 3Matthews [19] independently proved this result by considering the KL divergence between processes. Titsias [9] proved this result for the special case when the new inducing input is selected from the training data. 5 FITC, configurations with clumped inducing inputs can and often do correspond to minima of the optimisation surface. By placing them on top of each other, FITC can avoid the penalty of adding an extra inducing input and can gain the bonus from the heteroscedastic noise. Clumping, thus, constitutes a mechanism that allows FITC to effectively remove inducing inputs at no cost. We illustrate this behaviour in Fig. 3 for 15 randomly initialised inducing inputs. FITC places some of them exactly on top of each other, whereas VFE spreads them out and recovers the full GP well. FITC VFE Figure 3: Fits for 15 inducing inputs for FITC and VFE (initial as black crosses, optimised red crosses). Even following joint optimisation of inducing inputs and hyperparameters, FITC avoids the penalty of added inducing inputs by clumping some of them on top of each other (shown as a single red cross). VFE spreads out the inducing inputs to get closer to the true full GP posterior. Remark 4 In FITC, having a good approximation Qffto Kffneeds to be traded off with the gains coming from the heteroscedastic noise. FITC does not always favour a more accurate approximation to the GP. Remark 5 FITC avoids losing the gains of the heteroscedastic noise by placing inducing inputs on top of each other, effectively removing them. 3.3 FITC does not recover the full GP posterior, VFE does In the previous section we showed that FITC may not utilise additional resources to model the data. The clumping behaviour, thus, explains why the FITC objective may not recover the full GP, even when given enough resources. Both VFE and FITC can recover the true posterior by placing an inducing input on every training input [9, 12]. For VFE, this is a global minimum, since the KL gap to the true marginal likelihood is zero. For FITC, however, this configuration is not stable and the objective can still be improved by clumping of inducing inputs, as Matthews [19] has shown empirically by aggressive optimisation. The derivative of the inducing inputs is zero for the initial configuration, but adding jitter subtly makes this behaviour more obvious by perturbing the gradients, similar to the widening of the peaks in Fig. 2. In Fig. 4 we reproduce the observations in [19, Sec 4.6.1 and Fig. 4.2] on a subset of 100 data points of the Snelson dataset: VFE remains at the minimum and, thus, recovers the full GP, whereas FITC improves its objective and clumps the inducing inputs considerably. Method nlml initial nlml optimised Full GP − 33.8923 VFE 33.8923 33.8923 FITC 33.8923 28.3869 0 2 4 6 0 2 4 6 8 initial optimised VFE FITC Figure 4: Results of optimising VFE and FITC after initialising at the solution that gives the correct posterior and marginal likelihood as in [19, Sec 4.6.1]: FITC moves to a significantly different solution with better objective value (Table, left) and clumped inducing inputs (Figure, right). Remark 6 FITC generally does not recover the full GP, even when it has enough resources. 3.4 FITC relies on local optima So far, we have observed some cases where FITC fails to produce results in line with the full GP, and characterised why. However, in practice, FITC has performed well, and pathological behaviour is not always observed. In this section we discuss the optimiser dynamics and show that they help FITC behave reasonably. 6 To demonstrate this behaviour, we consider a 4d toy dataset: 1024 training and 1024 test samples drawn from a 4d Gaussian Process with isotropic squared exponential covariance function (l = 1.5, sf = 1) and true noise variance σ2 n = 0.01. The data inputs were drawn from a Gaussian centred around the origin, but similar results were obtained for uniformly sampled inputs. We fit both FITC and VFE to this dataset with the number of inducing inputs ranging from 16 to 1024, and compare a representative run to the full GP in Fig. 5. 24 27 210 −5 0 5 ·102 # inducing inputs NLML 24 27 210 10−3 10−1 # inducing inputs Optimised σn 24 27 210 −0.8 −0.6 −0.4 −0.2 0 # inducing inputs Neg. log pred. prob. 24 27 210 2 4 6 8 ·10−2 # inducing inputs SMSE GP FITC VFE Figure 5: Optimisation behaviour of VFE and FITC for varying number of inducing inputs compared to the full GP. We show the objective function (negative log marginal likelihood), the optimised noise σn, the negative log predictive probability and standardised mean squared error as defined in [1]. VFE monotonically approaches the values of the full GP but initially overestimates the noise variance, as discussed in Section 3.1. Conversely, we can identify three regimes for the objective function of FITC: 1) Monotonic improvement for few inducing inputs, 2) a region where FITC over-estimates the marginal likelihood, and 3) recovery towards the full GP for many inducing inputs. Predictive performance follows a similar trend, first improving, then declining while the bound is estimated to be too high, followed by a recovery. The recovery is counter to the usual intuition that over-fitting worsens when adding more parameters. We explain the behaviour in these three regimes as follows: When the number of inducing inputs are severely limited (regime 1), FITC needs to place them such that Kffis well approximated. This correlates most points to some degree, and ensures a reasonable data fit term. The marginal likelihood is under-estimated due to lack of a flexibility in Qff. This behaviour is consistent with the intuition that limiting model capacity prevents overfitting. As the number of inducing inputs increases (regime 2), the marginal likelihood is over-estimated and the noise drastically under-estimated. Additionally, performance in terms of log predictive probability deteriorates. This is the regime closest to FITC’s behaviour in Fig. 1. There are enough inducing inputs such that they can be placed such that a bonus can be gained from the heteroscedastic noise, without gaining a complexity penalty from losing long scale correlations. Finally, in regime 3, FITC starts to behave more like a regular GP in terms of marginal likelihood, predictive performance and noise variance parameter σn. FITC’s ability to use heteroscedastic noise is reduced as the approximate covariance matrix Qffis closer to the true covariance matrix Kffwhen many (initial) inducing input are spread over the input space. In the previous section we showed that after adding a new inducing input, a better minimum obtained without the extra inducing input could be recovered by clumping. So it is clear that the minimum that was found with fewer active inducing inputs still exists in the optimisation surface of many inducing inputs; the optimiser just does not find it. Remark 7 When running FITC with many inducing inputs its resemblance to the full GP solution relies on local optima, rather than the objective function changing. 3.5 VFE is hindered by local optima So far we have seen that the VFE objective function is a true lower bound on the marginal likelihood and does not share the same pathologies as FITC. Thus, when optimising, we really are interested in finding a global optimum. The VFE objective function is not completely trivial to optimise, and often tricks, such as initialising the inducing inputs with k-means and initially fixing the hyperparameters 7 [20, 21], are required to find a good optimum. Others have commented that VFE has the tendency to underfit [3]. Here we investigate the underfitting claim and relate it to optimisation behaviour. As this behaviour is not observable in our 1D dataset, we illustrate it on the pumadyn32nm dataset4 (32 dimensions, 7168 training, 1024 test), see Table 1 for the results of a representative run with random initial conditions and M = 40 inducing inputs. Method NLML/N σn inv. lengthscales RMSE GP (SoD) −0.099 0.196 · · · 0.209 FITC −0.145 0.004 · · · 0.212 VFE 1.419 1 · · · 0.979 VFE (frozen) 0.151 0.278 · · · 0.276 VFE (init FITC) −0.096 0.213 · · · 0.212 Table 1: Results for pumadyn32nm dataset. We show negative log marginal likelihood (NLML) divided by number of training points, the optimised noise variance σ2 n, the ten most dominant inverse lengthscales and the RMSE on test data. Methods are full GP on 2048 training samples, FITC, VFE, VFE with initially frozen hyperparameters, VFE initialised with the solution obtained by FITC. Using a squared exponential ARD kernel with separate lengthscales for every dimension, a full GP on a subset of data identified four lengthscales as important to model the data while scaling the other 28 lengthscales to large values (in Table 1 we plot the inverse lengthscales). FITC was consistently able to identify the same four lengthscales and performed similarly compared to the full GP but scaled down the noise variance σ2 n to almost zero. The latter is consistent with our earlier observations of strong pinching in a regime with low-density data as is the case here due to the high dimensionality. VFE, on the other hand, was unable to identify these relevant lengthscales when jointly optimising the hyperparameters and inducing inputs, and only identified some of the them when initially freezing the hyperparameters. One might say that VFE “underfits” in this case. However, we can show that VFE still recognises a good solution: When we initialised VFE with the FITC solution it consistently obtained a good fit to the model with correctly identified lengthscales and a noise variance that was close to the full GP. Remark 8 VFE has a tendency to find under-fitting solutions. However, this is an optimisation issue. The bound correctly identifies good solutions. 4 Conclusion In this work, we have thoroughly investigated and characterised the differences between FITC and VFE, both in terms of their objective function and their behaviour observed during practical optimisation. We highlight several instances of undesirable behaviour in the FITC objective: overestimation of the marginal likelihood, sometimes severe under-estimation of the noise variance parameter, wasting of modelling resources and not recovering the true posterior. The common practice of using the noise variance parameter as a diagnostic for good model fitting is unreliable. In contrast, VFE is a true bound to the marginal likelihood of the full GP and behaves predictably: It correctly identifies good solutions, always improves with extra resources and recovers the true posterior when possible. In practice however, the pathologies of the FITC objective do not always show up, thanks to “good” local optima and (unintentional) early stopping. While VFE’s objective recognises a good configuration, it is often more susceptible to local optima and harder to optimise than FITC. Which of these pathologies show up in practise depends on the dataset in question. However, based on the superior properties of the VFE objective function, we recommend using VFE, while paying attention to optimisation difficulties. These can be mitigated by careful initialisation, random restarts, other optimisation tricks and comparison to the FITC solution to guide VFE optimisation. Acknowledgements We would like to thank Alexander Matthews, Thang Bui, and Richard Turner for useful discussions. 4obtained from http://www.cs.toronto.edu/~delve/data/datasets.html 8 References [1] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning series). The MIT Press, 2005. [2] M. L´azaro-Gredilla, J. Qui˜nonero-Candela, C. E. Rasmussen and A. R. Figueiras-Vidal. ‘Sparse spectrum Gaussian process regression’. In: The Journal of Machine Learning Research 11 (2010). [3] M. L´azaro-Aredilla and A. Figueiras-Vidal. ‘Inter-domain Gaussian processes for sparse inference using inducing features’. In: Advances in Neural Information Processing Systems. 2009. [4] A. Rahimi and B. Recht. ‘Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning’. In: Advances in Neural Information Processing Systems. 2009. [5] Z. Yang, A. J. Smola, L. Song and A. G. Wilson. ‘A la Carte - Learning Fast Kernels’. In: Artificial Intelligence and Statistics. 2015. eprint: 1412.6493. [6] M. Seeger, C. K. I. Williams and N. D. Lawrence. ‘Fast Forward Selection to Speed Up Sparse Gaussian Process Regression’. In: Proceedings of the Ninth International Workshop on Artificial Intelligence and Statistics. 2003. [7] E. Snelson and Z. Ghahramani. ‘Sparse Gaussian Processes using Pseudo-inputs’. In: Neural Information Processing Systems. Vol. 18. 2006. [8] J. Qui˜nonero-Candela and C. E. Rasmussen. ‘A unifying view of sparse approximate Gaussian process regression’. In: The Journal of Machine Learning Research 6 (2005). [9] M. K. Titsias. ‘Variational learning of inducing variables in sparse Gaussian processes’. In: Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics. 2009. [10] A. J. Smola and P. Bartlett. ‘Sparse greedy Gaussian process regression’. In: Advances in Neural Information Processing Systems 13. 2001. [11] L. Csat´o and M. Opper. ‘Sparse on-line Gaussian processes’. In: Neural computation 14.3 (2002). [12] E. Snelson. ‘Flexible and efficient Gaussian process models for machine learning’. PhD thesis. University College London, 2007. [13] Y. Qi, A. H. Abdel-Gawad and T. P. Minka. ‘Sparse-posterior Gaussian Processes for general likelihoods’. In: Proceedings of the Twenty-Sixth Conference on Uncertainty in Artificial Intelligence. 2010. [14] T. D. Bui, J. Yan and R. E. Turner. ‘A Unifying Framework for Sparse Gaussian Process Approximation using Power Expectation Propagation’. In: (2016). eprint: 1605.07066. [15] A. Matthews, J. Hensman, R. E. Turner and Z. Ghahramani. ‘On Sparse variational methods and the Kullback-Leibler divergence between stochastic processes’. In: Proceedings of the Nineteenth International Conference on Artificial Intelligence and Statistics. 2016. eprint: 1504.07027. [16] C. E. Rasmussen and Z. Ghahramani. ‘Occam’s Razor’. In: Advances in Neural Information Processing Systems 13. 2001. [17] M. K. Titsias. Variational Model Selection for Sparse Gaussian Process Regression. Tech. rep. University of Manchester, 2009. [18] R. E. Turner and M. Sahani. ‘Two problems with variational expectation maximisation for time-series models’. In: Bayesian Time series models. Cambridge University Press, 2011. Chap. 5. [19] A. Matthews. ‘Scalable Gaussian process inference using variational methods’. PhD thesis. University of Cambridge, 2016. [20] J. Hensman, A. Matthews and Z. Ghahramani. ‘Scalable Variational Gaussian Process Classification’. In: Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics. 2015. eprint: 1411.2005. [21] J. Hensman, N. Fusi and N. D. Lawrence. ‘Gaussian Processes for Big Data’. In: Conference on Uncertainty in Artificial Intelligence. 2013. eprint: 1309.6835. 9 | 2016 | 256 |
6,168 | Wasserstein Training of Restricted Boltzmann Machines Grégoire Montavon Technische Universität Berlin gregoire.montavon@tu-berlin.de Klaus-Robert Müller∗ Technische Universität Berlin klaus-robert.mueller@tu-berlin.de Marco Cuturi CREST, ENSAE, Université Paris-Saclay marco.cuturi@ensae.fr Abstract Boltzmann machines are able to learn highly complex, multimodal, structured and multiscale real-world data distributions. Parameters of the model are usually learned by minimizing the Kullback-Leibler (KL) divergence from training samples to the learned model. We propose in this work a novel approach for Boltzmann machine training which assumes that a meaningful metric between observations is known. This metric between observations can then be used to define the Wasserstein distance between the distribution induced by the Boltzmann machine on the one hand, and that given by the training sample on the other hand. We derive a gradient of that distance with respect to the model parameters. Minimization of this new objective leads to generative models with different statistical properties. We demonstrate their practical potential on data completion and denoising, for which the metric between observations plays a crucial role. 1 Introduction Boltzmann machines [1] are powerful generative models that can be used to approximate a large class of real-world data distributions, such as handwritten characters [9], speech segments [7], or multimodal data [16]. Boltzmann machines share similarities with neural networks in their capability to extract features at multiple scales, and to build well-generalizing hierarchical data representations [15, 13]. The restricted Boltzmann machine (RBM) is a special type of Boltzmann machine composed of one layer of latent variables, and defining a probability distribution pθ(x) over a set of d binary observed variables whose state is represented by the binary vector x ∈{0, 1}d, and with a parameter vector θ to be learned. Given an empirical probability distribution ˆp(x) = 1 N PN n=1 δxn where (xn)n is a list of N observations in {0, 1}d, an RBM can be trained using information-theoretic divergences (see for example [12]) by minimizing with respect to θ a divergence ∆(ˆp, pθ) between the sample empirical measure ˆp and the modeled distribution pθ. When ∆is for instance the KL divergence, this approach results in the well-known Maximum Likelihood Estimator (MLE), which yields gradients for the θ of the form ∇θKL(ˆp ∥pθ) = −1 N N X n=1 ∇θ log pθ(xn) = − ∇θ log pθ(x) ˆp, (1) where the bracket notation ⟨·⟩p indicates an expectation with respect to p. Alternative choices for ∆ are the Bhattacharrya/Hellinger and Euclidean distances between distributions, or more generally ∗Also with the Department of Brain and Cognitive Engineering, Korea University. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. F-divergences or M-estimators [10]. They all result in comparable gradient terms, that try to adjust θ so that the fitting terms pθ(xn) grow as large as possible. We explore in this work a different scenario: what if θ is chosen so that pθ(x) is large, on average, when x is close to a data point xn in some sense, but not necessarily when x coincides exactly with xn? To adopt such a geometric criterion, we must first define what closeness between observations means. In almost all applications of Boltzmann machines, such a metric between observations is readily available: One can for example consider the Hamming distance between binary vectors, or any other metric motivated by practical considerations2. This being done, the geometric criterion we have drawn can be materialized by considering for ∆the Wasserstein distance [20] (a.k.a. the Kantorovich or the earth mover’s distance [14]) between measures. This choice was considered in theory by [2], who proved its statistical consistency, but was never considered practically to the best of our knowledge. This paper describes a practical derivation for a minimum Kantorovich distance estimator [2] for Boltzmann machines, which can scale up to tens of thousands of observations. As will be described in this paper, recent advances in the fast approximation of Wasserstein distances [5] and their derivatives [6] play an important role in the practical implementation of these computations. Before describing this approach in detail, we would like to insist that measuring goodness-of-fit with the Wasserstein distance results in a considerably different perspective than that provided by a Kullback-Leibler/MLE approach. This difference is illustrated in Figure 1, where a probability pθ can be close from a KL perspective to a given empirical measure ˆp, but far from the same measure p in the Wasserstein sense. Conversely, a different probability pθ′ can miss the mark from a KL viewpoint but achieve a low Wasserstein distance to ˆp. Before proceeding to the rest of this paper, let us mention that Wasserstein distances have a broad appeal for machine learning. That distance was for instance introduced in the context of supervised inference by [8], who used it to compute a predictive loss between the output of a multilabel classifier against its ground truth, or for domain adaptation, by [4]. high low high low small overlap small distance large distance large overlap Data distribution Model 1 Model 2 Figure 1: Empirical distribution ˆp(x) (gray) defined on the set of states {0, 1}d with d = 3 superposed to two possible models of it defined on the same set of states. The size of the circles indicates the probability mass for each state. For each model, we show its KL and Wasserstein divergences from ˆp(x), and an explanation of why the divergences are low or high: a large/small overlap with ˆp(x), or a large/small distance from ˆp(x). 2 Minimum Wasserstein Distance Estimation Consider two probabilities p, q in P(X), the set of probabilities on X = {0, 1}d. Namely, two maps p, q in RX + such that P x p(x) = P x q(x) = 1, where we omit x ∈X under the summation sign. Consider a cost function defined on X × X, typically a distance D : X × X →R+. Given a constant γ ≥0, the γ-smoothed Wasserstein distance [5] is equal to Wγ(p, q) = min π∈Π(p,q)⟨D(x, x′)⟩π −γH(π), (2) where Π(p, q) is the set of joint probabilities π on X × X such that P x′ π(x, x′) = p(x), P x π(x, x′) = q(x′) and H(π) = −P xx′ π(x, x′) log π(x, x′) is the Shannon entropy of π. This optimization problem, a strictly convex program, has an equivalent dual formulation [6] which involves instead two real-valued functions α, β in RX and which plays an important role in this paper: Wγ(p, q) = max α,β∈RX⟨α(x)⟩p + ⟨β(x′)⟩q −γ X xx′ e 1 γ (α(x)+β(x′)−D(x,x′))−1. (3) 2When using the MLE principle, metric considerations play a key role to define densities pθ, e.g. the reliance of Gaussian densities on Euclidean distances. This is the kind of metric we take for granted in this work. 2 Smooth Wasserstein Distances The “true” Wasserstein distance corresponds to the case where γ = 0, that is when Equation (2) is stripped of the entropic term. One can easily verify that that definition matches the usual linear program used to describe Wasserstein/EMD distances [14]. When γ →0 in Equation (3), one also recovers the Kantorovich dual formulation, because the rightmost regularizer converges to the indicator function of the feasible set of the dual optimal transport problem, α(x) + β(x′) ≤D(x, x′). We consider in this paper the case γ > 0 because it was shown in [5] to considerably facilitate computations, and in [6] to result in a divergence Wγ(p, q) which, unlike the case γ = 0, is differentiable w.r.t to the first variable. Looking at the dual formulation in Equation (3), one can see that this gradient is equal to α⋆, the centered optimal dual variable (the centering step for α⋆ensures the orthogonality with respect to the simplex constraint). Sensitivity analysis gives a clear interpretation to the quantity α⋆(x): It measures the cost for each unit of mass placed by p at x when computing the Wasserstein distance Wγ(p, q). To decrease Wγ(p, q), it might thus be favorable to transfer mass in p from points where α(x) is high to place it on points where α(x) is low. This idea can be used, by a simple application of the chain rule, to minimize, given a fixed target probability p, the quantity Wγ(pθ, p) with respect to θ. Proposition 1. Let pθ(x) = 1 Z e−Fθ(x) be a parameterized family of probability distributions where Fθ(x) is a differentiable function of θ ∈Θ and we write Gθ = ⟨∇θFθ(x)⟩pθ. Let α⋆be the centered optimal dual solution of Wγ(pθ, p) as described in Equation (3). The gradient of the smoothed Wasserstein distance with respect to θ is given by ∇θWγ(pθ, p) = α⋆(x) pθGθ − α⋆(x)∇θFθ(x)) pθ. (4) Proof. This result is a direct application of the chain rule: We have ∇θWγ(pθ, p) = ∂pθ ∂θ T ∂Wγ(pθ, q) ∂pθ . As mentioned in [6], the rightmost term is the optimal dual variable (the Kantorovich potential) ∂Wγ(pθ, q)/∂pθ = α⋆. The Jacobian (∂pθ/∂θ) is a linear map Θ →X. For a given x′, ∂pθ(x′)/∂θ = pθ(x′)Gθ −∇Fθ(x′)pθ(x′). As a consequence, ∂pθ ∂θ T α⋆is the integral w.r.t. x′ of the term above multiplied by α⋆(x′), which results in Equation (4). Comparison with the KL Fitting Error The target distribution p plays a direct role in the formation of the gradient of KL(ˆp ∥pθ) w.r.t. θ through the term ⟨∇θFθ(x)⟩p in Equation (1). The Wasserstein gradient incorporates the knowledge of p in a different way, by considering, on the support of pθ only, points x that correspond to high potentials (costs) α(x) when computing the distance of pθ to p. A high potential at x means that the probability pθ(x) should be lowered if one were to decrease Wγ(pθ, p), by varying θ accordingly. Sampling Approximation The gradient in Equation (4) is intractable, since it involves solving an optimal (smoothed) transport problem over probabilities defined on 2d states. In practice, we replace expectations w.r.t pθ by an empirical distribution formed by sampling from the model pθ (e.g. the PCD sample [18]). Given a sample (exn)n of size e N generated by the model, we define ˆpθ = P e N n=1 δexn/ e N. The tilde is used to differentiate the sample generated by the model from the empirical observations. Because the dual potential α⋆is centered and ˆpθ is a measure with uniform weights, ⟨α⋆(x)⟩ˆpθ = 0 which simplifies the approximation of the gradient to b∇θWγ(pθ, ˆp) = −1 e N e N X n=1 ˆα⋆(exn) ∇θFθ(exn) (5) where ˆα⋆is the solution of the discrete smooth Wasserstein dual between the two empirical distributions ˆp and ˆpθ, which have respectively supports of size N and e N. In practical terms, ˆα⋆is a vector of size e N, one coefficient for each PCD sample, which can be computed by following the algorithm below [6]. To keep notations simple, we describe it in terms of generic probabilities p and q, having in mind these are in practice the training and simulated empirical measures ˆp and ˆpθ. 3 Computing α⋆ When γ > 0, the optimal variable α⋆corresponding to Wγ(p, q) can be recovered through the Sinkhorn algorithm with a cost which grows as the product |p||q| of the sizes of the support of p and q, where |p| = P x 1p(x)>0. The algorithm is well known but we adapt it here to our setting, see [6, Alg.3] for a more precise description. To ease notations, we consider an arbitrary ordering of X, a set of cardinal 2d, and identify its elements with indices 1 ≤i ≤2d. Let I = (i1, · · · , i|p|) be the ordered family of indices in the set {i | p(i) > 0} and define J accordingly for q. I and J have respective lengths |p| and |q|. Form the matrix K = [e−D(i,j)/γ]i∈I,j∈J of size |p| and |q|. Choose now two positive vectors u ∈R|p| ++ and v ∈R|q| ++ at random, and repeat until u, v converge in some metric the operations u ←p/(Kv), v ←q/(KT u). Upon convergence, the optimal variable α⋆is zero everywhere except for α⋆(ia) = log(ua/˜u)/γ where 1 ≤a ≤|p| and ˜u is the geometric mean of vector u (which ensures that α⋆is centered). 3 Application to Restricted Boltzmann Machines The restricted Boltzmann machine (RBM) is a generative model of binary data that is composed of d binary observed variables and h binary explanatory variables. The vector x ∈{0, 1}d represents the state of observed variables, and the vector y ∈{0, 1}h represents the state of explanatory variables. The RBM associates to each configuration x of observed variables a probability pθ(x) defined as pθ(x) = P ye−Eθ(x,y)/Zθ, where Eθ(x, y) = −aT x −Ph j=1 yj(wT j x + bj) is called the energy and Zθ = P x,y e−Eθ(x,y) is the partition function that normalizes the probability distribution to one. The parameters θ = (a, {wj, bj}h j=1) of the RBM are learned from the data. Knowing the state x of the observed variables, the explanatory variables are independent Bernoulli-distributed with Pr(yj = 1|x) = σ(wT j x + bj), where σ is the logistic map z 7→(1 + e−z)−1. Conversely, knowing the state y of the explanatory variables, the observed variables on which the probability distribution is defined can also be sampled independently, leading to an efficient alternate Gibbs sampling procedure for pθ. In this RBM model, explanatory variables can be analytically marginalized, which yields the following probability model: pθ(x) = e−Fθ(x)/Z′ θ, where Fθ(x) = −aT x −Ph j=1 log(1 + exp(wT j x + bj)) is the free energy associated to this model and Z′ θ = P x e−Fθ(x) is the partition function. Wasserstein Gradient of the RBM Having written the RBM in its free energy form, the Wasserstein gradient can be obtained by computing the gradient of Fθ(x) and injecting it in Equation (5): b∇wjWγ(ˆp, pθ) = α⋆(x) σ(zj) x ˆpθ, where zj = wT j x + bj. Gradients with respect to parameters a and {bj}j can also be obtained by the same means. In comparison, the gradient of the KL divergence is given by b∇wjKL(ˆp ∥pθ) = σ(zj) x ˆpθ − σ(zj) x ˆp. While the Wasserstein gradient can in the same way as the KL gradient be expressed in a very simple form, the first one is not sum-decomposable. A simple manifestation of the non-decomposability occurs for e N = 1 (smallest possible sample size): In that case, α(exn) = 0 due to the centering constraint (see Section 2), thus making the gradient zero. Stability and KL Regularization Unlike the KL gradient, the Wasserstein gradient depends only indirectly on the data distribution ˆp. This is a problem when the sample ˆpθ generated by the model strongly differs from the examples coming from ˆp, because there is no weighting (α(exn))n of the generated sample that can represent the desired direction in the parameter space Θ. In that case, the Wasserstein gradient will point to a bad local minimum. Closeness between the two empirical samples from this optimization perspective can be ensured by adding a regularization term to the objective that incorporates both the usual quadratic containment term, but also the KL term, that forces proximity to ˆp due to the direct dependence of its gradient on it. The optimization problem becomes: min θ∈Θ Wγ(ˆp, pθ) + λ · Ω(θ) with Ω(θ) = KL(ˆp ∥pθ) + η · (∥a∥2 + P j∥wj∥2) 4 starting at point θ0 = arg minθ∈Θ Ω(θ), and where λ, η are two regularization hyperparameters that must be selected. Determining the starting point θ0 is analogous to having an initial pretraining phase. Thus, the proposed Wasserstein procedure can also be seen as finetuning a standard RBM, and forcing the finetuning not to deviate too much from the pretrained solution. 4 Experiments We perform several experiments that demonstrate that Wasserstein-trained RBMs learn distributions that are better from a metric perspective. First, we explore what are the main characteristics of a learned distribution that optimizes the Wasserstein objective. Then, we investigate the usefulness of these learned models on practical problems, such as data completion and denoising, where the metric between observations occurs in the performance evaluation. We consider three datasets: MNIST-small, a subsampled version of the original MNIST dataset [11] with only the digits “0” retained, a subset of the UCI PLANTS dataset [19] containing the geographical spread of plants species, and MNIST-code, 128-dimensional code vectors associated to each MNIST digit (additional details in the supplement). 4.1 Training, Validation and Evaluation All RBM models that we investigate are trained in full batch mode, using for ˆpθ the PCD approximation [18] of pθ, where the sample is refreshed at each gradient update by one step of alternate Gibbs sampling, starting from the sample at the previous time step. We choose a PCD sample of same size as the training set (N = e N). The coefficients α1, . . . , α e N occurring in the Wasserstein gradient are obtained by solving the smoothed Wasserstein dual between ˆp and ˆpθ, with smoothing parameter γ = 0.1 and distance D(x, x′) = H(x, x′)/⟨H(x, x′)⟩ˆp, where H denotes the Hamming distance between two binary vectors. We use the centered parameterization of the RBM for gradient descent [13, 3]. We perform holdout validation on the quadratic containment coefficient η ∈{10−4, 10−3, 10−2}, and on the KL weighting coefficient λ ∈{0, 10−1, 100, 101, ∞}. The number of hidden units of the RBM is set heuristically to 400 for all datasets. The learning rate is set heuristically to 0.01(λ−1) during the pretraining phase and modified to 0.01 min(1, λ−1) when training on the final objective. The Wasserstein distance Wγ(ˆpθ, ˆp) is computed between the whole test distribution and the PCD sample at the end of the training procedure. This sample is a fast approximation of the true unbiased sample, that would otherwise have to be generated by annealing or enumeration of the states (see the supplement for a comparison of PCD and AIS samples). 4.2 Results and Analysis The contour plots of Figure 2 show the effect of hyperparameters λ and η on the Wasserstein distance. For λ = ∞, only the KL regularizer is active, which is equivalent to minimizing a standard RBM. As we reduce the amount of regularization, the Wasserstein distance becomes effectively minimized and thus smaller. If λ is chosen too small, the Wasserstein distance increases again, for the stability reasons mentioned in Section 3. In all our experiments, we observed that KL pretraining was necessary in order to reach low Wasserstein distance. Not doing so leads to degenerate solutions. The relation between hyperparameters and minimization criteria is consistent across datasets: In all cases, the Wasserstein RBM produces lower Wasserstein distance than a standard RBM. MNIST-small PLANTS MNIST-code 0 0.1 1.0 10.0 inf Parameter λ 1e-4 1e-3 1e-2 Parameter η RBM RBM-W 0 0.1 1.0 10.0 inf Parameter λ 1e-4 1e-3 1e-2 Parameter η RBM RBM-W 0 0.1 1.0 10.0 inf Parameter λ 1e-4 1e-3 1e-2 Parameter η RBM RBM-W low high Figure 2: Wasserstein distance as a function of hyperparameters λ and η. The best RBMs in the Wasserstein sense (RBM-W) are shown in red. The best RBMs in the standard sense (i.e. with λ forced to +inf, and minimum KL) are shown in blue. Samples generated by the standard RBM and the Wasserstein RBM (more precisely their PCD approximation) are shown in Figure 3. The RBM-W produces a reduced set of clean prototypical examples, with less noise than those produced by a regular RBM. All zeros generated by RBM-W 5 have well-defined contours and a round shape but do not reproduce the variety of shapes present in the data. Similarly, the plants territorial spreads generated by the RBM-W form compact and contiguous regions that are prototypical of real spreads, but are less diverse than the data or the sample generated by the standard RBM. Finally, the RBM-W generates codes that, when decoded, are closer to actual MNIST digits. MNIST-small PLANTS MNIST-code RBM RBM-W 100 128 binary units 28x28 pixels 128 binary units 28x28 pixels 400 binary units 400 binary units RBM MNIST-code digits generation 200 100 200 RBMFigure 3: Examples generated by the standard and the Wasserstein RBMs. (Images for PLANTS dataset are automatically generated from the Wikimedia Commons template https://commons. wikimedia.org/wiki/File:BlankMap-USA-states-Canada-provinces.svg created by user Lokal_Profil.) Images for MNIST-code are produced by the decoders shown on the right. The PCA plots of Figure 4 superimpose to the true data distribution (in gray) the distributions generated by the standard RBM (in blue) and the Wasserstein RBM (in red). In particular, the plots show the projected distributions on the first two PCA components of the true distribution. While the standard RBM distribution uniformly covers the data, the one generated by the RBM-W consists of a finite set of small dense clusters that are scattered across the input distribution. In other words, the Wasserstein model is biased towards these clusters, and systematically ignores other regions. MNIST-small PLANTS MNIST-code data RBM data RBM-W data RBM data RBM-W data RBM data RBM-W γ small ← →γ large γ small ← →γ large γ small ← →γ large Figure 4: Top: Two-dimensional PCA comparison of distributions learned by the RBM and the RBMW with smoothing parameter γ = 0.1. Plots are obtained by projecting the learned distributions on the first two components of the true distribution. Bottom: RBM-W distributions obtained by varying the parameter γ. At the bottom of Figure 4, we analyze the effect of the Wasserstein smoothing parameter γ on the learned distribution, with γ = 0.025, 0.05, 0.1, 0.2, 0.4. We observe on all datasets that the stronger the smoothing, the stronger the shrinkage effect. Although the KL-generated distributions shown in blue may look better (the red distribution strongly departs visually from the data distribution), the red distribution is actually superior if considering the smooth Wasserstein distance as a performance metric, as shown in Figure 2. 4.3 Validating the Shrinkage Effect To verify that the shrinkage effect observed in Figure 4 is not a training artefact, but a truly expected property of the modeled distribution, we analyze this effect for a simple distribution for which the parameter space can be enumerated. Figure 5 plots the Wasserstein distance between samples of size 100 of a 10-dimensional Gaussian distribution p ∼N(0, I), and a parameterized model of that distribution pθ ∼N(0, θ2I), where θ ∈[0, 1]. The parameter θ can be interpreted as a shrinkage 6 parameter. The Wasserstein distance is computed using the cityblock or euclidean metric, both rescaled such that the expected distance between pairs of points is 1. 0.0 0.2 0.4 0.6 0.8 1.0 model parameter θ 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Wγ(ˆpθ, ˆp) (metric = cityblock) γ = 1.00 γ = 0.32 γ = 0.10 γ = 0.03 γ = 0.01 γ = 0.00 0.0 0.2 0.4 0.6 0.8 1.0 model parameter θ 0.5 0.6 0.7 0.8 0.9 1.0 Wγ(ˆpθ, ˆp) (metric = euclidean) γ = 1.00 γ = 0.32 γ = 0.10 γ = 0.03 γ = 0.01 γ = 0.00 Figure 5: Wasserstein distance between a sample ˆp ∼N(0, I), and a sample ˆpθ ∼N(0, θ2I) for various model parameters θ ∈[0, 1] and smoothing γ, using the cityblock or the euclidean metric. Interestingly, for all choices of Wasserstein smoothing parameters γ, and even for the true Wasserstein distance (γ = 0, computed here using the OpenCV library), the best model pθ in the empirical Wasserstein sense is a shrinked version of p (i.e. with θ < 1). When the smoothing is strong enough, the best parameter becomes θ = 0 (i.e. Dirac distribution located at the origin). Overall, this experiment gives a training-independent validation for our observation that Wasserstein RBMs learn shrinked cluster-like distributions. Note that the finite sample size prevents the Wasserstein distance to reach zero, and always favors shrinked models. 4.4 Data Completion and Denoising In order to demonstrate the practical relevance of Wasserstein distance minimization, we apply the learned models to the task of data completion and data denoising, for which the use of a metric is crucial: Data completion and data denoising performance is generally measured in terms of distance between the true data and the completed or denoised data (e.g. Euclidean distance for real-valued data, or Hamming distance H for binary data). Remotely located probability mass that may result from simple KL minimization would incur a severe penalty on the completion and denoising performance metric. Both tasks have useful practical applications: Data completion can be used as a first step when applying discriminative learning (e.g. neural networks or SVM) to data with missing features. Data denoising can be used as a dimensionality reduction step before training a supervised model. Let the input x = [v, h] be composed of d −k visible variables v and k hidden variables h. Data Completion The setting of the data completion experiment is illustrated in Figure 6 (top). The distribution pθ(x|v) over possible reconstructions can be sampled from using an alternate Gibbs sampler, or by enumeration. The expected Hamming distance between the true state x⋆and the reconstructed state modeled by the distribution pθ(x|v) is given by iterating on the 2k possible reconstructions: E = P h pθ(x | v) · H(x, x⋆) where h ∈{0, 1}k. Since the reconstruction is a probability distribution, we can compute the expected Hamming error, but also its bias-variance decomposition. On MNIST-small, we hide randomly located image patches of size 3 × 3 (i.e. k = 9). On PLANTS and MNIST-code, we hide random subsets of k = 9 variables. Results are shown in Figure 7 (left), where we compare three types of models: Kernel density estimation (KDE), standard RBM (RBM) and Wasserstein RBM (RBM-W). The KDE estimation model uses a Gaussian kernel, with the Gaussian scale parameter chosen such that the KL divergence of the model from the validation data is minimized. The RBM-W is better or comparable the other models. Of particular interest is the structure of the expected Hamming error: For the standard RBM, a large part of the error comes from the variance (or entropy), while for the Wasserstein RBM, the bias term is the most contributing. This can be related to what is observed in Figure 4: For a data point outside the area covered by the red points, the reconstruction is systematically redirected towards the nearest red cluster, thus, incurring a systematic bias. Data Denoising Here, we consider a simple noise process where for a predefined subset of k variables, denoted by h a known number l of bits flips occur randomly. Remaining d −k variables are denoted by v. The setting of the experiment is illustrated in Figure 6 (bottom). Calling x⋆the original and ex its noisy version resulting from flipping l variables of h, the expected Hamming error 7 flip two pixels original image noisy image flip two pixels again 6 possible image reconstructions 2 2 4 2 0 2 hide three pixels original image incomplete image assign pixels again 8 possible image reconstructions 1 2 2 0 2 Completion Denoising 0.4 0.1 0 0.5 0 0.4 0 0 0 0.6 0 Figure 6: Illustration of the completion and denoising setup. For each image, we select a known subset of pixels, that we hide (or corrupt with noise). Each possible reconstruction has a particular Hamming distance to the original example. The expected Hamming error is computed by weighting the Hamming distances by the probability that the model assigns to the reconstructions. ————————— Completion ————————— ————————— Denoising ————————— MNIST-small PLANTS MNIST-code MNIST-small PLANTS MNIST-code Hamming distance KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias KDE RBM RBM-W 0.0 0.5 1.0 1.5 variance bias Figure 7: Performance on the completion and denoising tasks of the kernel density estimation, the standard RBM and the Wasserstein RBM. The total length of the bars is the expected Hamming error. Dark gray and light gray sections of the bars give the bias-variance decomposition. is given by iterating over the k l states x with same visible variables v and that are at distance l of ex: E = P h pθ(x | v, H(x, ex) = l) · H(x, x⋆) where h ∈{0, 1}k. Note that the original example x⋆is necessarily part of this set of states under the noise model assumption. For the MNIST-small data, we choose randomly located images patches of size 4 × 3 or 3 × 4 (i.e. k = 12), and generate l = 4 random bit flips within the selected patch. For PLANTS and MNIST-code, we generate l = 4 bit flips in k = 12 randomly preselected input variables. Figure 7 (right) shows the denoising error in terms of expected Hamming distance on the same datasets. The RBM-W is better or comparable to other models. Like for the completion task, the main difference between the two RBMs is the bias/variance ratio, where again the Wasserstein RBM tends to have larger bias. This experiment has considered a very simple noise model consisting of a fixed number of l random bit flips over a small predefined subset of variables. Denoising highly corrupted complex data will however require to combine Wasserstein models with more flexible noise models such as the ones proposed by [17]. 5 Conclusion We have introduced a new objective for restricted Boltzmann machines (RBM) based on the smooth Wasserstein distance. We derived the gradient of the Wasserstein distance from its dual formulation, and used it to effectively train an RBM. Unlike the usual Kullback-Leibler (KL) divergence, our Wasserstein objective takes into account the metric of the data. In all considered scenarios, the Wasserstein RBM produced distributions that strongly departed from standard RBMs, and outperformed them on practical tasks such as completion or denoising. More generally, we demonstrated empirically, that when learning probability densities, the reliance on distributions that incorporate indirectly the desired metric can be substituted for training procedures that make the desired metric directly part of the learning objective. Thus, Wasserstein training can be seen as a more direct approach to density estimation than regularized KL training. Future work will aim to further explore the interface between Boltzmann learning and Wasserstein minimization, with the aim to scale the newly proposed learning technique to larger and more complex data distributions. 8 Acknowledgements This work was supported by the Brain Korea 21 Plus Program through the National Research Foundation of Korea funded by the Ministry of Education. This work was also supported by the grant DFG (MU 987/17-1). M. Cuturi gratefully acknowledges the support of JSPS young researcher A grant 26700002. Correspondence to GM, KRM and MC. References [1] D. H. Ackley, G. E. Hinton, and T. J. Sejnowski. A learning algorithm for Boltzmann machines. Cognitive Science, 9(1):147–169, 1985. [2] F. Bassetti, A. Bodini, and E. Regazzini. On minimum Kantorovich distance estimators. Statistics & Probability Letters, 76(12):1298 – 1302, 2006. [3] K. Cho, T. Raiko, and A. Ilin. Enhanced gradient for training restricted Boltzmann machines. Neural Computation, 25(3):805–831, 2013. [4] N. Courty, R. Flamary, D. Tuia, and A. Rakotomamonjy. Optimal transport for domain adaptation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 2016. [5] M. Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems 26, pages 2292–2300, 2013. [6] M. Cuturi and A. Doucet. Fast computation of Wasserstein barycenters. In Proceedings of the 31th International Conference on Machine Learning, ICML, pages 685–693, 2014. [7] G. E. Dahl, M. Ranzato, A. Mohamed, and G. E. Hinton. Phone recognition with the mean-covariance restricted Boltzmann machine. In Advances in Neural Information Processing Systems 23., pages 469–477, 2010. [8] C. Frogner, C. Zhang, H. Mobahi, M. Araya, and T. Poggio. Learning with a wasserstein loss. In NIPS, pages 2044–2052. 2015. [9] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural Computation, 14(8):1771–1800, 2002. [10] P. J. Huber. Robust statistics. Springer, 2011. [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, Nov 1998. [12] B. M. Marlin, K. Swersky, B. Chen, and N. de Freitas. Inductive principles for restricted Boltzmann machine learning. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS, pages 509–516, 2010. [13] G. Montavon and K.-R. Müller. Deep Boltzmann machines and the centering trick. In Neural Networks: Tricks of the Trade - Second Edition, LNCS, pages 621–637. Springer, 2012. [14] Y. Rubner, L. Guibas, and C. Tomasi. The earth mover’s distance, multi-dimensional scaling, and colorbased image retrieval. In Proceedings of the ARPA Image Understanding Workshop, pages 661–668, 1997. [15] R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, AISTATS, pages 448–455, 2009. [16] N. Srivastava and R. Salakhutdinov. Multimodal learning with deep Boltzmann machines. Journal of Machine Learning Research, 15(1):2949–2980, 2014. [17] Y. Tang, R. Salakhutdinov, and G. E. Hinton. Robust Boltzmann machines for recognition and denoising. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2264–2271, 2012. [18] T. Tieleman. Training restricted Boltzmann machines using approximations to the likelihood gradient. In Machine Learning, Proceedings of the Twenty-Fifth International Conference (ICML), pages 1064–1071, 2008. [19] United States Department of Agriculture. The PLANTS Database, 2012. [20] C. Villani. Optimal transport: old and new, volume 338. Springer Verlag, 2009. 9 | 2016 | 257 |
6,169 | A primal-dual method for conic constrained distributed optimization problems Necdet Serhat Aybat Department of Industrial Engineering Penn State University University Park, PA 16802 nsa10@psu.edu Erfan Yazdandoost Hamedani Department of Industrial Engineering Penn State University University Park, PA 16802 evy5047@psu.edu Abstract We consider cooperative multi-agent consensus optimization problems over an undirected network of agents, where only those agents connected by an edge can directly communicate. The objective is to minimize the sum of agentspecific composite convex functions over agent-specific private conic constraint sets; hence, the optimal consensus decision should lie in the intersection of these private sets. We provide convergence rates in sub-optimality, infeasibility and consensus violation; examine the effect of underlying network topology on the convergence rates of the proposed decentralized algorithms; and show how to extend these methods to handle time-varying communication networks. 1 Introduction Let G = (N, E) denote a connected undirected graph of N computing nodes, where N ≜ {1, . . . , N} and E ⊆N × N denotes the set of edges – without loss of generality assume that (i, j) ∈E implies i < j. Suppose nodes i and j can exchange information only if (i, j) ∈E, and each node i ∈N has a private (local) cost function Φi : Rn →R ∪{+∞} such that Φi(x) ≜ρi(x) + fi(x), (1) where ρi : Rn →R ∪{+∞} is a possibly non-smooth convex function, and fi : Rn →R is a smooth convex function. We assume that fi is differentiable on an open set containing dom ρi with a Lipschitz continuous gradient ∇fi, of which Lipschitz constant is Li; and the prox map of ρi, proxρi(x) ≜argmin y∈Rn ρi(y) + 1 2 ∥y −x∥2 , (2) is efficiently computable for i ∈N, where ∥.∥denotes the Euclidean norm. Let Ni ≜{j ∈N : (i, j) ∈E or (j, i) ∈E} denote the set of neighboring nodes of i ∈N, and di ≜|Ni| is the degree of node i ∈N. Consider the following minimization problem: min x∈Rn X i∈N Φi(x) s.t. Aix −bi ∈Ki, ∀i ∈N, (3) where Ai ∈Rmi×n, bi ∈Rmi and Ki ⊆Rmi is a closed, convex cone. Suppose that projections onto Ki can be computed efficiently, while the projection onto the preimage A−1 i (Ki+bi) is assumed to be impractical, e.g., when Ki is the positive semidefinite cone, projection to preimage requires solving an SDP. Our objective is to solve (3) in a decentralized fashion using the computing nodes N and exchanging information only along the edges E. In Section 2 and Section 3, we consider (3) when the topology of the connectivity graph is static and time-varying, respectively. This computational setting, i.e., decentralized consensus optimization, appears as a generic model for various applications in signal processing, e.g., [1, 2], machine learning, e.g., [3, 4, 5] and statistical inference, e.g., [6]. Clearly, (3) can also be solved in a “centralized” fashion by communicating all the private functions Φi to a central node, and solving the overall problem at this 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. node. However, such an approach can be very expensive both from communication and computation perspectives when compared to the distributed algorithms which are far more scalable to increasing problem data and network sizes. In particular, suppose (Ai, bi) ∈Rm×(n+1) and Φi(x) = λ ∥x∥1 + ∥Aix −bi∥2 for some given λ > 0 for i ∈N such that m ≪n and N ≫1. Hence, (3) is a very large scale LASSO problem with distributed data. To solve (3) in a centralized fashion, the data {(Ai, bi) : i ∈N} needs to be communicated to the central node. This can be prohibitively expensive, and may also violate privacy constraints – in case some node i does not want to reveal the details of its private data. Furthermore, it requires that the central node has large enough memory to be able to accommodate all the data. On the other hand, at the expense of slower convergence, one can completely do away with a central node, and seek for consensus among all the nodes on an optimal decision using “local” decisions communicated by the neighboring nodes. From computational perspective, for certain cases, computing partial gradients locally can be more computationally efficient when compared to computing the entire gradient at a central node. With these considerations in mind, we propose decentralized algorithms that can compute solutions to (3) using only local computations without explicitly requiring the nodes to communicate the functions {Φi : i ∈N}; thereby, circumventing all privacy, communication and memory issues. Examples of constrained machine learning problems that fit into our framework include multiple kernel learning [7], and primal linear support vector machine (SVM) problems. In the numerical section we implemented the proposed algorithms on the primal SVM problem. 1.1 Previous Work There has been active research [8, 9, 10, 11, 12] on solving convex-concave saddle point problems minx maxy L(x, y). In [9] primal-dual proximal algorithms are proposed for convex-concave problems with known saddle-point structure minx maxy Ls(x, y) ≜Φ(x) + ⟨Tx, y⟩−h(y), where Φ and h are convex functions, and T is a linear map. These algorithms converge with rate O(1/k) for the primal-dual gap, and they can be modified to yield a convergence rate of O(1/k2) when either Φ or h is strongly convex, and O(1/ek) linear rate, when both Φ and h are strongly convex. More recently, in [11] Chambolle and Pock extend their previous work in [9], using simpler proofs, to handle composite convex primal functions, i.e., sum of smooth and (possibly) nonsmooth functions, and to deal with proximity operators based on Bregman distance functions. Consider minx∈Rn{P i∈N Φi(x) : x ∈∩i∈N Xi} over G = (N, E). Although the unconstrained consensus optimization, i.e., Xi = Rn, is well studied – see [13, 14] and the references therein, the constrained case is still an immature, and recently developing area of active research [13, 14, 15, 16, 17, 18, 19]. Other than few exceptions, e.g., [15, 16, 17], the methods in literature require that each node compute a projection on the privately known set Xi in addition to consensus and (sub)gradient steps, e.g., [18, 19]. Moreover, among those few exceptions that do not use projections onto Xi when ΠXi is not easy to compute, only [15, 16] can handle agent-specific constraints without assuming global knowledge of the constraints by all agents. However, no rate results in terms of suboptimality, local infeasibility, and consensus violation exist for the primaldual distributed methods in [15, 16] when implemented for the agent-specific conic constraint sets Xi = {x : Aix −bi ∈Ki} studied in this paper. In [15], a consensus-based distributed primaldual perturbation (PDP) algorithm using a square summable but not summable step-size sequence is proposed. The objective is to minimize a composition of a global network function (smooth) with the summation of local objective functions (smooth), subject to local compact sets and inequality constraints on the summation of agent specific constrained functions. They showed that the local primal-dual iterate sequence converges to a global optimal primal-dual solution; however, no rate result was provided. The proposed PDP method can also handle non-smooth constraints with similar convergence guarantees. Finally, while we were preparing this paper, we became aware of a very recent work [16] related to ours. The authors proposed a distributed algorithm on time-varying communication network for solving saddle-point problems subject to consensus constraints. The algorithm can also be applied to solve consensus optimization problems with inequality constraints that can be written as summation of local convex functions of local and global variables. Under some assumptions, it is shown that using a carefully selected decreasing step-size sequence, the ergodic average of primal-dual sequence converges with O(1/ √ k) rate in terms of saddle-point evaluation error; however, when applied to constrained optimization problems, no rate in terms of either suboptimality or infeasibility is provided. 2 Contribution. We propose primal-dual algorithms for distributed optimization subject to agent specific conic constraints. By assuming composite convex structure on the primal functions, we show that our proposed algorithms converge with O(1/k) rate where k is the number of consensus iterations. To the best of our knowledge, this is the best rate result for our setting. Indeed, ǫ-optimal and ǫ-feasible solution can be computed within O(1/ǫ) consensus iterations for the static topology, and within O(1/ǫ1+1/p) consensus iterations for the dynamic topology for any rational p ≥1, although O(1) constant gets larger for large p. Moreover, these methods are fully distributed, i.e., the agents are not required to know any global parameter depending on the entire network topology, e.g., the second smallest eigenvalue of the Laplacian; instead, we only assume that agents know who their neighbors are. Due to limited space, we put all the technical proofs to the appendix. 1.2 Preliminary Let X and Y be finite-dimensional vector spaces. In a recent paper, Chambolle and Pock [11] proposed a primal-dual algorithm (PDA) for the following convex-concave saddle-point problem: min x∈X max y∈Y L(x, y) ≜Φ(x) + ⟨Tx, y⟩−h(y), where Φ(x) ≜ρ(x) + f(x), (4) ρ and h are possibly non-smooth convex functions, f is a convex function and has a Lipschitz continuous gradient defined on dom ρ with constant L, and T is a linear map. Briefly, given x0, y0 and algorithm parameters νx, νy > 0, PDA consists of two proximal-gradient steps: xk+1 ←argmin x ρ(x) + f(xk) + D ∇f(xk), x −xkE + D Tx, ykE + 1 νx Dx(x, xk) (5a) yk+1 ←argmin y h(y) − D T(2xk+1 −xk), y E + 1 νy Dy(y, yk), (5b) where Dx and Dy are Bregman distance functions corresponding to some continuously differentiable strongly convex ψx and ψy such that dom ψx ⊃dom ρ and dom ψy ⊃dom h. In particular, Dx(x, ¯x) ≜ψx(x) −ψx(¯x) −⟨∇ψx(¯x), x −¯x⟩, and Dy is defined similarly. In [11], a simple proof for the ergodic convergence is provided for (5); indeed, it is shown that, when the convexity modulus for ψx and ψy is 1, if τ, κ > 0 are chosen such that ( 1 νx −L) 1 νy ≥σ2 max(T), then L(¯xK, y) −L(x, ¯yK) ≤1 K 1 νx Dx(x, x0) + 1 νy Dy(y, y0) − T(x −x0), y −y0 , (6) for all x, y ∈X × Y, where ¯xK ≜1 K PK k=1 xk and ¯yK ≜1 K PK k=1 yk. First, we define the notation used throughout the paper. Next, in Theorem 1.1, we discuss a special case of (4), which will help us prove the main results of this paper, and also allow us to develop decentralized algorithms for the consensus optimization problem in (3). The proposed algorithms in this paper can distribute the computation over the nodes such that each node’s computation is based on the local topology of G and the private information only available to that node. Notation. Throughout the paper, ∥.∥denotes the Euclidean norm. Given a convex set S, let σS(.) denote its support function, i.e., σS(θ) ≜supw∈S ⟨θ, w⟩, let IS(·) denote the indicator function of S, i.e., IS(w) = 0 for w ∈S and equal to +∞otherwise, and let PS(w) ≜argmin{∥v −w∥: v ∈S} denote the projection onto S. For a closed convex set S, we define the distance function as dS(w) ≜∥PS(w) −w∥. Given a convex cone K ∈Rm, let K∗denote its dual cone, i.e., K∗≜{θ ∈Rm : ⟨θ, w⟩≥0 ∀w ∈K}, and K◦≜−K∗denote the polar cone of K. Note that for a given cone K ∈Rm, σK(θ) = 0 for θ ∈K◦and equal to +∞if θ ̸∈K◦, i.e., σK(θ) = IK◦(θ) for all θ ∈Rm. Cone K is called proper if it is closed, convex, pointed, and it has a nonempty interior. Given a convex function g : Rn →R ∪{+∞}, its convex conjugate is defined as g∗(w) ≜ supθ∈Rn ⟨w, θ⟩−g(θ). ⊗denotes the Kronecker product, and In is the n × n identity matrix. Definition 1. Let X ≜Πi∈N Rn and X ∋x = [xi]i∈N ; Y ≜Πi∈N Rmi × Rm0, Y ∋y = [θ⊤λ⊤]⊤and θ = [θi]i∈N ∈Rm, where m ≜P i∈N mi, and Π denotes the Cartesian product. Given parameters γ > 0, κi, τi > 0 for i ∈N, let Dγ ≜ 1 γ Im0, Dκ ≜diag([ 1 κi Imi]i∈N ), and Dτ ≜diag([ 1 τi In]i∈N ). Defining ψx(x) ≜1 2x⊤Dτx and ψy(y) ≜1 2θ⊤Dκθ + 1 2λ⊤Dγλ leads to the following Bregman distance functions: Dx(x, ¯x) = 1 2 ∥x −¯x∥2 Dτ , and Dy(y, ¯y) = 1 2
θ −¯θ
2 Dκ + 1 2
λ −¯λ
2 Dγ, where the Q-norm is defined as ∥z∥Q ≜(z⊤Qz) 1 2 for Q ≻0. 3 Theorem 1.1. Let X, Y, and Bregman functions Dx, Dy be defined as in Definition 1. Suppose Φ(x) ≜P i∈N Φi(xi), and h(y) ≜h0(λ) + P i∈N hi(θi), where {Φi}i∈N are composite convex functions defined as in (1), and {hi}i∈N are closed convex with simple prox-maps. Given A0 ∈ Rm0×n|N | and {Ai}i∈N such that Ai ∈Rmi×n, let T = [A⊤A⊤ 0 ]⊤, where A ≜diag([Ai]i∈N ) ∈ Rm×n|N | is a block-diagonal matrix. Given the initial point (x0, y0), the PDA iterate sequence {xk, yk}k≥1, generated according to (5a) and (5b) when νx = νy = 1, satisfies (6) for all K ≥1 if ¯Q(A, A0) ≜ ¯Dτ −A⊤ −A⊤ 0 −A Dκ 0 −A0 0 Dγ ⪰0, where ¯Dτ ≜diag([( 1 τi −Li)In]i∈N ). Moreover, if a saddle point exists for (4), and ¯Q(A, A0) ≻0, then {xk, yk}k≥1 converges to a saddle point of (4); hence, {¯xk, ¯yk}k≥1 converges to the same point. Although the proof of Theorem 1.1 follows from the lines of [11], we provide the proof in the appendix for the sake of completeness as it will be used repeatedly to derive our results. Next we discuss how (5) can be implemented to compute an ǫ-optimal solution to (3) in a distributed way using only O(1/ǫ) communications over the communication graph G while respecting nodespecific privacy requirements. Later, in Section 3, we consider the scenario where the topology of the connectivity graph is time-varying, and propose a distributed algorithm that requires O(1/ǫ1+ 1 p ) communications for any p ≥1. Finally, in Section 4 we test the proposed algorithms for solving the primal SVM problem in a decentralized manner. These results are shown under Assumption 1.1. Assumption 1.1. The duality gap for (3) is zero, and a primal-dual solution to (3) exists. A sufficient condition for this is the existence of a Slater point, i.e., there exists ¯x ∈relint(dom Φ) such that Ai¯x −bi ∈int(Ki) for i ∈N, where dom Φ = ∩i∈N dom Φi. 2 Static Network Topology Let xi ∈Rn denote the local decision vector of node i ∈N. By taking advantage of the fact that G is connected, we can reformulate (3) as the following distributed consensus optimization problem: min xi∈Rn, i∈N (X i∈N Φi(xi) | xi = xj : λij, ∀(i, j) ∈E, Aixi −bi ∈Ki : θi, ∀i ∈N ) , (7) where λij ∈Rn and θi ∈Rmi are the corresponding dual variables. Let x = [xi]i∈N ∈Rn|N |. The consensus constraints xi = xj for (i, j) ∈E can be formulated as Mx = 0, where M ∈Rn|E|×n|N | is a block matrix such that M = H ⊗In where H is the oriented edge-node incidence matrix, i.e., the entry H(i,j),l, corresponding to edge (i, j) ∈E and l ∈N, is equal to 1 if l = i, −1 if l = j, and 0 otherwise. Note that M TM = HTH ⊗In = Ω⊗In, where Ω∈R|N |×|N | denotes the graph Laplacian of G, i.e., Ωii = di, Ωij = −1 if (i, j) ∈E or (j, i) ∈E, and equal to 0 otherwise. For any closed convex set S, we have σ∗ S(·) = IS(·); therefore, using the fact that σ∗ Ki = IKi for i ∈N, one can obtain the following saddle point problem corresponding to (7), min x max y L(x, y) ≜ X i∈N Φi(xi) + ⟨θi, Aixi −bi⟩−σKi(θi) + ⟨λ, Mx⟩, (8) where y = [θ⊤λ⊤]⊤for λ = [λij](i,j)∈E ∈Rn|E|, θ = [θi]i∈N ∈Rm, and m ≜P i∈N mi. Next, we study the distributed implementation of PDA in (5a)-(5b) to solve (8). Let Φ(x) ≜ P i∈N Φi(xi), and h(y) ≜P i∈N σKi(θi) + ⟨bi, θi⟩. Define the block-diagonal matrix A ≜ diag([Ai]i∈N ) ∈Rm×n|N | and T = [A⊤M ⊤]⊤. Therefore, given the initial iterates x0, θ0, λ0 and parameters γ > 0, τi, κi > 0 for i ∈N, choosing Dx and Dy as defined in Definition 1, and setting νx = νy = 1, PDA iterations in (5a)-(5b) take the following form: xk+1 ←argmin x ⟨λk, Mx⟩+ X i∈N h ρi(xi) + ⟨∇f(xk i ), xi⟩+ ⟨Aixi −bi, θk i ⟩+ 1 2τi ∥xi −xk i ∥2i , (9a) θk+1 i ←argmin θi σKi(θi) −⟨Ai(2xk+1 i −xk i ) −bi, θi⟩+ 1 2κi ∥θi −θk i ∥2, i ∈N (9b) λk+1 ←argmin λ n −⟨M(2xk+1 −xk), λ⟩+ 1 2γ ∥λ −λk∥2o = λk + γM(2xk+1 −xk). (9c) 4 Since Ki is a cone, proxκiσKi (.) = PK◦ i (.); hence, θk+1 i can be written in closed form as θk+1 i = PK◦ i θk i + κi Ai(2xk+1 i −xk i ) −bi , i ∈N. Using recursion in (9c), we can write λk+1 as a partial summation of primal iterates {xℓ}k ℓ=0, i.e., λk = λ0 + γ Pk−1 ℓ=0 M(2xℓ+1 −xℓ). Let λ0 ←γMx0, s0 ←x0, and sk ≜xk + Pk ℓ=1 xℓfor k ≥1; hence, λk = γMsk. Using the fact that M ⊤M = Ω⊗In, we obtain ⟨Mx, λk⟩= γ ⟨x, (Ω⊗In)sk⟩= γ P i∈N ⟨xi, P j∈Ni(sk i −sk j )⟩. Thus, PDA iterations given in (9) for the static graph G can be computed in a decentralized way, via the node-specific computations as in Algorithm DPDA-S displayed in Fig. 1 below. Algorithm DPDA-S ( x0, θ0, γ, {τi, κi}i∈N ) Initialization: s0 i ←x0 i , i ∈N Step k: (k ≥0) 1. xk+1 i ←proxτiρi xk i −τi ∇fi(xk i ) + A⊤ i θk i + γ P j∈Ni(sk i −sk j ) , i ∈N 2. sk+1 i ←xk+1 i + Pk+1 ℓ=1 xℓ i, i ∈N 3. θk+1 i ←PK◦ i θk i + κi Ai(2xk+1 i −xk i ) −bi , i ∈N Figure 1: Distributed Primal Dual Algorithm for Static G (DPDA-S) The convergence rate for DPDA-S, given in (6), follows from Theorem 1.1 with the help of following technical lemma which provides a sufficient condition for ¯Q(A, A0) ≻0. Lemma 2.1. Given {τi, κi}i∈N and γ such that γ > 0, and τi, κi > 0 for i ∈N, let A0 = M and A ≜diag([Ai]i∈N ). Then ¯Q ≜¯Q(A, A0) ⪰0 if {τi, κi}i∈N and γ are chosen such that 1 τi −Li −2γdi 1 κi ≥σ2 max(Ai), ∀i ∈N, (10) and ¯Q ≻0 if (10) holds with strict inequality, where ¯Q(A, A0) is defined in Theorem 1.1. Remark 2.1. Choosing τi = (ci + Li + 2γdi)−1, κi = ci/σ2 max(Ai) for any ci > 0 satisfies (10). Next, we quantify the suboptimality and infeasibility of the DPDA-S iterate sequence. Theorem 2.2. Suppose Assumption 1.1 holds. Let {xk, θk, λk}k≥0 be the sequence generated by Algorithm DPDA-S, displayed in Fig. 1, initialized from an arbitrary x0 and θ0 = 0. Let step-sizes {τi, κi}i∈N and γ be chosen satisfying (10) with strict inequality. Then {xk, θk, λk}k≥0 converges to {x∗, θ∗, λ∗}, a saddle point of (8) such that x∗= 1 ⊗x∗and (x∗, θ∗) is a primal-dual optimal solution to (3); moreover, the following error bounds hold for all K ≥1: ∥λ∗∥∥M ¯xK∥+ X i∈N ∥θ∗ i ∥dKi(Ai¯xK i −bi) ≤Θ1/K, |Φ(¯xK) −Φ(x∗)| ≤Θ1/K, where Θ1 ≜2 γ ∥λ∗∥2 −γ 2
Mx0
2 + P i∈N h 1 2τi ∥x∗ i −x0 i ∥2 + 4 κi ∥θ∗ i ∥2i , and ¯xK ≜1 K PK k=1 xk. 3 Dynamic Network Topology In this section we develop a distributed primal-dual algorithm for solving (3) when the communication network topology is time-varying. We assume a compact domain, i.e., let Di ≜ maxxi,x′ i∈dom ρi ∥x −x′∥and B ≜maxi∈N Di < ∞. Let C be the set of consensus decisions: C ≜{x ∈Rn|N | : xi = ¯x, ∀i ∈N for some ¯x ∈Rn s.t. ∥¯x∥≤B}, then one can reformulate (3) in a decentralized way as follows: min x max y L(x, y) ≜ X i∈N Φi(xi) + ⟨θi, Aixi −bi⟩−σKi(θi) + ⟨λ, x⟩−σC(λ), (11) where y = [θ⊤λ⊤]⊤such that λ ∈Rn|N |, θ = [θi]i∈N ∈Rm, and m ≜P i∈N mi. 5 Next, we consider the implementation of PDA in (5) to solve (11). Let Φ(x) ≜P i∈N Φi(xi), and h(y) ≜σC(λ)+P i∈N σKi(θi)+⟨bi, θi⟩. Define the block-diagonal matrix A ≜diag([Ai]i∈N ) ∈ Rm×n|N | and T = [A⊤In|N |]⊤. Therefore, given the initial iterates x0, θ0, λ0 and parameters γ > 0, τi, κi > 0 for i ∈N, choosing Dx and Dy as defined in Definition 1, and setting νx = νy = 1, PDA iterations given in (5) take the following form: Starting from µ0 = λ0, compute for i ∈N xk+1 i ←argmin x ρi(xi) + ⟨∇f(xk i ), xi⟩+ ⟨Aixi −bi, θk i ⟩+ ⟨xi, µk i ⟩+ 1 2τi ∥xi −xk i ∥2 2, (12a) θk+1 i ←argmin θi σKi(θi) −⟨Ai(2xk+1 i −xk i ) −bi, θi⟩+ 1 2κi ∥θi −θk i ∥2 2, (12b) λk+1 ←argmin µ σC(µ) −⟨2xk+1 −xk, µ⟩+ 1 2γ ∥µ −µk∥2 2, µk+1 ←λk+1. (12c) Using extended Moreau decomposition for proximal operators, λk+1 can be written as λk+1 = argmin µ σC(µ) + 1 2γ ∥µ −(µk + γ(2xk+1 −xk))∥2 = proxγσC(µk + γ(2xk+1 −xk)) = µk + γ(2xk+1 −xk) −γ PC 1 γ µk + 2xk+1 −xk . (13) Let 1 ∈R|N | be the vector all ones, B0 ≜{x ∈Rn : ∥x∥≤B}. Note PB0(x) = x min{1, B ∥x∥}. For any x = [xi]i∈N ∈Rn|N |, PC(x) can be computed as PC(x) = 1 ⊗p(x), where p(x) ≜argmin ξ∈B0 X i∈N ∥ξ −xi∥2 = argmin ξ∈B0 ∥ξ − 1 |N| X i∈N xi∥2. (14) Let B ≜{x : ∥xi∥≤B, i ∈N} = Πi∈N B0. Hence, we can write PC(x) = PB ((W ⊗In)x) where W ≜ 1 |N |11⊤∈R|N |×|N |. Equivalently, PC(x) = PB (1 ⊗˜p(x)) , where ˜p(x) ≜ 1 |N | P i∈N xi. (15) Although x-step and θ-step of the PDA implementation in (12) can be computed locally at each node, computing λk+1 requires communication among the nodes. Indeed, evaluating the average operator ˜p(.) is not a simple operation in a decentralized computational setting which only allows for communication among neighbors. In order to overcome this issue, we will approximate ˜p(.) operator using multi-consensus steps, and analyze the resulting iterations as an inexact primal-dual algorithm. In [20], this idea has been exploited within a distributed primal algorithm for unconstrained consensus optimization problems. We define the consensus step as one time exchanging local variables among neighboring nodes – the details of this operation will be discussed shortly. Since the connectivity network is dynamic, let Gt = (N, Et) be the connectivity network at the time t-th consensus step is realized for t ∈Z+. We adopt the information exchange model in [21]. Assumption 3.1. Let V t ∈R|N |×|N | be the weight matrix corresponding to Gt = (N, Et) at the time of t-th consensus step and N t i ≜{j ∈N : (i, j) ∈Et or (j, i) ∈Et}. Suppose for all t ∈Z+: (i) V t is doubly stochastic; (ii) there exists ζ ∈(0, 1) such that for i ∈N, V t ij ≥ζ if j ∈N t i , and V t ij = 0 if j /∈N t i ; (iii) G∞= (N, E∞) is connected where E∞≜{(i, j) ∈N × N : (i, j) ∈Et for infinitely many t ∈Z+}, and there exists Z ∋T ◦> 1 such that if (i, j) ∈E∞, then (i, j) ∈Et ∪Et+1 ∪... ∪Et+T ◦−1 for all t ≥1. Lemma 3.1. [21] Let Assumption 3.1 holds, and W t,s = V tV t−1...V s+1 for t ≥s + 1. Given s ≥0 the entries of W t,s converges to 1 N as t →∞with a geometric rate, i.e., for all i, j ∈N, one has W t,s ij −1 N ≤Γαt−s, where Γ ≜2(1+ζ−¯T )/(1−ζ ¯T ), α ≜(1−ζ ¯T )1/ ¯T , and ¯T ≜(N −1)T ◦. Consider the k-th iteration of PDA as shown in (12). Instead of computing λk+1 exactly according to (13), we propose to approximate λk+1 with the help of Lemma 3.1 and set µk+1 to this approximation. In particular, let tk be the total number of consensus steps done before k-th iteration of PDA, and let qk ≥1 be the number of consensus steps within iteration k. For x = [xi]i∈N , define Rk(x) ≜PB (W tk+qk,tk ⊗In) x (16) to approximate PC(x) in (13). Note that Rk(·) can be computed in a distributed fashion requiring qk communications with the neighbors for each node. Indeed, Rk(x) = [Rk i (x)]i∈N such that Rk i (x) ≜PB0 X j∈N W tk+qk,tk ij xj . (17) 6 Moreover, the approximation error, Rk(x) −PC(x), for any x can be bounded as in (18) due to non-expansivity of PB and using Lemma 3.1. From (15), we get for all i ∈N, ∥Rk i (x) −PB0 ˜p(x) ∥= ∥PB0 X j∈N W tk+qk,tk ij xj −PB0 1 N X j∈N xj ∥ ≤∥ X j∈N W tk+qk,tk ij −1 N xj∥≤ √ N Γαqk ∥x∥. (18) Thus, (15) implies that ∥Rk(x) −PC(x)∥≤N Γαqk ∥x∥. Next, to obtain an inexact variant of (12), we replace the exact computation in (12c) with the inexact iteration rule: µk+1 ←µk + γ(2xk+1 −xk) −γRk 1 γ µk + 2xk+1 −xk . (19) Thus, PDA iterations given in (12) can be computed inexactly, but in decentralized way for dynamic connectivity, via the node-specific computations as in Algorithm DPDA-D displayed in Fig. 2 below. Algorithm DPDA-D ( x0, θ0, γ, {τi, κi}i∈N , {qk}k≥0 ) Initialization: µ0 i ←0, i ∈N Step k: (k ≥0) 1. xk+1 i ←proxτiρi xk i −τi ∇fi(xk i ) + A⊤ i θk i + µk i , ri ←1 γ µk i + 2xk+1 i −xk i i ∈N 2. θk+1 i ←PK◦ i θk i + κi Ai(2xk+1 i −xk i ) −bi , i ∈N 3. For ℓ= 1, . . . , qk 4. ri ←P j∈N tk+ℓ i ∪{i} V tk+ℓ ij rj, i ∈N 5. End For 6. µk+1 i ←µk i + γ(2xk+1 i −xk i ) −γPB0 ri , i ∈N Figure 2: Distributed Primal Dual Algorithm for Dynamic Gt (DPDA-D) Next, we define the proximal error sequence {ek}k≥1 as in (20), which will be used later for analyzing the convergence of Algorithm DPDA-D displayed in Fig. 2. ek+1 ≜PC 1 γ µk + 2xk+1 −xk −Rk 1 γ µk + 2xk+1 −xk ; (20) hence, µk = λk + γek for k ≥1 when (12c) is replaced with (19). In the rest, we assume µ0 = 0. The following observation will also be useful to prove error bounds for DPDA-D iterate sequence. For each i ∈N, the definition of Rk i in (17) implies that Rk i (x) ∈B0 for all x; hence, from (19), ∥µk+1 i ∥≤∥µk i + γ(2xk+1 i −xk i )∥+ γ∥Rk i 1 γ µk + 2xk+1 −xk ∥≤∥µk i ∥+ 4γB. Thus, we trivially get the following bound on
µk
: ∥µk∥≤4γ √ N B k. (21) Moreover, for any µ and λ we have that σC(µ) = sup x∈C ⟨λ, x⟩+ ⟨µ −λ, x⟩≤σC(λ) + √ N B ∥µ −λ∥. (22) Theorem 3.2. Suppose Assumption 1.1 holds. Starting from µ0 = 0, θ0 = 0, and an arbitrary x0, let {xk, θk, µk}k≥0 be the iterate sequence generated using Algorithm DPDA-D, displayed in Fig. 2, using qk = p√ k consensus steps at the k-th iteration for all k ≥1 for some rational p ≥1. Let primal-dual step-sizes {τi, κi}i∈N and γ be chosen such that the following holds: 1 τi −Li −γ 1 κi > σ2 max(Ai), ∀i ∈N. (23) Then {xk, θk, µk}k≥0 converges to {x∗, θ∗, λ∗}, a saddle point of (11) such that x∗= 1 ⊗x∗ and (x∗, θ∗) is a primal-dual optimal solution to (3). Moreover, the following bounds hold for all K ≥1: ∥λ∗∥d ˜ C(¯xK) + X i∈N ∥θ∗ i ∥dKi(Ai¯xK i −bi) ≤Θ2 + Θ3(K) K , |Φ(¯xK) −Φ(x∗)| ≤Θ2 + Θ3(K) K , where ¯xK ≜1 K PK k=1 xk, Θ2 ≜2∥λ∗∥ ! 1 γ ∥λ∗∥+
x0 −x∗
+P i∈N h 1 τi ∥x∗ i −x0 i ∥2+ 4 κi ∥θ∗ i ∥2i , and Θ3(K) ≜8N 2B2Γ PK k=1 αqk h 2γk2 + γ + ∥λ∗∥ √ NB k i . Moreover, supK∈Z+ Θ3(K) < ∞; hence, 1 K Θ3(K) = O( 1 K ). 7 Remark 3.1. Note that the suboptimality, infeasibility and consensus violation at the K-th iteration is O(Θ3(K)/K), where Θ3(K) denotes the error accumulation due to approximation errors, and Θ3(K) can be bounded above for all K ≥1 as Θ3(K) ≤R PK k=1 αqkk2 for some constant R > 0. Since P∞ k=1 α p √ kk2 < ∞for any p ≥1, if one chooses qk = p√ k for k ≥1, then the total number of communications per node until the end of K-th iteration can be bounded above by PK k=1 qk = O(K1+1/p). For large p, qk grow slowly, it makes the method more practical at the cost of longer convergence time due to increase in O(1) constant. Note that qk = (log(k))2 also works and it grows very slowly. We assume agents know qk as a function of k at the beginning, hence, synchronicity can be achieved by simply counting local communications with each neighbor. 4 Numerical Section We tested DPDA-S and DPDA-D on a primal linear SVM problem where the data is distributed among the computing nodes in N. For the static case, communication network G = (N, E) is a connected graph that is generated by randomly adding edges to a spanning tree, generated uniformly at random, until a desired algebraic connectivity is achieved. For the dynamic case, for each consensus round t ≥1, Gt is generated as in the static case, and V t ≜I −1 cΩt, where Ωt is the Laplacian of Gt, and the constant c > dt max. We ran DPDA-S and DPDA-D on the line and complete graphs as well to see the topology effect – for the dynamic case when the topology is line, each Gt is a random line graph. Let S ≜{1, 2, .., s} and D ≜{(xℓ, yℓ) ∈Rn × {−1, +1} : ℓ∈S} be a set of feature vector and label pairs. Suppose S is partitioned into Stest and Strain, i.e., the index sets for the test and training data; let {Si}i∈N be a partition of Strain among the nodes N. Let w = [wi]i∈N , b = [bi]i∈N , and ξ ∈R|Strain| such that wi ∈Rn and bi ∈R for i ∈N. Consider the following distributed SVM problem: min w,b,ξ n 1 2 X i∈N ∥wi∥2 + C |N| X i∈N X ℓ∈Si ξℓ: yℓ(wT i xℓ+ bi) ≥1 −ξℓ, ξℓ≥0, ℓ∈Si, i ∈N, wi = wj, bi = bj (i, j) ∈E o Similar to [3], {xℓ}ℓ∈S is generated from two-dimensional multivariate Gaussian distribution with covariance matrix Σ = [1, 0; 0, 2] and with mean vector either m1 = [−1, −1]T or m2 = [1, 1]T with equal probability. The experiment was performed for C = 2, |N| = 10, s = 900 such that |Stest| = 600, |Si| = 30 for i ∈N, i.e., |Strain| = 300, and qk = √ k. We ran DPDA-S and DPDA-D on line, random, and complete graphs, where the random graph is generated such that the algebraic connectivity is approximately 4. Relative suboptimality and relative consensus violation, i.e., max(i,j)∈E ∥[w⊤ i bi]⊤−[w⊤ j bj]⊤∥/
[w∗⊤b∗]
, and absolute feasibility violation are plotted against iteration counter in Fig. 3, where [w∗⊤b∗] denotes the optimal solution to the central problem. As expected, the convergence is slower when the connectivity of the graph is weaker. Furthermore, visual comparison between DPDA-S, local SVMs (for two nodes) and centralized SVM for the same training and test data sets is given in Fig. 4 and Fig. 5 in the appendix. Figure 3: Static (top) and Dynamic (bottom) network topologies: line, random, and complete graphs 8 References [1] Qing Ling and Zhi Tian. Decentralized sparse signal recovery for compressive sleeping wireless sensor networks. Signal Processing, IEEE Transactions on, 58(7):3816–3827, 2010. [2] Ioannis D Schizas, Alejandro Ribeiro, and Georgios B Giannakis. Consensus in ad hoc WSNs with noisy links - Part I: Distributed estimation of deterministic signals. Signal Processing, IEEE Transactions on, 56(1):350–364, 2008. [3] Pedro A Forero, Alfonso Cano, and Georgios B Giannakis. Consensus-based distributed support vector machines. The Journal of Machine Learning Research, 11:1663–1707, 2010. [4] Ryan McDonald, Keith Hall, and Gideon Mann. Distributed training strategies for the structured perceptron. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 456–464. Association for Computational Linguistics, 2010. [5] F. Yan, S. Sundaram, S. Vishwanathan, and Y. Qi. Distributed autonomous online learning: Regrets and intrinsic privacy-preserving properties. Knowledge and Data Engineering, IEEE Transactions on, 25(11):2483–2493, 2013. [6] Gonzalo Mateos, Juan Andr´es Bazerque, and Georgios B Giannakis. Distributed sparse linear regression. Signal Processing, IEEE Transactions on, 58(10):5262–5276, 2010. [7] Francis R Bach, Gert RG Lanckriet, and Michael I Jordan. Multiple kernel learning, conic duality, and the smo algorithm. In Proceedings of the twenty-first international conference on Machine learning, page 6. ACM, 2004. [8] Angelia Nedi´c and Asuman Ozdaglar. Subgradient methods for saddle-point problems. Journal of optimization theory and applications, 142(1):205–228, 2009. [9] Antonin Chambolle and Thomas Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. Journal of Mathematical Imaging and Vision, 40(1):120–145, 2011. [10] Bingsheng He and Xiaoming Yuan. Convergence analysis of primal-dual algorithms for a saddle-point problem: from contraction perspective. SIAM Journal on Imaging Sciences, 5(1):119–149, 2012. [11] Antonin Chambolle and Thomas Pock. On the ergodic convergence rates of a first-order primal–dual algorithm. Mathematical Programming, 159(1):253–287, 2016. [12] Yunmei Chen, Guanghui Lan, and Yuyuan Ouyang. Optimal primal-dual methods for a class of saddle point problems. SIAM Journal on Optimization, 24(4):1779–1814, 2014. [13] A. Nedic and A. Ozdaglar. Convex Optimization in Signal Processing and Communications, chapter Cooperative Distributed Multi-agent Optimization, pages 340–385. Cambridge University Press, 2010. [14] A. Nedi´c. Distributed optimization. In Encyclopedia of Systems and Control, pages 1–12. Springer, 2014. [15] Tsung-Hui Chang, Angelia Nedic, and Anna Scaglione. Distributed constrained optimization by consensus-based primal-dual perturbation method. Automatic Control, IEEE Transactions on, 59(6):1524–1538, 2014. [16] David Mateos-N´u˜nez and Jorge Cort´es. Distributed subgradient methods for saddle-point problems. In 2015 54th IEEE Conference on Decision and Control (CDC), pages 5462–5467, Dec 2015. [17] Deming Yuan, Shengyuan Xu, and Huanyu Zhao. Distributed primal–dual subgradient method for multiagent optimization via consensus algorithms. Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, 41(6):1715–1724, 2011. [18] Angelia Nedi´c, Asuman Ozdaglar, and Pablo A Parrilo. Constrained consensus and optimization in multiagent networks. Automatic Control, IEEE Transactions on, 55(4):922–938, 2010. [19] Kunal Srivastava, Angelia Nedi´c, and Duˇsan M Stipanovi´c. Distributed constrained optimization over noisy networks. In Decision and Control (CDC), 2010 49th IEEE Conference on, pages 1945–1950. IEEE, 2010. [20] Albert I Chen and Asuman Ozdaglar. A fast distributed proximal-gradient method. In Communication, Control, and Computing (Allerton), 2012 50th Annual Allerton Conference on, pages 601–608. IEEE, 2012. [21] Angelia Nedi´c and Asuman Ozdaglar. Distributed subgradient methods for multi-agent optimization. Automatic Control, IEEE Transactions on, 54(1):48–61, 2009. [22] Ralph Tyrell Rockafellar. Convex analysis. Princeton university press, 2015. [23] H. Robbins and D. Siegmund. Optimizing methods in statistics (Proc. Sympos., Ohio State Univ., Columbus, Ohio, 1971), chapter A convergence theorem for non negative almost supermartingales and some applications, pages 233 – 257. New York: Academic Press, 1971. 9 | 2016 | 258 |
6,170 | Path-Normalized Optimization of Recurrent Neural Networks with ReLU Activations Behnam Neyshabur∗ Toyota Technological Institute at Chicago bneyshabur@ttic.edu Yuhuai Wu∗ University of Toronto ywu@cs.toronto.edu Ruslan Salakhutdinov Carnegie Mellon University rsalakhu@cs.cmu.edu Nathan Srebro Toyota Technological Institute at Chicago nati@ttic.edu Abstract We investigate the parameter-space geometry of recurrent neural networks (RNNs), and develop an adaptation of path-SGD optimization method, attuned to this geometry, that can learn plain RNNs with ReLU activations. On several datasets that require capturing long-term dependency structure, we show that path-SGD can significantly improve trainability of ReLU RNNs compared to RNNs trained with SGD, even with various recently suggested initialization schemes. 1 Introduction Recurrent Neural Networks (RNNs) have been found to be successful in a variety of sequence learning problems [4, 3, 9], including those involving long term dependencies (e.g., [1, 23]). However, most of the empirical success has not been with “plain” RNNs but rather with alternate, more complex structures, such as Long Short-Term Memory (LSTM) networks [7] or Gated Recurrent Units (GRUs) [3]. Much of the motivation for these more complex models is not so much because of their modeling richness, but perhaps more because they seem to be easier to optimize. As we discuss in Section 3, training plain RNNs using gradient-descent variants seems problematic, and the choice of the activation function could cause a problem of vanishing gradients or of exploding gradients. In this paper our goal is to better understand the geometry of plain RNNs, and develop better optimization methods, adapted to this geometry, that directly learn plain RNNs with ReLU activations. One motivation for insisting on plain RNNs, as opposed to LSTMs or GRUs, is because they are simpler and might be more appropriate for applications that require low-complexity design such as in mobile computing platforms [22, 5]. In other applications, it might be better to solve optimization issues by better optimization methods rather than reverting to more complex models. Better understanding optimization of plain RNNs can also assist us in designing, optimizing and intelligently using more complex RNN extensions. Improving training RNNs with ReLU activations has been the subject of some recent attention, with most research focusing on different initialization strategies [12, 22]. While initialization can certainly have a strong effect on the success of the method, it generally can at most delay the problem of gradient explosion during optimization. In this paper we take a different approach that can be combined with any initialization choice, and focus on the dynamics of the optimization itself. Any local search method is inherently tied to some notion of geometry over the search space (e.g. the space of RNNs). For example, gradient descent (including stochastic gradient descent) is tied to the Euclidean geometry and can be viewed as steepest descent with respect to the Euclidean norm. Changing the norm (even to a different quadratic norm, e.g. by representing the weights with respect to a different basis in parameter space) results in different optimization dynamics. We build on prior work on the geometry and optimization in feed-forward networks, which uses the path-norm [16] ∗Contributed equally. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Input nodes Internal nodes Output nodes FF (shared weights) hv = x[v] hv = hP (u→v)∈E wu→vhu i + hv = P (u→v)∈E wu→vhu RNN notation h0 t = xt, hi 0 = 0 hi t = Wi inhi−1 t + Wi rechi t−1 + hd t = Wouthd−1 t Table 1: Forward computations for feedforward nets with shared weights. (defined in Section 4) to determine a geometry leading to the path-SGD optimization method. To do so, we investigate the geometry of RNNs as feedforward networks with shared weights (Section 2) and extend a line of work on Path-Normalized optimization to include networks with shared weights. We show that the resulting algorithm (Section 4) has similar invariance properties on RNNs as those of standard path-SGD on feedforward networks, and can result in better optimization with less sensitivity to the scale of the weights. 2 Recurrent Neural Nets as Feedforward Nets with Shared Weights We view Recurrent Neural Networks (RNNs) as feedforward networks with shared weights. We denote a general feedforward network with ReLU activations and shared weights is indicated by N(G, π, p) where G(V, E) is a directed acyclic graph over the set of nodes V that corresponds to units v ∈V in the network, including special subsets of input and output nodes Vin, Vout ⊂V , p ∈Rm is a parameter vector and π : E →{1, . . . , m} is a mapping from edges in G to parameters indices. For any edge e ∈E, the weight of the edge e is indicated by we = pπ(e). We refer to the set of edges that share the ith parameter pi by Ei = {e ∈E|π(e) = i}. That is, for any e1, e2 ∈Ei, π(e1) = π(e2) and hence we1 = we2 = pπ(e1). Such a feedforward network represents a function fN (G,π,p) : R|Vin| →R|Vout| as follows: For any input node v ∈Vin, its output hv is the corresponding coordinate of the input vector x ∈R|Vin|. For each internal node v, the output is defined recursively as hv = hP (u→v)∈E wu→v · hu i + where [z]+ = max(z, 0) is the ReLU activation function2. For output nodes v ∈Vout, no non-linearity is applied and their output hv = P (u→v)∈E wu→v · hu determines the corresponding coordinate of the computed function fN (G,π,p)(x). Since we will fix the graph G and the mapping π and learn the parameters p, we use the shorthand fp = fN (G,π,p) to refer to the function implemented by parameters p. The goal of training is to find parameters p that minimize some error functional L(fp) that depends on p only through the function fp. E.g. in supervised learning L(f) = E [loss(f(x), y)] and this is typically done by minimizing an empirical estimate of this expectation. If the mapping π is a one-to-one mapping, then there is no weight sharing and it corresponds to standard feedforward networks. On the other hand, weight sharing exists if π is a many-to-one mapping. Two well-known examples of feedforward networks with shared weights are convolutional and recurrent networks. We mostly use the general notation of feedforward networks with shared weights throughout the paper as this will be more general and simplifies the development and notation. However, when focusing on RNNs, it is helpful to discuss them using a more familiar notation which we briefly introduce next. Recurrent Neural Networks Time-unfolded RNNs are feedforward networks with shared weights that map an input sequence to an output sequence. Each input node corresponds to either a coordinate of the input vector at a particular time step or a hidden unit at time 0. Each output node also corresponds to a coordinate of the output at a specific time step. Finally, each internal node refers to some hidden unit at time t ≥1. When discussing RNNs, it is useful to refer to different layers and the values calculated at different time-steps. We use a notation for RNN structures in which the nodes are partitioned into layers and hi t denotes the output of nodes in layer i at time step t. Let x = (x1, . . . , xT ) be the input at different time steps where T is the maximum number of propagations through time and we refer to it as the length of the RNN. For 0 ≤i < d, let Wi in and Wi rec be the input and recurrent parameter matrices of layer i and Wout be the output parameter matrix. Table 1 shows forward computations for RNNs.The output of the function implemented by RNN can then be calculated as fW,t(x) = hd t . Note that in this notations, weight matrices Win, Wrec and Wout correspond to “free” parameters of the model that are shared in different time steps. 2The bias terms can be modeled by having an additional special node vbias that is connected to all internal and output nodes, where hvbias = 1. 2 3 Non-Saturating Activation Functions The choice of activation function for neural networks can have a large impact on optimization. We are particularly concerned with the distinction between “saturating” and “non-starting” activation functions. We consider only monotone activation functions and say that a function is “saturating” if it is bounded—this includes, e.g. sigmoid, hyperbolic tangent and the piecewise-linear ramp activation functions. Boundedness necessarily implies that the function values converge to finite values at negative and positive infinity, and hence asymptote to horizontal lines on both sides. That is, the derivative of the activation converges to zero as the input goes to both −∞and +∞. Networks with saturating activations therefore have a major shortcoming: the vanishing gradient problem [6]. The problem here is that the gradient disappears when the magnitude of the input to an activation is large (whether the unit is very “active” or very “inactive”) which makes the optimization very challenging. While sigmoid and hyperbolic tangent have historically been popular choices for fully connected feedforward and convolutional neural networks, more recent works have shown undeniable advantages of non-saturating activations such as ReLU, which is now the standard choice for fully connected and Convolutional networks [15, 10]. Non-saturating activations, including the ReLU, are typically still bounded from below and asymptote to a horizontal line, with a vanishing derivative, at −∞. But they are unbounded from above, enabling their derivative to remain bounded away from zero as the input goes to +∞. Using ReLUs enables gradients to not vanish along activated paths and thus can provide a stronger signal for training. However, for recurrent neural networks, using ReLU activations is challenging in a different way, as even a small change in the direction of the leading eigenvector of the recurrent weights could get amplified and potentially lead to the explosion in forward or backward propagation [1]. To understand this, consider a long path from an input in the first element of the sequence to an output of the last element, which passes through the same RNN edge at each step (i.e. through many edges in some Ei in the shared-parameter representation). The length of this path, and the number of times it passes through edges associated with a single parameter, is proportional to the sequence length, which could easily be a few hundred or more. The effect of this parameter on the path is therefore exponentiated by the sequence length, as are gradient updates for this parameter, which could lead to parameter explosion unless an extremely small step size is used. Understanding the geometry of RNNs with ReLUs could helps us deal with the above issues more effectively. We next investigate some properties of geometry of RNNs with ReLU activations. Invariances in Feedforward Nets with Shared Weights Feedforward networks (with or without shared weights) are highly over-parameterized, i.e. there are many parameter settings p that represent the same function fp. Since our true object of interest is the function f, and not the identity p of the parameters, it would be beneficial if optimization would depend only on fp and not get “distracted” by difference in p that does not affect fp. It is therefore helpful to study the transformations on the parameters that will not change the function presented by the network and come up with methods that their performance is not affected by such transformations. Definition 1. We say a network N is invariant to a transformation T if for any parameter setting p, fp = fT (p). Similarly, we say an update rule A is invariant to T if for any p, fA(p) = fA(T (p)). Invariances have also been studied as different mappings from the parameter space to the same function space [19] while we define the transformation as a mapping inside a fixed parameter space. A very important invariance in feedforward networks is node-wise rescaling [17]. For any internal node v and any scalar α > 0, we can multiply all incoming weights into v (i.e. wu→v for any (u →v) ∈E) by α and all the outgoing weights (i.e. wv→u for any (v →u) ∈E) by 1/α without changing the function computed by the network. Not all node-wise rescaling transformations can be applied in feedforward nets with shared weights. This is due to the fact that some weights are forced to be equal and therefore, we are only allowed to change them by the same scaling factor. Definition 2. Given a network N, we say an invariant transformation eT that is defined over edge weights (rather than parameters) is feasible for parameter mapping π if the shared weights remain equal after the transformation, i.e. for any i and for any e, e′ ∈Ei, eT (w)e = eT (w)e′. 3 𝑎 𝑎 𝑏 𝑏 𝑏𝑎 # 𝑎𝑏 # 1 1 𝑐𝑎 ⁄ 𝑐𝑏 # 𝑑𝑎 # 𝑑𝑏 # 1 𝑐 # 1 𝑑 # 1 𝑐 # 1 𝑑 # 1 1 𝑑𝑐 # 𝑐𝑑 # 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 T Figure 1: An example of invariances in an RNN with two hidden layers each of which has 2 hidden units. The dashed lines correspond to recurrent weights. The network on the left hand side is equivalent (i.e. represents the same function) to the network on the right for any nonzero α1 1 = a, α1 2 = b, α2 1 = c, α2 2 = d. Therefore, it is helpful to understand what are the feasible node-wise rescalings for RNNs. In the following theorem, we characterize all feasible node-wise invariances in RNNs. Theorem 1. For any α such that αi j > 0, any Recurrent Neural Network with ReLU activation is invariant to the transformation Tα ([Win, Wrec, Wout]) = [Tin,α (Win) , Trec,α (Wrec) , Tout,α (Wout)] where for any i, j, k: Tin,α(Win)i[j, k] = αi jWi in[j, k] i = 1, αi j/αi−1 k Wi in[j, k] 1 < i < d, (1) Trec,α(Wrec)i[j, k] = αi j/αi k Wi rec[j, k], Tout,α(Wout)[j, k] = 1/αd−1 k Wout[j, k]. Furthermore, any feasible node-wise rescaling transformation can be presented in the above form. The proofs of all theorems and lemmas are given in the supplementary material. The above theorem shows that there are many transformations under which RNNs represent the same function. An example of such invariances is shown in Fig. 1. Therefore, we would like to have optimization algorithms that are invariant to these transformations and in order to do so, we need to look at measures that are invariant to such mappings. 4 Path-SGD for Networks with Shared Weights As we discussed, optimization is inherently tied to a choice of geometry, here represented by a choice of complexity measure or “norm”3. Furthermore, we prefer using an invariant measure which could then lead to an invariant optimization method. In Section 4.1 we introduce the path-regularizer and in Section 4.2, the derived Path-SGD optimization algorithm for standard feed-forward networks. Then in Section 4.3 we extend these notions also to networks with shared weights, including RNNs, and present two invariant optimization algorithms based on it. In Section 4.4 we show how these can be implemented efficiently using forward and backward propagations. 4.1 Path-regularizer The path-regularizer is the sum over all paths from input nodes to output nodes of the product of squared weights along the path. To define it formally, let P be the set of directed paths from input to output units so that for any path ζ = ζ0, . . . , ζlen(ζ) ∈P of length len(ζ), we have that ζ0 ∈Vin, ζlen(ζ) ∈Vout and for any 0 ≤i ≤len(ζ) −1, (ζi →ζi+1) ∈E. We also abuse the notation and denote e ∈ζ if for some i, e = (ζi, ζi+1). Then the path regularizer can be written as: γ2 net(w) = X ζ∈P len(ζ)−1 Y i=0 w2 ζi→ζi+1 (2) Equivalently, the path-regularizer can be defined recursively on the nodes of the network as: γ2 v(w) = X (u→v)∈E γ2 u(w)w2 u→v , γ2 net(w) = X u∈Vout γ2 u(w) (3) 3The path-norm which we define is a norm on functions, not on weights, but as we prefer not getting into this technical discussion here, we use the term “norm” very loosely to indicate some measure of magnitude [18]. 4 4.2 Path-SGD for Feedforward Networks Path-SGD is an approximate steepest descent step with respect to the path-norm. More formally, for a network without shared weights, where the parameters are the weights themselves, consider the diagonal quadratic approximation of the path-regularizer about the current iterate w(t): ˆγ2 net(w(t) + ∆w) = γ2 net(w(t)) + D ∇γ2 net(w(t)), ∆w E + 1 2∆w⊤diag ∇2γ2 net(w(t)) ∆w (4) Using the corresponding quadratic norm ∥w −w′∥2 ˆγ2 net(w(t)+∆w) = 1 2 P e∈E ∂2γ2 net ∂w2e (we −w′ e)2, we can define an approximate steepest descent step as: w(t+1) = min w η D ∇L(w), w −w(t)E +
w −w(t)
2 ˆγ2 net(w(t)+∆w) . (5) Solving (5) yields the update: w(t+1) e = w(t) e − η κe(w(t)) ∂L ∂we (w(t)) where: κe(w) = 1 2 ∂2γ2 net(w) ∂w2e . (6) The stochastic version that uses a subset of training examples to estimate ∂L ∂wu→v (w(t)) is called Path-SGD [16]. We now show how Path-SGD can be extended to networks with shared weights. 4.3 Extending to Networks with Shared Weights When the networks has shared weights, the path-regularizer is a function of parameters p and therefore the quadratic approximation should also be with respect to the iterate p(t) instead of w(t) which results in the following update rule: p(t+1) = min p η D ∇L(p), p −p(t)E +
p −p(t)
ˆγ2 net(p(t)+∆p) . (7) where ∥p −p′∥2 ˆγ2 net(p(t)+∆p) = 1 2 Pm i=1 ∂2γ2 net ∂p2 i (pi −p′ i)2. Solving (7) gives the following update: p(t+1) i = p(t) i − η κi(p(t)) ∂L ∂pi (p(t)) where: κi(p) = 1 2 ∂2γ2 net(p) ∂p2 i . (8) The second derivative terms κi are specified in terms of their path structure as follows: Lemma 1. κi(p) = κ(1) i (p) + κ(2) i (p) where κ(1) i (p) = X e∈Ei X ζ∈P 1e∈ζ len(ζ)−1 Y j=0 e̸=(ζj →ζj+1) p2 π(ζj→ζj+1) = X e∈Ei κe(w), (9) κ(2) i (p) = p2 i X e1,e2∈Ei e1̸=e2 X ζ∈P 1e1,e2∈ζ len(ζ)−1 Y j=0 e1̸=(ζj →ζj+1) e2̸=(ζj →ζj+1) p2 π(ζj→ζj+1), (10) and κe(w) is defined in (6). The second term κ(2) i (p) measures the effect of interactions between edges corresponding to the same parameter (edges from the same Ei) on the same path from input to output. In particular, if for any path from an input unit to an output unit, no two edges along the path share the same parameter, then κ(2)(p) = 0. For example, for any feedforward or Convolutional neural network, κ(2)(p) = 0. But for RNNs, there certainly are multiple edges sharing a single parameter on the same path, and so we could have κ(2)(p) ̸= 0. The above lemma gives us a precise update rule for the approximate steepest descent with respect to the path-regularizer. The following theorem confirms that the steepest descent with respect to this regularizer is also invariant to all feasible node-wise rescaling for networks with shared weights. Theorem 2. For any feedforward networks with shared weights, the update (8) is invariant to all feasible node-wise rescalings. Moreover, a simpler update rule that only uses κ(1) i (p) in place of κi(p) is also invariant to all feasible node-wise rescalings. Equations (9) and (10) involve a sum over all paths in the network which is exponential in depth of the network. However, we next show that both of these equations can be calculated efficiently. 5 Epoch 0 50 100 150 200 Perplexity 0 100 200 300 400 500 SGD Path-SGD:5(1) Path-SGD:5(1)+5(2) Epoch 0 50 100 150 200 Perplexity 0 100 200 300 400 500 SGD Path-SGD:5(1) Path-SGD:5(1)+5(2) !(#) # !(%) # & ' = 400, , = 10 0.00014 ' = 400, , = 40 0.00022 ' = 100, , = 10 0.00037 ' = 100, , = 10 0.00048 Figure 2: Path-SGD with/without the second term in word-level language modeling on PTB. We use the standard split (929k training, 73k validation and 82k test) and the vocabulary size of 10k words. We initialize the weights by sampling from the uniform distribution with range [−0.1, 0.1]. The table on the left shows the ratio of magnitude of first and second term for different lengths T and number of hidden units H. The plots compare the training and test errors using a mini-batch of size 32 and backpropagating through T = 20 time steps and using a mini-batch of size 32 where the step-size is chosen by a grid search. Test Error Training Error 4.4 Simple and Efficient Computations for RNNs We show how to calculate κ(1) i (p) and κ(2) i (p) by considering a network with the same architecture but with squared weights: Theorem 3. For any network N(G, π, p), consider N(G, π, ˜p) where for any i, ˜pi = p2 i . Define the function g : R|Vin| →R to be the sum of outputs of this network: g(x) = P|Vout| i=1 f˜p(x)[i]. Then κ(1) and κ(2) can be calculated as follows where 1 is the all-ones input vector: κ(1)(p) = ∇˜pg(1), κ(2) i (p) = X (u→v),(u′→v′)∈Ei (u→v)̸=(u′→v′) ˜pi ∂g(1) ∂hv′(˜p) ∂hu′(˜p) ∂hv(˜p) hu(˜p). (11) In the process of calculating the gradient ∇˜pg(1), we need to calculate hu(˜p) and ∂g(1)/∂hv(˜p) for any u, v. Therefore, the only remaining term to calculate (besides ∇˜pg(1)) is ∂hu′(˜p)/∂hv(˜p). Recall that T is the length (maximum number of propagations through time) and d is the number of layers in an RNN. Let H be the number of hidden units in each layer and B be the size of the mini-batch. Then calculating the gradient of the loss at all points in the minibatch (the standard work required for any mini-batch gradient approach) requires time O(BdTH2). In order to calculate κ(1) i (p), we need to calculate the gradient ∇˜pg(1) of a similar network at a single input—so the time complexity is just an additional O(dTH2). The second term κ(2)(p) can also be calculated for RNNs in O(dTH2(T + H)). For an RNN, κ(2)(Win) = 0 and κ(2)(Wout) = 0 because only recurrent weights are shared multiple times along an input-output path. κ(2)(Wrec) can be written and calculated in the matrix form: κ(2)(Wi rec) = W′i rec ⊙ T −3 X t1=0 " W′i rec t1⊤ ⊙ T −t1−1 X t2=2 ∂g(1) ∂hi t1+t2+1(˜p) hi t2(˜p) ⊤ # where for any i, j, k we have W′i rec[j, k] = Wi rec[j, k] 2. The only terms that require extra computation are powers of Wrec which can be done in O(dTH3) and the rest of the matrix computations need O(dT 2H2). Therefore, the ratio of time complexity of calculating the first term and second term with respect to the gradient over mini-batch is O(1/B) and O((T + H)/B) respectively. Calculating only κ(1) i (p) is therefore very cheap with minimal per-minibatch cost, while calculating κ(2) i (p) might be expensive for large networks. Beyond the low computational cost, calculating κ(1) i (p) is also very easy to implement as it requires only taking the gradient with respect to a standard feed-forward calculation in a network with slightly modified weights—with most deep learning libraries it can be implemented very easily with only a few lines of code. 5 Experiments 5.1 The Contribution of the Second Term As we discussed in section 4.4, the second term κ(2) in the update rule can be computationally expensive for large networks. In this section we investigate the significance of the second term 6 0 15 30 45 number of Epochs 0.00 0.05 0.10 0.15 0.20 MSE Adding 100 IRNN RNN Path 0 80 160 240 number of Epochs 0.00 0.05 0.10 0.15 0.20 0.25 Adding 400 IRNN RNN Path 0 100 200 300 400 number of Epochs 0.00 0.05 0.10 0.15 0.20 Adding 750 IRNN RNN Path Figure 3: Test errors for the addition problem of different lengths. and show that at least in our experiments, the contribution of the second term is negligible. To compare the two terms κ(1) and κ(2), we train a single layer RNN with H = 200 hidden units for the task of word-level language modeling on Penn Treebank (PTB) Corpus [13]. Fig. 2 compares the performance of SGD vs. Path-SGD with/without κ(2). We clearly see that both versions of Path-SGD are performing very similarly and both of them outperform SGD significantly. This results in Fig. 2 suggest that the first term is more significant and therefore we can ignore the second term. To better understand the importance of the two terms, we compared the ratio of the norms
κ(2)
2 /
κ(1)
2 for different RNN lengths T and number of hidden units H. The table in Fig. 2 shows that the contribution of the second term is bigger when the network has fewer number of hidden units and the length of the RNN is larger (H is small and T is large). However, in many cases, it appears that the first term has a much bigger contribution in the update step and hence the second term can be safely ignored. Therefore, in the rest of our experiments, we calculate the Path-SGD updates only using the first term κ(1). 5.2 Synthetic Problems with Long-term Dependencies Training Recurrent Neural Networks is known to be hard for modeling long-term dependencies due to the gradient vanishing/exploding problem [6, 2]. In this section, we consider synthetic problems that are specifically designed to test the ability of a model to capture the long-term dependency structure. Specifically, we consider the addition problem and the sequential MNIST problem. Addition problem: The addition problem was introduced in [7]. Here, each input consists of two sequences of length T, one of which includes numbers sampled from the uniform distribution with range [0, 1] and the other sequence serves as a mask which is filled with zeros except for two entries. These two entries indicate which of the two numbers in the first sequence we need to add and the task is to output the result of this addition. Sequential MNIST: In sequential MNIST, each digit image is reshaped into a sequence of length 784, turning the digit classification task into sequence classification with long-term dependencies [12, 1]. For both tasks, we closely follow the experimental protocol in [12]. We train a single-layer RNN consisting of 100 hidden units with path-SGD, referred to as RNN-Path. We also train an RNN of the same size with identity initialization, as was proposed in [12], using SGD as our baseline model, referred to as IRNN. We performed grid search for the learning rates over {10−2, 10−3, 10−4} for both our model and the baseline. Non-recurrent weights were initialized from the uniform distribution with range [−0.01, 0.01]. Similar to [1], we found the IRNN to be fairly unstable (with SGD optimization typically diverging). Therefore for IRNN, we ran 10 different initializations and picked the one that did not explode to show its performance. In our first experiment, we evaluate Path-SGD on the addition problem. The results are shown in Fig. 3 with increasing the length T of the sequence: {100, 400, 750}. We note that this problem becomes much harder as T increases because the dependency between the output (the sum of two numbers) and the corresponding inputs becomes more distant. We also compare RNN-Path with the previously published results, including identity initialized RNN [12] (IRNN), unitary RNN [1] (uRNN), and np-RNN4 introduced by [22]. Table 2 shows the effectiveness of using Path-SGD. Perhaps more surprisingly, with the help of path-normalization, a simple RNN with the identity initialization is able to achieve a 0% error on the sequences of length 750, whereas all the other methods, including LSTMs, fail. This shows that Path-SGD may help stabilize the training and alleviate the gradient problem, so as to perform well on longer sequence. We next tried to model 4The original paper does not include any result for 750, so we implemented np-RNN for comparison. However, in our implementation the np-RNN is not able to even learn sequences of length of 200. Thus we put “>2” for length of 750. 7 Adding Adding Adding 100 400 750 sMNIST IRNN [12] 0 16.7 16.7 5.0 uRNN [1] 0 3 16.7 4.9 LSTM [1] 0 2 16.7 1.8 np-RNN[22] 0 2 >2 3.1 IRNN 0 0 16.7 7.1 RNN-Path 0 0 0 3.1 Table 2: Test error (MSE) for the adding problem with different input sequence lengths and test classification error for the sequential MNIST. PTB text8 RNN+smoothReLU [20] 1.55 HF-MRNN [14] 1.42 1.54 RNN-ReLU[11] 1.65 RNN-tanh[11] 1.55 TRec,β = 500[11] 1.48 RNN-ReLU 1.55 1.65 RNN-tanh 1.58 1.70 RNN-Path 1.47 1.58 LSTM 1.41 1.52 Table 3: Test BPC for PTB and text8. the sequences length of 1000, but we found that for such very long sequences RNNs, even with Path-SGD, fail to learn. Next, we evaluate Path-SGD on the Sequential MNIST problem. Table 2, right column, reports test error rates achieved by RNN-Path compared to the previously published results. Clearly, using Path-SGD helps RNNs achieve better generalization. In many cases, RNN-Path outperforms other RNN methods (except for LSTMs), even for such a long-term dependency problem. 5.3 Language Modeling Tasks In this section we evaluate Path-SGD on a language modeling task. We consider two datasets, Penn Treebank (PTB-c) and text8 5. PTB-c: We performed experiments on a tokenized Penn Treebank Corpus, following the experimental protocol of [11]. The training, validations and test data contain 5017k, 393k and 442k characters respectively. The alphabet size is 50, and each training sequence is of length 50. text8: The text8 dataset contains 100M characters from Wikipedia with an alphabet size of 27. We follow the data partition of [14], where each training sequence has a length of 180. Performance is evaluated using bits-per-character (BPC) metric, which is log2 of perplexity. Similar to the experiments on the synthetic datasets, for both tasks, we train a single-layer RNN consisting of 2048 hidden units with path-SGD (RNN-Path). Due to the large dimension of hidden space, SGD can take a fairly long time to converge. Instead, we use Adam optimizer [8] to help speed up the training, where we simply use the path-SGD gradient as input to the Adam optimizer. We also train three additional baseline models: a ReLU RNN with 2048 hidden units, a tanh RNN with 2048 hidden units, and an LSTM with 1024 hidden units, all trained using Adam. We performed grid search for learning rate over {10−3, 5 · 10−4, 10−4} for all of our models. For ReLU RNNs, we initialize the recurrent matrices from uniform[−0.01, 0.01], and uniform[−0.2, 0.2] for nonrecurrent weights. For LSTMs, we use orthogonal initialization [21] for the recurrent matrices and uniform[−0.01, 0.01] for non-recurrent weights. The results are summarized in Table 3. We also compare our results to an RNN that uses hidden activation regularizer [11] (TRec,β = 500), Multiplicative RNNs trained by Hessian Free methods [14] (HF-MRNN), and an RNN with smooth version of ReLU [20]. Table 3 shows that path-normalization is able to outperform RNN-ReLU and RNN-tanh, while at the same time shortening the performance gap between plain RNN and other more complicated models (e.g. LSTM by 57% on PTB and 54% on text8 datasets). This demonstrates the efficacy of path-normalized optimization for training RNNs with ReLU activation. 6 Conclusion We investigated the geometry of RNNs in a broader class of feedforward networks with shared weights and showed how understanding the geometry can lead to significant improvements on different learning tasks. Designing an optimization algorithm with a geometry that is well-suited for RNNs, we closed over half of the performance gap between vanilla RNNs and LSTMs. This is particularly useful for applications in which we seek compressed models with fast prediction time that requires minimum storage; and also a step toward bridging the gap between LSTMs and RNNs. Acknowledgments This research was supported in part by NSF RI/AF grant 1302662, an Intel ICRI-CI award, ONR Grant N000141310721, and ADeLAIDE grant FA8750-16C-0130-001. We thank Saizheng Zhang for sharing a base code for RNNs. 5http://mattmahoney.net/dc/textdata 8 References [1] Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. arXiv preprint arXiv:1511.06464, 2015. [2] Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [3] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder–decoder for statistical machine translation. In Proceeding of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724–1734, 2014. [4] Alex Graves and Navdeep Jaitly. Towards end-to-end speech recognition with recurrent neural networks. In Proceeding of the International Conference on Machine Learning (ICML), pages 1764–1772, 2014. [5] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In Proceeding of the International Conference on Learning Representations, 2016. [6] Sepp Hochreiter. The vanishing gradient problem during learning recurrent neural nets and problem solutions. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 6(02), 1998. [7] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8), 1997. [8] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceeding of the International Conference on Learning Representations, 2015. [9] Ryan Kiros, Ruslan Salakhutdinov, and Richard S Zemel. Unifying visual-semantic embeddings with multimodal neural language models. Transactions of the Association for Computational Linguistics, 2015. [10] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In Advances in neural information processing systems (NIPS), pages 1097–1105, 2012. [11] David Krueger and Roland Memisevic. Regularizing RNNs by stabilizing activations. In Proceeding of the International Conference on Learning Representations, 2016. [12] Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015. [13] Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. [14] Tomáš Mikolov, Ilya Sutskever, Anoop Deoras, Hai-Son Le, Stefan Kombrink, and J Cernocky. Subword language modeling with neural networks. (http://www.fit.vutbr.cz/ imikolov/rnnlm/char.pdf), 2012. [15] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the International Conference on Machine Learning (ICML), pages 807–814, 2010. [16] Behnam Neyshabur, Ruslan Salakhutdinov, and Nathan Srebro. Path-SGD: Path-normalized optimization in deep neural networks. In Advanced in Neural Information Processsing Systems (NIPS), 2015. [17] Behnam Neyshabur, Ryota Tomioka, Ruslan Salakhutdinov, and Nathan Srebro. Data-dependent path normalization in neural networks. In the International Conference on Learning Representations, 2016. [18] Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. In Proceeding of the 28th Conference on Learning Theory (COLT), 2015. [19] Yann Ollivier. Riemannian metrics for neural networks ii: recurrent networks and learning symbolic data sequences. Information and Inference, page iav007, 2015. [20] Marius Pachitariu and Maneesh Sahani. Regularization and nonlinearities for neural language models: when are they needed? arXiv preprint arXiv:1301.5650, 2013. [21] Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. In International Conference on Learning Representations, 2014. [22] Sachin S. Talathi and Aniket Vartak. Improving performance of recurrent neural network with relu nonlinearity. In the International Conference on Learning Representations workshop track, 2014. [23] Saizheng Zhang, Yuhuai Wu, Tong Che, Zhouhan Lin, Roland Memisevic, Ruslan Salakhutdinov, and Yoshua Bengio. Architectural complexity measures of recurrent neural networks. arXiv preprint arXiv:1602.08210, 2016. 9 | 2016 | 259 |
6,171 | Interpretable Distribution Features with Maximum Testing Power Wittawat Jitkrittum, Zoltán Szabó, Kacper Chwialkowski, Arthur Gretton wittawatj@gmail.com zoltan.szabo.m@gmail.com kacper.chwialkowski@gmail.com arthur.gretton@gmail.com Gatsby Unit, University College London Abstract Two semimetrics on probability distributions are proposed, given as the sum of differences of expectations of analytic functions evaluated at spatial or frequency locations (i.e, features). The features are chosen so as to maximize the distinguishability of the distributions, by optimizing a lower bound on test power for a statistical test using these features. The result is a parsimonious and interpretable indication of how and where two distributions differ locally. We show that the empirical estimate of the test power criterion converges with increasing sample size, ensuring the quality of the returned features. In real-world benchmarks on highdimensional text and image data, linear-time tests using the proposed semimetrics achieve comparable performance to the state-of-the-art quadratic-time maximum mean discrepancy test, while returning human-interpretable features that explain the test results. 1 Introduction We address the problem of discovering features of distinct probability distributions, with which they can most easily be distinguished. The distributions may be in high dimensions, can differ in non-trivial ways (i.e., not simply in their means), and are observed only through i.i.d. samples. One application for such divergence measures is to model criticism, where samples from a trained model are compared with a validation sample: in the univariate case, through the KL divergence (Cinzia Carota and Polson, 1996), or in the multivariate case, by use of the maximum mean discrepancy (MMD) (Lloyd and Ghahramani, 2015). An alternative, interpretable analysis of a multivariate difference in distributions may be obtained by projecting onto a discriminative direction, such that the Wasserstein distance on this projection is maximized (Mueller and Jaakkola, 2015). Note that both recent works require low dimensionality, either explicitly (in the case of Lloyd and Gharamani, the function becomes difficult to plot in more than two dimensions), or implicitly in the case of Mueller and Jaakkola, in that a large difference in distributions must occur in projection along a particular one-dimensional axis. Distances between distributions in high dimensions may be more subtle, however, and it is of interest to find interpretable, distinguishing features of these distributions. In the present paper, we take a hypothesis testing approach to discovering features which best distinguish two multivariate probability measures P and Q, as observed by samples X := {xi}n i=1 drawn independently and identically (i.i.d.) from P, and Y := {yi}n i=1 ⊂Rd from Q. Nonparametric two-sample tests based on RKHS distances (Eric et al., 2008; Fromont et al., 2012; Gretton et al., 2012a) or energy distances (Székely and Rizzo, 2004; Baringhaus and Franz, 2004) have as their test statistic an integral probability metric, the Maximum Mean Discrepancy (Gretton et al., 2012a; Sejdinovic et al., 2013). For this metric, a smooth witness function is computed, such that the amplitude is largest where the probability mass differs most (e.g. Gretton et al., 2012a, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1). Lloyd and Ghahramani (2015) used this witness function to compare the model output of the Automated Statistician (Lloyd et al., 2014) with a reference sample, yielding a visual indication of where the model fails. In high dimensions, however, the witness function cannot be plotted, and is less helpful. Furthermore, the witness function does not give an easily interpretable result for distributions with local differences in their characteristic functions. A more subtle shortcoming is that it does not provide a direct indication of the distribution features which, when compared, would maximize test power - rather, it is the witness function norm, and (broadly speaking) its variance under the null, that determine test power. Our approach builds on the analytic representations of probability distributions of Chwialkowski et al. (2015), where differences in expectations of analytic functions at particular spatial or frequency locations are used to construct a two-sample test statistic, which can be computed in linear time. Despite the differences in these analytic functions being evaluated at random locations, the analytic tests have greater power than linear time tests based on subsampled estimates of the MMD (Gretton et al., 2012b; Zaremba et al., 2013). Our first theoretical contribution, in Sec. 3, is to derive a lower bound on the test power, which can be maximized over the choice of test locations. We propose two novel tests, both of which significantly outperform the random feature choice of Chwialkowski et al.. The (ME) test evaluates the difference of mean embeddings at locations chosen to maximize the test power lower bound (i.e., spatial features); unlike the maxima of the MMD witness function, these features are directly chosen to maximize the distinguishability of the distributions, and take variance into account. The Smooth Characteristic Function (SCF) test uses as its statistic the difference of the two smoothed empirical characteristic functions, evaluated at points in the frequency domain so as to maximize the same criterion (i.e., frequency features). Optimization of the mean embedding kernels/frequency smoothing functions themselves is achieved on a held-out data set with the same consistent objective. As our second theoretical contribution in Sec. 3, we prove that the empirical estimate of the test power criterion asymptotically converges to its population quantity uniformly over the class of Gaussian kernels. Two important consequences follow: first, in testing, we obtain a more powerful test with fewer features. Second, we obtain a parsimonious and interpretable set of features that best distinguish the probability distributions. In Sec. 4, we provide experiments demonstrating that the proposed linear-time tests greatly outperform all previous linear time tests, and achieve performance that compares to or exceeds the more expensive quadratic-time MMD test (Gretton et al., 2012a). Moreover, the new tests discover features of text data (NIPS proceedings) and image data (distinct facial expressions) which have a clear human interpretation, thus validating our feature elicitation procedure in these challenging high-dimensional testing scenarios. 2 ME and SCF tests In this section, we review the ME and SCF tests (Chwialkowski et al., 2015) for two-sample testing. In Sec. 3, we will extend these approaches to learn features that optimize the power of these tests. Given two samples X := {xi}n i=1, Y := {yi}n i=1 ⊂Rd independently and identically distributed (i.i.d.) according to P and Q, respectively, the goal of a two-sample test is to decide whether P is different from Q on the basis of the samples. The task is formulated as a statistical hypothesis test proposing a null hypothesis H0 : P = Q (samples are drawn from the same distribution) against an alternative hypothesis H1 : P ̸= Q (the sample generating distributions are different). A test calculates a test statistic ˆλn from X and Y, and rejects H0 if ˆλn exceeds a predetermined test threshold (critical value). The threshold is given by the (1 −α)-quantile of the (asymptotic) distribution of ˆλn under H0 i.e., the null distribution, and α is the significance level of the test. ME test The ME test uses as its test statistic ˆλn, a form of Hotelling’s T-squared statistic, defined as ˆλn := nz⊤ n S−1 n zn, where zn := 1 n Pn i=1 zi, Sn := 1 n−1 Pn i=1(zi −zn)(zi −zn)⊤, and zi := (k(xi, vj) −k(yi, vj))J j=1 ∈RJ. The statistic depends on a positive definite kernel k : X × X →R (with X ⊆Rd), and a set of J test locations V = {vj}J j=1 ⊂Rd. Under H0, asymptotically ˆλn follows χ2(J), a chi-squared distribution with J degrees of freedom. The ME test rejects H0 if ˆλn > Tα, where the test threshold Tα is given by the (1 −α)-quantile of the asymptotic null distribution χ2(J). Although the distribution of ˆλn under H1 was not derived, Chwialkowski et al. (2015) showed that if k is analytic, integrable and characteristic (in the sense of Sriperumbudur et al. (2011)), under H1, ˆλn can be arbitrarily large as n →∞, allowing the test to correctly reject H0. 2 One can intuitively think of the ME test statistic as a squared normalized (by the inverse covariance S−1 n ) L2(X, VJ) distance of the mean embeddings (Smola et al., 2007) of the empirical measures Pn := 1 n Pn i=1 δxi, and Qn := 1 n Pn i=1 δyi where VJ := 1 J PJ i=1 δvi, and δx is the Dirac measure concentrated at x. The unnormalized counterpart (i.e., without S−1 n ) was shown by Chwialkowski et al. (2015) to be a metric on the space of probability measures for any V. Both variants behave similarly for two-sample testing, with the normalized version being a semimetric having a more computationally tractable null distribution, i.e., χ2(J). SCF test The SCF uses the test statistic which has the same form as the ME test statistic with a modified zi := [ˆl(xi) sin(x⊤ i vj) −ˆl(yi) sin(y⊤ i vj), ˆl(xi) cos(x⊤ i vj) −ˆl(yi) cos(y⊤ i vj)]J j=1 ∈ R2J, where ˆl(x) = R Rd exp(−iu⊤x)l(u) du is the Fourier transform of l(x), and l : Rd →R is an analytic translation-invariant kernel i.e., l(x −y) defines a positive definite kernel for x and y. In contrast to the ME test defining the statistic in terms of spatial locations, the locations V = {vj}J j=1 ⊂Rd in the SCF test are in the frequency domain. As a brief description, let ϕP (w) := Ex∼P exp(iw⊤x) be the characteristic function of P. Define a smooth characteristic function as φP (v) = R Rd ϕP (w)l(v −w) dw (Chwialkowski et al., 2015, Definition 2). Then, similar to the ME test, the statistic defined by the SCF test can be seen as a normalized (by S−1 n ) version of L2(X, VJ) distance of empirical φP (v) and φQ(v). The SCF test statistic has asymptotic distribution χ2(2J) under H0. We will use J′ to refer to the degrees of freedom of the chi-squared distribution i.e., J′ = J for the ME test, and J′ = 2J for the SCF test. In this work, we modify the statistic with a regularization parameter γn > 0, giving ˆλn := nz⊤ n (Sn + γnI)−1 zn, for stability of the matrix inverse. Using multivariate Slutsky’s theorem, under H0, ˆλn still asymptotically follows χ2(J′) provided that γn →0 as n →∞. 3 Lower bound on test power, consistency of empirical power statistic This section contains our main results. We propose to optimize the test locations V and kernel parameters (jointly referred to as θ) by maximizing a lower bound on the test power in Proposition 1. This criterion offers a simple objective function for fast parameter tuning. The bound may be of independent interest in other Hotelling’s T-squared statistics, since apart from the Gaussian case (e.g. Bilodeau and Brenner, 2008, Ch. 8), the characterization of such statistics under the alternative distribution is challenging. The optimization procedure is given in Sec. 4. We use Exy as a shorthand for Ex∼P Ey∼Q and let ∥· ∥F be the Frobenius norm. Proposition 1 (Lower bound on ME test power). Let K be a uniformly bounded (i.e., ∃B < ∞ such that supk∈K sup(x,y)∈X 2 |k(x, y)| ≤B) family of k : X × X →R measurable kernels. Let V be a collection in which each element is a set of J test locations. Assume that ˜c := supV∈V,k∈K ∥Σ−1∥F < ∞. Then, the test power P ˆλn ≥Tα of the ME test satisfies P ˆλn ≥Tα ≥L(λn) where L(λn) := 1 −2e−ξ1(λn−Tα)2/n −2e −[γn(λn−Tα)(n−1)−ξ2n]2 ξ3n(2n−1)2 −2e−[(λn−Tα)/3−c3nγn]2γ2 n/ξ4, and c3, ξ1, . . . ξ4 are positive constants depending on only B, J and ˜c. The parameter λn := nµ⊤Σ−1µ is the population counterpart of ˆλn := nz⊤ n (Sn + γnI)−1 zn where µ = Exy[z1] and Σ = Exy[(z1 −µ)(z1 −µ)⊤]. For large n, L(λn) is increasing in λn. Proof (sketch). The idea is to construct a bound for |ˆλn −λn| which involves bounding ∥zn −µ∥2 and ∥Sn −Σ∥F separately using Hoeffding’s inequality. The result follows after a reparameterization of the bound on P(|ˆλn −λn| ≥t) to have P ˆλn ≥Tα . See Sec. F for details. Proposition 1 suggests that for large n it is sufficient to maximize λn to maximize a lower bound on the ME test power. The same conclusion holds for the SCF test (result omitted due to space constraints). Assume that k is characteristic (Sriperumbudur et al., 2011). It can be shown that λn = 0 if and only if P = Q i.e., λn is a semimetric for P and Q. In this sense, one can see λn as encoding the ease of rejecting H0. The higher λn, the easier for the test to correctly reject H0 when H1 holds. This observation justifies the use of λn as a maximization objective for parameter tuning. 3 Contributions The statistic ˆλn for both ME and SCF tests depends on a set of test locations V and a kernel parameter σ. We propose to set θ := {V, σ} = arg maxθ λn = arg maxθ µ⊤Σ−1µ. The optimization of θ brings two benefits: first, it significantly increases the probability of rejecting H0 when H1 holds; second, the learned test locations act as discriminative features allowing an interpretation of how the two distributions differ. We note that optimizing parameters by maximizing a test power proxy (Gretton et al., 2012b) is valid under both H0 and H1 as long as the data used for parameter tuning and for testing are disjoint. If H0 holds, then θ = arg max 0 is arbitrary. Since the test statistic asymptotically follows χ2(J′) for any θ, the optimization does not change the null distribution. Also, the rejection threshold Tα depends on only J′ and is independent of θ. To avoid creating a dependency between θ and the data used for testing (which would affect the null distribution), we split the data into two disjoint sets. Let D := (X, Y) and Dtr, Dte ⊂D such that Dtr ∩Dte = ∅and Dtr ∪Dte = D. In practice, since µ and Σ are unknown, we use ˆλtr n/2 in place of λn, where ˆλtr n/2 is the test statistic computed on the training set Dtr. For simplicity, we assume that each of Dtr and Dte has half of the samples in D. We perform an optimization of θ with gradient ascent algorithm on ˆλtr n/2(θ). The actual two-sample test is performed using the test statistic ˆλte n/2(θ) computed on Dte. The full procedure from tuning the parameters to the actual two-sample test is summarized in Sec. A. Since we use an empirical estimate ˆλtr n/2 in place of λn for parameter optimization, we give a finitesample bound in Theorem 2 guaranteeing the convergence of z⊤ n (Sn + γnI)−1zn to µ⊤Σ−1µ as n increases, uniformly over all kernels k ∈K (a family of uniformly bounded kernels) and all test locations in an appropriate class. Kernel classes satisfying conditions of Theorem 2 include the widely used isotropic Gaussian kernel class Kg = kσ : (x, y) 7→exp −(2σ2)−1∥x −y∥2 | σ > 0 , and the more general full Gaussian kernel class Kfull = {k : (x, y) 7→exp −(x −y)⊤A(x −y) | A is positive definite} (see Lemma 5 and Lemma 6). Theorem 2 (Consistency of ˆλn in the ME test). Let X ⊆Rd be a measurable set, and V be a collection in which each element is a set of J test locations. All suprema over V and k are to be understood as supV∈V and supk∈K respectively. For a class of kernels K on X ⊆Rd, define F1 := {x 7→k(x, v) | k ∈K, v ∈X}, F2 := {x 7→k(x, v)k(x, v′) | k ∈K, v, v′ ∈X}, (1) F3 := {(x, y) 7→k(x, v)k(y, v′) | k ∈K, v, v′ ∈X}. (2) Assume that (1) K is a uniformly bounded (by B) family of k : X × X →R measurable kernels, (2) ˜c := supV,k ∥Σ−1∥F < ∞, and (3) Fi = {fθi | θi ∈Θi} is VC-subgraph with VC-index V C(Fi), and θ 7→fθi(m) is continuous (∀m, i = 1, 2, 3). Let c1 := 4B2J √ J˜c, c2 := 4B √ J˜c, and c3 := 4B2J˜c2. Let Ci-s (i = 1, 2, 3) be the universal constants associated to Fi-s according to Theorem 2.6.7 in van der Vaart and Wellner (2000). Then for any δ ∈(0, 1) with probability at least 1 −δ, sup V,k z⊤ n (Sn + γnI)−1zn −µ⊤Σ−1µ ≤2TF1 2 γn c1BJ 2n −1 n −1 + c2 √ J + 2 γn c1J(TF2 + TF3) + 8 γn c1B2J n −1 + c3γn, where TFj = 16 √ 2Bζj √n 2 q log Cj × V C(Fj)(16e)V C(Fj) + p 2π[V C(Fj) −1] 2 ! + Bζj r 2 log(5/δ) n , for j = 1, 2, 3 and ζ1 = 1, ζ2 = ζ3 = 2. Proof (sketch). The idea is to lower bound the difference with an expression involving supV,k ∥zn − µ∥2 and supV,k ∥Sn −Σ∥F . These two quantities can be seen as suprema of empirical processes, and can be bounded by Rademacher complexities of their respective function classes (i.e., F1, F2, and F3). Finally, the Rademacher complexities can be upper bounded using Dudley entropy bound and VC subgraph properties of the function classes. Proof details are given in Sec. D. Theorem 2 implies that if we set γn = O(n−1/4), then we have supV,k z⊤ n (Sn + γnI)−1zn −µ⊤Σ−1µ = Op(n−1/4) as the rate of convergence. Both 4 Proposition 1 and Theorem 2 require ˜c := supV∈V,k∈K ∥Σ−1∥F < ∞as a precondition. To guarantee that ˜c < ∞, a concrete construction of K is the isotropic Gaussian kernel class Kg, where σ is constrained to be in a compact set. Also, consider V := {V | any two locations are at least ϵ distance apart, and all test locations have their norms bounded by ζ} for some ϵ, ζ > 0. Then, for any non-degenerate P, Q, we have ˜c < ∞since (σ, V) 7→λn is continuous, and thus attains its supremum over compact sets K and V. 4 Experiments Table 1: Four toy problems. H0 holds only in SG. Data P Q SG N(0d, Id) N(0d, Id) GMD N(0d, Id) N((1, 0, . . . , 0)⊤, Id) GVD N(0d, Id) N(0d, diag(2, 1, . . . , 1)) Blobs Gaussian mixtures in R2 as studied in Chwialkowski et al. (2015); Gretton et al. (2012b). −10 −5 0 5 10 −10 −5 0 5 10 Blobs data. Sample from P. −10 −5 0 5 10 −10 −5 0 5 10 Blobs data. Sample from Q. In this section, we demonstrate the effectiveness of the proposed methods on both toy and real problems. We consider the isotropic Gaussian kernel class Kg in all kernel-based tests. We study seven two-sample test algorithms. For the SCF test, we set ˆl(x) = k(x, 0). Denote by MEfull and SCF-full the ME and SCF tests whose test locations and the Gaussian width σ are fully optimized using gradient ascent on a separate training sample (Dtr) of the same size as the test set (Dte). ME-grid and SCF-grid are as in Chwialkowski et al. (2015) where only the Gaussian width is optimized by a grid search,1and the test locations are randomly drawn from a multivariate normal distribution. MMD-quad (quadratic-time) and MMD-lin (linear-time) refer to the nonparametric tests based on maximum mean discrepancy of Gretton et al. (2012a), where to ensure a fair comparison, the Gaussian kernel width is also chosen so as to maximize a criterion for the test power on training data, following the same principle as (Gretton et al., 2012b). For MMDquad, since its null distribution is given by an infinite sum of weighted chi-squared variables (no closed-form quantiles), in each trial we randomly permute the two samples 400 times to approximate the null distribution. Finally, T 2 is the standard two-sample Hotelling’s T-squared test, which serves as a baseline with Gaussian assumptions on P and Q. In all the following experiments, each problem is repeated for 500 trials. For toy problems, new samples are generated from the specified P, Q distributions in each trial. For real problems, samples are partitioned randomly into training and test sets in each trial. In all of the simulations, we report an empirical estimate of P(ˆλte n/2 ≥Tα) which is the proportion of the number of times the statistic ˆλte n/2 is above Tα. This quantity is an estimate of type-I error under H0, and corresponds to test power when H1 is true. We set α = 0.01 in all the experiments. All the code and preprocessed data are available at https://github.com/wittawatj/interpretable-test. Optimization The parameter tuning objective ˆλtr n/2(θ) is a function of θ consisting of one real-valued σ and J test locations each of d dimensions. The parameters θ can thus be regarded as a Jd + 1 Euclidean vector. We take the derivative of ˆλtr n/2(θ) with respect to θ, and use gradient ascent to maximize it. J is pre-specified and fixed. For the ME test, we initialize the test locations with realizations from two multivariate normal distributions fitted to samples from P and Q; this ensures that the initial locations are well supported by the data. For the SCF test, initialization using the standard normal distribution is found to be sufficient. The parameter γn is not optimized; we set the regularization parameter γn to be as small as possible while being large enough to ensure that (Sn + γnI)−1 can be stably computed. We emphasize that both the optimization and testing are linear in n. The testing cost O(J3 + J2n + dJn) and the optimization costs O(J3 + dJ2n) per gradient ascent iteration. Runtimes of all methods are reported in Sec. C in the appendix. 1. Informative features: simple demonstration We begin with a demonstration that the proxy ˆλtr n/2(θ) for the test power is informative for revealing the difference of the two samples in the ME 1Chwialkowski et al. (2015) chooses the Gaussian width that minimizes the median of the p-values, a heuristic that does not directly address test power. Here, we perform a grid search to choose the best Gaussian width by maximizing ˆλtr n/2 as done in ME-full and SCF-full. 5 1000 2000 3000 4000 5000 Test sample size 0.000 0.005 0.010 0.015 0.020 Type-I error (a) SG. d = 50. 1000 2000 3000 4000 5000 Test sample size 0.0 0.2 0.4 0.6 0.8 1.0 Test power (b) GMD. d = 100. 1000 2000 3000 4000 5000 Test sample size 0.0 0.2 0.4 0.6 0.8 1.0 Test power (c) GVD. d = 50. 1000 2000 3000 4000 5000 Test sample size 0.0 0.2 0.4 0.6 0.8 1.0 Test power ME-full ME-grid SCF-full SCF-grid MMD-quad MMD-lin T 2 (d) Blobs. Figure 2: Plots of type-I error/test power against the test sample size nte in the four toy problems. test. We consider the Gaussian Mean Difference (GMD) problem (see Table 1), where both P and Q are two-dimensional normal distributions with the difference in means. We use J = 2 test locations v1 and v2, where v1 is fixed to the location indicated by the black triangle in Fig. 1. The contour plot shows v2 7→ˆλtr n/2(v1, v2). Fig. 1 (top) suggests that ˆλtr n/2 is maximized when v2 is placed in either of the two regions that captures the difference of the two samples i.e., the region in which the probability masses of P and Q have less overlap. Fig. 1 (bottom), we consider placing v1 in one of the two key regions. In this case, the contour plot shows that v2 should be placed in the other region to maximize ˆλtr n/2, implying that placing multiple test locations in the same neighborhood will not increase the discriminability. The two modes on the left and right suggest two ways to place the test location in a region that reveals the difference. The non-convexity of the ˆλtr n/2 is an indication of many informative ways to detect differences of P and Q, rather than a drawback. A convex objective would not capture this multimodality. v2 ↦^¸tr n=2(v1; v2) 0 20 40 60 80 100 120 140 160 v2 ↦^¸tr n=2(v1; v2) 128 136 144 152 160 168 176 184 192 Figure 1: A contour plot of ˆλtr n/2 as a function of v2 when J = 2 and v1 is fixed (black triangle). The objective ˆλtr n/2 is high in the regions that reveal the difference of the two samples. 2. Test power vs. sample size n We now demonstrate the rate of increase of test power with sample size. When the null hypothesis holds, the type-I error stays at the specified level α. We consider the following four toy problems: Same Gaussian (SG), Gaussian mean difference (GMD), Gaussian variance difference (GVD), and Blobs. The specifications of P and Q are summarized in Table. 1. In the Blobs problem, P and Q are defined as a mixture of Gaussian distributions arranged on a 4 × 4 grid in R2. This problem is challenging as the difference of P and Q is encoded at a much smaller length scale compared to the global structure (Gretton et al., 2012b). Specifically, the eigenvalue ratio for the covariance of each Gaussian distribution is 2.0 in P, and 1.0 in Q. We set J = 5 in this experiment. The results are shown in Fig. 2 where type-I error (for SG problem), and test power (for GMD, GVD and Blobs problems) are plotted against test sample size. A number of observations are worth noting. In the SG problem, we see that the type-I error roughly stays at the specified level: the rate of rejection of H0 when it is true is roughly at the specified level α = 0.01. GMD with 100 dimensions turns out to be an easy problem for all the tests except MMD-lin. In the GVD and Blobs cases, ME-full and SCFfull achieve substantially higher test power than ME-grid and SCF-grid, respectively, suggesting a clear advantage from optimizing the test locations. Remarkably, ME-full consistently outperforms the quadratic-time MMD across all test sample sizes in the GVD case. When the difference of P and Q is subtle as in the Blobs problem, ME-grid, which uses randomly drawn test locations, can perform poorly (see Fig. 2d) since it is unlikely that randomly drawn locations will be placed in the key regions that reveal the difference. In this case, optimization of the test locations can considerably boost the test power (see ME-full in Fig. 2d). Note also that SCF variants perform significantly better than ME variants on the Blobs problem, as the difference in P and Q is localized in the frequency domain; ME-full and ME-grid would require many more test locations in the spatial domain to match the test powers of the SCF variants. For the same reason, SCF-full does much better than the quadratic-time MMD across most sample sizes, as the latter represents a weighted distance between characteristic functions integrated across the entire frequency domain (Sriperumbudur et al., 2010, Corollary 4). 6 5 300 600 900 1200 1500 Dimension 0.000 0.005 0.010 0.015 0.020 0.025 Type-I error (a) SG 5 300 600 900 1200 1500 Dimension 0.0 0.2 0.4 0.6 0.8 1.0 Test power (b) GMD 5 100 200 300 400 500 Dimension 0.0 0.2 0.4 0.6 0.8 1.0 Test power ME-full ME-grid SCF-full SCF-grid MMD-lin T 2 (c) GVD Figure 3: Plots of type-I error/test power against the dimensions d in the four toy problems in Table 1. Table 2: Type-I errors and powers of various tests in the problem of distinguishing NIPS papers from two categories. α = 0.01. J = 1. nte denotes the test sample size of each of the two samples. Problem nte ME-full ME-grid SCF-full SCF-grid MMD-quad MMD-lin Bayes-Bayes 215 .012 .018 .012 .004 .022 .008 Bayes-Deep 216 .954 .034 .688 .180 .906 .262 Bayes-Learn 138 .990 .774 .836 .534 1.00 .238 Bayes-Neuro 394 1.00 .300 .828 .500 .952 .972 Learn-Deep 149 .956 .052 .656 .138 .876 .500 Learn-Neuro 146 .960 .572 .590 .360 1.00 .538 3. Test power vs. dimension d We next investigate how the dimension (d) of the problem can affect type-I errors and test powers of ME and SCF tests. We consider the same artificial problems: SG, GMD and GVD. This time, we fix the test sample size to 10000, set J = 5, and vary the dimension. The results are shown in Fig. 3. Due to the large dimensions and sample size, it is computationally infeasible to run MMD-quad. We observe that all the tests except the T-test can maintain type-I error at roughly the specified significance level α = 0.01 as dimension increases. The type-I performance of the T-test is incorrect at large d because of the difficulty in accurately estimating the covariance matrix in high dimensions. It is interesting to note the high performance of ME-full in the GMD problem in Fig. 3b. ME-full achieves the maximum test power of 1.0 throughout and matches the power T-test, in spite of being nonparametric and making no assumption on P and Q (the T-test is further advantaged by its excessive Type-I error). However, this is true only with optimization of the test locations. This is reflected in the test power of ME-grid in Fig. 3b which drops monotonically as dimension increases, highlighting the importance of test location optimization. The performance of MMD-lin degrades quickly with increasing dimension, as expected from Ramdas et al. (2015). 4. Distinguishing articles from two categories We now turn to performance on real data. We first consider the problem of distinguishing two categories of publications at the conference on Neural Information Processing Systems (NIPS). Out of 5903 papers published in NIPS from 1988 to 2015, we manually select disjoint subsets related to Bayesian inference (Bayes), neuroscience (Neuro), deep learning (Deep), and statistical learning theory (Learn) (see Sec. B). Each paper is represented as a bag of words using TF-IDF (Manning et al., 2008) as features. We perform stemming, remove all stop words, and retain only nouns. A further filtering of document-frequency (DF) of words that satisfies 5 ≤DF ≤2000 yields approximately 5000 words from which 2000 words (i.e., d = 2000 dimensions) are randomly selected. See Sec. B for more details on the preprocessing. For ME and SCF tests, we use only one test location i.e., set J = 1. We perform 1000 permutations to approximate the null distribution of MMD-quad in this and the following experiments. Type-I errors and test powers are summarized in Table. 2. The first column indicates the categories of the papers in the two samples. In Bayes-Bayes problem, papers on Bayesian inference are randomly partitioned into two samples in each trial. This task represents a case in which H0 holds. Among all the linear-time tests, we observe that ME-full has the highest test power in all the tasks, attaining a maximum test power of 1.0 in the Bayes-Neuro problem. This high performance assures that although different test locations V may be selected in different trials, these locations are each informative. It is interesting to observe that ME-full has performance close to or better than MMD-quad, which requires O(n2) runtime complexity. Besides clear advantages of interpretability and linear runtime of the proposed tests, these results suggest that evaluating the differences in expectations of analytic functions at particular locations can yield an equally powerful test at a much lower cost, as opposed to 7 Table 3: Type-I errors and powers in the problem of distinguishing positive (+) and negative (-) facial expressions. α = 0.01. J = 1. Problem nte ME-full ME-grid SCF-full SCF-grid MMD-quad MMD-lin ± vs. ± 201 .010 .012 .014 .002 .018 .008 + vs. − 201 .998 .656 1.00 .750 1.00 .578 computing the RKHS norm of the witness function as done in MMD. Unlike Blobs, however, Fourier features are less powerful in this setting. We further investigate the interpretability of the ME test by the following procedure. For the learned test location vt ∈Rd (d = 2000) in trial t, we construct ˜vt = (˜vt 1, . . . , ˜vt d) such that ˜vt j = |vt j|. Let ηt j ∈{0, 1} be an indicator variable taking value 1 if ˜vt j is among the top five largest for all j ∈{1, . . . , d}, and 0 otherwise. Define ηj := P t ηt j as a proxy indicating the significance of word j i.e., ηj is high if word j is frequently among the top five largest as measured by ˜vt j. The top seven words as sorted in descending order by ηj in the Bayes-Neuro problem are spike, markov, cortex, dropout, recurr, iii, gibb, showing that the learned test locations are highly interpretable. Indeed, “markov” and “gibb” (i.e., stemmed from Gibbs) are discriminative terms in Bayesian inference category, and “spike” and “cortex” are key terms in neuroscience. We give full lists of discriminative terms learned in all the problems in Sec. B.1. To show that not all the randomly selected 2000 terms are informative, if the definition of ηt j is modified to consider the least important words (i.e., ηj is high if word j is frequently among the top five smallest as measured by ˜vt j), we instead obtain circumfer, bra, dominiqu, rhino, mitra, kid, impostor, which are not discriminative. (a) HA (b) NE (c) SU (d) AF (e) AN (f) DI (g) v1 Figure 4: (a)-(f): Six facial expressions of actor AM05 in the KDEF data. (g): Average across trials of the learned test locations v1. 5. Distinguishing positive and negative emotions In the final experiment, we study how well ME and SCF tests can distinguish two samples of photos of people showing positive and negative facial expressions. Our emphasis is on the discriminative features of the faces identified by ME test showing how the two groups differ. For this purpose, we use Karolinska Directed Emotional Faces (KDEF) dataset (Lundqvist et al., 1998) containing 5040 aligned face images of 70 amateur actors, 35 females and 35 males. We use only photos showing front views of the faces. In the dataset, each actor displays seven expressions: happy (HA), neutral (NE), surprised (SU), sad (SA), afraid (AF), angry (AN), and disgusted (DI). We assign HA, NE, and SU faces into the positive emotion group (i.e., samples from P), and AF, AN and DI faces into the negative emotion group (samples from Q). We denote this problem as “+ vs. −”. Examples of six facial expressions from one actor are shown in Fig. 4. Photos of the SA group are unused to keep the sizes of the two samples the same. Each image of size 562 × 762 pixels is cropped to exclude the background, resized to 48 × 34 = 1632 pixels (d), and converted to grayscale. We run the tests 500 times with the same setting used previously i.e., Gaussian kernels, and J = 1. The type-I errors and test powers are shown in Table 3. In the table, “± vs. ±” is a problem in which all faces expressing the six emotions are randomly split into two samples of equal sizes i.e., H0 is true. Both ME-full and SCF-full achieve high test powers while maintaining the correct type-I errors. As a way to interpret how positive and negative emotions differ, we take an average across trials of the learned test locations of ME-full in the “+ vs. −” problem. This average is shown in Fig. 4g. We see that the test locations faithfully capture the difference of positive and negative emotions by giving more weights to the regions of nose, upper lip, and nasolabial folds (smile lines), confirming the interpretability of the test in a high-dimensional setting. Acknowledgement We thank the Gatsby Charitable Foundation for the financial support. 8 References L. Baringhaus and C. Franz. On a new multivariate two-sample test. Journal of Multivariate Analysis, 88: 190–206, 2004. M. Bilodeau and D. Brenner. Theory of multivariate statistics. Springer Science & Business Media, 2008. S. Bird, E. Klein, and E. Loper. Natural Language Processing with Python. O’Reilly Media, 1st edition, 2009. O. Bousquet. New approaches to statistical learning theory. Annals of the Institute of Statistical Mathematics, 55:371–389, 2003. K. Chwialkowski, A. Ramdas, D. Sejdinovic, and A. Gretton. Fast two-sample testing with analytic representations of probability measures. In NIPS, pages 1972–1980, 2015. G. P. Cinzia Carota and N. G. Polson. Diagnostic measures for model criticism. Journal of the American Statistical Association, 91(434):753–762, 1996. M. Eric, F. R. Bach, and Z. Harchaoui. Testing for homogeneity with kernel Fisher discriminant analysis. In NIPS, pages 609–616. 2008. M. Fromont, B. Laurent, M. Lerasle, and P. Reynaud-Bouret. Kernels based tests with non-asymptotic bootstrap approaches for two-sample problems. In COLT, pages 23.1–23.22, 2012. A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola. A kernel two-sample test. Journal of Machine Learning Research, 13:723–773, 2012a. A. Gretton, D. Sejdinovic, H. Strathmann, S. Balakrishnan, M. Pontil, K. Fukumizu, and B. K. Sriperumbudur. Optimal kernel choice for large-scale two-sample tests. In NIPS, pages 1205–1213, 2012b. M. R. Kosorok. Introduction to Empirical Processes and Semiparametric Inference. Springer, 2008. J. R. Lloyd and Z. Ghahramani. Statistical model criticism using kernel two sample tests. In NIPS, pages 829–837, 2015. J. R. Lloyd, D. Duvenaud, R. Grosse, J. B. Tenenbaum, and Z. Ghahramani. Automatic construction and Natural-Language description of nonparametric regression models. In AAAI, pages 1242–1250, 2014. D. Lundqvist, A. Flykt, and A. Öhman. The Karolinska directed emotional faces-KDEF. Technical report, ISBN 91-630-7164-9, 1998. C. D. Manning, P. Raghavan, and H. Schütze. Introduction to information retrieval. Cambridge University Press, 2008. J. Mueller and T. Jaakkola. Principal differences analysis: Interpretable characterization of differences between distributions. In NIPS, pages 1693–1701, 2015. A. Ramdas, S. Jakkam Reddi, B. Póczos, A. Singh, and L. Wasserman. On the decreasing power of kernel and distance based nonparametric hypothesis tests in high dimensions. In AAAI, pages 3571–3577, 2015. D. Sejdinovic, B. Sriperumbudur, A. Gretton, and K. Fukumizu. Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Annals of Statistics, 41(5):2263–2291, 2013. A. Smola, A. Gretton, L. Song, and B. Schölkopf. A Hilbert space embedding for distributions. In ALT, pages 13–31, 2007. N. Srebro and S. Ben-David. Learning bounds for support vector machines with learned kernels. In COLT, pages 169–183, 2006. B. Sriperumbudur, A. Gretton, K. Fukumizu, B. Schoelkopf, and G. Lanckriet. Hilbert space embeddings and metrics on probability measures. Journal of Machine Learning Research, 11:1517–1561, 2010. B. K. Sriperumbudur, K. Fukumizu, and G. R. Lanckriet. Universality, characteristic kernels and RKHS embedding of measures. The Journal of Machine Learning Research, 12:2389–2410, 2011. I. Steinwart and A. Christmann. Support Vector Machines. Springer, 2008. G. Székely and M. Rizzo. Testing for equal distributions in high dimension. InterStat, (5), 2004. A. van der Vaart and J. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics (Springer Series in Statistics). Springer, 2000. W. Zaremba, A. Gretton, and M. Blaschko. B-test: A non-parametric, low variance kernel two-sample test. In NIPS, pages 755–763, 2013. 9 | 2016 | 26 |
6,172 | Communication-Optimal Distributed Clustering∗ Jiecao Chen Indiana University Bloomington, IN 47401 jiecchen@indiana.edu He Sun University of Bristol Bristol, BS8 1UB, UK h.sun@bristol.ac.uk David P. Woodruff IBM Research Almaden San Jose, CA 95120 dpwoodru@us.ibm.com Qin Zhang Indiana University Bloomington, IN 47401 qzhangcs@indiana.edu Abstract Clustering large datasets is a fundamental problem with a number of applications in machine learning. Data is often collected on different sites and clustering needs to be performed in a distributed manner with low communication. We would like the quality of the clustering in the distributed setting to match that in the centralized setting for which all the data resides on a single site. In this work, we study both graph and geometric clustering problems in two distributed models: (1) a point-to-point model, and (2) a model with a broadcast channel. We give protocols in both models which we show are nearly optimal by proving almost matching communication lower bounds. Our work highlights the surprising power of a broadcast channel for clustering problems; roughly speaking, to spectrally cluster n points or n vertices in a graph distributed across s servers, for a worst-case partitioning the communication complexity in a point-to-point model is n · s, while in the broadcast model it is n + s. A similar phenomenon holds for the geometric setting as well. We implement our algorithms and demonstrate this phenomenon on real life datasets, showing that our algorithms are also very efficient in practice. 1 Introduction Clustering is a fundamental task in machine learning with widespread applications in data mining, computer vision, and social network analysis. Example applications of clustering include grouping similar webpages by search engines, finding users with common interests in a social network, and identifying different objects in a picture or video. For these applications, one can model the objects that need to be clustered as points in Euclidean space Rd, where the similarities of two objects are represented by the Euclidean distance between the two points. Then the task of clustering is to choose k points as centers, so that the total distance between all input points to their corresponding closest center is minimized. Depending on different distance objective functions, three typical problems have been studied: k-means, k-median, and k-center. The other popular approach for clustering is to model the input data as vertices of a graph, and the similarity between two objects is represented by the weight of the edge connecting the corresponding vertices. For this scenario, one is asked to partition the vertices into clusters so that the “highly connected” vertices belong to the same cluster. A widely-used approach for graph clustering is spectral clustering, which embeds the vertices of a graph into the points in Rk through the bottom k eigenvectors of the graph’s Laplacian matrix, and applies k-means on the embedded points. ∗Full version appears on arXiv, 2017, under the same title. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Both the spectral clustering and the geometric clustering algorithms mentioned above have been widely used in practice, and have been the subject of extensive theoretical and experimental studies over the decades. However, these algorithms are designed for the centralized setting, and are not applicable in the setting of large-scale datasets that are maintained remotely by different sites. In particular, collecting the information from all the remote sites and performing a centralized clustering algorithm is infeasible due to high communication costs, and new distributed clustering algorithms with low communication cost need to be developed. There are several natural communication models, and we focus on two of them: (1) a point-to-point model, and (2) a model with a broadcast channel. In the former, sometimes referred to as the messagepassing model, there is a communication channel between each pair of users. This may be impractical, and the so-called coordinator model can often be used in place; in the coordinator model there is a centralized site called the coordinator, and all communication goes through the coordinator. This affects the total communication by a factor of two, since the coordinator can forward a message from one server to another and therefore simulate a point-to-point protocol. There is also an additional additive O(log s) bits per message, where s is the number of sites, since a server must specify to the coordinator where to forward its message. In the model with a broadcast channel, sometimes referred to as the blackboard model, the coordinator has the power to send a single message which is received by all s sites at once. This can be viewed as a model for single-hop wireless networks. In both models we study the total number of bits communicated among all sites. Although the blackboard model is at least as powerful as the message-passing model, it is often unclear how to exploit its power to obtain better bounds for specific problems. Also, for a number of problems the communication complexity is the same in both models, such as computing the sum of s length-n bit vectors modulo two, where each site holds one bit vector [18], or estimating large moments [20]. Still, for other problems like set disjointness it can save a factor of s in the communication [5]. Our contributions. We present algorithms for graph clustering: for any n-vertex graph whose edges are arbitrarily partitioned across s sites, our algorithms have communication cost eO(ns) in the message passing model, and have communication cost eO(n + s) in the blackboard model, where the eO notation suppresses polylogarithmic factors. The algorithm in the message passing model has each site send a spectral sparsifier of its local data to the coordinator, who then merges them in order to obtain a spectral sparsifier of the union of the datasets, which is sufficient for solving the graph clustering problem. Our algorithm in the blackboard model is technically more involved, as we show a particular recursive sampling procedure for building a spectral sparsifier can be efficiently implemented using a broadcast channel. It is unclear if other natural ways of building spectral sparsifiers can be implemented with low communication in the blackboard model. Our algorithms demonstrate the surprising power of the blackboard model for clustering problems. Since our algorithms compute sparsifiers, they also have applications to solving symmetric diagonally dominant linear systems in a distributed model. Any such system can be converted into a system involving a Laplacian (see, e.g., [1]), from which a spectral sparsifier serves as a good preconditioner. Next we show that Ω(ns) bits of communication is necessary in the message passing model to even recover a constant fraction of a cluster, and Ω(n + s) bits of communication is necessary in the blackboard model. This shows the optimality of our algorithms up to poly-logarithmic factors. We then study clustering problems in constant-dimensional Euclidean space. We show for any c > 1, computing a c-approximation for k-median, k-means, or k-center correctly with constant probability in the message passing model requires Ω(sk) bits of communication. We then strengthen this lower bound, and show even for bicriteria clustering algorithms, which may output a constant factor more clusters and a constant factor approximation, our Ω(sk) bit lower bound still holds. Our proofs are based on communication and information complexity. Our results imply that existing algorithms [3] for k-median and k-means with eO(sk) bits of communication, as well as the folklore parallel guessing algorithm for k-center with eO(sk) bits of communication, are optimal up to poly-logarithmic factors. For the blackboard model, we present an algorithm for k-median and k-means that achieves an O(1)-approximation using eO(s + k) bits of communication. This again separates the models. We give empirical results which show that using spectral sparsifiers preserves the quality of spectral clustering surprisingly well in real-world datasets. For example, when we partition a graph with over 70 million edges (the Sculpture dataset) into 30 sites, only 6% of the input edges are communicated in the blackboard model and 8% are communicated in the message passing model, while the values 2 of the normalized cut (the objective function of spectral clustering) given in those two models are at most 2% larger than the ones given by the centralized algorithm, and the visualized results are almost identical. This is strong evidence that spectral sparsifiers can be a powerful tool in practical, distributed computation. When the number of sites is large, the blackboard model incurs significantly less communication than the message passing model, e.g., in the Twomoons dataset when there are 90 sites, the message passing model communicates 9 times as many edges as communicated in the blackboard model, illustrating the strong separation between these models that our theory predicts. Related work. There is a rich literature on spectral and geometric clustering algorithms from various aspects (see, e.g., [2, 16, 17, 19]). Balcan et al. [3, 4] and Feldman et al. [9] study distributed k-means ([3] also studies k-median). Very recently Guha et al. [10] studied distributed k-median/center/means with outliers. Cohen et al. [7] study dimensionality reduction techniques for the input data matrices that can be used for distributed k-means. The main takeaway is that there is no previous work which develops protocols for spectral clustering in the common message passing and blackboard models, and lower bounds are lacking as well. For geometric clustering, while upper bounds exist (e.g., [3, 4, 9]), no provable lower bounds in either model existed, and our main contribution is to show that previous algorithms are optimal. We also develop a new protocol in the blackboard model. 2 Preliminaries Let G = (V, E, w) be an undirected graph with n vertices, m edges, and weight function V × V → R≥0. The set of neighbors of a vertex v is represented by N(v), and its degree is dv = P u∼v w(u, v). The maximum degree of G is defined to be ∆(G) = maxv{dv}. For any set S ⊆V , let µ(S) ≜ P v∈S dv. For any sets S, T ⊆V , we define w(S, T) ≜P u∈S,v∈T w(u, v) to be the total weight of edges crossing S and T. For two sets X and Y , the symmetric difference of X and Y is defined as X△Y ≜(X \ Y ) ∪(Y \ X). For any matrix A ∈Rn×n, let λ1(A) ≤· · · ≤λn(A) = λmax(A) be the eigenvalues of A. For any two matrices A, B ∈Rn×n, we write A ⪯B to represent B −A is positive semi-definite (PSD). Notice that this condition implies that x⊺Ax ≤x⊺Bx for any x ∈Rn. Sometimes we also use a weaker notation (1−ε)A ⪯r B ⪯r (1+ε)A to indicate that (1−ε)x⊺Ax ≤x⊺Bx ≤(1+ε)x⊺Ax for all x in the row span of A. Graph Laplacian. The Laplacian matrix of G is an n × n matrix LG defined by LG = DG −AG, where AG is the adjacency matrix of G defined by AG(u, v) = w(u, v), and DG is the n×n diagonal matrix with DG(v, v) = dv for any v ∈V [G]. Alternatively, we can write LG with respect to a signed edge-vertex incidence matrix: we assign every edge e = {u, v} an arbitrary orientation, and let BG(e, v) = 1 if v is e’s head, BG(e, v) = −1 if v is e’s tail, and BG(e, v) = 0 otherwise. We further define a diagonal matrix WG ∈Rm×m, where WG(e, e) = we for any edge e ∈E[G]. Then, we can write LG as LG = B⊺ GWGBG. The normalized Laplacian matrix of G is defined by LG ≜D−1/2 G LGD−1/2 G = I −D−1/2 G AGD−1/2 G . We sometimes drop the subscript G when the underlying graph is clear from the context. Spectral sparsification. For any undirected and weighted graph G = (V, E, w), we say a subgraph H of G with proper reweighting of the edges is a (1 + ε)-spectral sparsifier if (1 −ε)LG ⪯LH ⪯(1 + ε)LG. (1) By definition, it is easy to show that, if we decompose the edge set of a graph G = (V, E) into E1, . . . , Eℓfor a constant ℓand Hi is a spectral sparsifier of Gi = (V, Ei) for any 1 ≤i ≤ℓ, then the graph formed by the union of edge sets from Hi is a spectral sparsifier of G. It is known that, for any undirected graph G of n vertices, there is a (1 + ε)-spectral sparsifier of G with O(n/ε2) edges, and it can be constructed in almost-linear time [13]. We will show that a spectral sparsifier preserves the cluster structure of a graph. Models of computation. We will study distributed clustering in two models for distributed data: the message passing model and the blackboard model. The message passing model represents those distributed computation systems with point-to-point communication, and the blackboard model represents those where messages can be broadcast to all parties. More precisely, in the message passing model there are s sites P1, . . . , Ps, and one coordinator. These sites can talk to the coordinator through a two-way private channel. In fact, this is referred to 3 as the coordinator model in Section 1, where it is shown to be equivalent to the point-to-point model up to small factors. The input is initially distributed at the s sites. The computation is in terms of rounds: at the beginning of each round, the coordinator sends a message to some of the s sites, and then each of those sites that have been contacted by the coordinator sends a message back to the coordinator. At the end, the coordinator outputs the answer. In the alternative blackboard model, the coordinator is simply a blackboard where these s sites P1, . . . , Ps can share information; in other words, if one site sends a message to the coordinator/blackboard then all the other s −1 sites can see this information without further communication. The order for the sites to speak is decided by the contents of the blackboard. For both models we measure the communication cost as the total number of bits sent through the channels. The two models are now standard in multiparty communication complexity (see, e.g., [5, 18, 20]). They are similar to the congested clique model [14] studied in the distributed computing community; the main difference is that in our models we do not post any bandwidth limitations at each channel but instead consider the total number of bits communicated. 3 Distributed graph clustering In this section we study distributed graph clustering. We assume that the vertex set of the input graph G = (V, E) can be partitioned into k clusters, where vertices in each cluster S are highly connected to each other, and there are fewer edges between S and V \S. To formalize this notion, we define the conductance of a vertex set S by φG(S) ≜w(S, V \S)/µ(S). Generalizing the Cheeger constant, we define the k-way expansion constant of graph G by ρ(k) ≜minpartition A1, . . . , Ak max1≤i≤k φG(Ai). Notice that a graph G has k clusters if the value of ρ(k) is small. Lee et al. [12] relate the value of ρ(k) to λk(LG) by the following higher-order Cheeger inequality: λk(LG) 2 ≤ρ(k) ≤O(k2) p λk(LG). Based on this, a large gap between λk+1(LG) and ρ(k) implies (i) the existence of a k-way partition {Si}k i=1 with smaller value of φG(Si) ≤ρ(k), and (ii) any (k + 1)-way partition of G contains a subset with high conductance ρ(k + 1) ≥λk+1(LG)/2. Hence, a large gap between λk+1(LG) and ρ(k) ensures that G has exactly k clusters. In the following, we assume that Υ ≜λk+1(LG)/ρ(k) = Ω(k3), as this assumption was used in the literature for studying graph clustering in the centralized setting [17]. Both algorithms presented in the section are based on the following spectral clustering algorithm: (i) compute the k eigenvectors f1, . . . , fk of LG associated with λ1(LG), . . . , λk(LG); (ii) embed every vertex v to a point in Rk through the embedding F(v) = 1 √dv · (f1(v), . . . , fk(v)); (iii) run k-means on the embedded points {F(v)}v∈V , and group the vertices of G into k clusters according to the output of k-means. 3.1 The message passing model We assume the edges of the input graph G = (V, E) are arbitrarily allocated among s sites P1, · · · , Ps, and we use Ei to denote the edge set maintained by site Pi. Our proposed algorithm consists of two steps: (i) every Pi computes a linear-sized (1 + c)-spectral sparsifier Hi of Gi ≜(V, Ei), for a small constant c ≤1/10, and sends the edge set of Hi, denoted by E′ i, to the coordinator; (ii) the coordinator runs a spectral clustering algorithm on the union of received graphs H ≜ V, Sk i=1 E′ i . The theorem below summarizes the performance of this algorithm, and shows the approximation guarantee of this algorithm is as good as the provable guarantee of spectral clustering known in the centralized setting [17]. Theorem 3.1. Let G = (V, E) be an n-vertex graph with Υ = Ω(k3), and suppose the edges of G are arbitrarily allocated among s sites. Assume S1, · · · , Sk is an optimal partition that achieves ρ(k). Then, the algorithm above computes a partition A1, . . . , Ak satisfying vol(Ai△Si) = O k3 · Υ−1 · vol(Si) for any 1 ≤i ≤k. The total communication cost of this algorithm is eO(ns) bits. 4 Our proposed algorithm is very easy to implement, and the next theorem shows that the communication cost of our algorithm is optimal up to a logarithmic factor. Theorem 3.2. Let G be an undirected graph with n vertices, and suppose the edges of G are distributed among s sites. Then, any algorithm that correctly outputs a constant fraction of a cluster in G requires Ω(ns) bits of communication. This holds even if each cluster has constant expansion. As a remark, it is easy to see that this lower bound also holds for constructing spectral sparsifiers: for any n × n PSD matrix A whose entries are arbitrarily distributed among s sites, any distributed algorithm that constructs a (1 + Θ(1))-spectral sparsifier of A requires Ω(ns) bits of communication. This follows since such a spectral sparsifier can be used to solve the spectral clustering problem. Spectral sparsification has played an important role in designing fast algorithms from different areas, e.g., machine learning, and numerical linear algebra. Hence our lower bound result for constructing spectral sparsifiers may have applications to studying other distributed learning algorithms. 3.2 The blackboard model Next we present a graph clustering algorithm with eO(n + s) bits of communication cost in the blackboard model. Our result is based on the observation that a spectral sparsifier preserves the structure of clusters, which was used for proving Theorem 3.1. So it suffices to design a distributed algorithm for constructing a spectral sparsifier in the blackboard model. Our distributed algorithm is based on constructing a chain of coarse sparsifiers [15], which is described as follows: for any input PSD matrix K with λmax(K) ≤λu and all the non-zero eigenvalues of K at least λℓ, we define d = ⌈log2(λu/λℓ)⌉and construct a chain of d + 1 matrices [K(0), K(1), . . . , K(d)], (2) where γ(i) = λu/2i and K(i) = K + γ(i)I. Notice that in the chain above every K(i −1) is obtained by adding weights to the diagonal entries of K(i), and K(i −1) approximates K(i) as long as the weights added to the diagonal entries are small. We will construct this chain recursively, so that K(0) has heavy diagonal entries and can be approximated by a diagonal matrix. Moreover, since K is the Laplacian matrix of a graph G, it is easy to see that d = O(log n) as long as the edge weights of G are polynomially upper-bounded in n. Lemma 3.3 ([15]). The chain (2) satisfies the following relations: (1) K ⪯r K(d) ⪯r 2K; (2) K(ℓ) ⪯K(ℓ−1) ⪯2K(ℓ) for all ℓ∈{1, . . . , d}; (3) K(0) ⪯2γ(0)I ⪯2K(0). Based on Lemma 3.3, we will construct a chain of matrices h eK(0), eK(1), . . . , eK(d) i (3) in the blackboard model, such that every eK(ℓ) is a spectral sparsifier of K(ℓ), and every eK(ℓ+ 1) can be constructed from eK(ℓ). The basic idea behind our construction is to use the relations among different K(ℓ) shown in Lemma 3.3 and the fact that, for any K = B⊺B, sampling rows of B with respect to their leverage scores can be used to obtain a matrix approximating K. Theorem 3.4. Let G be an undirected graph on n vertices, where the edges of G are allocated among s sites, and the edge weights are polynomially upper bounded in n. Then, a spectral sparsifier of G can be constructed with eO(n + s) bits of communication in the blackboard model. That is, the chain (3) can be constructed with eO(n + s) bits of communication in the blackboard model. Proof. Let K = B⊺B be the Laplacian matrix of the underlying graph G, where B ∈Rm×n is the edge-vertex incidence matrix of G. We will prove that every eK(i + 1) can be constructed based on eK(i) with eO(n + s) bits of communication. This implies that eK(d), a (1 + ε)-spectral sparsifier of K, can be constructed with eO(n + s) bits of communication, as the length of the chain d = O(log n). First of all, notice that λu ≤2n, and the value of n can be obtained with communication cost eO(n + s) (different sites sequentially write the new IDs of the vertices on the blackboard). In the following we assume that λu is the upper bound of λmax that we actually obtained in the blackboard. Base case of ℓ= 0: By definition, K(0) = K + λu · I, and 1 2 · K(0) ⪯γ(0) · I ⪯K(0), due to Statement 3 of Lemma 3.3. Let ⊕denote appending the rows of one matrix to another. We 5 define Bγ(0) = B ⊕ p γ(0) · I, and write K(0) = K + γ(0) · I = B⊺ γ(0)Bγ(0). By defining τi = b⊺ i (K(0))⊺bi for each row of Bγ(0), we have τi ≤b⊺ i (γ(0) · I) bi ≤2 · τi. Let eτi = b⊺ i (γ(0) · I)+ bi be the leverage score of bi approximated using γ(0) · I, and let eτ be the vector of approximate leverage scores, with the leverage scores of the n rows corresponding to p γ(0) · I rounded up to 1. Then, with high probability sampling O(ε−2n log n) rows of B will give a matrix eK(0) such that (1 −ε)K(0) ⪯eK(0) ⪯(1 + ε)K(0). Notice that, as every row of B corresponds to an edge of G, the approximate leverage scores eτi for different edges can be computed locally by different sites maintaining the edges, and the sites only need to send the information of the sampled edges to the blackboard, hence the communication cost is eO(n + s) bits. Induction step: We assume that (1−ε)K(ℓ) ⪯r eK(ℓ) ⪯r (1+ε)K(ℓ), and the blackboard maintains the matrix eK(ℓ). This implies that (1 −ε)/(1 + ε) · K(ℓ) ⪯r 1/(1 + ε) · eK(ℓ) ⪯r K(ℓ). Combining this with Statement 2 of Lemma 3.3, we have that 1 −ε 2(1 + ε)K(ℓ+ 1) ⪯r 1 2(1 + ε) eK(ℓ) ⪯K(ℓ+ 1). We apply the same sampling procedure as in the base case, and obtain a matrix eK(ℓ+ 1) such that (1 −ε)K(ℓ+ 1) ⪯r eK(ℓ+ 1) ⪯r (1 + ε)K(ℓ+ 1). Notice that, since eK(ℓ) is written on the blackboard, the probabilities used for sampling individual edges can be computed locally by different sites, and in each round only the sampled edges will be sent to the blackboard in order for the blackboard to obtain eK(ℓ+ 1). Hence, the total communication cost in each iteration is eO(n + s) bits. Combining this with the fact that the chain length d = O(log n) proves the theorem. Combining Theorem 3.4 and the fact that a spectral sparsifier preserves the structure of clusters, we obtain a distributed algorithm in the blackboard model with total communication cost eO(n + s) bits, and the performance of our algorithm is the same as in the statement of Theorem 3.1. Notice that Ω(n + s) bits of communication are needed for graph clustering in the blackboard model, since the output of a clustering algorithm contains Ω(n) bits of information and each site needs to communicate at least one bit. Hence the communication cost of our proposed algorithm is optimal up to a poly-logarithmic factor. 4 Distributed geometric clustering We now consider geometric clustering, including k-median, k-means and k-center. Let P be a set of points of size n in a metric space with distance function d(·, ·), and let k ≤n be an integer. In the k-center problem we want to find a set C (|C| = k) such that maxp∈P d(p, C) is minimized, where d(p, C) = minc∈C d(p, c). In k-median and k-means we replace the objective function maxp∈P d(p, C) with P p∈P d(p, C) and P p∈P (d(p, C))2, respectively. 4.1 The message passing model As mentioned, for constant dimensional Euclidean space and a constant c > 1, there are algorithms that c-approximate k-median and k-means using eO(sk) bits of communication [3]. For k-center, the folklore parallel guessing algorithms (see, e.g., [8]) achieve a 2.01-approximation using eO(sk) bits of communication. The following theorem states that the above upper bounds are tight up to logarithmic factors. Due to space constraints we defer the proof to the full version of this paper. The proof uses tools from multiparty communication complexity. We in fact can prove a stronger statement that any algorithm that can differentiate whether we have k points or k + 1 points in total in the message passing model needs Ω(sk) bits of communication. Theorem 4.1. For any c > 1, computing c-approximation for k-median, k-means or k-center correctly with probability 0.99 in the message passing model needs Ω(sk) bits of communication. A number of works on clustering consider bicriteria solutions (e.g., [11, 6]). An algorithm is a (c1, c2)-approximation (c1, c2 > 1) if the optimal solution costs W when using k centers, then the 6 output of the algorithm costs at most c1W when using at most c2k centers. We can show that for kmedian and k-means, the Ω(sk) lower bound holds even for algorithms with bicriteria approximations. The proof of the following theorem can be found in the full version of this paper. Theorem 4.2. For any c ∈[1, 1.01], computing (7.1 −6c, c)-bicriteria-approximation for k-median or k-means correctly with probability 0.99 in the message passing model needs Ω(sk) bits of communication. 4.2 The blackboard model We can show that there is an algorithm that achieves an O(1)-approximation using eO(s + k) bits of communication for k-median and k-means. Due to space constraints we defer the description of the algorithm to the full version of this paper. For k-center, it is straightforward to implement the parallel guessing algorithm in the blackboard model using eO(s + k) bits of communication. Theorem 4.3. There are algorithms that compute O(1)-approximations for k-median, k-means and k-center correctly with probability 0.9 in the blackboard model using eO(s+k) bits of communication. 5 Experiments In this section we present experimental results for spectral graph clustering in the message passing and blackboard models. We will compare the following three algorithms. (1) Baseline: each site sends all the data to the coordinator directly; (2) MsgPassing: our algorithm in the message passing model (Section 3.1); (3) Blackboard: our algorithm in the blackboard model (Section 3.2). Besides giving the visualized results of these algorithms on various datasets, we also measure the qualities of the results via the normalized cut, defined as ncut(A1, . . . , Ak) = 1 2 P i∈[k] w(Ai,V \Ai) vol(Ai) , which is a standard objective function to be minimized for spectral clustering algorithms. We implemented the algorithms using multiple languages, including Matlab, Python and C++. Our experiments were conducted on an IBM NeXtScale nx360 M4 server, which is equipped with 2 Intel Xeon E5-2652 v2 8-core processors, 32GB RAM and 250GB local storage. Datasets. We test the algorithms in the following real and synthetic datasets. • Twomoons: this dataset contains n = 14, 000 coordinates in R2. We consider each point to be a vertex. For any two vertices u, v, we add an edge with weight w(u, v) = exp{−∥u − v∥2 2/σ2} with σ = 0.1 when one vertex is among the 7000-nearest points of the other. This construction results in a graph with about 110, 000, 000 edges. • Gauss: this dataset contains n = 10, 000 points in R2. There are 4 clusters in this dataset, each generated using a Gaussian distribution. We construct a complete graph as the similarity graph. For any two vertices u, v, we define the weight w(u, v) = exp{−∥u −v∥2 2/σ2} with σ = 1. The resulting graph has about 100, 000, 000 edges. • Sculpture: a photo of The Greek Slave We use an 80 × 150 version of this photo where each pixel is viewed as a vertex. To construct a similarity graph, we map each pixel to a point in R5, i.e., (x, y, r, g, b), where the latter three coordinates are the RGB values. For any two vertices u, v, we put an edge between u, v with weight w(u, v) = exp{−∥u −v∥2 2/σ2} with σ = 0.5 if one of u, v is among the 5000-nearest points of the other. This results in a graph with about 70, 000, 000 edges. In the distributed model edges are randomly partitioned across s sites. Results on clustering quality. We visualize the clustered results for the Twomoons dataset in Figure 1. It can be seen that Baseline, MsgPassing and Blackboard give results of very similar qualities. For simplicity, here we only present the visualization for s = 15. Similar results were observed when we varied the values of s. We also compare the normalized cut (ncut) values of the clustering results of different algorithms. The results are presented in Figure 2. In all datasets, the ncut values of different algorithms are very close. The ncut value of MsgPassing slightly decreases when we increase the value of s, while the ncut value of Blackboard is independent of s. 7 (a) Baseline (b) MsgPassing (c) Blackboard Figure 1: Visualization of the results on Twomoons. In the message passing model each site samples 5n edges; in the blackboard model all sites jointly sample 10n edges and the chain has length 18. (a) Twomoons (b) Gauss (c) Sculpture Figure 2: Comparisons on normalized cuts. In the message passing model, each site samples 5n edges; in each round of the algorithm in the blackboard model, all sites jointly sample 10n edges (in Twomoons and Gauss) or 20n edges (in Sculpture) edges and the chain has length 18. Results on Communication Costs. We compare the communication costs of different algorithms in Figure 3. We observe that while achieving similar clustering qualities as Baseline, both MsgPassing and Blackboard are significantly more communication-efficient (by one or two orders of magnitudes in our experiments). We also notice that the value of s does not affect the communication cost of Blackboard, while the communication cost of MsgPassing grows almost linearly with s; when s is large, MsgPassing uses significantly more communication than Blackboard. (a) Twomoons (b) Gauss (c) Sculpture (d) Twomoons (e) Gauss (f) Sculpture Figure 3: Comparisons on communication costs. In the message passing model, each site samples 5n edges; in each round of the algorithm in the blackboard model, all sites jointly sample 10n (in Twomoons and Gauss) or 20n (in Sculpture) edges and the chain has length 18. Acknowledgement: Jiecao Chen and Qin Zhang are supported in part by NSF CCF-1525024 and IIS-1633215. D.W. thanks support from the XDATA program of the Defense Advanced Research Projects Agency (DARPA), Air Force Research Laboratory contract FA8750-12-C-0323. 8 References [1] Alexandr Andoni, Jiecao Chen, Robert Krauthgamer, Bo Qin, David P. Woodruff, and Qin Zhang. On sketching quadratic forms. In ITCS, pages 311–319, 2016. [2] David Arthur and Sergei Vassilvitskii. k-means++: The advantages of careful seeding. In SODA, pages 1027–1035, 2007. [3] Maria-Florina Balcan, Steven Ehrlich, and Yingyu Liang. Distributed k-means and k-median clustering on general communication topologies. In NIPS, pages 1995–2003, 2013. [4] Maria-Florina Balcan, Vandana Kanchanapally, Yingyu Liang, and David P. Woodruff. Improved distributed principal component analysis. CoRR, abs/1408.5823, 2014. [5] Mark Braverman, Faith Ellen, Rotem Oshman, Toniann Pitassi, and Vinod Vaikuntanathan. A tight bound for set disjointness in the message-passing model. In FOCS, pages 668–677, 2013. [6] Moses Charikar, Samir Khuller, David M. Mount, and Giri Narasimhan. Algorithms for facility location problems with outliers. In SODA, pages 642–651, 2001. [7] Michael B. Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Madalina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In STOC, pages 163–172, 2015. [8] Graham Cormode, S Muthukrishnan, and Wei Zhuang. Conquering the divide: Continuous clustering of distributed data streams. In ICDE, pages 1036–1045, 2007. [9] Dan Feldman, Melanie Schmidt, and Christian Sohler. Turning big data into tiny data: Constantsize coresets for k-means, PCA and projective clustering. In SODA, pages 1434–1453, 2013. [10] Sudipto Guha, Yi Li, and Qin Zhang. Distributed partial clustering. Manuscript, 2017. [11] Madhukar R. Korupolu, C. Greg Plaxton, and Rajmohan Rajaraman. Analysis of a local search heuristic for facility location problems. In SODA, pages 1–10, 1998. [12] James R. Lee, Shayan Oveis Gharan, and Luca Trevisan. Multi-way spectral partitioning and higher-order cheeger inequalities. In STOC, pages 1117–1130, 2012. [13] Yin Tat Lee and He Sun. Constructing linear-sized spectral sparsification in almost-linear time. In FOCS, pages 250–269, 2015. [14] Zvi Lotker, Elan Pavlov, Boaz Patt-Shamir, and David Peleg. MST construction in O(log log n) communication rounds. In SPAA, pages 94–100, 2003. [15] Gary L. Miller and Richard Peng. Iterative approaches to row sampling. CoRR, abs/1211.2713, 2012. [16] Andrew Y. Ng, Michael I. Jordan, and Yair Weiss. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. [17] Richard Peng, He Sun, and Luca Zanetti. Partitioning well-clustered graphs: Spectral clustering works! In COLT, pages 1423–1455, 2015. [18] Jeff M. Phillips, Elad Verbin, and Qin Zhang. Lower bounds for number-in-hand multiparty communication complexity, made easy. SIAM J. Comput., 45(1):174–196, 2016. [19] Ulrike Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007. [20] David P. Woodruff and Qin Zhang. Tight bounds for distributed functional monitoring. In STOC, pages 941–960, 2012. 9 | 2016 | 260 |
6,173 | Boosting with Abstention Corinna Cortes Google Research New York, NY 10011 corinna@google.com Giulia DeSalvo Courant Institute New York, NY 10012 desalvo@cims.nyu.edu Mehryar Mohri Courant Institute and Google New York, NY 10012 mohri@cims.nyu.edu Abstract We present a new boosting algorithm for the key scenario of binary classification with abstention where the algorithm can abstain from predicting the label of a point, at the price of a fixed cost. At each round, our algorithm selects a pair of functions, a base predictor and a base abstention function. We define convex upper bounds for the natural loss function associated to this problem, which we prove to be calibrated with respect to the Bayes solution. Our algorithm benefits from general margin-based learning guarantees which we derive for ensembles of pairs of base predictor and abstention functions, in terms of the Rademacher complexities of the corresponding function classes. We give convergence guarantees for our algorithm along with a linear-time weak-learning algorithm for abstention stumps. We also report the results of several experiments suggesting that our algorithm provides a significant improvement in practice over two confidence-based algorithms. 1 Introduction Classification with abstention is a key learning scenario where the algorithm can abstain from making a prediction, at the price of incurring a fixed cost. This is the natural scenario in a variety of common and important applications. An example is spoken-dialog applications where the system can redirect a call to an operator to avoid the cost of incorrectly assigning a category to a spoken utterance and misguiding the dialog manager. This requires the availability of an operator, which incurs a fixed and predefined price. Other examples arise in the design of a search engine or an information extraction system, where, rather than taking the risk of displaying an irrelevant document, the system can resort to the help of a more sophisticated, but more time-consuming classifier. More generally, this learning scenario arises in a wide range of applications including health, bioinformatics, astronomical event detection, active learning, and many others, where abstention is an acceptable option with some cost. Classification with abstention is thus a highly relevant problem. The standard approach for tackling this problem is via confidence-based abstention: a real-valued function h is learned for the classification problem and the points x for which its magnitude |h(x)| is smaller than some threshold γ are rejected. Bartlett and Wegkamp [1] gave a theoretical analysis of this approach based on consistency. They introduced a discontinuous loss function taking into account the cost for rejection, upper-bounded that loss by a convex and continuous Double Hinge Loss (DHL) surrogate, and derived an algorithm based on that convex surrogate loss. Their work inspired a series of follow-up papers that developed both the theory and practice behind confidence-based abstention [32, 15, 31]. Further related works can be found in Appendix A. In this paper, we present a solution to the problem of classification with abstention that radically departs from the confidence-based approach. We introduce a general model where a pair (h, r) for a classifier h and rejection function r are learned simultaneously. Under this novel framework, we present a Boosting-style algorithm with Abstention, BA, that learns accurately the classifier and abstention functions. Note that the terminology of “boosting with abstention” was used by Schapire and Singer [26] to refer to a scenario where a base classifier is allowed to abstain, but 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. η + + + + + - - - - - - - - - + - + - θ x y ✓ |h(x)| < γ γ h(x) = −x + ✓ Figure 1: The best predictor h is defined by the threshold ✓: h(x) = −x + ✓. For c < 1 2, the region defined by X ⌘should be rejected. But the corresponding abstention function r defined by r(x) = x −⌘cannot be defined as |h(x)| γ for any γ > 0. where the boosting algorithm itself has to commit to a prediction. This is therefore distinct from the scenario of classification with abstention studied here. Nevertheless, we will introduce and examine a confidence-based Two-Step Boosting algorithm, the TSB algorithm, that consists of first training Adaboost and next searching for the best confidence-based abstention threshold. The paper is organized as follows. Section 2 describes our general abstention model which consists of learning a pair (h, r) simultaneously and compares it with confidence-based models. Section 3.2 presents a series of theoretical results for the problem of learning convex ensembles for classification with abstention, including the introduction of calibrated convex surrogate losses and general datadependent learning guarantees. In Section 4, we use these learning bounds to design a regularized boosting algorithm. We further prove the convergence of the algorithm and present a linear-time weak-learning algorithm for a natural family of abstention stumps. Finally, in Section 5, we report several experimental results comparing the BA algorithm with the DHL and the TSB algorithms. 2 Preliminaries In this section, we first introduce a general model for learning with abstention [7] and then compare it with confidence-based models. 2.1 General abstention model We assume as in standard supervised learning that the training and test points are drawn i.i.d. according to some fixed but unknown distribution D over X ⇥{−1, +1}. We consider the learning scenario of binary classification with abstention. Given an instance x 2 X, the learner has the option of abstaining from making a prediction for x at the price of incurring a non-negative loss c(x), or otherwise making a prediction h(x) using a predictor h and incurring the standard zero-one loss 1yh(x)0 where the true label is y. Since a random guess achieves an expected cost of at most 1 2, rejection only makes sense for c(x)< 1 2. We will model the learner by a pair (h, r) where the function r: X ! R determines the points x 2 X to be rejected according to r(x) 0 and where the hypothesis h: X ! R predicts labels for non-rejected points via its sign. Extending the loss function considered in Bartlett and Wegkamp [1], the abstention loss for a pair (h, r) is defined as as follows for any (x, y) 2 X ⇥{−1, +1}: L(h, r, x, y) = 1yh(x)01r(x)>0 + c(x)1r(x)0. (1) The abstention cost c(x) is assumed known to the learner. In the following, we assume that c is a constant function, but part of our analysis is applicable to the more general case. We denote by H and R two families of functions mapping X to R and we assume the labeled sample S = ((x1, y1), . . . , (xm, ym)) is drawn i.i.d. from Dm. The learning problem consists of determining a pair (h, r) 2 H ⇥R that admits a small expected abstention loss R(h, r), defined as follows: R(h, r) = E (x,y)⇠D ⇥ 1yh(x)01r(x)>0 + c1r(x)0 ⇤ . (2) Similarly, we define the empirical loss of a pair (h, r) 2 H ⇥R over the sample S by: bRS(h, r) = E(x,y)⇠S ⇥ 1yh(x)01r(x)>0 + c1r(x)0 ⇤ , where (x, y) ⇠S indicates that (x, y) is drawn according to the empirical distribution defined by S. 2.2 Confidence-based abstention model Confidence-based models are a special case of the general model for learning with rejection presented in Section 2.1 corresponding to the pair (h(x), r(x)) = (h(x), |h(x)| −γ), where γ is a parameter 2 that changes the threshold of rejection. This specific choice was based on consistency results shown in [1]. In particular, the Bayes solution (h⇤, r⇤) of the learning problem, that is where the distribution D is known, is given by h⇤(x) = ⌘(x) −1 2 and r⇤(x) = |h⇤(x)| −( 1 2 −c) where ⌘(x) = P[Y = +1|x] for any x 2 X, but note that this is not a unique solution. The form of h⇤(x) follows by a similar reasoning as for the standard binary classification problem. It is straightforward to see that the optimal rejection function r⇤is non-positive, meaning a point is rejected, if and only if min{⌘(x), 1 −⌘(x)} ≥c. Equivalently, the following holds: max{⌘(x) −1 2, 1 2 −⌘(x)} 1 2 −c if and only if |⌘(x) −1 2| 1 2 −c and using the definition of h⇤, we recover the optimal r⇤. In light of the Bayes solution, the specific choice of the abstention function r is natural; however, requiring the abstention function r to be defined as r(x) = |h(x)| −γ, for some h 2 H, is in general too restrictive when predictors are selected out of a limited subset H of all measurable functions over X. Consider the example shown in Figure 1 where H is a family of linear functions. For this simple case, the optimal abstention region cannot be attained as a function of the best predictor h while it can be achieved by allowing to learn a pair (h, r). Thus, the general model for learning with abstention analyzed in Section 2.1 is both more flexible and more general. 3 Theoretical analysis This section presents a theoretical analysis of the problem of learning convex ensembles for classification with abstention. We first introduce general convex surrogate functions for the abstention loss and prove a necessary and sufficient condition based on their parameters for them to be calibrated. Next we define the ensemble family we consider and prove general data-dependent learning guarantees for it based on the Rademacher complexities of the base predictor and base rejector sets. 3.1 Convex surrogates We introduce two types of convex surrogate functions for the abstention loss. Observe that the abstention loss L(h, r, x, y) can be equivalently expressed as L(h, r, x, y) = max $ 1yh(x)01−r(x)<0, c 1r(x)0 % . In view of that, since for any f, g 2 R, max(f, g) = f+g+|g−f| 2 ≥f+g 2 , the following inequalities hold for a > 0 and b > 0: L(h, r, x, y) = max $ 1yh(x)01−r(x)<0, c 1r(x)0 % max $ 1max(yh(x),−r(x))0, c 1r(x)0 % max $ 1 yh(x)−r(x) 2 0, c 1r(x)0 % = max $ 1a [yh(x)−r(x)]0, c1b r(x)0 % max ⇣ Φ1 $ a [r(x) −yh(x)] % , c Φ2 $ −b r(x) %⌘ , where u ! Φ1(−u) and u ! Φ2(−u) are two non-increasing convex functions upper-bounding u ! 1u0 over R. Let LMB be the convex surrogate defined by the last inequality above: LMB(h, r, x, y) = max ⇣ Φ1 $ a [r(x) −yh(x)] % , c Φ2 $ −b r(x) %⌘ , (3) Since LMB is not differentiable everywhere, we upper-bound the convex surrogate LMB as follows: max $ 1a [yh(x)−r(x)]0, c 1b r(x)0 % Φ1 $ a [r(x) −yh(x)] % + c Φ2 $ −b r(x) % . Similarly, we let LSB denote this convex surrogate: LSB(h, r, x, y) = Φ1 $ a [r(x) −yh(x)] % + c Φ2 $ −b r(x) % . (4) Figure 2 shows the plots of the convex surrogates LMB and LSB as well as that of the abstention loss. Let (h⇤ L, r⇤ L) denote the pair that attains the minimum of the expected loss Ex,y(LSB(h, r, x, y)) over all measurable functions for Φ1(u) = Φ2(u) = exp(u). In Appendix F, we show that with ⌘(x)= P(Y =+1|X =x), the pair (h⇤ L, r⇤ L) where h⇤ L = 1 2a log $ ⌘ 1−⌘ % and r⇤ L = 1 a +b log ⇣ cb 2a q 1 ⌘(1−⌘) ⌘ makes LSB a calibrated loss, meaning that the sign of the (h⇤ L, r⇤ L) that minimizes the expected surrogate loss matches the sign of the Bayes classifier (h⇤, r⇤). More precisely, the following holds. Theorem 1 (Calibration of convex surrogate). For a > 0 and b > 0, the inf(h,r) E(x,y)[L(h, r, x, y)] is attained at (h⇤ L, r⇤ L) such that sign(h⇤) = sign(h⇤ L) and sign(r⇤) = sign(r⇤ L) if and only if b /a = 2 p (1 −c)/c. 3 Figure 2: The left figure is a plot of the abstention loss. The middle figure is a plot of the surrogate function LMB while the right figure is a plot of the surrogate loss LSB both for c = 0.45. The theorem shows that the classification and rejection solution obtained by minimizing the surrogate loss for that choice of (a, b) coincides with the one obtained using the original loss. In the following, we make the explicit choice of a = 1 and b = 2 p (1 −c)/c for the loss LSB to be calibrated. 3.2 Learning guarantees for ensembles in classification with abstention In the standard scenario of classification, it is often easy to come up with simple base classifiers that may abstain. As an example, a simple rule could classify a message as spam based on the presence of some word, as ham in the presence of some other word, and just abstain in the absence of both, as in the boosting with abstention algorithm by Schapire and Singer [26]. Our objective is to learn ensembles of such base hypotheses to create accurate solutions for classification with abstention. Our ensemble functions are based on the framework described in Section 2.1. Let H and R be two families of functions mapping X to [−1, 1]. The ensemble family F that we consider is then the convex hull of H ⇥R: F = ⇢⇣ T X t=1 ↵tht, T X t=1 ↵trt ⌘ : T ≥1, ↵t ≥0, T X t=1 ↵t = 1, ht 2 H, rt 2 R , . (5) Thus, (h, r) 2 F abstains on input x 2 X when r(x) 0 and predicts the label sign(h(x)) otherwise. Let u ! Φ1(−u) and u ! Φ2(−u) be two strictly decreasing differentiable convex function upperbounding u ! 1u0 over R. For calibration constants a , b > 0, and cost c > 0, we assume that there exist u and v such that Φ1(a u) < 1 and c Φ2(v) < 1, otherwise the surrogate would not be useful. Let Φ−1 1 and Φ−1 2 be the inverse functions, which always exist since Φ1 and Φ2 are strictly monotone. We will use the following definitions: CΦ1 = 2a Φ0 1 $ Φ−1 1 (1) % and CΦ2 = 2cb Φ0 2 $ Φ−1 2 (1/c) % . Observe that for Φ1(u) = Φ2(u) = exp(u), we simply have CΦ1 = 2a and CΦ2 = 2b . Theorem 2. Let H and R be two families of functions mapping X to R. Assume N > 1. Then, for any δ > 0, with probability at least 1−δ over the draw of a sample S of size m from D, the following holds for all (h, r) 2 F: R(h, r) E (x,y)⇠S[LMB(h, r, x, y)] + CΦ1Rm(H) + (CΦ1 + CΦ2)Rm(R) + r log 1/δ 2m . The proof is given in Appendix C. The theorem gives effective learning guarantees for ensemble pairs (h, r) 2 F when the base predictor and abstention functions admit favorable Rademacher complexities. In earlier work [7], we present a learning bound for a different type of surrogate losses which can also be extended to hold for ensembles. Next, we derive margin-based guarantees in the case where Φ1(u) = Φ2(u) = exp(u). For any ⇢> 0, the margin-losses associated to LMB and LSB are denoted by L⇢ MB and L⇢ SB and defined for all (h, r) 2 F and (x, y) 2 X ⇥{−1, +1} by L⇢ MB(h, r, x, y) = LMB(h/⇢, r/⇢, x, y) and L⇢ SB(h, r, x, y) = LSB(h/⇢, r/⇢, x, y). Theorem 2 applied to this margin-based loss results in the following corollary. Corollary 3. Assume N > 1 and fix ⇢> 0. Then, for any δ > 0, with probability at least 1 −δ over the draw of an i.i.d. sample S of size m from D, the following holds for all f 2 F: R(h, r) E (x,y)⇠S[L⇢ MB(h, r, x, y)] + 2a ⇢Rm(H) + 2(a + b ) ⇢ Rm(R) + r log 1/δ 2m . 4 BA(S = ((x1, y1), . . . , (xm, ym))) 1 for i 1 to m do 2 D1(i, 1) 1 2m; D1(i, 2) 1 2m 3 for t 1 to T do 4 Z1,t Pm i=1 Dt(i, 1); Z2,t Pm i=1 Dt(i, 2) 5 k argminj2[1,N] 2Z1,t✏t,j + Z1,trj,1 −2 p c(1 −c)Z2,trj,2 . Direction 6 Z Z1,t(✏t,k + rk,1 2 ) −2 p c(1 −c)Z2,t rk,2 2 7 if (Z1,t −Z)e↵t−1,k −Ze−↵t−1,k < m Zt β then 8 ⌘t −↵t−1,k . Step 9 else ⌘t log h − mβ 2ZtZ + rh mβ 2ZtZ i2 + Z1,t Z −1 i . Step 10 ↵t ↵t−1 + ⌘tek 11 rt PN j=1 ↵jrj 12 ht PN j=1 ↵jhj 13 Zt+1 Pm i=1 Φ0$ rt(xi) −yiht(xi) % + Φ0$ −2 q 1−c c rt(xi) % 14 for i 1 to m do 15 Dt+1(i, 1) Φ0$ rt(xi)−yiht(xi) % Zt+1 ; Dt+1(i, 2) Φ0$ −2 r 1−c c rt(xi) % Zt+1 16 (h, r) PN j=1 ↵T,j(hj, rj) 17 return (h, r) Figure 3: Pseudocode of the BA algorithm for both the exponential loss with Φ1(u) = Φ2(u) = exp(u) as well as for the logistic loss with Φ1(u) = Φ2(u) = log2(1 + eu). The parameters include the cost of rejection c and β determining the strength of the the ↵-constraint for the L1 regularization. The definition of the weighted errors ✏t,k as well as the expected rejections, rk,1 and rk,2, are given in Equation 7. For other surrogate losses, the step size ⌘t is found via a line search or other numerical methods by solving argmin⌘F(↵t−1 + ⌘ek). The bound of Corollary 3 applies similarly to L⇢ SB since it is an upper bound on L⇢ MB. It can further be shown to hold uniformly for all ⇢2 (0, 1) at the price of a term in O ⇣q log log 1/⇢ m ⌘ using standard techniques [16, 22] (see Appendix C). 4 Boosting algorithm Here, we derive a boosting-style algorithm (BA algorithm) for learning an ensemble with the option of abstention for both losses LMB and LSB. Below, we describe the algorithm for LSB and refer the reader to Appendix H for the version using the loss LMB. 4.1 Objective function The BA algorithm solves a convex optimization problem that is based on Corollary 3 for loss LSB. Since the last three terms of the right-hand side of the bound of the corollary do not depend on ↵, this suggests to select ↵as the solution of min↵2∆1 m Pm i=1 L⇢ SB(h, r, xi, yi). Via a change of variable ↵ ↵/⇢that does not affect the optimization problem, we can equivalently search for min↵≥0 1 m Pm i=1 LSB(h, r, xi, yi) such that PT t=1 ↵t 1/⇢. Introducing the Lagrange variable β associated to the constraint PT t=1 ↵t 1/⇢, the problem can rewritten as: min↵≥0 1 m Pm i=1 LSB(h, r, xi, yi)+β PT t=1 ↵t. Letting {(h1, r1), . . . , (hN, rN)} be the set of base functions pairs for the classifier and rejection function, we can rewrite the optimization problem as 5 the minimization over ↵≥0 of 1 m m X i=1 Φ ⇣N X j=1 ↵jrj(xi)−yi N X j=1 ↵jhj(xi) ⌘ +c Φ ⇣ −b N X j=1 ↵jrj(xi) ⌘ +β N X j=1 ↵j. Thus, the following is the objective function of our optimization problem: F(↵) = 1 m m X i=1 Φ $ rt(xi) −yiht(xi) % + c Φ $ −b rt(xi) % + β N X j=1 ↵j. (6) 4.2 Projected coordinate descent The problem min↵≥0 F(↵) is a convex optimization problem, which we solve via projected coordinate descent. Let ek be the kth unit vector in RN and let F 0(↵, ej) be the directional derivative of F along the direction ej at ↵. The algorithm consists of the following three steps. First, it determines the direction of maximal descent by k = argmaxj2[1,N] |F 0(↵t−1, ej)|. Second, it calculates the best step ⌘along the direction that preserves non-negativity of ↵by ⌘= argmin↵t−1+⌘ek≥0 F(↵t−1 + ⌘ek). Third, it updates ↵t−1 to ↵t = ↵t−1 + ⌘ek. The pseudocode of the BA algorithm is given in Figure 3. The step and direction are based on F 0(↵t−1, ej). For any t 2 [1, T], define a distribution Dt over the pairs (i, n), with n in {1, 2} Dt(i, 1) = Φ0$ rt−1(xi) −yiht−1(xi) % Zt and Dt(i, 2) = Φ0$ −b rt−1(xi) % Zt , where Zt is the normalization factor given by Zt = Pm i=1 Φ0$ rt−1(xi) −yiht−1(xi) % + Φ0$ −b rt−1(xi) % . In order to derive an explicit formulation of the descent direction that is based on the weighted error of the classification function hj and the expected value of the rejection function rj, we use the distributions D1,t and D2,t defined by Dt(i, 1)/Z1,t and Dt(i, 1)/Z2,t where Z1,t = Pm i=1 Dt(i, 1) and Z2,t = Pm i=1 Dt(i, 2) are the normalization factors. Now, for any j 2 [1, N] and s 2 [1, T], we can define the weighted error ✏t,j and the expected value of the rejection function, rj,1 and rj,2, over distribution D1,t and D2,t as follows: ✏t,j = 1 2 h 1 − E i⇠D1,t[yihj(xi)] i , rj,1 = E i⇠D1,t[rj(xi)], and rj,2 = E i⇠D2,t[rj(xi)]. (7) Using these definition, we show (see Appendix D) that the descent direction is given by k = argmin j2[1,N] 2Z1,t✏t,j + Z1,trj,1 −2 p c(1 −c)Z2,trj,2. This equation shows that Z1,t and 2 p c(1 −c)Z2,t re-scale the weighted error and expected rejection. Thus, finding the best descent direction by minimizing this equation is equivalent to finding the best scaled trade-off between the misclassification error and the average rejection cost. The step size can in general be found via line search or other numerical methods, but we have derived a closed-form solution of the step size for both the exponential and logistic loss (see Appendix D.2). Further details of the derivation of projected coordinate descent on F are also given in Appendix D. Note that for rt ! 0+ in Equation 6, that is when the rejection terms are dropped in the objective, we retrieve the L1-regularized Adaboost. As for Adaboost, we can define a weak learning assumption which requires that the directional derivative along at least one base pair be non-zero. For β = 0, it does not hold when for all j: 2✏s,j −1 = −rj,1 + 2p c(1−c)Z2,t Z1,t rj,2, which corresponds to a balance between the edge and rejection costs for all j. Observe that in the particular case when the rejection functions are zero, it coincides with the standard weak learning assumption for Adaboost (✏s,j = 1 2 for all j). The following theorem provides the convergence of the projected coordinate descent algorithm for our objective function, F(↵). The proof is given in Appendix E. Theorem 4. Assume that Φ is twice differentiable and that Φ00(u) > 0 for all u 2 R. Then, the projected coordinate descent algorithm applied to F converges to the solution ↵⇤of the optimization problem max↵≥0 F(↵). If additionally Φ is strongly convex over the path of the iterates ↵t then there exists ⌧> 0 and ⌫> 0 such that for all t > ⌧, F(↵t+1)−F(↵⇤) $ 1−1 ⌫ %$ F(↵t)−F(↵⇤) % . 6 θ1 θ2 − + R⃝ θ1 θ2 − + R⃝ Figure 4: Illustration of the abstention stumps on a variable X. Specifically, this theorem holds for the exponential loss Φ(u) = exp(u) and the logistic loss Φ(−u) = log2(1 + e−u) since they are strongly convex over the compact set containing the ↵ts. 4.3 Abstention stumps We first define a family of base hypotheses, abstention stumps, that can be viewed as extensions of the standard boosting stumps to the setting of classification with abstention. An abstention stump h✓1,✓2 over the feature X is defined by two thresholds ✓1, ✓2 2 R with ✓1 ✓2. There are 6 different such stumps, Figure 4 illustrates two of them. For the left figure, points with variables X less than or equal to ✓1 are labeled negatively, those with X ≥✓2 are labeled positively, and those with X between ✓1 and ✓2 are rejected. In general, an abstention stump is defined by the pair $ h✓1,✓2(X), r✓1,✓2(X) % where, for Figure 4-left, h✓1,✓2(X) = −1X✓1 + 1X>✓2 and r✓1,✓2(X) = 1✓1<X✓2. Thus, our abstention stumps are pairs (h, ˆr) with h taking values in {−1, 0, 1} and ˆr in {0, 1}, and such that for any x either h(x) or ˆr(x) is zero. For our formulation and algorithm, these stumps can be used in combination with any γ > 0, to define a family of base predictor and base rejector pairs of the form (h(x), γ −ˆr(x)). Since ↵t is non-negative, the value γ is needed to correct for over-rejection by previously selected abstention stumps. The γ can be automatically learned by adding to the set of base pairs the constant functions (h0, r0) = (0, −1). An ensemble solution returned by the BA algorithm is therefore of the form $ P t ↵tht(x), P t ↵trt(x) % where ↵ts are the weights assigned to each base pair. Now, consider a sample of m points sorted by the value of X, which we denote by X1 · · · Xm. For abstention stumps, the derivative of the objective, F, can be further simplified (see Appendix G) such that the problem can be reduced to finding an abstention stump with the minimal expected abstention loss l(✓1, ✓2), that is argmin ✓1,✓2 m X i=1 2Dt(i, 1)[1yi=+11Xi✓1 + 1yi=−11Xi>✓2] + $ 2Dt(i, 1) −cb Dt(i, 2) % 1✓1<Xi✓2. Notice that given m points, at most (m + 1) thresholds need to be considered for ✓1 and ✓2. Hence, a straightforward algorithm inspects all possible O(m2) pairs (✓1, ✓2) with ✓1 ✓2 in time O(m2). However, Lemma 5 below and further derivations in Appendix G, allows for an O(m)-time algorithm for finding optimal abstention stumps when the problem is solved without the constraint ✓1 ✓2. Note that while we state the lemma for the abstention stump in Figure 4-left, similar results hold for any of the 6 types of stumps. Lemma 5. The optimization problem without the constraint (✓1 < ✓2) can be decomposed as follows: argmin ✓1,✓2 l(✓1, ✓2) = argmin ✓1 m X i=1 2Dt(i, 1)1yi=+11Xi✓1 + $ 2Dt(i, 1) −cb Dt(i, 2) % 1✓1<Xi (8) + argmin ✓2 m X i=1 2Dt(i, 1)1yi=−11Xi>✓2 + $ 2Dt(i, 1) −cb Dt(i, 2) % 1Xi✓2. (9) The optimization Problems (8) and (9) can be solved in linear time, via a method similar to that of finding the optimal threshold for a standard zero-one loss boosting stump. When the condition ✓1 < ✓2 does not hold, we can simply revert to finding the minimum of l(✓1, ✓2) in the naive way. In practice, we find most often that the optimal solution of Problem 8 and Problem 9 satisfies ✓1 < ✓2. 5 Experiments In this section, we present the results of experiments with our abstention stump BA algorithm based on LSB for several datasets. We compare the BA algorithm with the DHL algorithm [1], as well as a 7 cod pima skin 0 0.075 0.15 0.225 0.3 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost 0 0.125 0.25 0.375 0.5 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost 0 0.075 0.15 0.225 0.3 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost banknote haberman australian 0 0.04 0.08 0.12 0.16 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost 0 0.075 0.15 0.225 0.3 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost 0 0.05 0.1 0.15 0.2 0.05 0.15 0.25 0.35 0.45 Rejection Loss Cost Figure 5: Average rejection loss on the test set as a function of the abstention cost c for the TSB Algorithm (in orange), the DHL Algorithm (in red) and the BA Algorithm (in blue) based on LSB. confidence-based boosting algorithm TSB. Both of these algorithms are described in further detail in Appendix B. We tested the algorithms on six data sets from UCI’s data repository, specifically australian, cod, skin, banknote, haberman, and pima. For more information about the data sets, see Appendix I. For each data set, we implemented the standard 5-fold cross-validation where we randomly divided the data into training, validation and test set with the ratio 3:1:1. Using a different random partition, we repeated the experiments five times. For all three algorithms, the cost values ranged over c 2 {0.05, 0.1, . . . , 0.5} while threshold γ ranged over γ 2 {0.08, 0.16, . . . , 0.96}. For the BA algorithm, the β regularization parameter ranged over β 2 {0, 0.05, . . . , 0.95}. All experiments for BA were based on T = 200 boosting rounds. The DHL algorithm used polynomial kernels with degree d 2 {1, 2, 3} and it was implemented in CVX [8]. For each cost c, the hyperparameter configuration was chosen to be the set of parameters that attained the smallest average rejection loss on the validation set. For that set of parameters we report the results on the test set. We first compared the confidence-based TSB algorithm with the BA and DHL algorithms (first row of Figure 5). The experiments show that, while TSB can sometimes perform better than DHL, in a number of cases its performance is dramatically worse as a function of c and, in all cases it is outperformed by BA. In Appendix J, we give the full set of results for the TSB algorithm. In view of that, our next series of results focus on the BA and DHL algorithms, directly designed to optimize the rejection loss, for 3 other datasets (second row of Figure 5). Overall, the figures show that BA outperforms the state-of-the-art DHL algorithm for most values of c, thereby indicating that BA yields a significant improvement in practice. We have also successfully run BA on the CIFAR-10 data set (boat and horse images) which contains 10,000 instances and we believe that our algorithm can scale to much larger datasets. In contrast, training DHL on such larger samples did not terminate as it is based on a costly QCQP. In Appendix J, we present tables that report the average and standard deviation of the abstention loss as well as the fraction of rejected points and the classification error on non-rejected points. 6 Conclusion We introduced a general framework for classification with abstention where the predictor and abstention functions are learned simultaneously. We gave a detailed study of ensemble learning within this framework including: new surrogate loss functions proven to be calibrated, Rademacher complexity margin bounds for ensemble learning of the pair of predictor and abstention functions, a new boosting-style algorithm, the analysis of a natural family of base predictor and abstention functions, and the results of several experiments showing that BA algorithm yield a significant improvement over the confidence-based algorithms DHL and TSB. Our algorithm can be further extended by considering more complex base pairs such as more general ternary decision trees with rejection leaves. Moreover, our theory and algorithm can be generalized to the scenario of multi-class classification with abstention, which we have already initiated. Acknowledgments This work was partly funded by NSF CCF-1535987 and IIS-1618662. 8 References [1] P. Bartlett and M. Wegkamp. Classification with a reject option using a hinge loss. JMLR, 2008. [2] A. Bounsiar, E. Grall, and P. Beauseroy. Kernel based rejection method for supervised classification. In WASET, 2007. [3] H. L. Capitaine and C. Frelicot. An optimum class-rejective decision rule and its evaluation. In ICPR, 2010. [4] K. Chaudhuri and C. Zhang. Beyond disagreement-based agnostic active learning. In NIPS, 2014. [5] C. Chow. An optimum character recognition system using decision function. IEEE Trans. Comput., 1957. [6] C. Chow. On optimum recognition error and reject trade-off. IEEE Trans. Comput., 1970. [7] C. Cortes, G. DeSalvo, and M. Mohri. Learning with rejection. In ALT, 2016. [8] I. CVX Research. CVX: Matlab software for disciplined convex programming, version 2.0, Aug. 2012. [9] B. Dubuisson and M. Masson. Statistical decision rule with incomplete knowledge about classes. In PR, 1993. [10] R. El-Yaniv and Y. Wiener. On the foundations of noise-free selective classification. JMLR, 2010. [11] R. El-Yaniv and Y. Wiener. Agnostic selective classification. In NIPS, 2011. [12] C. Elkan. The foundations of cost-sensitive learning. In IJCAI, 2001. [13] G. Fumera and F. Roli. Support vector machines with embedded reject option. In ICPR, 2002. [14] G. Fumera, F. Roli, and G. Giacinto. Multiple reject thresholds for improving classification reliability. In ICAPR, 2000. [15] Y. Grandvalet, J. Keshet, A. Rakotomamonjy, and S. Canu. Suppport vector machines with a reject option. In NIPS, 2008. [16] V. Koltchinskii and D. Panchenko. Empirical margin distributions and bounding the generalization error of combined classifiers. Annals of Statistics, 30, 2002. [17] T. Landgrebe, D. Tax, P. Paclik, and R. Duin. The interaction between classification and reject performance for distance-based reject-option classifiers. PRL, 2005. [18] M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. Springer, New York, 1991. [19] M. Littman, L. Li, and T. Walsh. Knows what it knows: A framework for self-aware learning. In ICML, 2008. [20] Z.-Q. Luo and P. Tseng. On the convergence of coordinate descent method for convex differentiable minimization. Journal of Optimization Theory and Applications, 1992. [21] I. Melvin, J. Weston, C. S. Leslie, and W. S. Noble. Combining classifiers for improved classification of proteins from sequence or structure. BMC Bioinformatics, 2008. [22] M. Mohri, A. Rostamizadeh, and A. Talwalkar. Foundations of Machine Learning. The MIT Press, 2012. [23] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in python. In JMLR, 2011. [24] T. Pietraszek. Optimizing abstaining classifiers using ROC analysis. In ICML, 2005. [25] C. Santos-Pereira and A. Pires. On optimal reject rules and ROC curves. PRL, 2005. [26] R. E. Schapire and Y. Singer. Boostexter: A boosting-based system for text categorization. Machine Learning, 39(2-3):135–168, 2000. [27] D. Tax and R. Duin. Growing a multi-class classifier with a reject option. In Pattern Recognition Letters, 2008. [28] F. Tortorella. An optimal reject rule for binary classifiers. In ICAPR, 2001. [29] K. Trapeznikov and V. Saligrama. Supervised sequential classification under budget constraints. In AISTATS, 2013. [30] J. Wang, K. Trapeznikov, and V. Saligrama. An lp for sequential learning under budgets. In JMLR, 2014. [31] M. Yuan and M. Wegkamp. Classification methods with reject option based on convex risk minimizations. In JMLR, 2010. [32] M. Yuang and M. Wegkamp. Support vector machines with a reject option. In Bernoulli, 2011. [33] C. Zhang and K. Chaudhuri. The extended littlestone’s dimension for learning with mistakes and abstentions. In COLT, 2016. 9 | 2016 | 261 |
6,174 | Linear dynamical neural population models through nonlinear embeddings Yuanjun Gao⇤1 , Evan Archer⇤12, Liam Paninski12, John P. Cunningham12 Department of Statistics1 and Grossman Center2 Columbia University New York, NY, United States yg2312@columbia.edu, evan@stat.columbia.edu, liam@stat.columbia.edu, jpc2181@columbia.edu Abstract A body of recent work in modeling neural activity focuses on recovering lowdimensional latent features that capture the statistical structure of large-scale neural populations. Most such approaches have focused on linear generative models, where inference is computationally tractable. Here, we propose fLDS, a general class of nonlinear generative models that permits the firing rate of each neuron to vary as an arbitrary smooth function of a latent, linear dynamical state. This extra flexibility allows the model to capture a richer set of neural variability than a purely linear model, but retains an easily visualizable low-dimensional latent space. To fit this class of non-conjugate models we propose a variational inference scheme, along with a novel approximate posterior capable of capturing rich temporal correlations across time. We show that our techniques permit inference in a wide class of generative models.We also show in application to two neural datasets that, compared to state-of-the-art neural population models, fLDS captures a much larger proportion of neural variability with a small number of latent dimensions, providing superior predictive performance and interpretability. 1 Introduction Until recently, neural data analysis techniques focused primarily upon the analysis of single neurons and small populations. However, new experimental techniques enable the simultaneous recording of ever-larger neural populations (at present, hundreds to tens of thousands of neurons). Access to these high-dimensional data has spurred a search for new statistical methods. One recent approach has focused on extracting latent, low-dimensional dynamical trajectories that describe the activity of an entire population [1, 2, 3]. The resulting models and techniques permit tractable analysis and visualization of high-dimensional neural data. Further, applications to motor cortex [4] and visual cortex [5, 6] suggest that the latent trajectories recovered by these methods can provide insight into underlying neural computations. Previous work for inferring latent trajectories has considered models with a latent linear dynamics that couple with observations either linearly, or through a restricted nonlinearity [1, 3, 7]. When the true data generating process is nonlinear (for example, when neurons respond nonlinearly to a common, low-dimensional unobserved stimulus), the observation may lie in a low-dimensional nonlinear subspace that can not be captured using a mismatched observation model, hampering the ability of latent linear models to recover the low-dimensional structure from the data. Here, we propose fLDS, a new approach to inferring latent neural trajectories that generalizes several previously proposed methods. As in previous methods, we model a latent dynamical state with a ⇤These authors contributed equally. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. linear dynamical system (LDS) prior. But, under our model, each neuron’s spike rate is permitted to vary as an arbitrary smooth nonlinear function of the latent state. By permitting each cell to express its own, private non-linear response properties, our approach seeks to find a nonlinear embedding of a neural time series into a linear-dynamical state space. To perform inference in this nonlinear model we adapt recent advances in variational inference [8, 9, 10]. Using a novel approximate posterior that is capable of capturing rich correlation structure in time, our techniques can be applied to a large class of latent-LDS models. We show that our variational inference approach, when applied to learn generative models that predominate in the neural data analysis literature, performs comparably to inference techniques designed for a specific model. More interestingly, we show in both simulation and application to two neural datasets that our fLDS modeling framework yields higher prediction performance with a more compact and informative latent representation, as compared to state-of-the-art neural population models. 2 Notation and overview of neural data Neuronal signals take the form of temporally fast (⇠1 ms) spikes that are typically modeled as discrete events. Although the spiking response of individual neurons has been the focus of intense research, modern experimental techniques make it possible to study the simultaneous activity of large numbers of neurons. In real data analysis, we usually discretize time into small bins of duration ∆t and represent the response of a population of n neurons at time t by a vector xt of length n, whose ith entry represents number of spikes recorded from neuron i in time bin t, where i 2 {1, . . . , n}, t 2 {1, . . . , T}. Additionally, because spike responses are variable even under identical experimental conditions, it is commonplace to record many repeated trials, r 2 {1, . . . , R}, of the same experiment. Here, we denote xrt = (xrt1, ..., xrtn)> 2 Nn as spike counts of n neurons for time t and trial r. When the time index is suppressed, we refer to a data matrix xr = (xr1, ..., xrT ) 2 NT ⇥n. We also use x = (x1, ..., xR) 2 NT ⇥n⇥R to denote all the observations. We use analogous notation for other temporal variables; for instance zr and z. 3 Review of latent LDS neural population models Latent factor models are popular tools in neural data analysis, where they are used to infer lowdimensional, time-evolving latent trajectories (or factors) zrt 2 Rm, m ⌧n that capture a large proportion of the variability present in a neural population recording. Many recent techniques follow this general approach, with distinct noise models [3], different priors on the latent factors [11, 12], extra model structure [13] and so on. We focus upon one thread of this literature that takes its inspiration directly from the classical Kalman filter. Under this approach, the dynamics of a population of n neurons are modulated by an unobserved, linear dynamical system (LDS) with an m-dimensional latent state zrt that evolves according to, zr1 ⇠N(µ1, Q1) (1) zr(t+1)|zrt ⇠N(Azrt, Q), (2) where A is an m ⇥m linear dynamics matrix, and the matrices Q1 and Q are the covariances of the initial states and Gaussian innovation noise, respectively. The spike count observation is then related to the latent state via an observation model, xrti|zrt ⇠Pλ (λrti = [f(zrt)]i) . (3) where [f(zrt)]i is the ith element of a deterministic “rate” function f(zrt) : Rm ! Rn, and Pλ(λ) is a noise model with parameter λ. Each choice among the ingredients f and Pλ leads to a model with distinct characteristics. When Pλ is a Gaussian distribution with mean parameter λ and linear rate function f, the model reduces to the classical Kalman filter. All operations in the Kalman filter are conjugate, and inference may be performed in closed form. However, any non-Gaussian noise model Pλ or nonlinear rate function f breaks conjugacy and necessitates the use of approximate inference techniques. This is generally the case for neural models, where the discrete, positive nature of spikes suggests the use of discrete noise models with positive link[1, 3]. 2 Examples of latent LDS models for neural populations: Existing LDS models usually impose strong assumptions on the rate function. When Pλ is chosen to be Poisson with f(zrt) to be the (element-wise) exponential of a linear transformation of zrt, we recover the Poisson linear dynamical system model (PLDS)[1], xrti|zrt ⇠Poisson (λrti = exp(cizrt + di)) , (4) where ci is the ith row of the n ⇥m observation matrix C and di 2 R is the baseline firing rate of neuron i. With Pλ chosen to be a generalized count (GC) distribution and linear rate f, the model is called the generalized count linear dynamical system (GCLDS) [3], xrti|zt ⇠GC (λrti = cizrt, gi(·)) . (5) where GC(λ, g(·)) is a distribution family parameterized by λ 2 R and a function g(·) : N ! R, distributed as, pGC(k; λ, g(·)) = exp(λk + g(k)) k!M(λ, g(·)) . k 2 N (6) where M(λ, g(·)) = P1 k=0 exp(λk+g(k)) k! is the normalizing constant. The GC model can flexibly capture under- and over-dispersed count distributions. 4 Nonlinear latent variable models for neural populations 4.1 Generative Model: Linear dynamical system with nonlinear observation We relax the linear assumptions of the previous LDS-based neural population models by incorporating a per-neuron rate function. We retain the latent LDS of eq. 1 and eq. 2, but select an observation model such that each neuron has a separate nonlinear dependence upon the latent variable, xrti|zrt ⇠Pλ (λrti = [f (zrt)]i) , (7) where Pλ(λ) is a noise model with parameter λ; f : Rm ! Rn is an arbitrary continuous function from the latent state into the spike rate; and [f (zrt)]i is the ith element of f (zrt). In principle, the rate functions may be represented using any technique for function approximation. Here, we represent f (·) through a feed-forward neural network model. The parameters then amount to the weights and biases of all units across all layers. For the remainder of the text, we use ✓to denote all generative model parameters: ✓= (µ1, Q1, A, Q, ). We refer to this class of models as fLDS. To refer to an fLDS with a given noise model Pλ, we prepend the noise model to the acronym. In the experiments, we will consider both PfLDS (taking Pλ to be Poisson) and GCfLDS (taking Pλ to be a generalized count distribution). 4.2 Model Fitting: Auto-encoding variational Bayes (AEVB) Our goal is to learn the model parameters ✓and to infer the posterior distribution over the latent variables z. Ideally, we would perform maximum likelihood estimation on the parameters, ˆ✓= arg max✓log p✓(x) = arg max✓ PR r=1 R p✓(xr, zr)dzr, and compute the posterior pˆ✓(z|x). However, under a fLDS neither the p✓(z|x) nor p✓(x) are computationally tractable (both due to the noise model Pλ and the nonlinear observation model f (·)). As a result, we pursue a stochastic variational inference approach to simultaneously learn parameters ✓and infer the distribution of z. The strategy of variational inference is to approximate the intractable posterior distribution p✓(z|x) by a tractable distribution qφ(z|x), which carries its own parameters φ.2 With an approximate posterior3 in hand, we learn both p✓(z, x) and qφ(z|x) simultanously by maximizing the evidence lower bound (ELBO) of the marginal log likelihood: log p✓(x) ≥L(✓, φ; x) = R X r=1 L(✓, φ; xr) = R X r=1 Eqφ(zr|xr) log p✓(xr, zr) qφ(zr|xr) % . (8) 2Here, we consider a posterior qφ(z|x) that is conditioned explicitly upon x. However, this is not necessary for variational inference. 3The approximate posterior is also sometimes called a “recognition model”. 3 We optimize L(✓, φ; x) by stochastic gradient ascent, using a Monte Carlo estimate of the gradient rL. It is well-documented that Monte Carlo estimates of rL are typically of very high variance, and strategies for variance reduction are an active area of research [14, 15]. Here, we take an auto-encoding variational Bayes (AEVB) approach [8, 9, 10] to estimate rL. In AEVB, we choose an easy-to-sample random variable ✏⇠p(✏) and sample z through a transformation of random sample ✏parameterized by observations x and parameters φ: z = hφ(x, ✏) to get a rich set of variational distributions qφ(z|x). We then use the unbiased gradient estimator on minibatches consisting of a randomly selected single trials xr, rL(✓, φ; x) ⇡RrL(✓, φ; xr) (9) ⇡R " 1 L L X l=1 r log p✓(xr, hφ(xr, ✏l)) −rEqφ(zr|xr) [log qφ(zr|xr)] # , (10) where ✏l are iid samples from p(✏). In practice, we evaluate the gradient in eq. 9 using a single sample from p(✏) (L = 1) and use ADADELTA for stochastic optimization [16]. Choice of approximate posterior qφ(z|x): The AEVB approach to inference is appealing in its generality: it is well-defined for a large class of generative models p✓(x, z) and approximate posteriors qφ(z|x). In practice, however, the performance of the algorithm has a strong dependence upon the particular structure of these models. In our case, we use an approximate posterior that is designed explicitly to parameterize a temporally correlated approximate posterior [17]. We use a Gaussian approximate posterior, qφ(zr|xr) = N (µφ(xr), ⌃φ(xr)) , (11) where µφ(xr) is a mT ⇥1 mean vector and ⌃φ(xr) is a mT ⇥mT covariance matrix. Both µφ(xr) and ⌃φ(xr) are parameterized by observations x through a structured neural network, as described in detail in supplementary material. We can sample from this approximate by setting p(✏) ⇠N(0, I) and hφ(✏; x) = µφ(x) + ⌃1/2 φ (xr)✏, where ⌃1/2 φ is the Cholesky decomposition of ⌃φ. This approach is similar to that of [8], except that we impose a block-tridiagonal structure upon the precision matrix ⌃φ −1 (rather than a diagonal covariance), which can express rich temporal correlations across time (essential for the posterior to capture the smooth, correlated trajectories typical of LDS posteriors), while remaining tractable with a computational complexity that scales linearly with T, the length of a trial. 5 Experiments 5.1 Simulation experiments Linear dynamical system models with shared, fixed rate function: Our AEVB approach in principle permits inference in any latent LDS model. To illustrate this flexibility, we simulate 3 datasets from previously-proposed models of neural responses. In our simulations, each datagenerating model has a latent LDS state of m = 2 dimensions, as described by eq. 1 and eq. 2. In all data-generating models, spike rates depend on the latent state variable through a fixed link function f that is common across neurons. Each data-generating model has a distinct observation model (eq. 3): Bernoulli (logistic link), Poisson (exponential link), or negative-binomial (exponential link). We compare PLDS and GCLDS model fits to each datasets, using both our AEVB algorithm and two EM-based inference algorithms: LapEM (which approximates p(z|x) with a multivariate Gaussian by Laplace approximation in the E-step [1, 3]) and VBDual (which approximates p(z|x) with a multivariate Gaussian by variational inference, through optimization in the dual space [18, 3]). Additionally, we fit PfLDS and GCfLDS models with the AEVB algorithm. On this linear simulated data we do not expect these nonlinear techniques to outperform linear methods. In all simulation studies we generate 20 training trials and 20 testing trials, with 100 simulated neurons and 200 time bins for each trial. Results are averaged across 10 repeats. We compare the predictive performance and running times of the algorithms in Table 1. For both PLDS and GCLDS, our AEVB algorithm gives results comparable to, though slightly worse than, the 4 Table 1: Simulation results with a linear observation model: Each column contains results for a distinct experiment, where the true data-generating distribution was either Bernoulli, Poisson or Negative-binomial. For each generative model and inference algorithm (one per row), we report the predictive log likelihood (PLL) and computation time (in minutes) of the model fit to each dataset. We report the PLL (divided by number of observations) on test data, using one-step-ahead prediction. When training a model using the AEVB algorithm, we run 500 epochs before stopping. For LapEM and VBDual, we initialize with nuclear norm minimization [2] and stop either after 200 iterations or when the ELBO (scaled by number of time bins) increases by less than ✏= 10−9 after one iteration. Bernoulli Poisson Negative-binomial Model Inference PLL Time PLL Time PLL Time PLDS LapEM -0.446 3 -0.385 5 -0.359 5 VBDual -0.446 157 -0.385 170 -0.359 138 AEVB -0.445 50 -0.387 55 -0.363 53 PfLDS AEVB -0.445 56 -0.387 58 -0.362 50 GCLDS LapEM -0.389 40 -0.385 97 -0.359 101 VBDual -0.389 131 -0.385 126 -0.359 127 AEVB -0.390 69 -0.386 75 -0.361 73 GCfLDS AEVB -0.390 72 -0.386 76 -0.361 68 LapEM and VBEM algorithms. Although PfLDS and GCfLDS assume a much more complicated generative model, both provide comparable predictive performance and running time. We note that while LapEM is competitive in running time in this relatively small-data setting, the AEVB algorithm may be more desirable in a large data setting, where it can learn model parameters even before seeing the full dataset. In constrast, both LapEM and VBDual require a full pass through the data in the E-step before the M-step parameter updates. The recognition model used by AEVB can also be used to initialize the LapEM and VBEM in the linear LDS cases. Simulation with “grid cell” type response: A grid cell is a type of neuron that is activated when an animal occupies any vertex of a grid spanning the environment [19]. When an animal moves along a one-dimensional line in the space, grid cells exhibit oscillatory responses. Motivated by the response properties of grid cells, we simulated a population of 100 spiking neurons with oscillatory link functions and a shared, one-dimensional input zrt 2 R given by, zr1 = 0, (12) zr(t+1) ⇠N(0.99zrt, 0.01). (13) The log firing rate of each neuron, indexed by i, is coupled to the latent variable zrt through a sinusoid with a neuron-specific phase φi and frequency !i xrti ⇠Poisson (λrit = exp(2 sin(!izrt + φi) −2)) . (14) We generated φi uniformly at random in the region [0, 2⇡] and set !i = 1 for neurons with index i 50 and !i = 3 for neurons with index i > 50. We simulated 150 training and 20 testing trials, each with T = 120 time bins. We repeated this simulated experiment 10 times. We compare performance of PLDS with PfLDS, both with a 1-dimensional latent variable. As shown in Figure 1, PLDS is not able to adapt to the nonlinear and non-monotonic link function, and cannot recover the true latent variable (left panel and bottom right panel) or spike rate (upper right panel). On the other hand the PfLDS model captures the nonlinearity well, recovering the true latent trajectory. The one-step-ahead predictive log likelihood (PLL) on a held-out dataset for PLDS is -0.622 (se=0.006), for PfLDS is -0.581 (se=0.006). A paired t-test for PLL is significant (p < 10−6). 5.2 Applications to experimentally-recorded neural data We analyze two multi-neuron spike-train datasets, recorded from primary visual cortex and primary motor cortex of the macaque brain, respectively. We find that fLDS models outperform PLDS in terms of predictive performance on held out data. Further, we find that the latent trajectories uncovered by fLDS are lower-dimensional and more structured than those recovered by PLDS. 5 True latent variable Fitted latent variable True PLDS, R2=0.75 PfLDS, R2=0.98 -1 0 1 0 0.5 1 Firing rate Neuron #49 -1 0 1 True latent variable 0 0.5 1 Neuron #50 -1 0 1 0 0.5 1 1.5 Neuron #51 -1 0 1 0 0.5 1 1.5 Neuron #52 0 20 40 60 80 100 120 Time Latent variable True PLDS PfLDS Figure 1: Sample simulation result with “grid cell” type response. Left panel: Fitted latent variable compared to true latent variable; Upper right panel: Fitted rate compared to the true rate for 4 sample neurons; Bottom right panel: Inferred trace of the latent variable compared to true latent trace. Note that the latent trajectory for a 1-dimensional latent variable is identifiable up to multiplicative constant, and here we scale the latent variables to lie between 0 and 1. Macaque V1 with drifting grating stimulus with single orientation: The dataset consists of 148 neurons simultaneously recorded from the primary visual cortex (area V1) of an anesthetized macaque, as described in [20] (array 5). Data were recorded while the monkey watched a 1280ms movie of a sinusoidal grating drifting in one of 72 orientations: (0◦, 5◦, 10◦,...). Each of the 72 orientations was repeated R = 50 times. We analyze the spike activity from 300ms to 1200ms after stimulus onset. We discretize the data at ∆t = 10ms, resulting in T = 90 timepoints per trial. Following [20], we consider the 63 neurons with well-behaved tuning-curves. We performed both single-orientation and whole-dataset analysis. We first use 12 equal spaced grating orientations (0◦, 30◦, 60◦,...) and analyze each orientation separately. To increase sample size, for each orientation we pool data from the 2 neighboring orientations (e.g. for orientation 0◦, we include data from orientation 5◦and 355◦), thereby getting 150 trials for each dataset (we find similar, but more variable, results when we do not include neighboring orientations). For each orientation, we divide the data into 120 training trials and 30 testing trials. For PfLDS we further divide the 120 training trials into 110 trials for fitting and 10 trials for validation (we use the ELBO on validation set to determine when to stop training). We do not include a stimulus model, but rather perform unsupervised learning to recover a low-dimensional representation that combines both internal and stimulus-driven dynamics. We take orientation 0◦as an example (the other orientations exhibit a similar pattern) and compare the fitted result of PLDS and PfLDS with a 2-dimensional latent space, which should in principle adequately capture the oscillatory pattern of the neural responses. We find that PfLDS is able to capture the nonlinear response charateristics of V1 complex cells (Fig. 2(a), black line), while PLDS can only reliably capture linear responses (Fig. 2(a), blue line). In Fig. 2(b)(c) we project all trajectories onto the 2-dimensional latent manifold described by the PfLDS. We find that both techniques recover a manifold that reveals the rotational structure of the data; however, by offsetting the nonlinear features of the data into the observation model, PfLDS recovers a much cleaner latent representation(Fig. 2(c)). We assess the model fitting quality by one-step-ahead prediction on a held-out dataset; we compare both percentage mean squared error (MSE) reduction and negative predictive log likelihood (NLL) reduction. We find that PfLDS recovers more compact representations than the PLDS, for the same performance in MSE and NLL. We illustrate this in Fig. 2(d)(e), where PLDS requires approximately 10 latent dimensions to obtain the same predictive performance as an PfLDS with 3 latent dimensions. This result makes intuitive sense: during the stimulus-driven portion of the experiment, neural activity is driven primarily by a low-dimensional, oscillatory stimulus drive (the drifting grating). We find that the highly nonlinear generative models used by PfLDS lead to lower-dimensional and hence more interpretable latent-variable representations. To compare the performance of PLDS and PfLDS on the whole dataset, we use 10 trials from each of the 72 grating orientations (720 trials in total) as a training set, and 1 trial from each orientation 6 (a) (b) PLDS (c) PfLDS 0 50 100 Neuron #77 0 50 100 Firing rate (spike/s) Neuron #115 True PLDS PfLDS 300 600 900 1200 Time after stimulus onset (ms) 0 50 100 Neuron #145 300 600 900 1200 Time after stimulus onset (ms) (d) (e) 2 4 6 8 10 Latent dimensionality 0 5 10 15 % MSE reduction 2 4 6 8 10 Latent dimensionality 0 5 10 15 20 % NLL reduction Figure 2: Results for fits to Macaque V1 data (single orientation) (a) Comparing true firing rate (black line) with fitted rate from PLDS (blue) and PfLDS (red) with 2 dimensional latent space for selected neurons (orientation 0◦, averaged across all 120 training trials); (b)(c) 2D latent-space embeddings of 10 sample training trials, color denotes phase of the grating stimulus (orientation 0◦); (d)(e) Predictive mean square error (MSE) and predictive negative log likelihood (NLL) reduction with one-step-ahead prediction, compared to a baseline model (homogeneous Poisson process). Results are averaged across 12 orientations. as a test set. For PfLDS we further divide the 720 trials into 648 for fitting and 72 for validation. We observe in Fig. 3(a)(b) that PfLDS again provides much better predictive performance with a small number of latent dimensions. We also find that for PfLDS with 4 latent dimensions, when we projected the observation into the latent space and take the first 3 principal components, the trajectory forms a torus (Fig. 3(c)). Once again, this result has an intuitive appeal: just as the sinusoidal stimuli (for a fixed orientation, across time) are naturally embedded into a 2D ring, stimulus variation in orientation (at a fixed time) also has a natural circular symmetry. Taken together, the stimulus has a natural toroidal topology. We find that fLDS is capable of uncovering this latent structure, even without any prior knowledge of the stimulus structure. (a) (b) (c) 2 4 6 8 10 Latent dimensionality 0 5 10 15 % MSE reduction 2 4 6 8 10 Latent dimensionality 0 5 10 15 20 % NLL reduction PLDS PfLDS 500ms after stimulus onset 0 50 100 150 Grating orientation (degree) Figure 3: Macaque V1 data fitting result (full data) (a)(b) Predictive MSE and NLL reduction. (c) 3D embedding of the mean latent trajectory of the neuron activity during 300ms to 500ms after stimulus onset across grating orientations 0◦, 5◦, ..., 175◦, here we use PfLDS with 4 latent dimensions and then project the result on the first 3 principal components. A video for the 3D embedding can be found at https://www.dropbox.com/s/cluev4fzfsob4q9/video_fLDS.mp4?dl=0 Macaque center-out reaching data: We analyzed the neural population data recorded from the macaque motor cortex(G20040123), details of which can be found in [11, 1]. Briefly, the data consist of simultaneous recordings of 105 neurons for 56 cued reaches from the center of a screen to 14 peripheral targets. We analyze the reaching period (50ms before and 370ms after movement onset) for each trial. We discretize the data at ∆t = 20ms, resulting in T = 21 timepoints per trial. For each target we use 50 training trials and 6 testing trials and fit all the 14 reaching targets together (making 700 training trials and 84 testing trials). We use both Poisson and GC noise models, as GC 7 has the flexibility to capture the noted under-dispersion of the data [3]. We compare both PLDS and PfLDS as well as GCLDS and GCfLDS fits. For both PfLDS and GCfLDS we further divide the training trials into 630 for fitting and 70 for validation. As is shown in figure Fig. 4(d), PfLDS and GCfLDS with latent dimension 2 or 3 outperforms their linear counterparts with much larger latent dimensions. We also find that GCLDS and GCfLDS models give much better predictive likelihood than their Poisson counterparts. On figure Fig. 4(b)(c) we project the neural activities on the 2 dimensional latent space. We find that PfLDS (Fig. 4(c)) clearly separates the reaching trajectories and orders them in exact correspondence with the true spatial location of the targets. (a)Reaching trajectory (b) PLDS (c) PfLDS (d) 2 4 6 8 Latent dimensionality 4 6 8 10 12 % NLL reduction PLDS PfLDS GCLDS GCfLDS Figure 4: Macaque center-out reaching data analysis: (a) 5 sample reaching trajectory for each of the 14 target locations. Directions are coded by different color, and distances are coded by different marker size; (b)(c) 2D embeddings of neuron activity extracted by PLDS and PfLDS, circles represent 50ms before movement onset and triangles represent 340ms after movement onset. Here 5 training reaches for each target location are plotted; (d) Predictive negative log likelihood (NLL) reduction with one-step-ahead prediction. 6 Discussion and Conclusion We have proposed fLDS, a modeling framework for high-dimensional neural population data that extends previous latent, low-dimensional linear dynamical system models with a flexible, nonlinear observation model. Additionally, we described an efficient variational inference algorithm suitable for fitting a broad class of LDS models – including several previously-proposed models. We illustrate in both simulation and application to real data that, even when a neural population is modulated by a low-dimensional linear dynamics, a latent variable model with a linear rate function fails to capture the true low-dimensional structure. In constrast, a fLDS can recover the low-dimensional structure, providing better predictive performance and more interpretable latent-variable representations. [21] extends the linear Kalman filter by using neural network models to parameterize both the dynamic equation and the observation equation, they uses RNN based recognition model for inference. [22] composes graphical models with neural network observations and proposes structured auto encoder variational inference algorithm for inference. Ours focus on modeling count observations for neural spike train data, which is orthogonal to the papers mentioned above. Our approach is distinct from related manifold learning methods [23, 24]. While most manifold learning techniques rely primarily on the notion of nearest neighbors, we exploit the temporal structure of the data by imposing strong prior assumption about the dynamics of our latent space. Further, in contrast to most manifold learning approaches, our approach includes an explicit generative model that lends itself naturally to inference and prediction, and allows for count-valued observations that account for the discrete nature of neural data. Future work includes relaxing the latent linear dynamical system assumption to incorporate more flexible latent dynamics (for example, by using a Gaussian process prior [12] or by incorporating a nonlinear dynamical phase space [25]). We also anticipate our approach may be useful in applications to neural decoding and prosthetics: once trained, our approximate posterior may be evaluated in close to real-time. A Python/Theano [26, 27] implementation of our algorithms is available at http://github.com/ earcher/vilds. 8 References [1] 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 NIPS, pp. 1350–1358, 2011. [2] D. Pfau, E. A. Pnevmatikakis, and L. Paninski, “Robust learning of low-dimensional dynamics from large neural ensembles,” in NIPS, pp. 2391–2399, 2013. [3] Y. Gao, L. Busing, K. V. Shenoy, and J. P. Cunningham, “High-dimensional neural spike train analysis with generalized count linear dynamical systems,” in NIPS, pp. 2035–2043, 2015. [4] 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, pp. 51–56, 2012. [5] R. L. Goris, J. A. Movshon, and E. P. Simoncelli, “Partitioning neuronal variability,” Nature neuroscience, vol. 17, no. 6, pp. 858–865, 2014. [6] A. S. Ecker, P. Berens, R. J. Cotton, M. Subramaniyan, G. H. Denfield, C. R. Cadwell, S. M. Smirnakis, M. Bethge, and A. S. Tolias, “State dependence of noise correlations in macaque primary visual cortex,” Neuron, vol. 82, no. 1, pp. 235–248, 2014. [7] E. W. Archer, U. Koster, J. W. Pillow, and J. H. Macke, “Low-dimensional models of neural population activity in sensory cortical circuits,” in NIPS, pp. 343–351, 2014. [8] D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” arXiv preprint arXiv:1312.6114, 2013. [9] M. Titsias and M. Lázaro-Gredilla, “Doubly stochastic variational bayes for non-conjugate inference,” in ICML, pp. 1971–1979, 2014. [10] D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” arXiv preprint arXiv:1401.4082, 2014. [11] B. M. Yu, 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,” Journal of Neurophysiology, vol. 102, no. 1, pp. 614–635, 2009. [12] Y. Zhao and I. M. Park, “Variational latent gaussian process for recovering single-trial dynamics from population spike trains,” arXiv preprint arXiv:1604.03053, 2016. [13] L. Buesing, T. A. Machado, J. P. Cunningham, and L. Paninski, “Clustered factor analysis of multineuronal spike data,” in NIPS, pp. 3500–3508, 2014. [14] Y. Burda, R. Grosse, and R. Salakhutdinov, “Importance weighted autoencoders,” arXiv preprint arXiv:1509.00519, 2015. [15] R. Ranganath, S. Gerrish, and D. M. Blei, “Black box variational inference,” arXiv preprint arXiv:1401.0118, 2013. [16] M. D. Zeiler, “ADADELTA: An adaptive learning rate method,” arXiv preprint arXiv:1212.5701, 2012. [17] E. Archer, I. M. Park, L. Buesing, J. Cunningham, and L. Paninski, “Black box variational inference for state space models,” arXiv preprint arXiv:1511.07367, 2015. [18] M. Emtiyaz Khan, A. Aravkin, M. Friedlander, and M. Seeger, “Fast dual variational inference for non-conjugate latent gaussian models,” in ICML, pp. 951–959, 2013. [19] T. Hafting, M. Fyhn, S. Molden, M.-B. Moser, and E. I. Moser, “Microstructure of a spatial map in the entorhinal cortex,” Nature, vol. 436, no. 7052, pp. 801–806, 2005. [20] A. B. Graf, A. Kohn, M. Jazayeri, and J. A. Movshon, “Decoding the activity of neuronal populations in macaque primary visual cortex,” Nature neuroscience, vol. 14, no. 2, pp. 239–245, 2011. [21] R. G. Krishnan, U. Shalit, and D. Sontag, “Deep Kalman filters,” arXiv preprint arXiv:1511.05121, 2015. [22] M. J. Johnson, D. Duvenaud, A. B. Wiltschko, S. R. Datta, and R. P. Adams, “Composing graphical models with neural networks for structured representations and fast inference,” arXiv:1603.06277, 2016. [23] S. T. Roweis and L. K. Saul, “Nonlinear dimensionality reduction by locally linear embedding,” Science, vol. 290, no. 5500, pp. 2323–2326, 2000. [24] J. B. Tenenbaum, V. De Silva, and J. C. Langford, “A global geometric framework for nonlinear dimensionality reduction,” science, vol. 290, no. 5500, pp. 2319–2323, 2000. [25] R. Frigola, Y. Chen, and C. Rasmussen, “Variational gaussian process state-space models,” in NIPS, pp. 3680–3688, 2014. [26] F. Bastien, P. Lamblin, R. Pascanu, J. Bergstra, I. Goodfellow, A. Bergeron, N. Bouchard, D. Warde-Farley, and Y. Bengio, “Theano: new features and speed improvements,” arXiv preprint arXiv:1211.5590, 2012. [27] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, D. Warde-Farley, and Y. Bengio, “Theano: a CPU and GPU math expression compiler,” in Proceedings of the Python for scientific computing conference (SciPy), vol. 4, p. 3, Austin, TX, 2010. 9 | 2016 | 262 |
6,175 | Rényi Divergence Variational Inference Yingzhen Li University of Cambridge Cambridge, CB2 1PZ, UK yl494@cam.ac.uk Richard E. Turner University of Cambridge Cambridge, CB2 1PZ, UK ret26@cam.ac.uk Abstract This paper introduces the variational Rényi bound (VR) that extends traditional variational inference to Rényi’s α-divergences. This new family of variational methods unifies a number of existing approaches, and enables a smooth interpolation from the evidence lower-bound to the log (marginal) likelihood that is controlled by the value of α that parametrises the divergence. The reparameterization trick, Monte Carlo approximation and stochastic optimisation methods are deployed to obtain a tractable and unified framework for optimisation. We further consider negative α values and propose a novel variational inference method as a new special case in the proposed framework. Experiments on Bayesian neural networks and variational auto-encoders demonstrate the wide applicability of the VR bound. 1 Introduction Approximate inference, that is approximating posterior distributions and likelihood functions, is at the core of modern probabilistic machine learning. This paper focuses on optimisation-based approximate inference algorithms, popular examples of which include variational inference (VI), variational Bayes (VB) [1, 2] and expectation propagation (EP) [3, 4]. Historically, VI has received more attention compared to other approaches, although EP can be interpreted as iteratively minimising a set of local divergences [5]. This is mainly because VI has elegant and useful theoretical properties such as the fact that it proposes a lower-bound of the log-model evidence. Such a lower-bound can serve as a surrogate to both maximum likelihood estimation (MLE) of the hyper-parameters and posterior approximation by Kullback-Leibler (KL) divergence minimisation. Recent advances of approximate inference follow three major trends. First, scalable methods, e.g. stochastic variational inference (SVI) [6] and stochastic expectation propagation (SEP) [7, 8], have been developed for datasets comprising millions of datapoints. Recent approaches [9, 10, 11] have also applied variational methods to coordinate parallel updates arising from computations performed on chunks of data. Second, Monte Carlo methods and black-box inference techniques have been deployed to assist variational methods, e.g. see [12, 13, 14, 15] for VI and [16] for EP. They all proposed ascending the Monte Carlo approximated variational bounds to the log-likelihood using noisy gradients computed with automatic differentiation tools. Third, tighter variational lower-bounds have been proposed for (approximate) MLE. The importance weighted auto-encoder (IWAE) [17] improved upon the variational auto-encoder (VAE) [18, 19] framework, by providing tighter lowerbound approximations to the log-likelihood using importance sampling. These recent developments are rather separated and little work has been done to understand their connections. In this paper we try to provide a unified framework from an energy function perspective that encompasses a number of recent advances in variational methods, and we hope our effort could potentially motivate new algorithms in the future. This is done by extending traditional VI to Rényi’s α-divergence [20], a rich family that includes many well-known divergences as special cases. After reviewing useful properties of Rényi divergences and the VI framework, we make the following contributions: 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Table 1: Special cases in the Rényi divergence family. α Definition Notes α →1 R p(θ) log p(θ) q(θ)dθ Kullback-Leibler (KL) divergence, used in VI (KL[q||p]) and EP (KL[p||q]) α = 0.5 −2 log(1 −Hel2[p||q]) function of the square Hellinger distance α →0 −log R p(θ)>0 q(θ)dθ zero when supp(q) ⊆supp(p) (not a divergence) α = 2 −log(1 −χ2[p||q]) proportional to the χ2-divergence α →+∞ log maxθ∈Θ p(θ) q(θ) worst-case regret in minimum description length principle [24] • We introduce the variational Rényi bound (VR) as an extension of VI/VB. We then discuss connections to existing approaches, including VI/VB, VAE, IWAE [17], SEP [7] and black-box alpha (BB-α) [16], thereby showing the richness of this new family of variational methods. • We develop an optimisation framework for the VR bound. An analysis of the bias introduced by stochastic approximation is also provided with theoretical guarantees and empirical results. • We propose a novel approximate inference algorithm called VR-max as a new special case. Evaluations on VAEs and Bayesian neural networks show that this new method is often comparable to, or even better than, a number of the state-of-the-art variational methods. 2 Background This section reviews Rényi’s α-divergence and variational inference upon which the new framework is based. Note that there exist other α-divergence definitions [21, 22] (see appendix). However we mainly focus on Rényi’s definition as it enables us to derive a new class of variational lower-bounds. 2.1 Rényi’s α-divergence We first review Rényi’s α-divergence [20, 23]. Rényi’s α-divergence, defined on {α : α > 0, α ̸= 1, |Dα| < +∞}, measures the “closeness” of two distributions p and q on a random variable θ ∈Θ: Dα[p||q] = 1 α −1 log Z p(θ)αq(θ)1−αdθ. (1) The definition is extended to α = 0, 1, +∞by continuity. We note that when α →1 the KullbackLeibler (KL) divergence is recovered, which plays a crucial role in machine learning and information theory. Some other special cases are presented in Table 1. The method proposed in this work also considers α ≤0 (although (1) is no longer a divergence for these α values), and we include from [23] some useful properties for forthcoming derivations. Proposition 1. (Monotonicity) Rényi’s α-divergence definition (1), extended to negative α, is continuous and non-decreasing on α ∈{α : −∞< Dα < +∞}. Proposition 2. (Skew symmetry) For α ̸∈{0, 1}, Dα[p||q] = α 1−αD1−α[q||p]. This implies Dα[p||q] ≤0 for α < 0. For the limiting case D−∞[p||q] = −D+∞[q||p]. A critical question that is still in active research is how to choose a divergence in this rich family to obtain optimal solution for a particular application, an issue which is discussed in the appendix. 2.2 Variational inference Next we review the variational inference algorithm [1, 2] using posterior approximation as a running example. Consider observing a dataset of N i.i.d. samples D = {xn}N n=1 from a probabilistic model p(x|θ) parametrised by a random variable θ that is drawn from a prior p0(θ). Bayesian inference involves computing the posterior distribution of the parameters given the data, p(θ|D, ϕ) = p(θ, D|ϕ) p(D|ϕ) = p0(θ|ϕ) QN n=1 p(xn|θ, ϕ) p(D|ϕ) , (2) 2 (a) Approximated posterior. (VI) (b) Hyper-parameter optimisation. Figure 1: Mean-Field approximation for Bayesian linear regression. In this case ϕ = σ the observation noise variance. The bound is tight as σ →+∞, biasing the VI solution to large σ values. where p(D|ϕ) = R p0(θ|ϕ) QN n=1 p(xn|θ, ϕ)dθ is called marginal likelihood or model evidence. The hyper-parameters of the model are denoted as ϕ which might be omitted henceforth for notational ease. For many powerful models the exact posterior is typically intractable, and approximate inference introduces an approximation q(θ) in some tractable distribution family Q to the exact posterior. One way to obtain this approximation is to minimise the KL divergence KL[q(θ)||p(θ|D)], which is also intractable due the difficult term p(D). Variational inference (VI) sidesteps this difficulty by considering an equivalent optimisation problem that maximises the variational lower-bound: LVI(q; D, ϕ) = log p(D|ϕ) −KL[q(θ)||p(θ|D, ϕ)] = Eq log p(θ, D|ϕ) q(θ) . (3) The variational lower-bound can also be used to optimise the hyper-parameters ϕ. To illustrate the approximation quality of VI we present a mean-field approximation example to Bayesian linear regression in Figure 1(a) (in magenta). Readers are referred to the appendix for details, but essentially a factorised Gaussian approximation is fitted to the true posterior, a correlated Gaussian in this case. The approximation recovers the posterior mean correctly, but is over-confident. Moreover, as LVI is the difference between the marginal likelihood and the KL divergence, hyperparameter optimisation can be biased away from the exact MLE towards the region of parameter space where the KL term is small [25] (see Figure 1(b)). 3 Variational Rényi bound Recall from Section 2.1 that the family of Rényi divergences includes the KL divergence. Perhaps variational free-energy approaches can be generalised to the Rényi case? Consider approximating the exact posterior p(θ|D) by minimizing Rényi’s α-divergence Dα[q(θ)||p(θ|D)] for some selected α > 0. Now we consider the equivalent optimization problem maxq∈Q log p(D)−Dα[q(θ)||p(θ|D)], and when α ̸= 1, whose objective can be rewritten as Lα(q; D) := 1 1 −α log Eq "p(θ, D) q(θ) 1−α# . (4) We name this new objective the variational Rényi (VR) bound. Importantly the above definition can be extend to α ≤0, and the following theorem is a direct result of Proposition 1. Theorem 1. The objective Lα(q; D) is continuous and non-increasing on α ∈{α : |Lα| < +∞}. Especially for all 0 < α+ < 1 and α−< 0, LVI(q; D) = lim α→1 Lα(q; D) ≤Lα+(q; D) ≤L0(q; D) ≤Lα−(q; D) Also L0(q; D) = log p(D) if and only if the support supp(p(θ|D)) ⊆supp(q(θ)). Theorem 1 indicates that the VR bound can be useful for model selection by sandwiching the marginal likelihood with bounds computed using positive and negative α values, which we leave to future work. In particular L0 = log p(D) under the mild assumption that q is supported where the exact 3 posterior is supported. This assumption holds for many commonly used distributions, e.g. Gaussians are supported on the entire space, and in the following we assume that this condition is satisfied. Choosing different alpha values allows the approximation to balance between zero-forcing (α → +∞, when using uni-modal approximations it is usually called mode-seeking) and mass-covering (α →−∞) behaviour. This is illustrated by the Bayesian linear regression example, again in Figure 1(a). First notice that α →+∞(in cyan) returns non-zero uncertainty estimates (although it is more over-confident than VI) which is different from the maximum a posteriori (MAP) method that only returns a point estimate. Second, setting α = 0.0 (in green) returns q(θ) = Q i p(θi|D) and the exact marginal likelihood log p(D) (Figure 1(b)). Also the approximate MLE is less biased for α = 0.5 (in blue) since now the tightness of the bound is less hyper-parameter dependent. 4 The VR bound optimisation framework This section addresses several issues of the VR bound optimisation by proposing further approximations. First when α ̸= 1, the VR bound is usually just as intractable as the marginal likelihood for many useful models. However Monte Carlo (MC) approximation is applied here to extend the set of models that can be handled. The resulting method can be applied to any model that MC-VI [12, 13, 14, 15] is applied to. Second, Theorem 1 suggests that the VR bound is to be minimised when α < 0, which performs disastrously in MLE context. As we shall see, this issue is solved also by the MC approximation under certain conditions. Third, a mini-batch training method is developed for large-scale datasets in the posterior approximation context. Hence the proposed optimisation framework of the VR bound enables tractable application to the same class of models as SVI. 4.1 Monte Carlo approximation of the VR bound Consider learning a latent variable model with MLE as a running example, where the model is specified by a conditional distribution p(x|h, ϕ) and a prior p(h|ϕ) on the latent variables h. Examples include models treated by the variational auto-encoder (VAE) approach [18, 19] that parametrises the likelihood with a (deep) neural network. MLE requires log p(x) which is obtained by marginalising out h and is often intractable, so the VR bound is considered as an alternative optimisation objective. However instead of using exact bounds, a simple Monte Carlo (MC) method is deployed, which uses finite samples hk ∼q(h|x), k = 1, ..., K to approximate Lα ≈ˆLα,K: ˆLα,K(q; x) = 1 1 −α log 1 K K X k=1 "p(hk, x) q(hk|x) 1−α# . (5) The importance weighted auto-encoder (IWAE) [17] is a special case of this framework with α = 0 and K < +∞. But unlike traditional VI, here the MC approximation is biased. Fortunately we can characterise the bias by the following theorems proved in the appendix. Theorem 2. Assume E{hk}K k=1[| ˆLα,K(q; x)|] < +∞and |Lα| < +∞. Then E{hk}K k=1[ ˆLα,K(q; x)] as a function of α ∈R and K ≥1 is: 1) non-decreasing in K for fixed α ≤1, and non-increasing in K for fixed α ≥1; 2) E{hk}K k=1[ ˆLα,K(q; x)] →Lα as K →+∞; 3) continuous and non-increasing in α with fixed K. Corollary 1. For finite K, either E{hk}K k=1[ ˆLα,K(q; x)] < log p(x) for all α, or there exists αK ≤0 such that E{hk}K k=1[ ˆLαK,K(q; x)] = log p(x) and E{hk}K k=1[ ˆLα,K(q; x)] > log p(x) for all α < αK. Also αK is non-decreasing in K if exists, with limK→1 αK = −∞and limK→+∞αK = 0. The intuition behind the theorems is visualised in Figure 2(a). By definition, the exact VR bound is a lower-bound or upper-bound of log p(x) when α > 0 or α < 0, respectively. However the MC approximation E[ ˆLα,K] biases the estimate towards LVI, where the approximation quality can be improved using more samples. Thus for finite samples and under mild conditions, negative alpha values can potentially be used to improve the accuracy of the approximation, at the cost of losing the upper-bound guarantee. Figure 2(b) shows an empirical evaluation by computing the exact and the MC approximation of the Rényi divergences. In this example p, q are 2-D Gaussian distributions with µp = [0, 0], µq = [1, 1] and Σp = Σq = I. The sampling procedure is repeated 4 (a) MC approximated VR bounds. (b) Simulated MC approximations. Figure 2: (a) An illustration for the bounding properties of MC approximations to the VR bounds. (b) The bias of the MC approximation. Best viewed in colour and see the main text for details. 200 times to estimate the expectation. Clearly for K = 1 it is equivalent to an unbiased estimate of the KL-divergence for all α (even though now the estimation is biased for Dα). For K > 1 and α < 1, the MC method under-estimates the VR bound, and the bias decreases with increasing K. For α > 1 the inequality is reversed also as predicted. 4.2 Unified implementation with the reparameterization trick Readers may have noticed that LVI has a different form compared to Lα with α ̸= 1. In this section we show how to unify the implementation for all finite α settings using the reparameterization trick [13, 18] as an example. This trick assumes the existence of the mapping θ = gφ(ϵ), where the distribution of the noise term ϵ satisfies q(θ)dθ = p(ϵ)dϵ. Then the expectation of a function F(θ) over distribution q(θ) can be computed as Eq(θ)[F(θ)] = Ep(ϵ)[F(gφ(ϵ))]. One prevalent example is the Gaussian reparameterization: θ ∼N(µ, Σ) ⇒θ = µ + Σ 1 2 ϵ, ϵ ∼N(0, I). Now we apply the reparameterization trick to the VR bound Lα(qφ; x) = 1 1 −α log Eϵ "p(gφ(ϵ), x) q(gφ(ϵ)) 1−α# . (6) Then the gradient of the VR bound w.r.t. φ is (similar for ϕ, see appendix for derivation) ∇φLα(qφ; x) = Eϵ wα(ϵ; φ, x)∇φ log p(gφ(ϵ), x) q(gφ(ϵ)) , (7) where wα(ϵ; φ, x) = p(gφ(ϵ),x) q(gφ(ϵ)) 1−α Eϵ p(gφ(ϵ),x) q(gφ(ϵ)) 1−α denotes the normalised importance weight. One can show that this recovers the the stochastic gradients of LVI by setting α = 1 in (7) since now w1(ϵ; φ, x) = 1, which means the resulting algorithm unifies the computation for all finite α settings. For MC approximations, we use K samples to approximately compute the weight ˆwα,k(ϵk; φ, x) ∝ p(gφ(ϵk),x) q(gφ(ϵk)) 1−α , k = 1, ..., K, and the stochastic gradient becomes ∇φ ˆLα,K(qφ; x) = K X k=1 ˆwα,k(ϵk; φ, x)∇φ log p(gφ(ϵk), x) q(gφ(ϵk)) . (8) When α = 1, ˆw1,k(ϵk; φ, x) = 1/K, and it recovers the stochastic gradient VI method [18]. To speed-up learning [17] suggested back-propagating only one sample ϵj with j ∼pj = ˆwα,j, which can be easily extended to our framework. Importantly, the use of different α < 1 indicates the degree of emphasis placed upon locations where the approximation q under-estimates p, and in the extreme case α →−∞, the algorithm chooses the sample that has the maximum unnormalised importance weight. We name this approach VR-max and summarise it and the general case in Algorithm 1. Note that VR-max (and VR-α with α < 0 and MC approximations) does not minimise D1−α[p||q]. It is true that Lα ≥log p(x) for negative α values. However Corollary 1 suggests that the tightest MC approximation for given K has non-positive αK value, or might not even exist. Furthermore αK becomes more negative as the mismatch between q and p increases, e.g. VAE uses a uni-modal q distribution to approximate the typically multi-modal exact posterior. 5 Algorithm 1 One gradient step for VR-α/VR-max with single backward pass. Here ˆw(ϵk; x) shorthands ˆw0,k(ϵk; φ, x) in the main text. 1: given the current datapoint x, sample ϵ1, ..., ϵK ∼p(ϵ) 2: for k = 1, ..., K, compute the unnormalised weight log ˆw(ϵk; x) = log p(gφ(ϵk), x)−log q(gφ(ϵk)|x) 3: choose the sample ϵj to back-propagate: if |α| < ∞: j ∼pk where pk ∝ˆw(ϵk; x)1−α if α = −∞: j = arg maxk log ˆw(ϵk; x) 4: return the gradients ∇φ log ˆw(ϵj; x) VR EP SEP BBglobal local mini-batch sub-sampling factor tying energy approx. fixed point approx. Figure 3: Connecting local and global divergence minimisation. 4.3 Stochastic approximation for large-scale learning VR bounds can also be applied to full Bayesian inference with posterior approximation. However for large datasets full batch learning is very inefficient. Mini-batch training is non-trivial here since the VR bound cannot be represented by the expectation on a datapoint-wise loss, except when α = 1. This section introduces two proposals for mini-batch training, and interestingly, this recovers two existing algorithms that were motivated from a different perspective. In the following we define the “average likelihood” ¯fD(θ) = [QN n=1 p(xn|θ)] 1 N . Hence the joint distribution can be rewritten as p(θ, D) = p0(θ) ¯fD(θ)N. Also for a mini-batch of M datapoints S = {xn1, ..., xnM } ∼D, we define the “subset average likelihood” ¯fS(θ) = [QM m=1 p(xnm|θ)] 1 M . The first proposal considers fixed point approximations with mini-batch sub-sampling. It first derives the fixed point conditions for the variational parameters (e.g. the natural parameters of q) using the exact VR bound (4), then design an iterative algorithm using those fixed point equations, but with ¯fD(θ) replaced by ¯fS(θ). The second proposal also applies this subset average likelihood approximation idea, but directly to the VR bound (4) (so this approach is named energy approximation): ˜Lα(q; S) = 1 1 −α log Eq "p0(θ) ¯fS(θ)N q(θ) 1−α# . (9) In the appendix we demonstrate with detailed derivations that fixed point approximation returns Stochastic EP (SEP) [7], and black box alpha (BB-α) [16] corresponds to energy approximation. Both algorithms were originally proposed to approximate (power) EP [3, 26], which usually minimises α-divergences locally, and considers M = 1, α ∈[1 −1/N, 1) and exponential family distributions. These approximations were done by factor tying, which significantly reduces the memory overhead of full EP and makes both SEP and BB-α scalable to large datasets just as SVI. The new derivation derivation provides a theoretical justification from energy perspective, and also sheds lights on the connections between local and global divergence minimisations as depicted in Figure 3. Note that all these methods recover SVI when α →1, in which global and local divergence minimisation are equivalent. Also these results suggest that recent attempts of distributed posterior approximation (by carving up the dataset into pieces with M > 1 [10, 11]) can be extended to both SEP and BB-α. Monte Carlo methods can also be applied to both proposals. For SEP the moment computation can be approximated with MCMC [10, 11]. For BB-α one can show in the same way as to prove Theorem 2 that simple MC approximation in expectation lower-bounds the BB-α energy when α ≤1. In general it is also an open question how to choose α for given the mini-batch size M and the number of samples K, but there is evidence that intermediate α values can be superior [27, 28]. 5 Experiments We evaluate the VR bound methods on Bayesian neural networks and variational auto-encoders. All the experiments used the ADAM optimizer [29], and the detailed experimental set-up (batch size, learning rate, etc.) can be found in the appendix. The implementation of all the experiments in Python is released at https://github.com/YingzhenLi/VRbound. 6 mass-covering zero-forcing Figure 4: Test LL and RMSE results for Bayesian neural network regression. The lower the better. 5.1 Bayesian neural network The first experiment considers Bayesian neural network regression. The datasets are collected from the UCI dataset repository.1 The model is a single-layer neural network with 50 hidden units (ReLUs) for all datasets except Protein and Year (100 units). We use a Gaussian prior θ ∼N(θ; 0, I) for the network weights and Gaussian approximation to the true posterior q(θ) = N(θ; µq, diag(σq)). We follow the toy example in Section 3 to consider α ∈{−∞, 0.0, 0.5, 1.0, +∞} in order to examine the effect of mass-covering/zero-forcing behaviour. Stochastic optimisation uses the energy approximation proposed in Section 4.3. MC approximation is also deployed to compute the energy function, in which K = 100, 10 is used for small and large datasets (Protein and Year), respectively. We summarise the test negative log-likelihood (LL) and RMSE with standard error (across different random splits except for Year) for selected datasets in Figure 4, where the full results are provided in the appendix. These results indicate that for posterior approximation problems, the optimal α may vary for different datasets. Also the MC approximation complicates the selection of α (see appendix). Future work should develop algorithms to automatically select the best α values, although a naive approach could use validation sets. We observed two major trends that zero-forcing/mode-seeking methods tend to focus on improving the predictive error, while mass-covering methods returns better calibrated uncertainty estimate and better test log-likelihood. In particular VI returns lower test log-likelihood for most of the datasets. Furthermore, α = 0.5 produced overall good results for both test LL and RMSE, possibly because the skew symmetry is centred at α = 0.5 and the corresponding divergence is the only symmetric distance measure in the family. 5.2 Variational auto-encoder The second experiments considers variational auto-encoders for unsupervised learning. We mainly compare three approaches: VAE (α = 1.0), IWAE (α = 0), and VR-max (α = −∞), which are implemented upon the publicly available code.2 Four datasets are considered: Frey Face (with 10-fold cross validation), Caltech 101 Silhouettes, MNIST and OMNIGLOT. The VAE model has L = 1, 2 stochastic layers with deterministic layers stacked between, and the network architecture is detailed in the appendix. We reproduce the IWAE experiments to obtain a fair comparison, since the results in the original publication [17] mismatches those evaluated on the publicly available code. We report test log-likelihood results in Table 2 by computing log p(x) ≈ˆL0,5000(q; x) following [17]. We also present some samples from the trained models in the appendix. Overall VR-max is almost indistinguishable from IWAE. Other positive alpha settings (e.g. α = 0.5) return worse results, e.g. 1374.64 ± 5.62 for Frey Face and −85.50 for MNIST with α = 0.5, L = 1 and K = 5. These worse results for α > 0 indicate the preference of getting tighter approximations to the likelihood function for MLE problems. Small negative α values (e.g. α = −1.0, −2.0) returns better results on different splits of the Frey Face data, and overall the best α value is dataset-specific. 1http://archive.ics.uci.edu/ml/datasets.html 2https://github.com/yburda/iwae 7 Table 2: Average Test log-likelihood. Results for VAE on MNIST and OMNIGLOT are collected from [17]. Dataset L K VAE IWAE VR-max Frey Face 1 5 1322.96 1380.30 1377.40 (± std. err.) ±10.03 ±4.60 ±4.59 Caltech 101 1 5 -119.69 -117.89 -118.01 Silhouettes 50 -119.61 -117.21 -117.10 MNIST 1 5 -86.47 -85.41 -85.42 50 -86.35 -84.80 -84.81 2 5 -85.01 -83.92 -84.04 50 -84.78 -83.05 -83.44 OMNIGLOT 1 5 -107.62 -106.30 -106.33 1 50 -107.80 -104.68 -105.05 2 5 -106.31 -104.64 -104.71 2 50 -106.30 -103.25 -103.72 Figure 5: Bias of sampling approximation to. Results for K = 5, 50 samples are shown on the left and right, respectively. (a) Log of ratio R = wmax/(1 −wmax) (b) Weights of samples. Figure 6: Importance weights during training, see main text for details. Best viewed in colour. VR-max’s success might be explained by the tightness of the bound. To evaluate this, we compute the VR bounds on 100 test datapoints using the 1-layer VAE trained on Frey Face, with K = {5, 50} and α ∈{0, −1, −5, −50, −500}. Figure 5 presents the estimated gap ˆLα,K −ˆL0,5000. The results indicates that ˆLα,K provides a lower-bound, and that gap is narrowed as α →−∞. Also increasing K provides improvements. The standard error of estimation is almost constant for different α (with K fixed), and is negligible when compared to the MC approximation bias. Another explanation for VR-max’s success is that, the sample with the largest normalised importance weight wmax dominates the contributions of all the gradients. This is confirmed by tracking R = wmax 1−wmax during training on Frey Face (Figure 6(a)). Also Figure 6(b) shows the 10 largest importance weights from K = 50 samples in descending order, which exhibit an exponential decay behaviour, with the largest weight occupying more than 75% of the probability mass. Hence VR-max provides a fast approximation to IWAE when tested on CPUs or multiple GPUs with high communication costs. Indeed our numpy implementation of VR-max achieves up to 3 times speed-up compared to IWAE (9.7s vs. 29.0s per epoch, tested on Frey Face data with K = 50 and batch size M = 100, CPU info: Intel Core i7-4930K CPU @ 3.40GHz). However this speed advantage is less significant when the gradients can be computed very efficiently on a single GPU. 6 Conclusion We have introduced the variational Rényi bound and an associated optimisation framework. We have shown the richness of the new family, not only by connecting to existing approaches including VI/VB, SEP, BB-α, VAE and IWAE, but also by proposing the VR-max algorithm as a new special case. Empirical results on Bayesian neural networks and variational auto-encoders indicate that VR bound methods are widely applicable and can obtain state-of-the-art results. Future work will focus on both experimental and theoretical sides. Theoretical work will study the interaction of the biases introduced by MC approximation and datapoint sub-sampling. A guide on choosing optimal α values are needed for practitioners when applying the framework to their applications. Acknowledgements We thank the Cambridge MLG members and the reviewers for comments. YL thanks the Schlumberger Foundation FFTF fellowship. RET thanks EPSRC grants # EP/M026957/1 and EP/L000776/1. 8 References [1] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul, “An introduction to variational methods for graphical models,” Machine learning, vol. 37, no. 2, pp. 183–233, 1999. [2] M. J. Beal, Variational algorithms for approximate Bayesian inference. PhD thesis, University College London, 2003. [3] T. Minka, “Expectation propagation for approximate Bayesian inference,” in Conference on Uncertainty in Artificial Intelligence (UAI), 2001. [4] M. Opper and O. Winther, “Expectation consistent approximate inference,” The Journal of Machine Learning Research, vol. 6, pp. 2177–2204, 2005. [5] T. Minka, “Divergence measures and message passing,” tech. rep., Microsoft Research, 2005. [6] M. D. Hoffman, D. M. Blei, C. Wang, and J. W. Paisley, “Stochastic variational inference,” Journal of Machine Learning Research, vol. 14, no. 1, pp. 1303–1347, 2013. [7] Y. Li, J. M. Hernández-Lobato, and R. E. Turner, “Stochastic expectation propagation,” in Advances in Neural Information Processing Systems (NIPS), 2015. [8] G. Dehaene and S. Barthelmé, “Expectation propagation in the large-data limit,” arXiv:1503.08060, 2015. [9] T. Broderick, N. Boyd, A. Wibisono, A. C. Wilson, and M. I. Jordan, “Streaming variational Bayes,” in Advances in Neural Information Processing Systems (NIPS), 2013. [10] A. Gelman, A. Vehtari, P. Jylänki, C. Robert, N. Chopin, and J. P. Cunningham, “Expectation propagation as a way of life,” arXiv:1412.4869, 2014. [11] M. Xu, B. Lakshminarayanan, Y. W. Teh, J. Zhu, and B. Zhang, “Distributed Bayesian posterior sampling via moment sharing,” in Advances in Neural Information Processing Systems (NIPS), 2014. [12] J. Paisley, D. Blei, and M. Jordan, “Variational Bayesian inference with stochastic search,” in Proceedings of The 29th International Conference on Machine Learning (ICML), 2012. [13] T. Salimans and D. A. Knowles, “Fixed-form variational posterior approximation through stochastic linear regression,” Bayesian Analysis, vol. 8, no. 4, pp. 837–882, 2013. [14] R. Ranganath, S. Gerrish, and D. M. Blei, “Black box variational inference,” in Proceedings of the 17th International Conference on Artificial Intelligence and Statistics (AISTATS), 2014. [15] A. Kucukelbir, R. Ranganath, A. Gelman, and D. M. Blei, “Automatic variational inference in Stan,” in Advances in Neural Information Processing Systems (NIPS), 2015. [16] J. M. Hernández-Lobato, Y. Li, M. Rowland, D. Hernández-Lobato, T. Bui, and R. E. Turner, “Black-box α-divergence minimization,” in Proceedings of The 33rd International Conference on Machine Learning (ICML), 2016. [17] Y. Burda, R. Grosse, and R. Salakhutdinov, “Importance weighted autoencoders,” in International Conference on Learning Representations (ICLR), 2016. [18] D. P. Kingma and M. Welling, “Auto-encoding variational Bayes,” in International Conference on Learning Representations (ICLR), 2014. [19] D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” in Proceedings of The 30th International Conference on Machine Learning (ICML), 2014. [20] A. Rényi, “On measures of entropy and information,” Fourth Berkeley symposium on mathematical statistics and probability, vol. 1, 1961. [21] S.-i. Amari, Differential-Geometrical Methods in Statistic. New York: Springer, 1985. [22] C. Tsallis, “Possible generalization of Boltzmann-Gibbs statistics,” Journal of statistical physics, vol. 52, no. 1-2, pp. 479–487, 1988. [23] T. Van Erven and P. Harremoës, “Rényi divergence and Kullback-Leibler divergence,” Information Theory, IEEE Transactions on, vol. 60, no. 7, pp. 3797–3820, 2014. [24] P. Grünwald, Minimum Description Length Principle. MIT press, Cambridge, MA, 2007. [25] R. E. Turner and M. Sahani, “Two problems with variational expectation maximisation for time-series models,” in Bayesian Time series models (D. Barber, T. Cemgil, and S. Chiappa, eds.), ch. 5, pp. 109–130, Cambridge University Press, 2011. [26] T. Minka, “Power EP,” Tech. Rep. MSR-TR-2004-149, Microsoft Research, 2004. [27] T. D. Bui, D. Hernández-Lobato, Y. Li, J. M. Hernández-Lobato, and R. E. Turner, “Deep gaussian processes for regression using approximate expectation propagation,” in Proceedings of The 33rd International Conference on Machine Learning (ICML), 2016. [28] S. Depeweg, J. M. Hernández-Lobato, F. Doshi-Velez, and S. Udluft, “Learning and policy search in stochastic dynamical systems with bayesian neural networks,” arXiv preprint arXiv:1605.07127, 2016. [29] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in International Conference on Learning Representations (ICLR), 2015. 9 | 2016 | 263 |
6,176 | Stochastic Gradient Geodesic MCMC Methods Chang Liu†, Jun Zhu†, Yang Song‡∗ † Dept. of Comp. Sci. & Tech., TNList Lab; Center for Bio-Inspired Computing Research † State Key Lab for Intell. Tech. & Systems, Tsinghua University, Beijing, China ‡ Dept. of Physics, Tsinghua University, Beijing, China {chang-li14@mails, dcszj@}.tsinghua.edu.cn; songyang@stanford.edu Abstract We propose two stochastic gradient MCMC methods for sampling from Bayesian posterior distributions defined on Riemann manifolds with a known geodesic flow, e.g. hyperspheres. Our methods are the first scalable sampling methods on these manifolds, with the aid of stochastic gradients. Novel dynamics are conceived and 2nd-order integrators are developed. By adopting embedding techniques and the geodesic integrator, the methods do not require a global coordinate system of the manifold and do not involve inner iterations. Synthetic experiments show the validity of the method, and its application to the challenging inference for spherical topic models indicate practical usability and efficiency. 1 Introduction Dynamics-based Markov Chain Monte Carlo methods (D-MCMCs) are sampling methods using dynamics simulation for state transition in a Markov chain. They have become a workhorse for Bayesian inference, with well-known examples like Hamiltonian Monte Carlo (HMC) [22] and stochastic gradient Langevin dynamics (SGLD) [29]. Here we consider variants for sampling from distributions defined on Riemann manifolds. Overall, geodesic Monte Carlo (GMC) [7] stands out for its notable performance on manifolds with known geodesic flow, such as simplex, hypersphere and Stiefel manifold [26, 16]. Its applicability to manifolds with no global coordinate systems (e.g. hyperspheres) is enabled by the embedding technique, and its geodesic integrator eliminates inner (within one step in dynamics simulation) iteration to ensure efficiency. It is also used for efficient sampling from constraint distributions [17]. Constrained HMC (CHMC) [6] aims at manifolds defined by a constraint in some Rn. It covers all common manifolds, but inner iteration makes it less appealing. Other D-MCMCs involving Riemann manifold, e.g. Riemann manifold Langevin dynamics (RMLD) and Riemann manifold HMC (RMHMC) [13], are invented for better performance but still on the task of sampling in Euclidean space, where the target variable is treated as the global coordinates of some distribution manifold. Although they can be used to sample in non-Euclidean Riemann manifolds by replacing the distribution manifold with the target manifold, a global coordinate system of the target manifold is required. Moreover, RMHMC suffers from expensive inner iteration. However, GMC scales undesirably to large datasets, which are becoming common. An effective strategy to scale up D-MCMCs is by randomly sampling a subset to estimate a noisy but unbiased stochastic gradient, with stochastic gradient MCMC methods (SG-MCMCs). Welling et al. [29] pioneered in this direction by developing stochastic gradient Langevin dynamics (SGLD). Chen et al. [9] apply the idea to HMC with stochastic gradient HMC (SGHMC), where a non-trivial dynamics with friction has to be conceived. Ding et at. [10] propose stochastic gradient Nosé-Hoover thermostats (SGNHT) to automatically adapt the friction to the noise by a thermostats. To unify dynamics used for SG-MCMCs, Ma et al. [19] develop a complete recipe to formulate the dynamics. ∗JZ is the corresponding author; YS is with Department of Computer Science, Stanford University, CA. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Table 1: A summary of some D-MCMCs. –: sampling on manifold not supported; †: The integrators are not in the SSI scheme (It is unclear whether the claimed “2nd-order” is equivalent to ours); ‡: 2nd-order integrators for SGHMC and mSGNHT are developed by [8] and [18], respectively. methods stochastic gradient no inner iteration no global coordinates order of integrator GMC [7] × √ √ 2nd RMLD [13] × √ × 1st RMHMC [13] × × × 2nd† CHMC [6] × × √ 2nd† SGLD [29] √ √ – 1st SGHMC [9] / SGNHT [10] √ √ – 1st‡ SGRLD [23] / SGRHMC [19] √ √ × 1st SGGMC / gSGNHT (proposed) √ √ √ 2nd In this paper, we present two SG-MCMCs for manifolds with known geodesic flow: stochastic gradient geodesic Monte Carlo (SGGMC) and geodesic stochastic gradient Nosé-Hoover thermostats (gSGNHT). They are the first scalable sampling methods on manifolds with known geodesic flow and no global coordinate systems. We use the recipe [19] to tackle the non-trivial dynamics conceiving task. Our novel dynamics are also suitable for developing 2nd-order integrators by adopting the symmetric splitting integrator (SSI) [8] scheme. A key property of a Kth-order integrator is the bias of the expected sample average at iteration L can be upper bounded by L−K/(K+1) and the mean square error by L−2K/(2K+1) [8], so a higher order integrator basically performs better. Our integrators also incorporate the geodesic integrator to avoid inner iteration. Our methods can also be used to scalably sample from constraint distributions [17] like GMC. There exist other SG-MCMCs on Riemann manifold, e.g. SGRLD [23] and SGRHMC [19], stochastic gradient versions of RMLD and RMHMC respectively. But they also require the Riemann manifold to have a global coordinate system, like their original versions as is mentioned above. So basically they cannot draw samples from hyperspheres, while our methods are capable. Technically, SGRLD/SGRHMC (and RMLD/RMHMC) samples in the coordinate space, so we need a global one to make it valid. The explicit use of the Riemann metric tensor also makes the methods more difficult to implement. Our methods (and GMC) sample in the isometrically embedded space, where the whole manifold is represented and the Riemann metric tensor is implicitly embodied by the isometric embedding. Moreover, our integrators are of a higher order. Tab. 1 summarizes the key properties of aforementioned D-MCMCs, where our advantages are clearly shown. Finally, we apply our samplers to perform inference for spherical admixture models (SAM) [24]. SAM defines a hierarchical generative process to describe the data that are expressed as unit vectors (i.e., elements on the hypersphere). The task of posterior inference is to identify a set of latent topics, which are also unit vectors. This process is highly challenging due to a non-conjugate structure and the strict manifold constraints. None of the existing MCMC methods is both applicable to the task and scalable. We demonstrate that our methods are the most efficient methods to learn SAM on large datasets, with a good performance on testing data perplexity. 2 Preliminaries We briefly review the basics of SG-MCMCs. Consider a Bayesian model with latent variable q, prior π0(q) and likelihood π(x|q). Given a dataset D = {xd}D d=1, sampling from the posterior π(q|D) by D-MCMCs requires computing the gradient of potential energy ∇U(q) ≜−∇log π(q|D) = −∇log π0(q) −PD d=1 ∇log π(xd|q), which is linear to data size D thus not scalable. SG-MCMCs address this challenge by randomly drawing a subset S of D to build the stochastic gradient ∇q ˜U(q) ≜ −∇q log π0(q) −D |S| P x∈S ∇q log π(x|q), a noisy but unbiased estimate.Under the i.i.d. assumption of D, the central limit theorem holds: in the sense of convergence in distribution for large D, ∇q ˜U(q) = ∇qU(q) + N(0, V (q)), (1) where we use N(·, ·) to denote a Gaussian random variable and V (q) is some covariance matrix. The gradient noise raises challenging restrictions to the SG-MCMC dynamics. Ma et al. [19] then provide a recipe to construct correct dynamics. It claims that for a random variable z, given a Hamiltonian H(z), a skew-symmetric matrix (curl matrix) Q(z) and a positive definite matrix (diffusion matrix) D(z), the dynamics defined by the following stochastic differential equation (SDE) 2 dz = f(z)dt + p 2D(z)dW(t) (2) has the unique stationary distribution π(z) ∝exp{−H(z)}, where W(t) is the Wiener process and f(z) = −[D(z) + Q(z)] ∇zH(z) + Γ(z), Γi(z) = X j ∂ ∂zj (Dij(z) + Qij(z)) . (3) The above dynamics is compatible with stochastic gradient. For SG-MCMCs, z is usually an augmentation of the target variable q, and the Hamiltonian usually follows the form H(z) = T(z) + U(q). Referring to Eqn. (1), ∇q ˜H(z) = ∇qH(z) + N(0, V (q)) and ˜f(z) = f(z) + N(0, B(z)), where B(z) is the covariance matrix of the Gaussian noise passed from ∇z ˜H(z) to ˜f(z) through Eqn. (3). We informally rewrite dW(t) as N(0, dt) and express dynamics Eqn. (2) as dz =f(z)dt + N(0, 2D(z)dt) = f(z)dt + N(0, B(z)dt2) + N 0, 2D(z)dt −B(z)dt2 = ˜f(z)dt + N 0, 2D(z)dt −B(z)dt2 . (4) This tells us that the same dynamics can be exactly expressed by stochastic gradient. Moreover, the recipe is complete: for any continuous Markov process defined by Eqn. (2) with a unique stationary distribution π(z) ∝exp{−H(z)}, there exists a skew-symmetric matrix Q(z) so that Eqn. (3) holds. 3 Stochastic Gradient Geodesic MCMC Methods We now formally develop our SGGMC and gSGNHT. We will describe the task settings, develop the dynamics, and show how to simulate by 2nd-order integrators and stochastic gradient. 3.1 Technical Descriptions of the Settings ℝ𝑚𝑚= 2 ℝ𝑛𝑛= 3 𝒩 𝑄 𝑞 Φ Ω Ξ 𝒩 𝜉 Ξ 𝑥 ℳ Figure 1: An illustration of manifold M with local coordinate system (N, Φ) and embedding Ξ. See text for details. We first describe a Riemann manifold. Main concepts are depicted in Fig. 1. Let M be an m-dim Riemann manifold, which is covered by a set of local coordinate systems. Denote one of them by (N, Φ), where N ⊆M is an open subset, and Φ : N →Ω, Q 7→q with Ω≜Φ(N) ⊆Rm, Q ∈N and q ∈Ωis a homeomorphism. Additionally, transition mappings between any two intersecting local coordinate systems are required to be smooth. Denote the Riemann metric tensor under (N, Φ) by G(q), an m × m symmetric positive-definite matrix. Another way to describe M is through embedding — a diffeomorphism Ξ : M →Ξ(M) ⊆Rn (n ≥m). In (N, Φ), Ξ can be embodied by a more sensible mapping ξ ≜Ξ ◦Φ−1 : Rm →Rn, q 7→x, which links the coordinate space and the embedded space. For convenience, we only consider isometric embeddings (whose existence is guaranteed [21]): Ξ such that G(q)ij = Pn l=1 ∂ξl(q) ∂qi ∂ξl(q) ∂qj , 1 ≤i, j ≤m holds for any local coordinate system. Common manifolds are subsets of some Rn, in which case the identity mapping (as Ξ) from Rn (where M is defined) to Rn (the embedded space) is isometric. To define a distribution on a Riemann manifold, from which we want to sample, we need a measure. In the coordinate space Rm, Ωnaturally possesses the Lebesgue measure λm(dq), and the probability density can be defined in Ω, which we denote as π(q). In the embedded space Rn, Ξ(N) naturally possesses the Hausdorff measure Hm(dx), and we denote the probability density w.r.t this measure as πH(x). The relation between them can be found by πH(ξ(q)) = π(q)/ p |G(q)|. 3.2 The Dynamics We now construct our dynamics using the recipe [19] so that our dynamics naturally have the desired stationary distribution, leading to correct samples. It is important to note that the recipe only suits for dynamics in a Euclidean space. So we can only develop the dynamics in the coordinate space but not in the embedded space Ξ(M), which is generally not Euclidean. However it is advantageous to simulate the dynamics in the embedded space (See Sec. 3.3). Dynamics for SGGMC Define the momentum in the coordinate space p ∈Rm and the augmented variable z = (q, p) ∈R2m. Define the Hamiltonian 2 H(z) = U(q) + 1 2 log |G(q)| + 1 2p⊤G(q)−1p, 2Another derivation of the momentum and the Hamiltonian originated from physics in both coordinate and embedded spaces is provided in Appendix C. 3 where U(q) ≜−log π(q). We define the Hamiltonian so that the canonical distribution π(z) ∝ exp{−H(z)} marginalized w.r.t p recovers the target distribution π(q). For a symmetric positive definite n × n matrix C, define the diffusion matrix D(z) and the curl matrix Q(z) as D(z) = 0 0 0 M(q)⊤CM(q) , Q(z) = 0 −I I 0 , where we define M(q)n×m : M(q)ij = ∂ξi(q)/∂qj. So from Eqn. (2, 3), the dynamics dq =G−1pdt dp = −∇qUdt −1 2∇q log |G|dt −M ⊤CMG−1p dt −1 2∇q p⊤G−1p dt + N(0, 2M ⊤CMdt) (5) has a unique stationary distribution π(z) ∝exp{−H(z)}. Dynamics for gSGNHT Define z = (q, p, ξ) ∈R2m+1, where ξ ∈R is the thermostats. For a positive C ∈R, define the Hamiltonian H(z) = U(q) + 1 2 log |G(q)| + 1 2p⊤G(q)−1p + m 2 (ξ −C)2, whose marginalized canonical distribution is π(q) as desired. Define D(z) and Q(z) as D(z) = 0 0 0 0 CG(q) 0 0 0 0 ! , Q(z) = 0 −I 0 I 0 p/m 0 −p⊤/m 0 , Then by Eqn. (2, 3) the proper dynamics of gSGNHT is dq =G−1pdt dp = −∇qUdt −1 2∇q log |G|dt −ξp dt −1 2∇q p⊤G−1p dt + N(0, 2CGdt) dξ =( 1 mp⊤G−1p −1)dt . (6) These two dynamics are novel. They are extensions of the dynamics of SGHMC and SGNHT to Riemann manifolds, respectively. Conceiving the dynamics in this form is also intended for the convenience to develop 2nd-order geodesic integrators, which differs from SGRHMC. 3.3 Simulation with 2nd-order Geodesic Integrators In this part we develop our integrators by following the symmetric splitting integrator (SSI) scheme [8], which is guaranteed to be of 2nd-order. The idea of SSI is to first split the dynamics into parts with each analytically solvable, then alternately simulate each exactly with the analytic solutions. Although also SSI, the integrator of GMC does not fit our dynamics where diffusion arises. But we adopt its embedding technique to get rid of any local coordinate system thus release the global coordinate system requirement. So we will solve and simulate the split dynamics in the isometrically embedded space, where everything is expressed by the position x = ξ(q) and the velocity v = ˙x (which is actually the momentum in the isometrically embedded space, see Appendix C; the overhead dot means time derivative), instead of q and p. Integrator for SGGMC We first split dynamics (5) into sub-SDEs with each analytically solvable: A: dq=G−1pdt dp=−1 2∇q p⊤G−1p dt , B : ( dq=0 dp=−M⊤CMG−1pdt, O: dq=0 dp=−∇qU(q)dt−1 2∇qlog|G(q)|dt + N(0, 2M⊤CMdt) . As noted in GMC, the solution of dynamics A is the geodesic flow of the manifold [1]. Intuitively, dynamics A describes motion with no force so a particle moves freely on the manifold, e.g. the uniform motion in Euclidean space, and motion along great circles (velocity rotating with varying tangents along the trajectory) on hypersphere Sd−1 ≜{x ∈Rd|∥x∥= 1} (∥· ∥denotes ℓ2-norm). The evolution of the position and velocity of this kind is the geodesic flow. We require an explicit form of the geodesic flow in the embedded space. For Sd−1, ( x(t) = x(0) cos(αt) + v(0)/α sin(αt) v(t) = −αx(0) sin(αt) + v(0) cos(αt) (7) 4 is the geodesic flow expressed by the embedded variables x and v, where α = ∥v(0)∥. By details in [7] or Appendix A, dynamics B and O are solved as B : ( x(t)=x(0) v(t)=expm −Λ x(0) Ct v(0) , O: ( x(t)=x(0) v(t)=v(0)+Λ x(0) −∇xUH x(0) t+N(0, 2Ct) , where UH(x) ≜−log πH(x), expm{·} is the matrix exponent, and Λ(x) is the projection onto the tangent space at x in the embedded manifold. For Rn, Λ(x) = In (the identity mapping in Rn) and for Sn−1 embedded in Rn, Λ(x) = In −xx⊤(see Appendix A.3). We further reduce dynamics B for scalar C: v(t) = Λ(x(0)) exp{−Ct}v(0) = exp{−Ct}v(0), by noting that exp{−Ct} is a scalar and v(0) already lies on the tangent space at x(0). To illustrate this form, we expand the exponent for small t and get v(t) = (1 −Ct)v(0), which is exactly the action of a friction dissipating energy to control injected noise, as proposed in SGHMC. Our investigation reveals that this form holds generally for v as the momentum in the isometrically embedded space, but not the usual momentum p in the coordinate space. In SGHMC, v and p are undistinguishable, but in our case v can only lie in the tangent space and p is arbitrary in Rm. Integrator for gSGNHT We split dynamics (6) in a similar way: A : dq =G−1pdt dp =−1 2∇q p⊤G−1p dt dξ = 1 mp⊤G−1p−1 dt , B : dq =0 dp =−ξp dt dξ =0 , O : dq =0 dp =−∇qUdt−1 2∇q log |G| dt +N(0, 2CGdt) dξ =0 . For dynamics A, the solution of q and p is again the geodesic flow. To solve ξ, we first figure out that for dynamics A, p⊤G−1p is constant: d dt p⊤G(q)−1p = ∇q p⊤G(q)−1p ⊤˙q+2 G(q)−1p ⊤˙p = −2 ˙p⊤˙q + 2 ˙q⊤˙p = 0. Alternatively we note that 1 2p⊤G−1p = 1 2v⊤v is the kinetic energy 3 conserved by motion with no force. Now the evolution of ξ can be solved as ξ(t) = ξ(0)+ 1 mv(0)⊤v(0) −1 t. Dynamics O is identical to the one of SGGMC. Dynamics B can be solved similarly with only v updated: v(t) = exp{−ξ(0)t}v(0). Expansion of this recovers the dissipation of energy by an adaptive friction proposed by SGNHT, and we extend it to an embedded space. Now we consider incorporating stochastic gradient. Only the common dynamics O is affected. Similar to Eqn. (1), we express the stochastic gradient as ∇x ˜UH(x) = ∇xUH(x) + N(0, V (x)), then reformulate the solution of dynamics O as v(t) = v(0) + Λ x(0) · h −∇x ˜UH x(0) t + N 0, 2Ct−V x(0) t2i . (8) To estimate the usually unknown V (x), a simple way is just to take it as zero, in the sense that V (x)t2 is a higher order infinitesimal of 2Ct for t as a small simulation step size. Another way to estimate V (x) is by the empirical Fisher information, as is done in [2]. Finally, as SSI suggests, we simulate the complete dynamics by exactly simulating these solutions alternately in an “ABOBA” pattern. For a time step size of ε, dynamics A and B advance by ε/2 for once and dynamics O by ε. As other SG-MCMCs, we omit the unscalable Metropolis-Hastings test. But the consistency is still guaranteed [8] of e.g. the estimation by averaging over samples drawn from SG-MCMCs. Algorithms of SGGMC and gSGNHT are listed in Appendix E. 4 Application to Spherical Admixture Model We now apply SGGMC/gSGNHT to solve the challenging task of posterior inference in Spherical Admixture Model (SAM) [24]. SAM is a Bayesian topic model for spherical data (each datum is in some Sd−1), such as the tf-idf representation of text data. It enables more feature representations for hierarchical Bayesian models, and have the benefit over Latent Dirichlet Allocation (LDA) [5] to directly model the absence of words. The structure of SAM is shown in Fig. 2. Each document vd, each topic βk, the corpus mean µ and the hyper-parameter m are all in SV −1 with V the vocabulary size. Each topic proportion θd is in (K −1)-dim simplex with K the number of topics. 3p⊤G−1p = (G−1p)⊤G(G−1p) = ˙q⊤(M ⊤M) ˙q = (M ˙q)⊤(M ˙q) = v⊤v for an isometric embedding. 5 SAM uses the von Mises-Fisher distribution (vMF) (see e.g. [20]) to model variables on hyperspheres. The vMF on Sd−1 with mean µ ∈ Sd−1 and concentration parameter κ ∈ R+ has pdf (w.r.t the Hausdorff measure) vMF(x|µ, κ) = cd(κ) exp{κµ⊤x}, where cd(κ) = κd/2−1/ (2π)d/2Id/2−1(κ) and Ir(·) denotes the modified Bessel function of the first kind and order r. Then the generating process of SAM is 𝐷 𝐾 𝑚, 𝜅0 𝜅 𝜇 𝛽𝑘 𝜃𝑑 𝑣𝑑 𝛼 𝜎 Figure 2: An illustration of SAM model structure. • Draw µ ∼vMF(µ|m, κ0); • For k = 1, . . . , K, draw topic βk ∼vMF(βk|µ, σ); • For d = 1, . . . , D, draw θd ∼Dir(θd|α) and vd ∼ vMF(vd|¯v(β, θd), κ), where ¯v(β, θd)≜ βθd ∥βθd∥with β ≜(β1, . . . , βK) is an approximate spherical weighted mean of topics. The joint distribution of v ≜(v1, . . . , vD), β, θ ≜(θ1, . . . , θK), µ can be known. The inference task is to estimate the topic posterior π(β|v). As it is intractable, [24] provides a meanfield variational inference method and solves an optimization problem under spherical constraint, which is tackled by repeatedly normalizing. However, this treatment is not applicable to most sampling methods since it may corrupt the distribution of the samples. [24] tries a simple adaptive Metropolis-Hastings sampler with undesirable results, and no more attempt of sampling methods appears. Due to the deficiency of global coordinate system of hypersphere, most Riemann manifold samplers including SGRLD and SGRHMC fail. To our knowledge, only CHMC and GMC are suitable, yet not scalable. Our samplers are appropriate for the task, with the advantage of scalability. Now we present our inference method that uses SGGMC/gSGNHT to directly sample from π(β|v). First we note that µ can be collapsed analytically and the marginalized distribution of (v, β, θ) is: π(v, β, θ) = cV (κ0)cV (σ)KcV (∥¯m(β)∥)−1 D Y d=1 Dir(θd|α)vMF(vd|¯v(β, θd), κ), (9) where ¯m(β) ≜κ0m + σ PK k=1 βk. To sample from π(β|v) using our samplers, we only need to know a stochastic estimate of the gradient of potential energy ∇βU(β|v) ≜−∇β log π(β|v), which can be estimated by adopting the technique used in [11]: ∇β log π(β|v) = 1 π(β|v)∇β Z π(β, θ|v)dθ = Z π(β, θ|v) π(β|v) ∇βπ(β, θ|v) π(β, θ|v) dθ = Eπ(θ|β,v) [∇β log π(β, θ|v)] , where ∇β log π(β, θ|v) = ∇β log π(v, β, θ) is known, and the expectation can be estimated by averaging over a set of samples {θ(n)}N n=1 from π(θ|v, β): ∇βU(β|v) ≈1 N PN n=1 ∇β log π(v, β, θ(n)). To draw {θ(n)}N n=1, noting the simplex constraint and that the target distribution π(θ|v, β) is known up to a constant multiplier, we use GMC to do the task. To scale up, we use a subset {d(s)}S s=1 of indices of randomly chosen items from the whole data set to get a stochastic estimate for each ∇β log π(v, β, θ(n)). The final stochastic gradient is: ∇β ˜U(β|v) ≈∇β log cV (∥¯m(β)∥) −κ D NS N X n=1 S X s=1 v⊤ d(s)¯v(β, θ(n) d(s)). (10) The inference algorithm for SAM by SGGMC/gSGNHT is summarized in Alg. 3 in Appendix E. 5 Experiments We present empirical results on both synthetic and real datasets to prove the accuracy and efficiency of our methods. All target densities are expressed in the embedded space w.r.t the Hausdorff measure so we omit the subscript “H”. Synthetic experiments are only for SGGMC since the advantage to use thermostats has been shown by [10] and the effectiveness of gSGNHT is presented on real datasets. Detailed settings of the experiments are provided in Appendix F. 5.1 Toy Experiment We first present the utility and check the correctness of SGGMC by a greenhouse experiment with known stochastic gradient noise. Consider sampling from a circle (S1) for easy visualization. We set the target distribution such that the potential energy is U(x) = −log exp{5µ⊤ 1 x} + 2 exp{5µ⊤ 2 x} , where x, µ1, µ2 ∈S1 and µ1 = −µ2 = π 3 (angle from +x direction). The stochastic gradient is 6 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 true GMC SGGMC (a) π(v1|D) −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 true GMC SGGMC (b) π(v2|D) −0.5 0 0.5 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 −0.4 −0.2 0 0.2 0.4 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 (c) π(v1, v2|D) Figure 4: (a-b): True and empirical densities for π(v1|D) and π(v2|D). (c) True (left) and empirical by SGGMC (right) densities for π(v1, v2|D). produced by corrupting with N(0, 1000I), whose variance is used as V (x) in Eqn. (8) for sampling. Fig. 3(a) shows 100 samples from SGGMC and empirical distribution of 10,000 samples in the embedded space R2. True and empirical distributions are compared in Fig. 3(b) in angle space (local coordinate space). We see no obvious corruption of the result when using stochastic gradient. 0.5 1 1.5 2 30 210 60 240 90 270 120 300 150 330 180 0 empirical distribution samples from SGGMC (a) samples by SGGMC in the embedded space −4 −3 −2 −1 0 1 2 3 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 φ π(φ) true GMC SGGMC (b) distribution comparison in angle space Figure 3: Toy experiment results: (a) samples and empirical distribution of SGGMC; (b) comparison of true and empirical distributions. It should be stressed that although it is possible to apply scalable methods like SGRLD in spherical coordinate systems (almost global ones), it is too troublesome to work out the form of e.g. Riemann metric tensor, and special treatments like reflection at boundaries have to be considered. Numerical instability at boundaries also tends to appear. All these will get even worse in higher dimensions. Our methods work in embedded spaces, so all these issues are bypassed and can be elegantly extended to high dimensions. 5.2 Synthetic Experiment We then test SGGMC on a simple Bayesian posterior estimation task. We adopt a model with similar structure as the one used in [29]. Consider a mixture model of two vMFs on S1 with equal weights: π(v1)=vMF(v1|e1,κ1), π(v2)=vMF(v2|e1,κ2), π(xi|v1,v2)∝vMF(xi|v1,κx) + vMF(xi|µ,κx), where e1 = (1, 0) and µ ≜(v1 +v2)/∥v1 +v2∥. The task is to infer the posterior π(v1, v2|D), where D = {xi}D=100 i=1 is our synthetic data that is generated from the likelihood with v1 = −π 24, v2 = π 8 and κ1 = κ2 = κx = 20 by GMC. SGGMC uses empirical Fisher information in the way of [2] for V (x) in Eqn. (8), and uses 10 for batch size. Fig. 4(a-b) show the true and empirical marginal posteriors of v1 and v2, and Fig. 4(c) presents empirical joint posterior by samples from SGGMC and its true density. We see that samples from SGGMC exhibit no observable corruption when a mini-batch is used, and fully explore the two modes and the strong correlation of v1 and v2. 4 5.3 Spherical Admixture Models Setups For baselines, we compare with the mean-field variational inference (VI) by [24] and its stochastic version (StoVI) based on [15], as well as GMC methods. It is problematic for GMC to directly sample from the target distribution π(β|v) since the potential energy is hard to estimate, which is required for Metropolis-Hastings (MH) test in GMC. An approximate Monte Carlo estimation is provided in Appendix B and the corresponding method for SAM is GMC-apprMH. An alternative is GMC-bGibbs, which adopts blockwise Gibbs sampling to alternately sample from π(β|θ, v) and π(θ|β, v) (both known up to a constant multiplier) using GMC. We evaluate the methods by log-perplexity — the average of negative log-likelihood on a held-out test set Dtest. Variational methods produce a single point estimate ˆβ and the log-perplexity is log-perp = − 1 |Dtest| P d∈Dtest log π(vd|ˆβ). Sampling methods draw a set of samples {β(m)}M m=1 and log-perp = − 1 |Dtest| P d∈Dtest log( 1 M PM m=1 π(vd|β(m))). In both cases the intractable π(vd|β) needs to be estimated. By noting that π(vd|β) = R π(vd, θd|β)dθd = Eπ(θd|β)[π(vd|β, θd)], we 4Appendix D provides a rationale on the shape of the joint posterior. 7 estimate it by averaging π(vd|β, θ(n) d ) (exactly known from the generating process) over samples {θ(n) d }N n=1 drawn from π(θd|β) = π(θd) = Dir(α), the prior of θd. The log-perplexity is not comparable among different models so we exclude LDA from our baseline. We show the performance of all methods on a small and a large dataset. Hyper-parameters of SAM are fixed while training and set the same for all methods. V (x) in Eqn. (8) is taken zero for SGGMC/gSGNHT. All sampling methods are implemented 5 in C++ and fairly parallelized by OpenMP. VI/StoVI are run in MATLAB codes by [24] and we only use their final scores for comparison. Appendix F gives further implementation details, including techniques to avoid overflow. 10 2 10 3 10 4 10 5 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 wall time in seconds (log scale) log−perplexity VI StoVI GMC−apprMH GMC−bGibbs SGGMC−batch SGGMC−full gSGNHT−batch gSGNHT−full (a) 20News-different 10 3 10 4 10 5 2000 2500 3000 3500 4000 4500 5000 wall time in seconds (log scale) log−perplexity VI StoVI GMC−apprMH GMC−bGibbs SGGMC−batch SGGMC−full gSGNHT−batch gSGNHT−full (b) 150K Wikipedia Figure 5: Evolution of log-perplexity along wall time of all methods on (a) 20News-different dataset and (b) 150K Wikipedia subset. On the small dataset The small dataset is the 20News-different dataset used by [24], which consists of 3 categories from 20Newsgroups dataset. It is small (1,666 training and 1,107 test documents) so we have the chance to see the eventual results of all methods. We use 20 topics and 50 as the batch size. Fig. 5(a) shows the performance of all methods. We can see that our SGGMC and gSGNHT perform better than others. VI converges swiftly but cannot go any lower due to the intrinsic gap between the mean-field variational distribution and the true posterior. StoVI converges slower than VI in this small scale case, and exhibits the same limit. All sampling methods eventually go below variational methods, and ours go the lowest. gSGNHT shows its benefit to outperform SGGMC under the same setting. For our methods, an appropriately smaller batch size achieves a better result due to the speed-up by subsampling. Note that even the full-batch SGGMC and gSGNHT outperform GMC variants. This may be due to the randomness in the dynamics helps jumping out of one local mode to another for a better exploration. On the large dataset For the large dataset, we use a subset of the Wikipedia dataset with 150K training and 1K test documents, to challenge the scalability of all the methods. We use 50 topics and 100 as the batch size. Fig. 5(b) shows the outcome. We see that the gap between our methods and other baselines gets larger, indicating our scalability. Bounded curves of VI/StoVI, the advantage of using thermostats and subsampling speed-up appear again. Our full-batch versions are still better than GMC variants. GMC-apprMH and GMC-bGibbs scale badly; they converge slowly in this case. 6 Conclusions and Discussions We propose SGGMC and gSGNHT, SG-MCMCs for scalable sampling from manifolds with known geodesic flow. They are saliently efficient on their applications. Novel dynamics are constructed and 2nd-order geodesic integrators are developed. We apply the methods to SAM topic model for more accurate and scalable inference. Synthetic experiments verify the validity and experiments for SAM on real-world data shows an obvious advantage in accuracy over variational inference methods and in scalability over other applicable sampling methods. There remains possible broad applications of our methods, including models involving vMF (e.g. mixture of vMF [4, 14, 28], DP mixture of vMF [12, 3, 27]), constraint distributions [17] (e.g. truncated Gaussian), and distributions on Stiefel manifold (e.g. Bayesian matrix completion [25]), where the ability of scale-up will be appealing. Acknowledgments The work was supported by the National Basic Research Program (973 Program) of China (No. 2013CB329403), National NSF of China Projects (Nos. 61620106010, 61322308, 61332007), the Youth Top-notch Talent Support Program, and Tsinghua Initiative Scientific Research Program (No. 20141080934). 5All the codes and data can be found at http://ml.cs.tsinghua.edu.cn/~changliu/sggmcmc-sam/. 8 References [1] Ralph Abraham, Jerrold E Marsden, and Jerrold E Marsden. Foundations of mechanics. Benjamin/Cummings Publishing Company Reading, Massachusetts, 1978. [2] Sungjin Ahn, Anoop Korattikara, and Max Welling. Bayesian posterior sampling via stochastic gradient fisher scoring. arXiv preprint arXiv:1206.6380, 2012. [3] Nguyen Kim Anh, Nguyen The Tam, and Ngo Van Linh. Document clustering using dirichlet process mixture model of von mises-fisher distributions. In The 4th International Symposium on Information and Communication Technology, SoICT 2013, page 131–138, 2013. [4] Arindam Banerjee, Inderjit S Dhillon, Joydeep Ghosh, and Suvrit Sra. Clustering on the unit hypersphere using von mises-fisher distributions. Journal of Machine Learning Research, 6:1345–1382, 2005. [5] David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent dirichlet allocation. The Journal of Machine Learning Research, 3:993– 1022, 2003. [6] Marcus A. Brubaker, Mathieu Salzmann, and Raquel Urtasun. A family of mcmc methods on implicitly defined manifolds. In Proceedings of the 15th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 161–172, 2012. [7] Simon Byrne and Mark Girolami. Geodesic monte carlo on embedded manifolds. Scandinavian Journal of Statistics, 40(4):825–845, 2013. [8] Changyou Chen, Nan Ding, and Lawrence Carin. On the convergence of stochastic gradient mcmc algorithms with high-order integrators. In Advances in Neural Information Processing Systems, pages 2269–2277, 2015. [9] Tianqi Chen, Emily Fox, and Carlos Guestrin. Stochastic gradient hamiltonian monte carlo. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1683–1691, 2014. [10] Nan Ding, Youhan Fang, Ryan Babbush, Changyou Chen, Robert D. Skeel, and Hartmut Neven. Bayesian sampling using stochastic gradient thermostats. In Advances in Neural Information Processing Systems, pages 3203–3211, 2014. [11] Chao Du, Jun Zhu, and Bo Zhang. Learning deep generative models with doubly stochastic mcmc. arXiv preprint arXiv:1506.04557, 2015. [12] Kaushik Ghosh, Rao Jammalamadaka, and Ram C. Tiwari. Semiparametric bayesian techniques for problems in circular data. Journal of Applied Statistics, 30(2):145–161, 2003. [13] Mark Girolami and Ben Calderhead. Riemann manifold langevin and hamiltonian monte carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(2):123–214, 2011. [14] Siddharth Gopal and Yiming Yang. Von mises-fisher clustering models. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), 2014. [15] Matthew D. Hoffman, David M. Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013. [16] I. M. James. The topology of Stiefel manifolds, volume 24. Cambridge University Press, 1976. [17] Shiwei Lan, Bo Zhou, and Babak Shahbaba. Spherical hamiltonian monte carlo for constrained target distributions. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 629–637, 2014. [18] Chunyuan Li, Changyou Chen, Kai Fan, and Lawrence Carin. High-order stochastic gradient thermostats for bayesian learning of deep models. arXiv preprint arXiv:1512.07662, 2015. [19] Yi-An Ma, Tianqi Chen, and Emily Fox. A complete recipe for stochastic gradient mcmc. In Advances in Neural Information Processing Systems, pages 2899–2907, 2015. [20] Kanti V. Mardia and Peter E. Jupp. Distributions on spheres. Directional Statistics, pages 159–192, 2000. [21] John Nash. The imbedding problem for riemannian manifolds. Annals of Mathematics, pages 20–63, 1956. [22] Radford M. Neal. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011. [23] Sam Patterson and Yee Whye Teh. Stochastic gradient riemannian langevin dynamics on the probability simplex. In Advances in Neural Information Processing Systems, pages 3102–3110, 2013. [24] Joseph Reisinger, Austin Waters, Bryan Silverthorn, and Raymond J. Mooney. Spherical topic models. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 903–910, 2010. [25] Yang Song and Jun Zhu. Bayesian matrix completion via adaptive relaxed spectral regularization. In The 30th AAAI Conference on Artificial Intelligence (AAAI-16), 2016. [26] Eduard L. Stiefel. Richtungsfelder und fernparallelismus in n-dimensionalen mannigfaltigkeiten. Commentarii Mathematici Helvetici, 8(1):305–353, 1935. [27] Julian Straub, Jason Chang, Oren Freifeld, and John W. Fisher III. A dirichlet process mixture model for spherical data. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 930–938, 2015. [28] Jalil Taghia, Zhanyu Ma, and Arne Leijon. Bayesian estimation of the von mises-fisher mixture model with variational inference. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(9):1701–1715, 2014. [29] Max Welling and Yee Whye Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 681–688, 2011. 9 | 2016 | 264 |
6,177 | A Posteriori Error Bounds for Joint Matrix Decomposition Problems Nicolò Colombo Department of Statistical Science University College London nicolo.colombo@ucl.ac.uk Nikos Vlassis Adobe Research San Jose, CA vlassis@adobe.com Abstract Joint matrix triangularization is often used for estimating the joint eigenstructure of a set M of matrices, with applications in signal processing and machine learning. We consider the problem of approximate joint matrix triangularization when the matrices in M are jointly diagonalizable and real, but we only observe a set M’ of noise perturbed versions of the matrices in M. Our main result is a first-order upper bound on the distance between any approximate joint triangularizer of the matrices in M’ and any exact joint triangularizer of the matrices in M. The bound depends only on the observable matrices in M’ and the noise level. In particular, it does not depend on optimization specific properties of the triangularizer, such as its proximity to critical points, that are typical of existing bounds in the literature. To our knowledge, this is the first a posteriori bound for joint matrix decomposition. We demonstrate the bound on synthetic data for which the ground truth is known. 1 Introduction Joint matrix decomposition problems appear frequently in signal processing and machine learning, with notable applications in independent component analysis [7], canonical correlation analysis [20], and latent variable model estimation [5, 4]. Most of these applications reduce to some instance of a tensor decomposition problem, and the growing interest in joint matrix decomposition is largely motivated by such reductions. In particular, in the past decade several ‘matricization’ methods have been proposed for factorizing tensors by computing the joint decomposition of sets of matrices extracted from slices of the tensor (see, e.g., [10, 22, 17, 8]). In this work we address a standard joint matrix decomposition problem, in which we assume a set of jointly diagonalizable ground-truth (unobserved) matrices M◦= {Mn = V diag([Λn1, . . . , Λnd])V −1, V ∈Rd×d, Λ ∈RN×d}N n=1 , (1) which have been corrupted by noise and we observe their noisy versions: Mσ = { ˆ Mn = Mn + σRn, Mn ∈M◦, Rn ∈Rd×d, ∥Rn∥≤1}N n=1 . (2) The matrices ˆ Mn ∈Mσ are the only observed quantities. The scalar σ > 0 is the noise level, and the matrices Rn are arbitrary noise matrices with Frobenius norm ∥Rn∥≤1. The key problem is to estimate from the observed matrices in Mσ the joint eigenstructure V, Λ of the ground-truth matrices in M◦. One way to address this estimation problem is by trying to approximately jointly diagonalize the observed matrices in Mσ, for instance by directly searching for an invertible matrix that approximates V in (1). This approach is known as nonorthogonal joint diagonalization [23, 15, 18], and is often motivated by applications that reduce to nonsymmetric CP tensor decomposition (see, e.g., [20]). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. An alternative approach to the above estimation problem (in the general case of nonorthogonal V ) is via joint triangularization, also known as joint or simultaneous Schur decomposition [1, 13, 11, 12, 22, 8]. Under mild conditions [14], the ground-truth matrices in M◦can be jointly triangularized, that is, there exists an orthogonal matrix U◦that simultaneously renders all matrices U ⊤ ◦MnU◦upper triangular: low(U ⊤ ◦MnU◦) = 0, for all n = 1, . . . N, (3) where low(A) is the strictly lower triangular part of A, i.e., [low(A)]ij = Aij if i > j and 0 otherwise. On the other hand, when σ > 0 the observed matrices in Mσ can only be approximately jointly triangularized, for instance by solving the following optimization problem min U∈O(d) L(U), where L(U) = 1 N N X n=1 ∥low(U ⊤ˆ MnU)∥2 , (4) where ∥·∥denotes Frobenius norm and optimization is over the manifold O(d) of orthogonal matrices. The optimization problem can be addressed by Jacobi-like methods [13], or Newton-like methods that optimize directly on the O(d) manifold [8]. For any feasible U in (4), the joint eigenvalues Λ in (1) can be estimated from the diagonals of U ⊤ˆ MnU. This approach has been used in nonsymmetric CP tensor decomposition [22, 8] and other applications [9, 13]. We also note two related problems. In the special case that the ground-truth matrices Mn in M◦are symmetric, the matrix V in (1) is orthogonal, and the estimation problem is known as orthogonal joint diagonalization [7]. Our results apply to this special case too. Another problem is joint diagonalization by congruence [6, 3, 17], in which the matrix V −1 in (1) is replaced by V T . In that case the matrix Λ in (1) does not contain the joint eigenvalues, and our results do not apply directly. Contributions We are addressing the joint matrix triangularization problem defined via (4), under the model assumptions (1), (2), and (3). The optimization problem (4) is nonconvex, and hence it is expected to be hard to solve to global optimality in general. Therefore, error bounds are needed that can assess the quality of a solution produced by some algorithm that tries to solve (4). Our main result (Theorem 1) is an error bound that allows to directly assess a posteriori the quality of any feasible triangularizer U in (4), in terms of its proximity to the (unknown) exact trangularizer of the ground-truth matrices in M◦, regardless of the algorithm used for optimization. The bound depends only on observable quantities and the noise parameter σ in (2). The parameter σ can often be bounded by a function of the sample size, as in problems involving empirical moment matching [4]. Our approach draws on the perturbation analysis of the Schur decomposition of a single matrix [16]. To our knowledge, our bound in Theorem 1 is the first a posteriori error bound for joint matrix decomposition problems. Existing bounds in the literature have a dependence on the ground-truth (and hence unobserved) matrices [11, 17], the proximity of a feasible U to critical points of the objective function [6], or the amount of collinearity between the columns of the matrix Λ in (1) [3]. Our error bound is free of such dependencies. Outside the context of joint matrix decomposition, a posteriori error bounds have found practical uses in nonconvex optimization [19] and the design of algorithms [21]. Notation All matrices, vectors, and numbers are real. When the context is clear we use 1 to denote the identity matrix. We use ∥· ∥for matrix Frobenius norm and vector l2 norm. O(d) is the manifold of orthogonal matrices U such that U ⊤U = 1. The matrix commutator [A, B] is defined by [A, B] = AB −BA. We use ⊗for Kronecker product. For a matrix A, we denote by λi(A) its ith eigenvalue, λmin(A) its smallest eigenvalue, κ(A) its condition number, vec(A) its columnwise vectorization, and low(A) and up(A) its strictly lower triangular and strictly upper triangular parts, respectively. Low is a binary diagonal matrix defined by vec(low(A)) = Low vec(A). Skew is a skew-symmetric projector defined by Skew vec(A) = vec(A −A⊤). PLow is a d(d −1)/2 × d2 binary matrix with orthogonal rows, which projects to the subspace of vectorized strictly lower triangular matrices, such that PLowP ⊤ Low = 1 and P ⊤ LowPLow = Low. For example, for d = 3, one has Low = diag([0, 1, 1, 0, 0, 1, 0, 0, 0]) and Plow = 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ! . 2 2 Perturbation of joint triangularizers The objective function (4) is continuous in the parameter σ. This implies that, for σ small enough, the approximate joint triangularizers of the observed matrices ˆ Mn ∈Mσ can be expected to be perturbations of the exact triangularizers of the ground-truth matrices Mn ∈M◦. To formalize this, we express each feasible triangularizer U in (4) as a function of some exact triangularizer U◦of the ground-truth matrices, as follows: U = U◦eαX, where X = −X⊤, ∥X∥= 1, α > 0, (5) where e denotes matrix exponential and X is a skew-symmetric matrix. Such an expansion holds for any pair U, U◦of orthogonal matrices with det(U) = det(U◦) (see, e.g., [2]). The scalar α in (5) can be interpreted as the ‘distance’ between the matrices U and U◦. Our main result is an upper bound on this distance: Theorem 1. Let M◦and Mσ be the sets of matrices defined in (1) and (2), respectively. Let U be a feasible solution of the optimization problem (4), with corresponding value L(U). Then there exists an orthogonal matrix U◦that is an exact joint triangularizer of M◦, such that U can be expressed as a perturbation of U◦according to (5), with α obeying α ≤ p L(U) + σ p λmin(ˆτ) + O(α2) , where (6) ˆτ = 1 2N N X n=1 ˆT ⊤ n ˆTn, ˆTn = Plow 1 ⊗(U ⊤ˆ MnU) −(U ⊤ˆ M ⊤ n U) ⊗1 Skew P ⊤ low. (7) Proof. Let U◦be the exact joint triangularizer of M◦that is the nearest to U and det U = det U◦. Then U = U◦eαX for some unit-norm skew-symmetric matrix X and scalar α > 0. Using the expansion eαX = I + αX + O(α2) and the fact that X is skew-symmetric, we can write, for any n = 1, . . . , N, U ⊤ˆ MnU = U ⊤ ◦ˆ MnU◦+ α[U ⊤ ◦ˆ MnU◦, X] + O(α2), (8) where [·, ·] denotes matrix commutator. Applying the low(·) operator and using the facts that αU ⊤ ◦ˆ MnU◦= αU ⊤ˆ MnU + O(α2) and low(U ⊤ ◦MnU◦) = 0, for any n = 1, . . . , N, we can write α low([U ⊤ˆ MnU, X]) = low(U ⊤ˆ MnU) −σ low(U ⊤ ◦RnU◦) + O(α2). (9) Stacking (9) over n, then taking Frobenius norm, and applying the triangle inequality together with the fact ∥low(U ⊤ ◦RnU◦)∥≤∥U ⊤ ◦RnU◦∥= ∥Rn∥≤1 for all n = 1, . . . , N, we get α N X n=1 ∥low([U ⊤ˆ MnU, X])∥2 1 2 ≤ p NL(U) + σ √ N + O(α2), (10) where we used the definition of L(U) from (4). The rest of the proof involves computing a lower bound of the left-hand side of (10) that holds for all X. Since ∥low(A)∥= ∥Plowvec(A)∥, we can rewrite the argument of each norm in the left-hand side of (10) as low([U ⊤ˆ MnU, X]) = Plow vec([U ⊤ˆ MnU, X]) (11) = Plow 1 ⊗(U ⊤ˆ MnU) −(U ⊤ˆ M ⊤ n U) ⊗1 vec(X), (12) and, due to the skew-symmetry of X, we can write vec(X) = vec(low(X) + up(X)) = vec(low(X) −low(X)⊤) (13) = Skew Low vec(X) = Skew P ⊤ low Plow vec(X) . (14) Hence, for all n = 1, . . . , N, we can write ∥low([U ⊤ˆ MnU, X])∥2 = ∥ˆTnx∥2 = x⊤ˆT ⊤ n ˆTnx, where x = Plow vec(X) and ˆTn is defined in (7). The inequality in (6) then follows by using the inequality x⊤Ax ≥∥x∥2 λmin(A), which holds for any symmetric matrix A, and noting that ∥x∥2 = 1 2 (since x contains the lower triangular part of X and ∥X∥2 = 1). 3 For general Mσ, an analytical expression of λmin (ˆτ) in (6) is not available. However, it is straightforward to compute λmin (ˆτ) numerically since all quantities in (7) are observable. Moreover, it is possible to show (see Theorem 2) that in the limit σ →0 and under certain conditions on the ground-truth matrices in M◦, the operator τ = limσ→0 ˆτ is nonsingular, i.e., λmin(τ) > 0. Since both ˆτ and L are continuous in σ for σ →0, the boundedness of the right-hand side of (6) is guaranteed, for σ small enough, by eigenvalue perturbation theorems. Theorem 2. The operator ˆτ defined in (7) obeys lim σ→0 p λmin(ˆτ) ≥ √ Γ κ(V )2 , (15) where Γ = mini>j 1 2N PN n=1(λi(Mn) −λj(Mn))2, and the matrix V is defined in (1). The proof is given in the Appendix. The quantity Γ can be interpreted as a ‘joint eigengap’ of M◦(see also [17] for a similar definition in the context of joint diagonalization by congruence). Theorem 2 implies that limσ→0 λmin(ˆτ) > 0 if Γ > 0, and the latter is guaranteed under the following condition: Condition 1. For every i ̸= j, i, j = 1, . . . , d, there exists at least n ∈{1, . . . , N} such that λi(Mn) ̸= λj(Mn), where Mn ∈M◦. (16) 3 Experiments To assess the tightness of the inequality in (6), we created a set of synthetic problems in which the ground truth is known, and we evaluated the bounds obtained from (6) against the true values. Each problem involved the approximate triangularization of a set of randomly generated nearly joint diagonalizable matrices of the form ˆ Mn = V ΛnV −1 + σRn, with Λn diagonal and ∥Rn∥= 1, for n = 1, . . . , N. For each set Mσ = { ˆ Mn}N n=1, two approximate joint triangularizers were computed by optimizing (4) using two different iterative algorithms, the Gauss-Newton algorithm [8], and the Jacobi algorithm [13] (our implementation), initialized with the same random orthogonal matrix. The obtained solutions U (which may not be the global optima) were then used to compute the empirical bound α from (6), as well as the actual distance parameter αtrue = ∥log U ⊤U◦∥, with U◦being the global optimum of the unperturbed problem (σ = 0) that is closest to U and has the same determinant. Locating the closest U◦to the given U required checking all 2dd! possible exact triangularizers of M◦, thus we restricted our empirical evaluation to the case d = 5. We considered two settings, N = 5 and N = 100, and several different noise levels obtained by varying the perturbation parameter σ. The first two graphs in Figure 1 show the value of the noise level σ against the values of αtrue = αtrue(U) and the corresponding empirical bounds α = α(U) from (6), where U are the solutions found by the Gauss-Newton algorithm. (Very similar results were obtained using the Jacobi algorithm.) All values are obtained by averaging over 10 equivalent experiments, and the errorbars show the corresponding standard deviations. For the same set of solutions U, the third graph in Figure 1 shows the ratios α αtrue . The experiments show that, at least for small N, the bound (6) produces a reasonable estimate of the true perturbation parameter αtrue. However, our bound does not fully capture the concentration that is expected (and observed in practice) for large sets of nearly jointly decomposable matrices (note, for instance, the average value of αtrue in Figure 1, for N = 5 vs N = 100). This is most likely due to the introduced approximation ∥low(U ⊤ ◦RnU◦)∥≤1 and the use of the triangle inequality in (10) (see proof of Theorem 1), which are needed to separate the observable terms U ⊤ˆ MnU from the unobservable terms U ⊤ 0 RnU0 in the right-hand side of (9). Extra assumptions on the distribution of the random matrices Rn can possibly allow obtaining tighter bounds in a probabilistic setting. 4 Conclusions We addressed a joint matrix triangularization problem that involves finding an orthogonal matrix that approximately triangularizes a set of noise-perturbed jointly diagonalizable matrices. The setting can have many applications in statistics and signal processing, in particular in problems that reduce to a nonsymmetric CP tensor decomposition [4, 8, 20]. The joint matrix triangularization problem can be cast as a nonconvex optimization problem over the manifold of orthogonal matrices, and it can be 4 -8 -6 -4 -2 0 log(<) -10 -8 -6 -4 -2 0 2 log(,) N=5 ,true , -8 -6 -4 -2 0 log(<) -10 -8 -6 -4 -2 0 2 log(,) N=100 ,true , -8 -7 -6 -5 -4 -3 -2 -1 0 log(<) 0 20 40 60 80 100 ,/,true N=5 N=100 Figure 1: The empirical bound α from (6) vs the true distance αtrue, on synthetic experiments. solved numerically but with no success guarantees. We have derived a posteriori upper bounds on the distance between any approximate triangularizer (obtained by any algorithm) and the (unknown) solution of the underlying unperturbed problem. The bounds depend only on empirical quantities and hence they can be used to asses the quality of any feasible solution, even when the ground truth is not known. We established that, under certain conditions, the bounds are well defined when the noise is small. Synthetic experiments suggest that the obtained bounds are tight enough to be useful in practice. In future work, we want to apply our analysis to related problems, such as nonnegative tensor decomposition and simultaneous generalized Schur decomposition [11], and to empirically validate the obtained bounds in machine learning applications [4]. A Proof of Theorem 2 The proof consists of two steps. The first step consists of showing that in the limit σ →0 the operator ˆτ defined in (7) tends to a simpler operator, τ, which depends on ground-truth quantities only. The second step is to derive a lower bound on the smallest eigenvalue of the operator τ. Let τ be defined by τ = 1 2N N X n=1 T ⊤ n Tn, Tn = Plow 1 ⊗(U ⊤ ◦MnU◦) −(U ⊤ ◦M ⊤ n U◦) ⊗1 Plow, (17) where Mn ∈M◦, and U◦is the exact joint triangularizer of M◦that is closest to, and has the same determinant as, U, the approximate joint triangularizer that is used to define ˆτ. Proving that ˆτ →τ as σ →0 is equivalent to showing that ˆTn σ=0 = Plow 1 ⊗(U ⊤ˆ MnU) −(U ⊤ˆ M ⊤ n U) ⊗1 Skew P ⊤ low σ=0 = Tn . (18) Since for all n = 1, . . . , N, one has ˆ Mn →Mn when σ →0, we need to prove that U →U◦and that we can remove the Skew operator on the right. We first show that U = U◦eαX →U◦, that is, α →0 as σ →0. Assume that the descent algorithm used to obtain U is initialized with Uinit obtained from the Schur decomposition of ˆ M∗∈Mσ. Let U◦be the exact triangularizer of M◦closest to Uinit and Uopt be the local optimum of the joint triangularization objective closest to Uinit. Then, as σ →0 one has Uopt →U◦, by continuity of the objective in σ, and also Uinit →U◦due to the perturbation properties of the Schur decomposition. This implies U →U◦, and hence α →0. Then, it is easy to prove that Plow(1 ⊗(U ⊤ ◦MnU◦) −(U ⊤ ◦M ⊤ n U◦) ⊗1) Skew P ⊤ low = Plow(1 ⊗ (U ⊤ ◦MnU◦) −(U ⊤ ◦M ⊤ n U◦) ⊗1)P ⊤ low by considering the action of the two operators on x = Plowvec(X), with X = −X⊤. One has Plow(1 ⊗(U ⊤ ◦MnU◦) −(U ⊤ ◦M ⊤ n U◦) ⊗1) Skew P ⊤ low = P ⊤ lowvec low[U ⊤ ◦MnU◦, X] = P ⊤ lowvec low[U ⊤ ◦MnU◦, low(X)] = Plow(1 ⊗(U ⊤ ◦MnU◦) −(U ⊤ ◦M ⊤ n U◦) ⊗1)P ⊤ low (19) where in the second line we used the fact that U ⊤ ◦M ⊤ n U◦is upper triangular. This shows that ˆτ →τ as σ →0. 5 The second part of the proof consists of bounding the smallest eigenvalue of τ. We will make use of the following identity that holds when A and C are upper triangular: low(ABC) = low(A low(B) C) , (20) from which we get the following identity when A and C are upper triangular: Low vec(ABC) = Low (C⊤⊗A) Low vec(B) . (21) In particular, one has P ⊤ lowTnx = Lowvec([U ⊤ ◦MnU◦, low(X)]) = Lowvec(U ⊤ ◦MnU◦low(X) − low(X)U ⊤ ◦MnU◦) and it can be shown that1 Low vec( ˜V Λn ˜V −1low(X)) = Low ( ˜V −T ⊗˜V ) Low (I ⊗Λn) Low ( ˜V ⊤⊗˜V −1) Low vec(X) (29) and Low vec(low(X) ˜V Λn ˜V −1) = Low ( ˜V −T ⊗˜V ) Low (Λn ⊗I) Low ( ˜V ⊤⊗˜V −1) Low vec(X) (30) where ˜V and ˜V −1 are upper triangular matrices defined by U ⊤ ◦MnU◦= ˜V Λn ˜V −1. Now, since ˜V = U ⊤ ◦V , where V is defined via the spectral decomposition Mn = V ΛnV −1, we can rewrite the operator Tn as Tn = Plow(U ⊤ ◦V −T ⊗U ⊤ ◦V )Low(1 ⊗Λn −Λn ⊗1)Low(V T U◦⊗V −1U◦)P ⊤ low , (31) and use the following inequality for the smallest eigenvalue of τ = 1 2N PN n=1 T ⊤ n Tn: λmin(τ) ≥ 1 2N λmin(A) λmin(B) λmin(C), (32) where A = Plow(U ⊤ ◦V ⊗U ⊤ ◦V −T )P ⊤ low, (33) B = Plow N X n=1 (1 ⊗Λn −Λn ⊗1)2 ! P ⊤ low, (34) C = Plow(V −1U◦⊗V T U◦)P ⊤ low. (35) Now, it is easy to show that λmin(A) = λmin(C) ≥ 1 κ(V )2 since the d(d−1)/2×d(d−1)/2 matrices A and C are obtained by deleting certain rows and columns of U ⊤ ◦V ⊗U ⊤ ◦V −T and V −1U◦⊗V T U◦ respectively. The matrix B is a diagonal matrix with entries given by [B]kk = N X n=1 ([Λn]ii −[Λn]jj)2, k = j −i + i−1 X a=1 (d −a), (36) with 0 < i < j and j = 1, . . . d. This implies λmin(B) = mini<j PN n=1(λi(Mn) −λj(Mn))2 and lim σ→0 λmin(ˆτ) ≥ Γ κ(V )4 , (37) where Γ = mini>j 1 2N PN n=1(λi(Mn)−λj(Mn))2 is a ‘joint eigengap’ of the ground-truth matrices Mn ∈M◦. □ 1For any matrix Y one has Low vec( ˜V Λn ˜V −1Y ) = (22) Low vec( ˜V Λn ˜V −1Y ˜V ˜V −1) = (23) Low ( ˜V −T ⊗˜V ) Low vec(Λn ˜V −1Y ˜V ) = (24) Low ( ˜V −T ⊗˜V ) Low (I ⊗Λn) Low vec( ˜V −1Y ˜V ) = (25) Low ( ˜V −T ⊗˜V ) Low (I ⊗Λn) Low ( ˜V ⊤⊗˜V −1) Low vec(Y ) (26) and similarly Low vec(Y ˜V Λn ˜V −1) = (27) Low ( ˜V −T ⊗˜V ) Low (Λn ⊗I) Low ( ˜V ⊤⊗˜V −1) Low vec(Y ) (28) 6 References [1] K. Abed-Meraim and Y. Hua. A least-squares approach to joint Schur decomposition. In Acoustics, Speech and Signal Processing, 1998. Proceedings of the 1998 IEEE International Conference on, volume 4, pages 2541–2544. IEEE, 1998. [2] P.-A. Absil, R. Mahony, and R. Sepulchre. Optimization algorithms on matrix manifolds. Princeton University Press, 2009. [3] B. Afsari. Sensitivity analysis for the problem of matrix joint diagonalization. SIAM Journal on Matrix Analysis and Applications, 30(3):1148–1171, 2008. [4] A. Anandkumar, R. Ge, D. Hsu, S. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. Journal of Machine Learning Research, 15:2773–2832, 2014. [5] B. Balle, A. Quattoni, and X. Carreras. A spectral learning algorithm for finite state transducers. In Machine Learning and Knowledge Discovery in Databases, pages 156–171. Springer, 2011. [6] J.-F. Cardoso. Perturbation of joint diagonalizers. Telecom Paris, Signal Department, Technical Report 94D023, 1994. [7] J.-F. Cardoso and A. Souloumiac. Jacobi angles for simultaneous diagonalization. SIAM journal on matrix analysis and applications, 17(1):161–164, 1996. [8] N. Colombo and N. Vlassis. Tensor decomposition via joint matrix Schur decomposition. In Proc. 33rd International Conference on Machine Learning, 2016. [9] R. M. Corless, P. M. Gianni, and B. M. Trager. A reordered Schur factorization method for zerodimensional polynomial systems with multiple roots. In Proceedings of the 1997 international symposium on Symbolic and algebraic computation, pages 133–140. ACM, 1997. [10] L. De Lathauwer. A link between the canonical decomposition in multilinear algebra and simultaneous matrix diagonalization. SIAM Journal on Matrix Analysis and Applications, 28(3):642–666, 2006. [11] L. De Lathauwer, B. De Moor, and J. Vandewalle. Computation of the canonical decomposition by means of a simultaneous generalized Schur decomposition. SIAM Journal on Matrix Analysis and Applications, 26(2):295–327, 2004. [12] T. Fu, S. Jin, and X. Gao. Balanced simultaneous Schur decomposition for joint eigenvalue estimation. In Communications, Circuits and Systems Proceedings, 2006 International Conference on, volume 1, pages 356–360. IEEE, 2006. [13] M. Haardt and J. A. Nossek. Simultaneous Schur decomposition of several nonsymmetric matrices to achieve automatic pairing in multidimensional harmonic retrieval problems. Signal Processing, IEEE Transactions on, 46(1):161–169, 1998. [14] R. A. Horn and C. R. Johnson. Matrix analysis. Cambridge University Press, 2nd edition, 2012. [15] R. Iferroudjene, K. A. Meraim, and A. Belouchrani. A new Jacobi-like method for joint diagonalization of arbitrary non-defective matrices. Applied Mathematics and Computation, 211(2):363–373, 2009. [16] M. Konstantinov, P. H. Petkov, and N. Christov. Nonlocal perturbation analysis of the Schur system of a matrix. SIAM Journal on Matrix Analysis and Applications, 15(2):383–392, 1994. [17] V. Kuleshov, A. Chaganty, and P. Liang. Tensor factorization via matrix factorization. In 18th International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [18] X. Luciani and L. Albera. Joint eigenvalue decomposition using polar matrix factorization. In International Conference on Latent Variable Analysis and Signal Separation, pages 555–562. Springer, 2010. [19] J.-S. Pang. A posteriori error bounds for the linearly-constrained variational inequality problem. Mathematics of Operations Research, 12(3):474–484, 1987. 7 [20] A. Podosinnikova, F. Bach, and S. Lacoste-Julien. Beyond CCA: Moment matching for multiview models. In Proc. 33rd International Conference on Machine Learning, 2016. [21] S. Prudhomme, J. T. Oden, T. Westermann, J. Bass, and M. E. Botkin. Practical methods for a posteriori error estimation in engineering applications. International Journal for Numerical Methods in Engineering, 56(8):1193–1224, 2003. [22] S. H. Sardouie, L. Albera, M. B. Shamsollahi, and I. Merlet. Canonical polyadic decomposition of complex-valued multi-way arrays based on simultaneous Schur decomposition. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 4178– 4182. IEEE, 2013. [23] A. Souloumiac. Nonorthogonal joint diagonalization by combining Givens and hyperbolic rotations. IEEE Transactions on Signal Processing, 57(6):2222–2231, 2009. 8 | 2016 | 265 |
6,178 | Global Analysis of Expectation Maximization for Mixtures of Two Gaussians Ji Xu Columbia University jixu@cs.columbia.edu Daniel Hsu Columbia University djhsu@cs.columbia.edu Arian Maleki Columbia University arian@stat.columbia.edu Abstract Expectation Maximization (EM) is among the most popular algorithms for estimating parameters of statistical models. However, EM, which is an iterative algorithm based on the maximum likelihood principle, is generally only guaranteed to find stationary points of the likelihood objective, and these points may be far from any maximizer. This article addresses this disconnect between the statistical principles behind EM and its algorithmic properties. Specifically, it provides a global analysis of EM for specific models in which the observations comprise an i.i.d. sample from a mixture of two Gaussians. This is achieved by (i) studying the sequence of parameters from idealized execution of EM in the infinite sample limit, and fully characterizing the limit points of the sequence in terms of the initial parameters; and then (ii) based on this convergence analysis, establishing statistical consistency (or lack thereof) for the actual sequence of parameters produced by EM. 1 Introduction Since Fisher’s 1922 paper (Fisher, 1922), maximum likelihood estimators (MLE) have become one of the most popular tools in many areas of science and engineering. The asymptotic consistency and optimality of MLEs have provided users with the confidence that, at least in some sense, there is no better way to estimate parameters for many standard statistical models. Despite its appealing properties, computing the MLE is often intractable. Indeed, this is the case for many latent variable models {f(Y, z; η)}, where the latent variables z are not observed. For each setting of the parameters η, the marginal distribution of the observed data Y is (for discrete z) f(Y; η) = X z f(Y, z; η) . It is this marginalization over latent variables that typically causes the computational difficulty. Furthermore, many algorithms based on the MLE principle are only known to find stationary points of the likelihood objective (e.g., local maxima), and these points are not necessarily the MLE. 1.1 Expectation Maximization Among the algorithms mentioned above, Expectation Maximization (EM) has attracted more attention for the simplicity of its iterations, and its good performance in practice (Dempster et al., 1977; Redner and Walker, 1984). EM is an iterative algorithm for climbing the likelihood objective starting from an initial setting of the parameters ˆη⟨0⟩. In iteration t, EM performs the following steps: E-step: ˆQ(η | ˆη⟨t⟩) ≜ X z f(z | Y; ˆη⟨t⟩) log f(Y, z; η) , (1) M-step: ˆη⟨t+1⟩≜arg max η ˆQ(η | ˆη⟨t⟩) , (2) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In many applications, each step is intuitive and can be performed very efficiently. Despite the popularity of EM, as well as the numerous theoretical studies of its behavior, many important questions about its performance—such as its convergence rate and accuracy—have remained unanswered. The goal of this paper is to address these questions for specific models (described in Section 1.2) in which the observation Y is an i.i.d. sample from a mixture of two Gaussians. Towards this goal, we study an idealized execution of EM in the large sample limit, where the E-step is modified to be computed over an infinitely large i.i.d. sample from a Gaussian mixture distribution in the model. In effect, in the formula for ˆQ(η | ˆη⟨t⟩), we replace the observed data Y with a random variable Y ∼f(y; η⋆) for some Gaussian mixture parameters η⋆and then take its expectation. The resulting E- and M-steps in iteration t are E-step: Q(η | η⟨t⟩) ≜EY "X z f(z | Y ; η⟨t⟩) log f(Y , z; η) # , (3) M-step: η⟨t+1⟩≜arg max η Q(η | η⟨t⟩) . (4) This sequence of parameters (η⟨t⟩)t≥0 is fully determined by the initial setting η⟨0⟩. We refer to this idealization as Population EM, a procedure considered in previous works of Srebro (2007) and Balakrishnan et al. (2014). Not only does Population EM shed light on the dynamics of EM in the large sample limit, but it can also reveal some of the fundamental limitations of EM. Indeed, if Population EM cannot provide an accurate estimate for the parameters η⋆, then intuitively, one would not expect the EM algorithm with a finite sample size to do so either. (To avoid confusion, we refer the original EM algorithm run with a finite sample as Sample-based EM.) 1.2 Models and Main Contributions In this paper, we study EM in the context of two simple yet popular and well-studied Gaussian mixture models. The two models, along with the corresponding Sample-based EM and Population EM updates, are as follows: Model 1. The observation Y is an i.i.d. sample from the mixture distribution 0.5N(−θ⋆, Σ) + 0.5N(θ⋆, Σ); Σ is a known covariance matrix in Rd, and θ⋆is the unknown parameter of interest. 1. Sample-based EM iteratively updates its estimate of θ⋆according to the following equation: ˆθ ⟨t+1⟩ = 1 n n X i=1 2wd yi, ˆθ ⟨t⟩ −1 yi, (5) where y1, . . . , yn are the independent draws that comprise Y, wd(y, θ) ≜ φd(y −θ) φd(y −θ) + φd(y + θ), and φd is the density of a Gaussian random vector with mean 0 and covariance Σ. 2. Population EM iteratively updates its estimate according to the following equation: θ⟨t+1⟩ = E(2wd(Y , θ⟨t⟩) −1)Y , (6) where Y ∼0.5N(−θ⋆, Σ) + 0.5N(θ⋆, Σ). Model 2. The observation Y is an i.i.d. sample from the mixture distribution 0.5N(µ⋆ 1, Σ) + 0.5N(µ⋆ 2, Σ). Again, Σ is known, and (µ⋆ 1, µ⋆ 2) are the unknown parameters of interest. 1. Sample-based EM iteratively updates its estimate of µ⋆ 1 and µ⋆ 2 at every iteration according to the following equations: ˆµ⟨t+1⟩ 1 = Pn i=1 vd(yi, ˆµ⟨t⟩ 1 , ˆµ⟨t⟩ 2 )yi Pn i=1 vd(yi, ˆµ⟨t⟩ 1 , ˆµ⟨t⟩ 2 ) , (7) ˆµ⟨t+1⟩ 2 = Pn i=1(1 −vd(yi, ˆµ⟨t⟩ 1 , ˆµ⟨t⟩ 2 ))yi Pn i=1(1 −vd(yi, ˆµ⟨t⟩ 1 , ˆµ⟨t⟩ 2 )) , (8) 2 where y1, . . . , yn are the independent draws that comprise Y, and vd(y, µ1, µ2) ≜ φd(y −µ1) φd(y −µ1) + φd(y −µ2). 2. Population EM iteratively updates its estimates according to the following equations: µ⟨t+1⟩ 1 = Evd(Y , µ⟨t⟩ 1 , µ⟨t⟩ 2 )Y Evd(Y , µ⟨t⟩ 1 , µ⟨t⟩ 2 ) , (9) µ⟨t+1⟩ 2 = E(1 −vd(Y , µ⟨t⟩ 1 , µ⟨t⟩ 2 ))Y E(1 −vd(Y , µ⟨t⟩ 1 , µ⟨t⟩ 2 )) , (10) where Y ∼0.5N(µ⋆ 1, Σ) + 0.5N(µ⋆ 2, Σ). Our main contribution in this paper is a new characterization of the stationary points and dynamics of EM in both of the above models. 1. We prove convergence for the sequence of iterates for Population EM from each model: the sequence (θ⟨t⟩)t≥0 converges to either θ⋆, −θ⋆, or 0; the sequence ((µ⟨t⟩ 1 , µ⟨t⟩ 2 ))t≥0 converges to either (µ⋆ 1, µ⋆ 2), (µ⋆ 2, µ⋆ 1), or ((µ⋆ 1 + µ⋆ 2)/2, (µ⋆ 1 + µ⋆ 2)/2). We also fully characterize the initial parameter settings that lead to each limit point. 2. Using this convergence result for Population EM, we also prove that the limits of the Samplebased EM iterates converge in probability to the unknown parameters of interest, as long as Sample-based EM is initialized at points where Population EM would converge to these parameters as well. Formal statements of our results are given in Section 2. 1.3 Background and Related Work The EM algorithm was formally introduced by Dempster et al. (1977) as a general iterative method for computing parameter estimates from incomplete data. Although EM is billed as a procedure for maximum likelihood estimation, it is known that with certain initializations, the final parameters returned by EM may be far from the MLE, both in parameter distance and in log-likelihood value (Wu, 1983). Several works characterize convergence of EM to stationary points of the log-likelihood objective under certain regularity conditions (Wu, 1983; Tseng, 2004; Vaida, 2005; Chrétien and Hero, 2008). However, these analyses do not distinguish between global maximizers and other stationary points (except, e.g., when the likelihood function is unimodal). Thus, as an optimization algorithm for maximizing the log-likelihood objective, the “worst-case” performance of EM is somewhat discouraging. For a more optimistic perspective on EM, one may consider a “best-case” analysis, where (i) the data are an iid sample from a distribution in the given model, (ii) the sample size is sufficiently large, and (iii) the starting point for EM is sufficiently close to the parameters of the data generating distribution. Conditions (i) and (ii) are ubiquitous in (asymptotic) statistical analyses, and (iii) is a generous assumption that may be satisfied in certain cases. Redner and Walker (1984) show that in such a favorable scenario, EM converges to the MLE almost surely for a broad class of mixture models. Moreover, recent work of Balakrishnan et al. (2014) gives non-asymptotic convergence guarantees in certain models; importantly, these results permit one to quantify the accuracy of a pilot estimator required to effectively initialize EM. Thus, EM may be used in a tractable two-stage estimation procedures given a first-stage pilot estimator that can be efficiently computed. Indeed, for the special case of Gaussian mixtures, researchers in theoretical computer science and machine learning have developed efficient algorithms that deliver the highly accurate parameter estimates under appropriate conditions. Several of these algorithms, starting with that of Dasgupta (1999), assume that the means of the mixture components are well-separated—roughly at distance either dα or kβ for some α, β > 0 for a mixture of k Gaussians in Rd (Dasgupta, 1999; Arora and Kannan, 2005; Dasgupta and Schulman, 2007; Vempala and Wang, 2004; Kannan et al., 2008; Achlioptas and McSherry, 2005; Chaudhuri and Rao, 2008; Brubaker and Vempala, 2008; Chaudhuri et al., 2009a). More recent work employs the method-of-moments, which permit the means of the 3 mixture components to be arbitrarily close, provided that the sample size is sufficiently large (Kalai et al., 2010; Belkin and Sinha, 2010; Moitra and Valiant, 2010; Hsu and Kakade, 2013; Hardt and Price, 2015). In particular, Hardt and Price (2015) characterize the information-theoretic limits of parameter estimation for mixtures of two Gaussians, and that they are achieved by a variant of the original method-of-moments of Pearson (1894). Most relevant to this paper are works that specifically analyze EM (or variants thereof) for Gaussian mixture models, especially when the mixture components are well-separated. Xu and Jordan (1996) show favorable convergence properties (akin to super-linear convergence near the MLE) for wellseparated mixtures. In a related but different vein, Dasgupta and Schulman (2007) analyze a variant of EM with a particular initialization scheme, and proves fast convergence to the true parameters, again for well-separated mixtures in high-dimensions. For mixtures of two Gaussians, it is possible to exploit symmetries to get sharper analyses. Indeed, Chaudhuri et al. (2009b) uses these symmetries to prove that a variant of Lloyd’s algorithm (MacQueen, 1967; Lloyd, 1982) (which may be regarded as a hard-assignment version of EM) very quickly converges to the subspace spanned by the two mixture component means, without any separation assumption. Lastly, for the specific case of our Model 1, Balakrishnan et al. (2014) proves linear convergence of EM (as well as a gradient-based variant of EM) when started in a sufficiently small neighborhood around the true parameters, assuming a minimum separation between the mixture components. Here, the permitted size of the neighborhood grows with the separation between the components, and a recent result of Klusowski and Brinda (2016) quantitatively improves this aspect of the analysis (but still requires a minimum separation). Remarkably, by focusing attention on the local region around the true parameters, they obtain nonasymptotic bounds on the parameter estimation error. Our work is complementary to their results in that we focus on asymptotic limits rather than finite sample analysis. This allows us to provide a global analysis of EM without separation or initialization conditions, which cannot be deduced from the results of Balakrishnan et al. or Klusowski and Brinda by taking limits. Finally, two related works have appeared following the initial posting of this article (Xu et al., 2016). First, Daskalakis et al. (2016) concurrently and independently proved a convergence result comparable to our Theorem 1 for Model 1; for this case, they also provide an explicit rate of linear convergence. Second, Jin et al. (2016) show that similar results do not hold in general for uniform mixtures of three or more spherical Gaussian distributions: common initialization schemes for (Population or Sample-based) EM may lead to local maxima that are arbitrarily far from the global maximizer. Similar results were well-known for Lloyd’s algorithm, but were not previously established for Population EM (Srebro, 2007). 2 Analysis of EM for Mixtures of Two Gaussians In this section, we present our results for Population EM and Sample-based EM under both Model 1 and Model 2, and also discuss further implications about the expected log-likelihood function. Without loss of generality, we may assume that the known covariance matrix Σ is the identity matrix Id. Throughout, we denote the Euclidean norm by ∥· ∥, and the signum function by sgn(·) (where sgn(0) = 0, sgn(z) = 1 if z > 0, and sgn(z) = −1 if z < 0). 2.1 Main Results for Population EM We present results for Population EM for both models, starting with Model 1. Theorem 1. Assume θ⋆∈Rd \ {0}. Let (θ⟨t⟩)t≥0 denote the Population EM iterates for Model 1, and suppose ⟨θ⟨0⟩, θ⋆⟩̸= 0. There exists κθ ∈(0, 1)—depending only on θ⋆and θ⟨0⟩—such that
θ⟨t+1⟩−sgn(⟨θ⟨0⟩, θ⋆⟩)θ⋆
≤ κθ ·
θ⟨t⟩−sgn(⟨θ⟨0⟩, θ⋆⟩)θ⋆
. The proof of Theorem 1 and all other omitted proofs are given in the full version of this article (Xu et al., 2016). Theorem 1 asserts that if θ⟨0⟩is not on the hyperplane {x ∈Rd : ⟨x, θ⋆⟩= 0}, then the sequence (θ⟨t⟩)t≥0 converges to either θ⋆or −θ⋆. Our next result shows that if ⟨θ⟨0⟩, θ⋆⟩= 0, then (θ⟨t⟩)t≥0 still converges, albeit to 0. 4 Theorem 2. Let (θ⟨t⟩)t≥0 denote the Population EM iterates for Model 1. If ⟨θ⟨0⟩, θ⋆⟩= 0, then θ⟨t⟩ → 0 as t →∞. Theorems 1 and 2 together characterize the fixed points of Population EM for Model 1, and fully specify the conditions under which each fixed point is reached. The results are simply summarized in the following corollary. Corollary 1. If (θ⟨t⟩)t≥0 denote the Population EM iterates for Model 1, then θ⟨t⟩ → sgn(⟨θ⟨0⟩, θ⋆⟩)θ⋆ as t →∞. We now discuss Population EM with Model 2. To state our results more concisely, we use the following re-parameterization of the model parameters and Population EM iterates: a⟨t⟩≜µ⟨t⟩ 1 + µ⟨t⟩ 2 2 −µ⋆ 1 + µ⋆ 2 2 , b⟨t⟩≜µ⟨t⟩ 2 −µ⟨t⟩ 1 2 , θ⋆≜µ⋆ 2 −µ⋆ 1 2 . (11) If the sequence of Population EM iterates ((µ⟨t⟩ 1 , µ⟨t⟩ 2 ))t≥0 converges to (µ⋆ 1, µ⋆ 2), then we expect b⟨t⟩→θ⋆. Hence, we also define β⟨t⟩as the angle between b⟨t⟩and θ⋆, i.e., β⟨t⟩ ≜ arccos ⟨b⟨t⟩, θ⋆⟩ ∥b⟨t⟩∥∥θ⋆∥ ! ∈[0, π] . (This is well-defined as long as b⟨t⟩̸= 0 and θ⋆̸= 0.) We first present results on Population EM with Model 2 under the initial condition ⟨b⟨0⟩, θ⋆⟩̸= 0. Theorem 3. Assume θ⋆∈Rd \ {0}. Let (a⟨t⟩, b⟨t⟩)t≥0 denote the (re-parameterized) Population EM iterates for Model 2, and suppose ⟨b⟨0⟩, θ⋆⟩̸= 0. Then b⟨t⟩̸= 0 for all t ≥0. Furthermore, there exist κa ∈(0, 1)—depending only on ∥θ⋆∥and |⟨b⟨0⟩, θ⋆⟩/∥b⟨0⟩∥|—and κβ ∈(0, 1)—depending only on ∥θ⋆∥, ⟨b⟨0⟩, θ⋆⟩/∥b⟨0⟩∥, ∥a⟨0⟩∥, and ∥b⟨0⟩∥—such that ∥a⟨t+1⟩∥2 ≤ κ2 a · ∥a⟨t⟩∥2 + ∥θ⋆∥2 sin2(β⟨t⟩) 4 , sin(β⟨t+1⟩) ≤ κt β · sin(β⟨0⟩) . By combining the two inequalities from Theorem 3, we conclude ∥a⟨t+1⟩∥2 = κ2t a ∥a⟨0⟩∥2 + ∥θ⋆∥2 4 t X τ=0 κ2τ a · sin2(β⟨t−τ⟩) ≤ κ2t a ∥a⟨0⟩∥2 + ∥θ⋆∥2 4 t X τ=0 κ2τ a κ2(t−τ) β · sin2(β⟨0⟩) ≤ κ2t a ∥a⟨0⟩∥2 + ∥θ⋆∥2 4 t max κa, κβ t sin2(β⟨0⟩) . Theorem 3 shows that the re-parameterized Population EM iterates converge, at a linear rate, to the average of the two means (µ⋆ 1 + µ⋆ 2)/2, as well as the line spanned by θ⋆. The theorem, however, does not provide any information on the convergence of the magnitude of b⟨t⟩to the magnitude of θ⋆. This is given in the next theorem. Theorem 4. Assume θ⋆∈Rd \ {0}. Let (a⟨t⟩, b⟨t⟩)t≥0 denote the (re-parameterized) Population EM iterates for Model 2, and suppose ⟨b⟨0⟩, θ⋆⟩̸= 0. Then there exist T0 > 0, κb ∈(0, 1), and cb > 0—all depending only on ∥θ⋆∥, |⟨b⟨0⟩, θ⋆⟩/∥b⟨0⟩∥|, ∥a⟨0⟩∥, and ∥b⟨0⟩∥—such that
b⟨t+1⟩−sgn(⟨b⟨0⟩, θ⋆⟩)θ⋆
2 ≤ κ2 b ·
b⟨t⟩−sgn(⟨b⟨0⟩, θ⋆⟩)θ⋆
2 + cb · ∥a⟨t⟩∥ ∀t > T0 . 5 If ⟨b⟨0⟩, θ⋆⟩= 0, then we show convergence of the (re-parameterized) Population EM iterates to the degenerate solution (0, 0). Theorem 5. Let (a⟨t⟩, b⟨t⟩)t≥0 denote the (re-parameterized) Population EM iterates for Model 2. If ⟨b⟨0⟩, θ⋆⟩= 0, then (a⟨t⟩, b⟨t⟩) → (0, 0) as t →∞. Theorems 3, 4, and 5 together characterize the fixed points of Population EM for Model 2, and fully specify the conditions under which each fixed point is reached. The results are simply summarized in the following corollary. Corollary 2. If (a⟨t⟩, b⟨t⟩)t≥0 denote the (re-parameterized) Population EM iterates for Model 2, then a⟨t⟩ → µ⋆ 1 + µ⋆ 2 2 as t →∞, b⟨t⟩ → sgn(⟨b⟨0⟩, µ⋆ 2 −µ⋆ 1⟩)µ⋆ 2 −µ⋆ 1 2 as t →∞. 2.2 Main Results for Sample-based EM Using the results on Population EM presented in the above section, we can now establish consistency of (Sample-based) EM. We focus attention on Model 2, as the same results for Model 1 easily follow as a corollary. First, we state a simple connection between the Population EM and Sample-based EM iterates. Theorem 6. Suppose Population EM and Sample-based EM for Model 2 have the same initial parameters: ˆµ⟨0⟩ 1 = µ⟨0⟩ 1 and ˆµ⟨0⟩ 2 = µ⟨0⟩ 2 . Then for each iteration t ≥0, ˆµ⟨t⟩ 1 →µ⟨t⟩ 1 and ˆµ⟨t⟩ 2 →µ⟨t⟩ 2 as n →∞, where convergence is in probability. Note that Theorem 6 does not necessarily imply that the fixed point of Sample-based EM (when initialized at (ˆµ⟨0⟩ 1 , ˆµ⟨0⟩ 2 ) = (µ⟨0⟩ 1 , µ⟨0⟩ 2 )) is the same as that of Population EM. It is conceivable that as t →∞, the discrepancy between (the iterates of) Sample-based EM and Population EM increases. We show that this is not the case: the fixed points of Sample-based EM indeed converge to the fixed points of Population EM. Theorem 7. Suppose Population EM and Sample-based EM for Model 2 have the same initial parameters: ˆµ⟨0⟩ 1 = µ⟨0⟩ 1 and ˆµ⟨0⟩ 2 = µ⟨0⟩ 2 . If ⟨µ⟨0⟩ 2 −µ⟨0⟩ 1 , θ⋆⟩̸= 0, then lim sup t→∞|ˆµ⟨t⟩ 1 −µ⟨t⟩ 1 | →0 and lim sup t→∞|ˆµ⟨t⟩ 2 −µ⟨t⟩ 2 | →0 as n →∞, where convergence is in probability. 2.3 Population EM and Expected Log-likelihood Do the results we derived in the last section regarding the performance of EM provide any information on the performance of other ascent algorithms, such as gradient ascent, that aim to maximize the loglikelihood function? To address this question, we show how our analysis can determine the stationary points of the expected log-likelihood and characterize the shape of the expected log-likelihood in a neighborhood of the stationary points. Let G(η) denote the expected log-likelihood, i.e., G(η) ≜E(log fη(Y )) = Z f(y; η∗) log f(y; η) dy, where η∗denotes the true parameter value. Also consider the following standard regularity conditions: R1 The family of probability density functions f(y; η) have common support. R2 ∇η R f(y; η∗) log f(y; η) dy = R f(y; η∗)∇η log f(y; η) dy, where ∇η denotes the gradient with respect to η. 6 R3 ∇η(E P z f(z | Y ; η⟨t⟩)) log f(Y , z; η) = E P z f(z | Y ; η⟨t⟩)∇η log f(Y , z; η). These conditions can be easily confirmed for many models including the Gaussian mixture models. The following theorem connects the fixed points of the Population EM and the stationary points of the expected log-likelihood. Lemma 1. Let ¯η ∈Rd denote a stationary point of G(η). Also assume that Q(η | η⟨t⟩) has a unique and finite stationary point in terms of η for every η⟨t⟩, and this stationary point is its global maxima. Then, if the model satisfies conditions R1–R3, and the Population EM algorithm is initialized at ¯η, it will stay at ¯η. Conversely, any fixed point of Population EM is a stationary point of G(η). Proof. Let ¯η denote a stationary point of G(η). We first prove that ¯η is a stationary point of Q(η | ¯η). ∇ηQ(η | ¯η) η=¯η = Z X z f(z | y; ¯η) ∇ηf(y, z; η) η=¯η f(y, z; ¯η) f(y; η∗) dy = Z X z ∇ηf(y, z; η) η=¯η f(y; ¯η) f(y; η∗) dy = Z ∇ηf(y, η) η=¯η f(y; ¯η) f(y; η∗) dy = 0 , where the last equality is using the fact that ¯η is a stationary point of G(η). Since Q(η | ¯η) has a unique stationary point, and we have assumed that the unique stationary point is its global maxima, then Population EM will stay at that point. The proof of the other direction is similar. Remark 1. The fact that η∗is the global maximizer of G(η) is well-known in the statistics and machine learning literature (e.g., Conniffe, 1987). Furthermore, the fact that η∗is a global maximizer of Q(η | η∗) is known as the self-consistency property (Balakrishnan et al., 2014). It is straightforward to confirm the conditions of Lemma 1 for mixtures of Gaussians. This lemma confirms that Population EM may be trapped in every local maxima. However, less intuitively it may get stuck at local minima or saddle points as well. Our next result characterizes the stationary points of G(θ) for Model 1. Corollary 3. G(θ) has only three stationary points. If d = 1 (so θ = θ ∈R), then 0 is a local minima of G(θ), while θ∗and −θ∗are global maxima. If d > 1, then 0 is a saddle point, and θ⋆and −θ⋆are global maxima. The proof is a straightforward result of Lemma 1 and Corollary 1. The phenomenon that Population EM may stuck in local minima or saddle points also happens in Model 2. We can employ Corollary 2 and Lemma 1 to explain the shape of the expected log-likelihood function G. To simplify the notation, we consider the re-parametrization a ≜µ1+µ2 2 and b ≜µ2−µ1 2 . Corollary 4. G(a, b) has three stationary points: µ⋆ 1 + µ⋆ 2 2 , µ⋆ 2 −µ⋆ 1 2 , µ⋆ 1 + µ⋆ 2 2 , µ⋆ 1 −µ⋆ 2 2 , and µ⋆ 1 + µ⋆ 2 2 , µ⋆ 1 + µ⋆ 2 2 . The first two points are global maxima. The third point is a saddle point. 3 Concluding Remarks Our analysis of Population EM and Sample-based EM shows that the EM algorithm can, at least for the Gaussian mixture models studied in this work, compute statistically consistent parameter estimates. Previous analyses of EM only established such results for specific methods of initializing EM (e.g., Dasgupta and Schulman, 2007; Balakrishnan et al., 2014); our results show that they are not really necessary in the large sample limit. However, in any real scenario, the large sample limit may not accurately characterize the behavior of EM. Therefore, these specific methods for initialization, as well as non-asymptotic analysis, are clearly still needed to understand and effectively apply EM. There are several interesting directions concerning EM that we hope to pursue in follow-up work. The first considers the behavior of EM when the dimension d = dn may grow with the sample size 7 n. Our proof of Theorem 7 reveals that the parameter error of the t-th iterate (in Euclidean norm) is of the order p d/n as t →∞. Therefore, we conjecture that the theorem still holds as long as dn = o(n). This would be consistent with results from statistical physics on the MLE for Gaussian mixtures, which characterize the behavior when dn ∝n as n →∞(Barkai and Sompolinsky, 1994). Another natural direction is to extend these results to more general Gaussian mixture models (e.g., with unequal mixing weights or unequal covariances) and other latent variable models. Acknowledgements. The second named author thanks Yash Deshpande and Sham Kakade for many helpful initial discussions. JX and AM were partially supported by NSF grant CCF-1420328. DH was partially supported by NSF grant DMREF-1534910 and a Sloan Fellowship. References D. Achlioptas and F. McSherry. On spectral learning of mixtures of distributions. In Eighteenth Annual Conference on Learning Theory, pages 458–469, 2005. S. Arora and R. Kannan. Learning mixtures of separated nonspherical Gaussians. The Annals of Applied Probability, 15(1A):69–92, 2005. S. Balakrishnan, M. J. Wainwright, and B. Yu. Statistical guarantees for the EM algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156, August 2014. N. Barkai and H. Sompolinsky. Statistical mechanics of the maximum-likelihood density estimation. Physical Review E, 50(3):1766–1769, Sep 1994. M. Belkin and K. Sinha. Polynomial learning of distribution families. In Fifty-First Annual IEEE Symposium on Foundations of Computer Science, pages 103–112, 2010. S. C. Brubaker and S. Vempala. Isotropic PCA and affine-invariant clustering. In Forty-Ninth Annual IEEE Symposium on Foundations of Computer Science, 2008. K. Chaudhuri and S. Rao. Learning mixtures of product distributions using correlations and independence. In Twenty-First Annual Conference on Learning Theory, pages 9–20, 2008. K. Chaudhuri, S. M. Kakade, K. Livescu, and K. Sridharan. Multi-view clustering via canonical correlation analysis. In ICML, 2009a. K. Chaudhuri, S. Dasgupta, and A. Vattani. Learning mixtures of Gaussians using the k-means algorithm. CoRR, abs/0912.0086, 2009b. S. Chrétien and A. O. Hero. On EM algorithms and their proximal generalizations. ESAIM: Probability and Statistics, 12:308–326, May 2008. D. Conniffe. Expected maximum log likelihood estimation. Journal of the Royal Statistical Society. Series D, 36(4):317–329, 1987. S. Dasgupta. Learning mixutres of Gaussians. In Fortieth Annual IEEE Symposium on Foundations of Computer Science, pages 634–644, 1999. S. Dasgupta and L. Schulman. A probabilistic analysis of EM for mixtures of separated, spherical Gaussians. Journal of Machine Learning Research, 8(Feb):203–226, 2007. C. Daskalakis, C. Tzamos, and M. Zampetakis. Ten steps of EM suffice for mixtures of two Gaussians. arXiv preprint arXiv:1609.00368, September 2016. A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum-likelihood from incomplete data via the EM algorithm. J. Royal Statist. Soc. Ser. B, 39:1–38, 1977. R. A. Fisher. On the mathematical foundations of theoretical statistics. Philosophical Transactions of the Royal Society, London, A., 222:309–368, 1922. M. Hardt and E. Price. Tight bounds for learning a mixture of two Gaussians. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, pages 753–760, 2015. D. Hsu and S. M. Kakade. Learning mixtures of spherical Gaussians: moment methods and spectral decompositions. In Fourth Innovations in Theoretical Computer Science, 2013. C. Jin, Y. Zhang, S. Balakrishnan, M. J. Wainwright, and M. Jordan. Local maxima in the likelihood of Gaussian mixture models: Structural results and algorithmic consequences. arXiv preprint arXiv:1609.00978, September 2016. 8 A. T. Kalai, A. Moitra, and G. Valiant. Efficiently learning mixtures of two Gaussians. In Forty-second ACM Symposium on Theory of Computing, pages 553–562, 2010. R. Kannan, H. Salmasian, and S. Vempala. The spectral method for general mixture models. SIAM Journal on Computing, 38(3):1141–1156, 2008. J. M. Klusowski and W. D. Brinda. Statistical guarantees for estimating the centers of a twocomponent Gaussian mixture by EM. arXiv preprint arXiv:1608.02280, August 2016. S. P. Lloyd. Least squares quantization in PCM. IEEE Trans. Information Theory, 28(2):129–137, 1982. J. B. MacQueen. Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth Berkeley Symposium on Mathematical Statistics and Probability, volume 1, pages 281–297. University of California Press, 1967. A. Moitra and G. Valiant. Settling the polynomial learnability of mixtures of Gaussians. In Fifty-First Annual IEEE Symposium on Foundations of Computer Science, pages 93–102, 2010. K. Pearson. Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society, London, A., 185:71–110, 1894. R. A. Redner and H. F. Walker. Mixture densities, maximum likelihood and the EM algorithm. SIAM Review, 26(2):195–239, 1984. N. Srebro. Are there local maxima in the infinite-sample likelihood of Gaussian mixture estimation? In 20th Annual Conference on Learning Theory, pages 628–629, 2007. P. Tseng. An analysis of the EM algorithm and entropy-like proximal point methods. Mathematics of Operations Research, 29(1):27–44, Feb 2004. F. Vaida. Parameter convergence for EM and MM. Statistica Sinica, 15, 2005. S. Vempala and G. Wang. A spectral algorithm for learning mixtures models. Journal of Computer and System Sciences, 68(4):841–860, 2004. C. F. J. Wu. On the convergence properties of the EM algorithm. The Annals of Statistics, 11(1): 95–103, Mar 1983. J. Xu, D. Hsu, and A. Maleki. Global analysis of Expectation Maximization for mixtures of two Gaussians. arXiv preprint arXiv:1608.07630, 2016. L. Xu and M. I. Jordan. On convergence properties of the EM algorithm for Gaussian mixtures. Neural Computation, 8:129–151, 1996. 9 | 2016 | 266 |
6,179 | Stochastic Structured Prediction under Bandit Feedback Artem Sokolov⋄,∗, Julia Kreutzer∗, Christopher Lo†,∗, Stefan Riezler‡,∗ ∗Computational Linguistics & ‡IWR, Heidelberg University, Germany {sokolov,kreutzer,riezler}@cl.uni-heidelberg.de †Department of Mathematics, Tufts University, Boston, MA, USA chris.aa.lo@gmail.com ⋄Amazon Development Center, Berlin, Germany Abstract Stochastic structured prediction under bandit feedback follows a learning protocol where on each of a sequence of iterations, the learner receives an input, predicts an output structure, and receives partial feedback in form of a task loss evaluation of the predicted structure. We present applications of this learning scenario to convex and non-convex objectives for structured prediction and analyze them as stochastic first-order methods. We present an experimental evaluation on problems of natural language processing over exponential output spaces, and compare convergence speed across different objectives under the practical criterion of optimal task performance on development data and the optimization-theoretic criterion of minimal squared gradient norm. Best results under both criteria are obtained for a non-convex objective for pairwise preference learning under bandit feedback. 1 Introduction We present algorithms for stochastic structured prediction under bandit feedback that obey the following learning protocol: On each of a sequence of iterations, the learner receives an input, predicts an output structure, and receives partial feedback in form of a task loss evaluation of the predicted structure. In contrast to the full-information batch learning scenario, the gradient cannot be averaged over the complete input set. Furthermore, in contrast to standard stochastic learning, the correct output structure is not revealed to the learner. We present algorithms that use this feedback to “banditize” expected loss minimization approaches to structured prediction [18, 25]. The algorithms follow the structure of performing simultaneous exploration/exploitation by sampling output structures from a log-linear probability model, receiving feedback to the sampled structure, and conducting an update in the negative direction of an unbiased estimate of the gradient of the respective full information objective. The algorithms apply to situations where learning proceeds online on a sequence of inputs for which gold standard structures are not available, but feedback to predicted structures can be elicited from users. A practical example is interactive machine translation where instead of human generated reference translations only translation quality judgments on predicted translations are used for learning [20]. The example of machine translation showcases the complexity of the problem: For each input sentence, we receive feedback for only a single predicted translation out of a space that is exponential in sentence length, while the goal is to learn to predict the translation with the smallest loss under a complex evaluation metric. [19] showed that partial feedback is indeed sufficient for optimization of feature-rich linear structured prediction over large output spaces in various natural language processing (NLP) tasks. Their experiments follow the standard online-to-batch conversion practice in NLP applications where the ∗The work for this paper was done while the authors were at Heidelberg University. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. model with optimal task performance on development data is selected for final evaluation on a test set. The contribution of our paper is to analyze these algorithms as stochastic first-order (SFO) methods in the framework of [7] and investigate the connection of optimization for task performance with optimization-theoretic concepts of convergence. Our analysis starts with revisiting the approach to stochastic optimization of a non-convex expected loss criterion presented by [20]. The iteration complexity of stochastic optimization of a non-convex objective J(wt) can be analyzed in the framework of [7] as O(1/ϵ2) in terms of the number of iterations needed to reach an accuracy of ϵ for the criterion E[∥∇J(wt)∥2] ≤ϵ. [19] attempt to improve convergence speed by introducing a cross-entropy objective that can be seen as a (strong) convexification of the expected loss objective. The known best iteration complexity for strongly convex stochastic optimization is O(1/ϵ) for the suboptimality criterion E[J(wt)] −J(w∗) ≤ϵ. Lastly, we analyze the pairwise preference learning algorithm introduced by [19]. This algorithm can also be analyzed as an SFO method for non-convex optimization. To our knowledge, this is the first SFO approach to stochastic learning form pairwise comparison feedback, while related approaches fall into the area of gradient-free stochastic zeroth-order (SZO) approaches [24, 1, 7, 4]. Convergence rate for SZO methods depends on the dimensionality d of the function to be evaluated, for example, the non-convex SZO algorithm of [7] has an iteration complexity of O(d/ϵ2). SFO algorithms do not depend on d which is crucial if the dimensionality of the feature space is large as is common in structured prediction. Furthermore, we present a comparison of empirical and theoretical convergence criteria for the NLP tasks of machine translation and noun-phrase chunking. We compare the empirical convergence criterion of optimal task performance on development data with the theoretically motivated criterion of minimal squared gradient norm. We find a correspondence of fastest convergence of pairwise preference learning on both tasks. Given the standard analysis of asymptotic complexity bounds, this result is surprising. An explanation can be given by measuring variance and Lipschitz constant of the stochastic gradient, which is smallest for pairwise preference learning and largest for crossentropy minimization by several orders of magnitude. This offsets the possible gains in asymptotic convergence rates for strongly convex stochastic optimization, and makes pairwise preference learning an attractive method for fast optimization in practical interactive scenarios. 2 Related Work The methods presented in this paper are related to various other machine learning problems where predictions over large output spaces have to be learned from partial information. Reinforcement learning has the goal of maximizing the expected reward for choosing an action at a given state in a Markov Decision Process (MDP) model, where unknown rewards are received at each state, or once at the final state. The algorithms in this paper can be seen as one-state MDPs with context where choosing an action corresponds to predicting a structured output. Most closely related are recent applications of policy gradient methods to exponential output spaces in NLP problems [22, 3, 15]. Similar to our expected loss minimization approaches, these approaches are based on non-convex models, however, convergence rates are rarely a focus in the reinforcement learning literature. One focus of our paper is to present an analysis of asymptotic convergence and convergence rates of non-convex stochastic first-order methods. Contextual one-state MDPs are also known as contextual bandits [11, 13] which operate in a scenario of maximizing the expected reward for selecting an arm of a multi-armed slot machine. Similar to our case, the feedback is partial, and the models consist of a single state. While bandit learning is mostly formalized as online regret minimization with respect to the best fixed arm in hindsight, we characterize our approach in an asymptotic convergence framework. Furthermore, our highdimensional models predict structures over exponential output spaces. Since we aim to train these models in interaction with real users, we focus on the ease of elicitability of the feedback and on speed of convergence. In the spectrum of stochastic versus adversarial bandits, our approach is semi-adversarial in making stochastic assumptions on inputs, but not on rewards [12]. Pairwise preference learning has been studied in the full information supervised setting [8, 10, 6] where given preference pairs are assumed. Work on stochastic pairwise learning has been formalized as derivative-free stochastic zeroth-order optimization [24, 1, 7, 4]. To our knowledge, our approach 2 Algorithm 1 Bandit Structured Prediction 1: Input: sequence of learning rates γt 2: Initialize w0 3: for t = 0, . . . , T do 4: Observe xt 5: Sample ˜yt ∼pwt(y|xt) 6: Obtain feedback ∆(˜yt) 7: wt+1 = wt −γt st 8: Choose a solution ˆw from the list {w0, . . . , wT } to pairwise preference learning from partial feedback is the first SFO approach to learning from pairwise preferences in form of relative task loss evaluations. 3 Expected Loss Minimization for Structured Prediction [18, 25] introduce the expected loss criterion for structured prediction as the minimization of the expectation of a given task loss function with respect to the conditional distribution over structured outputs. Let X be a structured input space, let Y(x) be the set of possible output structures for input x, and let ∆y : Y →[0, 1] quantify the loss ∆y(y′) suffered for predicting y′ instead of the gold standard structure y. In the full information setting, for a given (empirical) data distribution p(x, y), the learning problem is defined as min w∈Rd Ep(x,y)pw(y′|x) [∆y(y′)] = min w∈Rd X x,y p(x, y) X y′∈Y(x) ∆y(y′)pw(y′|x), (1) where pw(y|x) = exp(w⊤φ(x, y))/Zw(x) (2) is a Gibbs distribution with joint feature representation φ : X × Y →Rd, weight vector w ∈Rd, and normalization constant Zw(x). Despite being a highly non-convex optimization problem, positive results have been obtained by gradient-based optimization with respect to ∇Ep(x,y)pw(y′|x) [∆y(y′)] = Ep(x,y)pw(y′|x) h ∆y(y′) φ(x, y′) −Epw(y′|x)[φ(x, y′)] i . (3) Unlike in the full information scenario, in structured learning under bandit feedback the gold standard output structure y with respect to which the objective function is evaluated is not revealed to the learner. Thus we can neither evaluate the task loss ∆nor calculate the gradient (3) as in the full information case. A solution to this problem is to pass the evaluation of the loss function to the user, i.e, we access the loss directly through user feedback without assuming existence of a fixed reference y. In the following, we will drop the subscript referring to the gold standard structure in the definition of ∆to indicate that the feedback is in general independent of gold standard outputs. In particular, we allow ∆to be equal to 0 for several outputs. 4 Stochastic Structured Prediction under Partial Feedback Algorithm Structure. Algorithm 1 shows the structure of the methods analyzed in this paper. It assumes a sequence of input structures xt, t = 0, . . . , T that are generated by a fixed, unknown distribution p(x) (line 4). For each randomly chosen input, an output ˜yt is sampled from a Gibbs model to perform simultaneous exploitation (use the current best estimate) / exploration (get new information) on output structures (line 5). Then, feedback ∆(˜yt) to the predicted structure is obtained (line 6). An update is performed by taking a step in the negative direction of the stochastic gradient st, at a rate γt (line 7). As a post-optimization step, a solution ˆw is chosen from the list of vectors wt ∈{w0, . . . , wT } (line 8). Given Algorithm 1, we can formalize the notion of “banditization” of objective functions by presenting different instantiations of the vector st, and showing them to be unbiased estimates of the gradients of corresponding full information objectives. 3 Expected Loss Minimization. [20] presented an algorithm that minimizes the following expected loss objective. It is non-convex for the specific instantiations in this paper: Ep(x)pw(y|x) [∆(y)] = X x p(x) X y∈Y(x) ∆(y)pw(y|x). (4) The vector st used in their algorithm can be seen as a stochastic gradient of this objective, i.e., an evaluation of the full gradient at a randomly chosen input xt and output ˜yt: st = ∆(˜yt) φ(xt, ˜yt) −Epwt(y|xt)[φ(xt, y)] . (5) Instantiating st in Algorithm 1 to the stochastic gradient in equation (5) yields an update that compares the sampled feature vector to the average feature vector, and performs a step into the opposite direction of this difference, the more so the higher the loss of the sampled structure is. In the following, we refer to the algorithm for expected loss minimization defined by the update (5) as Algorithm EL. Pairwise Preference Learning. Decomposing complex problems into a series of pairwise comparisons has been shown to be advantageous for human decision making [23]. For the example of machine translation, this means that instead of requiring numerical assessments of translation quality from human users, only a relative preference judgement on a pair of translations needs to be elicited. This idea is formalized in [19] as an expected loss objective with respect to a conditional distribution of pairs of structured outputs. Let P(x) = {⟨yi, yj⟩|yi, yj ∈Y(x)} denote the set of output pairs for an input x, and let ∆(⟨yi, yj⟩) : P(x) →[0, 1] denote a task loss function that specifies a dispreference of yi compared to yj. In the experiments reported in this paper, we simulate two types of pairwise feedback. Firstly, continuous pairwise feedback is computed as ∆(⟨yi, yj⟩) = ∆(yi) −∆(yj) if ∆(yi) > ∆(yj), 0 otherwise. (6) A binary feedback function is computed as ∆(⟨yi, yj⟩) = 1 if ∆(yi) > ∆(yj), 0 otherwise. (7) Furthermore, we assume a feature representation φ(x, ⟨yi, yj⟩) = φ(x, yi) −φ(x, yj) and a Gibbs model on pairs of output structures pw(⟨yi, yj⟩|x) = ew⊤(φ(x,yi)−φ(x,yj)) P ⟨yi,yj⟩∈P(x) ew⊤(φ(x,yi)−φ(x,yj)) = pw(yi|x)p−w(yj|x). (8) The factorization of this model into the product pw(yi|x)p−w(yj|x) allows efficient sampling and calculation of expectations. Instantiating objective (4) to the case of pairs of output structures defines the following objective that is again non-convex in the use cases in this paper: Ep(x)pw(⟨yi,yj⟩|x) [∆(⟨yi, yj⟩)] = X x p(x) X ⟨yi,yj⟩∈P(x) ∆(⟨yi, yj⟩) pw(⟨yi, yj⟩|x). (9) Learning from partial feedback on pairwise preferences will ensure that the model finds a ranking function that assigns low probabilities to discordant pairs with respect the the observed preference pairs. Stronger assumptions on the learned ranking can be made if asymmetry and transitivity of the observed ordering of pairs is required.2 An algorithm for pairwise preference learning can be defined by instantiating Algorithm 1 to sampling output pairs ⟨˜yi, ˜yj⟩t, receiving feedback ∆(⟨˜yi, ˜yj⟩t), and performing a stochastic gradient update using st = ∆(⟨˜yi, ˜yj⟩t) φ(xt, ⟨˜yi, ˜yj⟩t) −Epwt(⟨yi,yj⟩|xt)[φ(xt, ⟨yi, yj⟩)] . (10) The algorithms for pairwise preference ranking defined by update (10) are referred to as Algorithms PR(bin) and PR(cont), depending on the use of binary or continuous feedback. 2See [2] for an overview of bandit learning from consistent and inconsistent pairwise comparisons. 4 Cross-Entropy Minimization. The standard theory of stochastic optimization predicts considerable improvements in convergence speed depending on the functional form of the objective. This motivated the formalization of a convex upper bounds on expected normalized loss in [19]. If a normalized gain function ¯g(y) = g(y) Zg(x) is used where Zg(x) = P y∈Y(x) g(y), and g = 1 −∆, the objective can be seen as the cross-entropy of model pw(y|x) with respect to ¯g(y): Ep(x)¯g(y) [−log pw(y|x)] = − X x p(x) X y∈Y(x) ¯g(y) log pw(y|x). (11) For a proper probability distribution ¯g(y), an application of Jensen’s inequality to the convex negative logarithm function shows that objective (11) is a convex upper bound on objective (4). However, normalizing the gain function is prohibitive in a partial feedback setting since it would require to elicit user feedback for each structure in the output space. [19] thus work with an unnormalized gain function g(y) that preserves convexity. This can be seen by rewriting the objective as the sum of a linear and a convex function in w: Ep(x)g(y) [−log pw(y|x)] = − X x p(x) X y∈Y(x) g(y)w⊤φ(x, y) (12) + X x p(x)(log X y∈Y(x) exp(w⊤φ(x, y)))α(x), where α(x) = P y∈Y(x) g(y) is a constant factor not depending on w. Instantiating Algorithm 1 to the following stochastic gradient st of this objective yields an algorithm for cross-entropy minimization: st = g(˜yt) pwt(˜yt|xt) −φ(xt, ˜yt) + Epwt [φ(xt, yt)] . (13) Note that the ability to sample structures from pwt(˜yt|xt) comes at the price of having to normalize st by 1/pwt(˜yt|xt). While minimization of this objective will assign high probabilities to structures with high gain, as desired, each update is affected by a probability that changes over time and is unreliable when training is started. This further increases the variance already present in stochastic optimization. We deal with this problem by clipping too small sampling probabilities to ˆpwt(˜yt|xt) = max{pwt(˜yt|xt), k} for a constant k [9]. The algorithm for cross-entropy minimization based on the stochastic gradient (13) is referred to as Algorithm CE in the following. 5 Convergence Analysis To analyze convergence, we describe Algorithms EL, PR, and CE as stochastic first-order (SFO) methods in the framework of [7]. We assume lower bounded, differentiable objective functions J(w) with Lipschitz continuous gradient ∇J(w) satisfying ∥∇J(w + w′) −∇J(w)∥≤L∥w′∥ ∀w, w′, ∃L ≥0. (14) For an iterative process of the form wt+1 = wt −γt st, the conditions to be met concern unbiasedness of the gradient estimate E[st] = ∇J(wt), ∀t ≥0, (15) and boundedness of the variance of the stochastic gradient E[||st −∇J(wt)||2] ≤σ2, ∀t ≥0. (16) Condition (15) is met for all three Algorithms by taking expectations over all sources of randomness, i.e., over random inputs and output structures. Assuming ∥φ(x, y)∥≤R, ∆(y) ∈[0, 1] and g(y) ∈[0, 1] for all x, y, and since the ratio g(˜yt) ˆpwt(˜yt|xt) is bounded, the variance in condition (16) is bounded. Note that the analysis of [7] justifies the use of constant learning rates γt = γ, t = 0, . . . , T. Convergence speed can be quantified in terms of the number of iterations needed to reach an accuracy of ϵ for a gradient-based criterion E[∥∇J(wt)∥2] ≤ϵ. For stochastic optimization of non-convex objectives, the iteration complexity with respect to this criterion is analyzed as O(1/ϵ2) in [7]. This complexity result applies to our Algorithms EL and PR. 5 The iteration complexity of stochastic optimization of (strongly) convex objectives has been analyzed as at best O(1/ϵ) for the suboptimality criterion E[J(wt)] −J(w∗) ≤ϵ for decreasing learning rates [14].3 Strong convexity of objective (12) can be achieved easily by adding an ℓ2 regularizer λ 2 ∥w∥2 with constant λ > 0. Algorithm CE is then modified to use the following regularized update rule wt+1 = wt −γt (st + λ T wt). This standard analysis shows two interesting points: First, Algorithms EL and PR can be analyzed as SFO methods where the latter only requires relative preference feedback for learning, while enjoying an iteration complexity that does not depend on the dimensionality of the function as in gradient-free stochastic zeroth-order (SZO) approaches. Second, the standard asymptotic complexity bound of O(1/ϵ2) for non-convex stochastic optimization hides the constants L and σ2 in which iteration complexity increases linearly. As we will show, these constants have a substantial influence, possibly offsetting the advantages in asymptotic convergence speed of Algorithm CE. 6 Experiments Measuring Numerical Convergence and Task Loss Performance. In the following, we will present an experimental evaluation for two complex structured prediction tasks from the area of NLP, namely statistical machine translation and noun phrase chunking. Both tasks involve dynamic programming over exponential output spaces, large sparse feature spaces, and non-linear nondecomposable task loss metrics. Training for both tasks was done by simulating bandit feedback by evaluating ∆against gold standard structures which are never revealed to the learner. We compare the empirical convergence criterion of optimal task performance on development data with numerical results on theoretically motivated convergence criteria. For the purpose of measuring convergence with respect to optimal task performance, we report an evaluation of convergence speed on a fixed set of unseen data as performed in [19]. This instantiates the selection criterion in line (8) in Algorithm 1 to an evaluation of the respective task loss function ∆(ˆywt(x)) under MAP prediction ˆyw(x) = arg maxy∈Y(x) pw(y|x) on the development data. This corresponds to the standard practice of online-to-batch conversion where the model selected on the development data is used for final evaluation on a further unseen test set. For bandit structured prediction algorithms, final results are averaged over three runs with different random seeds. For the purpose of obtaining numerical results on convergence speed, we compute estimates of the expected squared gradient norm E[∥∇J(wt)∥2], the Lipschitz constant L and the variance σ2 in which the asymptotic bounds on iteration complexity grow linearly.4 We estimate the squared gradient norm by the squared norm of the stochastic gradient ∥sT ∥2 at a fixed time horizon T. The Lipschitz constant L in equation (14) is estimated by maxi,j ∥si−sj∥ ∥wi−wj∥for 500 pairs wi and wj randomly drawn from the weights produced during training. The variance σ2 in equation (16) is computed as the empirical variance of the stochastic gradient, taken at regular intervals after each epoch of size D, yielding the estimate 1 K PK k=1 ∥skD − 1 K PK k=1 skD∥2 where K = ⌊T D⌋. All estimates include multiplication of the stochastic gradient with the learning rate. For comparability of results across different algorithms, we use the same T and the same constant learning rates for all algorithms.5 Statistical Machine Translation. In this experiment, an interactive machine translation scenario is simulated where a given machine translation system is adapted to user style and domain based on feedback to predicted translations. Domain adaptation from Europarl to NewsCommentary domains using the data provided at the WMT 2007 shared task is performed for French-to-English translation.6 The MT experiments are based on the synchronous context-free grammar decoder cdec [5]. The models use a standard set of dense and lexicalized sparse features, including an out-of and an in3For constant learning rates, [21] show even faster convergence in the search phase of strongly-convex stochastic optimization. 4For example, these constants appear as O( L ϵ + Lσ2 ϵ2 ) in the complexity bound for non-convex stochastic optimization of [7]. 5Note that the squared gradient norm upper bounds the suboptimality criterion s.t. ∥∇J(wt)∥2 ≥ 2λJ(wt)] −J(w∗) for strongly convex functions. Together with the use of constant learning rates this means that we measure convergence to a point near an optimum for strongly convex objectives. 6http://www.statmt.org/wmt07/shared-task.html 6 Task Algorithm Iterations Score γ λ k SMT CE 281k 0.271±0.001 1e-6 1e-6 5e-3 EL 370k 0.267±8e−6 1e-5 PR(bin) 115k 0.273±0.0005 1e-4 Chunking CE 5.9M 0.891±0.005 1e-6 1e-6 1e-2 EL 7.5M 0.923±0.002 1e-4 PR(cont) 4.7M 0.914±0.002 1e-4 Table 1: Test set evaluation for stochastic learning under bandit feedback from [19], for chunking under F1-score, and for machine translation under BLEU. Higher is better for both scores. Results for stochastic learners are averaged over three runs of each algorithm, with standard deviation shown in subscripts. The meta-parameter settings were determined on dev sets for constant learning rate γ, clipping constant k, ℓ2 regularization constant λ. domain language model. The out-of-domain baseline model has around 200k active features. The pre-processing, data splits, feature sets and tuning strategies are described in detail in [19]. The difference in the task loss evaluation between out-of-domain (BLEU: 0.2651) and in-domain (BLEU: 0.2831) models gives the range of possible improvements (1.8 BLEU points) for bandit learning. Learning under bandit feedback starts at the learned weights of the out-of-domain median models. It uses parallel in-domain data (news-commentary, 40,444 sentences) to simulate bandit feedback, by evaluating the sampled translation against the reference using as loss function ∆a smoothed per-sentence 1 −BLEU (zero n-gram counts being replaced with 0.01). After each update, the hypergraph is re-decoded and all hypotheses are re-ranked. Training is distributed across 38 shards using a multitask-based feature selection algorithm [17]. Noun-phrase Chunking. The experimental setting for chunking is the same as in [19]. Following [16], conditional random fields (CRF) are applied to the noun phrase chunking task on the CoNLL2000 dataset7. The implemented set of feature templates is a simplified version of [16] and leads to around 2M active features. Training under full information with a log-likelihood objective yields 0.935 F1. In difference to machine translation, training with bandit feedback starts from w0 = 0, not from a pre-trained model. Task Loss Evaluation. Table 1 lists the results of the task loss evaluation for machine translation and chunking as performed in [19], together with the optimal meta-parameters and the number of iterations needed to find an optimal result on the development set. Note that the pairwise feedback type (cont or bin) is treated as a meta-parameter for Algorithm PR in our simulation experiment. We found that bin is preferable for machine translation and cont for chunking in order to obtain the highest task scores. For machine translation, all bandit learning runs show significant improvements in BLEU score over the out-of-domain baseline. Early stopping by task performance on the development led to the selection of algorithm PR(bin) at a number of iterations that is by a factor of 2-4 smaller compared to Algorithms EL and CE. For the chunking experiment, the F1-score results obtained for bandit learning are close to the fullinformation baseline. The number of iterations needed to find an optimal result on the development set is smallest for Algorithm PR(cont), compared to Algorithms EL and CE. However, the best F1-score is obtained by Algorithm EL. Numerical Convergence Results. Estimates of E[∥∇J(wt)∥2], L and σ2 for three runs of each algorithm and task with different random seeds are listed in Table 2. For machine translation, at time horizon T, the estimated squared gradient norm for Algorithm PR is several orders of magnitude smaller than for Algorithms EL and CE. Furthermore, the estimated Lipschitz constant L and the estimated variance σ2 are smallest for Algorithm PR. Since the iteration complexity increases linearly with respect to these terms, smaller constants L and σ2 and a smaller 7http://www.cnts.ua.ac.be/conll2000/chunking/ 7 Task Algorithm T ∥sT ∥2 L σ2 SMT CE 767,000 3.04±0.02 0.54±0.3 35 ±6 EL 767,000 0.02±0.03 1.63±0.67 3.13e-4±3.60e−6 PR(bin) 767,000 2.88e-4±3.40e−6 0.08±0.01 3.79e-5±9.50e−8 PR(cont) 767,000 1.03e-8±2.91e−10 0.10±5.70e−3 1.78e-7±1.45e−10 Chunking CE 3,174,400 4.20±0.71 1.60±0.11 4.88±0.07 EL 3,174,400 1.21e-3±1.1e−4 1.16±0.31 0.01±9.51e−5 PR(bin) 3,174,400 7.71e-4±2.53e−4 1.33±0.24 4.44e-3±2.66e−5 PR(cont) 3,174,400 5.99e-3±7.24e−4 1.11±0.30 0.03±4.68e−4 Table 2: Estimates of squared gradient norm ∥sT ∥2, Lipschitz constant L and variance σ2 of stochastic gradient (including multiplication with learning rate) for fixed time horizon T and constant learning rates γ = 1e −6 for SMT and for chunking. The clipping and regularization parameters for CE are set as in Table 1 for machine translation, except for chunking CE λ = 1e −5. Results are averaged over three runs of each algorithm, with standard deviation shown in subscripts. value of the estimate E[∥∇J(wt)∥2] at the same number of iterations indicates fastest convergence for Algorithm PR. This theoretically motivated result is consistent with the practical convergence criterion of early stopping on development data: Algorithm PR which yields the smallest squared gradient norm at time horizon T also needs the smallest number of iterations to achieve optimal performance on the development set. In the case of machine translation, Algorithm PR even achieves the nominally best BLEU score on test data. For the chunking experiment, after T iterations, the estimated squared gradient norm and either of the constants L and σ2 for Algorithm PR are several orders of magnitude smaller than for Algorithm CE, but similar to the results for Algorithm EL. The corresponding iteration counts determined by early stopping on development data show an improvement of Algorithm PR over Algorithms CE and EL, however, by a smaller factor than in the machine translation experiment. Note that for comparability across algorithms, the same constant learning rates were used in all runs. However, we obtained similar relations between algorithms by using the meta-parameter settings chosen on development data as shown in Table 1. Furthermore, the above tendendencies hold for both settings of the meta-parameter bin or cont of Algorithm PR. 7 Conclusion We presented learning objectives and algorithms for stochastic structured prediction under bandit feedback. The presented methods “banditize” well-known approaches to probabilistic structured prediction such as expected loss minimization, pairwise preference ranking, and cross-entropy minimization. We presented a comparison of practical convergence criteria based on early stopping with theoretically motivated convergence criteria based on the squared gradient norm. Our experimental results showed fastest convergence speed under both criteria for pairwise preference learning. Our numerical evaluation showed smallest variance for pairwise preference learning, which possibly explains fastest convergence despite the underlying non-convex objective. Furthermore, since this algorithm requires only easily obtainable relative preference feedback for learning, it is an attractive choice for practical interactive learning scenarios. Acknowledgments. This research was supported in part by the German research foundation (DFG), and in part by a research cooperation grant with the Amazon Development Center Germany. 8 References [1] Agarwal, A., Dekel, O., and Xiao, L. (2010). Optimal algorithms for online convex optimization with multi-point bandit feedback. In COLT. [2] Busa-Fekete, R. and Hüllermeier, E. (2014). A survey of preference-based online learning with bandit algorithms. In ALT. [3] Chang, K.-W., Krishnamurthy, A., Agarwal, A., Daume, H., and Langford, J. (2015). Learning to search better than your teacher. In ICML. [4] Duchi, J. C., Jordan, M. I., Wainwright, M. J., and Wibisono, A. (2015). Optimal rates for zero-order convex optimization: The power of two function evaluations. IEEE Translactions on Information Theory, 61(5):2788–2806. [5] Dyer, C., Lopez, A., Ganitkevitch, J., Weese, J., Ture, F., Blunsom, P., Setiawan, H., Eidelman, V., and Resnik, P. (2010). cdec: A decoder, alignment, and learning framework for finite-state and context-free translation models. In ACL Demo. [6] Freund, Y., Iyer, R., Schapire, R. E., and Singer, Y. (2003). An efficient boosting algorithm for combining preferences. JMLR, 4:933–969. [7] Ghadimi, S. and Lan, G. (2012). Stochastic first- and zeroth-order methods for nonconvex stochastic programming. SIAM J. on Optimization, 4(23):2342–2368. [8] Herbrich, R., Graepel, T., and Obermayer, K. (2000). Large margin rank boundaries for ordinal regression. In Advances in Large Margin Classifiers, pages 115–132. [9] Ionides, E. L. (2008). Truncated importance sampling. J. of Comp. and Graph. Stat., 17(2):295–311. [10] Joachims, T. (2002). Optimizing search engines using clickthrough data. In KDD. [11] Langford, J. and Zhang, T. (2007). The epoch-greedy algorithm for contextual multi-armed bandits. In NIPS. [12] Lazaric, A. and Munos, R. (2012). Learning with stochastic inputs and adversarial outputs. Journal of Computer and System Sciences, (78):1516–1537. [13] Li, L., Chu, W., Langford, J., and Schapire, R. E. (2010). A contextual-bandit approach to personalized news article recommendation. In WWW. [14] Polyak, B. T. (1987). Introduction to Optimization. Optimization Software, Inc., New York. [15] Ranzato, M., Chopra, S., Auli, M., and Zaremba, W. (2016). Sequence level training with recurrent neural networks. In ICLR. [16] Sha, F. and Pereira, F. (2003). Shallow parsing with conditional random fields. In NAACL. [17] Simianer, P., Riezler, S., and Dyer, C. (2012). Joint feature selection in distributed stochastic learning for large-scale discriminative training in SMT. In ACL. [18] Smith, N. A. (2011). Linguistic Structure Prediction. Morgan and Claypool. [19] Sokolov, A., Kreutzer, J., Lo, C., and Riezler, S. (2016). Learning structured predictors from bandit feedback for interactive NLP. In ACL. [20] Sokolov, A., Riezler, S., and Urvoy, T. (2015). Bandit structured prediction for learning from user feedback in statistical machine translation. In MT Summit XV. [21] Solodov, M. V. (1998). Incremental gradient algorithms with stepsizes bounded away from zero. Computational Optimization and Applications, 11:23–35. [22] Sutton, R. S., McAllester, D., Singh, S., and Mansour, Y. (2000). Policy gradient methods for reinforcement learning with function approximation. In NIPS. [23] Thurstone, L. L. (1927). A law of comparative judgement. Psychological Review, 34:278–286. [24] Yue, Y. and Joachims, T. (2009). Interactively optimizing information retrieval systems as a dueling bandits problem. In ICML. [25] Yuille, A. and He, X. (2012). Probabilistic models of vision and max-margin methods. Frontiers of Electrical and Electronic Engineering, 7(1):94–106. 9 | 2016 | 267 |
6,180 | Estimating the class prior and posterior from noisy positives and unlabeled data Shantanu Jain, Martha White, Predrag Radivojac Department of Computer Science Indiana University, Bloomington, Indiana, USA {shajain, martha, predrag}@indiana.edu Abstract We develop a classification algorithm for estimating posterior distributions from positive-unlabeled data, that is robust to noise in the positive labels and effective for high-dimensional data. In recent years, several algorithms have been proposed to learn from positive-unlabeled data; however, many of these contributions remain theoretical, performing poorly on real high-dimensional data that is typically contaminated with noise. We build on this previous work to develop two practical classification algorithms that explicitly model the noise in the positive labels and utilize univariate transforms built on discriminative classifiers. We prove that these univariate transforms preserve the class prior, enabling estimation in the univariate space and avoiding kernel density estimation for high-dimensional data. The theoretical development and parametric and nonparametric algorithms proposed here constitute an important step towards wide-spread use of robust classification algorithms for positive-unlabeled data. 1 Introduction Access to positive, negative and unlabeled examples is a standard assumption for most semisupervised binary classification techniques. In many domains, however, a sample from one of the classes (say, negatives) may not be available, leading to the setting of learning from positive and unlabeled data (Denis et al., 2005). Positive-unlabeled learning often emerges in sciences and commerce where an observation of a positive example (say, that a protein catalyzes reactions or that a social network user likes a particular product) is usually reliable. Here, however, the absence of a positive observation cannot be interpreted as a negative example. In molecular biology, for example, an attempt to label a data point as positive (say, that a protein is an enzyme) may be unsuccessful for a variety of experimental and biological reasons, whereas in social networks an explicit dislike of a product may not be possible. Both scenarios lead to a situation where negative examples cannot be actively collected. Fortunately, the absence of negatively labeled examples can be tackled by incorporating unlabeled examples as negatives, leading to the development of non-traditional classifiers. Here we follow the terminology by Elkan and Noto (2008) that a traditional classifier predicts whether an example is positive or negative, whereas a non-traditional classifier predicts whether the example is positive or unlabeled. Positive vs. unlabeled (non-traditional) training is reasonable because the class posterior — and also the optimum scoring function for composite losses (Reid and Williamson, 2010) — in the traditional setting is monotonically related to the posterior in the non-traditional setting. However, the true posterior can be fully recovered from the non-traditional posterior only if we know the class prior; i.e., the proportion of positives in unlabeled data. The knowledge of the class prior is also necessary for estimation of the performance criteria such as the error rate, balanced error rate or F-measure, and also for finding the right threshold for the non-traditional scoring function that leads to an optimal classifier with respect to some criteria (Menon et al., 2015). Class prior estimation in a nonparametric setting has been actively researched in the past decade offering an extensive theory of identifiability (Ward et al., 2009; Blanchard et al., 2010; Scott et al., 2013; Jain et al., 2016) and a few practical solutions (Elkan and Noto, 2008; Ward et al., 2009; du Plessis and Sugiyama, 2014; Sanderson and Scott, 2014; Jain et al., 2016; Ramaswamy et al., 2016). Application of these algorithms to real data, however, is limited in that none of the proposed algorithms simultaneously deals with noise in the labels and practical estimation for highdimensional data. Much of the theory on learning class priors relies on the assumption that either the distribution of positives is known or that the positive sample is clean. In practice, however, labeled data sets contain class-label noise, where an unspecified amount of negative examples contaminates the positive sample. This is a realistic scenario in experimental sciences where technological advances enabled generation of high-throughput data at a cost of occasional errors. One example for this comes from the studies of proteins using analytical chemistry technology; i.e., mass spectrometry. For example, in the process of peptide identification (Steen and Mann, 2004), bioinformatics methods are usually set to report results with specified false discovery rate thresholds (e.g., 1%). Unfortunately, statistical assumptions in these experiments are sometimes violated thereby leading to substantial noise in reported results, as in the case of identifying protein post-translational modifications. Similar amounts of noise might appear in social networks such as Facebook, where some users select ‘like’, even when they do not actually like a particular post. Further, the only approach that does consider similar such noise (Scott et al., 2013) requires density estimation, which is known to be problematic for high-dimensional data. In this work, we propose the first classification algorithm, with class prior estimation, designed particularly for high-dimensional data with noise in the labeling of positive data. We first formalize the problem of class prior estimation from noisy positive and unlabeled data. We extend the existing identifiability theory for class prior estimation from positive-unlabeled data to this noise setting. We then show that we can practically estimate class priors and the posterior distributions by first transforming the input space to a univariate space, where density estimation is reliable. We prove that these transformations preserve class priors and show that they correspond to training a nontraditional classifier. We derive a parametric algorithm and a nonparametric algorithm to learn the class priors. Finally, we carry out experiments on synthetic and real-life data and provide evidence that the new approaches are sound and effective. 2 Problem formulation Consider a binary classification problem of mapping an input space X to an output space Y = {0, 1}. Let f be the true distribution of inputs. It can be represented as the following mixture f(x) = ↵f1(x) + (1 −↵)f0(x), (1) where x 2 X, y 2 Y, fy are distributions over X for the positive (y = 1) and negative (y = 0) class, respectively; and ↵2 [0, 1) is the class prior or the proportion of the positive examples in f. We will refer to a sample from f as unlabeled data. Let g be the distribution of inputs for the labeled data. Because the labeled sample contains some mislabeled examples, the corresponding distribution is also a mixture of f1 and a small proportion, say 1 −β, of f0. That is, g(x) = βf1(x) + (1 −β)f0(x), (2) where β 2 (0, 1]. Observe that both mixtures have the same components but different mixing proportions. The simplest scenario is that the mixing components f0 and f1 correspond to the classconditional distributions p(x|Y = 0) and p(x|Y = 1), respectively. However, our approach also permits transformations of the input space X, thus resulting in a more general setup. The objective of this work is to study the estimation of the class prior ↵= p(Y = 1) and propose practical algorithms for estimating ↵. The efficacy of this estimation is clearly tied to β, where as β gets smaller, the noise in the positive labels becomes larger. We will discuss identifiability of ↵and β and give a practical algorithm for estimating ↵(and β). We will then use these results to estimate the posterior distribution of the class variable, p(y|x), despite the fact that the labeled set does not contain any negative examples. 2 3 Identifiability The class prior is identifiable if there is a unique class prior for a given pair (f, g). Much of the identifiability characterization in this section has already been considered as the case of asymmetric noise (Scott et al., 2013); see Section 7 on related work. We recreate these results here, with the aim to introduce required notation, to highlight several important results for later algorithm development and to include a few missing results needed for our approach. Though the proof techniques are themselves quite different and could be of interest, we include them in the appendix due to space. There are typically two aspects to address with identifiability. First, one needs to determine if a problem is identifiable, and, second, if it is not, propose a canonical form that is identifiable. In this section we will see that class prior is not identifiable in general because f0 can be a mixture containing f1 and vice versa. To ensure identifiability, it is necessary to choose a canonical form that prefers a class prior that makes the two components as different as possible; this canonical form was introduced as the mutual irreducibility condition (Scott et al., 2013) and is related to the proper novelty distribution (Blanchard et al., 2010) and the max-canonical form (Jain et al., 2016). We discuss identifiability in terms of measures. Let µ, ⌫, µ0 and µ1 be probability measures defined on some σ-algebra A on X, corresponding to f, g, f0 and f1, respectively. It follows that µ = ↵µ1 + (1 −↵)µ0 (3) ⌫= βµ1 + (1 −β)µ0. (4) Consider a family of pairs of mixtures having the same components F(⇧) = {(µ, ⌫) : µ = ↵µ1 + (1 −↵)µ0, ⌫= βµ1 + (1 −β)µ0, (µ0, µ1) 2 ⇧, 0 ↵< β 1}, where ⇧is some set of pairs of probability measures defined on A. The family is parametrized by the quadruple (↵, β, µ0, µ1). The condition β > ↵means that ⌫has a greater proportion of µ1 compared to µ. This is consistent with our assumption that the labeled sample mainly contains positives. The most general choice for ⇧is ⇧all = Pall ⇥Pall \ (µ, µ) : µ 2 Pall , where Pall is the set of all probability measures defined on A and (µ, µ) : µ 2 Pall is the set of pairs with equal distributions. Removing equal pairs prevents µ and ⌫from being identical. We now define the maximum proportion of a component λ1 in a mixture λ, which is used in the results below and to specify the criterion that enables identifiability; more specifically, aλ1 λ = max ↵2 [0, 1] : λ = ↵λ1 + (1 −↵)λ0, λ0 2 Pall . (5) Of particular interest is the case when aλ1 λ = 0, which should be read as “λ is not a mixture containing λ1”. We finally define the set all possible (↵, β) that generate µ and ⌫when (µ0, µ1) varies in ⇧: A+(µ, ⌫, ⇧) = {(↵, β) : µ = ↵µ1 + (1 −↵)µ0, ⌫= βµ1 + (1 −β)µ0, (µ0, µ1) 2 ⇧, 0 ↵< β 1}. If A+(µ, ⌫, ⇧) is a singleton set for all (µ, ⌫) 2 F(⇧), then F(⇧) is identifiable in (↵, β). First, we show that the most general choice for ⇧, ⇧all, leads to unidentifiability (Lemma 1). Fortunately, however, by choosing a restricted set ⇧res = (µ0, µ1) 2 ⇧all : aµ1 µ0 = 0, aµ0 µ1 = 0 as ⇧, we do obtain identifiability (Theorem 1). In words, ⇧res contains pairs of distributions, where each distribution in a pair cannot be expressed as a mixture containing the other. The proofs of the results below are in the Appendix. Lemma 1 (Unidentifiability) Given a pair of mixtures (µ, ⌫) 2 F(⇧all), let parameters (↵, β, µ0, µ1) generate (µ, ⌫) and ↵+ = a⌫ µ, β+ = aµ ⌫. It follows that 1. There is a one-to-one relation between (µ0, µ1) and (↵, β) and µ0 = βµ −↵⌫ β −↵, µ1 = (1 −↵)⌫−(1 −β)µ β −↵ . (6) 3 2. Both expressions on the right-hand side of Equation 6 are well defined probability measures if and only if ↵/β ↵+ and (1−β)/(1−↵) β+. 3. A+(µ, ⌫, ⇧all) = {(↵, β) : ↵/β ↵+, (1−β)/(1−↵) β+}. 4. F(⇧all) is unidentifiable in (↵, β); i.e., (↵, β) is not uniquely determined from (µ, ⌫). 5. F(⇧all) is unidentifiable in ↵and β, individually; i.e., neither ↵nor β is uniquely determined from (µ, ⌫). Observe that the definition of aλ1 λ and µ 6= ⌫imply ↵+ < 1 and, consequently, any (↵, β) 2 A+(µ, ⌫, ⇧all) satisfies ↵< β, as expected. Theorem 1 (Identifiablity) Given (µ, ⌫) 2 F(⇧all), let ↵+ = a⌫ µ and β+ = aµ ⌫. Let µ⇤ 0 = (µ−↵+⌫)/(1−↵+), µ⇤ 1 = (⌫−β+µ)/(1−β+) and ↵⇤= ↵+(1−β+)/(1−↵+β+), β⇤= (1−β+)/(1−↵+β+). (7) It follows that 1. (↵⇤, β⇤, µ⇤ 0, µ⇤ 1) generate (µ, ⌫) 2. (µ⇤ 0, µ⇤ 1) 2 ⇧res and, consequently, ↵⇤= aµ⇤ 1 µ , β⇤= aµ⇤ 1 ⌫. 3. F(⇧res) contains all pairs of mixtures in F(⇧all). 4. A+(µ, ⌫, ⇧res) = {(↵⇤, β⇤)}. 5. F(⇧res) is identifiable in (↵, β); i.e., (↵, β) is uniquely determined from (µ, ⌫). We refer to the expressions of µ and ⌫as mixtures of components µ0 and µ1 as a max-canonical form when (µ0, µ1) is picked from ⇧res. This form enforces that µ1 is not a mixture containing µ0 and vice versa, which leads to µ0 and µ1 having maximum separation, while still generating µ and ⌫. Each pair of distributions in F(⇧res) is represented in this form. Identifiability of F(⇧res) in (↵, β) occurs precisely when A+(µ, ⌫, ⇧res) = {(↵⇤, β⇤)}, i.e., (↵⇤, β⇤) is the only pair of mixing proportions that can appear in a max-canonical form of µ and ⌫. Moreover, Statement 1 in Theorem 1 and Statement 1 in Lemma 1 imply that the max-canonical form is unique and completely specified by (↵⇤, β⇤, µ⇤ 0, µ⇤ 1), with ↵⇤< β⇤following from Equation 7. Thus, using F(⇧res) to model the unlabeled and labeled data distributions makes estimation of not only ↵, the class prior, but also β, µ0, µ1 a well-posed problem. Moreover, due to Statement 3 in Theorem 1, there is no loss in the modeling capability by using F(⇧res) instead of F(⇧all). Overall, identifiability, absence of loss of modeling capability and maximum separation between µ0 and µ1 combine to justify estimating ↵⇤ as the class prior. 4 Univariate Transformation The theory and algorithms for class prior estimation are agnostic to the dimensionality of the data; in practice, however, this dimensionality can have important consequences. Parametric Gaussian mixture models trained via expectation-maximization (EM) are known to strongly suffer from colinearity in high-dimensional data. Nonparametric (kernel) density estimation is also known to have curse-of-dimensionality issues, both in theory (Liu et al., 2007) and in practice (Scott, 2008). We address the curse of dimensionality by transforming the data to a single dimension. The transformation ⌧: X ! R, surprisingly, is simply an output of a non-traditional classifier trained to separate labeled sample, L, from unlabeled sample, U. The transform is similar to that in (Jain et al., 2016), except that it is not required to be calibrated like a posterior distribution; as shown below, a good ranking function is sufficient. First, however, we introduce notation and formalize the data generation steps (Figure 1). Let X be a random variable taking values in X, capturing the true distribution of inputs, µ, and Y be an unobserved random variable taking values in Y, giving the true class of the inputs. It follows that X|Y = 0 and X|Y = 1 are distributed according to µ0 and µ1, respectively. Let S be a selection random variable, whose value in S = {0, 1, 2} determines the sample to which an input x is added (Figure 1). When S = 1, x is added to the noisy labeled sample; when S = 0, x is added to the unlabeled sample; and when S = 2, x is not added to either of the samples. It follows that 4 Select for labeling Input Unlabeled S = 0 Success of labeling Noisy positive S = 1 Dropped S = 2 no yes yes Y = 0 w.p. γ0 Y = 1 w.p. γ1 no Y = 0 w.p. 1 −γ0 Y = 1 w.p. 1 −γ1 Figure 1: The labeling procedure, with S taking values from S = {0, 1, 2}. In the first step, the sample is randomly selected to attempt labeling, with some probability independent of X or Y . If it is not selected, it is added to the “Unlabeled” set. If it is selected, then labeling is attempted. If the true label is Y = 1, then with probability γ1 2 (0, 1), the labeling will succeed and it is added to “Noisy positives”. Otherwise, it is added to the “Dropped” set. If the true label is Y = 0, then the attempted labeling is much more likely to fail, but because of noise, could succeed. The attempted label of Y = 0 succeeds with probability γ0, and is added to “Noisy positives”, even though it is actually a negative instance. γ0 = 0 leads to the no noise case and the noise increases as γ0 increases. β = γ1↵/(γ1↵+γ0(1−↵)), gives the proportion of positives in the “Noisy positives”. Xu = X|S = 0 and Xl = X|S = 1 are distributed according to µ and ⌫, respectively. We make the following assumptions which are consistent with the statements above: p(y|S = 0) = p(y), (8) p(y = 1|S = 1) = β, (9) p(x|s, y) = p(x|y). (10) Assumptions 8 and 9 states that the proportion of positives in the unlabeled sample and the labeled sample matches the true proportion in µ and ⌫, respectively. Assumption 10 states that the distribution of the positive inputs (and the negative inputs) in both the unlabeled and the labeled samples is equal and unbiased. Lemma 2 gives the implications of these assumptions. Statement 3 in Lemma 2 is particularly interesting and perhaps counter-intuitive as it states that with non-zero probability some inputs need to be dropped. Lemma 2 Let X, Y and S be random variables taking values in X, Y and S, respectively, and Xu = X|S = 0 and Xl = X|S = 1. For measures µ, ⌫, µ0, µ1, satisfying Equations 3 and 4 and µ1 6= µ0, let µ, µ0, µ1 give the distribution of X, X|Y = 0 and X|Y = 1, respectively. If X, Y and S satisfy assumptions 8, 9 and 10, then 1. X is independent of S = 0; i.e., p(x|S = 0) = p(x) 2. Xu and Xl are distributed according to µ and ⌫, respectively. 3. p(S = 2) 6= 0. The proof is in the Appendix. Next, we highlight the conditions under which the score function ⌧ preserves ↵⇤. Observing that S serves as the pseudo class label for labeled vs. unlabeled classification as well, we first give an expression for the posterior: ⌧p(x) = p(S = 1|x, S 2 {0, 1}), 8x 2 X. (11) Theorem 2 (↵⇤-preserving transform) Let random variables X, Y, S, Xu, Xl and measures µ, ⌫, µ0, µ1 be as defined in Lemma 2. Let ⌧p be the posterior as defined in Equation 11 and ⌧= H ◦⌧p, where H is a 1-to-1 function on [0, 1] and ◦is the composition operator. Assume 1. (µ0, µ1) 2 ⇧res, 2. Xu and Xl are continuous with densities f and g, respectively, 3. µ⌧, ⌫⌧, µ⌧1 are the measures corresponding to ⌧(Xu), ⌧(Xl), ⌧(X1), respectively, 4. (↵+, β+, ↵⇤, β⇤) = (a⌫ µ, aµ ⌫, aµ1 µ , aµ1 ⌫) and (↵+ ⌧, β+ ⌧, ↵⇤ ⌧, β⇤ ⌧) = (a⌫⌧ µ⌧, aµ⌧ ⌫⌧, aµ⌧1 µ⌧, aµ⌧1 ⌫⌧). Then (↵+ ⌧, β+ ⌧, ↵⇤ ⌧, β⇤ ⌧) = (↵+, β+, ↵⇤, β⇤) and so ⌧is an ↵⇤-preserving transformation. Moreover, ⌧p can also be used to compute the true posterior probability: p(Y = 1|x) = ↵⇤(1 −↵⇤) β⇤−↵⇤ ✓p(S = 0) p(S = 1) ⌧p(x) 1 −⌧p(x) −1 −β⇤ 1 −↵⇤ ◆ . (12) 5 The proof is in the Appendix. Theorem 2 shows that the ↵⇤is the same for the original data and the transformed data, if the transformation function ⌧can be expressed as a composition of ⌧p and a one-to-one function, H, defined on [0, 1]. Trivially, ⌧p itself is one such function. We emphasize, however, that ↵⇤-preservation is not limited by the efficacy of the calibration algorithm; uncalibrated scoring that ranks inputs as ⌧p(x) also preserves ↵⇤. Theorem 2 further demonstrates how the true posterior, p(Y = 1|x), can be recovered from ⌧p by plugging in estimates of ⌧p, p(S=0)/p(S=1), ↵⇤and β⇤in Equation 12. The posterior probability ⌧p can be estimated directly by using a probabilistic classifier or by calibrating a classifier’s score (Platt, 1999; Niculescu-Mizil and Caruana, 2005); |U|/|L| serves as an estimate of p(S=0)/p(S=1); section 5 gives parametric and nonparametric approaches for estimation of ↵⇤and β⇤. 5 Algorithms In this section, we derive a parametric and a nonparametric algorithm to estimate ↵⇤and β⇤from the unlabeled sample, U = {Xu i }, and the noisy positive sample, L = {Xl i}. In theory, both approaches can handle multivariate samples; in practice, however, to circumvent the curse of dimensionality, we exploit the theory of ↵⇤-preserving univariate transforms to transform the samples. Parametric approach. The parametric approach is derived by modeling each sample as a two component Gaussian mixture, sharing the same components but having different mixing proportions: Xu i ⇠↵N(u1, ⌃1) + (1 −↵)N(u0, ⌃0) Xl i ⇠βN(u1, ⌃1) + (1 −β)N(u0, ⌃0) where u1, u0 2 Rd and ⌃1, ⌃0 2 Sd ++, the set of all d⇥d positive definite matrices. The algorithm is an extension to the EM approach for Gaussian mixture models (GMMs) where, instead of estimating the parameters of a single mixture, the parameters of both mixtures (↵, β, u0, u1, ⌃0, ⌃1) are estimated simultaneously by maximizing the combined likelihood over both U and L. This approach, which we refer to as a multi-sample GMM (MSGMM), exploits the constraint that the two mixtures share the same components. The update rules and their derivation are given in the Appendix. Nonparametric approach. Our nonparametric strategy directly exploits the results of Lemma 1 and Theorem 1, which give a direct connection between (↵+ = a⌫ µ, β+ = aµ ⌫) and (↵⇤, β⇤). Therefore, for a two-component mixture sample, M, and a sample from one of the components, C, it only requires an algorithm to estimate the maximum proportion of C in M. For this purpose, we use the AlphaMax algorithm (Jain et al., 2016), briefly summarized in the Appendix. Specifically, our two-step approach for estimating ↵⇤and β⇤is as follows: (i) Estimate ↵+ and β+ as outputs of AlphaMax(U, L) and AlphaMax(L, U), respectively; (ii) Estimate (↵⇤, β⇤) from the estimates of (↵+, β+) by applying Equation 7. We refer to our nonparametric algorithm as AlphaMax-N. 6 Empirical investigation In this section we systematically evaluate the new algorithms in a controlled, synthetic setting as well as on a variety of data sets from the UCI Machine Learning Repository (Lichman, 2013). Experiments on synthetic data: We start by evaluating all algorithms in a univariate setting where both mixing proportions, ↵and β, are known. We generate unit-variance Gaussian and unit-scale Laplace-distributed i.i.d. samples and explore the impact of mixing proportions, the size of the component sample, and the separation and overlap between the mixing components on the accuracy of estimation. The class prior ↵was varied from {0.05, 0.25, 0.50} and the noise component β from {1.00, 0.95, 0.75}. The size of the labeled sample L was varied from {100, 1000}, whereas the size of the unlabeled sample U was fixed at 10000. Experiments on real-life data: We considered twelve real-life data sets from the UCI Machine Learning Repository. To adjust these data to our problems, categorical features were transformed into numerical using sparse binary representation, the regression data sets were transformed into classification based on mean of the target variable, and the multi-class classification problems were converted into binary problems by combining classes. In each data set, a subset of positive and negative examples was randomly selected to provide a labeled sample while the remaining data (without class labels) were used as unlabeled data. The size of the labeled sample was kept at 1000 (or 100 for small data sets) and the maximum size of unlabeled data was set 10000. 6 Algorithms: We compare the AlphaMax-N and MSGMM algorithms to the Elkan-Noto algorithm (Elkan and Noto, 2008) as well as the noiseless version of AlphaMax (Jain et al., 2016). There are several versions of the Elkan-Noto estimator and each can use any underlying classifier. We used the e1 alternative estimator combined with the ensembles of 100 two-layer feed-forward neural networks, each with five hidden units. The out-of-bag scores of the same classifier were used as a class-prior preserving transformation that created an input to the AlphaMax algorithms. It is important to mention that neither Elkan-Noto nor AlphaMax algorithm was developed to handle noisy labeled data. In addition, the theory behind the Elkan-Noto estimator restricts its use to classconditional distributions with non-overlapping supports. The algorithm by du Plessis and Sugiyama (2014) minimizes the same objective as the e1 Elkan-Noto estimator and, thus, was not implemented. Evaluation: All experiments were repeated 50 times to be able to draw conclusions with statistical significance. In real-life data, the labeled sample was created randomly by choosing an appropriate number of positive and negative examples to satisfy the condition for β and the size of the labeled sample, while the remaining data was used as the unlabeled sample. Therefore, the class prior in the unlabeled data varies with the selection of the noise parameter β. The mean absolute difference between the true and estimated class priors was used as a performance measure. The best performing algorithm on each data set was determined by multiple hypothesis testing using the P-value of 0.05 and Bonferroni correction. Results: The comprehensive results for synthetic data drawn from univariate Gaussian and Laplace distributions are shown in Appendix (Table 2). In these experiments no transformation was applied prior to running any of the algorithms. As expected, the results show excellent performance of the MSGMM model on the Gaussian data. These results significantly degrade on Laplace-distributed data, suggesting sensitivity to the underlying assumptions. On the other hand, AlphaMax-N was accurate over all data sets and also robust to noise. These results suggest that new parametric and nonparametric algorithms perform well in these controlled settings. Table 1 shows the results on twelve real data sets. Here, AlphaMax and AlphaMax-N algorithms demonstrate significant robustness to noise, although the parametric version MSGMM was competitive in some cases. On the other hand, the Elkan-Noto algorithm expectedly degrades with noise. Finally, we investigated the practical usefulness of the ↵⇤-preserving transform. Table 3 (Appendix) shows the results of AlphaMax-N and MSGMM on the real data sets, with and without using the transform. Because of computational and numerical issues, we reduced the dimensionality by using principal component analysis (the original data caused matrix singularity issues for MSGMM and density estimation issues for AlphaMax-N). MSGMM deteriorates significantly without the transform, whereas AlphaMax-N preserves some signal for the class prior. AlphaMax-N with the transform, however, shows superior performance on most data sets. 7 Related work Class prior estimation in a semi-supervised setting, including positive-unlabeled learning, has been extensively discussed previously; see Saerens et al. (2002); Cortes et al. (2008); Elkan and Noto (2008); Blanchard et al. (2010); Scott et al. (2013); Jain et al. (2016) and references therein. Recently, a general setting for label noise has also been introduced, called the mutual contamination model. The aim under this model is to estimate multiple unknown base distributions, using multiple random samples that are composed of different convex combinations of those base distributions (Katz-Samuels and Scott, 2016). The setting of asymmetric label noise is a subset of this more general setting, treated under general conditions by Scott et al. (2013), and previously investigated under a more restrictive setting as co-training (Blum and Mitchell, 1998). A natural approach is to use robust estimation to learn in the presence of class noise; this strategy, however, has been shown to be ineffective, both theoretically (Long and Servedio, 2010; Manwani and Sastry, 2013) and empirically (Hawkins and McLachlan, 1997; Bashir and Carter, 2005), indicating the need to explicitly model the noise. Generative mixture model approaches have also been developed, which explicitly model the noise (Lawrence and Scholkopf, 2001; Bouveyron and Girard, 2009); these algorithms, however, assume labeled data for each class. As the most related work, though Scott et al. (2013) did not explicitly treat the positive-unlabeled learning with noisy positives, their formulation can incorporate this setting by using ⇡0 = ↵and β = 1 −⇡1. The theoretical and algorithmic treatment, however, is very different. Their focus is on identifiability and analyzing convergence rates and statistical properties, assuming access to some ⇤function which can obtain proportions 7 Table 1: Mean absolute difference between estimated and true mixing proportion over twelve data sets from the UCI Machine Learning Repository. Statistical significance was evaluated by comparing the Elkan-Noto algorithm, AlphaMax, AlphaMax-N, and the multi-sample GMM after applying a multivariate-to-univariate transform (MSGMM-T). The bold font type indicates the winner and the asterisk indicates statistical significance. For each data set, shown are the true mixing proportion (↵), true proportion of the positives in the labeled sample (β), sample dimensionality (d), the number of positive examples (n1), the total number of examples (n), and the area under the ROC curve (AUC) for a model trained between labeled and unlabeled data. Data ↵ β AUC d n1 n Elkan-Noto AlphaMax AlphaMax-N MSGMM-T Bank 0.095 1.00 0.842 13 5188 45000 0.241 0.070 0.037* 0.163 0.096 0.95 0.819 13 5188 45000 0.284 0.079 0.036* 0.155 0.101 0.75 0.744 13 5188 45000 0.443 0.124 0.040* 0.127 Concrete 0.419 1.00 0.685 8 490 1030 0.329 0.141 0.181 0.077* 0.425 0.95 0.662 8 490 1030 0.363 0.174 0.231 0.095* 0.446 0.75 0.567 8 490 1030 0.531 0.212 0.272 0.233 Gas 0.342 1.00 0.825 127 2565 5574 0.017 0.011 0.017 0.008* 0.353 0.95 0.795 127 2565 5574 0.078 0.016 0.006 0.006 0.397 0.75 0.672 127 2565 5574 0.396 0.137 0.009 0.006* Housing 0.268 1.00 0.810 13 209 506 0.159 0.087 0.094 0.209 0.281 0.95 0.777 13 209 506 0.226 0.094 0.110 0.204 0.330 0.75 0.651 13 209 506 0.501 0.125 0.134 0.172 Landsat 0.093 1.00 0.933 36 1508 6435 0.074 0.009 0.007* 0.157 0.103 0.95 0.904 36 1508 6435 0.110 0.015 0.008* 0.152 0.139 0.75 0.788 36 1508 6435 0.302 0.063 0.012* 0.143 Mushroom 0.409 1.00 0.792 126 3916 8124 0.029 0.015* 0.022 0.037 0.416 0.95 0.766 126 3916 8124 0.087 0.015 0.008* 0.037 0.444 0.75 0.648 126 3916 8124 0.370 0.140 0.020 0.024 Pageblock 0.086 1.00 0.885 10 560 5473 0.116 0.026* 0.044 0.129 0.087 0.95 0.858 10 560 5473 0.137 0.031* 0.052 0.125 0.090 0.75 0.768 10 560 5473 0.256 0.041* 0.064 0.111 Pendigit 0.243 1.00 0.875 16 3430 10992 0.030 0.006* 0.009 0.081 0.248 0.95 0.847 16 3430 10992 0.071 0.011 0.005* 0.074 0.268 0.75 0.738 16 3430 10992 0.281 0.093 0.007* 0.062 Pima 0.251 1.00 0.735 8 268 768 0.351 0.120 0.111 0.171 0.259 0.95 0.710 8 268 768 0.408 0.118 0.110 0.168 0.289 0.75 0.623 8 268 768 0.586 0.144 0.156 0.175 Shuttle 0.139 1.00 0.929 9 8903 58000 0.024* 0.027 0.029 0.157 0.140 0.95 0.903 9 8903 58000 0.052 0.004* 0.007 0.157 0.143 0.75 0.802 9 8903 58000 0.199 0.047 0.004* 0.148 Spambase 0.226 1.00 0.842 57 1813 4601 0.184 0.046 0.041 0.059 0.240 0.95 0.812 57 1813 4601 0.246 0.059 0.042* 0.063 0.295 0.75 0.695 57 1813 4601 0.515 0.155 0.044* 0.059 Wine 0.566 1.00 0.626 11 4113 6497 0.290 0.083 0.060 0.070 0.575 0.95 0.610 11 4113 6497 0.322 0.113 0.063 0.076 0.612 0.75 0.531 11 4113 6497 0.420 0.322 0.353 0.293 between samples. They do not explicitly address issues with high-dimensional data nor focus on algorithms to obtain ⇤. In contrast, we focus primarily on the univariate transformation to handle high-dimensional data and practical algorithms for estimating ↵⇤. Supervised learning used for class prior-preserving transformation provides a rich set of techniques to address high-dimensional data. 8 Conclusion In this paper, we developed a practical algorithm for classification of positive-unlabeled data with noise in the labeled data set. In particular, we focused on a strategy for high-dimensional data, providing a univariate transform that reduces the dimension of the data, preserves the class prior so that estimation in this reduced space remains valid and is then further useful for classification. This approach provides a simple algorithm that simultaneously improves estimation of the class prior and provides a resulting classifier. We derived a parametric and a nonparametric version of the algorithm and then evaluated its performance on a wide variety of learning scenarios and data sets. To the best of our knowledge, this algorithm represents one of the first practical and easy-to-use approaches to learning with high-dimensional positive-unlabeled data with noise in the labels. 8 Acknowledgements We thank Prof. Michael W. Trosset for helpful comments. Grant support: NSF DBI-1458477, NIH R01MH105524, NIH R01GM103725, and the Indiana University Precision Health Initiative. References S. Bashir and E. M. Carter. High breakdown mixture discriminant analysis. J Multivar Anal, 93(1):102–111, 2005. G. Blanchard, G. Lee, and C. Scott. Semi-supervised novelty detection. J Mach Learn Res, 11:2973–3009, 2010. A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. COLT 1998, pages 92–100, 1998. C. Bouveyron and S. Girard. Robust supervised classification with mixture models: learning from data with uncertain labels. Pattern Recognit, 42(11):2649–2658, 2009. C. Cortes, M. Mohri, M. Riley, and A. Rostamizadeh. Sample selection bias correction theory. ALT 2008, pages 38–53, 2008. F. Denis, R. Gilleron, and F. Letouzey. Learning from positive and unlabeled examples. Theor Comput Sci, 348(16):70–83, 2005. M. C. du Plessis and M. Sugiyama. Class prior estimation from positive and unlabeled data. IEICE Trans Inf & Syst, E97-D(5):1358–1362, 2014. C. Elkan and K. Noto. Learning classifiers from only positive and unlabeled data. KDD 2008, pages 213–220, 2008. D. M. Hawkins and G. J. McLachlan. High-breakdown linear discriminant analysis. J Am Stat Assoc, 92(437): 136–143, 1997. S. Jain, M. White, M. W. Trosset, and P. Radivojac. Nonparametric semi-supervised learning of class proportions. arXiv preprint arXiv:1601.01944, 2016. URL http://arxiv.org/abs/1601.01944. J. Katz-Samuels and C. Scott. A mutual contamination analysis of mixed membership and partial label models. arXiv preprint arXiv:1602.06235, 2016. URL http://arxiv.org/abs/1602.06235. N. D. Lawrence and B. Scholkopf. Estimating a kernel Fisher discriminant in the presence of label noise. ICML 2001, pages 306–313, 2001. M. Lichman. UCI Machine Learning Repository, 2013. URL http://archive.ics.uci.edu/ml. H. Liu, J. D. Lafferty, and L. A. Wasserman. Sparse nonparametric density estimation in high dimensions using the rodeo. AISTATS 2007, pages 283–290, 2007. P. M. Long and R. A. Servedio. Random classification noise defeats all convex potential boosters. Mach Learn, 78(3):287–304, 2010. N. Manwani and P. S. Sastry. Noise tolerance under risk minimization. IEEE T Cybern, 43(3):1146–1151, 2013. A. K. Menon, B. van Rooyen, C. S. Ong, and R. C. Williamson. Learning from corrupted binary labels via class-probability estimation. ICML 2015, pages 125–134, 2015. A. Niculescu-Mizil and R. Caruana. Obtaining calibrated probabilities from boosting. UAI 2005, pages 413– 420, 2005. J. C. Platt. Probabilistic outputs for support vector machines and comparison to regularized likelihood methods, pages 61–74. MIT Press, 1999. H. G. Ramaswamy, C. Scott, and A. Tewari. Mixture proportion estimation via kernel embedding of distributions. arXiv preprint arXiv:1603.02501, 2016. URL https://arxiv.org/abs/1603.02501. M. D. Reid and R. C. Williamson. Composite binary losses. J Mach Learn Res, 11:2387–2422, 2010. M. Saerens, P. Latinne, and C. Decaestecker. Adjusting the outputs of a classifier to new a priori probabilities: a simple procedure. Neural Comput, 14:21–41, 2002. T. Sanderson and C. Scott. Class proportion estimation with application to multiclass anomaly rejection. AISTATS 2014, pages 850–858, 2014. C. Scott, G. Blanchard, and G. Handy. Classification with asymmetric label noise: consistency and maximal denoising. J Mach Learn Res W&CP, 30:489–511, 2013. D. W. Scott. The curse of dimensionality and dimension reduction. Multivariate Density Estimation: Theory, Practice, and Visualization, pages 195–217, 2008. H. Steen and M. Mann. The ABC’s (and XYZ’s) of peptide sequencing. Nat Rev Mol Cell Biol, 5(9):699–711, 2004. G. Ward, T. Hastie, S. Barry, J. Elith, and J.R. Leathwick. Presence-only data and the EM algorithm. Biometrics, 65(2):554–563, 2009. 9 | 2016 | 268 |
6,181 | A Minimax Approach to Supervised Learning Farzan Farnia∗ farnia@stanford.edu David Tse∗ dntse@stanford.edu Abstract Given a task of predicting Y from X, a loss function L, and a set of probability distributions Γ on (X, Y ), what is the optimal decision rule minimizing the worstcase expected loss over Γ? In this paper, we address this question by introducing a generalization of the maximum entropy principle. Applying this principle to sets of distributions with marginal on X constrained to be the empirical marginal, we provide a minimax interpretation of the maximum likelihood problem over generalized linear models as well as some popular regularization schemes. For quadratic and logarithmic loss functions we revisit well-known linear and logistic regression models. Moreover, for the 0-1 loss we derive a classifier which we call the minimax SVM. The minimax SVM minimizes the worst-case expected 0-1 loss over the proposed Γ by solving a tractable optimization problem. We perform several numerical experiments to show the power of the minimax SVM in outperforming the SVM. 1 Introduction Supervised learning, the task of inferring a function that predicts a target Y from a feature vector X = (X1, . . . , Xd) by using n labeled training samples {(x1, y1), . . . , (xn, yn)}, has been a problem of central interest in machine learning. Given the underlying distribution ˜PX,Y , the optimal prediction rules had long been studied and formulated in the statistics literature. However, the advent of highdimensional problems raised this important question: What would be a good prediction rule when we do not have enough samples to estimate the underlying distribution? To understand the difficulty of learning in high-dimensional settings, consider a genome-based classification task where we seek to predict a binary trait of interest Y from an observation of 3, 000, 000 SNPs, each of which can be considered as a discrete variable Xi ∈{0, 1, 2}. Hence, to estimate the underlying distribution we need O(33,000,000) samples. With no possibility of estimating the underlying ˜P in such problems, several approaches have been proposed to deal with high-dimensional settings. The standard approach in statistical learning theory is empirical risk minimization (ERM) [1]. ERM learns the prediction rule by minimizing an approximated loss under the empirical distribution of samples. However, to avoid overfitting, ERM restricts the set of allowable decision rules to a class of functions with limited complexity measured through its VC-dimension. This paper focuses on a complementary approach to ERM where one can learn the prediction rule through minimizing a decision rule’s worst-case loss over a larger set of distributions Γ( ˆP) centered at the empirical distribution ˆP. In other words, instead of restricting the class of decision rules, we consider and evaluate all possible decision rules, but based on a more stringent criterion that they will have to perform well over all distributions in Γ( ˆP). As seen in Figure 1, this minimax approach can be broken into three main steps: 1. We compute the empirical distribution ˆP from the data, ∗Department of Electrical Engineering, Stanford University, Stanford, CA 94305. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Minimax Approach Figure 2: Minimax-hinge Loss 2. We form a distribution set Γ( ˆP) based on ˆP, 3. We learn a prediction rule ψ∗that minimizes the worst-case expected loss over Γ( ˆP). Some special cases of this minimax approach, which are based on learning a prediction rule from low-order marginal/moments, have been addressed in the literature: [2] solves a robust minimax classification problem for continuous settings with fixed first and second-order moments; [3] develops a classification approach by minimizing the worst-case hinge loss subject to fixed low-order marginals; [4] fits a model minimizing the maximal correlation under fixed pairwise marginals to design a robust classification scheme. In this paper, we develop a general minimax approach for supervised learning problems with arbitrary loss functions. To formulate Step 3 in Figure 1, given a general loss function L and set of distribution Γ( ˆP) we generalize the problem formulation discussed at [3] to argmin ψ∈Ψ max P ∈Γ( ˆ P ) E L Y, ψ(X) . (1) Here, Ψ is the space of all decision rules. Notice the difference with the ERM problem where Ψ was restricted to smaller function classes while Γ( ˆP) = { ˆP}. If we have to predict Y with no access to X, (1) will reduce to the formulation studied at [5]. There, the authors propose to use the principle of maximum entropy [6], for a generalized definition of entropy, to find the optimal prediction rule minimizing the worst-case expected loss. By the principle of maximum entropy, we should predict based on a distribution in Γ( ˆP) that maximizes the entropy function. How can we use the principle of maximum entropy to solve (1) when we observe X as well? A natural idea is to apply the maximum entropy principle to the conditional PY |X=x instead of the marginal PY . This idea motivates a generalized version of the principle of maximum entropy, which we call the principle of maximum conditional entropy. In fact, this principle breaks Step 3 into two smaller steps: 3a. We search for P ∗the distribution maximizing the conditional entropy over Γ( ˆP), 3b. We find ψ∗the optimal decision rule for P ∗. Although the principle of maximum conditional entropy characterizes the solution to (1), computing the maximizing distribution is hard in general. In [7], the authors propose a conditional version of the principle of maximum entropy, for the specific case of Shannon entropy, and draw the principle’s connection to (1). They call it the principle of minimum mutual information, by which one should predict based on the distribution minimizing mutual information among X and Y . However, they develop their theory targeting a broad class of distribution sets, which results in a convex problem, yet the number of variables is exponential in the dimension of the problem. To overcome this issue, we propose a specific structure for the distribution set by matching the marginal PX of all the joint distributions PX,Y in Γ( ˆP) to the empirical marginal ˆPX while matching only the cross-moments between X and Y with those of the empirical distribution ˆPX,Y. We show that this choice of Γ( ˆP) has two key advantages: 1) the minimax decision rule ψ∗can be computed efficiently; 2) the minimax generalization error can be controlled by allowing a level of uncertainty in the matching of the cross-moments, which can be viewed as regularization in the minimax framework. Our solution is achieved through convex duality. For some loss functions, the dual problem turns out to be equivalent to the maximum likelihood problem for generalized linear models. For example, 2 under quadratic and logarithmic loss functions this minimax approach revisits the linear and logistic regression models respectively. On the other hand, for 0-1 loss, the minimax approach leads to a new randomized linear classifier which we call the minimax SVM. The minimax SVM minimizes the worst-case expected 0-1 loss over Γ( ˆP) by solving a tractable optimization problem. In contrast, the classic ERM formulation of minimizing the 0-1 loss over linear classifiers is well-known to be NP-hard [8]. Interestingly, the dual problem for the 0-1 loss minimax problem corresponds also to an ERM problem for linear classifiers, but with a loss function different from 0-1 loss. This loss function, which we call the minimax-hinge loss, is also different from the classic hinge loss (Figure 2). We emphasize that while the hinge loss is an adhoc surrogate loss function chosen to convexify the 0-1 loss ERM problem, the minimax-hinge loss emerges from the minimax formulation. We also perform several numerical experiments to demonstrate the power of the minimax SVM in outperforming the standard SVM which minimizes the surrogate hinge loss. 2 Principle of Maximum Conditional Entropy In this section, we provide a conditional version of the key definitions and results developed in [5]. We propose the principle of maximum conditional entropy to break Step 3 into 3a and 3b in Figure 1. We also define and characterize Bayes decision rules for different loss functions to address Step 3b. 2.1 Decision Problems, Bayes Decision Rules, Conditional Entropy Consider a decision problem. Here the decision maker observes X ∈X from which she predicts a random target variable Y ∈Y using an action a ∈A. Let PX,Y = (PX, PY |X) be the underlying distribution for the random pair (X, Y ). Given a loss function L : Y ×A →[0, ∞], L(y, a) indicates the loss suffered by the decision maker by deciding action a when Y = y. The decision maker uses a decision rule ψ : X →A to select an action a = ψ(x) from A based on an observation x ∈X. We will in general allow the decision rules to be random, i.e. ψ is random. The main purpose of extending to the space of randomized decision rules is to form a convex set of decision rules. Later in Theorem 1, this convexity is used to prove a saddle-point theorem. We call a (randomized) decision rule ψBayes a Bayes decision rule if for all decision rules ψ and for all x ∈X: E[L(Y, ψBayes(X))|X = x] ≤E[L(Y, ψ(X))|X = x]. It should be noted that ψBayes depends only on PY |X, i.e. it remains a Bayes decision rule under a different PX. The (unconditional) entropy of Y is defined as [5] H(Y ) := inf a∈A E[L(Y, a)]. (2) Similarly, we can define conditional entropy of Y given X = x as H(Y |X = x) := inf ψ E[L(Y, ψ(X))|X = x], (3) and the conditional entropy of Y given X as H(Y |X) := X x PX(x)H(Y |X = x) = inf ψ E[L(Y, ψ(X))]. (4) Note that H(Y |X = x) and H(Y | X) are both concave in PY |X. Applying Jensen’s inequality, this concavity implies that H(Y |X) ≤H(Y ), which motivates the following definition for the information that X carries about Y , I(X; Y ) := H(Y ) −H(Y |X), (5) i.e. the reduction of expected loss in predicting Y by observing X. In [9], the author has defined the same concept to which he calls a coherent dependence measure. It can be seen that I(X; Y ) = EPX[ D(PY |X, PY ) ] where D is the divergence measure corresponding to the loss L, defined for any two probability distributions PY , QY with Bayes actions aP , aQ as [5] D(PY , QY ) := EP [L(Y, aQ)] −EP [L(Y, aP )] = EP [L(Y, aQ)] −HP (Y ). (6) 3 2.2 Examples 2.2.1 Logarithmic loss For an outcome y ∈Y and distribution QY , define logarithmic loss as Llog(y, QY ) = −log QY (y). It can be seen Hlog(Y ), Hlog(Y |X), Ilog(X; Y ) are the well-known unconditional, conditional Shannon entropy and mutual information [10]. Also, the Bayes decision rule for a distribution PX,Y is given by ψBayes(x) = PY |X(·|x). 2.2.2 0-1 loss The 0-1 loss function is defined for any y, ˆy ∈Y as L0-1(y, ˆy) = I(ˆy ̸= y). Then, we can show H0-1(Y ) = 1 −max y∈Y PY (y), H0-1(Y |X) = 1 − X x∈X max y∈Y PX,Y (x, y). The Bayes decision rule for a distribution PX,Y is the well-known maximum a posteriori (MAP) rule, i.e. ψBayes(x) = argmaxy∈Y PY |X(y|x). 2.2.3 Quadratic loss The quadratic loss function is defined as L2(y, ˆy) = (y −ˆy)2. It can be seen H2(Y ) = Var(Y ), H2(Y |X) = E [Var(Y |X)], I2(X; Y ) = Var (E[Y |X]) . The Bayes decision rule for any PX,Y is the well-known minimum mean-square error (MMSE) estimator that is ψBayes(x) = E[Y |X = x]. 2.3 Principle of Maximum Conditional Entropy & Robust Bayes decision rules Given a distribution set Γ, consider the following minimax problem to find a decision rule minimizing the worst-case expected loss over Γ argmin ψ∈Ψ max P ∈Γ EP [L(Y, ψ(X))], (7) where Ψ is the space of all randomized mappings from X to A and EP denotes the expected value over distribution P. We call any solution ψ∗to the above problem a robust Bayes decision rule against Γ. The following results motivate a generalization of the maximum entropy principle to find a robust Bayes decision rule. Refer to the supplementary material for the proofs. Theorem 1.A. (Weak Version) Suppose Γ is convex and closed, and let L be a bounded loss function. Assume X, Y are finite and that the risk set S = { [L(y, a)]y∈Y : a ∈A } is closed. Then there exists a robust Bayes decision rule ψ∗against Γ, which is a Bayes decision rule for a distribution P ∗ that maximizes the conditional entropy H(Y |X) over Γ. Theorem 1.B. (Strong Version) Suppose Γ is convex and that under any P ∈Γ there exists a Bayes decision rule. We also assume the continuity in Bayes decision rules for distributions in Γ (See the supplementary material for the exact condition). Then, if P ∗maximizes H(Y |X) over Γ, any Bayes decision rule for P ∗is a robust Bayes decision rule against Γ. Principle of Maximum Conditional Entropy: Given a set of distributions Γ, predict Y based on a distribution in Γ that maximizes the conditional entropy of Y given X, i.e. argmax P ∈Γ H(Y |X) (8) Note that while the weak version of Theorem 1 guarantees only the existence of a saddle point for (7), the strong version further guarantees that any Bayes decision rule of the maximizing distribution results in a robust Bayes decision rule. However, the continuity in Bayes decision rules does not hold for the discontinuous 0-1 loss, which requires considering the weak version of Theorem 1 to address this issue. 4 3 Prediction via Maximum Conditional Entropy Principle Consider a prediction task with target variable Y and feature vector X = (X1, . . . , Xd). We do not require the variables to be discrete. As discussed earlier, the maximum conditional entropy principle reduces (7) to (8), which formulate steps 3 and 3a in Figure 1, respectively. However, a general formulation of (8) in terms of the joint distribution PX,Y leads to an exponential computational complexity in the feature dimension d. The key question is therefore under what structures of Γ( ˆP) in Step 2 we can solve (8) efficiently. In this section, we propose a specific structure for Γ( ˆP), under which we provide an efficient solution to Steps 3a and 3b in Figure 1. In addition, we prove a bound on the excess worst-case risk for the proposed Γ( ˆP). To describe this structure, consider a set of distributions Γ(Q) centered around a given distribution QX,Y , where for a given norm ∥· ∥, mapping vector θ(Y )t×1, Γ(Q) = { PX,Y : PX = QX , (9) ∀1 ≤i ≤t : ∥EP [θi(Y )X] −EQ [θi(Y )X] ∥≤ϵi }. Here θ encodes Y with t-dimensional θ(Y ), and θi(Y ) denotes the ith entry of θ(Y ). The first constraint in the definition of Γ(Q) requires all distributions in Γ(Q) to share the same marginal on X as Q; the second imposes constraints on the cross-moments between X and Y , allowing for some uncertainty in estimation. When applied to the supervised learning problem, we will choose Q to be the empirical distribution ˆP and select θ appropriately based on the loss function L. However, for now we will consider the problem of solving (8) over Γ(Q) for general Q and θ. To that end, we use a similar technique as in the Fenchel’s duality theorem, also used at [11, 12, 13] to address divergence minimization problems. However, we consider a different version of convex conjugate for −H, which is defined with respect to θ. Considering PY as the set of all probability distributions for the variable Y , we define Fθ : Rt →R as the convex conjugate of −H(Y ) with respect to the mapping θ, Fθ(z) := max P ∈PY H(Y ) + E[θ(Y )]T z. (10) Theorem 2. Define Γ(Q), Fθ as given by (9), (10). Then the following duality holds max P ∈Γ(Q) H(Y |X) = min A∈Rt×d EQ Fθ(AX) −θ(Y )T AX + t X i=1 ϵi∥Ai∥∗, (11) where ∥Ai∥∗denotes ∥· ∥’s dual norm of the A’s ith row. Furthermore, for the optimal P ∗and A∗ EP ∗[ θ(Y ) | X = x ] = ∇Fθ (A∗x). (12) Proof. Refer to the the supplementary material for the proof. When applying Theorem 2 on a supervised learning problem with a specific loss function, θ will be chosen such that EP ∗[ θ(Y ) | X = x ] provides sufficient information to compute the Bayes decision rule Ψ∗for P ∗. This enables the direct computation of ψ∗, i.e. step 3 of Figure 1, without the need to explicitly compute P ∗itself. For the loss functions discussed at Subsection 2.2, we choose the identity θ(Y ) = Y for the quadratic loss and the one-hot encoding θ(Y ) = [ I(Y = i) ]t i=1 for the logarithmic and 0-1 loss functions. Later in this section, we will discuss how this theorem applies to these loss functions. 3.1 Generalization Bounds for the Worst-case Risk By establishing the objective’s Lipschitzness and boundedness through appropriate assumptions, we can bound the rate of uniform convergence for the problem in the RHS of (11) [14]. Here we consider the uniform convergence of the empirical averages, when Q = ˆPn is the empirical distribution of n samples drawn i.i.d. from the underlying distribution ˜P, to their expectations when Q = ˜P. In the supplementary material, we prove the following theorem which bounds the excess worst-case risk. Here ˆψn and ˜ψ denote the robust Bayes decision rules against Γ( ˆPn) and Γ( ˜P), respectively. 5 Figure 3: Duality of Maximum Conditional Entropy/Maximum Likelihood in GLMs As explained earlier, by the maximum conditional entropy principle we can learn ˆψn by solving the RHS of (11) for the empirical distribution of samples and then applying (12). Theorem 3. Consider a loss function L with the entropy function H and suppose θ(Y ) includes only one element, i.e. t = 1. Let M = maxP ∈PY H(Y ) be the maximum entropy value over PY. Also, take ∥· ∥/∥· ∥∗to be the ℓp/ℓq pair where 1 p + 1 q = 1, 1 ≤q ≤2. Given that ∥X∥2 ≤B and |θ(Y )| ≤L, for any δ > 0 with probability at least 1 −δ max P ∈Γ( ˜ P ) E[L(Y, ˆψn(X))] − max P ∈Γ( ˜ P ) E[L(Y, ˜ψ(X))] ≤4BLM ϵ√n 1 + r 9 log(4/δ) 8 . (13) Theorem 3 states that though we learn the prediction rule ˆψn by solving the maximum conditional problem for the empirical case, we can bound the excess Γ-based worst-case risk. This result justifies the specific constraint of fixing the marginal PX across the proposed Γ(Q) and explains the role of the uncertainty parameter ϵ in bounding the excess worst-case risk. 3.2 A Minimax Interpretation of Generalized Linear Models We make the key observation that if Fθ is the log-partition function of an expoenetial-family distribution, the problem in the RHS of (11), when ϵi = 0 for all i’s, is equivalent to minimizing the negative log-likelihood for fitting a generalized linear model [15] given by • An exponential-family distribution p(y|η) = h(y) exp ηT θ(y) −Fθ(η) with the log-partition function Fθ and the sufficient statistic θ(Y ), • A linear predictor, η(X) = AX, • A mean function, E[ θ(Y )|X = x] = ∇Fθ(η(x)). Therefore, Theorem 2 reveals a duality between the maximum conditional entropy problem over Γ(Q) and the regularized maximum likelihood problem for the specified generalized linear model. As a geometric interpretation of this duality, by solving the regularized maximum likelihood problem in the RHS of (11), we in fact minimize a regularized KL-divergence argmin PY |X∈SF EQX[ DKL( QY |X || PY |X ) ] + t X i=1 ϵi∥Ai(PY |X)∥∗, (14) where SF = {PY |X(y|x) = h(y) exp( θ(y)T Ax−Fθ(Ax) | A ∈Rt×s} is the set of all exponentialfamily conditional distributions for the specified generalized linear model. This can be viewed as projecting Q onto (QX, SF ) (See Figure 3). Furthermore, for a label-invariant entropy H(Y ) the Bayes act for the uniform distribution UY leads to the same expected loss under any distribution on Y . Based on the divergence D’s definition in (6), maximizing H(Y |X) over Γ(Q) in the LHS of (11) is therefore equivalent to the following divergence minimization problem argmin PY |X: (QX,PY |X)∈Γ(Q) EQX[ D(PY |X, UY |X) ]. (15) 6 Here UY |X denotes the uniform conditional distribution over Y given any x ∈X. This can be interpreted as projecting the joint distribution (QX, UY |X) onto Γ(Q) (See Figure 3). Then, the duality shown in Theorem 2 implies the following corollary. Corollary 1. Given a label-invariant H, the solution to (14) also minimizes (15), i.e. (14) ⊆(15). 3.3 Examples 3.3.1 Logarithmic Loss: Logistic Regression To gain sufficient information for the Bayes decision rule under the logarithmic loss, for Y ∈Y = {1, . . . , t + 1}, let θ(Y ) be the one-hot encoding of Y , i.e. θi(Y ) = I(Y = i) for 1 ≤i ≤t. Here, we exclude i = t + 1 as I(Y = t + 1) = 1 −Pt i=1 I(Y = i). Then Fθ(z) = log 1+ t X j=1 exp(zj) , ∀1 ≤i ≤t : ∇Fθ(z) i = exp (zi) / 1+ t X j=1 exp(zj) , (16) which is the logistic regression model [16]. Also, the RHS of (11) will be the regularized maximum likelihood problem for logistic regression. This particular result is well-studied in the literature and straightforward using the duality shown in [17]. 3.3.2 0-1 Loss: Minimax SVM To get sufficient information for the Bayes decision rule under the 0-1 loss, we again consider the one-hot encoding θ described for the logarithmic loss. We show in the supplementary material that if ˜z = (z, 0) and ˜z(i) denotes the ith largest element of ˜z, Fθ(z) = max 1≤k≤t+1 k −1 + Pk j=1 ˜z(j) k . (17) In particular, if Y ∈Y = {−1, 1} is binary the dual problem (11) for learning the optimal linear predictor α∗given n samples (xi, yi)n i=1 will be min α 1 n n X i=1 max 0 , 1 −yiαT xi 2 , −yiαT xi + ϵ∥α∥∗. (18) The first term is the empirical risk of a linear classifier over the minimax-hinge loss max{0, 1−z 2 , −z} as shown in Figure 2. In contrast, the standard SVM is formulated using the hinge loss max{0, 1−z}: min α 1 n n X i=1 max 0 , 1 −yiαT xi + ϵ∥α∥∗, (19) We therefore call this classification approach the minimax SVM. However, unlike the standard SVM, the minimax SVM is naturally extended to multi-class classification. Using Theorem 1.A2, we prove that for 0-1 loss the robust Bayes decision rule exists and is randomized in general, where given the optimal linear predictor ˜z = (A∗x, 0) randomly predicts a label according to the following ˜z-based distribution on labels ∀1 ≤i ≤t + 1 : pσ(i) = ˜z(i) + 1 −Pkmax j=1 ˜z(j) kmax if σ(i) ≤kmax, 0 Otherwise. (20) Here σ is the permutation sorting ˜z in the ascending order, i.e. ˜zσ(i) = ˜z(i), and kmax is the largest index k satisfying Pk i=1[˜z(i) −˜z(k) ] < 1. For example, in the binary case discussed, the minimax SVM first solves (18) to find the optimal α∗and then predicts label y = 1 vs. label y = −1 with probability min 1 , max{0 , (1 + xT α∗)/2} . 2We show that given the specific structure of Γ(Q) Theorem 1.A holds whether X is finite or infinite. 7 Dataset mmSVM SVM DCC MPM TAN DRC adult 17 22 18 22 17 17 credit 12 16 14 13 17 13 kr-vs-kp 4 3 10 5 7 5 promoters 5 9 5 6 44 6 votes 3 5 3 4 8 3 hepatitis 17 20 19 18 17 17 Table 1: Methods Performance (error in %) 3.3.3 Quadratic Loss: Linear Regression Based on the Bayes decision rule for the quadratic loss, we choose θ(Y ) = Y . To derive Fθ, note that if we let PY in (10) include all possible distributions, the maximized entropy (variance for quadratic loss) and thus the value of Fθ would be infinity. Therefore, given a parameter ρ, we restrict the second moment of distributions in PY = {PY : E[Y 2] ≤ρ2} and then apply (10). We show in the supplementary material that an adjusted version of Theorem 2 holds after this change, and Fθ(z) −ρ2 = z2/4 if |z/2| ≤ρ ρ(|z| −ρ) if |z/2| > ρ, (21) which is the Huber function [18]. Given the samples of a supervised learning task if we choose the parameter ρ large enough, by solving the RHS of (11) when Fθ(z) is replaced with z2/4 and set ρ greater than maxi |A∗xi|, we can equivalently take Fθ(z) = z2/4 + ρ2. Then, by (12) we derive the linear regression model and the RHS of (11) is equivalent to – Least squares when ϵ = 0. – Lasso [19, 20] when ∥· ∥/∥· ∥∗is the ℓ∞/ℓ1 pair. – Ridge regression [21] when ∥· ∥is the ℓ2-norm. – (overlapping) Group lasso [22, 23] with the ℓ1,p penalty when ΓGL(Q) is defined, given subsets I1, . . . Ik of {1, . . . , d} and 1/p + 1/q = 1, as ΓGL(Q) = { PX,Y : PX = QX , (22) ∀1 ≤j ≤k : ∥EP Y XIj −EQ Y XIj ∥q ≤ϵj }. 4 Numerical Experiments We evaluated the performance of the minimax SVM on six binary classification datasets from the UCI repository, compared to these five benchmarks: Support Vector Machines (SVM) [24], Discrete Chebyshev Classifiers (DCC) [3], Minimax Probabilistic Machine (MPM) [2], Tree Augmented Naive Bayes (TAN) [25], and Discrete Rényi Classifiers (DRC) [4]. The results are summarized in Table 1 where the numbers indicate the percentage of error in the classification task. We implemented the minimax SVM by applying the subgradient descent to (18) with the regularizer λ∥α∥2 2. We determined the parameters by cross validation, where we used a randomly-selected 70% of the training set for training and the rest 30% for testing. We tested the values in {2−10, . . . , 210}. Using the tuned parameters, we trained the algorithm over all the training set and then evaluated the error rate over the test set. We performed this procedure in 1000 Monte Carlo runs each training on 70% of the data points and testing on the rest 30% and averaged the results. As seen in the table, the minimax SVM results in the best performance for five of the six datasets. To compare these methods in high-dimensional problems, we ran an experiment over synthetic data with n = 200 samples and d = 10000 features. We generated features by i.i.d. Bernoulli with P(Xi = 1) = 0.7, and considered y = sign(γT x + z) where z ∼N(0, 1). Using the above procedure, we evaluated 19.3% for the mmSVM, 19.5% error rate for SVM, 19.6% error rate for DRC, which indicates the mmSVM can outperform SVM and DRC in high-dimensional settings as well. Also, the average training time for training mmSVM was 0.085 seconds, faster than the training time for the SVM (using Matlab’s SVM command) with the average 0.105 seconds. Acknowledgments: We are grateful to Stanford University providing a Stanford Graduate Fellowship, and the Center for Science of Information (CSoI), an NSF Science and Technology Center under grant agreement CCF-0939370 , for the support during this research. 8 References [1] Vladimir Vapnik. The nature of statistical learning theory. Springer Science & Business Media, 2013. [2] Gert RG Lanckriet, Laurent El Ghaoui, Chiranjib Bhattacharyya, and Michael I Jordan. A robust minimax approach to classification. The Journal of Machine Learning Research, 3:555–582, 2003. [3] Elad Eban, Elad Mezuman, and Amir Globerson. Discrete chebyshev classifiers. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1233–1241, 2014. [4] Meisam Razaviyayn, Farzan Farnia, and David Tse. Discrete rényi classifiers. In Advances in Neural Information Processing Systems 28, pages 3258–3266, 2015. [5] Peter D. Grünwald and Philip Dawid. Game theory, maximum entropy, minimum discrepancy and robust bayesian decision theory. The Annals of Statistics, 32(4):1367–1433, 2004. [6] Edwin T Jaynes. Information theory and statistical mechanics. Physical review, 106(4):620, 1957. [7] Amir Globerson and Naftali Tishby. The minimum information principle for discriminative learning. In Proceedings of the 20th conference on Uncertainty in artificial intelligence, pages 193–200, 2004. [8] Vitaly Feldman, Venkatesan Guruswami, Prasad Raghavendra, and Yi Wu. Agnostic learning of monomials by halfspaces is hard. SIAM Journal on Computing, 41(6):1558–1590, 2012. [9] Philip Dawid. Coherent measures of discrepancy, uncertainty and dependence, with applications to bayesian predictive experimental design. Technical Report 139, University College London, 1998. http://www.ucl.ac.uk/Stats/research/abs94.html. [10] Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, 2012. [11] Yasemin Altun and Alexander Smola. Unifying divergence minimisation and statistical inference via convex duality. In Learning Theory: Conference on Learning Theory COLT 2006, Proceedings, 2006. [12] Miroslav Dudík, Steven J Phillips, and Robert E Schapire. Maximum entropy density estimation with generalized regularization and an application to species distribution modeling. Journal of Machine Learning Research, 8(6):1217–1260, 2007. [13] Ayse Erkan and Yasemin Altun. Semi-supervised learning via generalized maximum entropy. In AISTATS, pages 209–216, 2010. [14] Peter L Bartlett and Shahar Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3(Nov):463–482, 2002. [15] Peter McCullagh and John A Nelder. Generalized linear models, volume 37. CRC press, 1989. [16] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer, 2001. [17] Adam L Berger, Vincent J Della Pietra, and Stephen A Della Pietra. A maximum entropy approach to natural language processing. Computational linguistics, 22(1):39–71, 1996. [18] Peter J Huber. Robust Statistics. Wiley, 1981. [19] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [20] Scott Shaobing Chen, David L. Donoho, and Michael A. Saunders. Atomic decomposition by basis pursuit. SIAM Journal on Scientific Computing, 20(1):33–61, 1998. [21] Arthur E Hoerl and Robert W Kennard. Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1):55–67, 1970. [22] Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67, 2006. [23] Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. Group lasso with overlap and graph lasso. In Proceedings of the 26th annual international conference on machine learning, pages 433–440, 2009. [24] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3):273–297, 1995. [25] CK Chow and CN Liu. Approximating discrete probability distributions with dependence trees. Information Theory, IEEE Transactions on, 14(3):462–467, 1968. 9 | 2016 | 269 |
6,182 | Finding significant combinations of features in the presence of categorical covariates Laetitia Papaxanthos∗, Felipe Llinares-López∗, Dean Bodenham, Karsten Borgwardt Machine Learning and Computational Biology Lab D-BSSE, ETH Zurich *Equally contributing authors. Abstract In high-dimensional settings, where the number of features p is much larger than the number of samples n, methods that systematically examine arbitrary combinations of features have only recently begun to be explored. However, none of the current methods is able to assess the association between feature combinations and a target variable while conditioning on a categorical covariate. As a result, many false discoveries might occur due to unaccounted confounding effects. We propose the Fast Automatic Conditional Search (FACS) algorithm, a significant discriminative itemset mining method which conditions on categorical covariates and only scales as O(k log k), where k is the number of states of the categorical covariate. Based on the Cochran-Mantel-Haenszel Test, FACS demonstrates superior speed and statistical power on simulated and real-world datasets compared to the state of the art, opening the door to numerous applications in biomedicine. 1 Introduction In the last 10 years, the amount of data available is growing at an unprecedented rate. However, in many application domains, such as computational biology and healthcare, the amount of features is growing much faster than typical sample sizes. Therefore, statistical inference in high-dimensional spaces has become a tool of the utmost importance for practitioners in those fields. Despite the great success of approaches based on sparsity-inducing regularizers [16, 2], the development of methods to systematically explore arbitrary combinations of features and assess their statistical association with a target of interest has been less studied. Exploring all combinations of p features is equivalent to handling a 2p-dimensional space, thus combinatorial feature discovery exacerbates the challenges for statistical inference in high-dimensional spaces even for moderate p. Under the assumption that features and targets are binary random variables, recent work in the field of significant discriminative itemset mining offers tools to solve the computational and statistical challenges incurred by combinatorial feature discovery. However, all state-of-the-art approaches [15, 10, 13, 7, 8] share a key limitation: no method exists to assess the conditional association between feature combinations and the target. The ability to condition the associations on an observed covariate is fundamental to correct for confounding effects. If unaccounted for, one may find many false positives that are actually associated with the covariate and not the class of interest [17]. For example, in medical case/control association studies, it is common to search for combinations of genetic variants that are associated with a disease of interest. In this setting, the class labels are the health status of individuals, sick or healthy. The features represent binary genetic variants, encoded as 1 if the variant is altered and as 0 if not. Often, in high-order association studies, a subset of genetic variants are combined to form a binary variable whose value is 1 if the subset only contains altered genetic variants and is 0 otherwise. A subset of genetic variants is associated with the class label if the frequencies of altered combinations in each class are statistically different. However, it is often the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. case that the studied samples belong to several subpopulations, for example African-American, East Asian or European Caucasian, which show differences in the prevalence of some altered combinations of genetic variants because of systematic ancestry differences. When, additionally, the subpopulations clusters are unevenly distributed across classes, it can result in false associations to the disease of interest [12]. This is the reason why it is necessary to model ancestry differences between cases and controls in the presence of population structure or to correct for covariates in more general settings. Hence our goal in this article is to present the first approach to significant discriminative itemset mining that allows one to correct for a confounding categorical covariate. To reach this goal, we present the novel algorithm FACS, which enables significant discriminative itemset mining with categorical covariates through the Cochran-Mantel-Haenszel test [9] in O(k log k) time, where k is the number of states of the categorical covariate, compared to the standard implementation which is exponential in k. The rest of this article is organized as follows: In Section 2 we define the problem to be solved and introduce the main theoretical concepts from related work that FACS is based on, namely the Cochran-Mantel-Haenszel-test and Tarone’s testability criterion. In Section 3, we describe in detail our contribution, the FACS algorithm and its efficient implementation. Finally, Section 4 validates the performance of our method on a set of simulated and biomedical datasets. 2 Problem statement and related work In this section we introduce the necessary background, notation and terminology for the remainder of this article. First, in Section 2.1 we rigorously define the problem we solve in this paper. Next, in Sections 2.2 and 2.3 we describe two key elements on which our method is based: the CochranMantel-Haenszel (CMH) test and Tarone’s testability criterion. 2.1 Discovering significant feature combinations in the presence of a categorical covariate We consider a dataset of n observations D = {(ui, yi, ci)}n i=1, where the ith observation consists of: (I) a feature vector ui consisting of p binary features, ui,j ∈{0, 1} for j = 1, . . . , p; (II) a binary class label, yi ∈{0, 1}; and (III) a categorical covariate ci, which has k categories, i.e. ci ∈{1, 2, . . . , k}. Given any subset of features S ⊆{1, 2, . . . , p}, we define its induced feature combination for the ith observation as zi,S = Q j∈S ui,j, such that zi,S takes value 1 if and only if ui,j = 1 for all features in S. Now, we use ZS to denote the feature combination induced by S, of which zi,S is the realization for the ith observation. Similarly, we use Y to denote the label, and C to denote the covariate, of which yi and ci are realizations, respectively, for i = 1, 2, . . . , n. Below we use the standard notation A ⊥⊥B to denote “A is statistically independent of B”. Typically, significant discriminative itemset mining aims to find all feature subsets S for which a statistical association test rejects the null hypothesis, namely ZS ⊥⊥Y , after a rigorous correction for multiple hypothesis testing. However, for any feature subset such that ZS ̸⊥⊥Y but ZS ⊥⊥Y | C, the association between ZS and Y is exclusively mediated by the covariate C, which acts in this case as a confounder creating spurious associations. Our goal: In this work, the aim is to find all feature subsets S for which a statistical association test rejects the null hypothesis ZS ⊥⊥Y | C, thus allowing to correct for a confounding categorical covariate while keeping the computational efficiency, statistical power and the ability to correct for multiple hypothesis testing of existing methods. In the remainder of this section we will introduce two fundamental concepts our work relies upon. The first one is the Cochran-Mantel-Haenszel (CMH) test, which offers a principled way to test if a feature combination ZS is conditionally dependent on the class labels Y given the covariate C, that is, to test the null hypothesis ZS ⊥⊥Y | C. The second concept is Tarone’s testability criterion, which allows a correction for multiple hypothesis testing while retaining large statistical power, in scenarios such as ours where billions or trillions of association tests must be performed. Tarone’s testability criterion has only been successfully applied to unconditional association tests, such as Fisher’s exact test [6] or Pearson’s χ2 test [11]. Thus, the state-of-the-art in significant discriminative itemset mining forces one to choose between: (a) using Bonferroni’s correction, resulting in very low statistical power or an arbitrary limit in the cardinality of feature subsets (e.g. [18]), or (b) using Tarone’s testability criterion, losing the ability to account for covariates and resulting in potentially many confounded patterns being deemed significant [15, 13, 7, 8]. 2 Our contribution: In this paper, we propose FACS, a novel algorithm that allows applying Tarone’s testability criterion to the CMH test, allowing to correct for a categorical covariate in significant discriminative itemset mining for the first time. FACS will be introduced in detail in Section 3. 2.2 Conditional association testing with the Cochran-Mantel-Haenszel (CMH) test To test if ZS ⊥⊥Y | C, the CMH test [9] arranges the n realisations of {(zi,S, yi, ci)}n i=1 into k distinct 2 × 2 contingency tables, one table for each possible value of the covariate c, as: Variables zS = 1 zS = 0 Row totals y = 1 aS,j n1,j −aS,j n1,j y = 0 xS,j −aS,j n2,j −xS,j + aS,j n2,j Col totals xS,j nj −xS,j nj where: (I) nj is the number of observations with c = j, n1,j of which have class label y = 1 and n2,j of which have class label y = 0; (II) xS,j is the number of observations with c = j and zi,S = 1; (III) aS is the number of observations with c = j, class label y = 1 and zi,S = 1. Based on {nj, n1,j, xS,j, aS,j}k j=1, a p-value pS for feature combination ZS is computed as: pS = 1 −Fχ2 1 Pk j=1 aS,j − xS,jn1,j nj 2 Pk j=1 n1,j nj 1 − n1,j nj xS,j 1 − xS,j nj (1) where Fχ2 1(·) is the distribution function of a χ2 random variable with 1 degree of freedom. Finally, the feature combination ZS and its corresponding feature subset S will be deemed significantly associated if the p-value pS falls below a corrected significance threshold δ, that is, if pS ≤δ. The CMH test can be understood as a form of meta-analysis applied to k disjoint datasets {Dj}k j=1, where Dj = {(ui, yi) | ci = j} contains only observations for which the covariate c takes value j. For confounded feature combinations, the association might be large in the entire dataset D, but small for conditional datasets Dj. Thus, the CMH test will not deem such feature combinations significant. 2.3 The multiple testing problem in discriminative itemset mining In our setup, one must perform 2p −1 association tests, one for each possible subset of features. Even for moderate p, this leads to an enormous number of tests, resulting in a large multiple hypothesis testing problem. To produce statistically reliable results, the significance threshold δ will be chosen to guarantee that the Family-Wise Error Rate (FWER), defined as the probability of producing any false positives, is upper-bounded by a significance level α. FWER control is most commonly achieved with Bonferroni’s correction [3, 5], which in our setup would imply using δ = α/(2p −1) as significance threshold. However, Bonferroni’s correction tends to be overly conservative, resulting in very low statistical power when the number of tests performed is large. In contrast, recent work in significant discriminative itemset mining [15, 10, 13, 7] showed that, in this setting, Bonferroni’s correction can be outperformed in terms of statistical power by Tarone’s testability criterion [14]. Tarone’s testability criterion is based on the observation that, for some discrete test statistics based on contingency tables, a minimum attainable p-value can be computed as a function of the table margins. Let Ψ(S) denote the minimum attainable p-value corresponding to the contingency table of feature combination ZS. By definition, pS ≥Ψ(S), therefore Ψ(S) > δ implies that feature combination ZS can never be deemed significantly associated, and hence it cannot cause a false positive. In other words, feature subsets S for which Ψ(S) > δ are irrelevant as far as the FWER is concerned. In Tarone’s terminology, S is said to be untestable. Thus, defining the set of testable feature subsets at level δ as IT (δ) = {S| Ψ(S) ≤δ}, Tarone’s testability criterion obtains the corrected significance threshold as δtar = max {δ : FWERtar(δ) ≤α}, where FWERtar(δ) = δ|IT (δ)|. Note that this amounts to applying a Bonferroni correction to feature subsets S in IT (δ) only. FWER control follows from the fact that untestable feature subsets cannot affect the FWER. Since in practice |IT (δ)| ≪2p −1, Tarone’s testability criterion often outperforms Bonferroni’s correction in terms of statistical power by a large margin. The main practical limitation of Tarone’s testability criterion is its computational complexity. Naively computing δtar would involve explicitly enumerating all 2p −1 feature subsets and evaluating their respective minimum attainable p-values, something unfeasible even for moderate p. Existing work in significant discriminative pattern mining solves that limitation by exploiting specific properties of 3 certain test statistics, such as Fisher’s Exact Test or Pearson’s χ2 test, that allow to apply branch-andbound algorithms to evaluate δtar. However, the properties those algorithms rely on do not apply to conditional statistical association tests, such as the CMH test. In the next section, we present in detail our novel approach to apply Tarone’s method to the CMH test. 3 Our contribution: The FACS algorithm This section introduces the Fast Automatic Conditional Search (FACS) algorithm, the first approach that allows the application of Tarone’s testability criterion to the CMH test in a computationally efficient manner. Section 3.1 discusses the main challenges facing FACS and summarizes how FACS improves the state of the art. Section 3.2 provides a high-level description of the algorithm. Finally, Sections 3.3 and 3.4 detail the two key steps of FACS, which are also the main algorithmic contributions of this work. 3.1 Overview and Contributions The main objective of the FACS algorithm, described in Section 3.2 below, can be summarised as: Objective: Given a dataset D = {(ui, yi, ci)}n i=1, the goal of FACS is to: 1. Compute Tarone’s corrected significance threshold δtar. 2. Retrieve all feature subsets S whose p-value pS is below δtar. For both (1) and (2), the test statistic of choice will be the CMH test, thus allowing to correct for a confounding categorical covariate as described in Section 2.2. The key contribution of our work is to bridge the gap between Tarone’s testability criterion and the CMH test. Firstly, in Section 3.3, we show for the first time that Tarone’s method can be applied to the CMH test. More importantly, in Section 3.4 we introduce a novel branch-and-bound algorithm to efficiently compute δtar without requiring the function Ψ computing Tarone’s minimum attainable p-value to be monotonic. This allows us not only to apply Tarone’s testability criterion to the CMH test, but to do so as efficiently as existing methods not able to handle confounding covariates do. 3.2 High-level description of FACS As shown in the pseudocode in Algorithm 1, conceptually, FACS performs two main operations: Algorithm 1 FACS Input: Dataset D = {(ui, yi, ci)}n i=1, target FWER α Output: {S | pS ≤δtar} 1: Initialize global variables δtar = 1 and IT (δtar) = ∅ 2: δtar, IT (δtar) ←tarone_cmh(∅) 3: Return {S ∈IT (δtar) | pS ≤δtar} Algorithm 2 tarone_cmh Input: Current feature subset being processed S 1: if is_testable_cmh(S, δtar) then {see Section 3.3} 2: Append S to IT (δtar) 3: FWERtar(δtar) ←δtar|IT (δtar)| 4: while FWERtar(δtar) > α do 5: Decrease δtar 6: IT (δtar) ← S ∈IT (δtar) : is_testable(S, δtar) 7: FWERtar(δtar) ←δtar|IT (δtar)| 8: if not is_prunable_cmh(S, δtar) then {see 3.4} 9: for S′ ∈Children(S) do 10: tarone_cmh(S′) Firstly, Line 2 invokes the routine tarone_cmh, described in Algorithm 2. This routine uses our novel branch-and-bound approach to efficiently compute Tarone’s corrected significance threshold δtar and the set of testable feature subsets IT (δtar). Secondly, using the significance threshold δtar obtained in the previous step, Line 3 evaluates the conditional association of the feature combination ZS of each testable feature subset S ∈IT (δtar) with the class labels, given the categorical covariate, using the CMH test as shown in Section 2.2. Note that, according to Tarone’s testability criterion, untestable feature subsets S ̸∈IT (δtar) cannot be significant and therefore do not need to be considered in this step. Since in practice |IT (δtar)| ≪ 2p −1, the procedure tarone_cmh is the most critical part of FACS. The routine tarone_cmh uses the enumeration scheme first proposed in [10, 13]. All 2p feature subsets are arranged in an enumeration tree such that S′ ∈Children(S) ⇒S ⊂S′. In other words, 4 the children of a feature subset S in the enumeration tree are obtained by adding an additional feature to S. Before invoking tarone_cmh, in Line 1 of Algorithm 1 the significance threshold δtar is initialized to 1, the largest value it can take, and the set of testable feature combinations IT (δtar) is initialized to the empty set. The enumeration procedure is started by calling tarone_cmh with the empty feature subset S = ∅, which acts as the root of the enumeration tree1. All 2p −1 non-empty feature subsets will then be explored recursively by traversing the enumeration tree depth-first. Every time a feature subset S in the tree is visited, Line 1 of Algorithm 2 checks if it is testable, as detailed in Section 3.3. If it is, S is appended to the set of testable feature subsets IT (δtar) in Line 2. The FWER condition for Tarone’s testability criterion is checked in Lines 3 and 4. If it is found to be violated, the significance threshold δtar is decreased in Line 5 until the condition is satisfied again, removing from IT (δtar) any feature subsets made untestable by decreasing δtar in Line 6 and re-evaluating the FWER condition accordingly in Line 7. Before continuing the traversal of the tree by exploring the children of the current feature subset S, Line 8 checks if our novel pruning criterion applies, as described in Section 3.4. Only if it does not apply are all children of S visited recursively in Lines 9 and 10. The testability and pruning conditions in Lines 1 and 8 become more stringent as δtar decreases. Because of this, as δtar decreases along the enumeration procedure (see Line 5), increasingly larger parts of the search space are pruned. Thus, the algorithm terminates when, for the current value of δtar and IT (δtar), all feature subsets that cannot be pruned have been visited. The two most challenging steps in FACS are the design of an appropriate testability criterion, is_testable_cmh(S, δ), and an efficient pruning criterion, is_prunable_cmh(S, δ), that circumvent the limitations of the current state of the art. These are now each described in detail. 3.3 A testability criterion for the CMH test As mentioned in Section 2.3, Tarone’s testability criterion has only been applied to test statistics such as Fisher’s exact test, Pearson’s χ2 test and the Mann-Whitney U Test, none of which allows for incorporating covariates. However, the following proposition shows that the CMH test also has a minimum attainable p-value Ψcmh(S): Proposition 1 The CMH test has a minimum attainable p-value Ψcmh(S), which can be computed in O(k) time as a function of the margins {nj, n1,j, xS,j}k j=1 of the k 2 × 2 contingency tables. The proof of Proposition 1, provided in the Supp. Material, involves showing that Ψcmh(S) can be computed from the k 2 × 2 contingency tables corresponding to ZS (see Section 2.2) by optimising the p-value pS with respect to {aS,j}k j=1 while keeping the table margins {nj, n1,j, xS,j}k j=1 fixed. 3.4 A pruning criterion for the CMH test State-of-the-art methods [15, 8], all of which are limited to unconditional association testing, exploit the fact that the minimum attainable p-value function Ψ(S), using either Fisher’s exact test or Pearson’s χ2 test on a single contingency table, obeys a simple monotonicity property: S ⊆S′ ⇒ Ψ(S) ≤Ψ(S′) provided that xS ≤min(n1, n2). This leads to a remarkably simple pruning criterion: if a feature subset S is non-testable, i.e. Ψ(S) > δ, and its support xS is smaller or equal to min(n1, n2), then all children S′ of S, which satisfy S ⊂S′ by construction of the enumeration tree, will also be non-testable and can be pruned from the search space. However, such a monotonicity property does not hold for the CMH minimum attainable p-value function Ψcmh(S), severely complicating the development of an effective pruning criterion. In Section 3.4.1 we show how to circumvent this limitation by introducing a novel pruning criterion based on defining a monotonic lower envelope eΨcmh(S) ≤Ψcmh(S) of the original minimum attainable p-value function Ψcmh(S) and prove that it leads to a valid pruning strategy. Finally, in Section 3.4.2, we provide an efficient algorithm to evaluate eΨcmh(S) in O(k log k) time, instead of a naive implementation whose computational complexity would scale exponentially with k, the number of categories for the covariate. Due to space constraints, all proofs are in the Supp. Material. 3.4.1 Definition and correctness of the pruning criterion As mentioned above, existing unconditional significant discriminative pattern mining methods only consider feature subsets S with support xS ≤min(n1, n2) to be potentially prun1We define zi,∅= 1 for all observations, so this artificial feature combination will never be significant. 5 able. Analogously, we consider as potentially prunable the set of feature subsets IP P = {S | xS,j ≤min(n1,j, n2,j) ∀j = 1, . . . , k}. Note that for k = 1, our definition reduces to that of existing work. In itemset mining, a very large proportion of all feature subsets will have small supports. Therefore, restricting the application of the pruning criterion to potentially prunable patterns does not cause a loss of performance in practice. We can now state the definition of the lower envelope for the CMH minimum attainable p-value: Definition 1 Let S ∈IP P be a potentially prunable feature subset. The lower envelope eΨcmh(S) is defined as eΨcmh(S) = min {Ψcmh(S′) | S′ ⊇S}. Note that, by construction, eΨcmh(S) satisfies eΨcmh(S) ≤Ψcmh(S) for all feature subsets S in the set of potentially prunable patterns. Next, we show that unlike for the minimum attainable p-value function Ψcmh(S), the monotonicity property holds for the lower envelope eΨcmh(S): Lemma 1 Let S, S′ ∈IP P be two potentially prunable feature subsets such that S ⊆S′. Then, eΨcmh(S) ≤eΨcmh(S′) holds. Next, we state the main result of this section, which establishes our search space pruning criterion: Theorem 1 Let S ∈IP P be a potentially prunable feature subset such that eΨcmh(S) > δ. Then, Ψcmh(S′) > δ for all S′ ⊇S, i.e. all feature subsets containing S are non-testable at level δ and can be pruned from the search space. To summarize, the pruning criterion is_prunable_cmh in Line 8 of Algorithm 2 evaluates to true if and only if S ∈IP P ⇔xS,j ≤min(n1,j, n2,j) ∀j = 1, . . . , k and eΨcmh(S) > δtar. 3.4.2 Evaluating the pruning criterion in O(k log k) time In FACS, the pruning criterion stated above will be applied to all enumerated feature subsets. Hence, it is mandatory to have an efficient algorithm to compute the lower envelope for the CMH minimum attainable p-value eΨcmh(S) for any potentially prunable feature subset S ∈IP P . As shown in the proof of Proposition 1 in the Supp. Material, Ψcmh(S) depends on the pattern S through its k-dimensional vector of supports xS = (xS,1, . . . , xS,k). Also, the condition S′ ⊇S implies that xS′,j ≤xS,j ∀j = 1, . . . , k. As a consequence, one can rewrite Definition 1 as eΨcmh(S) = min xS′≤xSΨcmh(xS′), where the vector inequality xS′ ≤xS holds component-wise. Thus, naively computing eΨ(S) would require optimizing Ψcmh over a set of size Qk j=1 xS,j = O(mk), where m is the geometric mean of {xS,j}k j=1. This scaling is clearly impractical, as even for moderate k it would result in an overhead large enough to outweigh the benefits of pruning. Because of this, in the remainder of this section we propose the last key part of FACS: an efficient algorithm which evaluates eΨ(S) in only O(k log(k)) time. We will arrive at our final result in two steps, contained in Lemma 2 and Theorem 2. Lemma 2 Let S ∈IP P be a potentially prunable feature subset. The optimum x∗ S′ of the discrete optimization problem min xS′≤xSΨcmh(xS′) satisfies x∗ S′,j = 0 or x∗ S′,j = xS,j for each j = 1, . . . , k. In short, Lemma 2 shows that the optimum x∗ S′ = {Ψcmh(xS′) | xS′ ≤xS} of the discrete optimization problem defining eΨ(S) is always a vertex of the discrete hypercube J0, xSK. Thus, the computational complexity of evaluating eΨcmh(S) can be reduced from O(mk) to O(2k), where m ≫2 for most patterns. Finally, building upon the result of Lemma 2, Theorem 2 below shows that one can in fact find the optimal vertex out of all O(2k) vertices in O(k log k) time. Theorem 2 Let S ∈IP P be a potentially testable feature subset and define βl S,j = n2,j nj 1 −xS,j nj and βr S,j = n1,j nj 1 −xS,j nj for j = 1, . . . , k. Let πl and πr be permutations πl, πr : J1, kK 7→ J1, kK such that βl S,πl(1) ≤. . . ≤βl S,πl(k) and βr S,πr(1) ≤. . . ≤βr S,πr(k), respectively. Then, there exists an integer κ ∈J1, kK such that the optimum x∗ S′ = arg min xS′≤xS Ψcmh(xS′) satisfies one of the two possible conditions: (I) x∗ S′,πl(j) = xS,πl(j) for all j ≤κ and x∗ S′,πl(j) = 0 for all j > κ or (II) x∗ S′,πr(j) = xS,πr(j) for all j ≤κ and x∗ S′,πr(j) = 0 for all j > κ. 6 102 103 104 105 106 Number of features 1.(a) 10-2 10-1 100 101 102 103 104 105 106 107 108 109 1010 Runtime (in seconds) One day 100 days One year FACS 2k-CMH mk-CMH Bonf-CMH LAMP-χ2 0 5 10 15 20 25 30 Number of categories k 1.(b) 100 101 102 103 104 105 106 107 Runtime (in seconds) One day 100 days 0.0 0.2 0.4 0.6 0.8 1.0 Strength ρ 1.(c) 0.0 0.2 0.4 0.6 0.8 1.0 Precision 0.0 0.2 0.4 0.6 0.8 1.0 Strength ρ 1.(d) 0.0 0.2 0.4 0.6 0.8 1.0 False positive detection FACS-CMH LAMP-χ2 Bonf-CMH Figure 1: (a) Runtime as a function of the number of features, p. (b) Runtime as a function of the number of categories of the covariate, k. (c) Precision as a function of the true signal strengh, ρtrue. (d) False detection proportion as a function of the strength of the signal ρconf. n = 200 samples were used in (a), (b) and n = 500 in (c), (d). Also, we set ρtrue = ρconf = ρ. In summary, Theorem 2 above implies that the 2k candidates to be the optimum x∗ S′ according to Lemma 2 can be narrowed down to only 2k vertices: k candidates satisfying the first condition and k the second condition. Moreover, evaluating Ψcmh for all k candidates satisfying the first condition (resp. the second condition) can be done in O(k) time rather than O(k2). This is due to the fact that each of the k candidate vertices for each condition can be obtained by changing a single dimension with respect to the previous one. Therefore, the operation dominating the computational complexity is the sorting of the two k-vectors (βl S,1, . . . , βl S,k) and (βr S,1, . . . , βr S,k). As a consequence, the runtime required to evaluate the lower envelope eΨcmh(S), and thus our novel pruning criterion is_prunable_cmh, scales as O(k log k) with the number of categories of the covariate. 4 Experiments In Section 4.1 we describe a set of experiments on simulated datasets, evaluating the performance of FACS in terms of runtime, precision and its ability to correct for confounding. Next, in Section 4.2, we use our method in two applications in computational biology. Due to space constraints, only a high-level summary of the experimental setup and results will be presented here. Additional details can be found in the Supp. Material and code for FACS is available on GitHub2. 4.1 Runtime and power comparisons on simulated datasets We compare FACS with four significant discriminative itemset mining methods: LAMP-χ2, Bonf-CMH, 2k-FACS and mk-FACS. (1) LAMP-χ2 [15, 10] is the state-of-the-art in significant discriminative itemset mining. It uses Tarone’s testability criterion but is based on Pearson’s χ2 test and thus cannot account for covariates; (2) Bonf-CMH uses the CMH test, being able to correct for confounders, but uses Bonferroni’s correction, resulting in a considerable loss of statistical power; (3) and (4) 2k-FACS and mk-FACS are two suboptimal versions of FACS, which implement the pruning criterion using the approach shown in Lemma 2, which scales as O(2k), or via brute-force search, scaling as O(mk). Runtime evaluations: Figure 1(a) shows that FACS scales as the state-of-the-art LAMP-χ2 when increasing the number of features p, while the Bonferroni-based method Bonf-CMH scales considerably worse. This indicates both that FACS is able to correct for covariates with virtually no runtime overhead with respect to LAMP-χ2 and confirms the efficacy of Tarone’s testability criterion. Figure 1(b) shows that FACS can handle categorical covariates of high-cardinality k with almost no overhead, in contrast to mk-FACS and 2k-FACS which are only applicable for low k. This demonstrates the importance of our efficient implementation of the pruning criterion. Precision and false positive detection evaluations: We generated synthetic datasets with one truly associated feature subset Strue and one confounded feature subset Sconf to evaluate precision and ability to correct for confounders. Figure 1(c) shows that FACS has a similar precision as LAMP-χ2, being slightly worse for weak signals and slightly better for stronger signals. Again, the performance of the Bonferroni-based method Bonf-CMH is drastically worse. Most importantly, Figure 1(d) indicates that unlike LAMP-χ2, FACS has the ability to greatly reduce the false positive detection by conditioning on an appropriate categorical covariate. 2https://github.com/BorgwardtLab/FACS 7 Table 1: Total number of significant combinations (hits) found by LAMP-χ2, FACS and BONF-CMH and average genomic inflation factor λ. λ for BONF-CMH is similar to FACS since both use the CMH test. Datasets FACS LAMP-χ2 BONF-CMH hits λ hits λ hits LY 433 1.17 100,883 3.18 19 avrB 43 1.21 546 2.38 1 4.2 Applications to computational biology In this section, we look for significant feature combinations in two widely investigated biological applications: Genome-Wide Association Studies (GWAS), using two A. thaliana datasets, and a study of combinatorial regulation of gene expression in breast cancer cells. A. thaliana GWAS: We apply FACS, LAMP-χ2 and Bonf-CMH to two datasets from the plant model organism A. thaliana [1], which contain 84 and 95 samples, respectively. The labels of each dataset indicate the presence/absence of a plant defense-related phenotype: LY and avrB. In the two datasets, each plant sample is represented by a sequence of approximately 214, 000 genetic bases. The genetic bases are encoded as binary features which indicate if the base at a specific locus is standard or altered. To minimize the effect of the evolutionary correlations between nearby bases (< 10 kilo-bases), we downsampled each of the five chromosomes of each dataset, evenly by a factor of 20, using 20 different offsets. It resulted in complementary datasets containing between 1, 423 and 2, 661 features. Our results for all methods are aggregated across all downsampled versions. In GWAS, one needs to correct for the confounding effect of population structure to avoid many spurious associations. For both datasets we condition on the ancestry, resulting in k = 5 and k = 3 categories for the covariate. Table 1 shows the number of feature combinations (c.f. Section 2.1) reported as significant by each method, as well as the corresponding genomic inflation factor λ [4], a popular criterion in statistical genetics to quantify confounding. When compared to LAMP-χ2, we observe a severe reduction in the number of feature combinations deemed significant by FACS, as well as a sharp decrease in λ. This strongly indicates that many feature combinations reported by LAMP-χ2 are affected by confounding. The λ values of LAMP-χ2 show strong marginal associations between many feature combinations and labels, inflating the corresponding Pearson χ2-test statistic values compared to the expected χ2 null distribution and resulting in many spurious associations. However, since most of those feature combinations are independent of the labels given the covariates, the CMH test statistics values are much closer to the χ2 distribution, leading to a lower λ and resulting in hits that are corrected for the covariate. Moreover, the lack of power of BONF-CMH results in a very small number of hits. Combinatorial regulation of gene expression in breast cancer cells: The breast cancer data set, as used in [15], includes 12, 773 genes classified into up-regulated or not up-regulated. Each gene is represented by 397 binary features which indicate the presence/absence of a sequence motif in the neighborhood of this gene. We aim to find combinations of motifs that are enriched in up-regulated genes. Two sets of experiments were conducted, conditioning on 8 and 16 categories respectively. In this case, the covariate groups together genes sharing similar sets of motifs. As previously, LAMP-χ2 reports 1, 214 motif combinations as significant, while FACS reports only 26 — a reduction of over 97%. Further studies shown in the Supp. Material strongly suggest that most motif combinations found by LAMP-χ2 but not FACS are indeed due to confounding. 5 Conclusions This article has presented FACS, the first approach to significant discriminative itemset mining that (i) allows to condition on a categorical covariate, (ii) corrects for the inherent multiple testing problem and (iii) retains high statistical power. Furthermore, we (iv) proved that the runtime of FACS scales as O(k log k), where k is the number of states of the categorical covariate. Regarding future work, generalizing the state-of-the-art to handle continuous data is a key open problem in significant discriminative itemset mining. Solving it would greatly help make the framework applicable to new domains. Another interesting improvement would be to combine FACS with the approach in [8]. In their work, Tarone’s testability criterion is used along with permutation-testing to increase statistical power by taking the redundancy between feature combinations into account. By using a similar approach in combination with the CMH test, one could further increase statistical power while retaining the ability to correct for a categorical covariate. Acknowledgments: This work was funded in part by the SNSF Starting Grant ‘Significant Pattern Mining’ (KB) and the Marie Curie ITN MLPM2012, Grant No. 316861 (KB, FLL). 8 References [1] S. Atwell, Y. S. Huang, B. J. Vilhjálmsson, G. Willems, M. Horton, Y. Li, D. Meng, A. Platt, A. M. Tarone, T. T. Hu, et al. Genome-wide association study of 107 phenotypes in arabidopsis thaliana inbred lines. Nature, 465(7298):627–631, 2010. [2] C.-A. Azencott, D. Grimm, M. Sugiyama, Y. Kawahara, and K. M. Borgwardt. Efficient network-guided multi-locus association mapping with graph cuts. Bioinformatics, 29(13):i171–i179, 2013. [3] C. E. Bonferroni. Teoria statistica delle classi e calcolo delle probabilità. Pubblicazioni del R Istituto Superiore di Scienze Economiche e Commerciali di Firenze, 8:3–62, 1936. [4] B. Devlin and K. Roeder. Genomic control for association studies. Biometrics, 55(4):997–1004, 1999. [5] O. J. Dunn. Estimation of the medians for dependent variables. Ann. Math. Statist., 30(1):192–197, 03 1959. [6] R. A. Fisher. On the Interpretation of χ2 from Contingency Tables, and the Calculation of P. Journal of the Royal Statistical Society, 85(1):87–94, 1922. [7] F. Llinares-López, D. Grimm, D. A. Bodenham, U. Gieraths, M. Sugiyama, B. Rowan, and K. M. Borgwardt. Genome-wide detection of intervals of genetic heterogeneity associated with complex traits. Bioinformatics, 31(12):240–249, 2015. [8] F. Llinares-López, M. Sugiyama, L. Papaxanthos, and K. M. Borgwardt. Fast and Memory-Efficient Significant Pattern Mining via Permutation Testing. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Sydney, 2015, pages 725–734. ACM, 2015. [9] N. Mantel and W. Haenszel. Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22(4):719, 1959. [10] S. Minato, T. Uno, K. Tsuda, A. Terada, and J. Sese. A fast method of statistical assessment for combinatorial hypotheses based on frequent itemset enumeration. In ECMLPKDD, volume 8725 of LNCS, pages 422–436, 2014. [11] K. Pearson. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can reasonable be supposed to have arisen from random sampling. Philosophical Magazine, 50:157–175, 1900. [12] A. L. Price, N. J. Patterson, R. M. Plenge, M. E. Weinblatt, N. A. Shadick, and D. Reich. Principal components analysis corrects for stratification in genome-wide association studies. Nat Genet, 38(8):904– 909, 08 2006. [13] M. Sugiyama, F. Llinares López, N. Kasenburg, and K. M. Borgwardt. Mining significant subgraphs with multiple testing correction. In SIAM Data Mining (SDM), 2015. [14] R. E. Tarone. A modified bonferroni method for discrete data. Biometrics, 46(2):515–522, 1990. [15] A. Terada, M. Okada-Hatakeyama, K. Tsuda, and J. Sese. Statistical significance of combinatorial regulations. Proceedings of the National Academy of Sciences, 110(32):12996–13001, 2013. [16] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [17] B. J. Vilhjálmsson and M. Nordborg. The nature of confounding in genome-wide association studies. Nature Reviews Genetics, 14(1):1–2, Jan. 2013. [18] G. Webb. Discovering significant rules. In Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, 2006, pages 434 – 443. ACM, 2006. 9 | 2016 | 27 |
6,183 | Blazing the trails before beating the path: Sample-efficient Monte-Carlo planning Jean-Bastien Grill Michal Valko SequeL team, INRIA Lille - Nord Europe, France jean-bastien.grill@inria.fr michal.valko@inria.fr Rémi Munos Google DeepMind, UK∗ munos@google.com Abstract You are a robot and you live in a Markov decision process (MDP) with a finite or an infinite number of transitions from state-action to next states. You got brains and so you plan before you act. Luckily, your roboparents equipped you with a generative model to do some Monte-Carlo planning. The world is waiting for you and you have no time to waste. You want your planning to be efficient. Sample-efficient. Indeed, you want to exploit the possible structure of the MDP by exploring only a subset of states reachable by following near-optimal policies. You want guarantees on sample complexity that depend on a measure of the quantity of near-optimal states. You want something, that is an extension of Monte-Carlo sampling (for estimating an expectation) to problems that alternate maximization (over actions) and expectation (over next states). But you do not want to StOP with exponential running time, you want something simple to implement and computationally efficient. You want it all and you want it now. You want TrailBlazer. 1 Introduction We consider the problem of sampling-based planning in a Markov decision process (MDP) when a generative model (oracle) is available. This approach, also called Monte-Carlo planning or MonteCarlo tree search (see e.g., [12]), has been popularized in the game of computer Go [7, 8, 15] and shown impressive performance in many other high dimensional control and game problems [4]. In the present paper, we provide a sample complexity analysis of a new algorithm called TrailBlazer. Our assumption about the MDP is that we possess a generative model which can be called from any state-action pair to generate rewards and transition samples. Since making a call to this generative model has a cost, be it a numerical cost expressed in CPU time (in simulated environments) or a financial cost (in real domains), our goal is to use this model as parsimoniously as possible. Following dynamic programming [2], planning can be reduced to an approximation of the (optimal) value function, defined as the maximum of the expected sum of discounted rewards: E hP t≥0 γtrt i , where γ ∈[0, 1) is a known discount factor. Indeed, if an ε-optimal approximation of the value function at any state-action pair is available, then the policy corresponding to selecting in each state the action with the highest approximated value will be O (ε/ (1 −γ))-optimal [3]. Consequently, in this paper, we focus on a near-optimal approximation of the value function for a single given state (or state-action pair). In order to assess the performance of our algorithm we measure its sample complexity defined as the number of oracle calls, given that we guarantee its consistency, i.e., that with probability at least 1 −δ, TrailBlazer returns an ε-approximation of the value function as required by the probably approximately correct (PAC) framework. ∗on the leave from SequeL team, INRIA Lille - Nord Europe, France 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. We use a tree representation to represent the set of states that are reachable from any initial state. This tree alternates maximum (MAX) nodes (corresponding to actions) and average (AVG) nodes (corresponding to the random transition to next states). We assume the number K of actions is finite. However, the number N of possible next states is either finite or infinite (which may be the case when the state space is infinite), and we will report results in both the finite N and the infinite case. The root node of this planning tree represents the current state (or a state-action) of the MDP and its value is the maximum (over all policies defined at MAX nodes) of the corresponding expected sum of discounted rewards. Notice that by using a tree representation, we do not use the property that some state of the MDP can be reached by different paths (sequences of states-actions). Therefore, this state will be represented by different nodes in the tree. We could potentially merge such duplicates to form a graph instead. However, for simplicity, we choose not to merge these duplicates and keep a tree, which could make the planning problem harder. To sum up, our goal is to return, with probability 1 −δ, an ε-accurate value of the root node of this planning tree while using as low number of calls to the oracle as possible. Our contribution is an algorithm called TrailBlazer whose sampling strategy depends on the specific structure of the MDP and for which we provide sample complexity bounds in terms of a new problem-dependent measure of the quantity of near-optimal nodes. Before describing our contribution in more detail we first relate our setting to what has been around. 1.1 Related work In this section we focus on the dependency between ε and the sample complexity and all bound of the style 1/εc are up to a poly-logarithmic multiplicative factor not indicated for clarity. Kocsis and Szepesvári [12] introduced the UCT algorithm (upper-confidence bounds for trees). UCT is efficient in computer Go [7, 8, 15] and a number of other control and game problems [4]. UCT is based on generating trajectories by selecting in each MAX node the action that has the highest upper-confidence bound (computed according to the UCB algorithm of Auer et al. [1]). UCT converges asymptotically to the optimal solution, but its sample complexity can be worst than doubly-exponential in (1/ε) for some MDPs [13]. One reason for this is that the algorithm can expand very deeply the apparently best branches but may lack sufficient exploration, especially when a narrow optimal path is hidden in a suboptimal branch. As a result, this approach works well in some problems with a specific structure but may be much worse than a uniform sampling in other problems. On the other hand, a uniform planning approach is safe for all problems. Kearns et al. [11] generate a sparse look-ahead tree based on expanding all MAX nodes and sampling a finite number of children from AVG nodes up to a fixed depth that depends on the desired accuracy ε. Their sample complexity is2 of the order of (1/ε)log(1/ε), which is non-polynomial in 1/ε. This bound is better than that for UCT in a worst-case sense. However, as their look-ahead tree is built in a uniform and non-adaptive way, this algorithm fails to benefit from a potentially favorable structure of the MDP. An improved version of this sparse-sampling algorithm by Walsh et al. [17] cuts suboptimal branches in an adaptive way but unfortunately does not come with an improved bound and stays non-polynomial even in the simple Monte Carlo setting for which K = 1. Although the sample complexity is certainly non-polynomial in the worst case, it can be polynomial in some specific problems. First, for the case of finite N, the sample complexity is polynomial and Szörényi et al. [16] show that a uniform sampling algorithm has complexity at most (1/ε)2+log(KN)/(log(1/γ)). Notice that the product KN represents the branching factor of the lookahead planning tree. This bound could be improved for problems with specific reward structure or transition smoothness. In order to do this, we need to design non-uniform, adaptive algorithm that captures the possible structure of the MDP when available, while making sure that in the worst case, we do not perform worse than a uniform sampling algorithm. The case of deterministic dynamics (N = 1) and rewards considered by Hren and Munos [10] has a complexity of order (1/ε)(log κ)/(log(1/γ)), where κ ∈[1, K] is the branching factor of the subset of near-optimal nodes.3 The case of stochastic rewards has been considered by Bubeck and Munos [5] but with the difference that the goal was not to approximate the optimal value function but the value of the best open-loop policy which consists in a sequence of actions independent of states. Their sample complexity is (1/ε)max(2,(log κ)/(log 1/γ)). 2neglecting exponential dependence in γ 3nodes that need to be considered in order to return a near-optimal approximation of the value at the root 2 In the case of general MDPs, Bu¸soniu and Munos [6] consider the case of a fully known model of the MDP. For any state-action, the model returns the expected reward and the set of all next states (assuming N is finite) with their corresponding transition probabilities. In that case, the complexity is (1/ε)log κ/(log(1/γ)), where κ ∈[0, KN] can again be interpreted as a branching factor of the subset of near-optimal nodes. These approaches use the optimism in the face of uncertainty principle whose applications to planning have been have been studied by Munos [13]. TrailBlazer is different. It is not optimistic by design: To avoid voracious demand for samples it does not balance the upperconfidence bounds of all possible actions. This is crucial for polynomial sample complexity in the infinite case. The whole Section 3 shines many rays of intuitive light on this single and powerful idea. The work that is most related to ours is StOP by Szörényi et al. [16] which considers the planning problem in MDPs with a generative model. Their complexity bound is of the order of (1/ε)2+log κ/(log(1/γ))+o(1), where κ ∈[0, KN] is a problem-dependent quantity. However, their κ defined as limε→0 max(κ1, κ2) (in their Theorem 2) is somehow difficult to interpret as a measure of the quantity of near-optimal nodes. Moreover, StOP is not computationally efficient as it requires to identify the optimistic policy which requires computing an upper bound on the value of any possible policy, whose number is exponential in the number of MAX nodes, which itself is exponential in the planning horizon. Although they suggest (in their Appendix F) a computational improvement, this version is not analyzed. Finally, unlike in the present paper, StOP does not consider the case N = ∞ of an unbounded number of states. 1.2 Our contributions Our main result is TrailBlazer, an algorithm with a bound on the number of samples required to return a high-probability ε-approximation of the root node whether the number of next states N is finite or infinite. The bounds use a problem-dependent quantity (κ or d) that measures the quantity of near-optimal nodes. We now summarize the results. Finite number of next states (N < ∞): The sample complexity of TrailBlazer is of the order of4 (1/ε)max(2,log(Nκ)/ log(1/γ)+o(1)), where κ ∈[1, K] is related to the branching factor of the set of near-optimal nodes (precisely defined later). Infinite number of next states (N = ∞): The complexity of TrailBlazer is (1/ε)2+d, where d is a measure of the difficulty to identify the near-optimal nodes. Notice that d can be finite even if the planning problem is very challenging.5 We also state our contributions in specific settings in comparison to previous work. • For the case N < ∞, we improve over the best-known previous worst-case bound with an exponent (to 1/ε) of max(2, log(NK)/ log(1/γ)) instead of 2 + log(NK)/ log(1/γ) reported by Szörényi et al. [16]. • For the case N = ∞, we identify properties of the MDP (when d = 0) under which the sample complexity is of order (in 1/ε2). This is the case when there are non-vanishing actiongaps6 from any state along near-optimal policies or when the probability of transitionning to nodes with gap ∆is upper bounded by ∆2. This complexity bound is as good as MonteCarlo sampling and for this reason TrailBlazer is a natural extension of Monte-Carlo sampling (where all nodes are AVG) to stochastic control problems (where MAX and AVG nodes alternate). Also, no previous algorithm reported a polynomial bound when N = ∞. • In MDPs with deterministic transitions (N = 1) but stochastic rewards our bound is (1/ε)max(2,log κ/(log 1/γ)) which is similar to the bound achieved by Bubeck and Munos [5] in a similar setting (open-loop policies). • In the evaluation case without control (K = 1) TrailBlazer behaves exactly as MonteCarlo sampling (thus achieves a complexity of 1/ε2), even in the case N = ∞. • Finally TrailBlazer is easy to implement and is numerically efficient. 4neglecting logarithmic terms in ε and δ 5since when N = ∞the actual branching factor of the set of reachable nodes is infinite 6defined as the difference in values of best and second-best actions 3 2 Monte-Carlo planning with a generative model 1: Input: δ, ε 2: Set: η ←γ1/ max(2,log(1/ε)) 3: Set: λ ←2 log(ε(1 −γ))2 log log(K) (1−η) log(γ/η) 4: Set: m ←(log(1/δ) + λ)/((1 −γ)2ε2) 5: Use: δ and η as global parameters 6: Output: µ ←call the root with parameters (m, ε/2) Figure 1: TrailBlazer Setup We operate on a planning tree T . Each node of T from the root down is alternatively either an average (AVG) or a maximum (MAX) node. For any node s, C [s] is the set of its children. We consider trees T for which the cardinality of C [s] for any MAX node s is bounded by K. The cardinality N of C [s] for any AVG node s can be either finite, N < ∞, or infinite. We consider both cases. TrailBlazer applies to both situations. We provide performance guarantees for a general case and possibly tighter, N-dependent guarantees in the case of N < ∞. We assume that we have a generative model of the transitions and rewards: Each AVG node s is associated with a transition, a random variable τs ∈C [s] and a reward, a random variable rs ∈[0, 1]. 1: Input: m, ε 2: Initialization: {Only executed on first call} 3: SampledNodes ←∅, 4: r ←0 5: Run: 6: if ε ≥1/(1 −γ) then 7: Output: 0 8: end if 9: if |SampledNodes| > m then 10: ActiveNodes ←SampledNodes(1 : m) 11: else 12: while |SampledNodes| < m do 13: τ ←{new sample of next state} 14: SampledNodes.append(τ) 15: r ←r+[new sample of reward] 16: end while 17: ActiveNodes ←SampledNodes 18: end if {At this point, |ActiveNodes| = m} 19: for all unique nodes s ∈ActiveNodes do 20: k ←#occurrences of s in ActiveNodes 21: ν ←call s with parameters (k, ε/γ) 22: µ ←µ + νk/m 23: end for 24: Output: γµ + r/|SampledNodes| Figure 2: AVG node Objective For any node s, we define the value function V [s] as the optimum over policies π (giving a successor to all MAX nodes) of the sum of discounted expected rewards playing policy π, V [s] = sup π E " X t≥0 γtrst s0 = s, π # , where γ ∈(0, 1) is the discount factor. If s is an AVG node, V satisfies the following Bellman equation, V [s] = E [rs] + γ X s′∈C[s] p(s′|s)V [s′] . If s is a MAX node, then V [s] = maxs′∈C[s] V [s′] . The planner has access to the oracle which can be called for any AVG node s to either get a reward r or a transition τ which are two independent random variables identically distributed as rs and τs respectively. With the notation above, our goal is to estimate the value V [s0] of the root node s0 using the smallest possible number of oracle calls. More precisely, given any δ and ε, we want to output a value µε,δ such that P [|µε,δ −V [s0]| > ε] ≤δ using the smallest possible number of oracle calls nε,δ. The number of calls is the sample complexity of the algorithm. 2.1 Blazing the trails with TrailBlazer To fulfill the above objective, our TrailBlazer constructs a planning tree T which is, at any time, a finite subset of the potentially infinite tree. Only the already visited nodes are in T and explicitly represented in memory. Taking the object-oriented paradigm, each node of T is a persistent object with its own memory which can receive and perform calls respectively from and to other nodes. A node can potentially be called several times (with different parameters) during the run of TrailBlazer and may reuse (some of) its stored (transition and reward) samples. In particular, after node s receives a call from its parent, node s may perform internal computation by calling its own children in order to return a real value to its parent. Pseudocode of TrailBlazer is in Figure 1 along with the subroutines for MAX nodes in Figure 3 and AVG nodes in Figure 2. A node (MAX or AVG) is called with two parameters m and ε, which represent some requested properties of the returned value: m controls the desired variance and ε the desired maximum bias. We now describe the MAX and AVG node subroutines. 4 1: Input: m, ε 2: L ←all children of the node 3: ℓ←1 4: while |L| > 1 and U ≥(1 −η)ε do 5: U ← 2 1−γ q log(Kℓ/(δε))+γ/(η−γ)+λ+1 ℓ 6: for b ∈L do 7: µb ←call b with (ℓ, Uη/(1 −η)) 8: end for 9: L ← n b:µb+ 2U 1−η ≥supj h µj − 2U 1−η io 10: ℓ←ℓ+ 1 11: end while 12: if |L| > 1 then 13: Output: µ ←maxb∈L µb 14: else { L = {b⋆} } 15: b⋆←arg maxb∈L µb 16: µ ←call b⋆with (m, ηε) 17: Output: µ 18: end if Figure 3: MAX node MAX nodes A MAX node s keeps a lower and an upper bound of its children values which with high probability simultaneously hold at all times. It sequentially calls its children with different parameters in order to get more and more precise estimates of their values. Whenever the upper bound of one child becomes lower than the maximum lower bound, this child is discarded. This process can stop in two ways: 1) The set L of the remaining children shrunk enough such that there is a single child b⋆left. In this case, s calls b⋆with the same parameters that s received and uses the output of b⋆as its own output. 2) The precision we have on the value of the remaining children is high enough. In this case, s returns the highest estimate of the children in L. Note that the MAX node is eliminating actions to identify the best. Any other best-arm identification algorithm for bandits can be adapted instead. AVG nodes Every AVG node s keeps a list of all the children that it already sampled and a reward estimate r ∈R. Note that the list may contain the same child multiple times (this is particularly true for N < ∞). After receiving a call with parameters (m, ε), s checks if ε ≥1/(1 −γ). If this condition is verified, then it returns zero. If not, s considers the first m sampled children and potentially samples more children from the generative model if needed. For every child s′ in this list, s calls it with parameters (k, ε/γ), where k is the number of times a transition toward this child was sampled. It returns r + γµ, where µ is the average of all the children estimates. Anytime algorithm TrailBlazer is naturally anytime. It can be called with slowly decreasing ε, such that m is always increased only by 1, without having to throw away any previously collected samples. Executing TrailBlazer with ε′ and then with ε < ε′ leads to the same amount of computation as immediately running TrailBlazer with ε. Practical considerations The parameter λ exists so the behavior depends only on the randomness of oracle calls and the parameters (m, ε) that the node has been called with. This is a desirable property because it opens the possibility to extend the algorithm to more general settings, for instance if we have also MIN nodes. However, for practical purposes, we may set λ = 0 and modify the definition of U in Figure 3 by replacing K with the number of oracle calls made so far globally. 3 Cogs whirring behind Before diving into the analysis we explain the ideas behind TrailBlazer and the choices made. Tree-based algorithm The number of policies the planner can consider is exponential in the number of states. This leads to two major challenges. First, reducing the problem to multi-arm bandits on the set of the policies would hurt. When a reward is collected from a state, all the policies which could reach that state are affected. Therefore, it is useful to share the information between the policies. The second challenge is computational as it is infeasible to keep all policies in memory. These two problems immediately vanish with just how TrailBlazer is formulated. Contrary to Szörényi et al. [16], we do not represent the policies explicitly or update them simultaneously to share the information, but we store all the information directly in the planning tree we construct. Indeed, by having all the nodes being separate entities that store their own information, we can share information between policies without explicitly having to enforce it. We steel ourselves for the detailed understanding with the following two arguments. They shed light from two different angles on the very same key point: Do not refine more paths than you need to! 5 Delicate treatment of uncertainty First, we give intuition about the two parameters which measure the requested precision of a call. The output estimate µ of any call with parameters (m, ε) verifies the following property (conditioned on a high-probability event), ∀λ E h eλ(µ−V[s])i ≤exp α + ε|λ| + σ2λ2 2 , with σ2 = O (1/m) and constant α. (1) This awfully looks like the definition of µ being uncentered sub-Gaussian, except that instead of λ in the exponential function, there is |λ| and there is a λ-independent constant α. Inequality 1 implies that the absolute value of the bias of the output estimate µ is bounded by ε, E [µ] −V [s] ≤ε. As in the sub-Gaussian case, the second term 1 2σ2λ2 is a variance term. Therefore, ε controls the maximum bias of µ and 1/m control its sub-variance. In some cases, getting high-variance or low-variance estimate matters less as it is going to be averaged later with other independent estimates by an ancestor AVG node. In this case we prefer to query for high variance rather than a low one, in order to decrease sample complexity. From σ and ε it is possible to deduce a confidence bounds on |µ −V [s]| by typically summing the bias ε and a term proportional to the standard deviation σ = O (1/√m). Previous approaches [16, 5] consider a single parameter, representing the width of this high-probability confidence interval. TrailBlazer is different. In TrailBlazer, the nodes can perform high-variance and low-bias queries but can also query for both low-variance and low-bias. TrailBlazer treats these two types of queries differently. This is the whetstone of TrailBlazer and the reason why it is not optimistic. Refining few paths In this part we explain the condition |SampledNodes| > m in Figure 2, which is crucial for our approach and results. First notice, that as long as TrailBlazer encounters only AVG nodes, it behaves just like Monte-Carlo sampling — without the MAX nodes we would be just doing a simple averaging of trajectories. However, when TrailBlazer encounters a MAX node it locally uses more samples around this MAX node, temporally moving away from a Monte-Carlo behavior. This enables TrailBlazer to compute the best action at this MAX node. Nevertheless, once this best action is identified with high probability, the algorithm should behave again like Monte-Carlo sampling. Therefore, TrailBlazer forgets the additional nodes, sampled just because of the MAX node, and only keeps in memory the first m ones. This is done with the following line in Figure 2, ActiveNodes ←SampledNodes(1 : m). Again, while additional transitions were useful for some MAX node parents to decide which action to pick, they are discarded once this choice is made. Note that they can become useful again if an ancestor becomes unsure about which action to pick and needs more precision to make a choice. This is an important difference between TrailBlazer and some previous approaches like UCT where all the already sampled transitions are equally refined. This treatment enables us to provide polynomial bounds on the sample complexity for some special cases even in the infinite case (N = ∞). 4 TrailBlazer is good and cheap — consistency and sample complexity In this section, we start by our consistency result, stating that TrailBlazer outputs a correct value in a PAC (probably approximately correct) sense. Later, we define a measure of the problem difficulty which we use to state our sample-complexity results. We remark that the following consistency result holds whether the state space is finite or infinite. Theorem 1. For all ε and δ, the output µε,δ of TrailBlazer called on the root s0 with (ε, δ) verifies P [|µε,δ −V [s0]| > ε] < δ. 4.1 Definition of the problem difficulty We now define a measure of problem difficulty that we use to provide our sample complexity guarantees. We define a set of near-optimal nodes such that exploring only this set is enough to compute an optimal policy. Let s′ be a MAX node of tree T . For any of its descendants s, let c→s(s′) ∈C [s′] be the child of s′ in the path between s′ and s. For any MAX node s, we define ∆→s(s′) = max x∈C[s′] V [x] −V [c→s(s′)] . 6 ∆→s(s′) is the difference of the sum of discounted rewards stating from s′ between an agent playing optimally and one playing first the action toward s and then optimally. Definition 1 (near-optimality). We say that a node s of depth h is near-optimal, if for any even depth h′, ∆→s(sh′) ≤16γ(h−h′)/2 γ(1 −γ) with sh′ the ancestor of s of even depth h′. Let Nh be the set of all near-optimal nodes of depth h. Remark 1. Notice that the subset of near-optimal nodes contains all required information to get the value of the root. In the case N = ∞, when p(s|s′) = 0 for all s and s′, then our definition of near-optimality nodes leads to the smallest subset in a sense we precise in Appendix C. We prove that with probability 1 −δ, TrailBlazer only explores near-optimal nodes. Therefore, the size of the subset of near-optimal nodes directly reflects the sample complexity of TrailBlazer. In Appendix C, we discuss the negatives of other potential definitions of near-optimality. 4.2 Sample complexity in the finite case We first state our result where the set of the AVG children nodes is finite and bounded by N. Definition 2. We define κ ∈[1, K] as the smallest number such that ∃C ∀h, |N2h| ≤CN hκh. Notice that since the total number of nodes of depth 2h is bounded by (KN)h, κ is upper-bounded by K, the maximum number of MAX’s children. However κ can be as low as 1 in cases when the set of near-optimal nodes is small. Theorem 2. There exists C > 0 and K such that for all ε > 0 and δ > 0, with probability 1 −δ, the sample-complexity of TrailBlazer (the number of calls to the generative model before the algorithm terminates) is n(ε, δ) ≤C(1/ε)max(2, log(Nκ) log(1/γ) +o(1)) (log(1/δ) + log(1/ε))α , where α = 5 when log(Nκ)/ log(1/γ) ≥2 and α = 3 otherwise. This provides a problem-dependent sample-complexity bound, which already in the worst case (κ = K) improves over the best-known worst-case bound e O (1/ε)2+log(KN)/ log(1/γ) [16]. This bound gets better as κ gets smaller and is minimal when κ = 1. This is, for example, the case when the gap (see definition given in Equation 2) at MAX nodes is uniformly lower-bounded by some ∆> 0. In this case, this theorem provides a bound of order (1/ε)max(2,log(N)/ log(1/γ)). However, we will show in Remark 2 that we can further improve this bound to (1/ε)2. 4.3 Sample complexity in the infinite case Since the previous bound depends on N, it does not apply to the infinite case with N = ∞. We now provide a sample complexity result in the case N = ∞. However, notice that when N is bounded, then both results apply. We first define gap ∆(s) for any MAX node s as the difference between the best and second best arm, ∆(s) = V [i⋆] − max i∈C[s],i̸=i⋆V [i] with i⋆= arg max i∈C[s] V [i] . (2) For any even integer h, we define a random variable Sh taking values among MAX nodes of depth h, in the following way. First, from every AVG nodes from the root to nodes of depth h, we draw a single transition to one of its children according to the corresponding transition probabilities. This defines a subtree with Kh/2 nodes of depth h and we choose Sh to be one of them uniformly at random. Furthermore, for any even integer h′ < h we note Sh h′ the MAX node ancestor of Sh of depth h′. 7 Definition 3. We define d ≥0 as the smallest d such that for all ξ there exists a > 0 for which for all even h > 0, E Kh/21 Sh ∈Nh Y 0≤h′<h h′≡0(mod 2) ξ γh−h′ 1 ∆(Sh h′)<16 γ(h−h′)/2 γ(1−γ) ≤aγ−dh If no such d exists, we set d = ∞. This definition of d takes into account the size of the near-optimality set (just like κ) but unlike κ it also takes into account the difficulty to identify the near-optimal paths. Intuitively, the expected number of oracle calls performed by a given AVG node s is proportional to: (1/ε2) × (the product of the inverted squared gaps of the set of MAX nodes in the path from the root to s) × (the probability of reaching s by following a policy which always tries to reach s). Therefore, a near-optimal path with a larger number of small MAX node gaps can be considered difficult. By assigning a larger weight to difficult nodes, we are able to give a better characterization of the actual complexity of the problem and provide polynomial guarantees on the sample complexity for N = ∞when d is finite. Theorem 3. If d is finite then there exists C > 0 such that for all ε > 0 and δ > 0, the expected sample complexity of TrailBlazer satisfies E [n(ε, δ)] ≤C (log(1/δ) + log(1/ε))3 ε2+d · Note that this result holds in expectation only, contrary to Theorem 2 which holds in high probability. We now give an example for which d = 0, followed by a special case of it. Lemma 1. If there exists c > 0 and b > 2 such that for any near-optimal AVG node s, P [∆(τs) ≤x] ≤cxb, where the random variable τs is a successor state from s drawn from the MDP’s transition probabilities, then d = 0 and consequently the sample complexity is of order 1/ε2. Remark 2. If there exists ∆min such that for any near-optimal MAX node s, ∆(s) ≥∆min then d = 0 and the sample complexity is of order 1/ε2. Indeed, in this case as P [∆s ≤x] ≤(x/∆min)b for any b > 2 for which d = 0 by Lemma 1. 5 Conclusion We provide a new Monte-Carlo planning algorithm TrailBlazer that works for MDPs where the number of next states N can be either finite or infinite. TrailBlazer is easy to implement and is numerically efficient. It comes packaged with a PAC consistency and two problem-dependent sample-complexity guarantees expressed in terms of a measure (defined by κ) of the quantity of near-optimal nodes or a measure (defined by d) of the difficulty to identify the near-optimal paths. The sample complexity of TrailBlazer improves over previous worst-case guarantees. What’s more, TrailBlazer exploits MDPs with specific structure by exploring only a fraction of the whole search space when either κ or d is small. In particular, we showed that if the set of near-optimal nodes have non-vanishing action-gaps, then the sample complexity is e O(1/ε2), which is the same rate as Monte-Carlo sampling. This is a pretty decent evidence that TrailBlazer is a natural extension of Monte-Carlo sampling to stochastic control problems. Acknowledgements The research presented in this paper was supported by French Ministry of Higher Education and Research, Nord-Pas-de-Calais Regional Council, a doctoral grant of École Normale Supérieure in Paris, Inria and Carnegie Mellon University associated-team project EduBand, and French National Research Agency projects ExTra-Learn (n.ANR-14-CE24-0010-01) and BoB (n.ANR-16-CE23-0003) 8 References [1] Peter Auer, Nicolò Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2-3):235–256, 2002. [2] Richard Bellman. Dynamic Programming. Princeton University Press, Princeton, NJ, 1957. [3] Dimitri Bertsekas and John Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, Belmont, MA, 1996. [4] Cameron B. Browne, Edward Powley, Daniel Whitehouse, Simon M. Lucas, Peter I. Cowling, Philipp Rohlfshagen, Stephen Tavener, Diego Perez, Spyridon Samothrakis, and Simon Colton. A survey of Monte Carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in Games, 4(1):1–43, 2012. [5] Sébastien Bubeck and Rémi Munos. Open-loop optimistic planning. In Conference on Learning Theory, 2010. [6] Lucian Bu¸soniu and Rémi Munos. Optimistic planning for Markov decision processes. In International Conference on Artificial Intelligence and Statistics, 2012. [7] Rémi Coulom. Efficient selectivity and backup operators in Monte-Carlo tree search. Computers and games, 4630:72–83, 2007. [8] Sylvain Gelly, Wang Yizao, Rémi Munos, and Olivier Teytaud. Modification of UCT with patterns in Monte-Carlo Go. Technical report, Inria, 2006. URL https://hal.inria.fr/ inria-00117266. [9] Arthur Guez, David Silver, and Peter Dayan. Efficient Bayes-adaptive reinforcement learning using sample-based search. Neural Information Processing Systems, 2012. [10] Jean-Francois Hren and Rémi Munos. Optimistic Planning of Deterministic Systems. In European Workshop on Reinforcement Learning, 2008. [11] Michael Kearns, Yishay Mansour, and Andrew Y. Ng. A sparse sampling algorithm for nearoptimal planning in large Markov decision processes. In International Conference on Artificial Intelligence and Statistics, 1999. [12] Levente Kocsis and Csaba Szepesvári. Bandit-based Monte-Carlo planning. In European Conference on Machine Learning, 2006. [13] Rémi Munos. From bandits to Monte-Carlo tree search: The optimistic principle applied to optimization and planning. Foundations and Trends in Machine Learning, 7(1):1–130, 2014. [14] David Silver and Joel Veness. Monte-Carlo planning in large POMDPs. In Neural Information Processing Systems, 2010. [15] 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, 2016. [16] Balázs Szörényi, Gunnar Kedenburg, and Rémi Munos. Optimistic planning in Markov decision processes using a generative model. In Neural Information Processing Systems, 2014. [17] Thomas J Walsh, Sergiu Goschin, and Michael L Littman. Integrating sample-based planning and model-based reinforcement learning. AAAI Conference on Artificial Intelligence, 2010. 9 | 2016 | 270 |
6,184 | Scaling Factorial Hidden Markov Models: Stochastic Variational Inference without Messages Yin Cheng Ng Dept. of Statistical Science University College London y.ng.12@ucl.ac.uk Pawel Chilinski Dept. of Computing Science University College London ucabchi@ucl.ac.uk Ricardo Silva Dept. of Statistical Science University College London r.silva@ucl.ac.uk Abstract Factorial Hidden Markov Models (FHMMs) are powerful models for sequential data but they do not scale well with long sequences. We propose a scalable inference and learning algorithm for FHMMs that draws on ideas from the stochastic variational inference, neural network and copula literatures. Unlike existing approaches, the proposed algorithm requires no message passing procedure among latent variables and can be distributed to a network of computers to speed up learning. Our experiments corroborate that the proposed algorithm does not introduce further approximation bias compared to the proven structured mean-field algorithm, and achieves better performance with long sequences and large FHMMs. 1 Introduction Breakthroughs in modern technology have allowed more sequential data to be collected in higher resolutions. The resulted sequential data sets are often extremely long and high-dimensional, exhibiting rich structures and long-range dependency that can only be captured by fitting large models to the sequences, such as Hidden Markov Models (HMMs) with a large state space. The standard methods of learning and performing inference in the HMM class of models are the Expectation-Maximization (EM) and the Forward-Backward algorithms. The Forward-Backward and EM algorithms are prohibitively expensive for long sequences and large models because of their linear and quadratic computational complexity with respect to sequence length and state space size respectively. To rein in the computational cost of inference in HMMs, several variational inference algorithms that trade-off inference accuracy in exchange for lower computational cost have been proposed in the literatures. Variational inference is a deterministic approximate inference technique that approximates posterior distribution p by minimizing the Kullback-Leibler divergence KL(q||p), where q lies in a family of distributions selected to approximate p as closely as possible while keeping the inference algorithm computationally tractable [24]. Despite its biased approximation of the actual posteriors, the variational inference approach has been proven to work well in practice [21]. Variational inference has also been successfully scaled to tackle problems with large data sets through the use of stochastic gradient descent (SGD) algorithms [12]. However, applications of such techniques to models where the data is dependent (i.e., non-i.i.d.) require much care in the choice of the approximating family and parameter update schedules to preserve dependency structure in the data [9]. More recently, developments of stochastic variational inference algorithms to scale models for non-i.i.d. data to large data sets have been increasingly explored [5, 9]. We propose a stochastic variational inference approach to approximate the posterior of hidden Markov chains in Factorial Hidden Markov Models (FHMM) with independent chains of bivariate Gaussian copulas. Unlike existing variational inference algorithms, the proposed approach eliminates the need for explicit message passing between latent variables and allows computations to be distributed to 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. multiple computers. To scale the variational distribution to long sequences, we reparameterise the bivariate Gaussian copula chain parameters with feed-forward recognition neural networks that are shared by copula chain parameters across different time points. The use of recognition networks in variational inference has been well-explored in models in which data is assumed to be i.i.d. [14, 11]. To the best of our knowledge, the use of recognition networks to decouple inference in non-factorised stochastic process of unbounded length has not been well-explored. In addition, both the FHMM parameters and the parameters of the recognition networks are learnt in conjunction by maximising the stochastic lower bound of the log-marginal likelihood, computed based on randomly sampled subchains from the full sequence of interest. The combination of recognition networks and stochastic optimisations allow us to scale the Gaussian copula chain variational inference approach to very long sequences. 2 Background 2.1 Factorial Hidden Markov Model Factorial Hidden Markov Models (FHMMs) are a class of HMMs consisting of M latent variables st = (s1 t, · · · , sM t ) at each time point, and observations yt where the conditional emission probability of the observations p (yt|st, η) is parameterised through factorial combinations of st and emission parameters η. Each of the latent variables sm t evolves independently in time through discretevalued Markov chains governed by transition matrix Am [8]. For a sequence of observations y = (y1, · · · , yT ) and corresponding latent variables s = (s1, · · · , sT ), the joint distribution can be written as follow p(y, s) = M Y m=1 p(sm 1 )p(y1|s1, η) T Y t=2 p(yt|st, η) M Y m=1 p(sm t |sm t−1, Am) (1) Depending on the state of latent variables at a particular time point, different subsets of emission parameters η can be selected, resulting in a dynamic mixture of distributions for the data. The factorial respresentation of state space reduces the required number of parameters to encode transition dynamics compared to regular HMMs with the same number of states. As an example, a state space with 2M states can be encoded by M binary transition matrices with a total of 2M parameters while a regular HMM requires a transition matrix with 2M × (2M −1) parameters to be estimated. In this paper, we specify a FHMM with D−dimensional Gaussian emission distributions and M binary hidden Markov chains. The emission distributions share a covariance matrix Σ across different states while the mean is parameterised as a linear combination of the latent variables, µt = WTˆst, (2) where ˆst = [s1 t, · · · , sM t , 1]T is a M + 1-dimensional binary vector and W ∈R(M+1)×D. The FHMM model parameters Γ = (Σ, W, A1, · · · , AM) can be estimated with the EM algorithm. Note that to facilitate optimisations, we reparameterised Σ as LLT where L ∈RD×D is a lower-triangular matrix. 2.1.1 Inference in FHMMs Exact inference in FHMM is intractable due to the O(TMKM+1) computational complexity for FHMM with M K-state hidden Markov chains [15]. A structured mean-field (SMF) variational inference approach proposed in [8] approximates the posterior distribution with M independent Markov chains and reduces the complexity to O(TMK2) in models with linear-Gaussian emission distributions. While the reduction in complexity is significant, inference and learning with SMF remain insurmountable in the presence of extremely long sequences. In addition, SMF requires the storage of O(2TMK) variational parameters in-memory per training sequence. Such computational requirements remain expensive to satisfy even in the age of cloud computing. 2.2 Gaussian Copulas Gaussian copulas are a family of multivariate cumulative distribution functions (CDFs) that capture linear dependency structure between random variables with potentially different marginal distributions. Given two random variables X1, X2 with their respective marginal CDFs F1, F2, their Gaussian copula joint CDF can be written as Φρ(φ−1(F1(x1)), φ−1(F2(x2))) (3) 2 where φ−1 is the quantile function of the standard Gaussian distribution, and Φ is the CDF of the standard bivariate Gaussian distribution with correlation ρ. In a bivariate setting, the dependency between X1 and X2 is captured by ρ. The bivariate Gaussian copula can be easily extended to multivariate settings through a correlation matrix. For an in-depth introduction of copulas, please refer to [18, 3]. 2.3 Stochastic Variational Inference Variational inference is a class of deterministic approximate inference algorithms that approximate intractable posterior distributions p(s|y) of latent variables s given data y with a tractable family of variational distributions qβ(s) parameterised by variational parameters β. The variational parameters are fitted to approximate the posterior distributions by maximising the evidence lower bound of log-marginal likelihood (ELBO) [24]. By applying the Jensen’s inequality to R p(y, s)ds the ELBO can be expressed as ELBO = Eq[log p(y, s)] −Eq[log q(s)]. (4) The ELBO can also be interpreted as the negative KL-divergence KL(qβ(s)||p(s|y)) up to a constant. Therefore, variational inference results in variational distribution that is the closest to p within the approximating family as measured by KL. Maximising ELBO in the presence of large data set is computationally expensive as it requires the ELBO to be computed over all data points. Stochastic variational inference (SVI) [12] successfully scales the inference technique to large data sets using subsampling based stochastic gradient descent algorithms[2]. 2.4 Amortised Inference and Recognition Neural Networks The many successes of neural networks in tackling certain supervised learning tasks have generated much research interest in applying neural networks to unsupervised learning and probabilistic modelling problems [20, 7, 19, 14]. A recognition neural network was initially proposed in [11] to extract underlying structures of data modelled by a generative neural network. Taking the observed data as input, the feed-forward recognition network learns to predict a vector of unobserved code that the generative neural network initially conjectured to generate the observed data. More recently, a recognition network was applied to variational inference for latent variable models[14, 7]. Given data, the latent variable model and an assumed family of variational distributions, the recognition network learns to predict optimal variational parameters for the specific data points. As the recognition network parameters are shared by all data points, information learned by the network on a subset of data points are shared with other data points. This inference process is aptly named amortised inference. In short, recognition network can simply be thought of as a feed-forward neural network that learns to predict optimal variational parameters given the observed data, with ELBO as its utility function. 3 The Message Free Stochastic Variational Inference Algorithm While structured mean-field variational inference and its associated EM algorithms are effective tools for inference and learning in FHMMs with short sequences, they become prohibitively expensive as the sequences grow longer. For example, one iteration of SMF forward-backward message passing for FHMM of 5 Markov chains and 106 sequential data points takes hours of computing time on a modern 8-cores workstation, rendering SMF unusable for large scale problems. To scale FHMMs to long sequences, we resort to stochastic variational inference. The proposed variational inference algorithm approximates posterior distributions of the M hidden Markov chains in FHMM with M independent chains of bivariate Gaussian-Bernoulli copulas. The computational cost of optimising the variational parameters is managed by a subsampling-based stochastic gradient ascent algorithm similar to SVI. In addition, parameters of the copula chains are reparameterised using feed-forward recognition neural networks to improve efficiency of the variational inference algorithm. In contrast to the EM approach for learning FHMM model parameters, our approach allows for both the model parameters and variational parameters to be learnt in conjunction by maximising the ELBO 3 with a stochastic gradient ascent algorithm. In the following sections, we describe the variational distributions and recognition networks, and derive the stochastic ELBO for SGD. 3.1 Variational Chains of Bivariate Gaussian Copulas Similar to the SMF variational inference algorithm proposed in [8], we aim to preserve posterior dependency of latent variables within the same hidden Markov chains by introducing chains of bivariate Gaussian copulas. The chain of bivariate Gaussian copulas variational distribution can be written as the product of bivariate Gaussian copulas divided by the marginals of latent variables at the intersection of the pairs, q(sm) = QT t=2 q(sm t−1, sm t ) QT −1 t=2 q(sm t ) (5) where q(sm t−1, sm t ) is the joint probability density or mass function of a bivariate Gaussian copula. The copula parameterization in Equation (5) offers several advantages. Firstly, the overlapping bivariate copula structure enforces coherence of q(sm t ) such that P sm t−1 q(sm t−1, sm t ) = P sm t+1 q(sm t , sm t+1). Secondly, the chain structure of the distribution restricts the growth in the number of variational parameters to only two parameters per chain for every increment in the sequence length. Finally, the Gaussian copula allows marginals and dependency structure of the random variables to be modelled separately [3]. The decoupling of the marginal and correlation parameters thus allows these parameters to be estimated by unconstrained optimizations and also lend themselves to be predicted separately using feed-forward recognition neural networks. For the rest of the paper, we assume that the FHMM latent variables are Bernoulli random variables with the following bivariate Gaussian-Bernoulli copula probability mass function (PMF) as their variational PMFs q(sm t−1 = 0, sm t = 0) = qm 00t q(sm t−1 = 1, sm t = 0) = 1 −θt,m −qm 00t q(sm t−1 = 0, sm t = 1) = 1 −θt−1,m −qm 00t q(sm t−1 = 1, sm t = 1) = θt,m + θt−1,m + qm 00t −1 (6) where qm 00t = Φρt,m(φ−1(1 −θt−1,m), φ−1(1 −θt,m)) and q(sm t = 1) = θt,m. The GaussianBernoulli copula can be easily extended to multinomial random variables. Assuming independence between random variables in different hidden chains, the posterior distribution of s can be factorised by chains and approximated by q(s) = M Y m=1 q(sm) (7) 3.2 Feed-forward Recognition Neural Networks The number of variational parameters in the chains of bivariate Gaussian copulas scales linearly with respect to the length of the sequence as well as the number of sequences in the data set. While it is possible to directly optimise these variational parameters, the approach quickly becomes infeasible as the size of data set grows. We propose to circumvent the challenging scalability problem by reparameterising the variational parameters with rolling feed-forward recognition neural networks that are shared among variational parameters within the same chain. The marginal variational parameters θt,m and copula correlation variational parameters ρt,m are parameterised with different recognition networks as they are parameters of a different nature. Given observed sequence y = (y1, . . . , yT ), the marginal and correlation recognition networks for hidden chain m compute the variational paremeters θt,m and ρt,m by performing a forward pass on a window of observed data ∆yt = (yt−1 2 ∆t, . . . , yt, . . . , yt+ 1 2 ∆t) θt,m = f m θ (∆yt) ρt,m = f m ρ (∆yt) (8) where ∆t + 1 is the user selected size of rolling window, f m θ and f m ρ are the marginal and correlation recognition networks for hidden chain m with parameters ωm = (ωθ,m, ωρ,m). The output layer nonlinearities of f m θ and f m ρ are chosen to be the sigmoid and hyperbolic tangent functions respectively to match the range of θt,m and ρt,m. The recognition network hyperparameters, such as the number of hidden units, non-linearities, and the window size ∆t can be chosen based on computing budget and empirical evidence. In our 4 experiments with shorter sequences where ELBO can be computed within a reasonable amount of time, we did not observe a significant difference in the coverged ELBOs among different choices of non-linearity. However, we observed that the converged ELBO is sensitive to the number of hidden units and the number of hidden units needs to be adapted to the data set and computing budget. Recognition networks with larger hidden layers have larger capacity to approximate the posterior distributions as closely as possible but require more computing budget to learn. Similarly, the choice of ∆t determines the amount of information that can be captured by the variational distributions as well as the computing budget required to learn the recognition network parameters. As a rule of thumb, we recommend the number of hidden units and ∆t to be chosen as large as the computing budget allows in long sequences. We emphasize that the range of posterior dependency captured by the correlation recognition networks is not limited by ∆t, as the recognition network parameters are shared across time, allowing dependency information to be encoded in the network parameters. For FHMMs with large number of hidden chains, various schemes to share the networks’ hidden layers can be devised to scale the method to FHMMs with a large state space. This presents another trade-off between computational requirements and goodness of posterior approximations. In addition to scalability, the use of recognition networks also allows our approach to perform fast inference at run-time, as computing the posterior distributions only require forward passes of the recognition networks with data windows of interest. The computational complexity of the recognition network forward pass scales linearly with respect to ∆t. As with other types of neural networks, the computation is highly data-parallel and can be massively sped up with GPU. In comparison, computation for a stochastic variational inference algorithm based on a message passing approach also scales linearly with respect to ∆t but is not data-parallel [5]. Subchains from long sequences, together with their associated recognition network computations, can also be distributed across a cluster of computers to improve learning and inference speed. However, the use of recognition networks is not without its drawbacks. Compared to message passing algorithms, the recognition networks approach cannot handle missing data gracefully by integrating out the relevant random variables. The fidelity of the approximated posterior can also be limited by the capacity of the neural networks and bad local minimas. The posterior distributions of the random variables close to the beginning and the end of the sequence also require special handling, as the rolling window cannot be moved any further to the left or right of the sequences. In such scenarios, the posteriors can be computed by adapting the structured mean-field algorithm proposed in [8] to the subchains at the boundaries (see Supplementary Material). The importance of the boundary scenarios in learning the FHMM model parameters diminishes as the data sequence becomes longer. 3.3 Learning Recognition Network and FHMM Parameters Given sequence y of length T, the M-chain FHMM parameters Γ and recognition network parameters Ω= (ω1, . . . , ωM) need to be adapted to the data by maximising the ELBO as expressed in Equation (4) with respect to Γ and Ω. Note that the distribution q(sm) is now parameterised by the recognition network parameters ωm. For notational simplicty, we do not explicitly express the parameterisation of q(sm) in our notations. Plugging in the FHMM joint distribution in Equation (1) and variational distribution in Equation (7), the FHMM ELBO L(Γ, Ω) for the variational chains of bivariate Gaussian copula is approximated as L(Γ, Ω) ≈ T −1 2 ∆t−1 X t= 1 2 ∆t+1 log p(yt|s1 t, . . . , sM t ) q + M X m=1 log p(sm t |sm t−1) q + log q(sm t ) q − log q(sm t , sm t+1) q (9) Equation (9) is only an approximation of the ELBO as the variational distribution of sm t close to the beginning and end of y cannot be computed using the recognition networks. Because of the approximation, the FHMM initial distribution QM m=1 p(sm 1 ) cannot be learned using our approach. However, they can be approximated by the stationary distribution of the transition matrices as T become large assuming that the sequence is close to stationary[5]. Comparisons to SMF in our experiment results suggest that the error caused by the approximations is negligible. The log-transition probability expectations and variational entropy in Equation (9) can be easily computed as they are simply sums over pairs of Bernoulli random variables. The expectations of 5 log-emission distributions can be efficiently computed for certain distributions, such as multinomial and multivariate Gaussian distributions. Detailed derivations of the expectation terms in ELBO can be found in the Supplementary Material. 3.3.1 Stochastic Gradient Descent & Subsampling Scheme We propose to optimise Equation (9) with SGD by computing noisy unbiased gradients of ELBO with respect to Γ and Ωbased on contributions from subchains of length ∆t + 1 randomly sampled from y [2, 12]. Multiple subchains can be sampled in each of the learning iterations to form a mini-batch of subchains, reducing variance of the noisy gradients. Noisy gradients with high variance can cause the SGD algorithm to converge slowly or diverge [2]. The subchains should also be sampled randomly without replacement until all subchains in y are depleted to speed up convergence. To ensure unbiasedness of the noisy gradients, the gradients computed in each iteration need to be multiplied by a batch factor c = T −∆t nminibatch (10) where nminibatch is the number of subchains in each mini-batch. The scaled noisy gradients can then be used by SGD algorithm of choice to optimise L. In our implementation of the algorithm, gradients are computed using the Python automatic differentiation tool [17] and the optimisation is performed using Rmsprop [22]. 4 Related Work Copulas have previously been adapted in variational inference literatures as a tool to model posterior dependency in models with i.i.d. data assumption [23, 10]. However, the previously proposed approaches cannot be directly applied to HMM class of models without addressing parameter estimation issues as the dimensionality of the posterior distributions grow with the length of sequences. The proposed formulation of the variational distribution circumvents the problem by exploiting the chain structure of the model, coupling only random variables within the same chain that are adjacent in time with a bivariate Gaussian-Bernoulli copula, leading to a coherent chain of bivariate Gaussian copulas as the variational distribution. On the other hand, a stochastic variational inference algorithm that also aims to scale HMM class of models to long sequences has previously been proposed in [5]. Our proposed algorithm differs from the existing approach in that it does not require explicit message passing to perform inference and learning. Applying the algorithm proposed in [5] to FHMM requires multiple message passing iterations to determine the buffer length of each subchain in the mini batch of data, and the procedure needs to be repeated for each FHMM Markov chain. The message passing routines can be expensive as the number of Markov chains grows. In contrast, the proposed recognition network approach eliminates the need for iterative message passing and allows the variational distributions to be learned directly from the data using gradient descent. The use of recognition networks also allows fast inference at run-time with modern parallel computing hardwares. The use of recognition networks as inference devices for graphical models has received much research interest recently because of its scalability and simplicity. Similar to our approach, the algorithms proposed in [4, 13] also make use of the recognition networks for inference, but still rely on message passing to perform certain computations. In addition, [1] proposed an inference algorithm for state space models using a recognition network. However, the algorithm cannot be applied to models with non-Gaussian posteriors. Finally, the proposed algorithm is analogous to composite likelihood algorithms for learning in HMMs in that the data dependency is broken up according to subchains to allow tractable computations [6]. The EM-composite likelihood algorithm in [6] partitions the likelihood function according to subchains, bounding each subchain separately with a different posterior distribution that uses only the data in that subsequence. Our recognition models generalize that. 5 Experiments We evaluate the validity of our algorithm and the scalability claim with experiments using real and simulated data. To validate the algorithm, we learn FHMMs on simulated and real data using 6 the proposed algorithm and the existing SMF-EM algorithm. The models learned using the two approaches are compared with log-likelihood (LL). In addition, we compare the learned FHMM parameters to parameters used to simulate the data. The validation experiments ensure that the proposed approach does not introduce further approximation bias compared to SMF. To verify the scalability claim, we compare the LL of FHMMs with different numbers of hidden chains learned on simulated sequences of increasing length using the proposed and SMF-based EM algorithms. Two sets of experiments are conducted to showcase scalability with respect to sequence length and the number of hidden Markov chains. To simulate real-world scenarios where computing budget is constrained, both algorithms are given the same fixed computing budget. The learned FHMMs are compared after the computing budget is depleted. Finally, we demonstrate the scalability of the proposed algorithm by learning a 10 binary hidden Markov chains FHMM on long time series recorded in a real-world scenario. 5.1 Algorithm Validation Simulated Data We simulate a 1, 000 timesteps long 2-dimensional sequence from a FHMM with 2 hidden binary chains and Gaussian emission, and attempt to recover the true model parameters with the proposed approach. The simulation procedure is detailed in the Supplementary Material. The proposed algorithm successfully recovers the true model parameters from the simulated data. The LL of the learned model also compared favorably to FHMM learned using the SMF-EM algorithm, showing no visible further bias compares to the proven SMF-EM algorithm. The LL of the proposed algorithm and SMF-EM are shown in Table 1. The learned emission parameters, together with the training data, are visualised in Figure 1. Bach Chorales Data Set [16] Following the experiment in [8], we compare the proposed algorithm to SMF-EM based on LL. The training and testing data consist of 30 and 36 sequences from the Bach Chorales data set respectively. FHMMs with various numbers of binary hidden Markov chains are learned from the training data with both algorithms. The log-likelihoods, tabulated in Table 1, show that the proposed algorithm is competitve with SMF-EM on a real data set in which FHMM is proven to be a good model, and show no further bias. Note that the training log-likelihood of the FHMM with 8 chains trained using the proposed algorithm is smaller than the FHMM with 7 chains, showing that the proposed algorithm can be trapped in bad local minima. 5.2 Scalability Verification Simulated Data This experiment consists of two parts to verify scalability with respect to sequence length and the state space size. In the first component, we simulate 2-dimensional sequences of varying length from a FHMM with 4-binary chains using an approach similar to the validation experiment. Given fixed computing budget of 2 hours per sequence on a 24 cores Intel i7 workstation, both SMF-EM and the proposed algorithm attempt to fit 4-chain FHMMs to the sequences. Two testing sequences of length 50, 000 are also simulated from the same model. In the second component, we keep the sequence length to 15, 000 and attempt to learn FHMMs with various numbers of chains with computing budget of 1, 000s. The computing budget in the second component is scaled according to the sequence length. Log-likelihoods are computed with the last available learned parameters after computing time runs out. The proposed algorithm is competitive with SMF-EM when sequences are shorter and state space is smaller, and outperforms SMF-EM in longer sequences and larger state space. The results in Figure 2 and Figure 3 both show the increasing gaps in the log-likelihoods as sequence length and state space size increased. The recognition networks in the experiments have 1 hidden layer with 30 tanh hidden units, and rolling window size of 5. The marginal and correlation recognition networks for latent variables in the same FHMM Markov chain share hidden units to reduce memory and computing requirements as the number of Markov chains increases. Household Power Consumption Data Set [16] We demonstrate the applicability of our algorithm to long sequences in which learning with SMF-EM using the full data set is simply intractable. The power consumption data set consists of a 9-dimensional sequence of 2, 075, 259 time steps. After dropping the date/time series and the current intensity series that is highly correlated with the power consumption series, we keep the first 106 data points of the remaining 6 dimensional sequence for training and set aside the remaining series as test data. A FHMM with 10 hidden Markov chains is 7 learned on the training data using the proposed algorithm. In this particular problem, we force all 20 recognition networks in our algorithm to share a common tanh hidden layer of 200 units. The rolling window size is set to 21 and we allow the algorithm to complete 150, 000 SGD iterations with 10 subchains per iteration before terminating. To compare, we also learned the 10-chain FHMM with SMF-EM on the last 5, 000 data points of the training data. The models learned with the proposed algorithm and SMF-EM are compared based on the Mean Squared Error (MSE) of the smoothed test data (i.e., learned emission means weighted by latent variable posterior). As shown in Table 2, the test MSEs of the proposed algorithm are lower than the SMF-EM algorithm in all data dimensions. The result shows that learning with more data is indeed advantageous, and the proposed algorithm allows FHMMs to take advantage of the large data set. Figure 1: Simulated data in validation experiments with the emission parameters from simulation (red), learned by proposed algorithm (green) and SMF-EM (blue). The emission means are depicted as stars and standard deviations as elliptical contour at 1 standard deviation. Figure 2: The red and blue lines show the train (solid) and test (dashed) LL results from the proposed and SMF-EM algorithms in the scalability experiments as the sequence length (x-axis) increases. Both algorithms are given 2hr computing budget per data set. SMF-EM failed to complete a single iteration for length of 150, 000. Figure 3: The red and blue lines show the train (solid) and test (dashed) LL results from the proposed and SMF-EM algorithms in the scalability experiments as the number of hidden Markov chain (x-axis) increases. Both algorithms are given 1, 000s computing budget per data set. Proposed Algo. SMF nchain LLtrain LLtest LLtrain LLtest Simulated Data 2 -2.320 -2.332 -2.315 -2.338 Bach Chorales 2 -7.241 -7.908 -7.172 -7.869 3 -6.627 -7.306 -6.754 -7.489 4 -6.365 -7.322 -6.409 -7.282 5 -6.135 -6.947 -5.989 -7.174 6 -5.973 -6.716 -5.852 -7.008 7 -5.754 -6.527 -5.771 -6.664 8 -5.836 -6.722 -5.675 -6.697 Table 1: LL from the validation experiments. The results demonstrate that the proposed algorithm is competitive with SMF. Plot of the Bach chorales LL is available in the Supplementary Material. Dim. MSESMF MSEP roposed 1 0.155 0.082 2 0.084 0.055 3 0.079 0.027 4 0.466 0.145 5 0.121 0.062 6 0.202 0.145 Table 2: Test MSEs of the SMF-EM and the proposed algorithm for each dimension in the household power consumption data set. The results show that the proposed algorithm is able to take advantage of the full data set to learn a better model because of its scalability. Plots of the fitted and observed data are available in the Supplementary Material. 6 Conclusions We propose a novel stochastic variational inference and learning algorithm that does not rely on message passing to scale FHMM to long sequences and large state space. The proposed algorithm achieves competitive results when compared to structured mean-field on short sequences, and outperforms structured mean-field on longer sequences with a fixed computing budget that resembles a real-world model deployment scenario. The applicability of the algorithm to long sequences where the structured mean-field algorithm is infeasible is also demonstrated. In conclusion, we believe that the proposed scalable algorithm will open up new opportunities to apply FHMMs to long sequential data with rich structures that could not be previously modelled using existing algorithms. 8 References [1] Evan Archer, Il Memming Park, Lars Buesing, John Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015. [2] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [3] Gal Elidan. Copulas in machine learning. In Piotr Jaworski, Fabrizio Durante, and Wolfgang Karl Härdle, editors, Copulae in Mathematical and Quantitative Finance, Lecture Notes in Statistics, pages 39–60. Springer Berlin Heidelberg, 2013. [4] Kai Fan, Chunyuan Li, and Katherine Heller. A unifying variational inference framework for hierarchical graph-coupled HMM with an application to influenza infection. 2016. [5] Nicholas Foti, Jason Xu, Dillon Laird, and Emily Fox. Stochastic variational inference for hidden markov models. In Advances in Neural Information Processing Systems, pages 3599–3607, 2014. [6] Xin Gao and Peter X-K Song. Composite likelihood EM algorithm with applications to multivariate hidden markov model. Statistica Sinica, pages 165–185, 2011. [7] Samuel J Gershman and Noah D Goodman. Amortized inference in probabilistic reasoning. In Proceedings of the 36th Annual Conference of the Cognitive Science Society, 2014. [8] Zoubin Ghahramani and Michael I Jordan. Factorial hidden markov models. Machine learning, 29(23):245–273, 1997. [9] Prem K Gopalan and David M Blei. Efficient discovery of overlapping communities in massive networks. Proceedings of the National Academy of Sciences, 110(36):14534–14539, 2013. [10] Shaobo Han, Xuejun Liao, David B Dunson, and Lawrence Carin. Variational gaussian copula inference. arXiv preprint arXiv:1506.05860, 2015. [11] Geoffrey E Hinton, Peter Dayan, Brendan J Frey, and Radford M Neal. The" wake-sleep" algorithm for unsupervised neural networks. Science, 268(5214):1158–1161, 1995. [12] Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013. [13] Matthew J Johnson, David Duvenaud, Alexander B Wiltschko, Sandeep R Datta, and Ryan P Adams. Composing graphical models with neural networks for structured representations and fast inference. arXiv preprint arXiv:1603.06277, 2016. [14] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [15] Steffen L Lauritzen and David J Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological), pages 157–224, 1988. [16] M. Lichman. UCI machine learning repository, 2013. [17] Dougal Maclaurin, David Duvenaud, Matthew Johnson, and Ryan P. Adams. Autograd: Reverse-mode differentiation of native Python, 2015. [18] Roger B Nelsen. An introduction to copulas, volume 139. Springer Science & Business Media, 2013. [19] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. [20] Andreas Stuhlmüller, Jacob Taylor, and Noah Goodman. Learning stochastic inverses. In Advances in neural information processing systems, pages 3048–3056, 2013. [21] Y. W. Teh, D. Newman, and M. Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In Advances in Neural Information Processing Systems, volume 19, 2007. [22] 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. [23] Dustin Tran, David Blei, and Edo M Airoldi. Copula variational inference. In Advances in Neural Information Processing Systems, pages 3550–3558, 2015. [24] Martin J Wainwright and Michael I Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends R⃝in Machine Learning, 1(1-2):1–305, 2008. 9 | 2016 | 271 |
6,185 | Improved Dropout for Shallow and Deep Learning Zhe Li1, Boqing Gong2, Tianbao Yang1 1The University of Iowa, Iowa city, IA 52245 2University of Central Florida, Orlando, FL 32816 {zhe-li-1,tianbao-yang}@uiowa.edu bgong@crcv.ucf.edu Abstract Dropout has been witnessed with great success in training deep neural networks by independently zeroing out the outputs of neurons at random. It has also received a surge of interest for shallow learning, e.g., logistic regression. However, the independent sampling for dropout could be suboptimal for the sake of convergence. In this paper, we propose to use multinomial sampling for dropout, i.e., sampling features or neurons according to a multinomial distribution with different probabilities for different features/neurons. To exhibit the optimal dropout probabilities, we analyze the shallow learning with multinomial dropout and establish the risk bound for stochastic optimization. By minimizing a sampling dependent factor in the risk bound, we obtain a distribution-dependent dropout with sampling probabilities dependent on the second order statistics of the data distribution. To tackle the issue of evolving distribution of neurons in deep learning, we propose an efficient adaptive dropout (named evolutional dropout) that computes the sampling probabilities on-the-fly from a mini-batch of examples. Empirical studies on several benchmark datasets demonstrate that the proposed dropouts achieve not only much faster convergence and but also a smaller testing error than the standard dropout. For example, on the CIFAR-100 data, the evolutional dropout achieves relative improvements over 10% on the prediction performance and over 50% on the convergence speed compared to the standard dropout. 1 Introduction Dropout has been widely used to avoid overfitting of deep neural networks with a large number of parameters [9, 16], which usually identically and independently at random samples neurons and sets their outputs to be zeros. Extensive experiments [4] have shown that dropout can help obtain the state-of-the-art performance on a range of benchmark data sets. Recently, dropout has also been found to improve the performance of logistic regression and other single-layer models for natural language tasks such as document classification and named entity recognition [21]. In this paper, instead of identically and independently at random zeroing out features or neurons, we propose to use multinomial sampling for dropout, i.e., sampling features or neurons according to a multinomial distribution with different probabilities for different features/neurons. Intuitively, it makes more sense to use non-uniform multinomial sampling than identical and independent sampling for different features/neurons. For example, in shallow learning if input features are centered, we can drop out features with small variance more frequently or completely allowing the training to focus on more important features and consequentially enabling faster convergence. To justify the multinomial sampling for dropout and reveal the optimal sampling probabilities, we conduct a rigorous analysis on the risk bound of shallow learning by stochastic optimization with multinomial dropout, and demonstrate that a distribution-dependent dropout leads to a smaller expected risk (i.e., faster convergence and smaller generalization error). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Inspired by the distribution-dependent dropout, we propose a data-dependent dropout for shallow learning, and an evolutional dropout for deep learning. For shallow learning, the sampling probabilities are computed from the second order statistics of features of the training data. For deep learning, the sampling probabilities of dropout for a layer are computed on-the-fly from the second-order statistics of the layer’s outputs based on a mini-batch of examples. This is particularly suited for deep learning because (i) the distribution of each layer’s outputs is evolving over time, which is known as internal covariate shift [5]; (ii) passing through all the training data in deep neural networks (in particular deep convolutional neural networks) is much more expensive than through a mini-batch of examples. For a mini-batch of examples, we can leverage parallel computing architectures to accelerate the computation of sampling probabilities. We note that the proposed evolutional dropout achieves similar effect to the batch normalization technique (Z-normalization based on a mini-batch of examples) [5] but with different flavors. Both approaches can be considered to tackle the issue of internal covariate shift for accelerating the convergence. Batch normalization tackles the issue by normalizing the output of neurons to zero mean and unit variance and then performing dropout independently 1. In contrast, our proposed evolutional dropout tackles this issue from another perspective by exploiting a distribution-dependent dropout, which adapts the sampling probabilities to the evolving distribution of a layer’s outputs. In other words, it uses normalized sampling probabilities based on the second order statistics of internal distributions. Indeed, we notice that for shallow learning with Z-normalization (normalizing each feature to zero mean and unit variance) the proposed data-dependent dropout reduces to uniform dropout that acts similarly to the standard dropout. Because of this connection, the presented theoretical analysis also sheds some lights on the power of batch normalization from the angle of theory. Compared to batch normalization, the proposed distribution-dependent dropout is still attractive because (i) it is rooted in theoretical analysis of the risk bound; (ii) it introduces no additional parameters and layers without complicating the back-propagation and the inference; (iii) it facilitates further research because its shares the same mathematical foundation as standard dropout (e.g., equivalent to a form of data-dependent regularizer) [18]. We summarize the main contributions of the paper below. • We propose a multinomial dropout and demonstrate that a distribution-dependent dropout leads to a faster convergence and a smaller generalization error through the risk bound analysis for shallow learning. • We propose an efficient evolutional dropout for deep learning based on the distributiondependent dropout. • We justify the proposed dropouts for both shallow learning and deep learning by experimental results on several benchmark datasets. In the remainder, we first review some related work and preliminaries. We present the main results in Section 4 and experimental results in Section 5. 2 Related Work In this section, we review some related work on dropout and optimization algorithms for deep learning. Dropout is a simple yet effective technique to prevent overfitting in training deep neural networks [16]. It has received much attention recently from researchers to study its practical and theoretical properties. Notably, Wager et al. [18], Baldi and Sadowski [2] have analyzed the dropout from a theoretical viewpoint and found that dropout is equivalent to a data-dependent regularizer. The most simple form of dropout is to multiply hidden units by i.i.d Bernoulli noise. Several recent works also found that using other types of noise works as well as Bernoulli noise (e.g., Gaussian noise), which could lead to a better approximation of the marginalized loss [20, 7]. Some works tried to optimize the hyper-parameters that define the noise level in a Bayesian framework [23, 7]. Graham et al. [3] used the same noise across a batch of examples in order to speed up the computation. The adaptive dropout proposed in[1] overlays a binary belief network over a neural netowrk, incurring more computational overhead to dropout because one has to train the additional binary belief network. In constrast, 1The author also reported that in some cases dropout is even not necessary 2 the present work proposes a new dropout with noise sampled according to distribution-dependent sampling probabilities. To the best of our knowledge, this is the first work that rigorously studies this type of dropout with theoretical analysis of the risk bound. It is demonstrated that the new dropout can improve the speed of convergence. Stochastic gradient descent with back-propagation has been used a lot in optimizing deep neural networks. However, it is notorious for its slow convergence especially for deep learning. Recently, there emerge a battery of studies trying to accelearte the optimization of deep learning [17, 12, 22, 5, 6], which tackle the problem from different perspectives. Among them, we notice that the developed evolutional dropout for deep learning achieves similar effect as batch normalization [5] addressing the internal covariate shift issue (i.e., evolving distributions of internal hidden units). 3 Preliminaries In this section, we present some preliminaries, including the framework of risk minimization in machine learning and learning with dropout noise. We also introduce the multinomial dropout, which allows us to construct a distribution-dependent dropout as revealed in the next section. Let (x, y) denote a feature vector and a label, where x ∈Rd and y ∈Y. Denote by P the joint distribution of (x, y) and denote by D the marginal distribution of x. The goal of risk minimization is to learn a prediction function f(x) that minimizes the expected loss, i.e., minf∈H EP[ℓ(f(x), y)], where ℓ(z, y) is a loss function (e.g., the logistic loss) that measures the inconsistency between z and y and H is a class of prediction functions. In deep learning, the prediction function f(x) is determined by a deep neural network. In shallow learning, one might be interested in learning a linear model f(x) = w⊤x. In the following presentation, the analysis will focus on the risk minimization of a linear model, i.e., min w∈Rd L(w) ≜EP[ℓ(w⊤x, y)] (1) In this paper, we are interested in learning with dropout, i.e., the feature vector x is corrupted by a dropout noise. In particular, let ϵ ∼M denote a dropout noise vector of dimension d, and the corrupted feature vector is given by bx = x ◦ϵ, where the operator ◦represents the element-wise multiplication. Let bP denote the joint distribution of the new data (bx, y) and bD denote the marginal distribution of bx. With the corrupted data, the risk minimization becomes min w∈Rd bL(w) ≜E b P[ℓ(w⊤(x ◦ϵ), y)] (2) In standard dropout [18, 4], the entries of the noise vector ϵ are sampled independently according to Pr(ϵj = 0) = δ and Pr(ϵj = 1 1−δ) = 1 −δ, i.e., features are dropped with a probability δ and scaled by 1 1−δ with a probability 1 −δ. We can also write ϵj = bj 1−δ, where bj ∈{0, 1}, j ∈[d] are i.i.d Bernoulli random variables with Pr(bj = 1) = 1 −δ. The scaling factor 1 1−δ is added to ensure that Eϵ[bx] = x. It is obvious that using the standard dropout different features will have equal probabilities to be dropped out or to be selected independently. However, in practice some features could be more informative than the others for learning purpose. Therefore, it makes more sense to assign different sampling probabilities for different features and make the features compete with each other. To this end, we introduce the following multinomial dropout. Definition 1. (Multinomial Dropout) A multinomial dropout is defined as bx = x ◦ϵ, where ϵi = mi kpi , i ∈[d] and {m1, . . . , md} follow a multinomial distribution Mult(p1, . . . , pd; k) with Pd i=1 pi = 1 and pi ≥0. Remark: The multinomial dropout allows us to use non-uniform sampling probabilities p1, . . . , pd for different features. The value of mi is the number of times that the i-th feature is selected in k independent trials of selection. In each trial, the probability that the i-th feature is selected is given by pi. As in the standard dropout, the normalization by kpi is to ensure that Eϵ[bx] = x. The parameter k plays the same role as the parameter 1 −δ in standard dropout, which controls the number of features to be dropped. In particular, the expected total number of the kept features using multinomial dropout is k and that using standard dropout is d(1 −δ). In the sequel, to make fair comparison between 3 the two dropouts, we let k = d(1 −δ). In this case, when a uniform distribution pi = 1/d is used in multinomial dropout to which we refer as uniform dropout, then ϵi = mi 1−δ, which acts similarly to the standard dropout using i.i.d Bernoulli random variables. Note that another choice to make the sampling probabilities different is still using i.i.d Bernoulli random variables but with different probabilities for different features. However, multinomial dropout is more suitable because (i) it is easy to control the level of dropout by varying the value of k; (ii) it gives rise to natural competition among features because of the constraint P i pi = 1; (iii) it allows us to minimize the sampling dependent risk bound for obtaining a better distribution than uniform sampling. Dropout is a data-dependent regularizer Dropout as a regularizer has been studied in [18, 2] for logistic regression, which is stated in the following proposition for ease of discussion later. Proposition 1. If ℓ(z, y) = log(1 + exp(−yz)), then E b P[ℓ(w⊤bx, y)] = EP[ℓ(w⊤x, y)] + RD,M(w) (3) where M denotes the distribution of ϵ and RD,M(w) = ED,M h log exp(w⊤x◦ϵ 2 )+exp(−w⊤x◦ϵ 2 ) exp(w⊤x/2)+exp(−w⊤x/2) i . Remark: It is notable that RD,M ≥0 due to the Jensen inequality. Using the second order Taylor expansion, [18] showed that the following approximation of RD,M(w) is easy to manipulate and understand: bRD,M(w) = ED[q(w⊤x)(1 −q(w⊤x))w⊤CM(x ◦ϵ)w] 2 (4) where q(w⊤x) = 1 1+exp(−w⊤x/2), and CM denotes the covariance matrix in terms of ϵ. In particular, if ϵ is the standard dropout noise, then CM[x ◦ϵ] = diag(x2 1δ/(1 −δ), . . . , x2 dδ/(1 −δ)), where diag(s1, . . . , sn) denotes a d×d diagonal matrix with the i-th entry equal to si. If ϵ is the multinomial dropout noise in Definition 1, we have CM[x ◦ϵ] = 1 k diag(x2 i /pi) −1 k xx⊤ (5) 4 Learning with Multinomial Dropout In this section, we analyze a stochastic optimization approach for minimizing the dropout loss in (2). Assume the sampling probabilities are known. We first obtain a risk bound of learning with multinomial dropout for stochastic optimization. Then we try to minimize the factors in the risk bound that depend on the sampling probabilities. We would like to emphasize that our goal here is not to show that using dropout would render a smaller risk than without using dropout, but rather focus on the impact of different sampling probabilities on the risk. Let the initial solution be w1. At the iteration t, we sample (xt, yt) ∼P and ϵt ∼M as in Definition 1 and then update the model by wt+1 = wt −ηt∇ℓ(w⊤ t (xt ◦ϵt), yt) (6) where ∇ℓdenotes the (sub)gradient in terms of wt and ηt is a step size. Suppose we run the stochastic optimization by n steps (i.e., using n examples) and compute the final solution as bwn = 1 n Pn t=1 wt. We note that another approach of learning with dropout is to minimize the empirical risk by marginalizing out the dropout noise, i.e., replacing the true expectations EP and ED in (3) with empirical expectations over a set of samples (x1, y1), . . . , (xn, yn) denoted by EPn and EDn. Since the data dependent regularizer RDn,M(w) is difficult to compute, one usually uses an approximation bRDn,M(w) (e.g., as in (4)) in place of RDn,M(w). However, the resulting problem is a non-convex optimization, which together with the approximation error would make the risk analysis much more involved. In contrast, the update in (6) can be considered as a stochastic gradient descent update for solving the convex optimization problem in (2), allowing us to establish the risk bound based on previous results of stochastic gradient descent for risk minimization [14, 15]. Nonetheless, this restriction does not lose the generality. Indeed, stochastic optimization is usually employed for solving empirical loss minimization in big data and deep learning. The following theorem establishes a risk bound of bwn in expectation. 4 Theorem 1. Let L(w) be the expected risk of w defined in (1). Assume E b D[∥x ◦ϵ∥2 2] ≤B2 and ℓ(z, y) is G-Lipschitz continuous. For any ∥w∗∥2 ≤r, by appropriately choosing η, we can have E[L(bwn) + RD,M(bwn)] ≤L(w∗) + RD,M(w∗) + GBr √n where E[·] is taking expectation over the randomness in (xt, yt, ϵt), t = 1, . . . , n. Remark: In the above theorem, we can choose w∗to be the best model that minimizes the expected risk in (1). Since RD,M(w) ≥0, the upper bound in the theorem above is also the upper bound of the risk of bwn, i.e., L(bwn), in expectation. The proof of the above theorem follows the standard analysis of stochastic gradient descent. The detailed proof of theorem is included in the appendix. 4.1 Distribution Dependent Dropout Next, we consider the sampling dependent factors in the risk bounds. From Theorem 1, we can see that there are two terms that depend on the sampling probabilities, i.e., B2 - the upper bound of E b D[∥x ◦ϵ∥2 2], and RD,M(w∗) −RD,M(bwn) ≤RD,M(w∗). We note that the second term also depends on w∗and bwn, which is more difficult to optimize. We first try to minimize E b D[∥x◦ϵ∥2 2] and present the discussion on minimizing RD,M(w∗) later. From Theorem 1, we can see that minimizing E b D[∥x ◦ϵ∥2 2] would lead to not only a smaller risk (given the same number of total examples, smaller E b D[∥x ◦ϵ∥2 2] gives a smaller risk bound) but also a faster convergence (with the same number of iterations, smaller E b D[∥x ◦ϵ∥2 2] gives a smaller optimization error). Due to the limited space, the proofs of Proposition 2, 3, 4 are included in supplement. The following proposition simplifies the expectation E b D[∥x ◦ϵ∥2 2]. Proposition 2. Let ϵ follow the distribution M defined in Definition 1. Then E b D[∥x ◦ϵ∥2 2] = 1 k d X i=1 1 pi ED[x2 i ] + k −1 k d X i=1 ED[x2 i ] (7) Given the expression of E b D[∥x ◦ϵ∥2 2] in Proposition 2, we can minimize it over p, leading to the following result. Proposition 3. The solution to p∗= arg minp≥0,p⊤1=1 E b D[∥x ◦ϵ∥2 2] is given by p∗ i = p ED[x2 i ] Pd j=1 q ED[x2 j] , i = 1, . . . , d (8) Next, we examine RD,M(w∗). Since direct manipulation on RD,M(w∗) is difficult, we try to minimize the second order Taylor expansion bRD,M(w∗) for logistic loss. The following theorem establishes an upper bound of bRD,M(w∗). Proposition 4. Let ϵ follow the distribution M defined in Definition 1. We have bRD,M(w∗) ≤ 1 8k∥w∗∥2 2 Pd i=1 ED[x2 i ] pi −ED[∥x∥2 2] Remark: By minimizing the relaxed upper bound in Proposition 4, we obtain the same sampling probabilities as in (8). We note that a tighter upper bound can be established, however, which will yield sampling probabilities dependent on the unknown w∗. In summary, using the probabilities in (8), we can reduce both E b D[∥x ◦ϵ∥2 2] and RD,M(w∗) in the risk bound, leading to a faster convergence and a smaller generalization error. In practice, we can use empirical second-order statistics to compute the probabilities, i.e., pi = q 1 n Pn j=1[[xj]2 i ] Pd i′=1 q 1 n Pn j=1[[xj]2 i′] (9) where [xj]i denotes the i-th feature of the j-th example, which gives us a data-dependent dropout. We state it formally in the following definition. 5 Evolutional Dropout for Deep Learning Input: a batch of outputs of a layer: Xl = (xl 1, . . . , xl m) and dropout level parameter k ∈[0, d] Output: b Xl = Xl ◦Σl Compute sampling probabilities by (10) For j = 1, . . . , m Sample ml j ∼Mult(pl 1, . . . , pl d; k) Construct ϵl j = ml j kpl ∈Rd, where pl = (pl 1, . . . , pl d)⊤ Let Σl = (ϵl 1, . . . , ϵl m) and compute b Xl = Xl ◦Σl Figure 1: Evolutional Dropout applied to a layer over a mini-batch Definition 2. (Data-dependent Dropout) Given a set of training examples (x1, y1), . . . , (xn, yn). A data-dependent dropout is defined as bx = x ◦ϵ, where ϵi = mi kpi , i ∈[d] and {m1, . . . , md} follow a multinomial distribution Mult(p1, . . . , pd; k) with pi given by (9). Remark: Note that if the data is normalized such that each feature has zero mean and unit variance (i.e., according to Z-normliazation), the data-dependent dropout reduces to uniform dropout. It implies that the data-dependent dropout achieves similar effect as Z-normalization plus uniform dropout. In this sense, our theoretical analysis also explains why Z-normalization usually speeds up the training [13]. 4.2 Evolutional Dropout for Deep Learning Next, we discuss how to implement the distribution-dependent dropout for deep learning. In training deep neural networks, the dropout is usually added to the intermediate layers (e.g., fully connected layers and convolutional layers). Let xl = (xl 1, . . . , xl d) denote the outputs of the l-th layer (with the index of data omitted). Adding dropout to this layer is equivalent to multiplying xl by a dropout noise vector ϵl, i.e., feeding bxl = xl ◦ϵl as the input to the next layer. Inspired by the datadependent dropout, we can generate ϵl according to a distribution given in Definition 1 with sampling probabilities pl i computed from {xl 1, . . . , xl n} similar to that (9). However, deep learning is usually trained with big data and a deep neural network is optimized by mini-batch stochastic gradient descent. Therefore, at each iteration it would be too expensive to afford the computation to pass through all examples. To address this issue, we propose to use a mini-batch of examples to calculate the second-order statistics similar to what was done in batch normalization. Let Xl = (xl 1, . . . , xl m) denote the outputs of the l-th layer for a mini-batch of m examples. Then we can calculate the probabilities for dropout by pl i = q 1 m Pm j=1[[xl j]2 i ] Pd i′=1 q 1 m Pm j=1[[xl j]2 i′] , i = 1, . . . , d (10) which define the evolutional dropout named as such because the probabilities pl i will also evolve as the the distribution of the layer’s outputs evolve. We describe the evolutional dropout as applied to a layer of a deep neural network in Figure 1. Finally, we would like to compare the evolutional dropout with batch normalization. Similar to batch normalization, evolutional dropout can also address the internal covariate shift issue by adapting the sampling probabilities to the evolving distribution of layers’ outputs. However, different from batch normalization, evolutional dropout is a randomized technique, which enjoys many benefits as standard dropout including (i) the back-propagation is simple to implement (just multiplying the gradient of b Xl by the dropout mask to get the gradient of Xl); (ii) the inference (i.e., testing) remains the same 2; (iii) it is equivalent to a data-dependent regularizer with a clear mathematical explanation; 2Different from some implementations for standard dropout which doest no scale by 1/(1 −δ) in training but scale by 1 −δ in testing, here we do scale in training and thus do not need any scaling in testing. 6 (iv) it prevents units from co-adapting of neurons, which facilitate generalization. Moreover, the evolutional dropout has its root in distribution-dependent dropout, which has theoretical guarantee to accelerate the convergence and improve the generalization for shallow learning. 5 Experimental Results In the section, we present some experimental results to justify the proposed dropouts. In all experiments, we set δ = 0.5 in the standard dropout and k = 0.5d in the proposed dropouts for fair comparison, where d represents the number of features or neurons of the layer that dropout is applied to. For the sake of clarity, we divided the experiments into three parts. In the first part, we compare the performance of the data-dependent dropout (d-dropout) to the standard dropout (s-dropout) for logistic regression. In the second part, we compare the performance of evolutional dropout (e-dropout) to the standard dropout for training deep convolutional neural networks. Finally, we compare e-dropout with batch normalization. # of iters ×104 0 1 2 3 4 5 6 error 0 0.05 0.1 0.15 0.2 0.25 0.3 s-dropout(tr) s-dropout(te) d-dropout(tr) d-dropout(te) # of iters ×104 0 1 2 3 4 error 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 s-dropout(tr) s-dropout(te) d-dropout(tr) d-dropout(te) # of iters ×105 0 2 4 6 8 error 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 s-dropout(tr) s-dropout(te) d-dropout(tr) d-dropout(te) # of iters ×104 0 1 2 3 4 5 6 7 test accuracy 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 no BN and no Dropout BN BN+Dropout Evolutional Dropout Figure 2: Left three: data-dependent dropout vs. standard dropout on three data sets (real-sim, news20, RCV1) for logistic regression; Right: Evolutional dropout vs BN on CIFAR-10. (best seen in color). 5.1 Shallow Learning We implement the presented stochastic optimization algorithm. To evaluate the performance of data-dependent dropout for shallow learning, we use the three data sets: real-sim, news20 and RCV13. In this experiment, we use a fixed step size and tune the step size in [0.1, 0.05, 0.01, 0.005, 0.001, 0.0005, 0.0001] and report the best results in terms of convergence speed on the training data for both standard dropout and data-dependent dropout. The left three panels in Figure 2 show the obtained results on these three data sets. In each figure, we plot both the training error and the testing error. We can see that both the training and testing errors using the proposed data-dependent dropout decrease much faster than using the standard dropout and also a smaller testing error is achieved by using the data-dependent dropout. 5.2 Evolutional Dropout for Deep Learning We would like to emphasize that we are not aiming to obtain better prediction performance by trying different network structures and different engineering tricks such as data augmentation, whitening, etc., but rather focus on the comparison of the proposed dropout to the standard dropout using Bernoulli noise on the same network structure. In our experiments, we use the default splitting of training and testing data in all data sets. We directly optimize the neural networks using all training images without further splitting it into a validation data to be added into the training in later stages, which explains some marginal gaps from the literature results that we observed (e.g., on CIFAR-10 compared with [19]). We conduct experiments on four benchmark data sets for comparing e-dropout and s-dropout: MNIST [10], SVHN [11], CIFAR-10 and CIFAR-100 [8]. We use the same or similar network structure as in the literatures for the four data sets. In general, the networks consist of convolution layers, pooling layers, locally connected layers, fully connected layers, softmax layers and a cost layer. For the detailed neural network structures and their parameters, please refer to the supplementary materials. The dropout is added to some fully connected layers or locally connected layers. The rectified linear activation function is used for all neurons. All the experiments are conducted using the cuda-convnet library 4. The training procedure is similar to [9] using mini-batch SGD with momentum (0.9). The 3https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/ 4https://code.google.com/archive/p/cuda-convnet/ 7 # of iters 0 2000 4000 6000 8000 error 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 s-dropout(tr) s-dropout(te) e-dropout(tr) e-dropout(te) (a) MNIST # of iters 0 2000 4000 6000 8000 10000 12000 error 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 s-dropout(tr) s-dropout(te) e-dropout(tr) e-dropout(te) (b) SVHN # of Iters ×105 0 1 2 3 4 5 6 error 0 0.1 0.2 0.3 0.4 0.5 0.6 s-dropout(tr) s-dropout(te) e-dropout(tr) e-dropout(te) (c) CIFAR-10 # of iters ×104 0 2 4 6 8 10 12 error 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 s-dropout(tr) s-dropout(te) e-dropout(tr) e-dropout(te) (d) CIFAR-100 Figure 3: Evolutional dropout vs. standard dropout on four benchmark datasets for deep learning (best seen in color). size of mini-batch is fixed to 128. The weights are initialized based on the Gaussian distribution with mean zero and standard deviation 0.01. The learning rate (i.e., step size) is decreased after a number of epochs similar to what was done in previous works [9]. We tune the initial learning rates for s-dropout and e-dropout separately from 0.001, 0.005, 0.01, 0.1 and report the best result on each data set that yields the fastest convergence. Figure 3 shows the training and testing error curves in the optimization process on the four data sets using the standard dropout and the evolutional dropout. For SVHN data, we only report the first 12000 iterations, after which the error curves of the two methods almost overlap. We can see that using the evolutional dropout generally converges faster than using the standard dropout. On CIFAR100 data, we have observed significant speed-up. In particular, the evolutional dropout achieves relative improvements over 10% on the testing performance and over 50% on the convergence speed compared to the standard dropout. 5.3 Comparison with the Batch Normalization (BN) Finally, we make a comparison between the evolutional dropout and the batch normalization. For batch normalization, we use the implementation in Caffe 5. We compare the evolutional dropout with the batch normalization on CIFAR-10 data set. The network structure is from the Caffe package and can be found in the supplement, which is different from the one used in the previous experiment. It contains three convolutional layers and one fully connected layer. Each convolutional layer is followed by a pooling layer. We compare four methods: (1) No BN and No dropout - without using batch normalization and dropout; (2) BN; (3) BN with standard dropout; (4) Evolutional Dropout. The rectified linear activation is used in all methods. We also tried BN with the sigmoid activation function, which gives worse results. For the methods with BN, three batch normalization layers are inserted before or after each pooling layer following the architecture given in Caffe package (see supplement). For the evolutional dropout training, only one layer of dropout is added to the the last convolutional layer. The mini-batch size is set to 100, the default value in Caffe. The initial learning rates for the four methods are set to the same value (0.001), and they are decreased once by ten times. The testing accuracy versus the number of iterations is plotted in the right panel of Figure 2, from which we can see that the evolutional dropout training achieves comparable performance with BN + standard dropout, which justifies our claim that evolutional dropout also addresses the internal covariate shift issue. 6 Conclusion In this paper, we have proposed a distribution-dependent dropout for both shallow learning and deep learning. Theoretically, we proved that the new dropout achieves a smaller risk and faster convergence. Based on the distribution-dependent dropout, we developed an efficient evolutional dropout for training deep neural networks that adapts the sampling probabilities to the evolving distributions of layers’ outputs. Experimental results on various data sets verified that the proposed dropouts can dramatically improve the convergence and also reduce the testing error. Acknowledgments We thank anonymous reviewers for their comments. Z. Li and T. Yang are partially supported by National Science Foundation (IIS-1463988, IIS-1545995). B. Gong is supported in part by NSF (IIS-1566511) and a gift from Adobe. 5https://github.com/BVLC/caffe/ 8 References [1] Jimmy Ba and Brendan Frey. Adaptive dropout for training deep neural networks. In Advances in Neural Information Processing Systems, pages 3084–3092, 2013. [2] Pierre Baldi and Peter J Sadowski. Understanding dropout. In Advances in Neural Information Processing Systems, pages 2814–2822, 2013. [3] Benjamin Graham, Jeremy Reizenstein, and Leigh Robinson. Efficient batchwise dropout training using submatrices. CoRR, abs/1502.02478, 2015. [4] Geoffrey E Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012. [5] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [6] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [7] Diederik P. Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. CoRR, abs/1506.02557, 2015. [8] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. [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] 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. [11] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, page 4. Granada, Spain, 2011. [12] Behnam Neyshabur, Ruslan R Salakhutdinov, and Nati Srebro. Path-sgd: Path-normalized optimization in deep neural networks. In Advances in Neural Information Processing Systems, pages 2413–2421, 2015. [13] Marc’Aurelio Ranzato, Alex Krizhevsky, and Geoffrey E. Hinton. Factored 3-way restricted boltzmann machines for modeling natural images. In AISTATS, pages 621–628, 2010. [14] Shai Shalev-Shwartz, Ohad Shamir, Nathan Srebro, and Karthik Sridharan. Stochastic convex optimization. In The 22nd Conference on Learning Theory (COLT), 2009. [15] Nathan Srebro, Karthik Sridharan, and Ambuj Tewari. Smoothness, low noise and fast rates. In Advances in Neural Information Processing Systems 23 (NIPS), pages 2199–2207, 2010. [16] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15 (1):1929–1958, 2014. [17] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Proceedings of the 30th international conference on machine learning (ICML-13), pages 1139–1147, 2013. [18] Stefan Wager, Sida Wang, and Percy S Liang. Dropout training as adaptive regularization. In Advances in Neural Information Processing Systems, pages 351–359, 2013. [19] 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. [20] Sida Wang and Christopher Manning. Fast dropout training. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 118–126, 2013. [21] Sida I Wang, Mengqiu Wang, Stefan Wager, Percy Liang, and Christopher D Manning. Feature noising for log-linear structured prediction. In EMNLP, pages 1170–1179, 2013. [22] Sixin Zhang, Anna Choromanska, and Yann LeCun. Deep learning with elastic averaging sgd. arXiv preprint arXiv:1412.6651, 2014. [23] Jingwei Zhuo, Jun Zhu, and Bo Zhang. Adaptive dropout rates for learning with corrupted features. In IJCAI, pages 4126–4133, 2015. 9 | 2016 | 272 |
6,186 | Clustering Signed Networks with the Geometric Mean of Laplacians Pedro Mercado1, Francesco Tudisco2 and Matthias Hein1 1Saarland University, Saarbrücken, Germany 2University of Padua, Padua, Italy Abstract Signed networks allow to model positive and negative relationships. We analyze existing extensions of spectral clustering to signed networks. It turns out that existing approaches do not recover the ground truth clustering in several situations where either the positive or the negative network structures contain no noise. Our analysis shows that these problems arise as existing approaches take some form of arithmetic mean of the Laplacians of the positive and negative part. As a solution we propose to use the geometric mean of the Laplacians of positive and negative part and show that it outperforms the existing approaches. While the geometric mean of matrices is computationally expensive, we show that eigenvectors of the geometric mean can be computed efficiently, leading to a numerical scheme for sparse matrices which is of independent interest. 1 Introduction A signed graph is a graph with positive and negative edge weights. Typically positive edges model attractive relationships between objects such as similarity or friendship and negative edges model repelling relationships such as dissimilarity or enmity. The concept of balanced signed networks can be traced back to [10, 3]. Later, in [5], a signed graph is defined as k-balanced if there exists a partition into k groups where only positive edges are within the groups and negative edges are between the groups. Several approaches to find communities in signed graphs have been proposed (see [23] for an overview). In this paper we focus on extensions of spectral clustering to signed graphs. Spectral clustering is a well established method for unsigned graphs which, based on the first eigenvectors of the graph Laplacian, embeds nodes of the graphs in Rk and then uses k-means to find the partition. In [16] the idea is transferred to signed graphs. They define the signed ratio and normalized cut functions and show that the spectrum of suitable signed graph Laplacians yield a relaxation of those objectives. In [4] other objective functions for signed graphs are introduced. They show that a relaxation of their objectives is equivalent to weighted kernel k-means by choosing an appropriate kernel. While they have a scalable method for clustering, they report that they can not find any cluster structure in real world signed networks. We show that the existing extensions of the graph Laplacian to signed graphs used for spectral clustering have severe deficiencies. Our analysis of the stochastic block model for signed graphs shows that, even for the perfectly balanced case, recovery of the ground-truth clusters is not guaranteed. The reason is that the eigenvectors encoding the cluster structure do not necessarily correspond to the smallest eigenvalues, thus leading to a noisy embedding of the data points and in turn failure of k-means to recover the cluster structure. The implicit mathematical reason is that all existing extensions of the graph Laplacian are based on some form of arithmetic mean of operators of the positive and negative graphs. In this paper we suggest as a solution to use the geometric mean of the Laplacians of positive and negative part. In particular, we show that in the stochastic block model the geometric mean Laplacian allows in expectation to recover the ground-truth clusters in 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. any reasonable clustering setting. A main challenge for our approach is that the geometric mean Laplacian is computationally expensive and does not scale to large sparse networks. Thus a main contribution of this paper is showing that the first few eigenvectors of the geometric mean can still be computed efficiently. Our algorithm is based on the inverse power method and the extended Krylov subspace technique introduced by [8] and allows to compute eigenvectors of the geometric mean A#B of two matrices A, B without ever computing A#B itself. In Section 2 we discuss existing work on Laplacians on signed graphs. In Section 3 we discuss the geometric mean of two matrices and introduce the geometric mean Laplacian which is the basis of our spectral clustering method for signed graphs. In Section 4 we analyze our and existing approaches for the stochastic block model. In Section 5 we introduce our efficient algorithm to compute eigenvectors of the geometric mean of two matrices, and finally in Section 6 we discuss performance of our approach on real world graphs. Proofs have been moved to the supplementary material. 2 Signed graph clustering Networks encoding positive and negative relations among the nodes can be represented by weighted signed graphs. Consider two symmetric non-negative weight matrices W + and W −, a vertex set V = {v1, . . . , vn}, and let G+ = (V, W +) and G−= (V, W −) be the induced graphs. A signed graph is the pair G± = (G+, G−) where G+ and G−encode positive and the negative relations, respectively. The concept of community in signed networks is typically related to the theory of social balance. This theory, as presented in [10, 3], is based on the analysis of affective ties, where positive ties are a source of balance whereas negative ties are considered as a source of imbalance in social groups. Definition 1 ([5], k-balance). A signed graph is k-balanced if the set of vertices can be partitioned into k sets such that within the subsets there are only positive edges, and between them only negative. The presence of k-balance in G± implies the presence of k groups of nodes being both assortative in G+ and dissassortative in G−. However this situation is fairly rare in real world networks and expecting communities in signed networks to be a perfectly balanced set of nodes is unrealistic. In the next section we will show that Laplacians inspired by Definition 1 are based on some form of arithmetic mean of Laplacians. As an alternative we propose the geometric mean of Laplacians and show that it is able to recover communities when either G+ is assortative, or G−is disassortative, or both. Results of this paper will make clear that the use of the geometric mean of Laplacians allows to recognize communities where previous approaches fail. 2.1 Laplacians on Unsigned Graphs Spectral clustering of undirected, unsigned graphs using the Laplacian matrix is a well established technique (see [19] for an overview). Given an unsigned graph G = (V, W), the Laplacian and its normalized version are defined as L = D −W Lsym = D−1/2LD−1/2 (1) where Dii = Pn j=1 wij is the diagonal matrix of the degrees of G. Both Laplacians are positive semidefinite, and the multiplicity k of the eigenvalue 0 is equal to the number of connected components in the graph. Further, the Laplacian is suitable in assortative cases [19], i.e. for the identification of clusters under the assumption that the amount of edges inside clusters has to be larger than the amount of edges between them. For disassortative cases, i.e. for the identification of clusters where the amount of edges has to be larger between clusters than inside clusters, the signless Laplacian is a better choice [18]. Given the unsigned graph G = (V, W), the signless Laplacian and its normalized version are defined as Q = D + W, Qsym = D−1/2QD−1/2 (2) Both Laplacians are positive semi-definite, and the smallest eigenvalue is zero if and only if the graph has a bipartite component [6]. 2 2.2 Laplacians on Signed Graphs Recently a number of Laplacian operators for signed networks have been introduced. Consider the signed graph G± = (G+, G−). Let D+ ii = Pn j=1 w+ ij be the diagonal matrix of the degrees of G+ and ¯Dii = Pn j=1 w+ ij + w− ij the one of the overall degrees in G±. The following Laplacians for signed networks have been considered so far LBR = D+ −W ++W −, LBN = ¯D−1LBR, (balance ratio/normalized Laplacian) LSR = ¯D −W ++W −, LSN = ¯D−1/2LSR ¯D−1/2, (signed ratio/normalized Laplacian) (3) and spectral clustering algorithms have been proposed for G±, based on these Laplacians [16, 4]. Let L+ and Q−be the Laplacian and the signless Laplacian matrices of the graphs G+ and G−, respectively. We note that the matrix LSR blends the informations from G+ and G−into (twice) the arithmetic mean of L+ and Q−, namely the following identity holds LSR = L+ + Q−. (4) Thus, as an alternative to the normalization defining LSN from LSR, it is natural to consider the arithmetic mean of the normalized Laplacians LAM = L+ sym + Q− sym. In the next section we introduce the geometric mean of L+ sym and Q− sym and propose a new clustering algorithm for signed graphs based on that matrix. The analysis and experiments of next sections will show that blending the information from the positive and negative graphs trough the geometric mean overcomes the deficiencies showed by the arithmetic mean based operators. 3 Geometric mean of Laplacians We define here the geometric mean of matrices and introduce the geometric mean of normalized Laplacians for clustering signed networks. Let A1/2 be the unique positive definite solution of the matrix equation X2 = A, where A is positive definite. Definition 2. Let A, B be positive definite matrices. The geometric mean of A and B is the positive definite matrix A#B defined by A#B = A1/2(A−1/2BA−1/2)1/2A1/2. One can prove that A#B = B#A (see [1] for details). Further, there are several useful ways to represent the geometric mean of positive definite matrices (see f.i. [1, 12]) A#B = A(A−1B)1/2 = (BA−1)1/2A = B(B−1A)1/2 = (AB−1)1/2B (5) The next result reveals further consistency with the scalar case, in fact we observe that if A and B have some eigenvectors in common, then A+B and A#B have those eigenvectors, with eigenvalues given by the arithmetic and geometric mean of the corresponding eigenvalues of A and B, respectively. Theorem 1. Let u be an eigenvector of A and B with eigenvalues λ and µ, respectively. Then, u is an eigenvector of A + B and A#B with eigenvalue λ + µ and √λµ, respectively. 3.1 Geometric mean for signed networks clustering Consider the signed network G± = (G+, G−). We define the normalized geometric mean Laplacian of G± as LGM = L+ sym#Q− sym (6) We propose Algorithm 1 for clustering signed networks, based on the spectrum of LGM. By definition 2, the matrix geometric mean A#B requires A and B to be positive definite. As both the Laplacian and the signless Laplacian are positve semi-definte, in what follows we shall assume that the matrices L+ sym and Q− sym in (6) are modified by a small diagonal shift, ensuring positive definiteness. That is, in practice, we consider L+ sym + ε1I and Q− sym + ε2I being ε1 and ε2 small positive numbers. For the sake of brevity, we do not explicitly write the shifting matrices. Input: Symmetric weight matrices W +, W −∈Rn×n, number k of clusters to construct. Output: Clusters C1, . . . , Ck. 1 Compute the k eigenvectors u1, . . . , uk corresponding to the k smallest eigenvalues of LGM. 2 Let U = (u1, . . . , uk). 3 Cluster the rows of U with k-means into clusters C1, . . . , Ck. Algorithm 1: Spectral clustering with LGM on signed networks 3 (E+) p+ out < p+ in (E−) p− in < p− out (Ebal) p− in + p+ out < p+ in + p− out (Evol) p− in + (k −1)p− out < p+ in + (k −1)p+ out (Econf) kp+ out p+ in+(k−1)p+ out kp− in p− in+(k−1)p− out < 1 (EG) kp+ out p+ in+(k−1)p+ out 1 + p− in−p− out p− in+(k−1)p− out < 1 Table 1: Conditions for the Stochastic Block Model analysis of Section 4 The main bottleneck of Algorithm 1 is the computation of the eigenvectors in step 1. In Section 5 we propose a scalable Krylov-based method to handle this problem. Let us briefly discuss the motivating intuition behind the proposed clustering strategy. Algorithm 1, as well as state-of-the-art clustering algorithms based on the matrices in (3), rely on the k smallest eigenvalues of the considered operator and their corresponding eigenvectors. Thus the relative ordering of the eigenvalues plays a crucial role. Assume the eigenvalues to be enumerated in ascending order. Theorem 1 states that the functions (A, B) 7→A + B and (A, B) 7→A#B map eigenvalues of A and B having the same corresponding eigenvectors, into the arithmetic mean λi(A) + λj(B) and geometric mean p λi(A)λj(B), respectively, where λi(·) is the ith smallest eigenvalue of the corresponding matrix. Note that the indices i and j are not the same in general, as the eigenvectors shared by A and B may be associated to eigenvalues having different positions in the relative ordering of A and B. This intuitively suggests that small eigenvalues of A + B are related to small eigenvalues of both A and B, whereas those of A#B are associated with small eigenvalues of either A or B, or both. Therefore the relative ordering of the small eigenvalues of LGM is influenced by the presence of assortative clusters in G+ (related to small eigenvalues of L+ sym) or by disassortative clusters in G−(related to small eigenvalues in Q− sym), whereas the ordering of the small eigenvalues of the arithmetic mean takes into account only the presence of both those situations. In the next section, for networks following the stochastic block model, we analyze in expectation the spectrum of the normalized geometric mean Laplacian as well as the one of the normalized Laplacians previously introduced. In this case the expected spectrum can be computed explicitly and we observe that in expectation the ordering induced by blending the informations of G+ and G− trough the geometric mean allows to recover the ground truth clusters perfectly, whereas the use of the arithmetic mean introduces a bias which reverberates into a significantly higher clustering error. 4 Stochastic block model on signed graphs In this section we present an analysis of different signed graph Laplacians based on the Stochastic Block Model (SBM). The SBM is a widespread benchmark generative model for networks showing a clustering, community, or group behaviour [22]. Given a prescribed set of groups of nodes, the SBM defines the presence of an edge as a random variable with probability being dependent on which groups it joins. To our knowledge this is the first analysis of spectral clustering on signed graphs with the stochastic block model. Let C1, . . . , Ck be ground truth clusters, all having the same size |C|. We let p+ in (p− in) be the probability that there exists a positive (negative) edge between nodes in the same cluster, and let p+ out (p− out) denote the probability of a positive (negative) edge between nodes in different clusters. Calligraphic letters denote matrices in expectation. In particular W+ and W−denote the weight matrices in expectation. We have W+ i,j = p+ in and W− i,j = p− in if vi, vj belong to the same cluster, whereas W+ i,j = p+ out and W− i,j = p− out if vi, vj belong to different clusters. Sorting nodes according to the ground truth clustering shows that W+ and W−have rank k. Consider the relations in Table 1. Conditions E+ and E−describe the presence of assortative or disassortative clusters in expectation. Note that, by Definition 1, a graph is balanced if and only if p+ out = p− in = 0. We can see that if E+ ∩E−then G−and G+ give information about the cluster structure. Further, if E+ ∩E−holds then Ebal holds. Similarly Econf characterizes a graph where the relative amount of conflicts - i.e. positive edges between the clusters and negative edges inside the clusters - is small. Condition EG is strictly related to such setting. In fact when E−∩EG holds then 4 Econf holds. Finally condition Evol implies that the expected volume in the negative graph is smaller than the expected volume in the positive one. This condition is therefore not related to any signed clustering structure. Let χ1 = 1, χi = (k −1)1Ci −1Ci . The use of k-means on χi, i = 1, . . . , k identifies the ground truth communities Ci. As spectral clustering relies on the eigenvectors corresponding to the k smallest eigenvalues (see Algorithm 1) we derive here necessary and sufficient conditions such that in expectation the eigenvectors χi, i = 1, . . . , k correspond to the k smallest eigenvalues of the normalized Laplacians introduced so far. In particular, we observe that condition EG affects the ordering of the eigenvalues of the normalized geometric mean Laplacian. Instead, the ordering of the eigenvalues of the operators based on the arithmetic mean is related to Ebal and Evol. The latter is not related to any clustering, thus introduces a bias in the eigenvalues ordering which reverberates into a noisy embedding of the data points and in turn into a significantly higher clustering error. Theorem 2. Let LBN and LSN be the normalized Laplacians defined in (3) of the expected graphs. The following statements are equivalent: 1. χ1, . . . , χk are the eigenvectors corresponding to the k smallest eigenvalues of LBN. 2. χ1, . . . , χk are the eigenvectors corresponding to the k smallest eigenvalues of LSN. 3. The two conditions Ebal and Evol hold simultaneously. Theorem 3. Let LGM = L+ sym#Q− sym be the geometric mean of the Laplacians of the expected graphs. Then χ1, . . . , χk are the eigenvectors corresponding to the k smallest eigenvalues of LGM if and only if condition EG holds. Conditions for the geometric mean Laplacian of diagonally shifted Laplacians are available in the supplementary material. Intuition suggests that a good model should easily identify clusters when E+ ∩E−. However, unlike condition EG, condition Evol ∩Ebal is not directly satisfied under that regime. Specifically, we have Corollary 1. Assume that E+ ∩E−holds. Then χ1, . . . , χk are eigenvectors corresponding to the k smallest eigenvalues of LGM. Let p(k) denote the proportion of cases where χ1, . . . , χk are the eigenvectors of the k smallest eigenvalues of LSN or LBN, then p(k) ≤1 6 + 2 3(k−1) + 1 (k−1)2 . In order to grasp the difference in expectation between LBN, LSN and LGM, in Fig 1 we present the proportion of cases where Theorems 2 and 3 hold under different contexts. Experiments are done with all four parameters discretized in [0, 1] with 100 steps. The expected proportion of cases where EG holds (Theorem 3) is far above the corresponding proportion for Evol ∩Ebal (Theorem 2), showing that in expectation the geometric mean Laplacian is superior to the other signed Laplacians. In Fig. 2 we present experiments on sampled graphs with k-means on top of the k smallest eigenvectors. In all cases we consider clusters of size |C| = 100 and present the median of clustering error (i.e., error when clusters are labeled via majority vote) of 50 runs. The results show that the analysis made in expectation closely resembles the actual behavior. In fact, even if we expect only one noisy eigenvector for LBN and LSN, the use of the geometric mean Laplacian significantly outperforms any other previously proposed technique in terms of clustering error. LSN and LBN achieve good clustering only when the graph resembles a k-balanced structure, whereas they fail even in the ideal situation where either the positive or the negative graphs are informative about the cluster structure. As shown in Section 6, the advantages of LGM over the other Laplacians discussed so far allow us to identify a clustering structure on the Wikipedia benchmark real world signed network, where other clustering approaches have failed. 5 Krylov-based inverse power method for small eigenvalues of L+ sym#Q− sym The computation of the geometric mean A#B of two positive definite matrices of moderate size has been discussed extensively by various authors [20, 11, 12, 13]. However, when A and B have large dimensions, the approaches proposed so far become unfeasible, in fact A#B is in general a full matrix even if A and B are sparse. In this section we present a scalable algorithm for the computation of the smallest eigenvectors of L+ sym#Q− sym. The method is discussed for a general pair of matrices A and B, to emphasize its general applicability which is therefore interesting in itself. We remark that 5 2 5 10 25 50 100 Number of clusters 0 0.2 0.4 0.6 0.8 1 Positive and Negative Informative: p+ out < p+ in and p− in < p− out Upper bound LSN, LBN LGM (ours) 2 5 10 25 50 100 Number of clusters Positive or Negative Informative: p+ out < p+ in or p− in < p− out 2 5 10 25 50 100 Number of clusters p− in + p+ out < p+ in + p− out Figure 1: Fraction of cases where in expectation χ1, . . . , χk correspond to the k smallest eigenvalues under the SBM. -0.05 0 0.05 Positive Information: p+ in −p+ out 0 0.1 0.2 0.3 0.4 Median Clustering Error Negative Informative p− in = 0.01, p− out = 0.09 -0.05 0 0.05 Negative Information: p− in −p− out Positive Informative p+ in = 0.09, p+ out = 0.01 2 5 7 10 Sparsity (%) Negative Informative p− out/p− in = 9/1 p+ out/p+ in = 1 ± 0.3 2 5 7 10 Sparsity (%) Positive Informative p+ out/p+ in = 1/9 p− out/p− in = 1 ± 0.3 L+sym Q−sym LSN LBN LAM LGM(ours) Figure 2: Median clustering error under the stochastic block model over 50 runs. the method takes advantage of the sparsity of A and B and does not require to explicitly compute the matrix A#B. To our knowledge this is the first effective method explicitly built for the computation of the eigenvectors of the geometric mean of two large and sparse positive definite matrices. Given a positive definite matrix M with eigenvalues λ1 ≤· · · ≤λn, let H be any eigenspace of M associated to λ1, . . . , λt. The inverse power method (IPM) applied to M is a method that converges to an eigenvector x associated to the smallest eigenvalue λH of M such that λH ̸= λi, i = 1, . . . , t. The pseudocode of IPM applied to A#B = A(A−1B)1/2 is shown in Algorithm 2. Given a vector v and a matrix M, the notation solve{M, v} is used to denote a procedure returning the solution x of the linear system Mx = v. At each step the algorithm requires the solution of two linear systems. The first one (line 2) is solved by the preconditioned conjugate gradient method, where the preconditioner is obtained by the incomplete Cholesky decomposition of A. Note that the conjugate gradient method is very fast, as A is assumed sparse and positive definite, and it is matrix-free, i.e. it requires to compute the action of A on a vector, whereas it does not require the knowledge of A (nor its inverse). The solution of the linear system occurring in line 3 is the major inner-problem of the proposed algorithm. Its efficient solution is performed by means of an extended Krylov subspace technique that we describe in the next section. The proposed implementation ensures the whole IPM is matrix-free and scalable. 5.1 Extended Krylov subspace method for the solution of the linear system (A−1B)1/2x = y We discuss here how to apply the technique known as Extended Krylov Subspace Method (EKSM) for the solution of the linear system (A−1B)1/2x = y. Let M be a large and sparse matrix, and y a given vector. When f is a function with a single pole, EKSM is a very effective method to approximate the vector f(M)y without ever computing the matrix f(M) [8]. Note that, given two positive definite matrices A and B and a vector y, the vector we want to compute is x = (A−1B)−1/2y, so that our problem boils down to the computation of the product f(M)y, where M = A−1B and f(X) = X−1/2. The general idea of EKSM s-th iteration is to project M onto the subspace Ks(M, y) = span{y, My, M −1y, . . . , M s−1y, M 1−sy} , and solve the problem there. The projection onto Ks(M, y) is realized by means of the Lanczos process, which produces a sequence of matrices Vs with orthogonal columns, such that the first 6 column of Vs is a multiple of y and range(Vs) = Ks(M, y). Moreover at each step we have MVs = VsHs + [us+1, vs+1][e2s+1, e2s+2]T (7) where Hs is 2s × 2s symmetric tridiagonal, us+1 and vs+1 are orthogonal to Vs, and ei is the i-th canonical vector. The solution x is then approximated by xs = Vsf(Hs)e1∥y∥≈f(M)y. If n is the order of M, then the exact solution is obtained after at most n steps. However, in practice, significantly fewer iterations are enough to achieve a good approximation, as the error ∥xs −x∥ decays exponentially with s (Thm 3.4 and Prop. 3.6 in [14]). See the supplementary material for details. The pseudocode for the extended Krylov iteration is presented in Algorithm 3. We use the stopping criterion proposed in [14]. It is worth pointing out that at step 4 of the algorithm we can freely choose any scalar product ⟨·, ·⟩, without affecting formula (7) nor the convergence properties of the method. As M = A−1B, we use the scalar product ⟨u, v⟩A = uT Av induced by the positive definite matrix A, so that the computation of the tridiagonal matrix Hs in the algorithm simplifies to V T s BVs. We refer to [9] for further details. As before, the solve procedure is implemented by means of the preconditioned conjugate gradient method, where the preconditioner is obtained by the incomplete Cholesky decomposition of the coefficient matrix. Figure 3 shows that we are able to compute the smallest eigenvector of L+ sym#Q− sym being just a constant factor worse than the computation of the eigenvector of the arithmetic mean, whereas the direct computation of the geometric mean followed by the computation of the eigenvectors is unfeasible for large graphs. Input: x0, eigenspace H of A#B. Output: Eigenpair (λH, x) of A#B 1 repeat 2 uk ←solve{A, xk} 3 vk ←solve{(A−1B)1/2, uk} 4 yk ←project uk over H⊥ 5 xk+1 ←yk/∥yk∥2 6 until tolerance reached 7 λH ←xT k+1xk, x ←xk+1 Algorithm 2: IPM applied to A#B.1/2 Input: u0 = y, V0 = [ · ] Output: x = (A−1B)−1/2y 1 v0 ←solve{B, Au0} 2 for s = 0, 1, 2, . . . , n do 3 ˜Vs+1 ←[Vs, us, vs] 4 Vs+1 ←Orthogonalize columns of ˜Vs+1 w.r.t. ⟨·, ·⟩A 5 Hs+1 ←V T s+1BVs+1 6 xs+1 ←H−1/2 s+1 e1 7 if tolerance reached then break 8 us+1 ←solve{A, BVs+1e1} 9 vs+1 ←solve{B, AVs+1e2} 10 end 11 x ←Vs+1xs+1 Algorithm 3: EKSM for the computation of (A−1B)−1/2y 2 4 6 8 10 size of graph ×10 4 10 0 10 2 10 4 Median time (sec) LSN(eigs) LBN(eigs) LGM(eigs) LGM(ours) Figure 3: Median execution time of 10 runs for different Laplacians. Graphs have two perfect clusters and 2.5% of edges among nodes. LGM(ours) uses Algs 2 and 3, whereas we used Matlab’s eigs for the other matrices. The use of eigs on LGM is prohibitive as it needs the matrix LGM to be built (we use the toolbox provided in [2]), destroying the sparsity of the original graphs. Experiments are performed using one thread. 6 Experiments Sociology Networks We evaluate signed Laplacians LSN, LBN, LAM and LGM through three realworld and moderate size signed networks: Highland tribes (Gahuku-Gama) network [21], Slovene Parliamentary Parties Network [15] and US Supreme Court Justices Network [7]. For the sake of comparison we take as ground truth the clustering that is stated in the corresponding references. We observe that all signed Laplacians yield zero clustering error. Experiments on Wikipedia signed network. We consider the Wikipedia adminship election dataset from [17], which describes relationships that are positive, negative or non existent. We use Algs. 1−3 and look for 30 clusters. Positive and negative adjacency matrices sorted according to our clustering are depicted in Figs. 4(a) and 4(b). We can observe the presence of a large relatively empty cluster. 7 Zooming into the denser portion of the graph we can see a k-balanced behavior (see Figs. 4(c) and 4(d)), i.e. the positive adjacency matrix shows assortative groups - resembling a block diagonal structure - while the negative adjacency matrix shows a disassortative setting. Using LAM and LBN we were not able to find any clustering structure, which corroborates results reported in [4]. This further confirms that LGM overcomes other clustering approaches. To the knowledge of the authors, this is the first time that clustering structure has been found in this dataset. (a) W + (b) W − (c) W +(Zoom) (d) W −(Zoom) Figure 4: Wikipedia weight matrices sorted according to the clustering obtained with LGM (Alg. 1). Experiments on UCI datasets. We evaluate our method LGM (Algs. 1−3) against LSN, LBN, and LAM with datasets from the UCI repository (see Table. 2). We build W + from a symmetric k+-nearest neighbor graph, whereas W −is obtained from the symmetric k−-farthest neighbor graph. For each dataset we test all clustering methods over all possible choices of k+, k−∈ {3, 5, 7, 10, 15, 20, 40, 60}. In Table 2 we report the fraction of cases where each method achieves the best and strictly best clustering error over all the 64 graphs, per each dataset. We can see that our method outperforms other methods across all datasets. In the figure on the right of Table 2 we present the clustering error on MNIST dataset fixing k+ = 10. With Q− sym one gets the highest clustering error, which shows that the k−-farthest neighbor graph is a source of noise and is not informative. In fact, we observe that a small subset of nodes is the farthest neighborhood of a large fraction of nodes. The noise from the k−-farthest neighbor graph is strongly influencing the performances of LSN and LBN, leading to a noisy embedding of the datapoints and in turn to a high clustering error. On the other hand we can see that LGM is robust, in the sense that its clustering performances are not affected negatively by the noise in the negative edges. Similar behaviors have been observed for the other datasets in Table 2, and are shown in supplementary material. iris wine ecoli optdig USPS pendig MNIST # vertices 150 178 310 5620 9298 10992 70000 # classes 3 3 3 10 10 10 10 LSN Best (%) 23.4 40.6 18.8 28.1 10.9 10.9 12.5 Str. best (%) 10.9 21.9 14.1 28.1 9.4 10.9 12.5 LBN Best (%) 17.2 21.9 7.8 0.0 1.6 3.1 0.0 Str. best (%) 7.8 4.7 6.3 0.0 1.6 3.1 0.0 LAM Best (%) 12.5 28.1 14.1 0.0 0.0 1.6 0.0 Str. best (%) 10.9 14.1 12.5 0.0 0.0 1.6 0.0 LGM Best (%) 59.4 42.2 65.6 71.9 89.1 84.4 87.5 Str. best (%) 57.8 35.9 60.9 71.9 87.5 84.4 87.5 a MNIST, k+ = 10 5 7 10 15 20 40 60 0 0.2 0.4 0.6 L+ sym Qsym LSN LBN LAM LGM(ours) a k− Table 2: Experiments on UCI datasets. Left: fraction of cases where methods achieve best and strictly best clustering error. Right: clustering error on MNIST dataset. Acknowledgments. The authors acknowledge support by the ERC starting grant NOLEPRO 8 References [1] R. Bhatia. Positive definite matrices. Princeton University Press, 2009. [2] D. Bini and B. Ianazzo. The Matrix Means Toolbox. http://bezout.dm.unipi.it/ software/mmtoolbox/, May 2015. [3] D. Cartwright and F. Harary. Structural balance: a generalization of Heider’s theory. Psychological Review, 63(5):277–293, 1956. [4] K. Chiang, J. Whang, and I. Dhillon. Scalable clustering of signed networks using balance normalized cut. CIKM, pages 615–624, 2012. [5] J. A. Davis. Clustering and structural balance in graphs. Human Relations, 20:181–187, 1967. [6] M. Desai and V. Rao. A characterization of the smallest eigenvalue of a graph. Journal of Graph Theory, 18(2):181–194, 1994. [7] P. Doreian and A. Mrvar. Partitioning signed social networks. Social Networks, 31(1):1–11, 2009. [8] V. Druskin and L. Knizhnerman. Extended Krylov subspaces: approximation of the matrix square root and related functions. SIAM J. Matrix Anal. Appl., 19:755–771, 1998. [9] M. Fasi and B. Iannazzo. Computing the weighted geometric mean of two large-scale matrices and its inverse times a vector. MIMS EPrint: 2016.29. [10] F. Harary. On the notion of balance of a signed graph. Michigan Mathematical Journal, 2:143–146, 1953. [11] N. J. Higham, D. S. Mackey, N. Mackey, and F. Tisseur. Functions preserving matrix groups and iterations for the matrix square root. SIAM J. Matrix Anal. Appl., 26:849–877, 2005. [12] B. Iannazzo. The geometric mean of two matrices from a computational viewpoint. Numer. Linear Algebra Appl., to appear, 2015. [13] B. Iannazzo and M. Porcelli. The Riemannian Barzilai-Borwein method with nonmonotone line-search and the Karcher mean computation. Optimization online, December 2015. [14] L. Knizhnerman and V. Simoncini. A new investigation of the extended Krylov subspace method for matrix function evaluations. Numer. Linear Algebra Appl., 17:615–638, 2009. [15] S. Kropivnik and A. Mrvar. An Analysis of the Slovene Parliamentary Parties Networks. Development in Statistics and Methodology, pages 209–216, 1996. [16] J. Kunegis, S. Schmidt, A. Lommatzsch, J. Lerner, E. Luca, and S. Albayrak. Spectral analysis of signed graphs for clustering, prediction and visualization. In ICDM, pages 559–570, 2010. [17] J. Leskovec and A. Krevl. SNAP Datasets: Stanford Large Network Dataset Collection. http://snap.stanford.edu/data, June 2014. [18] S. Liu. Multi-way dual cheeger constants and spectral bounds of graphs. Advances in Mathematics, 268:306 – 338, 2015. [19] U. Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, Dec. 2007. [20] M. Raïssouli and F. Leazizi. Continued fraction expansion of the geometric matrix mean and applications. Linear Algebra Appl., 359:37–57, 2003. [21] K. E. Read. Cultures of the Central Highlands, New Guinea. Southwestern Journal of Anthropology, 10(1):pp. 1–43, 1954. [22] K. Rohe, S. Chatterjee, B. Yu, et al. Spectral clustering and the high-dimensional stochastic blockmodel. The Annals of Statistics, 39(4):1878–1915, 2011. [23] J. Tang, Y. Chang, C. Aggarwal, and H. Liu. A survey of signed network mining in social media. arXiv preprint arXiv:1511.07569, 2015. 9 | 2016 | 273 |
6,187 | Consistent Estimation of Functions of Data Missing Non-Monotonically and Not at Random Ilya Shpitser Department of Computer Science Johns Hopkins University ilyas@cs.jhu.edu Abstract Missing records are a perennial problem in analysis of complex data of all types, when the target of inference is some function of the full data law. In simple cases, where data is missing at random or completely at random [15], well-known adjustments exist that result in consistent estimators of target quantities. Assumptions underlying these estimators are generally not realistic in practical missing data problems. Unfortunately, consistent estimators in more complex cases where data is missing not at random, and where no ordering on variables induces monotonicity of missingness status are not known in general, with some notable exceptions [13, 18, 16]. In this paper, we propose a general class of consistent estimators for cases where data is missing not at random, and missingness status is non-monotonic. Our estimators, which are generalized inverse probability weighting estimators, make no assumptions on the underlying full data law, but instead place independence restrictions, and certain other fairly mild assumptions, on the distribution of missingness status conditional on the data. The assumptions we place on the distribution of missingness status conditional on the data can be viewed as a version of a conditional Markov random field (MRF) corresponding to a chain graph. Assumptions embedded in our model permit identification from the observed data law, and admit a natural fitting procedure based on the pseudo likelihood approach of [2]. We illustrate our approach with a simple simulation study, and an analysis of risk of premature birth in women in Botswana exposed to highly active anti-retroviral therapy. 1 Introduction Practical data sets generally have missing or corrupted entries. A classical missing data problem is to find a way to make valid inferences about the full data law. In other words, the goal is to exploit assumptions on the mechanism which is responsible for missingness or corruption of data records to transform the problem into another where missingness or corruption were not present at all. In simple cases, where missingness status is assumed to be missing completely at random (determined by an independent coin flip), or at random (determined by a coin flip independent conditional on observed data records), adjustments exist which result in consistent estimators of many functions of the full data law. Unfortunately, these cases are difficult to justify in practice. Often, data records are missing intermittently and in complex patterns that do not conform to above assumptions. For instance, in longitudinal observational studies in medicine, patients may elect to not show up at a particular time point, for reasons having to do with their (by definition missing) health status at that time point, and then later return for followup. 1 In this situation, missingness is not determined by a coin flip independent of missing data conditional on the observed data (data is missing not at random), and missingness status of a patient is not monotonic under any natural ordering. In this setting, deriving consistent estimators of even simple functions of the full data law is a challenging problem [13, 18, 16]. In this paper we propose a new class of consistent generalized inverse probability weighting (IPW) estimators for settings where data is missing non-monotonically and not at random. Like other IPW estimators, ours makes no modeling assumptions on the full data law, and only models the joint missingness status of all variables, conditional on those variables. This model can be viewed as a conditional Markov random field (MRF) with independence assumptions akin to those made in factors of a chain graph model [6]. The assumptions encoded in our model permit identification of the full data law, and allow estimation based on the pseudo likelihood approach of [2]. Our paper is organized as follows. We discuss relevant preliminaries on graphical models in Section 2. We fix additional notation and discuss some prior work on missing data in Section 3. We introduce our missingness model, and identification results based on it in Section 4, and discuss estimation in Section 5. We illustrate the use of our model with a simple simulation study in Section 6, and give a data analysis application in Section 7. Finally, we illustrate the difference between our model and a seemingly similar non-identified model via a parameter counting argument in Section 8, and give our conclusions in Section 9. 2 Chain Graph Models We briefly review statistical chain graph models. A simple mixed graph is a graph where every vertex pair is connected by at most one edge, and there are two types of possible edges: directed and undirected. Chain graphs are mixed graphs with the property that for every edge cycle in the graph, there is no way to assign an orientation to undirected edges in any cycle to form a directed cycle [6]. For a graph G with a vertex set V, and any subset A ⊆V, define the induced subgraph GA to be a graph with the vertex set A and all edges in G between elements in A. Given a graph G, define the augmented or moral graph Ga to be an undirected graph obtained from adding a new undirected edge between any unconnected vertices W1, W2 if a path of the form W1 →◦−◦. . . ◦−◦←W2 exists in G (note the path may only contain a single intermediate vertex), and then replacing all directed edges in G by undirected edges. A clique in an undirected graph is a set of vertices where any pair of vertices are neighbors. A maximal clique is a clique such that no superset of it forms a clique. Given an undirected graph G, denote the set of maximal cliques in G by C(G). A block in a simple mixed graph G is any connected component formed by undirected edges in a graph obtained from G dropping all directed edges. Given a simple mixed graph G, denote the set of blocks in G by B(G). A chain graph model is defined by the following factorization p(V) = Y B∈B(G) p(B | paG(B)), (1) where for each B, p(B | paG(B)) = 1 Z(paG(B)) Y C∈C((GB∪paG (B))a) φC(C), (2) and φC(C) are called potential functions and map value configurations of variables in C to real numbers, which are meant to denote an “affinity” of the model towards that particular value configuration. The chain graph factorization implies Markov properties, described in detail in [6]. 3 Preliminaries, and Prior Work on Missing Data We will consider data sets on random variables L ≡L1, . . . Lk, drawn from a full data law p(L). Associated with each random variable Li is a binary missingness indicator Ri, where Li is observed if and only if Ri = 1. Define a vector (lj, rj) ≡(lj 1, . . . lj k, rj 1, . . . rj k) to be the jth realization of 2 p(L, R). Define (l∗)j ≡{lj i | rj = 1} ⊆lj. In missing data settings, for every j, we only get to observe the vector of values ((l∗)j, rj), and we wish to make inferences using the true realizations (lj, rj) from the underlying law. Doing this entails building a bridge between the observed and the underlying realizations, and this bridge is provided by assumptions made on p(L, R). If we can assume that for any i, p(Ri | L) = p(Ri), in other words, every missing value is determined by an independent biased coin flip, then data is said to be missing completely at random (MCAR) [15]. In this simple setting, it is known that any estimator for complete data remains consistent if applied to just the complete cases. A more complex assumption, known as missing at random (MAR) [15], states that for every i, p(Ri | L) = p(Ri | L∗). In other words, every missing value is determined by a biased coin flip that is independent of missing data values conditional on the observed data values. In this setting, a variety of adjustments lead to consistent estimators. The most interesting patterns of missingness, and the most relevant in practice, are those that do not obey either of the above two assumptions, in which case data is said to be missing not at random (MNAR). Conventional wisdom in MNAR settings is that without strong parametric modeling assumptions, many functions of the full data law are not identified from the observed data law. Nevertheless, a series of recent papers [8, 7, 17], which represented missing data mechanisms as graphical models, and exploited techniques developed in causal inference, have shown that the full data law may be non-parametrically identified under MNAR. In this approach, the full data law is assumed to factorize with respect to a directed acyclic graph (DAG) [11]. Assumptions implied by this factorization are then used to derive functions of p(L) in terms of p(R, L∗). We illustrate the approach using Fig. 1 (a),(b) and (c). Here nodes in green are assumed to be completely observed. In Fig. 1 (a), the Markov factorization is p(R2, L1, L2) = p(R2 | L1)p(L2 | L1)p(L1). It is easy to verify using d-separation [11] in this DAG that p(R2 | L1, L2) = p(R2 | L1). Since L1 is always observed, this setting is MAR, and we get the following p(L1, L2) = p(L2|L1)p(L1) = p(L2|L1, R2 = 1)p(L1) = p(R2 = 1, L∗)/p(R2 = 1|L1), where the last expression is a functional of p(R, L∗), and so the full data law p(L) is non-parametrically identified from the observed data law p(R, L∗). The ratio form of the identifying functional suggests the following simple IPW estimator for E[L2], known as the Horvitz-Thompson estimator [4]. We estimate p(R2 | L1) either directly if L1 is discrete and low dimensional, or using maximum likelihood fitting of a model for p(R2 | L1; β), for instance a logistic regression model. We then average observed values of L2, but compensate for the fact that observed and missing values of L2 systematically differ using the inverse of the fitted probability of the case being observed, conditional on L1, or ˆE[L2] = N −1 P n:rn=1 Ln 2/p(R2 = 1 | ln 1 ; ˆβ). Under our missingness model, this estimator is clearly unbiased. Under a number of additional fairly mild conditions, this estimator is also consistent. A more complicated graph, shown in Fig. 1 (b), implies the following factorization p(L1, L2, R1, R2) = p(R1 | L2)p(R2 | L1)p(L1 | L2)p(L2). (3) Using d-separation in this DAG, we see that in cases where any values are missing, neither MCAR nor MAR assumptions hold under this model. Thus, in this example, data is MNAR. However, the conditional independence constraints implied by the factorization (3) imply the following p(L1, L2) = p(R1 = 1, R2 = 1, L∗) p(R1 = 1 | L∗ 2, R2 = 1) · p(R2 = 1 | L∗ 1, R1 = 1). As before, all terms on the right hand side are functions of p(R, L∗), and so p(L) is nonparametrically identified from p(R, L∗). This example was discussed in [8]. The form of the identifying functional suggests a simple generalization of the IPW estimator from the previous example for E[L2]. As before, we fit models p(R1 | L∗ 2; β1) and p(R2 | L∗ 1; β2) by MLE. We take the empirical average of the observed values of L2, but reweigh them by the inverses of both of the estimated probabilities, using complete cases only: 1 N X n:rn 1 =rn 2 =1 ln 2 · 1 p(r1 = 1 | ln 2 ; ˆβ1) · p(r1 = 1 | ln 1 ; ˆβ2) . This estimator is also consistent, with the proof a simple generalization of that for HorvitzThompson. More generally, it has been shown in [8] that in DAGs where no R variable has a 3 R2 L1 L2 (a) R1 R2 L1 L2 (b) R1 L2 L4 L3 R2 L1 (c) R3 R2 R1 L1 L2 L3 (d) R3 R2 R1 L1 L2 L3 (e) R3 R2 R1 L1 L2 L3 (f) Figure 1: (a) A graphical model for MAR data. (b),(c) Graphical model for MNAR data where identification of the full data law is possible. (d) The no self-censoring model for k = 3. (e) A missingness model seemingly similar to (d), where the full data law is not identified. (f) An undirected graph representing an independence model Markov equivalent to the independence model represented by a chain graph in (d). child, and the edge Li →Ri does not exist for any i, we get: p(L) = p(L∗, R = 1) Q Ri p(Ri | paG(Ri), R{i|Li∈paG(Ri)} = 1). This identifying functional implies consistent IPW estimators can be derived that are similar to estimators in the above examples. The difficulty with this result is that it assumes missingness indicators are disconnected. This assumption means we cannot model persistent dropout or loss to followup (where Ri = 0 at one time point implies Ri = 0 at all following time points), or complex patterns of non-monotone missing data (where data is missing intermittently, but missingness also exhibits complex dependence structure). This kind of dependence is represented by connecting R variables in the graph. Unfortunately, this often leads to non-identification – the functional of the full data law not being a function of the observed data law. For instance, if we add an edge R1 →R2 to Fig. 1 (b), it is known that p(L1, L2) is not identified from p(R, L∗). Intuition for this is presented in Section 8. A classical approach to missingness with connected R variables assumes sequential ignorability, and monotone missingness (where there exists an ordering on variables such that every unit that’s missing earlier in the ordering remains missing later in the ordering) [12]. However, this approach does not easily generalize to data missing in non-monotone patterns and not at random. Nevertheless, if a sufficient number of edges are missing in the graph, identification sometimes is possible even if R variables are dependent, and monotonicity and MAR do not hold. In particular, techniques from causal inference have been using to derive complex identification results in this setting [7, 17]. For instance, it has been shown that in Fig. 1 (c), p(L1, L2, L3, L4) = p(L∗,R=1) ˜p1·˜p2 , where ˜p1 = qL4(R1 = 1 | L2, R2 = 1), ˜p2 = qL4(L1|R2=1,R1=1)qL4(R2=1) P R2 qL4(L1|R2,R1=1)qL4(R2) and qL4(R1, R2, L1, L2, L3) = p(L1, L2, R1, R2 | L3, L4)p(L3). See [17] for details. Unfortunately, it is often difficult to give a practical missing data setting which exhibits the particular pattern of missing edges that permits identification. In addition, a full characterization of identifiability of functionals of the full data law under MNAR is an open problem. In the next sections, we generalize the graphical model approach to missing data from DAGs to a particular type of chain graph. Our model is able to encode fairly general settings where data is missing non-monotonically and not at random, while also permitting identification of the full data law under fairly mild assumptions. 4 The No Self-Censoring Missingness Model Having given the necessary preliminaries, we are ready to define our missingness model for data missing non-monotonically and not at random. Our desiderata for such a model are as follows. First, in order for our model to be useful in as wide a variety of missing data settings as possible, we want to avoid imposing any assumptions on the underlying full data law. Second, since we wish to consider arbitrary non-monotonic missingness patterns, we want to allow arbitrary relationships between missingness indicators. Finally, since we wish to allow data to be missing not at random, we want to allow as much dependence of missingness indicators on the underlying data, even if missing, as possible. 4 However, a completely unrestricted relationship between underlying variables and missingness indicators can easily lead to non-identification. For instance in any graph where the edge Li →Ri exists, the marginal distribution p(Li) is not in general a function of the observed data law. Thus, we do not allow variables to drive their own missingness status, and thus edges of the form Li →Ri. However, we allow a variable to influence its own missingness status indirectly. Surprisingly, the restrictions given so far essentially characterize independences defining our proposed model. Consider the following chain graph on vertices L1, . . . Lk, R1, . . . Rk. The vertices L1, . . . , Lk form a complete DAG, meaning that the full data law p(L1, . . . , Lk) has no restrictions. The vertices R1, . . . Rk form a k-clique, meaning arbitrary dependence structure between R variables is allowed. In addition, for every i, paG(Ri) ≡L \ {Li}, which restricts a variable Li from directly causing its own missingness status Ri. The resulting graph is always a chain graph. An example (for k = 3) is shown in Fig. 1 (c). The factorizations (1) and (2) for chain graphs of this form imply a particular set of independence constraints. Lemma 1 Let G be a chain graph with vertex set R ∪L, where B(G) = {R, {L1}, . . . {Lk}}, and for every i, paG(Li) = {L1, . . . Li−1}, paG(Ri) = L \ {Li}. Then for every i, and every p(L, R) that factorizes according to G, the only conditional independences implied by this factorization on p(L, R) are (∀i) (Ri ⊥⊥Li | R \ {Ri}, L \ {Li}). 1 Proof: This follows by the global Markov property results for chain graphs, found in [6]. □ This set of independences in p(R, L) can be represented not only by a chain graph, but also by an undirected graph where every pair vertices except Ri and Li (for every i) are connected. Such a graph, interpreted as a Markov random field, would imply the same set of conditional independences as those in Lemma 1. An example of such a graph for k = 3 is shown in Fig. 1 (f). The reason we emphasize viewing the model using chain graphs is because the only independence restrictions we place are on the conditional distribution p(R | L); these restrictions resemble those found in factors of (1), and not in classical conditional Markov random fields, where every variable in R would depend on every variable in L. We call the missingness model with this independence structure the no self-censoring model, due to the fact that no variable Li is allowed to directly censor itself via setting Ri to 0. We now show that under relatively benign assumptions, we can identify the full data law p(L) in this model. Lemma 2 If p(R = 1 | L) is identified from the observed data distribution p(L∗, R = 1), then p(L) is identified from p(L∗, R = 1) via p(L∗, R = 1)/p(R = 1 | L). Proof: Trivially follows by the chain rule of probability, and the fact that L = L∗if R = 1. □ To obtain identification, we use a form of the log conditional pseudo-likelihood (LCPL) function, first considered (in joint form) in [2]. Define, for any parameterization p(R | L; α), where |R| = k, log PL(α) = k X i=1 X j:Lj\{Lj i }⊆(L∗)j log p(Ri = rj i | Rj \ {Rj i} = rj, Lj; α). In subsequent discussion we will assume that if p1(R | L; α0) ̸= p2(R | L; α) then α0 ̸= α. Lemma 3 Under the no self-censoring model, in the limit of infinite data sampled from p(R, L), where only L∗, R is observed, log PL(α) is maximized at the true parameter values α0. Proof: The proof follows that for the standard pseudo-likelihood in [9]. The difference between the LCPL functions evaluated at α0 and α can be expressed as a sum of conditional relative entropies, which is always non-negative. The fact that every term in the LCPL function is a function of the observed data follows by Lemma 1. □ We will restrict attention to function classes which satisfy standard assumptions needed to derive consistent estimators [10], namely compactness of the parameter space, dominance, and (twice) differentiability with respect to α, which implies continuity. 1A ⊥⊥B | C is notation found in [3], meaning A is independent of B given C. 5 Corollary 1 Under the no self-censoring model of missingness, and assumptions above, the estimator of α maximizing the LCPL function is weakly consistent. Proof: Follows by Lemma 3, and the argument in [9] via equation (9), Lemma 1 and Theorem 1. □ 5 Estimation Since all variables in R are binary, and our model for p(R | L) is a type of conditional MRF, a log-linear parameterization is natural. We thus adapt the following class of parameterizations: p(R = r | L = l) = 1 Z(l) exp X R†⊆P(R)\{∅} rR† · fR†(lL\L†; αR†) (4) where L† ≡{Li | Ri ∈R†}, P(R) is the powerset of R, and for every R†, fR† is a function parameterized by αR†, mapping values of L\L† to an |R†|-way interaction. Let α ≡{αR† | R† ⊆ P(R) \ {∅}}. We now show our class of parameterizations gives the right independence structure. Lemma 4 For an arbitrary p(L), and a conditional distribution p(R | L) parameterized as in (4), the set of independences in Lemma 1 hold in the joint distribution p(L, R) = p(R | L)p(L). Proof: For any Ri ∈R, and values r, l, such that rRi = 1, p(rRi | rR\{Ri}, lL) = exp nP Ri∈R†⊆P(R)\{∅} rR† · fR†(lL\L†; αR†) o 1 + exp nP Ri∈R†⊆P(R)\{∅} rR† · fR†(lL\L†; αR†) o. By definition of fR†, this functional is not a function of Li, which gives our result. □ As expected with a log-linear conditional MRF, the distribution p(Ri | R \ {Ri}, L) resembles the logistic regression model. Under twice differentiability of fR†, first and second derivatives of the LCPL function have a straightforward derivation, which we omit in the interests of space. Just as with the logistic model, the estimating equations cannot be solved in closed form, but iterative algorithms are straightforward to construct. For sufficiently simple fR†, the Newton-Raphson algorithm may be employed. Note that every conditional model for Ri is fit only using rows where L \ {Li} are observed. Thus, the fitting procedure fails in datasets with few enough samples that for some Ri, no such rows exist. We leave extensions of our model that deal with this issue to future work. Finally, we use our fitted model p(R | L; ˆα), as a joint IPW for estimating functions of p(L). For instance, if L1, . . . Lk−1 represents intermediate outcomes, and Lk the final outcome of a longitudinal study with intermittent MNAR dropout represented by our model, and we are interested in the expected final outcome, E[Lk], we would extend IPW estimators discussed in Section 3 as follows: ˆE[Lk] = N −1 P n:rn=1 ln k/p(R = 1 | ln; ˆα). Estimation of more complex functionals of p(L) proceeds similarly, though it may employ marginal structural models if L is high-dimensional. Consistency of these estimators follows, under the usual assumptions, by standard arguments for IPW estimators, and Corollary 1. 6 A Simple Simulation Study To verify our results, we implemented our estimator for a simple model in the class of parameterizations (4) that satisfy the assumptions needed for deriving the true parameter by maximizing the LCPL function. Fig. 2 shows our results. For the purposes of illustration, we chose the model in Fig. 1 (d) with functions fR† defined as follows. For every edge (Li, Rj) in the graph, define a parameter wij, and a parameter w∅. Define every function fR† to be of the form P i:Li∈L\L†,j:Rj∈R† wijLi(1). The values of L1, L2, L3 were drawn from a multivariate normal distribution with parameters µ = (1, 1, 1), Σ = I +1. We generated a series of datasets with sample size 100 to 1000, and compared differences between the true means E[Li(1)] and the unadjusted (complete case) MLE estimate of E[Li(1)] (blue), and IPW adjusted estimate of E[Li(1)] (red), for i = 1, 2, 3. The true difference is, of course, 0. Confidence intervals at the 95% level were computing using case resampling bootstrap (50 iterations). The confidence intervals generally overlapped 6 −0.2 0.0 0.2 0.4 250 500 750 1000 Estimated Observed True L1 Mean with Sample Size (a) −0.2 0.0 0.2 0.4 250 500 750 1000 Estimated Observed True L2 Mean with Sample Size (b) −0.25 0.00 0.25 0.50 250 500 750 1000 Estimated Observed True L3 Mean with Sample Size (c) Figure 2: (a),(b),(c) Results of estimating E[L1(1)], E[L2(1)] and E[L3(1)], respectively, from a model in Fig. 1 (d). Y axis is parameter value, and X axis is sample size. Confidence intervals are reported using case resampling bootstrap at 95% level. Confidence interval size does not necessarily shrink with sample size – a known issue with IPW estimators. 0, while complete case analysis did not. We noted that confidence intervals did not always shrink with increased sample size – a known difficulty with IPW estimators. Aside from the usual difficulties with IPW estimators, which are known to suffer from high variance, our estimator only reweighs observed cases, which may in general be a small fraction of the overall dataset as k grows (in our simulations only 50-60% of cases were complete). Furthermore, estimating weights by maximizing pseudo-likelihood is known to be less efficient than by maximizing likelihood, since all variability of variables in the conditioning sets is ignored. 7 Analysis Application To illustrate the performance of our model in a practical setting where data is missing not at random, we report an analysis of a survey dataset for HIV-infected women in Botswana, also analyzed in [18]. The goal is to estimate an association between maternal exposure to highly active anti-retroviral therapy (HAART) during pregnancy and a premature birth outcome among HIV-infected women in Botswana. The overall data consisted of 33148 obstetrical records from 6 cites in Botswana. Here we restricted to a subset of HIV positive women (n = 9711). We considered four features: the outcome (preterm delivery), with 6.7% values missing, and two risk factors – whether the CD4 count (a measure of immune system health) was lower than 200 cells per µL (53.1% missing), and whether HAART was continued from before pregnancy (69.0% missing). We also included hypertension – a common comorbidity of HIV (6.5% missing). In this dataset missing at random is not a reasonable assumption, and what’s more missingness patterns are not monotonic. We used a no-self censoring model with fR†(.) of the same form as in section 6. The results are shown in Fig. 3, which contain the complete case analysis (CC), the no self-censoring model (NSCM), and a version of the discrete choice model in [18] (DCM). We reported the odds ratios (ORs) with a 95% confidence interval, obtained by bootstrap. Note that CC and DCM confidence intervals for the OR overlap 1, indicating a weak or non-existent effect. The confidence interval for the NSCM indicates a somewhat non-intuitive inverse relationship for low CD4 count and premature birth, which we believe may be due to assumptions of the NSCM not being met with a limited set of four variables we considered. In fact, the dataset was sufficiently noisy that an expected positive relationship was not found by any method. 8 Parameter Counting Parameter counting may be used to give an intuition for why p(L) is identified under the no self-censoring model, but not under a very similar missingness model where undirected edges between R variables are replaced by directed edges under some ordering (see Fig. 1 (d) and 7 Low CD4 Count Cont HAART CC 0.782 (0.531, 1.135) 1.142 (0.810, 1.620) NSCM 0.651 (0.414, 0.889) 1.032 (0.670, 1.394) DCM 1.020 (0.742, 1.397) 1.158 (0.869, 1.560) Figure 3: Analyses of the HIV pregnancy Botswana dataset. CC: complete case analysis, NSCM: the no self-censoring model with a linear parameterization, DCM: a member of the discrete choice model family described in [18]. (e) for an example for k = 3.) Assume |L| = k, where L variables are discrete with d levels. Then the observed data law may be parameterized by 2k −1 parameters for p(R), and by dk−|R†|−1 parameters for each p(L∗| R† = 1, R \ R† = 0), where R† ̸= ∅, for a total of 2k −1 + P R†⊆P(R)\{∅} k |R†| (d|R†| −1) = (d + 1)k −1. The no-censoring model needs dk −1 parameters for p(L), and P R†∈P(R)\{∅} k |R†| dk−|R†| for p(R | L), yielding a total of dk −1 + (d + 1)k −dk = (d + 1)k −1, which means the model is just-identified, and imposes no restrictions on the observed data law under our assumptions on L. However, the DAG model needs dk−1 parameters for p(L), and Pk i=1(dk−1·2i−1) for p(R | L), for a total of dk−1+dk−1·(2k−1). The following Lemma implies the DAG version of the no self-censoring model is not identified. Lemma 5 dk−1 · (2k −1) > (d + 1)k −dk for k ≥2, d ≥2. Proof: For k = 2, we have 3d > 2d + 1, which holds for any d > 1. If our result holds for k, then 2k > (d + 1)k/dk−1 −d + 1. Then the inequality holds for k + 1, since 2 > (d + 1)/d for d > 1. □ Just identification under the independence structure given in Lemma 1 was used in [16] (independently of this paper) to derive a parameterization of the model that uses the observed data law. This paper, by contrast, only models the missingness process represented by p(R | L), and does not model the observed data law p(L∗) at all. 9 Conclusions In this paper, we have presented a graphical missingness model based on chain graphs for data missing non-monotonically and not at random. Specifically, our model places no restrictions on the underlying full data law, and on the dependence structure of missingness indicators, and allows a high degree of interdependence between the underlying unobserved variables and missingness indicators. Nevertheless, under our model, and fairly mild assumptions, the full data law is identified. Our estimator is an inverse probability weighting estimator with the weights being joint probabilities of the data being observed, conditional on all variables. The weights are fitted by maximizing the log conditional pseudo likelihood function, first derived in joint form in [2]. We view our work as an alternative to existing and newly developed methods for MNAR data [13, 18, 16], and an attempt to bridge the gap between the existing rich missing data literature on identification and estimation strategies for MAR data (see [14] for further references), and newer work which gave an increasingly sophisticated set of identification conditions for MNAR data using missingness graphs [8, 7, 17]. The drawbacks of existing MAR methods is that most missingness patterns of practical interest are not MAR, the drawbacks of the missingness graph literature is that it has not yet considered estimation, and used assumptions on missingness that, while MNAR, are difficult to justify in practice (for example Fig. 1 (c) implies a complicated identifying functional under MNAR, but places a marginal independence restriction (L1 ⊥⊥L2) on the full data law). Our work remedies both of these shortcomings. On the one hand, we assume a very general, and thus easier to justify in practice, missingness model for MNAR data. On the other, we don’t just consider an identification problem for our model, but give a class of IPW estimators for functions of the observed data law. Addressing statistical and computational challenges posed by our class of estimators, and making them practical for analysis of high dimensional MNAR data is our next step. 8 References [1] Heejung Bang and James M. Robins. Doubly robust estimation in missing data and causal inference models. Biometrics, 61:962–972, 2005. [2] Julian Besag. Statistical analysis of lattice data. The Statistician, 24(3):179–195, 1975. [3] A. Philip Dawid. Conditional independence in statistical theory. Journal of the Royal Statistical Society, 41:1–31, 1979. [4] D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47:663–685, 1952. [5] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the Eighteenth International Conference on Machine Learning (ICML-01), pages 282 – 289. Morgan Kaufmann, 2001. [6] Steffan L. Lauritzen. Graphical Models. Oxford, U.K.: Clarendon, 1996. [7] Karthika Mohan and Judea Pearl. Graphical models for recovering probabilistic and causal queries from missing data. In Z. Ghahramani, M. Welling, C. Cortes, N.D. Lawrence, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 1520–1528. Curran Associates, Inc., 2014. [8] Karthika Mohan, Judea Pearl, and Jin Tian. Graphical models for inference with missing data. In C.J.C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 1277–1285. Curran Associates, Inc., 2013. [9] A. Mozeika, O. Dikmen, and J. Piili. Consistent inference of a general model using the pseudolikelihood method. Physical Review E: Statistical, Nonlinear, and Soft Matter Physics., 90, 2014. [10] Whitney Newey and Daniel McFadden. Chapter 35: Large sample estimation and hypothesis testing. In Handbook of Econometrics, Vol.4, pages 2111–2245. Elsevier Science, 1994. [11] Judea Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan and Kaufmann, San Mateo, 1988. [12] James M. Robins. A new approach to causal inference in mortality studies with sustained exposure periods – application to control of the healthy worker survivor effect. Mathematical Modeling, 7:1393– 1512, 1986. [13] James M. Robins. Non-response models for the analysis of non-monotone non-ignorable missing data. Statistics in Medicine, 16:21–37, 1997. [14] James M. Robins and Mark van der Laan. Unified Methods for Censored Longitudinal Data and Causality. Springer-Verlag New York, Inc., 2003. [15] D. B. Rubin. Causal inference and missing data (with discussion). Biometrika, 63:581–592, 1976. [16] Mauricio Sadinle and Jerome P. Reiter. Itemwise conditionally independent nonresponse modeling for incomplete multivariate data. https://arxiv.org/abs/1609.00656, 2016. Working paper. [17] Ilya Shpitser, Karthika Mohan, and Judea Pearl. Missing data as a causal and probabilistic problem. In Proceedings of the Thirty First Conference on Uncertainty in Artificial Intelligence (UAI-15), pages 802–811. AUAI Press, 2015. [18] Eric J. Tchetgen Tchetgen, Linbo Wang, and BaoLuo Sun. Discrete choice models for nonmonotone nonignorable missing data: Identification and inference. https://arxiv.org/abs/1607.02631, 2016. Working paper. 9 | 2016 | 274 |
6,188 | Discriminative Gaifman Models Mathias Niepert NEC Labs Europe Heidelberg, Germany mathias.niepert@neclabs.eu Abstract We present discriminative Gaifman models, a novel family of relational machine learning models. Gaifman models learn feature representations bottom up from representations of locally connected and bounded-size regions of knowledge bases (KBs). Considering local and bounded-size neighborhoods of knowledge bases renders logical inference and learning tractable, mitigates the problem of overfitting, and facilitates weight sharing. Gaifman models sample neighborhoods of knowledge bases so as to make the learned relational models more robust to missing objects and relations which is a common situation in open-world KBs. We present the core ideas of Gaifman models and apply them to large-scale relational learning problems. We also discuss the ways in which Gaifman models relate to some existing relational machine learning approaches. 1 Introduction Knowledge bases are attracting considerable interest both from industry and academia [2, 6, 15, 10]. Instances of knowledge bases are the web graph, social and citation networks, and multi-relational knowledge graphs such as Freebase [2] and YAGO [11]. Large knowledge bases motivate the development of scalable machine learning models that can reason about objects as well as their properties and relationships. Research in statistical relational learning (SRL) has focused on particular formalisms such as Markov logic [22] and PROBLOG [8] and is often concerned with improving the efficiency of inference and learning [14, 28]. The scalability problems of these statistical relational languages, however, remain an obstacle and have prevented a wider adoption. Another line of work focuses on efficient relational machine learning models that perform well on a particular task such as knowledge base completion and relation extraction. Examples are knowledge base factorization and embedding approaches [5, 21, 23, 26] and random-walk based ML models [15, 10]. We aim to advance the state of the art in relational machine learning by developing efficient models that learn knowledge base embeddings that are effective for probabilistic query answering on the one hand, and interpretable and widely applicable on the other. Gaifman’s locality theorem [9] is a result in the area of finite model theory [16]. The Gaifman graph of a knowledge base is the undirected graph whose nodes correspond to objects and in which two nodes are connected if the corresponding objects co-occur as arguments of some relation. Gaifman’s locality theorem states that every first-order sentence is equivalent to a Boolean combination of sentences whose quantifiers range over local neighborhoods of the Gaifman graph. With this paper, we aim to explore Gaifman locality from a machine learning perspective. If every first-order sentence is equivalent to a Boolean combination of sentences whose quantifiers range over local neighborhoods only, we ought to be able to develop models that learn effective representations from these local neighborhoods. There is increasing evidence that learning representations that are built up from local structures can be highly successful. Convolutional neural networks, for instance, learn features over locally connected regions of images. The aim of this work is to investigate the effectiveness and efficiency of machine learning models that perform learning and inference within and across 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. locally connected regions of knowledge bases. This is achieved by combining relational features that are often used in statistical relatinal learning with novel ideas from the area of deep learning. The following problem motivates Gaifman models. Problem 1. Given a knowledge base (relational structure, mega-example, knowledge graph) or a collection of knowledge bases, learn a relational machine learning model that supports complex relational queries. The model learns a probability for each tuple in the query answer. Note that this is a more general problem than knowledge base completion since it includes the learning of a probability distribution for a complex relational query. The query corresponding to knowledge base completion is r(x, y) for logical variables x and y, and relation r. The problem also touches on the problem of open-world probabilistic KBs [7] since tuples whose prior probability is zero will often have a non-zero probability in the query answer. 2 Background We first review some important concepts and notation in first-order logic. 2.1 Relational First-order Logic An atom r(t1, ..., tn) consists of predicate r of arity n followed by n arguments, which are either elements from a finite domain D = {a, b, ...} or logical variables {x, y, ...}. We us the terms domain element and object synonymously. A ground atom is an atom without logical variables. Formulas are built from atoms using the usual Boolean connectives and existential and universal quantification. A free variable in a first-order formula is a variable x not in the scope of a quantifier. We write ϕ(x, y) to denote that x, y are free in ϕ, and free(ϕ) to refer to the free variables of ϕ. A substitution replaces all occurrences of logical variable x by t in some formula ϕ and is denoted by ϕ[x/t]. A vocabulary consists of a finite set of predicates R and a domain D. Every predicate r is associated with a positive integer called the arity of r. A R-structure (or knowledge base) D consists of the domain D, a set of predicates R, and an interpretation. The Herbrand base of D is the set of all ground atoms that can be constructed from R and D. The interpretation assigns a truth value to every atom in the Herbrand base by specifying rD ⊆Dn for each n-ary predicate r ∈R. For a formula ϕ(x1, ..., xn) and a structure D, we write D |= ϕ(d1, ..., dn) to say that D satisfies ϕ if the variables x1, ..., xn are substituted with the domain elements d1, ...., dn. We define ϕ(D) := {(d1, ..., dn) ∈Dn | D |= ϕ(d1, ..., dn)}. For the R-structure D and C ⊆D, ⟨C⟩D denotes the substructure induced by C on D, that is, the R-structure C with domain C and rC := rD ∩Cn for every n-ary r ∈R. 2.2 Gaifman’s Locality Theorem The Gaifman graph of a R-structure D is the graph GD with vertex set D and an edge between two vertices d, d′ ∈D if and only if there exists an r ∈R and a tuple (d1, ..., dk) ∈rD such that d, d′ ∈{d1, ..., dk}. Figure 1 depicts a fragment of a knowledge base and the corresponding Gaifman graph. The distance dD(d1, d2) between two elements d1, d2 ∈D of a structure D is the length of the shortest path in GD connecting d1 and d2. For r ≥1 and d ∈D, we define the r-neighborhood of d to be Nr(d) := {x ∈D | dD(d, x) ≤r}. We refer to r also as the depth of the neighborhood. Let d = (d1, ..., dn) ∈Dn. The r-neighborhood of d is defined as Nr(d) = n [ i=1 Nr(di). For the Gaifman graph in Figure 1, we have that N1(d4) = {d1, d2, d5} and N1((d1, d2)) = {d1, ..., d6}. ϕNr(x) is the formula obtained from ϕ(x) by relativizing all quantifiers to Nr(x), that is, by replacing every subformula of the form ∃yψ(x, y, z) by ∃y(dD(x, y) ≤r ∧ψ(x, y, z)) and every subformula of the form ∀yψ(x, y, z) by ∀y(dD(x, y) ≤r →ψ(x, y, z)). A formula ψ(x) of the form ϕNr(x), for some ϕ(x), is called r-local. Whether an r-local formula ψ(x) holds depends only on the r-neighborhood of x, that is, for every structure D and every d ∈D we have D |= ψ(d) 2 d1 d2 d4 d3 d6 d5 locatedIn(d6, d5) livesIn(d2, d5) worksAt(d2, d6) studentOf(d1, d2) studentAt(d1, d6) bornIn(d1, d3) studentOf(d4, d2) introducedBy(d1, d4, d2) livesIn(d4, d5) Figure 1: A knowledge base fragment for the pair (d1, d2) and the corresponding Gaifman graph. 100 101 102 103 104 degree 10−1 100 101 102 103 number of nodes Figure 2: The degree distribution of the Gaifman graph for the Freebase fragment FB15K. if and only if ⟨Nr(d)⟩|= ψ(d). For r, k ≥1 and ψ(x) being r-local, a local sentence is of the form ∃x1 · · · ∃xk ^ 1≤i<j≤k dD(xi, xj) > 2r ∧ ^ 1≤i≤k ψ(xi) . We can now state Gaifman’s locality theorem. Theorem 1. [9] Every first-order sentence is equivalent to a Boolean combination of local sentences. Gaifman’s locality theorem states that any first-order sentence can be expressed as a Boolean combination of r-local sentences defined for neighborhoods of objects that are mutually far apart (have distance at least 2r + 1). Now, a novel approach to (statistical) relational learning would be to consider a large set of objects (or tuples of objects) and learn models from their local neighborhoods in the Gaifman graphs. It is this observation that motivates Gaifman models. 3 Learning Gaifman Models Instead of taking the costly approach of applying relational learning and inference directly to entire knowledge bases, the representations of Gaifman models are learned bottom up, by performing inference and learning within bounded-size, locally connected regions of Gaifman graphs. Each Gaifman model specifies the data generating process from a given knowledge base (or collection of knowledge bases), a set of relational features, and a ML model class used for learning. Definition 1. Given a R-structure D, a discriminative Gaifman model for D is a tuple (q, r, k, Φ, M) as follows: • q is a first-order formula called the target query with at least one free variable; • r is the depth of the Gaifman neighborhoods; • k is the size-bound of the Gaifman neighborhoods; • Φ is a set of first-order formulas (the relational features); • M is the base model class (loss, hyper-parameters, etc.). Throughout the rest of the paper, we will provide detailed explanations of the different parameters of Gaifman models and their interaction with data generation, learning, and inference. During the training of Gaifman models, neighborhoods are generated for tuples of objects d ∈Dn based on the parameters r and k. We first describe the procedure for arbitrary tuples d of objects and will later explain where these tuples come from. For a given tuple d the r-neighborhood of d within the Gaifman graph is computed. This results in the set of objects Nr(d). Now, from this neighborhood we sample w neighborhoods consisting of at most k objects. Sampling bounded-size sub-neighborhoods from Nr(d) is motivated as follows: 3 1. The degree distribution of Gaifman graphs is often skewed (see Figure 2), that is, the number of other objects a domain element is related to varies heavily. Generating smaller, bounded-size neighborhoods allows the transfer of learned representations between more and less connected objects. Moreover, the sampling strategy makes Gaifman models more robust to object uncertainty [19]. We show empirically that larger values for k reduce the effectiveness of the learned models for some knowledge bases. 2. Relational learning and inference is performed within the generated neighborhoods. Nr(d) can be very large, even for r = 1 (see Figure 2), and we want full control over the complexity of the computational problems. 3. Even for a single object tuple d we can generate a large number of training examples if |Nr(d)| > k. This mitigates the risk of overfitting. The number of training examples per tuple strongly influences the models’ accuracy. We can now define the set of (r, k)-neighborhoods generated from a r-neighborhood. Nr,k(d) := {N | N ⊆Nr(d) and |N| = k} if |Nr(d)| ≥k {Nr(d)} otherwise. For a given tuple of objects d, Algorithm 1 returns a set of w neighborhoods drawn from Nr,k(d) such that the number of objects for each di is the same in expectation. The formulas in the set Φ are indexed and of the form ϕi(s1, ..., sn, u1, ..., um) with sj ∈free(q) and uj ̸∈free(q). For every tuple d = (d1, ..., dn), generated neighborhood N ∈Nr,k(d), and ϕi ∈Φ, we perform the substitution [s1/d1, ..., sn/dn] and relativize ϕi’s quantifiers to N, resulting in ϕN i [s1/d1, ..., sn/dn] which we write as ϕN i [s/d]. Let ⟨N⟩be the substructure induced by N on D. For every formula ϕi(s1, ..., sn, u1, ..., um) and every n ∈Nm, we now have that D |= ϕN i [s/d, u/n] if and only if ⟨N⟩|= ϕN i [s/d, u/n]. In other words, satisfaction is now checked locally within the neighborhoods N, by deciding whether ⟨N⟩|= ϕN i [s/d, u/n]. The relational semantics of Gaifman models is based on the set of formulas Φ. The feature vector v = (v1, ..., v|Φ|) for tuple d, and neighborhood N ∈Nr,k(d), written as vN, is constructed as follows vi := ϕN i [s/d](⟨N⟩) if free(ϕN i [s/d]) > 0 1 if ⟨N⟩|= ϕN i [s/d] 0 otherwise. That is, if ϕN i [s/d] has free variables, vi is equal to the number of groundings of ϕi[s/d] that are satisfied within the neighborhood substructure ⟨N⟩; if ϕi[s/d] has no free variables, vi = 1 if and only if ϕi[s/d] is satisfied within the neighborhod substructure ⟨N⟩; and vi = 0 otherwise. The neighborhood representations v capture r-local formulas and help the model learn formula combinations that are associated with negative and positive examples. For the right choices of the parameters r and k, the neighborhood representations of Gaifman models capture the relational structure associated with positive and negative examples. Deciding D |= ϕ for a structure D and a first-order formula ϕ is referred to as model checking and computing ϕ(D) is called ϕ-counting. The combined complexity of model checking is PSPACEcomplete [29] and there exists a ||D||O(||ϕ||) algorithm for both problems where || · || is the size of an encoding. Clearly, for most real-world KBs this is not feasible. For Gaifman models, however, where the neighborhoods are bounded-size, typically 10 ≤|N| = k ≤100, the above representation can be computed very efficiently for a large class of relational features. We can now state the following complexity result. Theorem 2. Let D be a relational structure (knowledge base), let d be the size of the largest rneighborhood of D’s Gaifman graph, and let s be the greatest encoding size of any formula in Φ. For a Gaifman model with parameters r and k, the worst-case complexity for computing the feature representations of N neighborhoods is O(N(d + |Φ|ks)). Existing SRL approaches could be applied to the generated neighborhoods, treating each as a possible world for structure and parameter learning. However, our goal is to learn relational models that utilize embeddings computed by multi-layered neural networks. 4 Algorithm 1 GENNEIGHS: Computes a list of w neighborhoods of size k for an input tuple d. 1: input: tuple d ∈Dn, parameters r, k, and w 2: S = [ ] 3: while |S| < w do 4: S = ∅ 5: N = Nr(d) 6: for all i ∈{1, ..., n} do 7: U = min(⌊k/n⌋, |Nr(di)|) elements sampled uniformly from Nr(di) 8: N = N \ U 9: S = S ∪U 10: U = min(|S| −k, |N|) elements sampled uniformly from N 11: S = S ∪U 12: S = S + S 13: return S ... W1 ... Wn Φ M ! Figure 3: Learning of a Gaifman model. W1 ... Wn ? ! Φ M Figure 4: Inference with a Gaifman model. 3.1 Learning Distributions for Relational Queries Let q be a first-order formula (the relational query) and S(q) the result set of the query, that is, all groundings that render the formula satisfied in the knowledge base. The feature representations generated for tuples of objects d ∈S(q) serve as positive training examples. The Gaifman models’ aim is to learn neighborhood embeddings that capture local structure of tuples for which we know that the target query evaluates to true. Similar to previous work, we generate negative examples by corrupting tuples that correspond to positive examples. The corruption mechanism takes a positive input tuple d = (d1, ..., dn) and substitutes, for each i ∈{1, ..., n}, the domain element di with objects sampled from D while keeping the rest of the tuple fixed. The discriminative Gaifman model performs the following steps. 1. Evaluate the target query q and compute the result set S(q) 2. For each tuple d in the result set S(q): • Compute N, a multiset of w neighborhoods ˜N ∈Nr,k(d) with Algorithm 1; each such neighborhood serves as a positive training example • Compute ˜ N, a multiset of ˜w neighborhoods N ∈Nr,k(˜d) for corrupted versions of d with Algorithm 1; each such neighborhood serves as a negative training example • Perform model checking and counting within the neighborhoods to compute the feature representations vN and v ˜N for each N ∈N and ˜N ∈˜ N, respectively 3. Learn a ML model with the generated positive and negative training examples. Learning the final Gaifman model depends on the base ML model class M and its loss function. We obtained state of the art results with neural networks, gradient-based learning, and categorical cross-entropy as loss function L = − X N∈N log pM(vN) + X ˜N∈˜ N log(1 −pM(v ˜N)) , where pM(vN) is the probability the model returns on input vN. However, other loss functions are possible. The probability of a particular substitution of the target query to be true is now P(q[s/d] = True) = E N∈N(r,k)(d)[pM(vN)]. The expected probability of a representation of a neighborhood drawn uniformly at random from N(r,k)(d). It is now possible to generate several neighborhoods N and their representations vN to 5 estimate P(q[s/d] = True), simply by averaging the neighborhoods’ probabilities. We have found experimentally that a single neighborhood already leads to highly accurate results but also that more neighborhood samples further improve the accurracy. Let us emphasize again the novel semantics of Gaifman models. Gaifman models generate a large number of small, bounded-size structures from a large structure, learn a representation for these bounded-size structures, and use the resulting representation to answer queries concerning the original structure as a whole. The advantages are model weight sharing across a large number of neighborhoods and efficiency of the computational problems. Figure 3 and Figure 4 illustrate learning from bounded-size neighborhood structures and inference in Gaifman models. 3.2 Structure Learning Structure learning is the problem of determining the set of relational features Φ. We provide some directions and leave the problem to future work. Given a collection of bounded-size neighborhoods of the Gaifman graph, the goal is to determine suitable relational features for the problem at hand. There is a set of features which we found to be highly effective. For example, formulas of the form ∃x r(s1, x), ∃x r(s1, x) ∧r(x, s2), and ∃x, y r1(s1, x) ∧r2(x, y) ∧r3(y, s2) for all relations. The latter formulas capture fixed-length paths between s1 and s2 in the neighborhoods. Hence, Path Ranking type features [15] can be used in Gaifman models as a particular relational feature class. For path formulas with several different relations we cannot include all |R|3 combinations and, hence, we have to determine a subset occurring in the training data. Fortunately, since the neighborhood size is bounded, it is computationally feasible to compute frequent paths in the neighborhoods and to use these as features. The complexity of this learning problem is in the number of elements in the neighborhood and not in the number of all objects in the knowledge base. Relation paths that do not occur in the data can be discarded. Gaifman models can also use features of the form ∀x, y r(x, y) ⇒r(y, x), ∃x, y r(x, y), and ∀x, y, z r(x, y) ∧r(y, z) ⇒r(x, z), to name but a few. Moreover, features with free variables, such as r(s1, x) are counting features (here: the r out-degree of s1). It is even computationally feasible to include specific second-order features (for instance, quantifiers ranging over R) and aggregations of feature values. 3.3 Prior Confidence Values, Types, and Numerical Attributes Numerous existing knowledge bases assign confidence values (probabilities, weights, etc.) to their statements. Gaifman models can incorporate confidence values during the sampling and learning process. Instead of adding random noise to the representations, which we have found to be beneficial, noise can be added inversely proportional to the confidence values. Statements for which the prior confidence values are lower are more likely to be dropped out during training than statements with higher confidence values. Furthermore, Gaifman models can directly incorporate object types such as Actor and Action Movie as well as numerical features such as location and elevation. One simply has to specify a fixed position in the neighborhood representation v for each object position within the input tuples d. 4 Related Work Recent work on relational machine learning for knowledge graphs is surveyed in [20]. We focus on a select few methods we deem most related to Gaifman models and refer the interested reader to the above article. A large body of work exists on learning inference rules from knowledge bases. Examples include [31] and [1] where inference rules of length one are learned; and [25] where general inference rules are learned by applying a support threshold. Their method does not scale to large KBs and depends on predetermined thresholds. Lao et al. [15] train a logistic regression classifier with path features to perform KB completion. The idea is to perform a random walk between objects and to exploit the discovered paths as features. SFE [10] improves PRA by making the generation of random walks more efficient. More recent embedding methods have combined paths in KBs with KB embedding methods [17]. Gaifman models support a much broader class of relational features subsuming path features. For instance, Gaifman models incorporate counting features that have shown to be beneficial for relational models. 6 Latent feature models learn features for objects and relations that are not directly observed in the data. Examples of latent feature models are tensor factorization [21, 23, 26] and embedding models [5, 3, 4, 18, 13, 27]. The majority of these models can be understood as more or less complex neural networks operating on object and relation representations. Gaifman models can also be used to learn knowledge base embeddings. Indeed, one can show that it generalizes or complements existing approaches. For instance, the universal schema [23] considers pairs of objects where relation membership variables comprise the model’s features. We have the following interesting relationship between universal schemas [23] and Gaifman models. Given a knowledge base D. The Gaifman model for D with r = 0, k = 2, Φ = S r∈R{r(s1, s2), r(s2, s1)}, w = 1 and ˜w = 0 is equivalent to the Universal Schema [23] for D up to the base model class M. More recent methods combine embedding methods and inference-based logical approaches for relation extraction [24]. Contrary to most existing multi-relational ML models [20], Gaifman models natively support higher-arity relations, functional and type constraints, numerical features, and complex target queries. 5 Experiments Table 1: The statistics of the data sets. Dataset |D| |R| # train # test WN18 40,943 18 141,442 5,000 FB15k 14,951 1,345 483,142 59,071 The aim of the experiments is to understand the efficiency and effectiveness of Gaifman models for typical knowledge base inference problems. We evaluate the proposed class of models with two data sets derived from the knowledge bases WORDNET and FREEBASE [2]. Both data sets consist of a list of statements r(d1, d2) that are known to be true. For a detailed description of the data sets, whose statistics are listed in Table 1, we refer the reader to previous work [4]. After training the models, we perform entity prediction as follows. For each statement r(d1, d2) in the test set, d2 is replaced by each of the KB’s objects in turn. The probabilities of the resulting statements are predicted and sorted in descending order. Finally, the rank of the correct statement within this ordered list is determined. The same process is repeated now with replacements of d1. We compare Gaifman models with q = r(x, y) to state of the art knowledge base completion approaches which are listed in Table 2. We trained Gaifman models with r = 1 and different values for k, w, and ˜w. We use a neural network architecture with two hidden layers, each having 100 units and sigmoid activations, dropout of 0.2 on the input layer, and a softmax layer. Dropout makes the model more robust to missing relations between objects. We trained one model per relation and left the hyper-parameters fixed across models. We did not perform structure learning and instead used the following set of relational features Φ := [ r∈R, i∈{1,2} r(s1, s2), r(s2, s1), ∃x r(x, si), ∃x r(si, x), ∃x r(s1, x) ∧r(x, s2), ∃x r(s2, x) ∧r(x, s1) . To compute the probabilities, we averaged the probabilities of N = 1, 2, or 3 generated (r, k)neighborhoods. 5 10 20 50 100 inf 0.5 1.0 1.5 Query answers per second ×104 WN18 FB15k Figure 5: Query answers per second rates for different values of the parameter k. We performed runtime experiments to evaluate the models’ efficiency. Embedding models have the advantage that one dot product for every candidate object is sufficient to compute the score for the corresponding statement and we need to assess the performance of Gaifman models in this context. All experiments were run on commodity hardware with 64G RAM and a single 2.8 GHz CPU. Table 2 lists the experimental results for different parameter settings [N, k, w, ˜w]. The Gaifman models achieve the highest hits@10 and hits@1 values for both data sets. As expected, the more neighborhood samples are used to compute the probability estimate (N = 1, 2, 3) the better the result. When the entire 1-neighborhood is considered (k = ∞), the performance for WN18 does not deteriorate as it does for FB15k. This is due to the fact that 7 Table 2: Results of the entity prediction experiments. Data Set WN18 FB15K Metric Mean rank Hits@10 Hits@1 Mean rank Hits@10 Hits@1 RESCAL[21] 1,163 52.8 683 44.1 SE[5] 985 80.5 162 39.8 LFM[12] 456 81.6 164 33.1 TransE[4] 251 89.2 8.9 51 71.5 28.1 TransR[18] 219 91.7 78 65.5 DistMult[30] 902 93.7 76.1 97 82.8 44.3 Gaifman [1, ∞, 1, 5] 298 93.9 75.8 124 78.1 59.8 Gaifman [1, 20, 1, 2] 357 88.1 66.8 114 79.2 60.1 Gaifman [1, 20, 5, 25] 392 93.6 76.4 97 82.1 65.6 Gaifman [2, 20, 5, 25] 378 93.9 76.7 84 83.4 68.5 Gaifman [3, 20, 5, 25] 352 93.9 76.1 75 84.2 69.2 objects in WN18 have on average few neighbors. FB15k has more variance in the Gaifman graph’s degree distribution (see Figure 2) which is reflected in the better performance for smaller k values. The experiments also show that it is beneficial to generate a large number of representations (both positive and negative ones). The performance improves with larger number of training examples. The runtime experiments demonstrate that Gaifman models perform inference very efficiently for k ≤20. Figure 5 depicts the number of query answers the Gaifman models are able to serve per second, averaged over relation types. A query answer returns the probability for one object pair. These numbers include neighborhood generation and network inference. The results are promising with about 5000 query answers per second (averaged across relation types) as long as k remains small. Since most object pairs of WN18 have a 1-neighborhood whose size is smaller than 20, the answers per second rates for k > 20 is not reduced as drastically as for FB15k. 6 Conclusion and Future Work Gaifman models are a novel family of relational machine learning models that perform learning and inference within and across locally connected regions of relational structures. Future directions of research include structure learning, more sophisticated base model classes, and application of Gaifman models to additional relational ML problems. Acknowledgements Many thanks to Alberto García-Durán, Mohamed Ahmed, and Kristian Kersting for their helpful feedback. References [1] J. Berant, I. Dagan, and J. Goldberger. Global learning of typed entailment rules. In Annual Meeting of the Association for Computational Linguistics, pages 610–619, 2011. [2] K. Bollacker, C. Evans, P. Paritosh, T. Sturge, and J. Taylor. Freebase: A collaboratively created graph database for structuring human knowledge. In SIGMOD, pages 1247–1250, 2008. [3] A. Bordes, X. Glorot, J. Weston, and Y. Bengio. Joint learning of words and meaning representations for open-text semantic parsing. In Conference on Artificial Intelligence and Statistics, pages 127–135, 2012. [4] A. Bordes, N. Usunier, A. Garcia-Duran, J. Weston, and O. Yakhnenko. Translating embeddings for modeling multi-relational data. In Neural Information Processing Systems, pages 2787–2795. 2013. [5] A. Bordes, J. Weston, R. Collobert, and Y. Bengio. Learning structured embeddings of knowledge bases. In AAAI Conference on Artificial Intelligence, 2011. [6] A. Carlson, J. Betteridge, B. Kisiel, B. Settles, E. R. Hruschka, and T. M. Mitchell. Toward an architecture for never-ending language learning. In Twenty-Fourth AAAI Conference on Artificial Intelligence, 2010. [7] I. I. Ceylan, A. Darwiche, and G. Van den Broeck. Open-world probabilistic databases. In Proceedings of the 15th International Conference on Principles of Knowledge Representation and Reasoning (KR), 2016. 8 [8] A. Dries, A. Kimmig, W. Meert, J. Renkens, G. Van den Broeck, J. Vlasselaer, and L. De Raedt. ProbLog2: Probabilistic logic programming. Lecture Notes in Computer Science, 9286:312–315, 2015. [9] H. Gaifman. On local and non-local properties. In Proceedings of the herbrand symposium, logic colloquium, volume 81, pages 105–135, 1982. [10] M. Gardner and T. M. Mitchell. Efficient and expressive knowledge base completion using subgraph feature extraction. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1488–1498, 2015. [11] J. Hoffart, F. M. Suchanek, K. Berberich, and G. Weikum. Yago2: A spatially and temporally enhanced knowledge base from wikipedia. Artif. Intell., 194:28–61, 2013. [12] R. Jenatton, N. L. Roux, A. Bordes, and G. R. Obozinski. A latent factor model for highly multi-relational data. In Neural Information Processing Systems, pages 3167–3175, 2012. [13] G. Ji, K. Liu, S. He, and J. Zhao. Knowledge graph completion with adaptive sparse transfer matrix. In D. Schuurmans and M. P. Wellman, editors, Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, pages 985–991, 2016. [14] K. Kersting. Lifted probabilistic inference. In European Conference on Artificial Intelligence, pages 33–38, 2012. [15] N. Lao, T. Mitchell, and W. W. Cohen. Random walk inference and learning in a large scale knowledge base. In Empirical Methods in Natural Language Processing, pages 529–539, 2011. [16] L. Libkin. Elements Of Finite Model Theory. SpringerVerlag, 2004. [17] Y. Lin, Z. Liu, H. Luan, M. Sun, S. Rao, and S. Liu. Modeling relation paths for representation learning of knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, EMNLP 2015, Lisbon, Portugal, September 17-21, 2015, pages 705–714, 2015. [18] Y. Lin, Z. Liu, M. Sun, Y. Liu, and X. Zhu. Learning entity and relation embeddings for knowledge graph completion. In AAAI Conference on Artificial Intelligence, pages 2181–2187, 2015. [19] B. C. Milch. Probabilistic Models with Unknown Objects. PhD thesis, 2006. [20] 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. [21] M. Nickel, V. Tresp, and H.-P. Kriegel. A three-way model for collective learning on multi-relational data. In International conference on machine learning (ICML), pages 809–816, 2011. [22] M. Richardson and P. Domingos. Markov logic networks. Machine learning, 62(1-2):107–136, 2006. [23] S. Riedel, L. Yao, B. M. Marlin, and A. McCallum. Relation extraction with matrix factorization and universal schemas. In HLT-NAACL, 2013. [24] T. Rocktäschel, S. Singh, and S. Riedel. Injecting logical background knowledge into embeddings for relation extraction. In Conference of the North American Chapter of the ACL (NAACL), 2015. [25] S. Schoenmackers, O. Etzioni, D. S. Weld, and J. Davis. Learning first-order horn clauses from web text. In Conference on Empirical Methods in Natural Language Processing, pages 1088–1098, 2010. [26] R. Socher, D. Chen, C. D. Manning, and A. Ng. Reasoning with neural tensor networks for knowledge base completion. In Neural Information Processing Systems, pages 926–934. 2013. [27] T. Trouillon, J. Welbl, S. Riedel, É. Gaussier, and G. Bouchard. Complex embeddings for simple link prediction. In Proceedings of the 33nd International Conference on Machine Learning, volume 48, pages 2071–2080, 2016. [28] G. Van den Broeck. Lifted inference and learning in statistical relational models. 2013. [29] M. Y. Vardi. The complexity of relational query languages. In ACM symposium on Theory of computing, pages 137–146, 1982. [30] B. Yang, W.-t. Yih, X. He, J. Gao, and L. Deng. Embedding entities and relations for learning and inference in knowledge bases. In International Conference on Learning Representations, 2015. [31] A. Yates and O. Etzioni. Unsupervised resolution of objects and relations on the web. In Conference of the North American Chapter of the Association for Computational Linguistics, 2007. 9 | 2016 | 275 |
6,189 | Selective inference for group-sparse linear models Fan Yang Department of Statistics University of Chicago fyang1@uchicago.edu Rina Foygel Barber Department of Statistics University of Chicago rina@uchicago.edu Prateek Jain Microsoft Research India prajain@microsoft.com John Lafferty Depts. of Statistics and Computer Science University of Chicago lafferty@galton.uchicago.edu Abstract We develop tools for selective inference in the setting of group sparsity, including the construction of confidence intervals and p-values for testing selected groups of variables. Our main technical result gives the precise distribution of the magnitude of the projection of the data onto a given subspace, and enables us to develop inference procedures for a broad class of group-sparse selection methods, including the group lasso, iterative hard thresholding, and forward stepwise regression. We give numerical results to illustrate these tools on simulated data and on health record data. 1 Introduction Significant progress has been recently made on developing inference tools to complement the feature selection methods that have been intensively studied in the past decade [6, 5, 9]. The goal of selective inference is to make accurate uncertainty assessments for the parameters estimated using a feature selection algorithm, such as the lasso [12]. The fundamental challenge is that after the data have been used to select a set of coefficients to be studied, this selection event must then be accounted for when performing inference, using the same data. A specific goal of selective inference is to provide p-values and confidence intervals for the fitted coefficients. As the sparsity pattern is chosen using nonlinear estimators, the distribution of the estimated coefficients is typically non-Gaussian and multimodal, even under a standard Gaussian noise model, making classical techniques unusable for accurate inference. It is of particular interest to develop finite-sample, non-asymptotic results. In this paper, we present new results for selective inference in the setting of group sparsity [15, 3, 10]. We consider the linear model Y = Xβ + N(0, σ2In) where X ∈Rn×p is a fixed design matrix. In many applications, the p columns or features of X are naturally grouped into blocks C1, . . . , CG ⊆ {1, . . . , p}. In the high dimensional setting, the working assumption is that only a few of the corresponding blocks of the coefficients β contain nonzero elements; that is, βCg = 0 for most groups g. This group-sparse model can be viewed as an extension of the standard sparse regression model. Algorithms for fitting this model, such as the group lasso [15], extend well-studied methods for sparse linear regression to this grouped setting. In the group-sparse setting, recent results of Loftus and Taylor [9] give a selective inference method for computing p-values for each group chosen by a model selection method such as forward stepwise regression; selection via cross-validation was studied in [9]. More generally, the inference technique of [7] applies to any model selection method whose outcome can be described in terms of quadratic 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. conditions on Y . However, their technique cannot be used to construct confidence intervals for the selected coefficients or for the size of the effects of the selected groups. Our main contribution in this work is to provide a tool for constructing confidence intervals as well as p-values for testing selected groups. In contrast to the (non-grouped) sparse regression setting, the confidence interval construction does not follow immediately from the p-value calculation, and requires a careful analysis of non-centered multivariate normal distributions. Our key technical result precisely characterizes the density of ∥PLY ∥2 (the magnitude of the projection of Y onto a given subspace L), conditioned on a particular selection event. This “truncated projection lemma” is the group-wise analogue of the “polyhedral lemma” of Lee et al. [5] for the lasso. This technical result enables us to develop inference tools for a broad class of model selection methods, including the group lasso [15], iterative hard thresholding [1, 4], and forward stepwise group selection [14]. In the following section we frame the problem of group-sparse inference more precisely, and present previous results in this direction. We then state our main technical results; the proofs of the results are given in the supplementary material. In Section 3 we show how these results can be used to develop inferential tools for three different model selection algorithms for group sparsity. In Section 4 we give numerical results to illustrate these tools on simulated data, as well as on the California county health data used in previous work [9]. We conclude with a brief discussion of our work. 2 Main results: selective inference over subspaces To establish some notation, we will write PL for the projection to any linear subspace L ⊆Rn, and P⊥ L for the projection to its orthogonal complement. For y ∈Rn, dirL(y) = PLy ∥PLy∥2 ∈L ∩Sn−1 is the unit vector in the direction of PLy. This direction is not defined if PLy = 0. We focus on the linear model Y = Xβ + N(0, σ2In), where X ∈Rn×p is fixed and σ2 > 0 is assumed to be known. More generally, our model is Y ∼N(µ, σ2In) with µ ∈Rn unknown and σ2 known. For a given block of variables Cg ⊆[p], we write Xg to denote the n × |Cg| submatrix of X consisting of all features of this block. For a set S ⊆[G] of blocks, XS consists of all features that lie in any of the blocks in S. When we refer to “selective inference,” we are generally interested in the distribution of subsets of parameters that have been chosen by some model selection procedure. After choosing a set of groups S ⊆[G], we would like to test whether the true mean µ is correlated with a group Xg for each g ∈S after controlling for the remaining selected groups, i.e. after regressing out all the other groups, indexed by S\g. Thus, the following question is central to selective inference: Questiong,S : What is the magnitude of the projection of µ onto the span of P⊥ XS\gXg? (1) In particular, we are interested in a hypothesis test to determine if µ is orthogonal to this span, that is, whether block g should be removed from the model with group-sparse support determined by S; this is the question studied by Loftus and Taylor [9] for which they compute p-values. Alternatively, we may be interested in a confidence interval on ∥PLµ∥2, where L = span(P⊥ XS\gXg). Since S and g are themselves determined by the data Y , any inference on these questions must be performed “post-selection,” by conditioning on the event that S is the selected set of groups. 2.1 Background: The polyhedral lemma In the more standard sparse regression setting without grouped variables, after selecting a set S ⊆[p] of features corresponding to columns of X, we might be interested in testing whether the column Xj should be included in the model obtained by regressing Y onto XS\j. We may want to test the null hypothesis that X⊤ j P⊥ XS\jµ is zero, or to construct a confidence interval for this inner product. In the setting where S is the output of the lasso, Lee et al. [5] and Tibshirani et al. [13] characterize the selection event as a polyhedron in Rn: for any set S ⊆[p] and any signs s ∈{±1}S, the event that the lasso (with a fixed regularization parameter λ) selects the given support with the given signs is equivalent to the event Y ∈A = y : Ay < b , where A is a fixed matrix and b is a fixed vector, which are functions of X, S, s, λ. The inequalities are interpreted elementwise, yielding a convex polyhedron A. To test the regression question described above, one then tests η⊤µ for a fixed unit vector η ∝P⊥ XS\jXj. The “polyhedral lemma”, found in [5, Theorem 5.2] and [13, Lemma 2], proves that the distribution of η⊤Y , after conditioning on {Y ∈A} and on P⊥ η Y , is given by a 2 truncated normal distribution, with density f(r) ∝exp −(r −η⊤µ)2/2σ2 · 1 {a1(Y ) ≤r ≤a2(Y )} . (2) The interval endpoints a1(Y ), a2(Y ) depend on Y only through P⊥ η Y and are defined to include exactly those values of r that are feasible given the event Y ∈A. That is, the interval contains all values r such that r · η + P⊥ η Y ∈A. Examining (2), we see that under the null hypothesis η⊤µ = 0, this is a truncated zero-mean normal density, which can be used to construct a p-value testing η⊤µ = 0. To construct a confidence interval for η⊤µ, we can instead use (2) with nonzero η⊤µ, which is a truncated noncentral normal density. 2.2 The group-sparse case In the group-sparse regression setting, Loftus and Taylor [9] extend the work of Lee et al. [5] to questions where we would like to test PLµ, the projection of the mean µ to some potentially multidimensional subspace, rather than simply testing η⊤µ, which can be interpreted as a projection to a one-dimensional subspace, L = span(η). For a fixed set A ⊆Rn and a fixed subspace L of dimension k, Loftus and Taylor [9, Theorem 3.1] prove that, after conditioning on {Y ∈A}, on dirL(Y ), and on P⊥ L Y , under the null hypothesis PLµ = 0, the distribution of ∥PLY ∥2 is given by a truncated χk distribution, ∥PLY ∥2 ∼(σ · χk truncated to RY ) where RY = r : r · dirL(Y ) + P⊥ L Y ∈A . (3) In particular, this means that, if we would like to test the null hypothesis PLµ = 0, we can compute a p-value using the truncated χk distribution as our null distribution. To better understand this null hypothesis, suppose that we run a group-sparse model selection algorithm that chooses a set of blocks S ⊆[G]. We might then want to test whether some particular block g ∈S should be retained in this model or removed. In that case, we would set L = span(P⊥ XS\gXg) and test whether PLµ = 0. Examining the parallels between this result and the work of Lee et al. [5], where (2) gives either a truncated zero-mean normal or truncated noncentral normal distribution depending on whether the null hypothesis η⊤µ = 0 is true or false, we might expect that the result (3) of Loftus and Taylor [9] can extend in a straightforward way to the case where PLµ ̸= 0. More specifically, we might expect that (3) might then be replaced by a truncated noncentral χk distribution, with its noncentrality parameter determined by ∥PLµ∥2. However, this turns out not to be the case. To understand why, observe that ∥PLY ∥2 and dirL(Y ) are the length and the direction of the vector PLY ; in the inference procedure of Loftus and Taylor [9], they need to condition on the direction dirL(Y ) in order to compute the truncation interval RY , and then they perform inference on ∥PLY ∥2, the length. These two quantities are independent for a centered multivariate normal, and therefore if PLµ = 0 then ∥PLY ∥2 follows a χk distribution even if we have conditioned on dirL(Y ). However, in the general case where PLµ ̸= 0, we do not have independence between the length and the direction of PLY , and so while ∥PLY ∥2 is marginally distributed as a noncentral χk, this is no longer true after conditioning on dirL(Y ). In this work, we consider the problem of computing the distribution of ∥PLY ∥2 after conditioning on dirL(Y ), which is the setting that we require for inference. This leads to the main contribution of this work, where we are able to perform inference on PLµ beyond simply testing the null hypothesis that PLµ = 0. 2.3 Key lemma: Truncated projections of Gaussians Before presenting our key lemma, we introduce some further notation. Let A ⊆Rn be any fixed open set and let L ⊆Rn be a fixed subspace of dimension k. For any y ∈A, consider the set Ry = {r > 0 : r · dirL(y) + P⊥ L y ∈A} ⊆R+. Note that Ry is an open subset of R+, and its construction does not depend on ∥PLy∥2, but we see that ∥PLy∥2 ∈Ry by definition. Lemma 1 (Truncated projection). Let A ⊆Rn be a fixed open set and let L ⊆Rn be a fixed subspace of dimension k. Suppose that Y ∼N(µ, σ2In). Then, conditioning on the values of dirL(Y ) and P⊥ L Y and on the event Y ∈A, the conditional distribution of ∥PLY ∥2 has density1 f(r) ∝rk−1 exp −1 2σ2 r2 −2r · ⟨dirL(Y ), µ⟩ · 1 {r ∈RY } . We pause to point out two special cases that are treated in the existing literature. 1Here and throughout the paper, we ignore the possibility that Y ⊥L since this has probability zero. 3 Special case 1: k = 1 and A is a convex polytope. Suppose A is the convex polytope {y : Ay < b} for fixed A ∈Rm×n and b ∈Rm. In this case, this almost exactly yields the “polyhedral lemma” of Lee et al. [5, Theorem 5.2]. Specifically, in their work they perform inference on η⊤µ for a fixed vector η; this corresponds to taking L = span(η) in our notation. Then since k = 1, Lemma 1 yields a truncated Gaussian distribution, coinciding with Lee et al. [5]’s result (2). The only difference relative to [5] is that our lemma implicitly conditions on sign(η⊤Y ), which is not required in [5]. Special case 2: the mean µ is orthogonal to the subspace L. In this case, without conditioning on {Y ∈A}, we have PLY = PL µ + N(0, σ2I) = PL N(0, σ2I) , and so ∥PLY ∥2 ∼σ · χk. Without conditioning on {Y ∈A} (or equivalently, taking A = Rn), the resulting density is then f(r) ∝rk−1e−r2/2σ2 · 1 {r > 0} which is the density of the χk distribution (rescaled by σ), as expected. If we also condition on {Y ∈A} then this is a truncated χk distribution, as proved in Loftus and Taylor [9, Theorem 3.1]. 2.4 Selective inference on truncated projections We now show how the key result in Lemma 1 can be used for group-sparse inference. In particular, we show how to compute a p-value for the null hypothesis H0 : µ ⊥L, or equivalently, H0 : ∥PLµ∥2 = 0. In addition, we show how to compute a one-sided confidence interval for ∥PLµ∥2, specifically, how to give a lower bound on the size of this projection. Theorem 1 (Selective inference for projections). Under the setting and notation of Lemma 1, define P = R r∈RY ,r>∥PLY ∥2 rk−1e−r2/2σ2 dr R r∈RY rk−1e−r2/2σ2 dr . (4) If µ ⊥L (or, more generally, if ⟨dirL(Y ), µ⟩= 0), then P ∼Uniform[0, 1]. Furthermore, for any desired error level α ∈(0, 1), there is a unique value Lα ∈R satisfying R r∈RY ,r>∥PLY ∥2 rk−1e−(r2−2rLα)/2σ2 dr R r∈RY rk−1e−(r2−2rLα)/2σ2 dr = α, (5) and we have P {∥PLµ∥2 ≥Lα} ≥P {⟨dirL(Y ), µ⟩≥Lα} = 1 −α. Finally, the p-value and the confidence interval agree in the sense that P < α if and only if Lα > 0. From the form of Lemma 1, we see that we are actually performing inference on ⟨dirL(Y ), µ⟩. Since ∥PLµ∥2 ≥⟨dirL(Y ), µ⟩, this means that any lower bound on ⟨dirL(Y ), µ⟩also gives a lower bound on ∥PLµ∥2. For the p-value, the statement ⟨dirL(Y ), µ⟩= 0 is implied by the stronger null hypothesis µ ⊥L. We can also use Lemma 1 to give a two-sided confidence interval for ⟨dirL(Y ), µ⟩; specifically, ⟨dirL(Y ), µ⟩lies in the interval [Lα/2, L1−α/2] with probability 1 −α. However, in general this cannot be extended to a two-sided interval for ∥PLµ∥2. To compare to the main results of Loftus and Taylor [9], their work produces the p-value (4) testing the null hypothesis µ ⊥L, but does not extend to testing PLµ beyond the null hypothesis, which the second part (5) of our main theorem is able to do.2 3 Applications to group sparse regression methods In this section we develop inference tools for three methods for group-sparse model selection: forward stepwise regression (also considered by Loftus and Taylor [9] with results on hypothesis testing), iterative hard thresholding (IHT), and the group lasso. 2Their work furthermore considers the special case where the conditioning event, Y ∈A, is determined by a “quadratic selection rule,” that is, A is defined by a set of quadratic constraints on y ∈Rn. However, extending to the general case is merely a question of computation (as we explore below for performing inference for the group lasso) and this extension should not be viewed as a primary contribution of this work. 4 3.1 General recipe With a fixed design matrix, the outcome of any group-sparse selection method is a function of Y . For example, a forward stepwise procedure determines a particular sequence of groups of variables. We call such an outcome a selection event, and assume that the set of all selection events forms a countable partition of Rn into disjoint open sets: Rn = ∪eAe.3 Each data vector y ∈Rn determines a selection event, denoted e(y), and thus y ∈Ae(y). Let S(y) ⊆[G] be the set of groups selected for testing. This is assumed to be a function of e(y), i.e. S(y) = Se for all y ∈Ae. For any g ∈Se, let Le,g = span(P⊥ XSe\gXg), the subspace of Rn indicating correlation with group Xg beyond what can be explained by the other selected groups. Write RY = {r > 0 : r · U + Y⊥∈Ae(Y )}, where U = dirLe(Y ),g(Y ) and Y⊥= P⊥ Le(Y ),gY . If we condition on the event {Y ∈Ae} for some e, then as soon as we have calculated the region RY ⊆R+, Theorem 1 will allow us to perform inference on the quantity of interest ∥PLe,gµ∥2 by evaluating the expressions (4) and (5). In other words, we are testing whether µ is significantly correlated with the group Xg, after controlling for all the other selected groups, S(Y )\g = Se\g. To evaluate these expressions accurately, ideally we would like an explicit characterization of the region RY ⊆R+. To gain a better intuition for this set, define zY (r) = r · U + Y⊥∈Rn for r > 0, and note that zY (r) = Y when we plug in r = ∥PLe(Y ),gY ∥2. Then we see that RY = r > 0 : e(zY (r)) = e(Y ) . (6) In other words, we need to find the range of values of r such that, if we replace Y with zY (r), then this does not change the output of the model selection algorithm, i.e. e(zY (r)) = e(Y ). For the forward stepwise and IHT methods, we find that we can calculate RY explicitly. For the group lasso, we cannot calculate RY explicitly, but we can nonetheless compute the integrals required by Theorem 1 through numerical approximations. We now present the details for each of these methods. 3.2 Forward stepwise regression Forward stepwise regression [2, 14] is a simple and widely used method. We will use the following version:4 for design matrix X and response Y = y, 1. Initialize the residual bϵ0 = y and the model S0 = ∅. 2. For t = 1, 2, . . . , T, (a) Let gt = arg maxg∈[G]\St−1{∥X⊤ g bϵt−1∥2}. (b) Update the model, St = {g1, . . . , gt}, and update the residual, bϵt = P⊥ XSt y. Testing all groups at time T. First we consider the inference procedure where, at time T, we would like to test each selected group gt for t = 1, . . . , T; inference for this procedure was derived also in [8]. Our selection event e(Y ) is the ordered sequence g1, . . . , gT of selected groups. For a response vector Y = y, this selection event is equivalent to ∥X⊤ gkP⊥ XSk−1 y∥2 > ∥X⊤ g P⊥ XSk−1 y∥2 for all k = 1, . . . , T, for all g ̸∈Sk. (7) Now we would like to perform inference on the group g = gt, while controlling for the other groups in S(Y ) = ST . Define U, Y⊥, and zY (r) as before. Then, to determine RY = {r > 0 : zY (r) ∈ Ae(Y )}, we check whether all of the inequalities in (7) are satisfied with y = zY (r): for each k = 1, . . . , T and each g ̸∈Sk, the corresponding inequality of (7) can be expressed as r2 · ∥X⊤ gkP⊥ XSk−1 U∥2 2 + 2r · ⟨X⊤ gkP⊥ XSk−1 U, X⊤ gkP⊥ XSk−1 Y⊥⟩+ ∥X⊤ gkP⊥ XSk−1 Y⊥∥2 2 > r2 · ∥X⊤ g P⊥ XSk−1 U∥2 2 + 2r · ⟨X⊤ g P⊥ XSk−1 U, X⊤ g P⊥ XSk−1 Y⊥⟩+ ∥X⊤ g P⊥ XSk−1 Y⊥∥2 2. Solving this quadratic inequality over r ∈R+, we obtain a region Ik,g ⊆R+ which is either a single interval or a union of two disjoint intervals, whose endpoints we can calculate explicitly with the quadratic formula. The set RY is then given by all values r that satisfy the full set of inequalities: RY = \ k=1,...,T \ g∈[G]\Sk Ik,g. This is a union of finitely many disjoint intervals, whose endpoints are calculated explicitly as above. 3Since the distribution of Y is continuous on Rn, we ignore sets of measure zero without further comment. 4In practice, we would add some correction for the scale of the columns of Xg or for the number of features in group g; this can be accomplished with simple modifications of the forward stepwise procedure. 5 Sequential testing. Now suppose we carry out a sequential inference procedure, testing group gt at its time of selection, controlling only for the previously selected groups St−1. In fact, this is a special case of the non-sequential procedure above, which shows how to test gT while controlling for ST \gT = ST −1. Applying this method at each stage of the algorithm yields a sequential testing procedure. (The method developed in [9] computes p-values for this problem, testing whether µ ⊥P⊥ XSt−1 Xgt at each time t.) See the supplementary material for detailed pseudo-code. 3.3 Iterative hard thresholding (IHT) The iterative hard thresholding algorithm finds a k-group-sparse solution to the linear regression problem, iterating gradient descent steps with hard thresholding to update the model choice as needed [1, 4]. Given k ≥1, number of iterations T, step sizes ηt, design matrix X and response Y = y, 1. Initialize the coefficient vector, β0 = 0 ∈Rp (or any other desired initial point). 2. For t = 1, 2, . . . , T, (a) Take a gradient step, eβt = βt−1 −ηtX⊤(Xβt−1 −y). (b) Compute ∥(eβt)Cg∥2 for each g ∈[G] and let St ⊆[G] index the k largest norms. (c) Update the fitted coefficients βt via (βt)j = (eβt)j · 1 {j ∈∪g∈StCg}. Here we are typically interested in testing Questiong,ST for each g ∈ST . We condition on the selection event, e(Y ), given by the sequence of k-group-sparse models S1, . . . , ST selected at each stage of the algorithm, which is characterized by the inequalities ∥(eβt)Cg∥2 > ∥(eβt)Ch∥2 for all t = 1, . . . , T, and all g ∈St, h ̸∈St. (8) Fixing a group g ∈ST to test, determining RY = {r > 0 : zY (r) ∈Ae(Y )} involves checking whether all of the inequalities in (8) are satisfied with y = zY (r). First, with the response Y replaced by y = zY (r), we show that we can write eβt = r · ct + dt for each t = 1, . . . , T, where ct, dt ∈Rp are independent of r; in the supplementary material, we derive ct, dt inductively as c1 = η1 n X⊤U, d1 = (I −η1 n X⊤X)β0 + η1 n X⊤Y⊥, ct = (Ip −ηt n X⊤X)PSt−1ct−1 + ηt n X⊤U, dt = (Ip −ηt n X⊤X)PSt−1dt−1 + ηt n X⊤Y⊥ for t ≥2. Now we compute the region RY . For each t = 1, . . . , T and each g ∈St, h ̸∈St, the corresponding inequality in (8), after writing eβt = r · ct + dt, can be expressed as r2·∥(ct)Cg∥2 2+2r·⟨(ct)Cg, (dt)Cg⟩+∥(dt)Cg∥2 2 > r2·∥(ct)Ch∥2 2+2r·⟨(ct)Ch, (dt)Ch⟩+∥(dt)Ch∥2 2. As for the forward stepwise procedure, solving this quadratic inequality over r ∈R+, we obtain a region It,g,h ⊆R+ that is either a single interval or a union of two disjoint intervals whose endpoints we can calculate explicitly. Finally, we obtain RY = T t=1,...,T T g∈St T h∈[G]\St It,g,h. 3.4 The group lasso The group lasso, first introduced by Yuan and Lin [15], is a convex optimization method for linear regression where the form of the penalty is designed to encourage group-wise sparsity of the solution. It is an extension of the lasso method [12] for linear regression. The method is given by bβ = arg minβ 1 2∥y −Xβ∥2 2 + λ P g∥βCg∥2 , where λ > 0 is a penalty parameter. The penalty P g∥βCg∥2 promotes sparsity at the group level.5 For this method, we perform inference on the group support S of the fitted model bβ. We would like to test Questiong,S for each g ∈S. In this setting, for groups of size ≥2, we believe that it is not possible to analytically calculate RY , and furthermore, that there is no additional information that we can condition on to make this computation possible, without losing all power to do inference. We thus propose a numerical approximation that circumvents the need for an explicit calculation of RY . Examining the calculation of the p-value P and the lower bound Lα in Theorem 1, we see that we can write P = fY (0) and can find Lα as the unique solution to fY (Lα) = α, where fY (t) = Er∼σ·χk h ert/σ2 · 1 {r ∈RY , r > ∥PLY ∥2} i Er∼σ·χk ert/σ2 · 1 {r ∈RY } , 5Our method can also be applied to a modification of group lasso designed for overlapping groups [3] with a nearly identical procedure but we do not give details here. 6 where we treat Y as fixed in this calculation and set k = dim(L) = rank(XS\g). Both the numerator and denominator can be approximated by taking a large number B of samples r ∼σ · χk and taking the empirical expectations. Checking r ∈RY is equivalent to running the group lasso with the response replaced by y = zY (r), and checking if the resulting selected model remains unchanged. This may be problematic, however, if RY is in the tails of the σ · χk distribution. We implement an importance sampling approach by repeatedly drawing r ∼ψ for some density ψ; we find that ψ = ∥PLY ∥2 + N(0, σ2) works well in practice. Given samples r1, . . . , rB ∼ψ we then estimate fY (t) ≈bfY (t) := P b ψσ·χk (rb) ψ(rb) · erbt/σ2 · 1 {rb ∈RY , rb > ∥PLY ∥2} P b ψσ·χk (rb) ψ(rb) · erbt/σ2 · 1 {rb ∈RY } where ψσ·χk is the density of the σ·χk distribution. We then estimate P ≈bP = bfY (0). Finally, since bfY (t) is continuous and strictly increasing in t, we estimate Lα by numerically solving bfY (t) = α. 4 Experiments In this section we present results from experiments on simulated and real data, performed in R [11].6 4.1 Simulated data We fix sample size n = 500 and G = 50 groups each of size 10. For each trial, we generate a design matrix X with i.i.d. N(0, 1/n) entries, set β with its first 50 entries (corresponding to first s = 5 groups) equal to τ and all other entries equal to 0, and set Y = Xβ + N(0, In). We present the result for IHT here; the results for the other two methods can be found in the supplementary material. We run IHT to select k = 10 groups over T = 5 iterations, with step sizes ηt = 2 and initial point β0 = 0. For a moderate signal strength τ = 1.5, we plot the p-values for each selected group in Figure 1; each group displays p-values only for those trials in which it was selected. The histogram of p-values for the s true signals and for the G −s nulls are also shown. We see that the the distribution of p-values for the true signals concentrates near zero while the null p-values are roughly uniform. Next we look at the confidence intervals given by our method, examining their empirical coverage across different signal strengths τ in Figure 2. We fix confidence level 0.9 (i.e. α = 0.1) and check empirical coverage with respect to both ∥PLµ∥2 and ⟨dirL(Y ), µ⟩, with results shown separately for true signals and for nulls. For true signals, the confidence interval for ∥PLµ∥2 is somewhat conservative while the coverage for ⟨dirL(Y ), µ⟩is right at the target level, as expected from our theory. As signal strength τ increases, the gap is reduced for the true signals; this is because dirL(Y ) becomes an increasingly more accurate estimate of dirL(µ), and so the gap in the inequality ∥PLµ∥2 ≥⟨dirL(Y ), µ⟩is reduced. For the nulls, if the set of selected groups contains the support of the true model, which is nearly always true for higher signal levels τ, then the two are equivalent (as ∥PLµ∥2 = ⟨dirL(Y ), µ⟩= 0), and coverage is at the target level. At low signal levels τ, however, a true group is occasionally missed, in which case ∥PLµ∥2 > ⟨dirL(Y ), µ⟩strictly. Figure 1: Iterative hard thresholding (IHT). For each group, we plot its p-value for each trial in which that group was selected, for 200 trials. Histograms of the p-values for true signals (left, red) and for nulls (right, gray) are attached. 4.2 California health data We examine the 2015 California county health data7 which was also studied by Loftus and Taylor [9]. We fit a linear model where the response is the log-years of potential life lost and the covariates 6Code reproducing experiments: http://www.stat.uchicago.edu/~rina/group_inf.html 7Available at http://www.countyhealthrankings.org 7 Figure 2: Iterative hard thresholding (IHT). Empirical coverage over 2000 trials with signal strength τ. “Norm” and “inner product” refer to coverage of ∥PLµ∥2 and ⟨dirL(Y ), µ⟩, respectively. are the 34 predictors in this data set. We first let each predictor be its own group (i.e., group size 1) and run the three algorithms considered in Section 3. Next, we form a grouped model by expanding each predictor Xj into a group using the first three non-constant Legendre polynomials, (Xj, 1 2(3X2 j −1), 1 2(5X3 j −3Xj)). In each case we set parameters so that 8 groups are selected. The selected groups and their p-values are given in Table 1; interestingly, even when the same predictor is selected by multiple methods, its p-value can differ substantially across the different methods. Group size Forward stepwise p-value / seq. p-value Iterative hard thresholding p-value Group lasso p-value 1 80th percentile income 0.116 / 0.000 80th percentile income 0.000 80th percentile income 0.000 Injury death rate 0.000 / 0.000 Injury death rate 0.000 % Obese 0.007 Violent crime rate 0.016 / 0.000 % Smokers 0.004 % Physically inactive 0.040 % Receiving HbA1c 0.591 / 0.839 % Single-parent household 0.009 Violent crime rate 0.055 % Obese 0.481 / 0.464 % Children in poverty 0.332 % Single-parent household 0.075 Chlamydia rate 0.944 / 0.975 Physically unhealthy days 0.716 Injury death rate 0.235 % Physically inactive 0.654 / 0.812 Food environment index 0.807 % Smokers 0.701 % Alcohol-impaired 0.104 / 0.104 Mentally unhealthy days 0.957 Preventable hospital stays rate 0.932 3 80th percentile income 0.001 / 0.000 Injury death rate 0.000 80th percentile income 0.000 Injury death rate 0.044 / 0.000 80th percentile income 0.000 Injury death rate 0.000 Violent crime rate 0.793 / 0.617 % Smokers 0.000 % Single-parent household 0.038 % Physically inactive 0.507 / 0.249 % Single-parent household 0.005 % Physically inactive 0.043 % Alcohol-impaired 0.892 / 0.933 Food environment index 0.057 % Obese 0.339 % Severe housing problems 0.119 / 0.496 % Children in poverty 0.388 % Alcohol-impaired 0.366 Chlamydia rate 0.188 / 0.099 Physically unhealthy days 0.713 % Smokers 0.372 Preventable hospital stays rate 0.421 / 0.421 Mentally unhealthy days 0.977 Violent crime rate 0.629 Table 1: Selective p-values for the California county health data experiment. The predictors obtained with forward stepwise are tested both simultaneously at the end of the procedure (first p-value shown), and also tested sequentially (second p-value shown), and are displayed in the selected order. 5 Conclusion We develop selective inference tools for group-sparse linear regression methods, where for a datadependent selected set of groups S, we are able to both test each group g ∈S for inclusion in the model defined by S, and form a confidence interval for the effect size of group g in the model. Our theoretical results can be easily applied to a range of commonly used group-sparse regression methods, thus providing an efficient tool for finite-sample inference that correctly accounts for data-dependent model selection in the group-sparse setting. Acknowledgments Research supported in part by ONR grant N00014-15-1-2379, and NSF grants DMS-1513594 and DMS-1547396. 8 References [1] Thomas Blumensath and Mike E Davies. Sampling theorems for signals from the union of finitedimensional linear subspaces. Information Theory, IEEE Transactions on, 55(4):1872–1882, 2009. [2] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer Series in Statistics. Springer New York Inc., New York, NY, USA, 2001. [3] Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. Group lasso with overlap and graph lasso. In Proceedings of the 26th annual international conference on machine learning, pages 433–440. ACM, 2009. [4] Prateek Jain, Nikhil Rao, and Inderjit S. Dhillon. Structured sparse regression via greedy hardthresholding. CoRR, abs/1602.06042, 2016. URL http://arxiv.org/abs/1602.06042. [5] Jason D Lee, Dennis L Sun, Yuekai Sun, and Jonathan E Taylor. Exact post-selection inference with the lasso. arXiv preprint arXiv:1311.6238, 2013. [6] Jason D. Lee and Jonathan E. Taylor. Exact post model selection inference for marginal screening. In Advances in Neural Information Processing Systems 27, pages 136–144, 2014. [7] Joshua R Loftus. Selective inference after cross-validation. arXiv preprint arXiv:1511.08866, 2015. [8] Joshua R Loftus and Jonathan E Taylor. A significance test for forward stepwise model selection. arXiv preprint arXiv:1405.3920, 2014. [9] Joshua R. Loftus and Jonathan E. Taylor. Selective inference in regression models with groups of variables. arXiv:1511.01478, 2015. [10] Sofia Mosci, Silvia Villa, Alessandro Verri, and Lorenzo Rosasco. A primal-dual algorithm for group sparse regularization with overlapping groups. In Advances in Neural Information Processing Systems 23, pages 2604–2612, 2010. [11] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2016. URL https://www.R-project.org/. [12] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [13] Ryan J Tibshirani, Jonathan Taylor, Richard Lockhart, and Robert Tibshirani. Exact postselection inference for sequential regression procedures. arXiv preprint arXiv:1401.3889, 2014. [14] Joel A. Tropp and Anna C. Gilbert. Signal recovery from random measurements via orthogonal matching pursuit. IEEE Trans. Information Theory, 53(12):4655–4666, 2007. doi: 10.1109/TIT. 2007.909108. URL http://dx.doi.org/10.1109/TIT.2007.909108. [15] Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67, 2006. 9 | 2016 | 276 |
6,190 | InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets Xi Chen†‡, Yan Duan†‡, Rein Houthooft†‡, John Schulman†‡, Ilya Sutskever‡, Pieter Abbeel†‡ † UC Berkeley, Department of Electrical Engineering and Computer Sciences ‡ OpenAI Abstract This paper describes InfoGAN, an information-theoretic extension to the Generative Adversarial Network that is able to learn disentangled representations in a completely unsupervised manner. InfoGAN is a generative adversarial network that also maximizes the mutual information between a small subset of the latent variables and the observation. We derive a lower bound of the mutual information objective that can be optimized efficiently. Specifically, InfoGAN successfully disentangles writing styles from digit shapes on the MNIST dataset, pose from lighting of 3D rendered images, and background digits from the central digit on the SVHN dataset. It also discovers visual concepts that include hair styles, presence/absence of eyeglasses, and emotions on the CelebA face dataset. Experiments show that InfoGAN learns interpretable representations that are competitive with representations learned by existing supervised methods. For an up-to-date version of this paper, please see https://arxiv.org/abs/1606.03657. 1 Introduction Unsupervised learning can be described as the general problem of extracting value from unlabelled data which exists in vast quantities. A popular framework for unsupervised learning is that of representation learning [1, 2], whose goal is to use unlabelled data to learn a representation that exposes important semantic features as easily decodable factors. A method that can learn such representations is likely to exist [2], and to be useful for many downstream tasks which include classification, regression, visualization, and policy learning in reinforcement learning. While unsupervised learning is ill-posed because the relevant downstream tasks are unknown at training time, a disentangled representation, one which explicitly represents the salient attributes of a data instance, should be helpful for the relevant but unknown tasks. For example, for a dataset of faces, a useful disentangled representation may allocate a separate set of dimensions for each of the following attributes: facial expression, eye color, hairstyle, presence or absence of eyeglasses, and the identity of the corresponding person. A disentangled representation can be useful for natural tasks that require knowledge of the salient attributes of the data, which include tasks like face recognition and object recognition. It is not the case for unnatural supervised tasks, where the goal could be, for example, to determine whether the number of red pixels in an image is even or odd. Thus, to be useful, an unsupervised learning algorithm must in effect correctly guess the likely set of downstream classification tasks without being directly exposed to them. A significant fraction of unsupervised learning research is driven by generative modelling. It is motivated by the belief that the ability to synthesize, or “create” the observed data entails some form of understanding, and it is hoped that a good generative model will automatically learn a disentangled representation, even though it is easy to construct perfect generative models with arbitrarily bad representations. The most prominent generative models are the variational autoencoder (VAE) [3] and the generative adversarial network (GAN) [4]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In this paper, we present a simple modification to the generative adversarial network objective that encourages it to learn interpretable and meaningful representations. We do so by maximizing the mutual information between a fixed small subset of the GAN’s noise variables and the observations, which turns out to be relatively straightforward. Despite its simplicity, we found our method to be surprisingly effective: it was able to discover highly semantic and meaningful hidden representations on a number of image datasets: digits (MNIST), faces (CelebA), and house numbers (SVHN). The quality of our unsupervised disentangled representation matches previous works that made use of supervised label information [5–9]. These results suggest that generative modelling augmented with a mutual information cost could be a fruitful approach for learning disentangled representations. In the remainder of the paper, we begin with a review of the related work, noting the supervision that is required by previous methods that learn disentangled representations. Then we review GANs, which is the basis of InfoGAN. We describe how maximizing mutual information results in interpretable representations and derive a simple and efficient algorithm for doing so. Finally, in the experiments section, we first compare InfoGAN with prior approaches on relatively clean datasets and then show that InfoGAN can learn interpretable representations on complex datasets where no previous unsupervised approach is known to learn representations of comparable quality. 2 Related Work There exists a large body of work on unsupervised representation learning. Early methods were based on stacked (often denoising) autoencoders or restricted Boltzmann machines [10–13]. Another intriguing line of work consists of the ladder network [14], which has achieved spectacular results on a semi-supervised variant of the MNIST dataset. More recently, a model based on the VAE has achieved even better semi-supervised results on MNIST [15]. GANs [4] have been used by Radford et al. [16] to learn an image representation that supports basic linear algebra on code space. Lake et al. [17] have been able to learn representations using probabilistic inference over Bayesian programs, which achieved convincing one-shot learning results on the OMNI dataset. In addition, prior research attempted to learn disentangled representations using supervised data. One class of such methods trains a subset of the representation to match the supplied label using supervised learning: bilinear models [18] separate style and content; multi-view perceptron [19] separate face identity and view point; and Yang et al. [20] developed a recurrent variant that generates a sequence of latent factor transformations. Similarly, VAEs [5] and Adversarial Autoencoders [9] were shown to learn representations in which class label is separated from other variations. Recently several weakly supervised methods were developed to remove the need of explicitly labeling variations. disBM [21] is a higher-order Boltzmann machine which learns a disentangled representation by “clamping” a part of the hidden units for a pair of data points that are known to match in all but one factors of variation. DC-IGN [7] extends this “clamping” idea to VAE and successfully learns graphics codes that can represent pose and light in 3D rendered images. This line of work yields impressive results, but they rely on a supervised grouping of the data that is generally not available. Whitney et al. [8] proposed to alleviate the grouping requirement by learning from consecutive frames of images and use temporal continuity as supervisory signal. Unlike the cited prior works that strive to recover disentangled representations, InfoGAN requires no supervision of any kind. To the best of our knowledge, the only other unsupervised method that learns disentangled representations is hossRBM [13], a higher-order extension of the spike-and-slab restricted Boltzmann machine that can disentangle emotion from identity on the Toronto Face Dataset [22]. However, hossRBM can only disentangle discrete latent factors, and its computation cost grows exponentially in the number of factors. InfoGAN can disentangle both discrete and continuous latent factors, scale to complicated datasets, and typically requires no more training time than regular GANs. 3 Background: Generative Adversarial Networks Goodfellow et al. [4] introduced the Generative Adversarial Networks (GAN), a framework for training deep generative models using a minimax game. The goal is to learn a generator distribution PG(x) that matches the real data distribution Pdata(x). Instead of trying to explicitly assign probability to every x in the data distribution, GAN learns a generator network G that generates samples from 2 the generator distribution PG by transforming a noise variable z ∼Pnoise(z) into a sample G(z). This generator is trained by playing against an adversarial discriminator network D that aims to distinguish between samples from the true data distribution Pdata and the generator’s distribution PG. So for a given generator, the optimal discriminator is D(x) = Pdata(x)/(Pdata(x) + PG(x)). More formally, the minimax game is given by the following expression: min G max D V (D, G) = Ex∼Pdata[log D(x)] + Ez∼noise[log (1 −D(G(z)))] (1) 4 Mutual Information for Inducing Latent Codes The GAN formulation uses a simple factored continuous input noise vector z, while imposing no restrictions on the manner in which the generator may use this noise. As a result, it is possible that the noise will be used by the generator in a highly entangled way, causing the individual dimensions of z to not correspond to semantic features of the data. However, many domains naturally decompose into a set of semantically meaningful factors of variation. For instance, when generating images from the MNIST dataset, it would be ideal if the model automatically chose to allocate a discrete random variable to represent the numerical identity of the digit (0-9), and chose to have two additional continuous variables that represent the digit’s angle and thickness of the digit’s stroke. It would be useful if we could recover these concepts without any supervision, by simply specifying that an MNIST digit is generated by an 1-of-10 variable and two continuous variables. In this paper, rather than using a single unstructured noise vector, we propose to decompose the input noise vector into two parts: (i) z, which is treated as source of incompressible noise; (ii) c, which we will call the latent code and will target the salient structured semantic features of the data distribution. Mathematically, we denote the set of structured latent variables by c1, c2, . . . , cL. In its simplest form, we may assume a factored distribution, given by P(c1, c2, . . . , cL) = QL i=1 P(ci). For ease of notation, we will use latent codes c to denote the concatenation of all latent variables ci. We now propose a method for discovering these latent factors in an unsupervised way: we provide the generator network with both the incompressible noise z and the latent code c, so the form of the generator becomes G(z, c). However, in standard GAN, the generator is free to ignore the additional latent code c by finding a solution satisfying PG(x|c) = PG(x). To cope with the problem of trivial codes, we propose an information-theoretic regularization: there should be high mutual information between latent codes c and generator distribution G(z, c). Thus I(c; G(z, c)) should be high. In information theory, mutual information between X and Y , I(X; Y ), measures the “amount of information” learned from knowledge of random variable Y about the other random variable X. The mutual information can be expressed as the difference of two entropy terms: I(X; Y ) = H(X) −H(X|Y ) = H(Y ) −H(Y |X) (2) This definition has an intuitive interpretation: I(X; Y ) is the reduction of uncertainty in X when Y is observed. If X and Y are independent, then I(X; Y ) = 0, because knowing one variable reveals nothing about the other; by contrast, if X and Y are related by a deterministic, invertible function, then maximal mutual information is attained. This interpretation makes it easy to formulate a cost: given any x ∼PG(x), we want PG(c|x) to have a small entropy. In other words, the information in the latent code c should not be lost in the generation process. Similar mutual information inspired objectives have been considered before in the context of clustering [23–25]. Therefore, we propose to solve the following information-regularized minimax game: min G max D VI(D, G) = V (D, G) −λI(c; G(z, c)) (3) 5 Variational Mutual Information Maximization In practice, the mutual information term I(c; G(z, c)) is hard to maximize directly as it requires access to the posterior P(c|x). Fortunately we can obtain a lower bound of it by defining an auxiliary 3 distribution Q(c|x) to approximate P(c|x): I(c; G(z, c)) = H(c) −H(c|G(z, c)) = Ex∼G(z,c)[Ec′∼P (c|x)[log P(c′|x)]] + H(c) = Ex∼G(z,c)[DKL(P(·|x) ∥Q(·|x)) | {z } ≥0 + Ec′∼P (c|x)[log Q(c′|x)]] + H(c) ≥Ex∼G(z,c)[Ec′∼P (c|x)[log Q(c′|x)]] + H(c) (4) This technique of lower bounding mutual information is known as Variational Information Maximization [26]. We note that the entropy of latent codes H(c) can be optimized as well since it has a simple analytical form for common distributions. However, in this paper we opt for simplicity by fixing the latent code distribution and we will treat H(c) as a constant. So far we have bypassed the problem of having to compute the posterior P(c|x) explicitly via this lower bound but we still need to be able to sample from the posterior in the inner expectation. Next we state a simple lemma, with its proof deferred to Appendix 1, that removes the need to sample from the posterior. Lemma 5.1 For random variables X, Y and function f(x, y) under suitable regularity conditions: Ex∼X,y∼Y |x[f(x, y)] = Ex∼X,y∼Y |x,x′∼X|y[f(x′, y)]. By using Lemma 5.1, we can define a variational lower bound, LI(G, Q), of the mutual information, I(c; G(z, c)): LI(G, Q) = Ec∼P (c),x∼G(z,c)[log Q(c|x)] + H(c) = Ex∼G(z,c)[Ec′∼P (c|x)[log Q(c′|x)]] + H(c) ≤I(c; G(z, c)) (5) We note that LI(G, Q) is easy to approximate with Monte Carlo simulation. In particular, LI can be maximized w.r.t. Q directly and w.r.t. G via the reparametrization trick. Hence LI(G, Q) can be added to GAN’s objectives with no change to GAN’s training procedure and we call the resulting algorithm Information Maximizing Generative Adversarial Networks (InfoGAN). Eq (4) shows that the lower bound becomes tight as the auxiliary distribution Q approaches the true posterior distribution: Ex[DKL(P(·|x) ∥Q(·|x))] →0. In addition, we know that when the variational lower bound attains its maximum LI(G, Q) = H(c) for discrete latent codes, the bound becomes tight and the maximal mutual information is achieved. In Appendix, we note how InfoGAN can be connected to the Wake-Sleep algorithm [27] to provide an alternative interpretation. Hence, InfoGAN is defined as the following minimax game with a variational regularization of mutual information and a hyperparameter λ: min G,Q max D VInfoGAN(D, G, Q) = V (D, G) −λLI(G, Q) (6) 6 Implementation In practice, we parametrize the auxiliary distribution Q as a neural network. In most experiments, Q and D share all convolutional layers and there is one final fully connected layer to output parameters for the conditional distribution Q(c|x), which means InfoGAN only adds a negligible computation cost to GAN. We have also observed that LI(G, Q) always converges faster than normal GAN objectives and hence InfoGAN essentially comes for free with GAN. For categorical latent code ci, we use the natural choice of softmax nonlinearity to represent Q(ci|x). For continuous latent code cj, there are more options depending on what is the true posterior P(cj|x). In our experiments, we have found that simply treating Q(cj|x) as a factored Gaussian is sufficient. Since GAN is known to be difficult to train, we design our experiments based on existing techniques introduced by DC-GAN [16], which are enough to stabilize InfoGAN training and we did not have to introduce new trick. Detailed experimental setup is described in Appendix. Even though InfoGAN introduces an extra hyperparameter λ, it’s easy to tune and simply setting to 1 is sufficient for discrete latent codes. When the latent code contains continuous variables, a smaller λ is typically used to ensure that λLI(G, Q), which now involves differential entropy, is on the same scale as GAN objectives. 4 7 Experiments The first goal of our experiments is to investigate if mutual information can be maximized efficiently. The second goal is to evaluate if InfoGAN can learn disentangled and interpretable representations by making use of the generator to vary only one latent factor at a time in order to assess if varying such factor results in only one type of semantic variation in generated images. DC-IGN [7] also uses this method to evaluate their learned representations on 3D image datasets, on which we also apply InfoGAN to establish direct comparison. 7.1 Mutual Information Maximization 0 200 400 600 800 1000 Iteration −0.5 0.0 0.5 1.0 1.5 2.0 2.5 LI InfoGAN GAN Figure 1: Lower bound LI over training iterations To evaluate whether the mutual information between latent codes c and generated images G(z, c) can be maximized efficiently with proposed method, we train InfoGAN on MNIST dataset with a uniform categorical distribution on latent codes c ∼Cat(K = 10, p = 0.1). In Fig 1, the lower bound LI(G, Q) is quickly maximized to H(c) ≈2.30, which means the bound (4) is tight and maximal mutual information is achieved. As a baseline, we also train a regular GAN with an auxiliary distribution Q when the generator is not explicitly encouraged to maximize the mutual information with the latent codes. Since we use expressive neural network to parametrize Q, we can assume that Q reasonably approximates the true posterior P(c|x) and hence there is little mutual information between latent codes and generated images in regular GAN. We note that with a different neural network architecture, there might be a higher mutual information between latent codes and generated images even though we have not observed such case in our experiments. This comparison is meant to demonstrate that in a regular GAN, there is no guarantee that the generator will make use of the latent codes. 7.2 Disentangled Representation To disentangle digit shape from styles on MNIST, we choose to model the latent codes with one categorical code, c1 ∼Cat(K = 10, p = 0.1), which can model discontinuous variation in data, and two continuous codes that can capture variations that are continuous in nature: c2, c3 ∼Unif(−1, 1). In Figure 2, we show that the discrete code c1 captures drastic change in shape. Changing categorical code c1 switches between digits most of the time. In fact even if we just train InfoGAN without any label, c1 can be used as a classifier that achieves 5% error rate in classifying MNIST digits by matching each category in c1 to a digit type. In the second row of Figure 2a, we can observe a digit 7 is classified as a 9. Continuous codes c2, c3 capture continuous variations in style: c2 models rotation of digits and c3 controls the width. What is remarkable is that in both cases, the generator does not simply stretch or rotate the digits but instead adjust other details like thickness or stroke style to make sure the resulting images are natural looking. As a test to check whether the latent representation learned by InfoGAN is generalizable, we manipulated the latent codes in an exaggerated way: instead of plotting latent codes from −1 to 1, we plot it from −2 to 2 covering a wide region that the network was never trained on and we still get meaningful generalization. Next we evaluate InfoGAN on two datasets of 3D images: faces [28] and chairs [29], on which DC-IGN was shown to learn highly interpretable graphics codes. On the faces dataset, DC-IGN learns to represent latent factors as azimuth (pose), elevation, and lighting as continuous latent variables by using supervision. Using the same dataset, we demonstrate that InfoGAN learns a disentangled representation that recover azimuth (pose), elevation, and lighting on the same dataset. In this experiment, we choose to model the latent codes with five continuous codes, ci ∼Unif(−1, 1) with 1 ≤i ≤5. Since DC-IGN requires supervision, it was previously not possible to learn a latent code for a variation that’s unlabeled and hence salient latent factors of variation cannot be discovered automatically from data. By contrast, InfoGAN is able to discover such variation on its own: for instance, in Figure 3d a 5 (a) Varying c1 on InfoGAN (Digit type) (b) Varying c1 on regular GAN (No clear meaning) (c) Varying c2 from −2 to 2 on InfoGAN (Rotation) (d) Varying c3 from −2 to 2 on InfoGAN (Width) Figure 2: Manipulating latent codes on MNIST: In all figures of latent code manipulation, we will use the convention that in each one latent code varies from left to right while the other latent codes and noise are fixed. The different rows correspond to different random samples of fixed latent codes and noise. For instance, in (a), one column contains five samples from the same category in c1, and a row shows the generated images for 10 possible categories in c1 with other noise fixed. In (a), each category in c1 largely corresponds to one digit type; in (b), varying c1 on a GAN trained without information regularization results in non-interpretable variations; in (c), a small value of c2 denotes left leaning digit whereas a high value corresponds to right leaning digit; in (d), c3 smoothly controls the width. We reorder (a) for visualization purpose, as the categorical code is inherently unordered. latent code that smoothly changes a face from wide to narrow is learned even though this variation was neither explicitly generated or labeled in prior work. On the chairs dataset, DC-IGN can learn a continuous code that represents rotation. InfoGAN again is able to learn the same concept as a continuous code (Figure 4a) and we show in addition that InfoGAN is also able to continuously interpolate between similar chair types of different widths using a single continuous code (Figure 4b). In this experiment, we choose to model the latent factors with four categorical codes, c1,2,3,4 ∼Cat(K = 20, p = 0.05) and one continuous code c5 ∼Unif(−1, 1). Next we evaluate InfoGAN on the Street View House Number (SVHN) dataset, which is significantly more challenging to learn an interpretable representation because it is noisy, containing images of variable-resolution and distracting digits, and it does not have multiple variations of the same object. In this experiment, we make use of four 10−dimensional categorical variables and two uniform continuous variables as latent codes. We show two of the learned latent factors in Figure 5. Finally we show in Figure 6 that InfoGAN is able to learn many visual concepts on another challenging dataset: CelebA [30], which includes 200, 000 celebrity images with large pose variations and background clutter. In this dataset, we model the latent variation as 10 uniform categorical variables, each of dimension 10. Surprisingly, even in this complicated dataset, InfoGAN can recover azimuth as in 3D images even though in this dataset no single face appears in multiple pose positions. Moreover InfoGAN can disentangle other highly semantic variations like presence or absence of glasses, hairstyles and emotion, demonstrating a level of visual understanding is acquired. 6 (a) Azimuth (pose) (b) Elevation (c) Lighting (d) Wide or Narrow Figure 3: Manipulating latent codes on 3D Faces: We show the effect of the learned continuous latent factors on the outputs as their values vary from −1 to 1. In (a), we show that a continuous latent code consistently captures the azimuth of the face across different shapes; in (b), the continuous code captures elevation; in (c), the continuous code captures the orientation of lighting; and in (d), the continuous code learns to interpolate between wide and narrow faces while preserving other visual features. For each factor, we present the representation that most resembles prior results [7] out of 5 random runs to provide direct comparison. (a) Rotation (b) Width Figure 4: Manipulating latent codes on 3D Chairs: In (a), the continuous code captures the pose of the chair while preserving its shape, although the learned pose mapping varies across different types; in (b), the continuous code can alternatively learn to capture the widths of different chair types, and smoothly interpolate between them. For each factor, we present the representation that most resembles prior results [7] out of 5 random runs to provide direct comparison. 8 Conclusion This paper introduces a representation learning algorithm called Information Maximizing Generative Adversarial Networks (InfoGAN). In contrast to previous approaches, which require supervision, InfoGAN is completely unsupervised and learns interpretable and disentangled representations on challenging datasets. In addition, InfoGAN adds only negligible computation cost on top of GAN and is easy to train. The core idea of using mutual information to induce representation can be applied to other methods like VAE [3], which is a promising area of future work. Other possible extensions to this work include: learning hierarchical latent representations, improving semi-supervised learning with better codes [31], and using InfoGAN as a high-dimensional data discovery tool. 7 (a) Continuous variation: Lighting (b) Discrete variation: Plate Context Figure 5: Manipulating latent codes on SVHN: In (a), we show that one of the continuous codes captures variation in lighting even though in the dataset each digit is only present with one lighting condition; In (b), one of the categorical codes is shown to control the context of central digit: for example in the 2nd column, a digit 9 is (partially) present on the right whereas in 3rd column, a digit 0 is present, which indicates that InfoGAN has learned to separate central digit from its context. (a) Azimuth (pose) (b) Presence or absence of glasses (c) Hair style (d) Emotion Figure 6: Manipulating latent codes on CelebA: (a) shows that a categorical code can capture the azimuth of face by discretizing this variation of continuous nature; in (b) a subset of the categorical code is devoted to signal the presence of glasses; (c) shows variation in hair style, roughly ordered from less hair to more hair; (d) shows change in emotion, roughly ordered from stern to happy. Acknowledgements We thank the anonymous reviewers. This research was funded in part by ONR through a PECASE award. Xi Chen was also supported by a Berkeley AI Research lab Fellowship. Yan Duan was also supported by a Berkeley AI Research lab Fellowship and a Huawei Fellowship. Rein Houthooft was supported by a Ph.D. Fellowship of the Research Foundation - Flanders (FWO). References [1] Y. Bengio, “Learning deep architectures for ai,” Foundations and trends in Machine Learning, 2009. 8 [2] Y. Bengio, A. Courville, and P. Vincent, “Representation learning: A review and new perspectives,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 35, no. 8, 2013. [3] D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” ArXiv preprint arXiv:1312.6114, 2013. [4] 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, pp. 2672–2680. [5] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling, “Semi-supervised learning with deep generative models,” in NIPS, 2014, pp. 3581–3589. [6] B. Cheung, J. A. Livezey, A. K. Bansal, and B. A. Olshausen, “Discovering hidden factors of variation in deep networks,” ArXiv preprint arXiv:1412.6583, 2014. [7] T. D. Kulkarni, W. F. Whitney, P. Kohli, and J. Tenenbaum, “Deep convolutional inverse graphics network,” in NIPS, 2015, pp. 2530–2538. [8] W. F. Whitney, M. Chang, T. Kulkarni, and J. B. Tenenbaum, “Understanding visual concepts with continuation learning,” ArXiv preprint arXiv:1602.06822, 2016. [9] A. Makhzani, J. Shlens, N. Jaitly, and I. Goodfellow, “Adversarial autoencoders,” ArXiv preprint arXiv:1511.05644, 2015. [10] G. E. Hinton, S. Osindero, and Y.-W. Teh, “A fast learning algorithm for deep belief nets,” Neural Comput., vol. 18, no. 7, pp. 1527–1554, 2006. [11] G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, vol. 313, no. 5786, pp. 504–507, 2006. [12] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in ICLR, 2008, pp. 1096–1103. [13] G. Desjardins, A. Courville, and Y. Bengio, “Disentangling factors of variation via generative entangling,” ArXiv preprint arXiv:1210.5474, 2012. [14] A. Rasmus, M. Berglund, M. Honkala, H. Valpola, and T. Raiko, “Semi-supervised learning with ladder networks,” in NIPS, 2015, pp. 3532–3540. [15] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther, “Improving semi-supervised learning with auxiliary deep generative models,” in ICML, 2016. [16] A. Radford, L. Metz, and S. Chintala, “Unsupervised representation learning with deep convolutional generative adversarial networks,” ArXiv preprint arXiv:1511.06434, 2015. [17] 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. [18] J. B. Tenenbaum and W. T. Freeman, “Separating style and content with bilinear models,” Neural computation, vol. 12, no. 6, pp. 1247–1283, 2000. [19] Z. Zhu, P. Luo, X. Wang, and X. Tang, “Multi-view perceptron: A deep model for learning face identity and view representations,” in NIPS, 2014, pp. 217–225. [20] J. Yang, S. E. Reed, M.-H. Yang, and H. Lee, “Weakly-supervised disentangling with recurrent transformations for 3d view synthesis,” in NIPS, 2015, pp. 1099–1107. [21] S. Reed, K. Sohn, Y. Zhang, and H. Lee, “Learning to disentangle factors of variation with manifold interaction,” in ICML, 2014, pp. 1431–1439. [22] J. Susskind, A. Anderson, and G. E. Hinton, “The Toronto face dataset,” Tech. Rep., 2010. [23] J. S. Bridle, A. J. Heading, and D. J. MacKay, “Unsupervised classifiers, mutual information and ’phantom targets’,” in NIPS, 1992. [24] D. Barber and F. V. Agakov, “Kernelized infomax clustering,” in NIPS, 2005, pp. 17–24. [25] A. Krause, P. Perona, and R. G. Gomes, “Discriminative clustering by regularized information maximization,” in NIPS, 2010, pp. 775–783. [26] D. Barber and F. V. Agakov, “The IM algorithm: A variational approach to information maximization,” in NIPS, 2003. [27] G. E. Hinton, P. Dayan, B. J. Frey, and R. M. Neal, “The" wake-sleep" algorithm for unsupervised neural networks,” Science, vol. 268, no. 5214, pp. 1158–1161, 1995. [28] P. Paysan, R. Knothe, B. Amberg, S. Romdhani, and T. Vetter, “A 3d face model for pose and illumination invariant face recognition,” in AVSS, 2009, pp. 296–301. [29] M. Aubry, D. Maturana, A. Efros, B. Russell, and J. Sivic, “Seeing 3D chairs: Exemplar part-based 2D-3D alignment using a large dataset of CAD models,” in CVPR, 2014, pp. 3762–3769. [30] Z. Liu, P. Luo, X. Wang, and X. Tang, “Deep learning face attributes in the wild,” in ICCV, 2015. [31] J. T. Springenberg, “Unsupervised and semi-supervised learning with categorical generative adversarial networks,” ArXiv preprint arXiv:1511.06390, 2015. 9 | 2016 | 277 |
6,191 | Automated scalable segmentation of neurons from multispectral images Uygar Sümbül Grossman Center for the Statistics of Mind and Dept. of Statistics, Columbia University Douglas Roossien Jr. University of Michigan Medical School Fei Chen MIT Media Lab and McGovern Institute Nicholas Barry MIT Media Lab and McGovern Institute Edward S. Boyden MIT Media Lab and McGovern Institute Dawen Cai University of Michigan Medical School John P. Cunningham Grossman Center for the Statistics of Mind and Dept. of Statistics, Columbia University Liam Paninski Grossman Center for the Statistics of Mind and Dept. of Statistics, Columbia University Abstract Reconstruction of neuroanatomy is a fundamental problem in neuroscience. Stochastic expression of colors in individual cells is a promising tool, although its use in the nervous system has been limited due to various sources of variability in expression. Moreover, the intermingled anatomy of neuronal trees is challenging for existing segmentation algorithms. Here, we propose a method to automate the segmentation of neurons in such (potentially pseudo-colored) images. The method uses spatio-color relations between the voxels, generates supervoxels to reduce the problem size by four orders of magnitude before the final segmentation, and is parallelizable over the supervoxels. To quantify performance and gain insight, we generate simulated images, where the noise level and characteristics, the density of expression, and the number of fluorophore types are variable. We also present segmentations of real Brainbow images of the mouse hippocampus, which reveal many of the dendritic segments. 1 Introduction Studying the anatomy of individual neurons and the circuits they form is a classical approach to understanding how nervous systems function since Ramón y Cajal’s founding work. Despite a century of research, the problem remains open due to a lack of technological tools: mapping neuronal structures requires a large field of view, a high resolution, a robust labeling technique, and computational methods to sort the data. Stochastic labeling methods have been developed to endow individual neurons with color tags [1, 2]. This approach to neural circuit mapping can utilize the light microscope, provides a high-throughput and the potential to monitor the circuits over time, and complements the dense, small scale connectomic studies using electron microscopy [3] with its large field-of-view. However, its use has been limited due to its reliance on manual segmentation. The initial stochastic, spectral labeling (Brainbow) method had a number of limitations for neuroscience applications including incomplete filling of neuronal arbors, disproportionate expression of the nonrecombined fluorescent proteins in the transgene, suboptimal fluorescence intensity, and color shift during imaging. Many of these limitations have since improved [4] and developments 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. in various aspects of light microscopy provide further opportunities [5, 6, 7, 8]. Moreover, recent approaches promise a dramatic increase in the number of (pseudo) color sources [9, 10, 11]. Taken together, these advances have made light microscopy a much more powerful tool for neuroanatomy and connectomics. However, existing automated segmentation methods are inadequate due to the spatio-color nature of the problem, the size of the images, and the complicated anatomy of neuronal arbors. Scalable methods that take into account the high-dimensional nature of the problem are needed. Here, we propose a series of operations to segment 3-D images of stochastically tagged nervous tissues. Fundamentally, the computational problem arises due to insufficient color consistency within individual cells, and the voxels occupied by more than one neuron. We denoise the image stack through collaborative filtering [12], and obtain a supervoxel representation that reduces the problem size by four orders of magnitude. We consider the segmentation of neurons as a graph segmentation problem [13], where the nodes are the supervoxels. Spatial discontinuities and color inhomogeneities within segmented neurons are penalized using this graph representation. While we concentrate on neuron segmentation in this paper, our method should be equally applicable to the segmentation of other cell classes such as glia. To study various aspects of stochastic multispectral labeling, we present a basic simulation algorithm that starts from actual single neuron reconstructions. We apply our method on such simulated images of retinal ganglion cells, and on two different real Brainbow images of hippocampal neurons, where one dataset is obtained by expansion microscopy [5]. 2 Methods Successful segmentations of color-coded neural images should consider both the connected nature of neuronal anatomy and the color consistency of the Brainbow construct. However, the size and the noise level of the problem prohibit a voxel-level approach (Fig. 1). Methods that are popular in hyperspectral imaging applications, such as nonnegative matrix factorization [14], are not immediately suitable either because the number of color channels are too few and it is not easy to model neuronal anatomy within these frameworks. Therefore, we develop (i) a supervoxelization strategy, (ii) explicitly define graph representations on the set of supervoxels, and (iii) design the edge weights to capture the spatio-color relations (Fig. 2a). 2.1 Denoising the image stack Voxel colors within a neurite can drift along the neurite, exhibit high frequency variations, and differ between the membrane and the cytoplasm when the expressed fluorescent protein is membranebinding (Fig. 1). Collaborative filtering generates an extra dimension consisting of similar patches within the stack, and applies filtering in this extra dimension rather than the physical dimensions. We use the BM4D denoiser [12] on individual channels of the datasets, assuming that the noise is Gaussian. Figure 2 demonstrates that the boundaries are preserved in the denoised image. 2.2 Dimensionality reduction We make two basic observations to reduce the size of the dataset: (i) Voxels expressing fluorescent proteins form the foreground, and the dark voxels form the much larger background in typical Brainbow settings. (ii) The basic promise of Brainbow suggests that nearby voxels within a neurite have very similar colors. Hence, after denoising, there must be many topologically connected voxel sets that also have consistent colors. The watershed transform [15] considers its input as a topographic map and identifies regions associated with local minima (“catchment basins” in a flooding interpretation of the topographic map). It can be considered as a minimum spanning forest algorithm, and obtained in linear time with respect to the input size [16, 17]. For an image volume V = V (x, y, z, c), we propose to calculate the topographical map T (disaffinity map) as T(x, y, z) = max t∈{x,y,z} max c |Gt(x, y, z, c)|, (1) where x, y, z denote the spatial coordinates, c denotes the color coordinate, and Gx, Gy, Gz denote the spatial gradients of V (nearest neighbor differencing). That is, any edge with significant deviation in any color channel will correspond to a “mountain” in the topographic map. A flooding parameter, f, assigns the local minima of T to catchment basins, which partition V together with the boundary voxels. We assign the boundaries to neighboring basins based on color proximity. The background is 2 B A C D E F G H 0 5 10 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x−position (µm) normalized intensity 0 2 4 6 8 10 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 y−position (µm) normalized intensity 0 2 4 6 8 10 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 y−position (µm) normalized intensity 0 5 10 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x−position (µm) normalized intensity Figure 1: Multiple noise sources affect the color consistency in Brainbow images. a, An 85×121 Brainbow image patch from a single slice (physical size: 8.5µ × 12.1µ). Expression level differs significantly between the membrane and the cytoplasm along a neurite (arrows). b, A maximum intensity projection view of the 3-d image stack. Color shifts along a single neurite, which travels to the top edge and into the page (arrows). c, A 300 × 300 image patch from a single slice of a different Brainbow image (physical size: 30µ × 30µ). d, The intensity variations of the different color channels along the horizontal line in c. e, Same as d for the vertical line in c. f, The image patch in c after denoising. g–h, Same as d and e after denoising. For the plots, the range of individual color channels is [0, 1]. the largest and darkest basin. We call the remaining objects supervoxels [18, 19]. Let F denote the binary image identifying all of the foreground voxels. Objects without interior voxels (e.g., single-voxel thick dendritic segments) may not be detected by Eq. 1 (Supp. Fig. 1). We recover such “bridges” using a topology-preserving warping (in this case, only shrinking is used.) of the thresholded image stack into F [20, 21]: B = W(Iθ, F), (2) where Iθ is binary and obtained by thresholding the intensity image at θ. W returns a binary image B such that B has the same topology as Iθ and agrees with F as much as possible. Each connected component of B ∧¯F (foreground of B and background of F) is added to a neighboring supervoxel based on color proximity, and discarded if no spatial neighbors exist (Supp. Text). We ensure the color homogeneity within supervoxels by dividing non-homogeneous supervoxels (e.g., large color variation across voxels) into connected subcomponents based on color until the desired homogeneity is achieved (Supp. Text). We summarize each supervoxel’s color by its mean color. We apply local heuristics and spatio-color constraints iteratively to further reduce the data size and demix overlapping neurons in voxel space (Fig. 2f,g and Supp. Text). Supp. Text provides details on the parallelization and complexity of these steps and the method in general. 3 Figure 2: Best viewed digitally. a, A schematic of the processing steps b, Max. intensity projection of a raw Brainbow image c, Max. intensity projection of the denoised image d, A zoomed-in version of the patch indicated by the dashed square in b. e, The corresponding denoised image. f, One-third of the supervoxels in the top-left quadrant (randomly chosen). g, Same as f after the merging step. h1-h4, Same as b,c,f,g for simulated data. Scale bars, 20µm. 2.3 Clustering the supervoxel set We consider the supervoxels as the nodes of a graph and express their spatio-color similarities through the existence (and the strength) of the edges connecting them, summarized by a highly sparse adjacency matrix. Removing edges between supervoxels that aren’t spatio-color neighbors avoids spurious links. However, this procedure also removes many genuine links due to high color variability (Fig. 1). Moreover, it cannot identify disconnected segments of the same neuron (e.g., due to limited field-of-view). Instead, we adjust the spatio-color neighborhoods based on the “reliability” of the colors of the supervoxels. Let S denote the set of supervoxels in the dataset. We define the sets of reliable and unreliable supervoxels as Sr = {s ∈S : n(s) > ts, h(s) < td} and Su = S \ Sr, respectively, where n(s) denotes the number of voxels in s, h(s) is a measure of the color heterogeneity (e.g., the maximum difference between intensities across all color channels), ts and td are the corresponding thresholds. We describe a graph G = (V, E), where V denotes the vertex set (supervoxels) and E = Es∪Ec∪E¯s denotes the edges between them: Es = {(ij) : δij < ϵs, i ̸= j} Ec = {(ij) : si, sj ∈Sr, dij < ϵc, i ̸= j} E¯s = {(ij), (ji) : si ∈Su, (ij) /∈Es, Oi(j) < kmin −Ki, i ̸= j}, (3) where δij, dij are the spatial and color distances between si and sj, respectively. ϵs and ϵc are the corresponding maximum distances. An unreliable supervoxel with too few spatial neighbors is allowed to have up to kmin edges via proximity in color space. Here, Oi(j) is the order of supervoxel sj in terms of the color distance from supervoxel si, and Ki is the number of ϵs-spatial neighbors of si. (Note the symmetric formulation in E¯s.) Then, we construct the adjacency matrix as A(i, j) = e−αd2 ij, (ij) ∈E 0, otherwise (4) 4 where α controls the decay in affinity with respect to distance in color. We use k-d tree structures to efficiently retrieve the color neighborhoods [22]. Here, the distance between two supervoxels is minv∈V,u∈U D(v, u), where V and U are the voxel sets of the two supervoxels and D(v, u) is the Euclidean distance between voxels v and u. A classical way of partitioning graph nodes that are nonlinearly separable is by minimizing a function (e.g., the sum or the maximum) of the edge weights that are severed during the partitioning [23]. Here, we use the normalized cuts algorithm [24, 13] with two simple modifications: the k-means step is weighted by the sizes of the supervoxels and initialized by a few iterations of k-means clustering of the supervoxel colors only (Supp. Text). The resulting clusters partition the image stack (together with the background), and represent a segmentation of the individual neurons within the image stack. An estimate of the number of neurons can be obtained from a Dirichlet process mixture model [25]. While this estimate is often rough [26], the segmentation accuracy appears resilient to imperfect estimates (Fig. 4c). 2.4 Simulating Brainbow tissues We create basic simulated Brainbow image stacks from volumetric reconstructions of single neurons (Algorithm 1). For simplicity, we model the neuron color shifts by a Brownian noise component on the tree, and the background intensity by a white Gaussian noise component (Supp. Text). We quantify the segmentation quality of the voxels using the adjusted Rand index (ARI), whose maximum value is 1 (perfect agreement), and expected value is 0 for random clusters [27]. (Supp. Text) Algorithm 1 Brainbow image stack simulation Require: number of color channels C, set of neural shapes S = {ni}i, stack (empty, 3d space + color), background noise variability σ1, neural color variability σ2, r, saturation level M 1: for ni ∈S do 2: Shift and rotate neuron ni to minimize overlap with existing neurons in the stack 3: Generate a uniformly random color vector vi of length C 4: Identify the connected components of cij of ni within the stack 5: for cij ∈{cij}j do 6: Pre-assign vi to r% of the voxels of cij 7: C-dimensional random walk on cij with steps N(0, σ2 1I) (Supp. Text) 8: end for 9: Add neuron ni to the stack (with additive colors for shared voxels) 10: end for 11: Add white noise to each voxel generated by N(0, σ2 2I) 12: if brightness exceeds M then 13: Saturate at M 14: end if 15: return stack 3 Datasets To simulate Brainbow image stacks, we used volumetric single neuron reconstructions of mouse retinal ganglion cells in Algorithm 1. The dataset is obtained from previously published studies [28, 29]. Briefly, the voxel size of the images is 0.4µ × 0.4µ × 0.5µ, and the field of view of individual stacks is 320µ × 320µ × 70µ or larger. We evaluate the effects of different conditions on a central portion of the simulated image stack. Both real datasets are images of the mouse hippocampal tissue. The first dataset has 1020×1020×225 voxels (voxel size: 0.1×0.1×0.3µ3), and the tissue was imaged at 4 different frequencies (channels). The second dataset has 1080 × 1280 × 134 voxels with an effective voxel size of 70 × 70 × 40nm, where the tissue was 4× linearly expanded [5], and imaged at 3 different channels. The Brainbow constructs were delivered virally, and approximately 5% of the neurons express a fluorescence gene. 4 Results Parameters used in the experiments are reported in Supp. Text. Fig. 1b, d, and e depict the variability of color within individual neurites in a single slice and through the imaging plane. Together, they demonstrate that the voxel colors of even a small segment of a 5 Figure 3: Segmentation of a simulated Brainbow image stack. Adjusted Rand index of the foreground is 0.80. Pseudocolor representation of 4channel data. Top: maximum intensity projection of the ground truth. Only the supervoxels that are occupied by a single neuron are shown. Bottom: maximum intensity projection of the reconstruction. The top-left corners show the whole image stack. All other panels show the maximum intensity projections of the supervoxels assigned to a single cluster (inferred neuron). 3 4 5 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 channel count true (9) 6 7 8 10 11 12 0 0.02 0.04 0.06 0.08 0.1 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 step size (σ1) −− range per channel: [0, 1] 3 ch. 4 ch. 5 ch. 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 expression density (ratio of occupied voxels) adjusted Rand index 3 ch. 4 ch. 5 ch. Figure 4: Segmentation accuracy of simulated data a, Expression density (ratio of voxels occupied by at least one neuron) vs. ARI. b, σ1 (Algorithm 1) vs. ARI. c, Channel count vs. ARI for a 9-neuron simulation, where K ∈[6, 12]. ARI is calculated for the foreground voxels. See Supp. Fig. 7 for ARI values for all voxels. neuron’s arbor can occupy a significant portion of the dynamic range in color with the state-of-theart Brainbow data. Fig. 1c-e show that collaborative denoising removes much of this noise while preserving the edges, which is crucial for segmentation. Fig. 2b-e and h demonstrate a similar effect on a larger scale with real and simulated Brainbow images. Fig. 2 shows the raw and denoised versions of the 1020 × 1020 × 225 image, and a randomly chosen subset of its supervoxels (one-third). The original set had 6.2 × 104 supervoxels, and the merging routine decreased this number to 3.9 × 104. The individual supervoxels grew in size while avoiding mergers with supervoxels of different neurons. This set of supervoxels, together with a (sparse) spatial connectivity matrix, characterizes the image stack. Similar reductions are obtained for all the real and simulated datasets. Fig. 3 shows the segmentation of a simulated 200×200×100 (physical size: 80µ×80µ×50µ) image patch. (Supp. Fig. 2 shows all three projections, and Supp. Fig. 3 shows the density plot through the z-axis.) In this particular example, the number of neurons within the image is 9, σ1 = 0.04, σ2 = 0.1, and the simulated tissue is imaged using 4 independent channels. Supp. Fig. 4 shows a patch from a single slice to visualize the amount of noise. The segmentation has an adjusted Rand index of 0.80 when calculated for the detected foreground voxels, and 0.73 when calculated for all voxels. (In some cases, the value based on all voxels is higher.) The ground truth image displays only those supervoxels all of whose voxels belong to a single neuron. The bottom part of Fig. 3 shows 6 Figure 5: Segmentation of a Brainbow stack – best viewed digitally. Pseudo-color representation of 4-channel data. The physical size of the stack is 102µ × 102µ × 68µ. The top-left corner shows the maximum intensity projection of the whole image stack, all other panels show the maximum intensity projections of the supervoxels assigned to a single cluster (inferred neuron). 7 that many of these supervoxels are correctly clustered to preserve the connectivity of neuronal arbors. There are two important mistakes in clusters 4 (merger) and 9 (spurious cluster). These are caused by aggressive merging of supervoxels (Supp. Fig. 5), and the segmentation quality improves with the inclusion of an extra imaging channel and more conservative merging (Supp. Fig. 6). We plot the performance of our method under different conditions in Fig. 4 (and Supp. Fig. 7). We set the noise standard deviation to σ1 in the denoiser, and ignored the contribution of σ2. Increasing the number of observation channels improves the segmentation performance. The clustering accuracy degrades gradually with increasing neuron-color noise (σ1) in the reported range (Fig. 4b). The accuracy does not seem to degrade when the cluster count is mildly overestimated, while it decays quickly when the count is underestimated (Fig. 4c). Fig. 5 displays the segmentation of the 1020 × 1020 × 225 image. While some mistakes can be spotted by eye, most of the neurites can be identified and simple tracing tools can be used to obtain final skeletons/segmentations [30, 31]. In particular, the identified clusters exhibit homogeneous colors and dendritic pieces that either form connected components or miss small pieces that do not preclude the use of those tracing tools. Some clusters appear empty while a few others seem to comprise segments from more than one neuron, in line with the simulation image (Fig. 2.4). Supp. Fig. 8 displays the segmentation of the 4× expanded, 1080×1280×134 image. While the two real datasets have different characteristics and voxel sizes, we used essentially the same parameters for both of them throughout denoising, supervoxelization, merging, and clustering (Supp. Text). Similar to Fig. 5, many of the processes can be identified easily. On the other hand, Supp. Fig. 8 appears more fragmented, which can be explained by the smaller number of color channels (Fig. 4). 5 Discussion Tagging individual cells with (pseudo)colors stochastically is an important tool in biological sciences. The versatility of genetic tools for tagging synapses or cell types and the large field-of-view of light microscopy positions multispectral labeling as a complementary approach to electron microscopy based, small-scale, dense reconstructions [3]. However, its use in neuroscience has been limited due to various sources of variability in expression. Here, we demonstrate that automated segmentation of neurons in such image stacks is possible. Our approach considers both accuracy and scalability as design goals. The basic simulation proposed here (Algo. 1) captures the key aspects of the problem and may guide the relevant genetics research. Yet, more detailed biophysical simulations represent a valuable direction for future work. Our simulations suggest that the segmentation accuracy increases significantly with the inclusion of additional color channels, which coincides with ongoing experimental efforts [9, 10, 11]. We also note that color constancy of individual neurons plays an important role both in the accuracy of the segmentation (Fig. 4) and the supervoxelized problem size. While we did not focus on post-processing in this paper, basic algorithms (e.g., reassignment of small, isolated supervoxels) may improve both the visualization and the segmentation quality. Similarly, more elaborate formulations of the adjacency relationship between supervoxels can increase the accuracy. Finally, supervised learning of this relationship (when labeled data is present) is a promising direction, and our methods can significantly accelerate the generation of training sets. 6 Acknowledgments The authors thank Suraj Keshri and Min-hwan Oh (Columbia University) for useful conversations. Funding for this research was provided by ARO MURI W911NF-12-1-0594, DARPA N6600115-C-4032 (SIMPLEX), and a Google Faculty Research award; in addition, this work was supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior/ Interior Business Center (DoI/IBC) contract number D16PC00008. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. Disclaimer: 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 IARPA, DoI/IBC, or the U.S. Government. 8 References [1] J Livet et al. Transgenic strategies for combinatorial expression of fluorescent proteins in the nervous system. Nature, 450(7166):56–62, 2007. [2] A H Marblestone et al. Rosetta brains: A strategy for molecularly-annotated connectomics. arXiv preprint arXiv:1404.5103, 2014. [3] Shin-ya Takemura, Arjun Bharioke, Zhiyuan Lu, Aljoscha Nern, Shiv Vitaladevuni, Patricia K Rivlin, William T Katz, Donald J Olbris, Stephen M Plaza, Philip Winston, et al. A visual motion detection circuit suggested by drosophila connectomics. Nature, 500(7461):175–181, 2013. [4] D Cai et al. Improved tools for the brainbow toolbox. Nature methods, 10(6):540–547, 2013. [5] F Chen et al. Expansion microscopy. Science, 347(6221):543–548, 2015. [6] K Chung and K Deisseroth. Clarity for mapping the nervous system. Nat. methods, 10(6):508–513, 2013. [7] E Betzig et al. Imaging intracellular fluorescent proteins at nanometer resolution. Science, 313(5793):1642– 1645, 2006. [8] M J Rust et al. Sub-diffraction-limit imaging by stochastic optical reconstruction microscopy (storm). Nature methods, 3(10):793–796, 2006. [9] A M Zador et al. Sequencing the connectome. PLoS Biol, 10(10):e1001411, 2012. [10] J H Lee et al. Highly multiplexed subcellular rna sequencing in situ. Science, 343(6177):1360–1363, 2014. [11] K H Chen et al. Spatially resolved, highly multiplexed rna profiling in single cells. Science, 348(6233):aaa6090, 2015. [12] M Maggioni et al. Nonlocal transform-domain filter for volumetric data denoising and reconstruction. Image Processing, IEEE Transactions on, 22(1):119–133, 2013. [13] U Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007. [14] D Lee and H S Seung. Algorithms for non-negative matrix factorization. In Advances in neural information processing systems, pages 556–562, 2001. [15] F Meyer. Topographic distance and watershed lines. Signal processing, 38(1):113–125, 1994. [16] F Meyer. Minimum spanning forests for morphological segmentation. In Mathematical morphology and its applications to image processing, pages 77–84. Springer, 1994. [17] J Cousty et al. Watershed cuts: Minimum spanning forests and the drop of water principle. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 31(8):1362–1374, 2009. [18] Xiaofeng Ren and Jitendra Malik. Learning a classification model for segmentation. In Computer Vision, 2003. Proceedings. Ninth IEEE International Conference on, pages 10–17. IEEE, 2003. [19] J S Kim et al. Space-time wiring specificity supports direction selectivity in the retina. Nature, 509(7500):331–336, 2014. [20] Gilles Bertrand and Grégoire Malandain. A new characterization of three-dimensional simple points. Pattern Recognition Letters, 15(2):169–175, 1994. [21] Viren Jain, Benjamin Bollmann, Mark Richardson, Daniel R Berger, Moritz N Helmstaedter, Kevin L Briggman, Winfried Denk, Jared B Bowden, John M Mendenhall, Wickliffe C Abraham, et al. Boundary learning by optimization with topological constraints. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2488–2495. IEEE, 2010. [22] J L Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509–517, 1975. [23] Z Wu and R Leahy. An optimal graph theoretic approach to data clustering: Theory and its application to image segmentation. IEEE Trans. Pattern Anal. Mach. Intell., 15(11):1101–1113, 1993. [24] A Y Ng et al. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. [25] K Kurihara et al. Collapsed variational dirichlet process mixture models. In IJCAI, volume 7, pages 2796–2801, 2007. [26] Jeffrey W Miller and Matthew T Harrison. A simple example of dirichlet process mixture inconsistency for the number of components. In Advances in neural information processing systems, pages 199–206, 2013. [27] Lawrence Hubert and Phipps Arabie. Comparing partitions. Journal of classification, 2(1):193–218, 1985. [28] U Sümbül et al. A genetic and computational approach to structurally classify neuronal types. Nature communications, 5, 2014. [29] U Sümbül et al. Automated computation of arbor densities: a step toward identifying neuronal cell types. Frontiers in neuroscience, 2014. [30] M H Longair et al. Simple neurite tracer: open source software for reconstruction, visualization and analysis of neuronal processes. Bioinformatics, 27(17):2453–2454, 2011. [31] H Peng et al. V3d enables real-time 3d visualization and quantitative analysis of large-scale biological image data sets. Nature biotechnology, 28(4):348–353, 2010. 9 | 2016 | 278 |
6,192 | Robustness of classifiers: from adversarial to random noise Alhussein Fawzi∗, Seyed-Mohsen Moosavi-Dezfooli∗, Pascal Frossard École Polytechnique Fédérale de Lausanne Lausanne, Switzerland {alhussein.fawzi, seyed.moosavi, pascal.frossard} at epfl.ch Abstract Several recent works have shown that state-of-the-art classifiers are vulnerable to worst-case (i.e., adversarial) perturbations of the datapoints. On the other hand, it has been empirically observed that these same classifiers are relatively robust to random noise. In this paper, we propose to study a semi-random noise regime that generalizes both the random and worst-case noise regimes. We propose the first quantitative analysis of the robustness of nonlinear classifiers in this general noise regime. We establish precise theoretical bounds on the robustness of classifiers in this general regime, which depend on the curvature of the classifier’s decision boundary. Our bounds confirm and quantify the empirical observations that classifiers satisfying curvature constraints are robust to random noise. Moreover, we quantify the robustness of classifiers in terms of the subspace dimension in the semi-random noise regime, and show that our bounds remarkably interpolate between the worst-case and random noise regimes. We perform experiments and show that the derived bounds provide very accurate estimates when applied to various state-of-the-art deep neural networks and datasets. This result suggests bounds on the curvature of the classifiers’ decision boundaries that we support experimentally, and more generally offers important insights onto the geometry of high dimensional classification problems. 1 Introduction State-of-the-art classifiers, especially deep networks, have shown impressive classification performance on many challenging benchmarks in visual tasks [9] and speech processing [7]. An equally important property of a classifier that is often overlooked is its robustness in noisy regimes, when data samples are perturbed by noise. The robustness of a classifier is especially fundamental when it is deployed in real-world, uncontrolled, and possibly hostile environments. In these cases, it is crucial that classifiers exhibit good robustness properties. In other words, a sufficiently small perturbation of a datapoint should ideally not result in altering the estimated label of a classifier. State-of-the-art deep neural networks have recently been shown to be very unstable to worst-case perturbations of the data (or equivalently, adversarial perturbations) [17]. In particular, despite the excellent classification performances of these classifiers, well-sought perturbations of the data can easily cause misclassification, since data points often lie very close to the decision boundary of the classifier. Despite the importance of this result, the worst-case noise regime that is studied in [17] only represents a very specific type of noise. It furthermore requires the full knowledge of the classification model, which may be a hard assumption in practice. In this paper, we precisely quantify the robustness of nonlinear classifiers in two practical noise regimes, namely random and semi-random noise regimes. In the random noise regime, datapoints are ∗The first two authors contributed equally to this work. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. perturbed by noise with random direction in the input space. The semi-random regime generalizes this model to random subspaces of arbitrary dimension, where a worst-case perturbation is sought within the subspace. In both cases, we derive bounds that precisely describe the robustness of classifiers in function of the curvature of the decision boundary. We summarize our contributions as follows: • In the random regime, we show that the robustness of classifiers behaves as √ d times the distance from the datapoint to the classification boundary (where d denotes the dimension of the data) provided the curvature of the decision boundary is sufficiently small. This result highlights the blessing of dimensionality for classification tasks, as it implies that robustness to random noise in high dimensional classification problems can be achieved, even at datapoints that are very close to the decision boundary. • This quantification notably extends to the general semi-random regime, where we show that the robustness precisely behaves as p d/m times the distance to boundary, with m the dimension of the subspace. This result shows in particular that, even when m is chosen as a small fraction of the dimension d, it is still possible to find small perturbations that cause data misclassification. • We empirically show that our theoretical estimates are very accurately satisfied by stateof-the-art deep neural networks on various sets of data. This in turn suggests quantitative insights on the curvature of the decision boundary that we support experimentally through the visualization and estimation on two-dimensional sections of the boundary. The robustness of classifiers to noise has been the subject of intense research. The robustness properties of SVM classifiers have been studied in [19] for example, and robust optimization approaches for constructing robust classifiers have been proposed to minimize the worst possible empirical error under noise disturbance [1, 10]. More recently, following the recent results on the instability of deep neural networks to worst-case perturbations [17], several works have provided explanations of the phenomenon [3, 5, 14, 18], and designed more robust networks [6, 8, 20, 13, 15, 12]. In [18], the authors provide an interesting empirical analysis of the adversarial instability, and show that adversarial examples are not isolated points, but rather occupy dense regions of the pixel space. In [4], state-of-the-art classifiers are shown to be vulnerable to geometrically constrained adversarial examples. Our work differs from these works, as we provide a theoretical study of the robustness of classifiers to random and semi-random noise in terms of the robustness to adversarial noise. In [3], a formal relation between the robustness to random noise, and the worst-case robustness is established in the case of linear classifiers. Our result therefore generalizes [3] in many aspects, as we study general nonlinear classifiers, and robustness to semi-random noise. Finally, it should be noted that the authors in [5] conjecture that the “high linearity” of classification models explains their instability to adversarial perturbations. The objective and approach we follow here is however different, as we study theoretical relations between the robustness to random, semi-random and adversarial noise. 2 Definitions and notations Let f : Rd →RL be an L-class classifier. Given a datapoint x0 ∈Rd, the estimated label is obtained by ˆk(x0) = argmaxk fk(x0), where fk(x) is the kth component of f(x) that corresponds to the kth class. Let S be an arbitrary subspace of Rd of dimension m. Here, we are interested in quantifying the robustness of f with respect to different noise regimes. To do so, we define r∗ S to be the perturbation in S of minimal norm that is required to change the estimated label of f at x0.2 r∗ S(x0) = argmin r∈S ∥r∥2 s.t. ˆk(x0 + r) ̸= ˆk(x0). (1) Note that r∗ S(x0) can be equivalently written r∗ S(x0) = argmin r∈S ∥r∥2 s.t. ∃k ̸= ˆk(x0) : fk(x0 + r) ≥fˆk(x0)(x0 + r). (2) When S = Rd, r∗(x0) := r∗ Rd(x0) is the adversarial (or worst-case) perturbation defined in [17], which corresponds to the (unconstrained) perturbation of minimal norm that changes the label of the 2Perturbation vectors sending a datapoint exactly to the boundary are assumed to change the estimated label of the classifier. 2 datapoint x0. In other words, ∥r∗(x0)∥2 corresponds to the minimal distance from x0 to the classifier boundary. In the case where S ⊂Rd, only perturbations along S are allowed. The robustness of f at x0 along S is naturally measured by the norm ∥r∗ S(x0)∥2. Different choices for S permit to study the robustness of f in two different regimes: • Random noise regime: This corresponds to the case where S is a one-dimensional subspace (m = 1) with direction v, where v is a random vector sampled uniformly from the unit sphere Sd−1. Writing it explicitly, we study in this regime the robustness quantity defined by mint |t| s.t. ∃k ̸= ˆk(x0), fk(x0 + tv) ≥fˆk(x0)(x0 + tv), where v is a vector sampled uniformly at random from the unit sphere Sd−1. • Semi-random noise regime: In this case, the subspace S is chosen randomly, but can be of arbitrary dimension m.3 We use the semi-random terminology as the subspace is chosen randomly, and the smallest vector that causes misclassification is then sought in the subspace. It should be noted that the random noise regime is a special case of the semi-random regime with a subspace of dimension m = 1. We differentiate nevertheless between these two regimes for clarity. In the remainder of the paper, the goal is to establish relations between the robustness in the random and semi-random regimes on the one hand, and the robustness to adversarial perturbations ∥r∗(x0)∥2 on the other hand. We recall that the latter quantity captures the distance from x0 to the classifier boundary, and is therefore a key quantity in the analysis of robustness. In the following analysis, we fix x0 to be a datapoint classified as ˆk(x0). To simplify the notation, we remove the explicit dependence on x0 in our notations (e.g., we use r∗ S instead of r∗ S(x0) and ˆk instead of ˆk(x0)), and it should be implicitly understood that all our quantities pertain to the fixed datapoint x0. 3 Robustness of affine classifiers We first assume that f is an affine classifier, i.e., f(x) = W⊤x + b for a given W = [w1 . . . wL] and b ∈RL. The following result shows a precise relation between the robustness to semi-random noise, ∥r∗ S∥2 and the robustness to adversarial perturbations, ∥r∗∥2. Theorem 1. Let δ > 0, S be a random m-dimensional subspace of Rd, and f be a L-class affine classifier. Let ζ1(m, δ) = 1 + 2 r ln(1/δ) m + 2 ln(1/δ) m !−1 , (3) ζ2(m, δ) = max (1/e)δ2/m, 1 − q 2(1 −δ2/m) −1 . (4) The following inequalities hold between the robustness to semi-random noise ∥r∗ S∥2, and the robustness to adversarial perturbations ∥r∗∥2: p ζ1(m, δ) r d m∥r∗∥2 ≤∥r∗ S∥2 ≤ p ζ2(m, δ) r d m∥r∗∥2, (5) with probability exceeding 1 −2(L + 1)δ. The proof can be found in the appendix. Our upper and lower bounds depend on the functions ζ1(m, δ) and ζ2(m, δ) that control the inequality constants (for m, δ fixed). It should be noted that ζ1(m, δ) and ζ2(m, δ) are independent of the data dimension d. Fig. 1 shows the plots of ζ1(m, δ) and ζ2(m, δ) as functions of m, for a fixed δ. It should be noted that for sufficiently large m, ζ1(m, δ) and ζ2(m, δ) are very close to 1 (e.g., ζ1(m, δ) and ζ2(m, δ) belong to the interval [0.8, 1.3] for m ≥250 in the settings of Fig. 1). The interval [ζ1(m, δ), ζ2(m, δ)] is however (unavoidably) larger when m = 1. 3A random subspace is defined as the span of m independent vectors drawn uniformly at random from Sd−1. 3 m 0 200 400 600 800 1000 10-2 10-1 100 101 102 103 104 ζ1 (m δ , ) ζ2 δ (m, ) Figure 1: ζ1(m, δ) and ζ2(m, δ) in function of m [δ = 0.05] . The result in Theorem 1 shows that in the random and semi-random noise regimes, the robustness to noise is precisely related to ∥r∗∥2 by a factor of p d/m. Specifically, in the random noise regime (m = 1), the magnitude of the noise required to misclassify the datapoint behaves as Θ( √ d∥r∗∥2) with high probability, with constants in the interval [ζ1(1, δ), ζ2(1, δ)]. Our results therefore show that, in high dimensional classification settings, affine classifiers can be robust to random noise, even if the datapoint lies very closely to the decision boundary (i.e., ∥r∗∥2 is small). In the semi-random noise regime with m sufficiently large (e.g., m ≥250), we have ∥r∗ S∥2 ≈ p d/m∥r∗∥2 with high probability, as the constants ζ1(m, δ) ≈ζ2(m, δ) ≈1 for sufficiently large m. Our bounds therefore “interpolate” between the random noise regime, which behaves as √ d∥r∗∥2, and the worst-case noise ∥r∗∥2. More importantly, the square root dependence is also notable here, as it shows that the semi-random robustness can remain small even in regimes where m is chosen to be a very small fraction of d. For example, choosing a small subspace of dimension m = 0.01d results in semi-random robustness of 10∥r∗∥2 with high probability, which might still not be perceptible in complex visual tasks. Hence, for semi-random noise that is mostly random and only mildly adversarial (i.e., the subspace dimension is small), affine classifiers remain vulnerable to such noise. 4 Robustness of general classifiers 4.1 Curvature of the decision boundary We now consider the general case where f is a nonlinear classifier. We derive relations between the random and semi-random robustness ∥r∗ S∥2 and worst-case robustness ∥r∗∥2 using properties of the classifier’s boundary. Let i and j be two arbitrary classes; we define the pairwise boundary Bi,j as the boundary of the binary classifier where only classes i and j are considered. Formally, the decision boundary is given by Bi,j := {x ∈Rd : fi(x) −fj(x) = 0}. The boundary Bi,j separates between two regions of Rd, namely Ri and Rj, where the estimated label of the binary classifier is respectively i and j. We assume for the purpose of this analysis that the boundary Bi,j is smooth. We are now interested in the geometric properties of the boundary, namely its curvature. Many notions of curvature can be defined on hypersurfaces [11]. In the simple case of a curve in a two-dimensional space, the curvature is defined as the inverse of the radius of the so-called oscullating circle. One way to define curvature for high-dimensional hypersurfaces is by taking normal sections of the hypersurface, and measuring the curvature of the resulting planar curve (see Fig. 2). We however introduce a notion of curvature that is specifically suited to the analysis of the decision boundary of a classifier. Informally, our curvature captures the global bending of the decision boundary by inscribing balls in the regions separated by the decision boundary. For a given p ∈Bi,j, we define qi ∥j(p) to be the radius of the largest open ball included in the region Ri that intersects with Bi,j at p; i.e., qi ∥j(p) = sup z∈Rd {∥z −p∥2 : B(z, ∥z −p∥2) ⊆Ri} , (6) where B(z, ∥z −p∥2) is the open ball in Rd of center z and radius ∥z −p∥2. An illustration of this quantity in two dimensions is provided in Fig. 2 (b). It is not hard to see that any ball B(z∗, ∥z∗−p∥2) centered in z∗and included in Ri will have its tangent space at p coincide with the tangent of the decision boundary at the same point. It should further be noted that the definition in Eq. (6) is not symmetric in i and j. We therefore define the following symmetric quantity qi,j(p), where the worst-case ball inscribed in any of the two regions Ri and Rj is considered: qi,j(p) = min qi ∥j(p), qj ∥i(p) . 4 U TpBj p γ u n (a) R1 R2 p1 B1,2 p2 q1 2(p1) q2 1(p2) (b) Figure 2: (a) Normal section of the boundary Bi,j with respect to plane U = span(n, u), where n is the normal to the boundary at p, and u is an arbitrary in the tangent space Tp(Bi,j). (b) Illustration of the quantities introduced for the definition of the curvature of the decision boundary. To measure the global curvature, the worst-case radius is taken over all points on the decision boundary, i.e., q(Bi,j) = infp∈Bi,j qi,j(p). The curvature κ(Bi,j) is then defined as the inverse of the worst-case radius: κ(Bi,j) = 1/q(Bi,j). In the case of affine classifiers, we have κ(Bi,j) = 0, as it is possible to inscribe balls of infinite radius inside each region of the space. When the classification boundary is a union of (sufficiently distant) spheres with equal radius R, the curvature κ(Bi,j) = 1/R. In general, the quantity κ(Bi,j) provides an intuitive way of describing the nonlinearity of the decision boundary by fitting balls inside the classification regions. 4.2 Robustness to random and semi-random noise We now establish bounds on the robustness to random and semi-random noise in the binary classification case. Let x0 be a datapoint classified as ˆk = ˆk(x0). We first study the binary classification problem, where only classes ˆk and k ∈{1, . . . , L}\{ˆk} are considered. To simplify the notation, we let Bk := Bk,ˆk be the decision boundary between classes k and ˆk. In the case of the binary classification problem where classes k and ˆk are considered, the semi-random perturbation defined in Eq. (2) can be re-written as follows: rk S = argmin r∈S ∥r∥2 s.t. fk(x0 + r) ≥fˆk(x0 + r). (7) The worst case perturbation (obtained with S = Rd) is denoted by rk. It should be noted that the global quantities r∗ S and r∗are obtained from rk S and rk by taking the vectors with minimum norm over all classes k. The following result gives upper and lower bounds on the ratio ∥rk S∥2 ∥rk∥2 in function of the curvature of the boundary separating class k and ˆk. Theorem 2. Let S be a random m-dimensional subspace of Rd. Let κ := κ(Bk). Assuming that the curvature satisfies κ ≤ C ζ2(m, δ)∥rk∥2 m d , (8) the following inequality holds between the semi-random robustness ∥rk S∥2 and the adversarial robustness ∥rk∥2: 1 −C1∥rk∥2κζ2 d m p ζ1 r d m ≤∥rk S∥2 ∥rk∥2 ≤ 1 + C2∥rk∥2κζ2 d m p ζ2 r d m (9) with probability larger than 1 −4δ. We recall that ζ1 = ζ1(m, δ) and ζ2 = ζ2(m, δ) are defined in Eq. (3, 4). The constants are C = 0.2, C1 = 0.625, C2 = 2.25. The proof can be found in the appendix. This result shows that the bounds relating the robustness to random and semi-random noise to the worst-case robustness can be extended to nonlinear classifiers, 5 provided the curvature of the boundary κ(Bk) is sufficiently small. In the case of linear classifiers, we have κ(Bk) = 0, and we recover the result for affine classifiers from Theorem 1. To extend this result to multi-class classification, special care has to be taken. In particular, if k denotes a class that has no boundary with class ˆk, ∥rk∥2 can be very large and the previous curvature condition is not satisfied. It is therefore crucial to exclude such classes that have no boundary in common with class ˆk, or more generally, boundaries that are far from class ˆk. We define the set A of excluded classes k where ∥rk∥2 is large A = {k : ∥rk∥2 ≥1.45 p ζ2(m, δ) r d m∥r∗∥2}. (10) Note that A is independent of S, and depends only on d, m and δ. Moreover, the constants in (10) were chosen for simplicity of exposition. Assuming a curvature constraint only on the close enough classes, the following result establishes a simplified relation between ∥r∗ S∥2 and ∥r∗∥2. Corollary 1. Let S be a random m-dimensional subspace of Rd. Assume that, for all k /∈A, the curvature condition in Eq. (8) holds. Then, we have 0.875 p ζ1(m, δ) r d m∥r∗∥2 ≤∥r∗ S∥2 ≤1.45 p ζ2(m, δ) r d m∥r∗∥2 (11) with probability larger than 1 −4(L + 2)δ. Under the curvature condition in (8) on the boundaries between ˆk and classes in Ac, our result shows that the robustness to random and semi-random noise exhibits the same behavior that has been observed earlier for linear classifiers in Theorem 1. In particular, ∥r∗ S∥2 is precisely related to the adversarial robustness ∥r∗∥2 by a factor of p d/m. In the random regime (m = 1), this factor becomes √ d, and shows that in high dimensional classification problems, classifiers with sufficiently flat boundaries are much more robust to random noise than to adversarial noise. However, in the semi-random, the factor is p d/m and shows that robustness to semi-random noise might not be achieved even if m is chosen to be a tiny fraction of d. In other words, if a classifier is highly vulnerable to adversarial perturbations, then it is also vulnerable to noise that is overwhelmingly random and only mildly adversarial. It is important to note that the curvature condition in Corollary 1 is not an assumption on the curvature of the global decision boundary, but rather an assumption on the decision boundaries between pairs of classes. The distinction here is significant, as junction points where two decision boundaries meet might actually have a very large (or infinite) curvature (even in linear classification settings), and the curvature condition in Corollary 1 typically does not hold for this global curvature definition. We refer to our experimental section for a visualization of this phenomenon. 5 Experiments We now evaluate the robustness of different image classifiers to random and semi-random perturbations, and assess the accuracy of our bounds on various datasets and state-of-the-art classifiers. Specifically, our theoretical results show that the robustness ∥r∗ S(x)∥2 of classifiers satisfying the curvature property precisely behaves as p d/m∥r∗(x)∥2. We first check the accuracy of these results in different classification settings. For a given classifier f and subspace dimension m, we define β(f; m) = p m/d 1 |D| P x∈D ∥r∗ S(x)∥2 ∥r∗(x)∥2 , where S is chosen randomly for each sample x and D denotes the test set. This quantity provides indication to the accuracy of our p d/m∥r∗(x)∥2 estimate of the robustness, and should ideally be equal to 1 (for sufficiently large m). Since β is a random quantity (because of S), we report both its mean and standard deviation for different networks in Table 1. It should be noted that finding ∥r∗ S∥2 and ∥r∗∥2 involves solving the optimization problem in (1). We have used a similar approach to [13] to find subspace minimal perturbations. For each network, we estimate the expectation by averaging β(f; m) on 1000 random samples, with S also chosen randomly for each sample. Observe that β is suprisingly close to 1, even when m is a small fraction of d. This shows that our quantitative analysis provide very accurate estimates of the robustness to semi-random noise. We visualize the robustness to random noise, semi-random noise (with m = 10) 6 Table 1: β(f; m) for different classifiers f and different subspace dimensions m. The VGG-F and VGG-19 are respectively introduced in [2, 16]. m/d Classifier 1/4 1/16 1/36 1/64 1/100 LeNet (MNIST) 1.00 ± 0.06 1.01 ± 0.12 1.03 ± 0.20 1.01 ± 0.26 1.05 ± 0.34 LeNet (CIFAR-10) 1.01 ± 0.03 1.02 ± 0.07 1.04 ± 0.10 1.06 ± 0.14 1.10 ± 0.19 VGG-F (ImageNet) 1.00 ± 0.01 1.02 ± 0.02 1.03 ± 0.04 1.03 ± 0.05 1.04 ± 0.06 VGG-19 (ImageNet) 1.00 ± 0.01 1.02 ± 0.03 1.02 ± 0.05 1.03 ± 0.06 1.04 ± 0.08 (a) (b) (c) (d) Figure 3: (a) Original image classified as “Cauliflower”. Fooling perturbations for VGG-F network: (b) Random noise, (c) Semi-random perturbation with m = 10, (d) Worst-case perturbation, all wrongly classified as “Artichoke”. and worst-case perturbations on a sample image in Fig. 3. While random noise is clearly perceptible due to the √ d ≈400 factor, semi-random noise becomes much less perceptible even with a relatively small value of m = 10, thanks to the 1/√m factor that attenuates the required noise to misclassify the datapoint. It should be noted that the robustness of neural networks to adversarial perturbations has previously been observed empirically in [17], but we provide here a quantitative and generic explanation for this phenomenon. The high accuracy of our bounds for different state-of-the-art classifiers, and different datasets suggest that the decision boundaries of these classifiers have limited curvature κ(Bk), as this is a key assumption of our theoretical findings. To support the validity of this curvature hypothesis in practice, we visualize two-dimensional sections of the classifiers’ boundary in Fig. 4 in three different settings. Note that we have opted here for a visualization strategy rather than the numerical estimation of κ(B), as the latter quantity is difficult to approximate in practice in high dimensional problems. In Fig. 4, x0 is chosen randomly from the test set for each data set, and the decision boundaries are shown in the plane spanned by r∗and r∗ S, where S is a random direction (i.e., m = 1). Different colors on the boundary correspond to boundaries with different classes. It can be observed that the curvature of the boundary is very small except at “junction” points where the boundary of two different classes intersect. Our curvature assumption, which only assumes a bound on the curvature of the decision boundary between pairs of classes ˆk(x0) and k (but not on the global decision boundary that contains junctions with high curvature) is therefore adequate to the decision boundaries of state-of-the-art classifiers according to Fig. 4. Interestingly, the assumption in Corollary 1 is satisfied by taking κ to be an empirical estimate of the curvature of the planar curves in Fig. 4 (a) for the dimension of the subspace being a very small fraction of d; e.g., m = 10−3d. While not reflecting the curvature κ(Bk) that drives the assumption of our theoretical analysis, this result still seems to suggest that the curvature assumption holds in practice. We now show a simple demonstration of the vulnerability of classifiers to semi-random noise in Fig. 5, where a structured message is hidden in the image and causes data misclassification. Specifically, we consider S to be the span of random translated and scaled versions of words “NIPS”, “SPAIN” and “2016” in an image, such that ⌊d/m⌋= 228. The resulting perturbations in the subspace are therefore linear combinations of these words with different intensities.4 The perturbed image x0 +r∗ S shown in 4This example departs somehow from the theoretical framework of this paper, where random subspaces were considered. However, this empirical example suggests that the theoretical findings in this paper seem to approximately hold when the subspace S have statistics that are close to a random subspace. 7 -100 -75 -50 -25 0 25 50 75 100 125 150 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 x0 B 2 B 1 (a) VGG-F (ImageNet) -150 -100 -50 0 50 100 150 200 -2.5 0 2.5 5 7.5 10 12.5 x0 B 2 B 1 (b) LeNet (CIFAR) -5 -2.5 0 2.5 5 7.5 -1 0.75 -0.5 0.25 0 0.25 0.5 x0 B 1 B 2 (c) LeNet (MNIST) Figure 4: Boundaries of three classifiers near randomly chosen samples. Axes are normalized by the corresponding ∥r∗∥2 as our assumption in the theoretical bound depends on the product of ∥r∗∥2κ. Note the difference in range between x and y axes. Note also that the range of horizontal axis in (c) is much smaller than the other two, hence the illustrated boundary is more curved. (a) Image of a “Potflower” (b) Perturbation (c) Classified as “Pineapple” Figure 5: A fooling hidden message. S is the span of random translations and scales of the words “NIPS”, “SPAIN”, and “2016”. Fig. 5 (c) is clearly indistinguishable from Fig. 5 (a). This shows that imperceptibly small structured messages can be added to an image causing data misclassification. 6 Conclusion In this work, we precisely characterized the robustness of classifiers in a novel semi-random noise regime that generalizes the random noise regime. Specifically, our bounds relate the robustness in this regime to the robustness to adversarial perturbations. Our bounds depend on the curvature of the decision boundary, the data dimension, and the dimension of the subspace to which the perturbation belongs. Our results show, in particular, that when the decision boundary has a small curvature, classifiers are robust to random noise in high dimensional classification problems (even if the robustness to adversarial perturbations is relatively small). Moreover, for semi-random noise that is mostly random and only mildly adversarial (i.e., the subspace dimension is small), our results show that state-of-the-art classifiers remain vulnerable to such perturbations. To improve the robustness to semi-random noise, our analysis encourages to impose geometric constraints on the curvature of the decision boundary, as we have shown the existence of an intimate relation between the robustness of classifiers and the curvature of the decision boundary. Acknowledgments We would like to thank the anonymous reviewers for their helpful comments. We thank Omar Fawzi and Louis Merlin for the fruitful discussions. We also gratefully acknowledge the support of NVIDIA Corporation with the donation of the Tesla K40 GPU used for this research. This work has been partly supported by the Hasler Foundation, Switzerland, in the framework of the CORA project. 8 References [1] Caramanis, C., Mannor, S., and Xu, H. (2012). Robust optimization in machine learning. In Sra, S., Nowozin, S., and Wright, S. J., editors, Optimization for machine learning, chapter 14. Mit Press. [2] Chatfield, K., Simonyan, K., Vedaldi, A., and Zisserman, A. (2014). Return of the devil in the details: Delving deep into convolutional nets. In British Machine Vision Conference. [3] Fawzi, A., Fawzi, O., and Frossard, P. (2015). Analysis of classifiers’ robustness to adversarial perturbations. CoRR, abs/1502.02590. [4] Fawzi, A. and Frossard, P. (2015). Manitest: Are classifiers really invariant? In British Machine Vision Conference (BMVC), pages 106.1–106.13. [5] Goodfellow, I. J., Shlens, J., and Szegedy, C. (2015). Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR). [6] Gu, S. and Rigazio, L. (2014). Towards deep neural network architectures robust to adversarial examples. arXiv preprint arXiv:1412.5068. [7] Hinton, G. E., Deng, L., Yu, D., Dahl, G. E., Mohamed, A., Jaitly, N., Senior, A., Vanhoucke, V., Nguyen, P., Sainath, T. N., and Kingsbury, B. (2012). Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Process. Mag., 29(6):82–97. [8] Huang, R., Xu, B., Schuurmans, D., and Szepesvári, C. (2015). Learning with a strong adversary. CoRR, abs/1511.03034. [9] Krizhevsky, A., Sutskever, I., and Hinton, G. E. (2012). Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems (NIPS), pages 1097–1105. [10] Lanckriet, G., Ghaoui, L., Bhattacharyya, C., and Jordan, M. (2003). A robust minimax approach to classification. The Journal of Machine Learning Research, 3:555–582. [11] Lee, J. M. (2009). Manifolds and differential geometry, volume 107. American Mathematical Society Providence. [12] Luo, Y., Boix, X., Roig, G., Poggio, T., and Zhao, Q. (2015). Foveation-based mechanisms alleviate adversarial examples. arXiv preprint arXiv:1511.06292. [13] Moosavi-Dezfooli, S.-M., Fawzi, A., and Frossard, P. (2016). Deepfool: a simple and accurate method to fool deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). [14] Sabour, S., Cao, Y., Faghri, F., and Fleet, D. J. (2016). Adversarial manipulation of deep representations. In International Conference on Learning Representations (ICLR). [15] Shaham, U., Yamada, Y., and Negahban, S. (2015). Understanding adversarial training: Increasing local stability of neural nets through robust optimization. arXiv preprint arXiv:1511.05432. [16] Simonyan, K. and Zisserman, A. (2014). Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR). [17] Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I., and Fergus, R. (2014). Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR). [18] Tabacof, P. and Valle, E. (2016). Exploring the space of adversarial images. IEEE International Joint Conference on Neural Networks. [19] Xu, H., Caramanis, C., and Mannor, S. (2009). Robustness and regularization of support vector machines. The Journal of Machine Learning Research, 10:1485–1510. [20] Zhao, Q. and Griffin, L. D. (2016). Suppressing the unusual: towards robust cnns using symmetric activation functions. arXiv preprint arXiv:1603.05145. 9 | 2016 | 279 |
6,193 | A Non-convex One-Pass Framework for Generalized Factorization Machine and Rank-One Matrix Sensing Ming Lin University of Michigan linmin@umich.edu Jieping Ye University of Michigan jpye@umich.edu Abstract We develop an efficient alternating framework for learning a generalized version of Factorization Machine (gFM) on steaming data with provable guarantees. When the instances are sampled from d dimensional random Gaussian vectors and the target second order coefficient matrix in gFM is of rank k, our algorithm converges linearly, achieves O(ϵ) recovery error after retrieving O(k3d log(1/ϵ)) training instances, consumes O(kd) memory in one-pass of dataset and only requires matrixvector product operations in each iteration. The key ingredient of our framework is a construction of an estimation sequence endowed with a so-called Conditionally Independent RIP condition (CI-RIP). As special cases of gFM, our framework can be applied to symmetric or asymmetric rank-one matrix sensing problems, such as inductive matrix completion and phase retrieval. 1 Introduction Linear models are one of the foundations of modern machine learning due to their strong learning guarantees and efficient solvers [Koltchinskii, 2011]. Conventionally linear models only consider the first order information of the input feature which limits their capacity in non-linear problems. Among various efforts extending linear models to the non-linear domain, the Factorization Machine [Rendle, 2010] (FM) captures the second order information by modeling the pairwise feature interaction in regression under low-rank constraints. FMs have been found successful in many applications, such as recommendation systems [Rendle et al., 2011] and text retrieval [Hong et al., 2013]. In this paper, we consider a generalized version of FM called gFM which removes several redundant constraints in the original FM such as positive semi-definite and zero-diagonal, leading to a more general model without sacrificing its learning ability. From theoretical side, the gFM includes rank-one matrix sensing [Zhong et al., 2015, Chen et al., 2015, Cai and Zhang, 2015, Kueng et al., 2014] as a special case, where the latter one has been studied widely in context such as inductive matrix completion [Jain and Dhillon, 2013] and phase retrieval [Candes et al., 2011]. Despite of the popularity of FMs in industry, there is rare theoretical study of learning guarantees for FMs. One of the main challenges in developing a provable FM algorithm is to handle its symmetric rank-one matrix sensing operator. For conventional matrix sensing problems where the matrix sensing operator is RIP, there are several alternating methods with provable guarantees [Hardt, 2013, Jain et al., 2013, Hardt and Wootters, 2014, Zhao et al., 2015a,b]. However, for a symmetric rank-one matrix sensing operator, the RIP condition doesn’t hold trivially which turns out to be the main difficulty in designing efficient provable FM solvers. In rank-one matrix sensing, when the sensing operator is asymmetric, the problem is also known as inductive matrix completion which can be solved via alternating minimization with a global linear convergence rate [Jain and Dhillon, 2013, Zhong et al., 2015]. For symmetric rank-one matrix sensing operators, we are not aware of any efficient solver by the time of writing this paper. In a special case when the target matrix is of rank one, the problem is called “phase retrieval” whose convex solver 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. is first proposed by Candes et al. [2011] then alternating methods are provided in [Lee et al., 2013, Netrapalli et al., 2013]. While the target matrix is of rank k > 1 , only convex methods minimizing the trace norm have been proposed recently, which are computationally expensive [Kueng et al., 2014, Cai and Zhang, 2015, Chen et al., 2015, Davenport and Romberg, 2016]. Despite of the above fundamental challenges, extending rank-one matrix sensing algorithm to gFM itself is difficult. Please refer to Section 2.1 for an in-depth discussion. The main difficulty is due to the first order term in the gFM formulation, which cannot be trivially converted to a standard matrix sensing problem. In this paper, we develop a unified theoretical framework and an efficient solver for generalized Factorization Machine and its special cases such as rank-one matrix sensing, either symmetric or asymmetric. The key ingredient is to show that the sensing operator in gFM satisfies a so-called Conditionally Independent RIP condition (CI-RIP, see Definition 2) . Then we can construct an estimation sequence via noisy power iteration [Hardt and Price, 2013]. Unlike previous approaches, our method does not require alternating minimization or choosing the step-size as in alternating gradient descent. The proposed method works on steaming data, converges linearly and has O(kd) space complexity for a d-dimension rank-k gFM model. The solver achieves O(ϵ) recovery error after retrieving O(k3d log(1/ϵ)) training instances. The remainder of this paper is organized as following. In Section 2, we introduce necessary notation and background of gFM. Subsection 2.1 investigates several fundamental challenges in depth. Section 3 presents our algorithm, called One-Pass gFM, followed by its theoretical guarantees. Our analysis framework is presented in Section 4. Section 5 concludes this paper. 2 Generalized Factorization Machine (gFM) In this section, we first introduce necessary notation and background of FM and its generalized version gFM. Then in Subsection 2.1, we reveal the connection between gFM and rank-one matrix sensing followed by several fundamental challenges encountered when applying frameworks of rank-one matrix sensing to gFM. The FM predicts the labels of instances by not only their features but also high order interactions between features. In the following, we focus on the second order FM due to its popularity. Suppose we are given N training instances xi ∈Rd independently and identically (I.I.D.) sampled from the standard Gaussian distribution and so are their associated labels yi ∈R. Denote the feature matrix X = [x1, x2, · · · , xn] ∈Rd×n and the label vector y = [y1, y2, · · · , yn]⊤∈Rn . In second order FM, yi is assumed to be generated from a target vector w∗∈Rd and a target rank k matrix M ∗∈Rd×d satisfying yi =xi ⊤w∗+ xi ⊤M ∗xi + ξi (1) where ξi is a random subgaussian noise with proxy variance ξ2 . It is often more convenient to write Eq. (1) in matrix form. Denote the linear operator A : Rd×d →Rn as A(M) ≜ [⟨A1, M⟩, ⟨A2, M⟩, · · · , ⟨An, M⟩]⊤where Ai = xixi⊤. Then Eq. (1) has a compact form: y = X⊤w∗+A(M ∗) + ξ . (2) The FM model given by Eq. (2) consists of two components: the first order component X⊤w∗and the second order component A(M ∗). The component A(M ∗) is a symmetric rank-one Gaussian measurement since Ai(M) = xi⊤Mxi where the left/right design vectors (xi and xi⊤) are identical. The original FM requires that M ∗should be positive semi-definite and the diagonal elements of M ∗ should be zero. However our analysis shows that both constraints are redundant for learning Eq. 2. Therefore in this paper we consider a generalized version of FM which we call gFM where M ∗is only required to be symmetric and low rank. To make the recovery of M ∗well defined, it is necessary to assume M ∗to be symmetric. Indeed for any asymmetric matrix M ∗, there is always a symmetric matrix M ∗ sym = (M ∗+ M ∗⊤)/2 such that A(M ∗) = A(M ∗ sym) thus the symmetric constraint does not affect the model. Another standard assumption in rank-one matrix sensing is that the rank of M ∗ should be no more than k for k ≪d. When w∗= 0, gFM is equal to the symmetric rank-one matrix sensing problem. Recent researches have proposed several convex programming methods based on the trace norm minimization to recover M ∗with a sampling complexity on order of O(k3d) [Candes 2 et al., 2011, Cai and Zhang, 2015, Kueng et al., 2014, Chen et al., 2015, Zhong et al., 2015]. Some authors also call gFM as second order polynomial network [Blondel et al., 2016]. When d is much larger than k, the convex programming on the trace norm or nuclear norm of M ∗ becomes difficult since M ∗can be a d × d dense matrix. Although modern convex solvers can scale to large d with reasonable computational cost, a more popular strategy to efficiently estimate w∗ and M ∗is to decompose M ∗as UV ⊤for some U, V ∈Rd×k, then alternatively update w, U, V to minimize the empirical loss function min w,U,V 1 2N ∥y −X⊤w −A(UV ⊤)∥2 2 . (3) The loss function in Eq. (3) is non-convex. It is even unclear whether an estimator of the optimal solution {w∗, M ∗} of Eq. (3) with a polynomial time complexity exists or not. In our analysis, we denote M + O(ϵ) as a matrix M plus a perturbation matrix whose spectral norm is bounded by ϵ. We use ∥· ∥2 , ∥· ∥F , ∥· ∥∗to denote the matrix spectral norm, Frobenius norm and nuclear norm respectively. To abbreviate the high probability bound, we denote C = polylog(d, n, T, 1/η) to be a constant polynomial logarithmic in {d, n, T, 1/η}. The eigenvalue decomposition of M ∗is M ∗= U ∗Λ∗U ∗⊤where U ∗∈Rd×k is the top-k eigenvectors of M ∗ and Λ∗= diag(λ∗ 1, λ∗ 2, · · · , λ∗ k) are the corresponding eigenvalues sorted by |λi| ≥|λi+1|. Let σ∗ i = |λ∗ i | denote the singular value of M ∗and σi{M} be the i-th largest singular value of M. U ∗ ⊥ denotes an matrix whose columns are the orthogonal basis of the complementary subspace of U ∗. 2.1 gFM and Rank-One Matrix Sensing When w∗= 0 in Eq. (1), the gFM becomes the symmetric rank-one matrix sensing problem. While the recovery ability of rank-one matrix sensing is somehow provable recently despite of the computational issue, it is not the case for gFM. It is therefore important to discuss the differences between gFM and rank-one matrix sensing to give us a better understanding of the fundamental barriers in developing provable gFM algorithm. In the rank-one matrix sensing problem, a relaxed setting is to assume that the sensing operator is asymmetric, which is defined by Aasy i (M) = ui⊤Mvi where ui and vi are independent random vectors. Under this setting, the recovery ability of alternating methods is provable [Jain and Dhillon, 2013]. However, existing analyses cannot be generalized to their symmetric counterpart, since ui and vi are not allowed to be dependent in these frameworks. For example, the sensing operator Aasy(·) is unbiased ( EAasy(·) = 0) but the symmetric sensing operator is clearly not [Cai and Zhang, 2015]. Therefore, the asymmetric setting oversimplifies the problem and loses important structure information which is critical to gFM. As for the symmetric rank-one matrix sensing operator, the state-of-the-art estimator is based on the trace norm convex optimization [Tropp, 2014, Chen et al., 2015, Cai and Zhang, 2015], which is computationally expensive. When w∗̸= 0, the gFM has an extra perturbation term X⊤w∗. This first order perturbation term turns out to be a fundamental challenge in theoretical analysis. One might attempt to merge w∗into M ∗in order to convert gFM as a rank (k + 1) matrix sensing problem. For example, one may extend the feature ˆxi ≜[xi, 1]⊤and the matrix ˆ M ∗= [M ∗; w∗⊤] ∈R(d+1)×d. However, after this simple extension, the sensing operator becomes ˆ A(M ∗) = ˆxi⊤ˆ M ∗xi. It is no longer symmetric. The left/right design vector is neither independent nor identical. Especially, not all dimensions of ˆxi are random variables. According to the above discussion, the conditions to guarantee the success of rank-one matrix sensing do not hold after feature extension and all the mentioned analyses cannot be directly applied. 3 One-Pass gFM In this section, we present the proposed algorithm, called One-Pass gFM followed by its theoretical guarantees. We will focus on the intuition of our algorithm. A rigorous theoretical analysis is presented in the next section. The One-Pass gFM is a mini-batch algorithm. In each mini-batch, it processes n training instances and then alternatively updates parameters. The iteration will continue until T mini-batch updates. 3 Algorithm 1 One-Pass gFM Require: The mini-batch size n, number of total mini-batch update T, training instances X = [x1, x2, · · · xnT }, y = [y1, y2, · · · , ynT ]⊤, desired rank k ≥1. Ensure: w(T ), U (T ), V (T ). 1: Define M (t) ≜(U (t)V (t)⊤+ V (t)U (t)⊤)/2 , H(t) 1 ≜ 1 2nA′(y −A(M (t)) −X(t)⊤w(t)) , h(t) 2 ≜1 n1⊤(y −A(M (t)) −X(t)⊤w(t)) , h(t) 3 ≜1 nX(t)(y −A(M (t)) −X(t)⊤w(t)) . 2: Initialize: w(0) = 0, V (0) = 0. U (0) = SVD(H(0) 1 −1 2h(0) 2 I, k), that is, the top-k left singular vectors. 3: for t = 1, 2, · · · , T do 4: Retrieve n training instances X(t) = [x(t−1)n+1, · · · , x(t−1)n+n] . Define A(M) ≜ [X(t) i ⊤MX(t) i ]n i=1. 5: ˆU (t) = (H(t−1) 1 −1 2h(t−1) 2 I + M (t−1)⊤)U (t−1) . 6: Orthogonalize ˆU (t) via QR decomposition: U (t) = QR ˆU (t) . 7: w(t) = h(t−1) 3 + w(t−1) . 8: V (t) = (H(t−1) 1 −1 2h(t−1) 2 I + M (t−1))U (t) 9: end for 10: Output: w(T ), U (T ), V (T ) . Since gFM deals with a non-convex learning problem, the conventional gradient descent framework hardly works to show the global convergence. Instead, our method is based on a construction of an estimation sequence. Intuitively, when w∗= 0, we will show in the next section that 1 nA′A(M) ≈2M + tr(M)I and tr(M) ≈ 1 n1⊤A(M). Since y ≈A(M ∗), we can estimate M ∗via 1 2nA′(y) −1 n1⊤yI. But this simple construction cannot generate a convergent estimation sequence since the perturbation terms in the above approximate equalities cannot be reduced along iterations. To overcome this problem, we replace A(M ∗) with A(M ∗−M (t)) in our construction. Then the perturbation terms will be on order of O(∥M ∗−M (t)∥2). When w∗̸= 0, we can apply a similar trick to construct its estimation sequence via the second and the third order moments of X. Algorithm 1 gives a step-by-step description of our algorithm1. In Algorithm 1, we only need to store w(t) ∈Rd, U (t), V (t) ∈Rd×k. Therefore the space complexity is O(d + kd). The auxiliary variables M (t), H(t) 1 , h(t) 2 , h(t) 3 can be implicitly presented by w(t), U (t), V (t). In each mini-batch updating, we only need matrix-vector product operations which can be efficiently implemented on many computation architectures. We use truncated SVD to initialize gFM, a standard initialization step in matrix sensing. We do not require this step to be computed exactly but up to an accuracy of O(δ) where δ is the RIP constant. The QR step on line 6 requires O(k2d) operations. Compared with SVD which requires O(kd2) operations, the QR step is much more efficient when d ≫k. Algorithm 1 retrieves instances streamingly, a favorable behavior on systems with high speed cache. Finally, we export w(T ), U (T ), V (T ) as our estimation of w∗≈w(T ) and M ∗≈U (T )V (T )⊤. Our main theoretical result is presented in the following theorem, which gives the convergence rate of recovery and sampling complexity of gFM when M ∗is low rank and the noise ξ = 0. Theorem 1. Suppose xi’s are independently sampled from the standard Gaussian distribution. M ∗ is a rank k matrix. The noise ξ = 0. Then with a probability at least 1 −η, there exists a constant C and a constant δ < 1 such that ∥w∗−w(t)∥2 + ∥M ∗−M (t)∥2 ≤δt(∥w∗∥2 + ∥M ∗∥2) provided n ≥C(4 √ 5σ∗ 1/σ∗ k + 3)2k3d/δ2, δ ≤ (4 √ 5σ∗ 1/σ∗ k+3)σ∗ k 4 √ 5σ∗ 1+3σ∗ k+4 √ 5∥w∗∥2 2 . Theorem 1 shows that {w(t), M (t)} will converge to {w∗, M ∗} linearly. The convergence rate is controlled by δ, whose value is on order of O(1/√n). A small δ will result in a fast convergence rate 1Implementation is available from https://minglin-home.github.io/ 4 but a large sampling complexity. To reduce the sampling complexity, a large δ is preferred. The largest allowed δ is bounded by O(1/(∥M ∗∥2 + ∥w∗∥2)). The sampling complexity is O((σ∗ 1/σ∗ k)2k3d). If M ∗is not well conditioned, it is possible to remove (σ∗ 1/σ∗ k)2 in the sampling complexity by a procedure called “soft-deflation” [Jain et al., 2013, Hardt and Wootters, 2014]. By theorem 1, gFM achieves ϵ recovery error after retrieving nT = O(k3d log ((∥w∗∥2 + ∥M ∗∥2)/ϵ)) instances. The noisy case where M ∗is not exactly low rank and ξ > 0 is more intricate therefore we postpone it to Subsection 4.1. The main conclusion is similar to the noise-free case Theorem 1 under a small noise assumption. 4 Theoretical Analysis In this section, we give the sketch of our proof of Theorem 1. Omitted details are postponed to appendix. From high level, our proof constructs an estimation sequence { ew(t), f M (t), ϵt} such that ϵt →0 and ∥w∗−ew(t)∥2 + ∥M ∗−f M (t)∥2 ≤ϵt . In conventional matrix sensing, this construction is possible when the sensing matrix satisfies the Restricted Isometric Property (RIP) [Candès and Recht, 2009]: Definition 2 (ℓ2-norm RIP). A sensing operator A is ℓ2-norm δk-RIP if for any rank k matrix M, (1 −δk)∥M∥2 F ≤1 n∥A(M)∥2 2 ≤(1 + δk)∥M∥2 F . When A is ℓ2-norm δk-RIP for any rank k matrix M, A′A is nearly isometric [Jain et al., 2012], which implies ∥M −A′A(M)/n∥2 ≤δ. Then we can construct our estimation sequence as following: f M (t) = 1 nA′A(M ∗−f M (t−1)) + f M (t−1) , ew(t) = (I −1 nXX⊤)(w∗−ew(t−1)) + ew(t−1) . However, in gFM and symmetric rank-one matrix sensing, the ℓ2-norm RIP condition cannot be satisfied with high probability [Cai and Zhang, 2015]. To establish an RIP-like condition for rank-one matrix sensing, several variants have been proposed, such as the ℓ2/ℓ1-RIP condition [Cai and Zhang, 2015, Chen et al., 2015]. The essential idea of these variants is to replace the ℓ2-norm ∥A(M)∥2 with ℓ1-norm ∥A(M)∥1 then a similar norm inequality can be established for all low rank matrix again. However, even using these ℓ1-norm RIP variants, we are still unable to design an efficient alternating algorithm. All these ℓ1-norm RIP variants have to deal with trace norm programming problems. In fact, it is impossible to construct an estimation sequence based on ℓ1-norm RIP because we require ℓ2-norm bound on A′A during the construction. A key ingredient of our framework is to propose a novel ℓ2-norm RIP condition to overcome the above difficulty. The main technique reason for the failure of conventional ℓ2-norm RIP is that it tries to bound A′A(M) over all rank k matrices. This is too aggressive to be successful in rank-one matrix sensing. Regarding to our estimation sequence, what we really need is to make the RIP hold for current low rank matrix M (t). Once we update our estimation M (t+1), we can regenerate a new sensing operator independent of M (t) to avoid bounding A′A over all rank k matrices. To this end, we propose the Conditionally Independent RIP (CI-RIP) condition. Definition 3 (CI-RIP). A matrix sensing operator A is Conditionally Independent RIP with constant δk, if for a fixed rank k matrix M, A is sampled independently regarding to M and satisfies ∥(I −1 nA′A)M∥2 2 ≤δk . (4) An ℓ2-norm or ℓ1-norm RIP sensing operator is naturally CI-RIP but the reverse is not true. In CI-RIP, A is no longer a fixed but random sensing operator independent of M. In one-pass algorithm, this is achievable if we always retrieve new instances to construct A in one mini-batch updating. Usually Eq. (4) doesn’t hold in a batch method since M (t+1) depends on A(M (t)). An asymmetric rank-one matrix sensing operator is clearly CI-RIP due to the independency between left/right design vectors. But a symmetric rank-one matrix sensing operator is not CI-RIP. In fact it is a biased estimator since E(x⊤Mx) = tr(M) . To this end, we propose a shifted version of CI-RIP for symmetric rank-one matrix sensing operator in the following theorem. This theorem is the key tool in our analysis. 5 Theorem 4 (Shifted CI-RIP). Suppose xi are independent standard random Gaussian vectors, M is a fixed symmetric rank k matrix independent of xi and w is a fixed vector. Then with a probability at least 1 −η, provided n ≥Ck3d/δ2 , ∥1 2nA′A(M) −1 2tr(M)I −M∥2 ≤δ∥M∥2 . Theorem 4 shows that 1 2nA′A(M) is nearly isometric after shifting by its expectation 1 2tr(M)I. The RIP constant δ = O( p k3d/n) . In gFM, we choose M = M ∗−M (t) therefore M is of rank 3k . Under the same settings of Theorem 4, suppose that d ≥C then the following lemmas hold true with a probability at least 1 −η for fixed w and M . Lemma 5. | 1 n1⊤A(M)) −tr(M)| ≤δ∥M∥2 provided n ≥Ck/δ2 . Lemma 6. | 1 n1⊤X⊤w| ≤∥w∥2δ provided n ≥C/δ2 . Lemma 7. ∥1 nA′(X⊤w)∥2 ≤∥w∥2δ provided n ≥Cd/δ2 . Lemma 8. ∥1 nX⊤A(M)∥2 ≤∥M∥2δ provided n ≥Ck2d/δ2 . Lemma 9. ∥I −1 nXX⊤∥2 ≤δ provided n ≥Cd/δ2 . Equipping with the above lemmas, we construct our estimation sequence as following. Lemma 10. Let M (t), H(t) 1 , h(t) 2 , h(t) 3 be defined as in Algorithm 1. Define ϵt = ∥w∗−w(t)∥2 + ∥M ∗−M (t)∥2 . Then with a probability at least 1 −η, provided n ≥Ck3d/δ2 , H(t) 1 =M ∗−M (t) + tr(M ∗−M (t))I + O(δϵt) , h(t) 2 = tr(M ∗−M (t)) + O(δϵt) h(t) 3 =w∗−w(t) + O(δϵt) . Suppose by construction, ϵt →0 when t →∞. Then H(t) 1 −h(t) 2 I +M (t) →M ∗and h(t) 3 +w(t) → w∗and then the proof of Theorem 1 is completed. In the following we only need to show that Lemma 10 constructs an estimation sequence with ϵt = O(δt) →0. To this end, we need a few things from matrix perturbation theory. By Theorem 1, U (t) will converge to U ∗up to column order perturbation. We use the largest canonical angle to measure the subspace distance spanned by U (t) and U ∗, which is denoted as θt = θ(U (t), U ∗). For any matrix U, it is well known [Zhu and Knyazev, 2013] that sin θ(U, U ∗) = ∥U ∗ ⊥ ⊤U∥2, cos θ(U, U ∗) = σk{U ∗⊤U}, tan θ(U, U ∗) = ∥U ∗ ⊥ ⊤U(U ∗⊤U)−1∥2 . The last tangent equality allows us to bound the canonical angle after QR decomposition. Suppose U (t)R = ˆU (t) in the QR step of Algorithm 1, we have tan θ( ˆU (t), U ∗) = ∥U ∗ ⊥ ⊤ˆU (t)(U ∗⊤ˆU (t))−1∥2 = ∥U ∗ ⊥ ⊤U (t)R(U ∗⊤U (t)R)−1∥2 = ∥U ∗ ⊥ ⊤U (t)(U ∗⊤U (t))−1∥2 = tan θ(U (t), U ∗) . Therefore, it is more convenient to measure the subspace distance by tangent function. To show ϵt →0, we recursively define the following variables: αt ≜tan θt, βt ≜∥w∗−w(t)∥2, γt ≜∥M ∗−M (t)∥2, ϵt ≜βt + γt . The following lemma derives the recursive inequalities regarding to {αt, βt, γt} . Lemma 11. Under the same settings of Theorem 1, suppose αt ≤2, δϵt ≤4 √ 5σ∗ k, then αt+1 ≤4 √ 5δσ∗−1 k (βt + γt), βt+1 ≤δ(βt + γt), γt+1 ≤αt+1∥M ∗∥2 + 2δ(βt + γt) . In Lemma 11, when we choose n such that δ = O(1/√n) is small enough, {αt, βt, γt} will converge to zero. The only question is the initial value {α0, β0, γ0}. According to the initialization step of gFM, β0 ≤∥w∗∥2 and γ0 ≤∥M ∗∥2 . To bound α0 , we need the following lemma which directly follows Wely’s and Wedin’s theorems [Stewart and Sun, 1990]. 6 Lemma 12. Denote U and eU as the top-k left singular vectors of M and f M = M +O(ϵ) respectively. The i-th singular value of M is σi. Suppose that ϵ ≤σk−σk+1 4 . Then the largest canonical angle between U and eU, denoted as θ(U, eU), is bounded by sin θ(U, eU) ≤2ϵ/(σk −σk+1) . According to Lemma 12, when 2δ(∥w∗∥2 + ∥M ∗∥2) ≤σ∗ k/4, we have sin θ0 ≤4δ(∥w∗∥2 + ∥M ∗∥2)/σ∗ k. Therefore, α0 ≤2 provided δ ≤σ∗ k/[8(∥w∗∥2 + ∥M ∗∥2)] . Proof of Theorem 1. Suppose that at step t, αt ≤2, δϵt ≤4 √ 5σ∗ k, from Lemma 11, βt+1 + γt+1 ≤βt+1 + αt+1∥M ∗∥2 + 2δ(βt + γt) ≤δϵt + 4 √ 5δσ∗−1 k ϵt∥M ∗∥2 + 2δϵt =(4 √ 5σ∗ 1/σ∗ k + 3)δϵt . Therefore, ϵt = βt + γt ≤[(4 √ 5σ∗ 1/σ∗ k + 3)δ]t(β0 + γ0) αt+1 ≤4 √ 5δσ∗−1 k (βt + γt) ≤4 √ 5δσ∗−1 k [(4 √ 5σ∗ 1/σ∗ k + 3)δ]t(β0 + γ0) . Clearly we need (4 √ 5σ∗ 1/σ∗ k + 3)δ < 1 to ensure convergence, which is guaranteed by δ < σ∗ k 4 √ 5σ∗ 1+3σ∗ k . To ensure the recursive inequality holds for any t, we require αt+1 ≤2, which is guaranteed by 4 √ 5(β0 + γ0)δ/σ∗ k ≤2 ⇔δ ≤ σ∗ k 2 √ 5(σ∗ 1 + β0) . To ensure the condition δϵt ≤4 √ 5σ∗ k, δ ≤4 √ 5σ∗ k/ϵ0 = 4 √ 5σ∗ k/(σ∗ 1 + β0) ⇒δ ≤4 √ 5σ∗ k/ϵt . In summary, when δ ≤min ( σ∗ k 4 √ 5(σ∗ 1 + β0), σ∗ k 4 √ 5σ∗ 1 + 3σ∗ k , σ∗ k 2 √ 5(σ∗ 1 + β0), σ∗ k 8(σ∗ 1 + β0) ) ⇐δ ≤ σ∗ k 4 √ 5σ∗ 1 + 3σ∗ k + 4 √ 5β0 . we have ϵt = [(4 √ 5σ∗ 1/σ∗ k + 3)δ]t(σ∗ 1 + γ0) . To simplify the result, replace δ with δ1 = (4 √ 5σ∗ 1/σ∗ k + 3)δ. The proof is completed. 4.1 Noisy Case In this subsection, we analyze the performance of gFM under noisy setting. Suppose that M ∗is no longer low rank, M ∗= U ∗Λ∗U ∗⊤+ U ∗ ⊥Λ∗ ⊥U ∗ ⊥ ⊤where Λ∗ ⊥= diag(λk+1, · · · , λd) is the residual spectrum. Denote M ∗ k = U ∗Λ∗U ∗⊤to be the best rank k approximation of M ∗and M ∗ ⊥= M ∗−M ∗ k. The additive noise ξi’s are independently sampled from subgaussian with proxy variance ξ. First we generalize the above theorems and lemmas to noisy case. Lemma 13. Suppose that in Eq. (1) xi’s are independent standard random Gaussian vectors. M is a fixed rank k matrix. M ∗ ⊥̸= 0 and ξ > 0. Then provided n ≥Ck3d/δ2, with a probability at least 1 −η, ∥1 2nA′A(M ∗−M) −1 2tr(M ∗ k −M)I −(M ∗ k −M)∥2 ≤δ∥M ∗ k −M∥2 + Cσ∗ k+1d2/√n (5) | 1 n1⊤A(M ∗−M) −tr(M ∗ k −M)| ≤δ∥M ∗ k −M∥2 + Cσ∗ k+1d2/√n (6) ∥1 nX⊤A(M ∗−M)∥2 ≤δ∥M ∗ k −M∥2 + Cσ∗ k+1d2/√n (7) ∥1 nA′(X⊤w)∥2 ≤δ∥w∥2, ∥1 n1⊤X⊤w∥2 ≤δ∥w∥2 . (8) 7 Define γt = ∥M ∗ k −M (t)∥2 similar to the noise-free case. According to Lemma 13, when ξ = 0, for n ≥Ck3d/δ2, H(t) 1 =M ∗ k −M (t) + 1 2tr(M ∗ k −M (t))I + O(δϵt + Cσ∗ k+1d2/√n) h(t) 2 =tr(M ∗−M (t)) + O(δϵt + Cσ∗ k+1d2/√n) h(t) 3 =w∗−w(t) + O(δϵt + Cσ∗ k+1d2/√n) . Define r = Cσ∗ k+1d2/√n. If ξ > 0, it is easy to check that the perturbation becomes ˆr = r + O(ξ/√n) . Therefore we uniformly use r to present the perturbation term. The recursive inequalities regarding to the recovery error is constructed in Lemma 14. Lemma 14. Under the same settings of Lemma 13, define ρ ≜2σ∗ k+1/(σ∗ k + σ∗ k+1). Suppose that at any step i, 0 ≤i ≤t , αi ≤2 . When provided 4 √ 5(δϵt + r) ≤σ∗ k −σ∗ k+1, αt+1 ≤ραt + 4 √ 5 σ∗ k + σ∗ k+1 δϵt + 4 √ 5 σ∗ k + σ∗ k+1 r , βt+1 ≤δϵt + r , γt+1 ≤αt+1∥M ∗∥2 + 2δϵt + 2r . The solution to the recursive inequalities in Lemma 14 is non-trivial. Comparing to the inequalities in Lemma 11, αt+1 is bounded by αt in noisy case. Therefore, if we simply follow Lemma 11 to construct recursive inequality about ϵt , we will quickly be overloaded by recursive expansion terms. The key construction of our solution is to bound the term αt + 8 √ 5/(σ∗ k + σ∗ k+1)δϵt . The solution is given in the following theorem. Theorem 15. Define constants c =4 √ 5/(σ∗ k + σ∗ k+1) , b = 3 + 4 √ 5σ∗ 1/(σ∗ k + σ∗ k+1) , q = (1 + ρ)/2 . Then for any t ≥0, αt + 2cδϵt ≤qt 2 −(1 + ρ)cr 1 −q + (1 + ρ)cr 1 −q . (9) provided δ ≤min{ 1 −ρ 4ρσ∗ 1c, ρ 2b} , (2 + c(σ∗ k −σ∗ k+1))δϵ0 + r ≤(σ∗ k −σ∗ k+1) (10) 4 √ 5 4 + 2c(σ∗ k −σ∗ k+1) δϵ0 + 4 √ 5 4 + (σ∗ k −σ∗ k+1) r ≤(σ∗ k −σ∗ k+1)2 . Theorem 15 gives the convergence rate of gFM under noisy settings. We bound αt + 2cδϵt as the index of recovery error, whose convergence rate is linear. The convergence rate is controlled by q, a constant depends on the eigen gap σ∗ k+1/σ∗ k . The final recovery error is bounded by O(r/(1 −q)) . Eq. (10) is the small noise condition to ensure the noisy recovery is possible. Generally speaking, learning a d × d matrix with O(d) samples is an ill-conditioned problem when the target matrix is full rank. The small noise condition given by Eq. (10) essentially says that M ∗can be slightly deviated from low rank manifold and the noise shouldn’t be too large to blur the spectrum of M ∗. When the noise is large, Eq. (10) will be satisfied with n = O(d2) which is the information-theoretical lower bound for recovering a full rank matrix. 5 Conclusion In this paper, we propose a provable efficient algorithm to solve generalized Factorization Machine (gFM) and rank-one matrix sensing. Our method is based on an one-pass alternating updating framework. The proposed algorithm is able to learn gFM within O(kd) memory on steaming data, has linear convergence rate and only requires matrix-vector product implementation. The algorithm takes no more than O(k3d log (1/ϵ)) instances to achieve O(ϵ) recovery error. Acknowledgments This work was supported in part by research grants from NIH (RF1AG051710) and NSF (III-1421057 and III-1421100). 8 References Mathieu Blondel, Masakazu Ishihata, Akinori Fujino, and Naonori Ueda. Polynomial Networks and Factorization Machines: New Insights and Efficient Training Algorithms. pages 850–858, 2016. T. Tony Cai and Anru Zhang. ROP: Matrix recovery via rank-one projections. The Annals of Statistics, 43(1): 102–138, 2015. Emmanuel J Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. Emmanuel J. Candes, Yonina Eldar, Thomas Strohmer, and Vlad Voroninski. Phase Retrieval via Matrix Completion. arXiv:1109.0573, 2011. Yuxin Chen, Yuejie Chi, and Andrea J. Goldsmith. Exact and stable covariance estimation from quadratic sampling via convex programming. Information Theory, IEEE Transactions on, 61(7):4034–4059, 2015. Mark A. Davenport and Justin Romberg. An overview of low-rank matrix recovery from incomplete observations. arXiv:1601.06422, 2016. Moritz Hardt. Understanding Alternating Minimization for Matrix Completion. arXiv:1312.0925, 2013. Moritz Hardt and Eric Price. The Noisy Power Method: A Meta Algorithm with Applications. arXiv:1311.2495, 2013. Moritz Hardt and Mary Wootters. Fast matrix completion without the condition number. arXiv:1407.4070, 2014. Liangjie Hong, Aziz S. Doumith, and Brian D. Davison. Co-factorization Machines: Modeling User Interests and Predicting Individual Decisions in Twitter. In WSDM, pages 557–566, 2013. Prateek Jain and Inderjit S. Dhillon. Provable inductive matrix completion. arXiv:1306.0626, 2013. Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank Matrix Completion using Alternating Minimization. arXiv:1212.0467, 2012. Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank Matrix Completion Using Alternating Minimization. In STOC, pages 665–674, 2013. V. Koltchinskii. Oracle Inequalities in Empirical Risk Minimization and Sparse Recovery Problems, volume 2033. Springer, 2011. Richard Kueng, Holger Rauhut, and Ulrich Terstiege. Low rank matrix recovery from rank one measurements. arXiv:1410.6913, 2014. Kiryung Lee, Yihong Wu, and Yoram Bresler. Near Optimal Compressed Sensing of Sparse Rank-One Matrices via Sparse Power Factorization. arXiv:1312.0525, 2013. Praneeth Netrapalli, Prateek Jain, and Sujay Sanghavi. Phase Retrieval using Alternating Minimization. arXiv:1306.0160, 2013. Steffen Rendle. Factorization machines. In ICDM, pages 995–1000, 2010. Steffen Rendle, Zeno Gantner, Christoph Freudenthaler, and Lars Schmidt-Thieme. Fast Context-aware Recommendations with Factorization Machines. In SIGIR, pages 635–644, 2011. G. W. Stewart and Ji-guang Sun. Matrix Perturbation Theory. Academic Press, 1990. Joel A. Tropp. Convex recovery of a structured signal from independent random linear measurements. arXiv:1405.1102, 2014. Joel A. Tropp. An Introduction to Matrix Concentration Inequalities. arXiv:1501.01571, 2015. Tuo Zhao, Zhaoran Wang, and Han Liu. Nonconvex Low Rank Matrix Factorization via Inexact First Order Oracle. 2015a. Tuo Zhao, Zhaoran Wang, and Han Liu. A Nonconvex Optimization Framework for Low Rank Matrix Estimation. In NIPS, pages 559–567, 2015b. Kai Zhong, Prateek Jain, and Inderjit S. Dhillon. Efficient matrix sensing using rank-1 gaussian measurements. In Algorithmic Learning Theory, pages 3–18, 2015. Peizhen Zhu and Andrew V. Knyazev. Angles between subspaces and their tangents. Journal of Numerical Mathematics, 21(4), 2013. 9 | 2016 | 28 |
6,194 | Composing graphical models with neural networks for structured representations and fast inference Matthew James Johnson Harvard University mattjj@seas.harvard.edu David Duvenaud Harvard University dduvenaud@seas.harvard.edu Alexander B. Wiltschko Harvard University, Twitter awiltsch@fas.harvard.edu Sandeep R. Datta Harvard Medical School srdatta@hms.harvard.edu Ryan P. Adams Harvard University, Twitter rpa@seas.harvard.edu Abstract We propose a general modeling and inference framework that combines the complementary strengths of probabilistic graphical models and deep learning methods. Our model family composes latent graphical models with neural network observation likelihoods. For inference, we use recognition networks to produce local evidence potentials, then combine them with the model distribution using efficient message-passing algorithms. All components are trained simultaneously with a single stochastic variational inference objective. We illustrate this framework by automatically segmenting and categorizing mouse behavior from raw depth video, and demonstrate several other example models. 1 Introduction Modeling often has two goals: first, to learn a flexible representation of complex high-dimensional data, such as images or speech recordings, and second, to find structure that is interpretable and generalizes to new tasks. Probabilistic graphical models [1, 2] provide many tools to build structured representations, but often make rigid assumptions and may require significant feature engineering. Alternatively, deep learning methods allow flexible data representations to be learned automatically, but may not directly encode interpretable or tractable probabilistic structure. Here we develop a general modeling and inference framework that combines these complementary strengths. Consider learning a generative model for video of a mouse. Learning interpretable representations for such data, and comparing them as the animal’s genes are edited or its brain chemistry altered, gives useful behavioral phenotyping tools for neuroscience and for high-throughput drug discovery [3]. Even though each image is encoded by hundreds of pixels, the data lie near a low-dimensional nonlinear manifold. A useful generative model must not only learn this manifold but also provide an interpretable representation of the mouse’s behavioral dynamics. A natural representation from ethology [3] is that the mouse’s behavior is divided into brief, reused actions, such as darts, rears, and grooming bouts. Therefore an appropriate model might switch between discrete states, with each state representing the dynamics of a particular action. These two learning tasks — identifying an image manifold and a structured dynamics model — are complementary: we want to learn the image manifold in terms of coordinates in which the structured dynamics fit well. A similar challenge arises in speech [4], where high-dimensional spectrographic data lie near a low-dimensional manifold because they are generated by a physical system with relatively few degrees of freedom [5] but also include the discrete latent dynamical structure of phonemes, words, and grammar [6]. To address these challenges, we propose a new framework to design and learn models that couple nonlinear likelihoods with structured latent variable representations. Our approach uses graphical models for representing structured probability distributions while enabling fast exact inference subroutines, and uses ideas from variational autoencoders [7, 8] for learning not only the nonlinear 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. (a) Data (b) GMM (c) Density net (VAE) (d) GMM SVAE Figure 1: Comparison of generative models fit to spiral cluster data. See Section 2.1. feature manifold but also bottom-up recognition networks to improve inference. Thus our method enables the combination of flexible deep learning feature models with structured Bayesian (and even nonparametric [9]) priors. Our approach yields a single variational inference objective in which all components of the model are learned simultaneously. Furthermore, we develop a scalable fitting algorithm that combines several advances in efficient inference, including stochastic variational inference [10], graphical model message passing [1], and backpropagation with the reparameterization trick [7]. Thus our algorithm can leverage conjugate exponential family structure where it exists to efficiently compute natural gradients with respect to some variational parameters, enabling effective second-order optimization [11], while using backpropagation to compute gradients with respect to all other parameters. We refer to our general approach as the structured variational autoencoder (SVAE). 2 Latent graphical models with neural net observations In this paper we propose a broad family of models. Here we develop three specific examples. 2.1 Warped mixtures for arbitrary cluster shapes One particularly natural structure used frequently in graphical models is the discrete mixture model. By fitting a discrete mixture model to data, we can discover natural clusters or units. These discrete structures are difficult to represent directly in neural network models. Consider the problem of modeling the data y = {yn}N n=1 shown in Fig. 1a. A standard approach to finding the clusters in data is to fit a Gaussian mixture model (GMM) with a conjugate prior: π ∼Dir(α), (µk, Σk) iid ∼NIW(λ), zn | π iid ∼π yn | zn, {(µk, Σk)}K k=1 iid ∼N(µzn, Σzn). However, the fit GMM does not represent the natural clustering of the data (Fig. 1b). Its inflexible Gaussian observation model limits its ability to parsimoniously fit the data and their natural semantics. Instead of using a GMM, a more flexible alternative would be a neural network density model: γ ∼p(γ) xn iid ∼N(0, I), yn | xn, γ iid ∼N(µ(xn; γ), Σ(xn; γ)), (1) where µ(xn; γ) and Σ(xn; γ) depend on xn through some smooth parametric function, such as multilayer perceptron (MLP), and where p(γ) is a Gaussian prior [12]. This model fits the data density well (Fig. 1c) but does not explicitly represent discrete mixture components, which might provide insights into the data or natural units for generalization. See Fig. 2a for a graphical model. By composing a latent GMM with nonlinear observations, we can combine the modeling strengths of both [13], learning both discrete clusters along with non-Gaussian cluster shapes: π ∼Dir(α), (µk, Σk) iid ∼NIW(λ), γ ∼p(γ) zn | π iid ∼π xn iid ∼N(µ(zn), Σ(zn)), yn | xn, γ iid ∼N(µ(xn; γ), Σ(xn; γ)). This combination of flexibility and structure is shown in Fig. 1d. See Fig. 2b for a graphical model. 2.2 Latent linear dynamical systems for modeling video Now we consider a harder problem: generatively modeling video. Since a video is a sequence of image frames, a natural place to start is with a model for images. Kingma et al. [7] shows that the 2 yn γ xn (a) Latent Gaussian xn yn zn ✓ γ (b) Latent GMM ✓ γ x1 x2 x3 x4 y1 y2 y3 y4 (c) Latent LDS z1 z2 z3 z4 x1 x2 x3 x4 y1 y2 y3 y4 ✓ γ (d) Latent SLDS Figure 2: Generative graphical models discussed in Section 2. density network of Eq. (1) can accurately represent a dataset of high-dimensional images {yn}N n=1 in terms of the low-dimensional latent variables {xn}N n=1, each with independent Gaussian distributions. To extend this image model into a model for videos, we can introduce dependence through time between the latent Gaussian samples {xn}N n=1. For instance, we can make each latent variable xn+1 depend on the previous latent variable xn through a Gaussian linear dynamical system, writing xn+1 = Axn + Bun, un iid ∼N(0, I), A, B ∈Rm×m, where the matrices A and B have a conjugate prior. This model has low-dimensional latent states and dynamics as well as a rich nonlinear generative model of images. In addition, the timescales of the dynamics are represented directly in the eigenvalue spectrum of A, providing both interpretability and a natural way to encode prior information. See Fig. 2c for a graphical model. 2.3 Latent switching linear dynamical systems for parsing behavior from video As a final example that combines both time series structure and discrete latent units, consider again the behavioral phenotyping problem described in Section 1. Drawing on graphical modeling tools, we can construct a latent switching linear dynamical system (SLDS) [14] to represent the data in terms of continuous latent states that evolve according to a discrete library of linear dynamics, and drawing on deep learning methods we can generate video frames with a neural network image model. At each time n ∈{1, 2, . . . , N} there is a discrete-valued latent state zn ∈{1, 2, . . . , K} that evolves according to Markovian dynamics. The discrete state indexes a set of linear dynamical parameters, and the continuous-valued latent state xn ∈Rm evolves according to the corresponding dynamics, zn+1 | zn, π ∼πzn, xn+1 = Aznxn + Bznun, un iid ∼N(0, I), where π = {πk}K k=1 denotes the Markov transition matrix and πk ∈RK + is its kth row. We use the same neural net observation model as in Section 2.2. This SLDS model combines both continuous and discrete latent variables with rich nonlinear observations. See Fig. 2d for a graphical model. 3 Structured mean field inference and recognition networks Why aren’t such rich hybrid models used more frequently? The main difficulty with combining rich latent variable structure and flexible likelihoods is inference. The most efficient inference algorithms used in graphical models, like structured mean field and message passing, depend on conjugate exponential family likelihoods to preserve tractable structure. When the observations are more general, like neural network models, inference must either fall back to general algorithms that do not exploit the model structure or else rely on bespoke algorithms developed for one model at a time. In this section, we review inference ideas from conjugate exponential family probabilistic graphical models and variational autoencoders, which we combine and generalize in the next section. 3.1 Inference in graphical models with conjugacy structure Graphical models and exponential families provide many algorithmic tools for efficient inference [15]. Given an exponential family latent variable model, when the observation model is a conjugate exponential family, the conditional distributions stay in the same exponential families as in the prior and hence allow for the same efficient inference algorithms. 3 yn γ xn (a) VAE xn yn zn ✓ γ (b) GMM SVAE ✓ γ x1 x2 x3 x4 y1 y2 y3 y4 (c) LDS SVAE z1 z2 z3 z4 x1 x2 x3 x4 y1 y2 y3 y4 ✓ γ (d) SLDS SVAE Figure 3: Variational families and recognition networks for the VAE [7] and three SVAE examples. For example, consider learning a Gaussian linear dynamical system model with linear Gaussian observations. The generative model for latent states x = {xn}N n=1 and observations y = {yn}N n=1 is xn = Axn−1 + Bun−1, un iid ∼N(0, I), yn = Cxn + Dvn, vn iid ∼N(0, I), given parameters θ = (A, B, C, D) with a conjugate prior p(θ). To approximate the posterior p(θ, x | y), consider the mean field family q(θ)q(x) and the variational inference objective L[ q(θ)q(x) ] = Eq(θ)q(x) log p(θ)p(x | θ)p(y | x, θ) q(θ)q(x) , (2) where we can optimize the variational family q(θ)q(x) to approximate the posterior p(θ, x | y) by maximizing Eq. (2). Because the observation model p(y | x, θ) is conjugate to the latent variable model p(x | θ), for any fixed q(θ) the optimal factor q∗(x) ≜arg maxq(x) L[ q(θ)q(x) ] is itself a Gaussian linear dynamical system with parameters that are simple functions of the expected statistics of q(θ) and the data y. As a result, for fixed q(θ) we can easily compute q∗(x) and use message passing algorithms to perform exact inference in it. However, when the observation model is not conjugate to the latent variable model, these algorithmically exploitable structures break down. 3.2 Recognition networks in variational autoencoders The variational autoencoder (VAE) [7] handles general non-conjugate observation models by introducing recognition networks. For example, when a Gaussian latent variable model p(x) is paired with a general nonlinear observation model p(y | x, γ), the posterior p(x | y, γ) is non-Gaussian, and it is difficult to compute an optimal Gaussian approximation. The VAE instead learns to directly output a suboptimal Gaussian factor q(x | y) by fitting a parametric map from data y to a mean and covariance, µ(y; φ) and Σ(y; φ), such as an MLP with parameters φ. By optimizing over φ, the VAE effectively learns how to condition on non-conjugate observations y and produce a good approximating factor. 4 Structured variational autoencoders We can combine the tractability of conjugate graphical model inference with the flexibility of variational autoencoders. The main idea is to use a conditional random field (CRF) variational family. We learn recognition networks that output conjugate graphical model potentials instead of outputting the complete variational distribution’s parameters directly. These potentials are then used in graphical model inference algorithms in place of the non-conjugate observation likelihoods. The SVAE algorithm computes stochastic gradients of a mean field variational inference objective. It can be viewed as a generalization both of the natural gradient SVI algorithm for conditionally conjugate models [10] and of the AEVB algorithm for variational autoencoders [7]. Intuitively, it proceeds by sampling a data minibatch, applying the recognition model to compute graphical model potentials, and using graphical model inference algorithms to compute the variational factor, combining the evidence from the potentials with the prior structure in the model. This variational factor is then used to compute gradients of the mean field objective. See Fig. 3 for graphical models of the variational families with recognition networks for the models developed in Section 2. In this section, we outline the SVAE model class more formally, write the mean field variational inference objective, and show how to efficiently compute unbiased stochastic estimates of its gradients. The resulting algorithm for computing gradients of the mean field objective, shown in Algorithm 1, is 4 Algorithm 1 Estimate SVAE lower bound and its gradients Input: Variational parameters (ηθ, ηγ, φ), data sample y function SVAEGRADIENTS(ηθ, ηγ, φ, y) ψ ←r(yn; φ) ▷Get evidence potentials (ˆx, ¯tx, KLlocal) ←PGMINFERENCE(ηθ, ψ) ▷Combine evidence with prior ˆγ ∼q(γ) ▷Sample observation parameters L ←N log p(y | ˆx, ˆγ) −N KLlocal −KL(q(θ)q(γ)∥p(θ)p(γ)) ▷Estimate variational bound e∇ηθL ←η0 θ −ηθ + N(¯tx, 1) + N(∇ηx log p(y | ˆx, ˆγ), 0) ▷Compute natural gradient return lower bound L, natural gradient e∇ηθL, gradients ∇ηγ,φL function PGMINFERENCE(ηθ, ψ) q∗(x) ←OPTIMIZELOCALFACTORS(ηθ, ψ) ▷Fast message-passing inference return sample ˆx ∼q∗(x), statistics Eq∗(x)tx(x), divergence Eq(θ) KL(q∗(x)∥p(x | θ)) simple and efficient and can be readily applied to a variety of learning problems and graphical model structures. See the supplementals for details and proofs. 4.1 SVAE model class To set up notation for a general SVAE, we first define a conjugate pair of exponential family densities on global latent variables θ and local latent variables x = {xn}N n=1. Let p(x | θ) be an exponential family and let p(θ) be its corresponding natural exponential family conjugate prior, writing p(θ) = exp ⟨η0 θ, tθ(θ)⟩−log Zθ(η0 θ) , p(x | θ) = exp ⟨η0 x(θ), tx(x)⟩−log Zx(η0 x(θ)) = exp {⟨tθ(θ), (tx(x), 1)⟩} , where we used exponential family conjugacy to write tθ(θ) = η0 x(θ), −log Zx(η0 x(θ)) . The local latent variables x could have additional structure, like including both discrete and continuous latent variables or tractable graph structure, but here we keep the notation simple. Next, we define a general likelihood function. Let p(y | x, γ) be a general family of densities and let p(γ) be an exponential family prior on its parameters. For example, each observation yn may depend on the latent value xn through an MLP, as in the density network model of Section 2. This generic non-conjugate observation model provides modeling flexibility, yet the SVAE can still leverage conjugate exponential family structure in inference, as we show next. 4.2 Stochastic variational inference algorithm Though the general observation model p(y | x, γ) means that conjugate updates and natural gradient SVI [10] cannot be directly applied, we show that by generalizing the recognition network idea we can still approximately optimize out the local variational factors leveraging conjugacy structure. For fixed y, consider the mean field family q(θ)q(γ)q(x) and the variational inference objective L[ q(θ)q(γ)q(x) ] ≜Eq(θ)q(γ)q(x) log p(θ)p(γ)p(x | θ)p(y | x, γ) q(θ)q(γ)q(x) . (3) Without loss of generality we can take the global factor q(θ) to be in the same exponential family as the prior p(θ), and we denote its natural parameters by ηθ. We restrict q(γ) to be in the same exponential family as p(γ) with natural parameters ηγ. Finally, we restrict q(x) to be in the same exponential family as p(x | θ), writing its natural parameter as ηx. Using these explicit variational parameters, we write the mean field variational inference objective in Eq. (3) as L(ηθ, ηγ, ηx). To perform efficient optimization of the objective L(ηθ, ηγ, ηx), we consider choosing the variational parameter ηx as a function of the other parameters ηθ and ηγ. One natural choice is to set ηx to be a local partial optimizer of L. However, without conjugacy structure finding a local partial optimizer may be computationally expensive for general densities p(y | x, γ), and in the large data setting this expensive optimization would have to be performed for each stochastic gradient update. Instead, we choose ηx by optimizing over a surrogate objective bL with conjugacy structure, given by bL(ηθ, ηx, φ) ≜Eq(θ)q(x) log p(θ)p(x | θ) exp{ψ(x; y, φ)} q(θ)q(x) , ψ(x; y, φ) ≜⟨r(y; φ), tx(x)⟩, 5 where {r(y; φ)}φ∈Rm is some parameterized class of functions that serves as the recognition model. Note that the potentials ψ(x; y, φ) have a form conjugate to the exponential family p(x | θ). We define η∗ x(ηθ, φ) to be a local partial optimizer of bL along with the corresponding factor q∗(x), η∗ x(ηθ, φ) ≜arg min ηx bL(ηθ, ηx, φ), q∗(x) = exp {⟨η∗ x(ηθ, φ), tx(x)⟩−log Zx(η∗ x(ηθ, φ))} . As with the variational autoencoder of Section 3.2, the resulting variational factor q∗(x) is suboptimal for the variational objective L. However, because the surrogate objective has the same form as a variational inference objective for a conjugate observation model, the factor q∗(x) not only is easy to compute but also inherits exponential family and graphical model structure for tractable inference. Given this choice of η∗ x(ηθ, φ), the SVAE objective is LSVAE(ηθ, ηγ, φ) ≜L(ηθ, ηγ, η∗ x(ηθ, φ)). This objective is a lower bound for the variational inference objective Eq. (3) in the following sense. Proposition 4.1 (The SVAE objective lower-bounds the mean field objective) The SVAE objective function LSVAE lower-bounds the mean field objective L in the sense that max q(x) L[ q(θ)q(γ)q(x) ] ≥max ηx L(ηθ, ηγ, ηx) ≥LSVAE(ηθ, ηγ, φ) ∀φ ∈Rm, for any parameterized function class {r(y; φ)}φ∈Rm. Furthermore, if there is some φ∗∈Rm such that ψ(x; y, φ∗) = Eq(γ) log p(y | x, γ), then the bound can be made tight in the sense that max q(x) L[ q(θ)q(γ)q(x) ] = max ηx L(ηθ, ηγ, ηx) = max φ LSVAE(ηθ, ηγ, φ). Thus by using gradient-based optimization to maximize LSVAE(ηθ, ηγ, φ) we are maximizing a lower bound on the model log evidence log p(y). In particular, by optimizing over φ we are effectively learning how to condition on observations so as to best approximate the posterior while maintaining conjugacy structure. Furthermore, to provide the best lower bound we may choose the recognition model function class {r(y; φ)}φ∈Rm to be as rich as possible. Choosing η∗ x(ηθ, φ) to be a local partial optimizer of bL provides two computational advantages. First, it allows η∗ x(ηθ, φ) and expectations with respect to q∗(x) to be computed efficiently by exploiting exponential family graphical model structure. Second, it provides a simple expression for an unbiased estimate of the natural gradient with respect to the latent model parameters, as we summarize next. Proposition 4.2 (Natural gradient of the SVAE objective) The natural gradient of the SVAE objective LSVAE with respect to ηθ is e∇ηθLSVAE(ηθ, ηγ, φ) = η0 θ + Eq∗(x) [(tx(x), 1)] −ηθ + (∇ηxL(ηθ, ηγ, η∗ x(ηθ, φ)), 0). (4) Note that the first term in Eq. (4) is the same as the expression for the natural gradient in SVI for conjugate models [10], while a stochastic estimate of the second term is computed automatically as part of the backward pass for computing the gradients with respect to the other parameters, as described next. Thus we have an expression for the natural gradient with respect to the latent model’s parameters that is almost as simple as the one for conjugate models and just as easy to compute. Natural gradients are invariant to smooth invertible reparameterizations of the variational family [16, 17] and provide effective second-order optimization updates [18, 11]. The gradients of the objective with respect to the other variational parameters, namely ∇ηγLSVAE(ηθ, ηγ, φ) and ∇φLSVAE(ηθ, ηγ, φ), can be computed using the reparameterization trick. To isolate the terms that require the reparameterization trick, we rearrange the objective as LSVAE(ηθ, ηγ, φ) = Eq(γ)q∗(x) log p(y | x, γ) −KL(q(θ)q∗(x) ∥p(θ, x)) −KL(q(γ) ∥p(γ)). The KL divergence terms are between members of the same tractable exponential families. An unbiased estimate of the first term can be computed by sampling ˆx ∼q∗(x) and ˆγ ∼q(γ) and computing ∇ηγ,φ log p(y | ˆx, ˆγ) with automatic differentiation. Note that the second term in Eq. (4) is automatically computed as part of the chain rule in computing ∇φ log p(y | ˆx, ˆγ). 5 Related work In addition to the papers already referenced, there are several recent papers to which this work is related. The two papers closest to this work are Krishnan et al. [19] and Archer et al. [20]. 6 (a) Predictions after 200 training steps. (b) Predictions after 1100 training steps. Figure 4: Predictions from an LDS SVAE fit to 1D dot image data at two stages of training. The top panel shows an example sequence with time on the horizontal axis. The middle panel shows the noiseless predictions given data up to the vertical line, while the bottom panel shows the latent states. 0 1000 2000 3000 4000 iteration −15 −10 −5 0 5 10 −L (a) Natural (blue) and standard (orange) gradient updates. (b) Subspace of learned observation model. Figure 5: Experimental results from LDS SVAE models on synthetic data and real mouse data. In Krishnan et al. [19] the authors consider combining variational autoencoders with continuous state-space models, emphasizing the relationship to linear dynamical systems (also called Kalman filter models). They primarily focus on nonlinear dynamics and an RNN-based variational family, as well as allowing control inputs. However, the approach does not extend to general graphical models or discrete latent variables. It also does not leverage natural gradients or exact inference subroutines. In Archer et al. [20] the authors also consider the problem of variational inference in general continuous state space models but focus on using a structured Gaussian variational family without considering parameter learning. As with Krishnan et al. [19], this approach does not include discrete latent variables (or any latent variables other than the continuous states). However, the method they develop could be used with an SVAE to handle inference with nonlinear dynamics. In addition, both Gregor et al. [21] and Chung et al. [22] extend the variational autoencoder framework to sequential models, though they focus on RNNs rather than probabilistic graphical models. 6 Experiments We apply the SVAE to both synthetic and real data and demonstrate its ability to learn feature representations and latent structure. Code is available at github.com/mattjj/svae. 6.1 LDS SVAE for modeling synthetic data Consider a sequence of 1D images representing a dot bouncing from one side of the image to the other, as shown at the top of Fig. 4. We use an LDS SVAE to find a low-dimensional latent state space representation along with a nonlinear image model. The model is able to represent the image accurately and to make long-term predictions with uncertainty. See supplementals for details. This experiment also demonstrates the optimization advantages that can be provided by the natural gradient updates. In Fig. 5a we compare natural gradient updates with standard gradient updates at three different learning rates. The natural gradient algorithm not only learns much faster but also is less dependent on parameterization details: while the natural gradient update used an untuned 7 Figure 6: Predictions from an LDS SVAE fit to depth video. In each panel, the top is a sampled prediction and the bottom is real data. The model is conditioned on observations to the left of the line. (a) Extension into running (b) Fall from rear Figure 7: Examples of behavior states inferred from depth video. Each frame sequence is padded on both sides, with a square in the lower-right of a frame depicting when the state is the most probable. stepsize of 0.1, the standard gradient dynamics at step sizes of both 0.1 and 0.05 resulted in some matrix parameters to be updated to indefinite values. 6.2 LDS SVAE for modeling video We also apply an LDS SVAE to model depth video recordings of mouse behavior. We use the dataset from Wiltschko et al. [3] in which a mouse is recorded from above using a Microsoft Kinect. We used a subset consisting of 8 recordings, each of a distinct mouse, 20 minutes long at 30 frames per second, for a total of 288000 video fames downsampled to 30 × 30 pixels. We use MLP observation and recognition models with two hidden layers of 200 units each and a 10D latent space. Fig. 5b shows images corresponding to a regular grid on a random 2D subspace of the latent space, illustrating that the learned image manifold accurately captures smooth variation in the mouse’s body pose. Fig. 6 shows predictions from the model paired with real data. 6.3 SLDS SVAE for parsing behavior Finally, because the LDS SVAE can accurately represent the depth video over short timescales, we apply the latent switching linear dynamical system (SLDS) model to discover the natural units of behavior. Fig. 7 shows some of the discrete states that arise from fitting an SLDS SVAE with 30 discrete states to the depth video data. The discrete states that emerge show a natural clustering of short-timescale patterns into behavioral units. See the supplementals for more. 7 Conclusion Structured variational autoencoders provide a general framework that combines some of the strengths of probabilistic graphical models and deep learning methods. In particular, they use graphical models both to give models rich latent representations and to enable fast variational inference with CRF structured approximating distributions. To complement these structured representations, SVAEs use neural networks to produce not only flexible nonlinear observation models but also fast recognition networks that map observations to conjugate graphical model potentials. 8 References [1] Daphne Koller and Nir Friedman. Probabilistic graphical models: principles and techniques. MIT Press, 2009. [2] Kevin P Murphy. Machine Learning: a Probabilistic Perspective. MIT Press, 2012. [3] Alexander B. Wiltschko, Matthew J. Johnson, Giuliano Iurilli, Ralph E. Peterson, Jesse M. Katon, Stan L. Pashkovski, Victoria E. Abraira, Ryan P. Adams, and Sandeep Robert Datta. “Mapping Sub-Second Structure in Mouse Behavior”. In: Neuron 88.6 (2015), pp. 1121–1135. [4] 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”. In: Signal Processing Magazine, IEEE 29.6 (2012), pp. 82–97. [5] Li Deng. “Computational models for speech production”. In: Computational Models of Speech Pattern Processing. Springer, 1999, pp. 199–213. [6] Li Deng. “Switching dynamic system models for speech articulation and acoustics”. In: Mathematical Foundations of Speech and Language Processing. Springer, 2004, pp. 115–133. [7] Diederik P. Kingma and Max Welling. “Auto-Encoding Variational Bayes”. In: International Conference on Learning Representations (2014). [8] Danilo J Rezende, Shakir Mohamed, and Daan Wierstra. “Stochastic Backpropagation and Approximate Inference in Deep Generative Models”. In: Proceedings of the 31st International Conference on Machine Learning. 2014, pp. 1278–1286. [9] Matthew J. Johnson and Alan S. Willsky. “Stochastic Variational Inference for Bayesian Time Series Models”. In: International Conference on Machine Learning. 2014. [10] Matthew D. Hoffman, David M. Blei, Chong Wang, and John Paisley. “Stochastic variational inference”. In: Journal of Machine Learning Research (2013). [11] James Martens. “New insights and perspectives on the natural gradient method”. In: arXiv preprint arXiv:1412.1193 (2015). [12] David J.C. MacKay and Mark N. Gibbs. “Density networks”. In: Statistics and neural networks: advances at the interface. Oxford University Press, Oxford (1999), pp. 129–144. [13] Tomoharu Iwata, David Duvenaud, and Zoubin Ghahramani. “Warped Mixtures for Nonparametric Cluster Shapes”. In: 29th Conference on Uncertainty in Artificial Intelligence. 2013, pp. 311–319. [14] E.B. Fox, E.B. Sudderth, M.I. Jordan, and A.S. Willsky. “Bayesian Nonparametric Inference of Switching Dynamic Linear Models”. In: IEEE Transactions on Signal Processing 59.4 (2011). [15] Martin J. Wainwright and Michael I. Jordan. “Graphical Models, Exponential Families, and Variational Inference”. In: Foundations and Trends in Machine Learning (2008). [16] Shun-Ichi Amari. “Natural gradient works efficiently in learning”. In: Neural computation 10.2 (1998), pp. 251–276. [17] Shun-ichi Amari and Hiroshi Nagaoka. Methods of Information Geometry. American Mathematical Society, 2007. [18] James Martens and Roger Grosse. “Optimizing Neural Networks with Kronecker-factored Approximate Curvature”. In: arXiv preprint arXiv:1503.05671 (2015). [19] Rahul G Krishnan, Uri Shalit, and David Sontag. “Deep Kalman Filters”. In: arXiv preprint arXiv:1511.05121 (2015). [20] Evan Archer, Il Memming Park, Lars Buesing, John Cunningham, and Liam Paninski. “Black box variational inference for state space models”. In: arXiv preprint arXiv:1511.07367 (2015). [21] Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. “DRAW: A recurrent neural network for image generation”. In: arXiv preprint arXiv:1502.04623 (2015). [22] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. “A recurrent latent variable model for sequential data”. In: Advances in Neural information processing systems. 2015, pp. 2962–2970. 9 | 2016 | 280 |
6,195 | SoundNet: Learning Sound Representations from Unlabeled Video Yusuf Aytar∗ MIT yusuf@csail.mit.edu Carl Vondrick∗ MIT vondrick@mit.edu Antonio Torralba MIT torralba@mit.edu Abstract We learn rich natural sound representations by capitalizing on large amounts of unlabeled sound data collected in the wild. We leverage the natural synchronization between vision and sound to learn an acoustic representation using two-million unlabeled videos. Unlabeled video has the advantage that it can be economically acquired at massive scales, yet contains useful signals about natural sound. We propose a student-teacher training procedure which transfers discriminative visual knowledge from well established visual recognition models into the sound modality using unlabeled video as a bridge. Our sound representation yields significant performance improvements over the state-of-the-art results on standard benchmarks for acoustic scene/object classification. Visualizations suggest some high-level semantics automatically emerge in the sound network, even though it is trained without ground truth labels. 1 Introduction The fields of object recognition, speech recognition, machine translation have been revolutionized by the emergence of massive labeled datasets [31, 42, 10] and learned deep representations [17, 33, 10, 35]. However, there has not yet been the same corresponding progress in natural sound understanding tasks. We attribute this partly to the lack of large labeled datasets of sound, which are often both expensive and ambiguous to collect. We believe that large-scale sound data can also significantly advance natural sound understanding. In this paper, we leverage over one year of sounds collected in-the-wild to learn semantically rich sound representations. We propose to scale up by capitalizing on the natural synchronization between vision and sound to learn an acoustic representation from unlabeled video. Unlabeled video has the advantage that it can be economically acquired at massive scales, yet contains useful signals about sound. Recent progress in computer vision has enabled machines to recognize scenes and objects in images and videos with good accuracy. We show how to transfer this discriminative visual knowledge into sound using unlabeled video as a bridge. We present a deep convolutional network that learns directly on raw audio waveforms, which is trained by transferring knowledge from vision into sound. Although the network is trained with visual supervision, the network has no dependence on vision during inference. In our experiments, we show that the representation learned by our network obtains state-of-the-art accuracy on three standard acoustic scene classification datasets. Since we can leverage large amounts of unlabeled sound data, it is feasible to train deeper networks without significant overfitting, and our experiments suggest deeper models perform better. Visualizations of the representation suggest that the network is also learning high-level detectors, such as recognizing bird chirps or crowds cheering, even though it is trained directly from audio without ground truth labels. ∗contributed equally 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Input conv1 conv2 conv3 conv4 conv5 conv6 conv7 conv8 Visual
Recognition
Networks Unlabeled
Video SoundNet Architecture KL pool1 pool2 pool5 Raw
Waveform RGB
Frames Object
Distribution Scene
Distribution KL Places
CNN ImageNet CNN Deep
1D
Convolutional
Network Figure 1: SoundNet: We propose a deep convolutional architecture for natural sound recognition. We train the network by transferring discriminative knowledge from visual recognition networks into sound networks. Our approach capitalizes on the synchronization of vision and sound in video. The primary contribution of this paper is the development of a large-scale and semantically rich representation for natural sound. We believe large-scale models of natural sounds can have a large impact in many real-world applications, such as robotics and cross-modal understanding. The remainder of this paper describes our method and experiments in detail. We first review related work. In section 2, we describe our unlabeled video dataset and in section 3 we present our network and training procedure. Finally in section 4 we conclude with experiments on standard benchmarks and show several visualizations of the learned representation. Code, data, and models will be released. 1.1 Related Work Sound Recognition: Although large-scale audio understanding has been extensively studied in the context of music [5, 37] and speech recognition [10], we focus on understanding natural, in-the-wild sounds. Acoustic scene classification, classifying sound excerpts into existing acoustic scene/object categories, is predominantly based on applying a variety of general classifiers (SVMs, GMMs, etc.) to the manually crafted sound features (MFCC, spectrograms, etc.) [4, 29, 21, 30, 34, 32]. Even though there are unsupervised [20] and supervised [27, 23, 6, 12] deep learning methods applied to sound classification, the models are limited by the amount of available labeled natural sound data. We distinguish ourselves from the existing literature by training a deep fully convolutional network on a large scale dataset (2M videos). This allows us to train much deeper networks. Another key advantage of our approach is that we supervise our sound recognition network through semantically rich visual discriminative models [33, 17] which proved their robustness on a variety of large scale object/scene categorization challenges[31, 42]. [26] also investigates the relation between vision and sound modalities, but focuses on producing sound from image sequences. Concurrent work [11] also explores video as a form of weak labeling for audio event classification. Transfer Learning: Transfer learning is widely studied within computer vision such as transferring knowledge for object detection [1, 2] and segmentation [18], however transferring from vision to other modalities are only possible recently with the emergence of high performance visual models [33, 17]. Our method builds upon teacher-student models [3, 9] and dark knowledge transfer [13]. In [3, 13] the basic idea is to compress (i.e. transfer) discriminative knowledge from a well-trained complex model to a simpler model without loosing considerable accuracy. In [3] and [13] both the teacher and the student are in the same modality, whereas in our approach the teacher operates on vision to train the student model in sound. [9] also transfer visual supervision into depth models. Cross-Modal Learning and Unlabeled Video: Our approach is broadly inspired by efforts to model cross-modal relations [24, 14, 7, 26] and works that leverage large amounts of unlabeled video [25, 41, 8, 40, 39]. In this work, we leverage the natural synchronization between vision and sound to learn a deep representation of natural sounds without ground truth sound labels. 2 Beach Classroom Construction River Club Forrest Hockey Playroom Engine Vegetation Figure 2: Unlabeled Video Dataset: Sample frames from our 2+ million video dataset. For visualization purposes, each frame is automatically categorized by object and scene vision networks. 2 Large Unlabeled Video Dataset We seek to learn a representation for sound by leveraging massive amounts of unlabeled videos. While there are a variety of sources available on the web (e.g., YouTube, Flickr), we chose to use videos from Flickr because they are natural, not professionally edited, short clips that capture various sounds in everyday, in-the-wild situations. We downloaded over two million videos from Flickr by querying for popular tags [36] and dictionary words, which resulted in over one year of continuous natural sound and video, which we use for training. The length of each video varies from a few seconds to several minutes. We show a small sample of frames from the video dataset in Figure 2. We wish to process sound waves in the raw. Hence, the only post-processing we did on the videos was to convert sound to MP3s, reduce the sampling rate to 22 kHz, and convert to single channel audio. Although this slightly degrades the quality of the sound, it allows us to more efficiently operate on large datasets. We also scaled the waveform to be in the range [−256, 256]. We did not need to subtract the mean because it was naturally near zero already. 3 Learning Sound Representations 3.1 Deep Convolutional Sound Network Convolutional Network: We present a deep convolutional architecture for learning sound representations. We propose to use a series of one-dimensional convolutions followed by nonlinearities (i.e. ReLU layer) in order to process sound. Convolutional networks are well-suited for audio signals for a couple of reasons. Firstly, like images [19], we desire our network to be invariant to translations, a property that reduces the number of parameters we need to learn and increases efficiency. Secondly, convolutional networks allow us to stack layers, which enables us to detect higher-level concepts through a series of lower-level detectors. Variable Length Input/Output: Since sound can vary in temporal length, we desire our network to handle variable-length inputs. To do this, we use a fully convolutional network. As convolutional layers are invariant to location, we can convolve each layer depending on the length of the input. Consequently, in our architecture, we only use convolutional and pooling layers. Since the representation adapts to the input length, we must design the output layers to work with variable length inputs as well. While we could have used a global pooling strategy [37] to down-sample variable length inputs to a fixed dimensional vector, such a strategy may unnecessarily discard information useful for high-level representations. Since we ultimately aim to train this network with video, which is also variable length, we instead use a convolutional output layer to produce an output over multiple timesteps in video. This strategy is similar to a spatial loss in images [22], but instead temporally. Network Depth: Since we will use a large amount of video to train, it is feasible to use deep architectures without significant over-fitting. We experiment with both five-layer and eight-layer networks. 3 Layer conv1 pool1 conv2 pool2 conv3 conv4 conv5 pool5 conv6 conv7 conv8 Dim. 220,050 27,506 13,782 1,722 862 432 217 54 28 15 4 # of Filters 16 16 32 32 64 128 256 256 512 1024 1401 Filter Size 64 8 32 8 16 8 4 4 4 4 8 Stride 2 1 2 1 2 2 2 1 2 2 2 Padding 32 0 16 0 8 4 2 0 2 2 0 Table 1: SoundNet (8 Layer): The configuration of the layers for the 8-layer SoundNet. conv1 pool1 conv2 pool2 conv3 pool3 conv4 conv5 220,050 27,506 13,782 1,722 862 432 217 54 32 32 64 64 128 128 256 1401 64 8 32 8 16 8 8 16 2 8 2 8 2 8 2 12 32 0 16 0 8 0 4 4 Table 2: SoundNet (5 Layer): The configuration for the 5-layer SoundNet. We visualize the eight-layer network architecture in Figure 1, which conists of 8 convolutional layers and 3 max-pooling layers. We show the layer configuration in Table 1 and Table 2. 3.2 Visual Transfer into Sound The main idea in this paper is to leverage the natural synchronization between vision and sound in unlabeled video in order to learn a representation for sound. We model the learning problem from a student-teacher perspective. In our case, state-of-the-art networks for vision will teach our network for sound to recognize scenes and objects. Let xi ∈RD be a waveform and yi ∈R3×T ×W ×H be its corresponding video for 1 ≤i ≤N, where W, H, T are width, height and number of sampled frames in the video, respectively. During learning, we aim to use the posterior probabilities from a teacher vision network gk(yi) in order to train our student network fk(xi) to recognize concepts given sound. As we wish to transfer knowledge from both object and scene networks, k enumerates the concepts we are transferring. During learning, we optimize minθ PK k=1 PN i=1 DKL (gk(yi)||fk(xi; θ)) where DKL(P||Q) = P j Pj log Pj Qj is the KLdivergence. While there are a variety of distance metrics we could have use, we chose KL-divergence because the outputs from the vision network gk can be interpreted as a distribution of categories. As KL-divergence is differentiable, we optimize it using back-propagation [19] and stochastic gradient descent. We transfer from both scene and object visual networks (K = 2). 3.3 Sound Classification Although we train SoundNet to classify visual categories, the categories we wish to recognize may not appear in visual models (e.g., sneezing). Consequently, we use a different strategy to attach semantic meaning to sounds. We ignore the output layer of our network and use the internal representation as features for training classifiers, using a small amount of labeled sound data for the concepts of interest. We pick a layer in the network to use as features and train a linear SVM. For multi-class classification, we use a one-vs-all strategy. We perform cross-validation to pick the margin regularization hyperparameter. For robustness, we follow a standard data augmentation procedure where each training sample is split into overlapping fixed length sound excerpts, which we compute features on and use for training. During inference, we average predictions across all windows. 3.4 Implementation Our approach is implemented in Torch7. We use the Adam [16] optimizer and a fixed learning rate of 0.001 and momentum term of 0.9 throughout our experiments. We experimented with several batch sizes, and found 64 to produce good results. We initialized all the weights to zero mean Gaussian noise with a standard deviation of 0.01. After every convolution, we use batch normalization [15] and rectified linear activation units [17]. We train the network for 100, 000 iterations. Optimization typically took 1 day on a GPU. 4 Experiments Experimental Setup: We split the unlabeled video dataset into a training set and a held-out validation set. We use 2, 000, 000 videos for training, and the remaining 140, 000 videos for validation. After training the network, we use the hidden representation as a feature extractor for learning on smaller, 4 Method Accuracy RG [29] 69% LTT [21] 72% RNH [30] 77% Ensemble [34] 78% SoundNet 88% Table 3: Acoustic Scene Classification on DCASE: We evaluate classification accuracy on the DCASE dataset. By leveraging large amounts of unlabeled video, SoundNet generally outperforms hand-crafted features by 10%. Accuracy on Method ESC-50 ESC-10 SVM-MFCC [28] 39.6% 67.5% Convolutional Autoencoder 39.9% 74.3% Random Forest [28] 44.3% 72.7% Piczak ConvNet [27] 64.5% 81.0% SoundNet 74.2% 92.2% Human Performance [28] 81.3% 95.7% Table 4: Acoustic Scene Classification on ESC-50 and ESC-10: We evaluate classification accuracy on the ESC datasets. Results suggest that deep convolutional sound networks trained with visual supervision on unlabeled data outperforms baselines. labeled sound only datasets. We extract features for a given layer, and train an SVM on the task of interest. For training the SVM, we use the standard training/test splits of the datasets. We report classification accuracy. Baselines:: In addition to published baselines on standard datasets, we explored an additional baseline trained on our unlabeled videos. We experimented using a convolutional autoencoder for sound, trained over our video dataset. We use an autoencoder with 4 encoder layers and 4 decoder layers. For the encoder layers, we used the same first four convolutional layers as SoundNet. For the decoders, we used a fractionally strided convolutional layers (in order to upsample instead of downsample). Note that we experimented with deeper autoencoders, but they performed worse. We used mean squared error for the reconstruction loss, and trained the autoencoders for several days. 4.1 Acoustic Scene Classification We evaluate the SoundNet representation for acoustic scene classification. The aim in this task is to categorize sound clips into one of the many acoustic scene categories. We use three standard, publicly available datasets: DCASE Challenge[34], ESC-50 [28], and ESC-10 [28]. DCASE[34]: One of the tasks in the Detection and Classification of Acoustic Scenes and Events Challenge (DCASE)[34] is to recognize scenes from natural sounds. In the challenge, there are 10 acoustic scene categories, 10 training examples per category, and 100 held-out testing examples. Each example is a 30 seconds audio recording. The task is to categorize natural sounds into existing 10 acoustic scene categories. Multi-class classification accuracy is used as the performance metric. Figure 3: SoundNet confusions on ESC-50 ESC-50 and ESC-10 [28]: The ESC-50 dataset is a collection of 2000 short (5 seconds) environmental sound recordings of equally balanced 50 categories selected from 5 major groups (animals, natural soundscapes, human non-speech sounds, interior/domestic sounds, and exterior/urban noises). Each category has 40 samples. The data is prearranged into 5 folds and the accuracy results are reported as the mean of 5 leave-one-fold-out evaluations. The performance of untrained human participants on this dataset is 81.3% [28]. ESC-10 is a subset of ESC-50 which consists of 10 classes (dog bark, rain, sea waves, baby cry, clock tic, person sneeze, helicopter, chainsaw, rooster, and fire cracking). The human performance on this dataset is 95.7%. We have two major evaluations on this section: (a) comparison with the existing state of the art results, (b) diagnostic performance evaluation of inner layers of SoundNet as generic features for this task. In DCASE we used 5 second excerpts, and in ESC datasets we used 1 second windows. In both evaluations a multi-class SVM (multiple one-vs all classifiers) is trained over extracted 5 Accuracy on Comparison of SoundNet Model ESC-50 ESC-10 Loss 8 Layer, ℓ2 Loss 47.8% 81.5% 8 Layer, KL Loss 72.9% 92.2% Teacher Net 8 Layer, ImageNet Only 69.5% 89.8% 8 Layer, Places Only 71.1% 89.5% 8 Layer, Both 72.9% 92.2% 5 Layer, Scratch Init 65.0% 82.3% Depth and 8 Layer, Scratch Init 51.1% 75.5% Visual Transfer 5 Layer, Unlabeled Video 66.1% 86.8% 8 Layer, Unlabeled Video 72.9% 92.2% Table 5: Ablation Analysis: We breakdown accuracy of various configurations using pool5 from SoundNet trained with VGG. Results suggest that deeper convolutional sound networks trained with visual supervision on unlabeled data helps recognition. Dataset Model conv4 conv5 pool5 conv6 conv7 conv8 DCASE [34] 8 Layer, AlexNet 84% 85% 84% 83% 78% 68% 8 Layer, VGG 77% 88% 88% 87% 84% 74% ESC50 [28] 8 Layer, AlexNet 66.0% 71.2% 74.2% 74% 63.8% 45.7% 8 Layer, VGG 66.0% 69.3% 72.9% 73.3% 59.8% 43.7% Table 6: Which layer and teacher network gives better features? The performance comparison of extracting features at different SoundNet layers on acoustic scene/object classification tasks. SoundNet features. Same data augmentation procedure is also applied during testing and the mean score of all sound excerpts is used as the final score of a test recording for any particular category. Comparison to State-of-the-Art: Table 3 and 4 compare recognition performance of SoundNet features versus previous state-of-the-art features on three datasets. In all cases SoundNet features outperformed the existing results by around 10%. Interestingly, SoundNet features approach human performance on ESC-10 dataset, however we stress that this dataset may be easy. We report the confusion matrix across all folds on ESC-50 in Figure 3. The results suggest our approach obtains very good performance on categories such as toilet flush (97% accuracy) or door knocks (95% accuracy). Common confusions are laughing confused as hens, foot steps confused as door knocks, and insects confused as washing machines. 4.2 Ablation Analysis To better understand our approach, we perform an ablation analysis in Table 5 and Table 6. Comparison of Loss and Teacher Net (Table 5): We tried training with different subsets of target categories. In general, performance generally improves with increasing visual supervision. As expected, our results suggest that using both ImageNet and Places networks as supervision performs better than a single one. This indicates that progress in sound understanding may be furthered by building stronger vision models. We also experimented with using ℓ2 loss on the target outputs instead of KL loss, which performed significantly worse. Comparison of Network Depth (Table 5): We quantified the impact of network depth. We use five layer version of SoundNet (instead of the full eight) as a feature extractor instead. The five-layer SoundNet architecture performed 8% worse than the eight-layer architecture, suggesting depth is helpful for sound understanding. Interestingly, the five-layer network still generally outperforms previous state-of-the-art baselines, but the margin is less. We hypothesize even deeper networks may perform better, which can be trained without significant over-fitting by leveraging large amounts of unlabeled video. Comparison of Supervision (Table 5): We also experimented with training the network without video by using only the labeled target training set, which is relatively small (thousands of examples). We simply change the network to output the class probabilities, and train it from random initialization with a cross entropy loss. Hence, the only change is that this baseline does not use any unlabeled video, allowing us to quantify the contribution of unlabeled video. The five layer SoundNet achieves slightly better results than [27] which is also a convolutional network trained with same data but with a different architecture, suggesting our five layer architecture is similar. Increasing the depth from five layers to eight layers decreases the performance from 65% to 51%, probably because it overfits to the small training set. However, when trained with visual transfer from unlabeled video, the eight layer SoundNet achieves a significant gain of around 20% compared to the five layer version. This 6 (a) t-SNE embedding of visual features (b) t-SNE embedding of sound features Figure 4: t-SNE embeddings using visual features and sound features (SoundNet conv7). The visual features are concatenated fc7 features from the VGG networks for ImageNet and Places2. Note that t-SNE embeddings do not use the class labels. Labels are only used during final visualization. Feature sound vision vision+sound 8 Layer, conv7 32.4% 49.4% 51.4% 8 Layer, conv8 32.3% 49.4% 50.5% Table 7: Multi-Modal Recognition: We report classification accuracy on ∼4K labeled test videos over 44 categories. suggests that unlabeled video is a powerful signal for sound understanding, and it can be acquired at large enough scales to support training high-capacity deep networks. Comparison of Layer and Teacher Network (Table 6): We analyze the discriminative performance of each SoundNet layer. Generally, features from the pool5 layer gives the best performance. We also compared different teacher networks for visual supervision (either VGGNet or AlexNet). The results are inconclusive on which teacher network to use: VGG is a better teacher network for DCASE while AlexNet is a better teacher network for ESC50. 4.3 Multi-Modal Recognition In order to compare sound features with visual features on scene/object categorization, we annotated additional 9,478 videos (vision+sound) which are not seen by the trained networks before. This new dataset consists of 44 categories from 6 major groups of concepts (i.e. urban, nature, work/home, music/entertainment, sports, and vehicles). It is annotated by Amazon Mechanical Turk workers. The frequency of categories depend on natural occurrences on the web, hence unbalanced. Vision vs. Sound Embeddings: In order to show the semantic relevance of the features, we performed a two dimensional t-SNE [38] embedding and visualized our dataset in figure 4. The visual features are concatenated fc7 features of the two VGG networks trained using ImageNet and Places2 datasets. We computed the visual features from uniformly selected 4 frames for each video and computed the mean feature as the final visual representation. The sound features are the conv7 features extracted using SoundNet trained with VGG supervision. This visualizations suggests that sound features alone also contain considerable amount of semantic information. Object and Scene Classification: We also performed a quantitative comparison between sound features and visual features. We used 60% of our dataset for training and the rest for the testing. The chance level of the task is 2.2% and choosing always the most common category (i.e. music performance) yields 14% accuracy. Similar to acoustic scene classification methods, we trained a multi-class SVM over both sound and visual features individually and then jointly. The results are displayed in Table 7. Visual features alone obtained an accuracy of 49.4%. The SoundNet features obtained 32.4% accuracy. This suggests that even though sound is not as informative as vision, it still contains considerable amount of discriminative information. Furthermore, sound and vision together resulted in a modest improvement of 2% over vision only models. 4.4 Visualizations In order to have a better insight on what network learned, we visualize its representation. Figure 5 displays the first 16 convolutional filters applied to the raw input audio. The learned filters are diverse, including low and high frequencies, wavelet-like patterns, increasing and decreasing amplitude filters. We also visualize some of the hidden units in the last hidden layer (conv7) of our sound representation 7 Figure 5: Learned filters in conv1: We visualize the filters for raw audio in the first layer of the deep convolutional network. Baby Talk Bubbles Cheering Bird Chirps Figure 6: What emerges in sound hidden units? We visualize some of the hidden units in the last hidden layer of our sound representation by finding inputs that maximally activate a hidden unit. Above, we illustrate what these units capture by showing the corresponding video frames. No vision is used in this experiment; we only show frames for visualization purposes only. by finding inputs that maximally activate a hidden unit. These visualization are displayed on Figure 6. Note that visual frames are not used during computation of activations; they are only included in the figure for visualization purposes. 5 Conclusion We propose to train deep sound networks (SoundNet) by transferring knowledge from established vision networks and large amounts of unlabeled video. The synchronous nature of videos (sound + vision) allow us to perform such a transfer which resulted in semantically rich audio representations for natural sounds. Our results show that transfer with unlabeled video is a powerful paradigm for learning sound representations. All of our experiments suggest that one may obtain better performance simply by downloading more videos, creating deeper networks, and leveraging richer vision models. Acknowledgements: We thank MIT TIG, especially Garrett Wollman, for helping store 26 TB of video. We are grateful for the GPUs donated by NVidia. This work was supported by NSF grant #1524817 to AT and the Google PhD fellowship to CV. References [1] Yusuf Aytar and Andrew Zisserman. Tabula rasa: Model transfer for object category detection. In ICCV, 2011. [2] Yusuf Aytar and Andrew Zisserman. Part level transfer regularization for enhancing exemplar svms. CVIU, 2015. [3] Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? In NIPS, 2014. [4] Daniele Barchiesi, Dimitrios Giannoulis, Dan Stowell, and Mark D Plumbley. Acoustic scene classification: Classifying environments from the sounds they produce. SPM, 2015. [5] Thierry Bertin-Mahieux, Daniel PW Ellis, Brian Whitman, and Paul Lamere. The million song dataset. In ISMIR, 2011. [6] Emre Cakir, Toni Heittola, Heikki Huttunen, and Tuomas Virtanen. Polyphonic sound event detection using multi label deep neural networks. In IJCNN, 2015. [7] Lluis Castrejon, Yusuf Aytar, Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Learning aligned cross-modal representations from weakly aligned data. In CVPR, 2016. [8] Chao-Yeh Chen and Kristen Grauman. Watching unlabeled video helps learn new human actions from very few labeled snapshots. In CVPR, 2013. [9] Saurabh Gupta, Judy Hoffman, and Jitendra Malik. Cross modal distillation for supervision transfer. arXiv preprint arXiv:1507.00448, 2015. [10] Awni Hannun, Carl Case, Jared Casper, Bryan Catanzaro, Greg Diamos, Erich Elsen, Ryan Prenger, Sanjeev Satheesh, Shubho Sengupta, Adam Coates, et al. Deep speech: Scaling up end-to-end speech recognition. arXiv preprint arXiv:1412.5567, 2014. [11] Shawn Hershey, Sourish Chaudhuri, Daniel PW Ellis, Jort F Gemmeke, Aren Jansen, R Channing Moore, Manoj Plakal, Devin Platt, Rif A Saurous, Bryan Seybold, et al. Cnn architectures for large-scale audio classification. arXiv, 2016. 8 [12] Lars Hertel, Huy Phan, and Alfred Mertins. Comparing time and frequency domain for audio event recognition using deep learning. arXiv, 2016. [13] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv, 2015. [14] Jing Huang and Brian Kingsbury. Audio-visual deep learning for noise robust speech recognition. In ICASSP, 2013. [15] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv, 2015. [16] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [18] Daniel Kuettel and Vittorio Ferrari. Figure-ground segmentation by transferring window masks. In CVPR, 2012. [19] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. IEEE, 1998. [20] Honglak Lee, Peter Pham, Yan Largman, and Andrew Y Ng. Unsupervised feature learning for audio classification using convolutional deep belief networks. In NIPS, 2009. [21] David Li, Jason Tam, and Derek Toub. Auditory scene classification using machine learning techniques. AASP Challenge, 2013. [22] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [23] Ian McLoughlin, Haomin Zhang, Zhipeng Xie, Yan Song, and Wei Xiao. Robust sound event classification using deep neural networks. ASL, 2015. [24] Jiquan Ngiam, Aditya Khosla, Mingyu Kim, Juhan Nam, Honglak Lee, and Andrew Y Ng. Multimodal deep learning. In ICML, 2011. [25] Phuc Xuan Nguyen, Gregory Rogez, Charless Fowlkes, and Deva Ramamnan. The open world of micro-videos. arXiv, 2016. [26] Andrew Owens, Phillip Isola, Josh McDermott, Antonio Torralba, Edward H Adelson, and William T Freeman. Visually indicated sounds. arXiv preprint arXiv:1512.08512, 2015. [27] Karol J Piczak. Environmental sound classification with convolutional neural networks. In MLSP, 2015. [28] Karol J Piczak. Esc: Dataset for environmental sound classification. In ACM Multimedia, 2015. [29] Alain Rakotomamonjy and Gilles Gasso. Histogram of gradients of time-frequency representations for audio scene classification. TASLP, 2015. [30] Guido Roma, Waldo Nogueira, and Perfecto Herrera. Recurrence quantification analysis features for environmental sound recognition. In WASPAA, 2013. [31] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 2015. [32] Justin Salamon and Juan Pablo Bello. Unsupervised feature learning for urban sound classification. In ICASSP, 2015. [33] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [34] Dan Stowell, Dimitrios Giannoulis, Emmanouil Benetos, Mathieu Lagrange, and Mark D Plumbley. Detection and classification of acoustic scenes and events. TM, 2015. [35] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, 2014. [36] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc100m: The new data in multimedia research. Communications of the ACM, 2016. [37] Aaron Van den Oord, Sander Dieleman, and Benjamin Schrauwen. Deep content-based music recommendation. In NIPS, 2013. [38] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. JMLR, 2008. [39] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Anticipating visual representations from unlabeled video. CVPR, 2016. [40] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. NIPS, 2016. [41] Jacob Walker, Abhinav Gupta, and Martial Hebert. Dense optical flow prediction from a static image. In ICCV, 2015. [42] Bolei Zhou, Agata Lapedriza, Jianxiong Xiao, Antonio Torralba, and Aude Oliva. Learning deep features for scene recognition using places database. In NIPS, 2014. 9 | 2016 | 281 |
6,196 | Dual Decomposed Learning with Factorwise Oracles for Structural SVMs of Large Output Domain Ian E.H. Yen † Xiangru Huang ‡ Kai Zhong ‡ Ruohan Zhang ‡ Pradeep Ravikumar † Inderjit S. Dhillon ‡ † Carnegie Mellon University ‡ University of Texas at Austin Abstract Many applications of machine learning involve structured outputs with large domains, where learning of a structured predictor is prohibitive due to repetitive calls to an expensive inference oracle. In this work, we show that by decomposing training of a Structural Support Vector Machine (SVM) into a series of multiclass SVM problems connected through messages, one can replace an expensive structured oracle with Factorwise Maximization Oracles (FMOs) that allow efficient implementation of complexity sublinear to the factor domain. A Greedy Direction Method of Multiplier (GDMM) algorithm is then proposed to exploit the sparsity of messages while guarantees convergence to ϵ sub-optimality after O(log(1/ϵ)) passes of FMOs over every factor. We conduct experiments on chain-structured and fully-connected problems of large output domains, where the proposed approach is orders-of-magnitude faster than current state-of-the-art algorithms for training Structural SVMs. 1 Introduction Structured prediction has become prevalent with wide applications in Natural Language Processing (NLP), Computer Vision, and Bioinformatics to name a few, where one is interested in outputs of strong interdependence. Although many dependency structures yield intractable inference problems, approximation techniques such as convex relaxations with theoretical guarantees [10, 14, 7] have been developed. However, solving the relaxed problems (LP, QP, SDP, etc.) is computationally expensive for factor graphs of large output domain and results in prohibitive training time when embedded into a learning algorithm relying on inference oracles [9, 6]. For instance, many applications in NLP such as Machine Translation [3], Speech Recognition [21], and Semantic Parsing [1] have output domains as large as the size of vocabulary, for which the prediction of even a single sentence takes considerable time. One approach to avoid inference during training is by introducing a loss function conditioned on the given labels of neighboring output variables [15]. However, it also introduces more variance to the estimation of model and could degrade testing performance significantly. Another thread of research aims to formulate parameter learning and output inference as a joint optimization problem that avoids treating inference as a subroutine [12, 11]. In this appraoch, the structured hinge loss is reformulated via dual decomposition, so both messages between factors and model parameters are treated as first-class variables. The new formulation, however, does not yield computational advantage due to the constraints entangling the two types of variables. In particular, [11] employs a hybrid method (DLPW) that alternatingly optimizes model parameters and messages, but the algorithm is not significantly faster than directly performing stochastic gradient on the structured hinge loss. More recently, [12] proposes an approximate objective for structural SVMs that leads to an algorithm considerably faster than DLPW on problems requiring expensive inference. However, the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: (left) Factors with large output domains in Sequence Labeling. (right) Large number of factors in a Correlated Multilabel Prediction problem. Circles denote variables and black boxes denote factors. (Yu: domain of unigram factor. Yb: domain of bigram factor.) approximate objective requires a trade-off between efficiency and approximation quality, yielding an O(1/ϵ2) overall iteration complexity for achieving ϵ sub-optimality. The contribution of this work is twofold. First, we propose a Greedy Direction Method of Multiplier (GDMM) algorithm that decomposes the training of a structural SVM into factorwise multiclass SVMs connected through sparse messages confined to the active labels. The algorithm guarantees an O(log(1/ϵ)) iteration complexity for achieving an ϵ sub-optimality and each iteration requires only one pass of Factorwise Maximization Oracles (FMOs) over every factor. Second, we show that the FMO can be realized in time sublinear to the cardinality of factor domains, hence is considerably more efficient than a structured maximization oracle when it comes to large output domain. For problems consisting of numerous binary variables, we further give realization of a joint FMO that has complexity sublinear to the number of factors. We conduct experiments on both chainstructured problems that allow exact inference and fully-connected problems that rely on Linear Program relaxations, where we show the proposed approach is orders-of-magnitude faster than current state-of-the-art training algorithms for Structured SVMs. 2 Problem Formulation Structured prediction aims to predict a set of outputs y ∈Y(x) from their interdependency and inputs x ∈X. Given a feature map φ(x, y) : X × Y(x) →Rd that extracts relevant information from (x, y), a linear classifier with parameters w can be defined as h(x; w) = arg maxy∈Y(x) ⟨w, φ(x, y)⟩, where we estimate the parameters w from a training set D = {(xi, ¯yi)}n i=1 by solving a regularized Empirical Risk Minimization (ERM) problem min w 1 2∥w∥2 + C n X i=1 L(w; xi, ¯yi) . (1) In case of a Structural SVM [19, 20], we consider the structured hinge loss L(w; x, ¯y) = max y∈Y(x) ⟨w, φ(x, y) −φ(x, ¯y)⟩+ δ(y, ¯y), (2) where δ(y, ¯yi) is a task-dependent error function, for which the Hamming distance δH(y, ¯yi) is commonly used. Since the size of domain |Y(x)| typically grows exponentially with the number of output variables, the tractability of problem (1) lies in the decomposition of the responses ⟨w, φ(x, y)⟩into several factors, each involving only a few outputs. The factor decomposition can be represented as a bipartite graph G(F, V, E) between factors F and variables V, where an edge (f, j) ∈E exists if the factor f involves the variable j. Typically, a set of factor templates T exists so that factors of the same template F ∈T share the same feature map φF (.) and parameter vector wF . Then the response on input-output pair (x, y) is given by ⟨w, φ(x, y)⟩= X F ∈T X f∈F (x) ⟨wF , φF (xf, yf)⟩, (3) where F(x) denotes the set of factors on x that share a template F, and yf denotes output variables relevant to factor f of domain Yf = YF . We will use F(x) to denote the union of factors of different templates {F(x)}F ∈T . Figure 1 shows two examples that both have two factor templates 2 (i.e. unigram and bigram) for which the responses have decomposition P f∈u(x)⟨wu, φu(xf, yf)⟩+ P f∈b(x)⟨wb, φb(yf)⟩. Unfortunately, even with such decomposition, the maximization in (2) is still computationally expensive. First, most of graph structures do not allow exact maximization, so in practice one would minimize an upper bound of the original loss (2) obtained from relaxation [10, 18]. Second, even for the relaxed loss or a tree-structured graph that allows polynomial-time maximization, its complexity is at least linear to the cardinality of factor domain |Yf| times the number of factors |F|. This results in a prohibitive computational cost for problems with large output domain. As in Figure 1, one example has a factor domain |Yb| which grows quadratically with the size of output domain; the other has the number of factors |F| which grows quadratically with the number of outputs. A key observation of this paper is, in contrast to the structural maximization (2) that requires larger extent of exploration on locally suboptimal assignments in order to achieve global optimality, the Factorwise Maximization Oracle (FMO) y∗ f := argmax yf ⟨wF , φ(xf, yf)⟩ (4) can be realized in a more efficient way by maintaining data structures on the factor parameters wF . In the next section, we develop globally-convergent algorithms that rely only on FMO, and provide realizations of message-augmented FMO with cost sublinear to the size of factor domain or to the number of factors. 3 Dual-Decomposed Learning We consider an upper bound of the loss (2) based on a Linear Program (LP) relaxation that is tight in case of a tree-structured graph and leads to a tractable approximation for general factor graphs [11, 18]: LLP (w; x, ¯y) = max (q,p)∈ML X f∈F(x) θf(w), qf (5) where θf(w) := wF , φF (xf, yf) −φF (xf, ¯yf) + δf(yf, ¯yf) yf ∈Yf . ML is a polytope that constrains qf in a |Yf|-dimensional simplex ∆|Yf | and also enforces local consistency: ML := q = (qf)f∈F(x) p = (pj)j∈V(x) qf ∈∆|Yf |, ∀f ∈F(x), ∀F ∈T Mjfqf = pj, ∀(j, f) ∈E(x) , where Mjf is a |Yj| by |Yf| matrix that has Mjf(yj, yf) = 1 if yj is consistent with yf (i.e. yj = [yf]j) and Mjf(yj, yf) = 0 otherwise. For a tree-structured graph G(F, V, E), the LP relaxation is tight and thus loss (5) is equivalent to (2). For a general factor graph, (5) is an upper bound on the original loss (2). It is observed that parameters w learned from the upper bound (5) tend to tightening the LP relaxation and thus in practice lead to tight LP in the testing phase [10]. Instead of solving LP (5) as a subroutine, a recent attempt formulates (1) as a problem that optimizes (p, q) and w jointly via dual decomposition [11, 12]. We denote λjf as dual variables associated with constraint Mjfqf = pj, and λf := (λjf)j∈N (f) where N(f) = {j | (j, f) ∈E}. We have LLP (w; x, ¯y) = max q,p min λ X f∈F(x) ⟨θf(w), qf⟩+ X j∈N (f) ⟨λjf, Mjfqf −pj⟩ (6) = min λ∈Λ X f∈F(x) max qf ∈∆|Yf |(θf(w) + X j∈N (f) M T jfλjf)T qf (7) = min λ∈Λ X f∈F(x) max yf ∈Yf θf(yf; w) + X j∈N (f) λjf([yf]j) = min λ∈Λ X f∈F(x) Lf(w; xf, ¯yf, λf) (8) where (7) follows the strong duality, and the domain Λ = n λ P (j,f)∈E(x) λjf = 0, ∀j ∈V(x) o follows the maximization w.r.t. p in (6). The result (8) is a loss function Lf(.) that penalizes the response of each factor separately given λf. The ERM problem (1) can then be expressed as min w,λ∈Λ X F ∈T 1 2∥wF ∥2 + C X f∈F Lf(wF ; xf, ¯yf, λf) , (9) 3 Algorithm 1 Greedy Direction Method of Multiplier 0. Initialize t = 0, α0 = 0, λ0 = 0 and A0 = Ainit. for t = 0, 1, ... do 1. Compute (αt+1, At+1) via one pass of Algorithm 2, 3, or 4. 2. λt+1 jf = λt jf + η Mjfαt+1 f −αt+1 j , j ∈N(f), ∀f ∈F. end for where F = SN i=1 F(xi) and F = S F ∈T F. The formulation (9) has an insightful interpretation: each factor template F learns a multiclass SVM given by parameters wF from factors f ∈F, while each factor is augmented with messages λf passed from all variables related to f. Despite the insightful interpretation, formulation (9) does not yield computational advantage directly. In particular, the non-smooth loss Lf(.) entangles parameters w and messages λ, which leads to a difficult optimization problem. Previous attempts to solve (9) either have slow convergence [11] or rely on an approximation objective [12]. In the next section, we propose a Greedy Direction Method of Multiplier (GDMM) algorithm for solving (9), which achieves ϵ sub-optimality in O(log(1/ϵ)) iterations while requiring only one pass of FMOs for each iteration. 3.1 Greedy Direction Method of Multiplier Let αf(yf) be dual variables for the factor responses zf(yf) = ⟨w, φ(xf, yf)⟩and {αj}j∈V be that for constraints in Λ. The dual problem of (9) can be expressed as 1 min αf ∈∆|Yf | G(α) := 1 2 X F ∈T ∥wF (α)∥2 − X j∈V δT j αj s.t. Mjfαf = αj, j ∈N(f), f ∈F. wF (α) = X f∈F ΦT f αf (10) where αf lie in the shifted simplex ∆|Yf | := αf αf(¯yf) ≤C , αf(yf) ≤0, ∀yf ̸= ¯yf , X yf ∈Yf αf(yf) = 0. . (11) Problem (10) can be interpreted as a summation of the dual objectives of |T | multiclass SVMs (each per factor template), connected with consistency constraints. To minimize (10) one factor at a time, we adopt a Greedy Direction Method of Multiplier (GDMM) algorithm that alternates between minimizing the Augmented Lagrangian function min αf ∈∆|Yf | L(α, λt) := G(α) + ρ 2 X j∈N (f) ,f∈F
mjf(α, λt)
2 −∥λt jf∥2 (12) and updating the Lagrangian Multipliers (of consistency constraints) λt+1 jf = λt jf + η (Mjfαf −αj) . ∀j ∈N(f), f ∈F, (13) where mjf(α, λt) = Mjfαf −αj + λt jf plays the role of messages between |T | multiclass problems, and η is a constant step size. The procedure is outlined in Algorithm 1. The minimization (12) is conducted in an approximate and greedy fashion, in the aim of involving as few dual variables as possible. We discuss two greedy algorithms that suit two different cases in the following. Factor of Large Domain For problems with large factor domains, we minimize (12) via a variant of Frank-Wolfe algorithm with away steps (AFW) [8], outlined in Algorithm 2. The AFW algorithm maintains the iterate αt as a linear combination of bases constructed during iterates αt = X v∈At ct vv, At := {v | ct v ̸= 0} (14) 1αj is also dual variables for responses on unigram factors. We define U := V and αf := αj, ∀f ∈U. 4 Algorithm 2 Away-step Frank-Wolfe (AFW) repeat 1. Find a greedy direction v+ satisfying (15). 2. Find an away direction v−satisfying (16). 3. Compute αt+1 according to (17). 4. Maintain active set At by (14). 5. Maintain wF (α) according to (10). until a non-drop step is performed. Algorithm 3 Block-Greedy Coordinate Descent for i ∈[n] do 1. Find f ∗satisfying (18) for i-th sample. 2. As+1 i = As i ∪{f ∗}. for f ∈Ai do 3.1 Update αf according to (19). 3.2 Maintain wF (α) according to (10). end for end for where At maintains an active set of bases of non-zero coefficients. Each iteration of AFW finds a direction v+ := (v+ f )f∈F leading to the most descent amount according to the current gradient, subject to the simplex constraints: v+ f := argmin vf ∈∆|Yf | ⟨∇αf L(αt, λt), vf⟩= C(e¯yf −ey∗ f ), ∀f ∈F (15) where y∗ f := arg maxyf ∈Yf \{¯yf } ⟨∇αf L(αt, λt), eyf ⟩is the non-ground-truth labeling of factor f of highest response. In addition, AFW finds the away direction v−:= argmax v∈At ⟨∇αL(αt, λt), v⟩, (16) which corresponds to the basis that leads to the most descent amount when being removed. Then the update is determined by αt+1 := αt + γF dF , ⟨∇αL, dF ⟩< ⟨∇αL, dA⟩ αt + γAdA, otherwise. (17) where we choose between two descent directions dF := v+ −αt and dA := αt −v−. The step size of each direction γF := arg minγ∈[0,1] L(αt + γdF ) and γA := arg minγ∈[0,cv−] L(αt + γdA) can be computed exactly due to the quadratic nature of (12). A step is called drop step if a step size γ∗= cv−is chosen, which leads to the removal of a basis v−from the active set, and therefore the total number of drop steps can be bounded by half of the number of iterations t. Since a drop step could lead to insufficient descent, Algorithm 2 stops only if a non-drop step is performed. Note Algorithm 2 requires only a factorwise greedy search (15) instead of a structural maximization (2). In section 3.2 we show how the factorwise search can be implemented much more efficiently than structural ones. All the other steps (2-5) in Algorithm 2 can be computed in O(|Af|nnz(φf)), where |Af| is the number of active states in factor f, which can be much smaller than |Yf| when output domain is large. In practice, a Block-Coordinate Frank-Wolfe (BCFW) method has much faster convergence than Frank-Wolfe method (Algorithm 2) [13, 9], but proving linear convergence for BCFW is also much more difficult [13], which prohibits its use in our analysis. In our implementation, however, we adopt the BCFW version since it turns out to be much more efficient. We include a detailed description on the BCFW version in Appendix-A (Algorithm 4). Large Number of Factors Many structured prediction problems, such as alignment, segmentation, and multilabel prediction (Fig. 1, right), comprise binary variables and large number of factors with small domains, for which Algorithm 2 does not yield any computational advantage. For this type of problem, we minimize (12) via one pass of Block-Greedy Coordinate Descent (BGCD) (Algorithm 3) instead. Let Qmax be an upper bound on the eigenvalue of Hessian matrix of each block ∇2 αf L(α). For binary variables of pairwise factor, we have Qmax=4(maxf∈F ∥φf∥2 + 1). Each iteration of BGCD finds a factor that leads to the most progress f ∗:= argmin f∈F(xi) min αf +d∈∆|Yf |⟨∇αf L(αt, λt), d⟩+ Qmax 2 ∥d∥2 . (18) for each instance xi, adds them into the set of active factors Ai, and performs updates by solving block subproblems d∗ f = argmin αf +d∈∆|Yf | ⟨∇αf L(αt, λt), d⟩+ Qmax 2 ∥d∥2 (19) 5 for each factor f ∈Ai. Note |Ai| is bounded by the number of GDMM iterations and it converges to a constant much smaller than |F(xi)| in practice. We address in the next section how a joint FMO can be performed to compute (18) in time sublinear to |F(xi)| in the binary-variable case. 3.2 Greedy Search via Factorwise Maximization Oracle (FMO) The main difference between the FMO and structural maximization oracle (2) is that the former involves only simple operations such as inner products or table look-ups for which one can easily come up with data structures or approximation schemes to lower the complexity. In this section, we present two approaches to realize sublinear-time FMOs for two types of factors widely used in practice. We will describe in terms of pairwise factors, but the approach can be naturally generalized to factors involving more variables. Indicator Factor Factors θf(xf, yf) of the form ⟨wF , φF (xf, yf)⟩= v(xf, yf) (20) are widely used in practice. It subsumes the bigram factor v(yi, yj) that is prevalent in sequence, grid, and network labeling problems, and also factors that map an input-output pair (x, y) directly to a score v(x, y). For this type of factor, one can maintain ordered multimaps for each factor template F, which support ordered visits of {v(x, (yi, yj))}(yi,yj)∈Yf , {v(x, (yi, yj))}yj∈Yj and {v(x, (yi, yj))}yi∈Yi. Then to find yf that maximizes (26), we compare the maximizers in 4 cases: (i) (yi, yj) : mif(yi) = mjf(yj) = 0, (ii) (yi, yj) : mif(yi) = 0, (iii) (yi, yj) : mjf(yj) = 0, (iv) (yi, yj) : mjf(yj) ̸= 0, mif(yi) ̸= 0. The maximization requires O(|Ai||Aj|) in cases (ii)-(iv) and O(max(|Ai||Yj|, |Yi||Aj|)) in case (i) (see details in Appendix C-1). However, in practice we observe an O(1) cost for case (i) and the bottleneck is actually case (iv), which requires O(|Ai||Aj|). Note the ordered multimaps need maintenance whenever the vector wF (α) is changed. Fortunately, since the indicator factor has v(yf, x) = P f∈F,xf =x αf(yf), each update (25) leads to at most |Af| changed elements, which gives a maintenance cost bounded by O(|Af| log(|YF |)). On the other hand, the space complexity is bounded by O(|YF ||XF |) since the map is shared among factors. Binary-Variable Interaction Factor Many problems consider pairwise-interaction factor between binary variables, where the factor domain is small but the number of factors is large. For this type of problem, there is typically an rare outcome yA f ∈YF . We call factors exhibiting such outcome as active factors and the score of a labeling is determined by the score of the active factors (inactive factors give score 0). For example, in the problem of multilabel prediction with pairwise interactions (Fig. 1, right), an active unigram factor has outcome yA j = 1 and an active bigram factor has yA f = (1, 1), and each sample typically has only few outputs with value 1. For this type of problem, we show that the gradient magnitude w.r.t. αf for a bigram factor f can be determined by the gradient w.r.t. αf(yA f ) when one of its incoming message mjf or mif is 0 (see details in Appendix C-2). Therefore, we can find the greedy factor (18) by maintaining an ordered multimap for the scores of outcome yA f in each factor {v(yA f , xf)}f∈F . The resulting complexity for finding a factor that maximizes (18) is then reduced from O(|Yi||Yj|) to O(|Ai||Aj|), where the latter is for comparison among factors that have both messages mif and mjf being non-zero. Inner-Product Factor We consider another widely-used type of factor of the form θf(xf, yf) = ⟨wF , φF (xf, yf)⟩= ⟨wF (yf), φF (xf)⟩ where all labels yf ∈Yf share the same feature mapping φF (xf) but with different parameters wF (yf). We propose a simple sampling approximation method with a performance guarantee for the convergence of GDMM. Note although one can apply similar sampling schemes to the structural maximization oracle (2), it is hard to guarantee the quality of approximation. The sampling method divides Yf into ν mutually exclusive subsets Yf = Sν k=1 Y(k) f , and realizes an approximate FMO by first sampling k uniformly from [ν] and returning ˆyf ∈arg max yf ∈Y(k) f ⟨wF (yf), φF (xf)⟩. (21) 6 Note there is at least 1/ν probability that ˆyf ∈arg maxyf ∈Yf ⟨wF (yf), φF (xf)⟩since at least one partition Y(k) f contains a label of the highest score. In section 3.3, we show that this approximate FMO still ensures convergence with a rate scaled by 1/ν. In practice, since the set of active labels is not changing frequently during training, once an active label yf is sampled, it will be kept in the active set Af till the end of the algorithm and thus results in a convergence rate similar to that of an exact FMO. Note for problems of binary variables with large number of inner-product factors, the sampling technique applies similarly by simply partitioning factors as Fi = Sν k=1 F(k) i and searching active factors only within one randomly chosen partition at a time. 3.3 Convergence Analysis We show the iteration complexity of the GDMM algorithm with an 1/ν-approximated FMO given in section 3.2. The convergence guarantee for exact FMOs can be obtained by setting ν = 1. The analysis leverages recent analysis on the global linear convergence of Frank-Wolfe variants [8] for function of the form (12) with a polyhedral domain, and also the analysis in [5] for Augmented Lagrangian based method. This type of greedy Augmented Lagrangian Method was also analyzed previously under different context [23, 24, 22]. Let d(λ) = minα L(α, λ) be the dual objective of (12), and let ∆t d := d∗−d(λt), ∆t p := L(αt, λt) −d(λt) (22) be the dual and primal suboptimality of problem (10) respectively. We have the following theorems. Theorem 1 (Convergence of GDMM with AFW). The iterates {(αt, λt)}∞ t=1 produced by Algorithm 1 with step 1 performed by Algorithm 2 has E[∆t p + ∆t d] ≤ϵ for t ≥ω log(1 ϵ ) (23) for any 0 < η ≤ ρ 4+16(1+ν)mQ/µM with ω = max n 2(1 + 4 mQ(1+ν) µM ), τ η o , where µM is the generalized geometric strong convexity constant of (12), Q is the Lipschitz-continuous constant for the gradient of objective (12), and τ > 0 is a constant depending on optimal solution set. Theorem 2 (Convergence of GDMM with BGCD). The iterates {(αt, λt)}∞ t=1 produced by Algorithm 1 with step 1 performed by Algorithm 3 has E[∆t p + ∆t d] ≤ϵ for t ≥ω1 log(1 ϵ ) (24) for any 0 < η ≤ ρ 4(1+Qmaxν/µ1) with ω1 = max n 2(1 + Qmaxν µ1 ), τ η o , where µ1 is the generalized strong convexity constant of objective (12) and Qmax = maxf∈F Qf is the factorwise Lipschitzcontinuous constant on the gradient. 4 Experiments In this section, we compare with existing approaches on Sequence Labeling and Multi-label prediction with pairwise interaction. The algorithms in comparison are: (i) BCFW: a Block-Coordinate Frank-Wolfe method based on structural oracle [9], which outperforms other competitors such as Cutting-Plane, FW, and online-EG methods in [9]. (ii) SSG: an implementation of the Stochastic Subgradient method [16]. (iii) Soft-BCFW: Algorithm proposed in ([12]), which avoids structural oracle by minimizing an approximate objective, where a parameter ρ controls the precision of the approximation. We tuned the parameter and chose two of the best on the figure. For BCFW and SSG, we adapted the MATLAB implementation provided by authors of [9] into C++, which is an order of magnitude faster. All other implementations are also in C++. The results are compared in terms of primal objective (achieved by w) and test accuracy. Our experiments are conducted on 4 public datasets: POS, ChineseOCR, RCV1-regions, and EURLex (directory codes). For sequence labeling we experiment on POS and ChineseOCR. The POS dataset is a subset of Penn treebank2 that contains 3,808 sentences, 196,223 words, and 45 POS labels. The HIT-MW3 ChineseOCR dataset is a hand-written Chinese character dataset from [17]. The 2https://catalog.ldc.upenn.edu/LDC99T42 3https://sites.google.com/site/hitmwdb/ 7 10 0 10 1 10 2 10 3 iteration 10 -1 10 0 objective POS GDMM Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 0 10 1 10 2 iteration 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 Objective ×10 5 ChineseOCR GDMM Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 3 10 4 time 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3 2.4 Objective ×10 5 ChineseOCR GDMM GDMM-subFMO Figure 2: (left) Compare two FMO-based algorithms (GDMM, Soft-BCFW) in number of iterations. (right) Improvement in training time given by sublinear-time FMO. 10 2 10 4 time 10 0 10 1 Relative-Objective POS BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 3 10 4 time 1.5 2 2.5 3 Objective ×10 5 ChineseOCR BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 2 10 3 10 4 10 5 time 10 4 10 5 10 6 10 7 10 8 10 9 Objective RCV1-regions BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 2 10 4 time 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 test error POS BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 3 10 4 time 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 test error ChineseOCR BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 2 10 3 10 4 10 5 time 10 -2 test error RCV1-regions BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 10 2 10 3 10 4 time 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 test error EUR-Lex BCFW GDMM-subFMO SSG Soft-BCFW-ρ=1 Soft-BCFW-ρ=10 Figure 3: Primal Objective v.s. Time and Test error v.s. Time plots. Note that figures of objective have showed that SSG converges to a objective value much higher than all other methods, this is also observed in [9]. Note the training objective for the EUR-Lex data set is too expensive to compute and we are unable to plot the figure. dataset has 12,064 hand-written sentences, and a total of 174,074 characters. The vocabulary (label) size is 3,039. For the Correlated Multilabel Prediction problems, we experiment on two benchmark datasets RCV1-regions4 and EUR-Lex (directory codes)5. The RCV1-regions dataset has 228 labels, 23,149 training instances and 47,236 features. Note that a smaller version of RCV1 with only 30 labels and 6000 instances is used in [11, 12]. EUR-Lex (directory codes) has 410 directory codes as labels with a sample size of 19,348. We first compare GDMM (without subFMO) with Soft-BCFW in Figure 2. Due to the approximation (controlled by ρ), Soft-BCFW can converge to a suboptimal primal objective value. While the gap decreases as ρ increases, its convergence becomes also slower. GDMM, on the other hand, enjoys a faster convergence. The sublinear-time implementation of FMO also reduces the training time by an order of magnitude on the ChineseOCR data set, as showed in Figure 2 (right). More general experiments are showed in Figure 3. When the size of output domain is small (POS dataset), GDMM-subFMO is competitive to other solvers. As the size of output domain grows (ChineseOCR, RCV1, EUR-Lex), the complexity of structural maximization oracle grows linearly or even quadratically, while the complexity of GDMM-subFMO only grows sublinearly in the experiments. Therefore, GDMM-subFMO achieves orders-of-magnitude speedup over other methods. In particular, when running on ChineseOCR and EUR-Lex, each iteration of SSG, GDMM, BCFW and Soft-BCFW take over 103 seconds, while it only takes a few seconds in GDMM-subFMO. Acknowledgements. We acknowledge the support of ARO via W911NF-12-1-0390, NSF via grants CCF-1320746, CCF-1117055, IIS-1149803, IIS-1546452, IIS-1320894, IIS-1447574, IIS1546459, CCF-1564000, DMS-1264033, and NIH via R01 GM117594-01 as part of the Joint DMS/NIGMS Initiative to Support Research at the Interface of the Biological and Mathematical Sciences. 4www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html 5mulan.sourceforge.net/datasets-mlc.html 8 References [1] D. Das, D. Chen, A. F. Martins, N. Schneider, and N. A. Smith. Frame-semantic parsing. Computational linguistics, 40(1):9–56, 2014. [2] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. Liblinear: A library for large linear classification. The Journal of Machine Learning Research, 9:1871–1874, 2008. [3] K. Gimpel and N. A. Smith. Structured ramp loss minimization for machine translation. In NAACL, pages 221–231. Association for Computational Linguistics, 2012. [4] A. Hoffman. On approximate solutions of systems of linear inequalities. Journal of Research of the National Bureau of Standards, 1952. [5] M. Hong and Z.-Q. Luo. On the linear convergence of the alternating direction method of multipliers. arXiv preprint arXiv:1208.3922, 2012. [6] T. Joachims, T. Finley, and C.-N. J. Yu. Cutting-plane training of structural svms. Machine Learning, 77(1):27–59, 2009. [7] M. P. Kumar, V. Kolmogorov, and P. H. Torr. An analysis of convex relaxations for map estimation. Advances in Neural Information Processing Systems, 20:1041–1048, 2007. [8] S. Lacoste-Julien and M. Jaggi. On the global linear convergence of frank-wolfe optimization variants. In Advances in Neural Information Processing Systems, pages 496–504, 2015. [9] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate frank-wolfe optimization for structural svms. In ICML 2013 International Conference on Machine Learning, pages 53–61, 2013. [10] O. Meshi, M. Mahdavi, and D. Sontag. On the tightness of lp relaxations for structured prediction. arXiv preprint arXiv:1511.01419, 2015. [11] O. Meshi, D. Sontag, T. Jaakkola, and A. Globerson. Learning efficiently with approximate inference via dual losses. 2010. [12] O. Meshi, N. Srebro, and T. Hazan. Efficient training of structured svms via soft constraints. In AISTAT, 2015. [13] A. Osokin, J.-B. Alayrac, I. Lukasewitz, P. K. Dokania, and S. Lacoste-Julien. Minding the gaps for block frank-wolfe optimization of structured svms. arXiv preprint arXiv:1605.09346, 2016. [14] P. Ravikumar and J. Lafferty. Quadratic programming relaxations for metric labeling and markov random field map estimation. In ICML, 2006. [15] R. Samdani and D. Roth. Efficient decomposed learning for structured prediction. ICML, 2012. [16] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter. Pegasos: Primal estimated sub-gradient solver for svm. Mathematical programming, 2011. [17] T. Su, T. Zhang, and D. Guan. Corpus-based hit-mw database for offline recognition of general-purpose chinese handwritten text. IJDAR, 10(1):27–38, 2007. [18] B. Taskar, V. Chatalbashev, D. Koller, and C. Guestrin. Learning structured prediction models: A large margin approach. In ICML, 2005. [19] B. Taskar, C. Guestrin, and D. Koller. Max-margin markov networks. In Advances in neural information processing systems, volume 16, 2003. [20] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In ICML, 2004. [21] P. Woodland and D. Povey. Large scale discriminative training for speech recognition. In ASR2000Automatic Speech Recognition Workshop (ITRW), 2000. [22] I. E. Yen, X. Lin, E. J. Zhang, E. P. Ravikumar, and I. S. Dhillon. A convex atomic-norm approach to multiple sequence alignment and motif discovery. 2016. [23] I. E. Yen, D. Malioutov, and A. Kumar. Scalable exemplar clustering and facility location via augmented block coordinate descent with column generation. In AISTAT, 2016. [24] I. E.-H. Yen, K. Zhong, C.-J. Hsieh, P. K. Ravikumar, and I. S. Dhillon. Sparse linear programming via primal and dual augmented coordinate descent. In NIPS, 2015. 9 | 2016 | 282 |
6,197 | Deep Learning for Predicting Human Strategic Behavior Jason Hartford, James R. Wright, Kevin Leyton-Brown Department of Computer Science University of British Columbia {jasonhar, jrwright, kevinlb}@cs.ubc.ca Abstract Predicting the behavior of human participants in strategic settings is an important problem in many domains. Most existing work either assumes that participants are perfectly rational, or attempts to directly model each participant’s cognitive processes based on insights from cognitive psychology and experimental economics. In this work, we present an alternative, a deep learning approach that automatically performs cognitive modeling without relying on such expert knowledge. We introduce a novel architecture that allows a single network to generalize across different input and output dimensions by using matrix units rather than scalar units, and show that its performance significantly outperforms that of the previous state of the art, which relies on expert-constructed features. 1 Introduction Game theory provides a powerful framework for the design and analysis of multiagent systems that involve strategic interactions [see, e.g., 16]. Prominent examples of such systems include search engines, which use advertising auctions to generate a significant portion of their revenues and rely on game theoretic reasoning to analyze and optimize these mechanisms [6, 20]; spectrum auctions, which rely on game theoretic analysis to carefully design the “rules of the game” in order to coordinate the reallocation of valuable radio spectrum [13]; and security systems, which analyze the allocation of security personnel as a game between rational adversaries in order to optimize their use of scarce resources [19]. In such applications, system designers optimize their choices with respect to assumptions about the preferences, beliefs and capabilities of human players [14]. A standard game theoretic approach is to assume that players are perfectly rational expected utility maximizers and indeed, that they have common knowledge of this. In some applications, such as the high-stakes spectrum auctions just mentioned, this assumption is probably reasonable, as participants are typically large companies that hire consultants to optimize their decision making. In other scenarios that allow less time for planning or involve less sophisticated participants, however, the perfect rationality assumption may lead to suboptimal system designs. For example, Yang et al. [24] were able to improve the performance of systems that defend against adversaries in security games by relaxing the perfect rationality assumption. Of course, relaxing this assumption means finding something else to replace it with: an accurate model of boundedly rational human behavior. The behavioral game theory literature has developed a wide range of models for predicting human behavior in strategic settings by incorporating cognitive biases and limitations derived from observations of play and insights from cognitive psychology [2]. Like much previous work, we study the unrepeated, simultaneous-move setting, for two reasons. First, the setting is conceptually straightforward: games can be represented in a so-called “normal form”, simply by listing the utilities to each player in for each combination of their actions (e.g., see Figure 1). Second, the setting is surprisingly general: auctions, security systems, and many other interactions can be modeled naturally 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 0 5 10 15 20 25 30 10,10 5,3 8,18 3,5 20,20 25,0 18,8 0,25 15,15 T M B T M B L C R Counts of Actions Figure 1: An example 3 × 3 normal form game. The row player chooses from actions {T, M, B} and the column player chooses from actions {R, C, L}. If the row player played action T and column player played action C, their resulting payoffs would be 3 and 5 respectively. Given such a matrix as input we aim to predict a distribution over the row player’s choice of actions defined by the observed frequency of actions shown on the right. as normal form games. The most successful predictive models for this setting combine notions of iterative reasoning and noisy best response [21] and use hand-crafted features to model the behavior of non-strategic players [23]. The recent success of deep learning has demonstrated that predictive accuracy can often be enhanced, and expert feature engineering dispensed with, by fitting highly flexible models that are capable of learning novel representations. A key feature in successful deep models is the use of careful design choices to encode “basic domain knowledge of the input, in particular its topological structure. . .to learn better features" [1, emphasis original]. For example, feed-forward neural nets can, in principle, represent the same functions as convolution networks, but the latter tend to be more effective in vision applications because they encode the prior that low-level features should be derived from the pixels within a small neighborhood and that predictions should be invariant to small input translations. Analogously, Clark and Storkey [4] encoded the fact that a Go board is invariant to rotations. These modeling choices constrain more general architectures to a subset of the solution space that is likely to contain good solutions. Our work seeks to do the same for the behavioral game theory setting, identifying novel prior assumptions that extend deep learning to predicting behavior in strategic scenarios encoded as two player, normal-form games. A key property required of such a model is invariance to game size: a model must be able to take as input an m × n bimatrix game (i.e., two m × n matrices encoding the payoffs of players 1 and 2 respectively) and output an m-dimensional probability distribution over player 1’s actions, for arbitrary values of n and m, including values that did not appear in training data. In contrast, existing deep models typically assume either a fixed-dimensional input or an arbitrary-length sequence of fixed-dimensional inputs, in both cases with a fixed-dimensional output. We also have the prior belief that permuting rows and columns in the input (i.e., changing the order in which actions are presented to the players) does not change the output beyond a corresponding permutation. In Section 3, we present an architecture that operates on matrices using scalar weights to capture invariance to changes in the size of the input matrices and to permutations of its rows and columns. In Section 4 we evaluate our model’s ability to predict distributions of play given normal form descriptions of games on a dataset of experimental data from a variety of experiments, and find that our feature-free deep learning model significantly exceeds the performance of the current state-of-the-art model, which has access to hand-tuned features based on expert knowledge [23]. 2 Related Work Prediction in normal form games. The task of predicting actions in normal form games has been studied mostly in the behavioral game theory literature. Such models tend to have few parameters and to aim to describe previously identified cognitive processes. Two key ideas are the relaxation of best response to “quantal response” and the notion of “limited iterative strategic reasoning”. Models that assume quantal response assume that players select actions with probability increasing in expected utility instead of always selecting the action with the largest expected utility [12]. This is expressed formally by assuming that players select actions, ai, with probability, si, given by the logistic quantal response function si(ai) = exp(λui(ai,s−i)) P a′ i exp(λui(a′ i,s−i)). This function is equivalent to the familiar softmax function with an additional scalar sharpness parameter λ that allows the function to output the best response as λ →∞and the uniform distribution as λ →0. This relaxation is motivated by the behavioral notion that if two actions have similar expected utility then they will also have similar probability of being chosen. Iterative strategic reasoning means that players perform a bounded 2 number of steps of reasoning in deciding on their actions, rather than always converging to fixed points as in classical game theory. Models incorporating this idea typically assume that every agent has an integer level. Non-strategic, “level-0” players choose actions uniformly at random; level-k players best respond to the level-(k −1) players [5] or to a mixture of levels between level-0 and level-(k −1) [3]. The two ideas can be combined, allowing players to quantally respond to lower level players [18, 22]. Because iterative reasoning models are defined recursively starting from a base-case of level-0 behavior, their performance can be improved by better modeling the non-strategic level-0 players. Wright and Leyton-Brown [23] combine quantal response and bounded steps of reasoning with a model of non-strategic behavior based on hand-crafted game theoretic features. To the best of our knowledge, this is the current state-of-the-art model. Deep learning. Deep learning has demonstrated much recent success in solving supervised learning problems in vision, speech and natural language processing [see, e.g., 9, 15]. By contrast, there have been relatively few applications of deep learning to multiagent settings. Notable exceptions are Clark and Storkey [4] and the policy network used in Silver et al. [17]’s work in predicting the actions of human players in Go. Their approach is similar in spirit to ours: they map from a description of the Go board at every move to the choices made by human players, while we perform the same mapping from a normal form game. The setting differs in that Go is a single, sequential, zero-sum game with a far larger, but fixed, action space, which requires an architecture tailored for pattern recognition on the Go board. In contrast, we focus on constructing an architecture that generalizes across general-sum, normal form games. We enforce invariance to the size of the network’s input. Fully convolutional networks [11] achieve invariance to the image size in a similar by manner replacing all fully connected layers with convolutions. In its architectural design, our model is mathematically similar to Lin et al. [10]’s Network in Network model, though we derived our architecture independently using game theoretic invariances. We discuss the relationships between the two models at the end of Section 3. 3 Modeling Human Strategic Behavior with Deep Networks A natural starting point in applying deep networks to a new domain is testing the performance of a regular feed-forward neural network. To apply such a model to a normal form game, we need to flatten the utility values into a single vector of length mn + nm and learn a function that maps to the msimplex output via multiple hidden layers. Feed-forward networks can’t handle size-invariant inputs, but we can temporarily set that problem aside by restricting ourselves to games with a fixed input size. We experimented with that approach and found that feed-forward networks often generalized poorly as the network overfitted the training data (see Section 2 of the supplementary material for experimental evidence). One way of combating overfitting is to encourage invariance through data augmentation: for example, one may augment a dataset of images by rotating, shifting and scaling the images slightly. In games, a natural simplifying assumption is that players are indifferent to the order in which actions are presented, implying invariance to permutations of the payoff matrix.1 Incorporating this assumption by randomly permuting rows or columns of the payoff matrix at every epoch of training dramatically improved the generalization performance of a feed-forward network in our experiments, but the network is still limited to games of the size that it was trained on. Our approach is to enforce this invariance in the model architecture rather than through data augmentation. We then add further flexibility using novel “pooling units” and by incorporating iterative response ideas inspired by behavioral game theory models. The result is a model that is flexible enough to represent the all the models surveyed in Wright and Leyton-Brown [22, 23]—and a huge space of novel models as well—and which can be identified automatically. The model is also invariant to the size of the input payoff matrix, differentiable end to end and trainable using standard gradient-based optimization. The model has two parts: feature layers and action response layers; see Figure 2 for a graphical overview. The feature layers take the row and column player’s normalized utility matrices U(r) and U(c) ∈Rm×n as input, where the row player has m actions and the column player has n actions. The feature layers consist of multiple levels of hidden matrix units, H(r) i,j ∈Rm×n, each of which calculates a weighted sum of the units below and applies a non-linear activation function. Each 1We thus ignore salience effects that could arise from action ordering; we plan to explore this in future work. 3 H(r) 1,1 H1,1 ↓ H1,1 ↓ ... H(r) 1,j H1,j ↓ H1,j ↓ H(r) 2,1 H2,1 ↓ H2,1 ↓ ... H(r) 2,j H2,j ↓ H2,j ↓ . . . . . . f1 ... fj Feature Layers Output Input Units Softmax Units H(c) 1,1 H1,1 ↓ H1,1 ↓ ... H(c) 1,j H1,j ↓ H1,j ↓ H(c) 2,1 H2,1 ↓ H2,1 ↓ ... H(c) 2,j H2,j ↓ H2,j ↓ . . . . . . f1 ... fj U(r) U(r) ↓ U(r) ↓ U(c) U(c) ↓ U(c) ↓ ar(r) 0 ar(r) 1 ... ar(r) k−1 ar(r) k ar(c) 0 ar(c) 1 ... ar(c) k−1 y Action Response Layers Figure 2: A schematic representation of our architecture. The feature layers consist of hidden matrix units (orange), each of which use pooling units to output row- and column-preserving aggregates (blue and purple) before being reduced to distributions over actions in the softmax units (red). Iterative response is modeled using the action response layers (green) and the final output, y, is a weighted sum of the row player’s action response layers. layer of hidden units is followed by pooling units, which output aggregated versions of the hidden matrices to be used by the following layer. After multiple layers, the matrices are aggregated to vectors and normalized to a distribution over actions, f (r) i ∈∆m in softmax units. We refer to these distributions as features because they encode higher-level representations of the input matrices that may be combined to construct the output distribution. As discussed earlier, iterative strategic reasoning is an important phenomenon in human decision making; we thus want to allow our models the option of incorporating such reasoning. To do so, we compute features for the column player in the same manner by applying the feature layers to the transpose of the input matrices, which outputs f (c) i ∈∆n. Each action response layer for a given player then takes the opposite player’s preceding action response layers as input and uses them to construct distributions over the respective players’ outputs. The final output y ∈∆m is a weighted sum of all action response layers’ outputs. Invariance-Preserving Hidden Units We build a model that ties parameters in our network by encoding the assumption that players reason about each action identically. This assumption implies that the row player applies the same function to each row of a given game’s utility matrices. Thus, in a normal form game represented by the utility matrices U(r) and U(c), the weights associated with each row of U(r) and U(c) must be the same. Similarly, the corresponding assumption about the column player implies that the weights associated with each column of U(r) and U(c) must also be the same. We can satisfy both assumptions by applying a single scalar weight to each of the utility matrices, computing wrU(r) + wcU(c). This idea can be generalized as in a standard feed-forward network to allow us to fit more complex functions. A hidden matrix unit taking all the preceding hidden matrix units as input can be calculated as Hl,i = φ X j wl,i,j Hl−1,j + bl,i Hl,i ∈Rm×n, where Hl,i is the ith hidden unit matrix for layer l, wl,i,j is the jth scalar weight, bl,i is a scalar bias variable, and φ is a non-linear activation function applied element-wise. Notice that, as in a traditional feed-forward neural network, the output of each hidden unit is simply a nonlinear transformation of the weighted sum of the preceding layer’s hidden units. Our architecture differs by maintaining a 4 Figure 3: Left: Without pooling units, each element of every hidden matrix unit depends only on the corresponding elements in the units from the layer below; e.g., the middle element highlighted in red depends only on the value of the elements of the matrices highlighted in orange. Right: With pooling units at each layer in the network, each element of every hidden matrix unit depends both on the corresponding elements in the units below and the pooled quantity from each row and column. E.g., the light blue and purple blocks represent the row and column-wise aggregates corresponding to their adjacent matrices. The dark blue and purple blocks show which of these values the red element depends on. Thus, the red element depends on both the dark- and light-shaded orange cells. JH: TODO: add level labels Action Response Layers The feature layers described above are sufficient to meet our objective 203 of mapping from the input payoff matrices to a distribution over the row player’s actions. However, 204 this architecture is not capable of explicitly representing iterative strategic reasoning, which the 205 behavioral game theory literature has identified as an important modeling ingredient. We incorporate 206 this ingredient using action response layers: the first player can respond to the second’s beliefs, 207 the second can respond to this response by the first player, and so on to some finite depth. The 208 proportion of players in the population who iterate at each depth is a parameter of the model; thus, 209 our architecture is also able to learn not to perform iterative reasoning. 210 More formally, we begin by denoting the output of the feature layers as ar(r) 0 = Pk i=1 w(r) 0i f (r) i , 211 where we now include an index (r) to refer to the output of row player’s action response layer 212 ar(r) 0 2 ∆m. Similarly, by applying the feature layers to a transposed version of the input matrices, 213 the model also outputs a corresponding ar(c) 0 2 ∆n for the column player which expresses the row 214 player’s beliefs about which actions the column player will choose. Each action response layer 215 composes its output by calculating the expected value of an internal representation of utility with 216 respect to its belief distribution over the opposition actions. For this internal representation of utility 217 we chose simply a weighted sum of the final layer of the hidden layers, P i wiHL,i, because each 218 HL,i is already some non-linear transformation of the original payoff matrix, and so this allows the 219 model to express utility as a transformation of the original payoffs. Given the matrix that results from 220 this sum, we can compute expected utility with respect to the vector of beliefs about the opposition’s 221 choice of actions, ar(c) j , by simply taking the dot product of the weighted sum and beliefs. When 222 we iterate this process of responding to beliefs about one’s opposition more than once, higher level 223 players will respond to beliefs, ari, for all i less their level and then output a weighted combination 224 of these responses using some weights, vl,i. Putting this together, the lth action response layer for the 225 row player (r) is defined as 226 ar(r) l = softmax λl l−1 X j=0 v(r) l,j k X i=1 w(r) l,i H(r) L,i ! · ar(c) j !! , ar(r) l 2 ∆m, l 2 {1, ..., K}, where l indexes the action response layer, λl is a scalar sharpness parameter that allows us to sharpen 227 the resulting distribution, w(r) l,i and v(r) l,j are scalar weights, HL,i are the row player’s k hidden units 228 from the final hidden layer L, ar(c) j is the output of the column player’s jth action response layer and 229 K is the total number of action response layers. We constrain w(r) li and v(r) lj to the simplex and use 230 λl to sharpen the output distribution so that we can optimize the sharpness of the distribution and 231 relative weighting of its terms independently. We build up the column player’s action response layer, 232 ar(c) l , similarly, using the column player’s internal utility representation, H(c) L,i, responding to the row 233 player’s action response layers, ar(r) l . These layers are not used in the final output directly but are 234 relied upon by subsequent action response layers of the row player. 235 6 Figure 3: Left: Without pooling units, each element of every hidden matrix unit depends only on the corresponding elements in the units from the layer below; e.g., the middle element highlighted in red depends only on the value of the elements of the matrices highlighted in orange. Right: With pooling units at each layer in the network, each element of every hidden matrix unit depends both on the corresponding elements in the units below and the pooled quantity from each row and column. E.g., the light blue and purple blocks represent the row and column-wise aggregates corresponding to their adjacent matrices. The dark blue and purple blocks show which of these values the red element depends on. Thus, the red element depends on both the dark- and light-shaded orange cells. JH: TODO: add level labels Action Response Layers The feature layers described above are sufficient to meet our objective 203 of mapping from the input payoff matrices to a distribution over the row player’s actions. However, 204 this architecture is not capable of explicitly representing iterative strategic reasoning, which the 205 behavioral game theory literature has identified as an important modeling ingredient. We incorporate 206 this ingredient using action response layers: the first player can respond to the second’s beliefs, 207 the second can respond to this response by the first player, and so on to some finite depth. The 208 proportion of players in the population who iterate at each depth is a parameter of the model; thus, 209 our architecture is also able to learn not to perform iterative reasoning. 210 More formally, we begin by denoting the output of the feature layers as ar(r) 0 = Pk i=1 w(r) 0i f (r) i , 211 where we now include an index (r) to refer to the output of row player’s action response layer 212 ar(r) 0 2 ∆m. Similarly, by applying the feature layers to a transposed version of the input matrices, 213 the model also outputs a corresponding ar(c) 0 2 ∆n for the column player which expresses the row 214 player’s beliefs about which actions the column player will choose. Each action response layer 215 composes its output by calculating the expected value of an internal representation of utility with 216 respect to its belief distribution over the opposition actions. For this internal representation of utility 217 we chose simply a weighted sum of the final layer of the hidden layers, P i wiHL,i, because each 218 HL,i is already some non-linear transformation of the original payoff matrix, and so this allows the 219 model to express utility as a transformation of the original payoffs. Given the matrix that results from 220 this sum, we can compute expected utility with respect to the vector of beliefs about the opposition’s 221 choice of actions, ar(c) j , by simply taking the dot product of the weighted sum and beliefs. When 222 we iterate this process of responding to beliefs about one’s opposition more than once, higher level 223 players will respond to beliefs, ari, for all i less their level and then output a weighted combination 224 of these responses using some weights, vl,i. Putting this together, the lth action response layer for the 225 row player (r) is defined as 226 ar(r) l = softmax λl l−1 X j=0 v(r) l,j k X i=1 w(r) l,i H(r) L,i ! · ar(c) j !! , ar(r) l 2 ∆m, l 2 {1, ..., K}, where l indexes the action response layer, λl is a scalar sharpness parameter that allows us to sharpen 227 the resulting distribution, w(r) l,i and v(r) l,j are scalar weights, HL,i are the row player’s k hidden units 228 from the final hidden layer L, ar(c) j is the output of the column player’s jth action response layer and 229 K is the total number of action response layers. We constrain w(r) li and v(r) lj to the simplex and use 230 λl to sharpen the output distribution so that we can optimize the sharpness of the distribution and 231 relative weighting of its terms independently. We build up the column player’s action response layer, 232 ar(c) l , similarly, using the column player’s internal utility representation, H(c) L,i, responding to the row 233 player’s action response layers, ar(r) l . These layers are not used in the final output directly but are 234 relied upon by subsequent action response layers of the row player. 235 6 Input Units Hidden Layer 1 Hidden Layer 2 Figure 3: Left: Without pooling units, each element of every hidden matrix unit depends only on the corresponding elements in the units from the layer below; e.g., the middle element highlighted in red depends only on the value of the elements of the matrices highlighted in orange. Right: With pooling units at each layer in the network, each element of every hidden matrix unit depends both on the corresponding elements in the units below and the pooled quantity from each row and column. E.g., the light blue and purple blocks represent the row and column-wise aggregates corresponding to their adjacent matrices. The dark blue and purple blocks show which of these values the red element depends on. Thus, the red element depends on both the dark- and light-shaded orange cells. matrix at each hidden unit instead of a scalar. So while in a traditional feed-forward network each hidden unit maps the previous layer’s vector of outputs into a scalar output, in our architecture each hidden unit maps a tensor of outputs from the previous layer into a matrix output. Tying weights in this way reduces the number of parameters in our network by a factor of nm, offering two benefits. First, it reduces the degree to which the network is able to overfit; second and more importantly, it makes the model invariant to the size of the input matrices. To see this, notice that each hidden unit maps from a tensor containing the k output matrices of the preceding layer in Rk×m×n to a matrix in Rm×n using k weights. Thus our number of parameters in each layer depends on the number of hidden units in the preceding layer, but not on the sizes of the input and output matrices. This allows the model to generalize to input sizes that do not appear in training data. Pooling units A limitation of the weight tying used in our hidden matrix units is that it forces independence between the elements of their matrices, preventing the network from learning functions that compare the values of related elements (see Figure 3 (left)). Recall that each element of the matrices in our model corresponds to an outcome in a normal form game. A natural game theoretic notion of the “related elements” which we’d like our model to be able to compare is the set of payoffs associated with each of the players’ actions that led to that outcome. This corresponds to the row and column of each matrix associated with the particular element. This observation motivates our pooling units, which allow information sharing by outputting aggregated versions of their input matrix that may be used by later layers in the network to learn to compare the values of a particular cell in a matrix and its row- or column-wise aggregates. H →{Hc, Hr} = maxi hi,1 maxi hi,2 . . . maxi hi,1 maxi hi,2 . . . ... ... maxi hi,1 maxi hi,2 , maxj h1,j maxj h1,j . . . maxj h2,j maxj h2,j . . . ... ... maxj hm,j maxj hm,j . . . (1) A pooling unit takes a matrix as input and outputs two matrices constructed from row- and columnpreserving pooling operations respectively. A pooling operation could be any continuous function that maps from Rn →R. We use the max function because it is a necessary to represent known behavioral functions (see Section 4 of the supplementary material for details) and offered the best empirical performance of the functions we tested. Equation (1) shows an example of a pooling layer with max functions for some arbitrary matrix H. The first of the two outputs, Hc, is column-preserving in that it selects the maximum value in each column of H and then stacks the resulting vector n-dimensional vector m times such that the dimensionality of H and Hc are the same. Similarly, the row-preserving output constructs a vector of the max elements in each column and stacks the resulting m-dimensional vector n times such that Hr and H have the same dimensionality. We stack the vectors that result from the pooling operation in this fashion so that the hidden units from the next layer in the network may take H, Hc and Hr as input. This allows these later hidden units to learn functions where each element of their output is a function both of the corresponding element from the matrices below as well as their row and column-preserving maximums (see Figure 3 (right)). 5 Softmax output Our model predicts a distribution over the row player’s actions. In order to do this, we need to map from the hidden matrices in the final layer, HL,i ∈Rm×n, of the network onto a point on the m-simplex, ∆m. We achieve this mapping by applying a row-preserving sum to each of the final layer hidden matrices HL,i (i.e. we sum uniformly over the columns of the matrix as described above) and then applying a softmax function to convert each of the resulting vectors hi into normalized distributions. This produces k features fi, each of which is a distribution over the row player’s m actions: fi = softmax h(i) where h(i) j = n X k=1 h(i) j,k for all j ∈{1, ..., m}, h(i) j,k ∈H(i) i ∈{1, ..., k}. We can then produce the output of our features, ar0, using a weighted sum of the individual features, ar0 = Pk i=1 wifi, where we optimize wi under simplex constraints, wi ≥0, P i wi = 1. Because each fi is a distribution and our weights wi are points on the simplex, the output of the feature layers is a mixture of distributions. Action Response Layers The feature layers described above are sufficient to meet our objective of mapping from the input payoff matrices to a distribution over the row player’s actions. However, this architecture is not capable of explicitly representing iterative strategic reasoning, which the behavioral game theory literature has identified as an important modeling ingredient. We incorporate this ingredient using action response layers: the first player can respond to the second’s beliefs, the second can respond to this response by the first player, and so on to some finite depth. The proportion of players in the population who iterate at each depth is a parameter of the model; thus, our architecture is also able to learn not to perform iterative reasoning. More formally, we begin by denoting the output of the feature layers as ar(r) 0 = Pk i=1 w(r) 0i f (r) i , where we now include an index (r) to refer to the output of row player’s action response layer ar(r) 0 ∈∆m. Similarly, by applying the feature layers to a transposed version of the input matrices, the model also outputs a corresponding ar(c) 0 ∈∆n for the column player which expresses the row player’s beliefs about which actions the column player will choose. Each action response layer composes its output by calculating the expected value of an internal representation of utility with respect to its belief distribution over the opposition actions. For this internal representation of utility we chose a weighted sum of the final layer of the hidden layers, P i wiHL,i, because each HL,i is already some non-linear transformation of the original payoff matrix, and so this allows the model to express utility as a transformation of the original payoffs. Given the matrix that results from this sum, we can compute expected utility with respect to the vector of beliefs about the opposition’s choice of actions, ar(c) j , by simply taking the dot product of the weighted sum and beliefs. When we iterate this process of responding to beliefs about one’s opposition more than once, higher-level players will respond to beliefs, ari, for all i less than their level and then output a weighted combination of these responses using some weights, vl,i. Putting this together, the lth action response layer for the row player (r) is defined as ar(r) l = softmax λl l−1 X j=0 v(r) l,j k X i=1 w(r) l,i H(r) L,i ! · ar(c) j !! , ar(r) l ∈∆m, l ∈{1, ..., K}, where l indexes the action response layer, λl is a scalar sharpness parameter that allows us to sharpen the resulting distribution, w(r) l,i and v(r) l,j are scalar weights, HL,i are the row player’s k hidden units from the final hidden layer L, ar(c) j is the output of the column player’s jth action response layer, and K is the total number of action response layers. We constrain w(r) li and v(r) lj to the simplex and use λl to sharpen the output distribution so that we can optimize the sharpness of the distribution and relative weighting of its terms independently. We build up the column player’s action response layer, ar(c) l , similarly, using the column player’s internal utility representation, H(c) L,i, responding to the row player’s action response layers, ar(r) l . These layers are not used in the final output directly but are relied upon by subsequent action response layers of the row player. Output Our model’s final output is a weighted sum of the outputs of the action response layers. This output needs to be a valid distribution over actions. Because each of the action response layers 6 also outputs a distribution over actions, we can achieve this requirement by constraining these weights to the simplex, thereby ensuring that the output is just a mixture of distributions. The model’s output is thus y = PK j=1 wjar(r) j , where y and ar(r) j ∈∆m, and wj ∈∆K. Relation to existing deep models Our model’s functional form has interesting connections with existing deep model architectures. We discuss two of these here. First, our invariance-preserving hidden layers can be encoded as MLP Convolution Layers described in Lin et al. [10] with the twochannel 1 × 1 input xi,j corresponding to the two players’ respective payoffs when actions i and j are played (using patches larger than 1 × 1 would imply the assumption that local structure is important, which is inappropriate in our domain; thus, we do not need multiple mlpconv layers). Second, our pooling units are superficially similar to the pooling units used in convolutional networks. However, ours differ both in functional form and purpose: we use pooling as a way of sharing information between cells in the matrices that are processed through our network by taking maximums across entire rows or columns, while in computer vision, max-pooling units are used to produce invariance to small translations of the input image by taking maximums in a small local neighborhood. Representational generality of our architecture Our work aims to extend existing models in behavioral game theory via deep learning, not to propose an orthogonal approach. Thus, we must demonstrate that our representation is rich enough to capture models and features that have proven important in that literature. We omit the details here for space reasons (see the supplementary material, Section 4), but summarize our findings. Overall, our architecture can express the quantal cognitive hierarchy [23] and quantal level-k [18] models and as their sharpness tends to infinity, their best-response equivalents cognitive hierarchy [3] and level-k [5]. Using feature layers we can also encode all the behavioral features used in Wright and Leyton-Brown [23]. However, our architecture is not universal; notably, it is unable to express certain features that are likely to be useful, such as identification of dominated strategies. We plan to explore this in future work. 4 Experiments Experimental Setup We used a dataset combining observations from 9 human-subject experimental studies conducted by behavioral economists in which subjects were paid to select actions in normal-form games. Their payment depended on the subject’s actions and the actions of their unseen opposition who chose an action simultaneously (see Section 1 of the supplementary material for further details on the experiments and data). We are interested in the model’s ability to predict the distribution over the row player’s action, rather than just its accuracy in predicting the most likely action. As a result, we fit models to maximize the likelihood of training data P(D|θ) (where θ are the parameters of the model and D is our dataset) and evaluate them in terms of negative log-likelihood on the test set. All the models presented in the experimental section were optimized using Adam [8] with an initial learning rate of 0.0002, β1 = 0.9, β2 = 0.999 and ϵ = 10−8. The models were all regularized using Dropout with drop probability = 0.2 and L1 regularization with parameter = 0.01. They were all trained until there was no training set improvement up to a maximum of 25 000 epochs and the parameters from the iteration with the best training set performance was returned. Our architecture imposes simplex constraints on the mixture weight parameters. Fortunately, simplex constraints fall within the class of simple constraints that can be efficiently optimized using the projected gradient algorithm [7]. The algorithm modifies standard SGD by projecting the relevant parameters onto the constraint set after each gradient update. Experimental Results Figure 4 (left) shows a performance comparison between a model built using our deep learning architecture with only a single action response layer (i.e. no iterative reasoning; details below) and the previous state of the art, quantal cognitive hierarchy (QCH) with hand-crafted features (shown as a blue line); for reference we also include the best feature-free model, QCH with a uniform model of level-0 behavior (shown as a pink line). We refer to an instantiation of our model with L hidden layers and K action response layers as an N + K layer network. All instantiations of our model with 3 or more layers significantly improved on both alternatives and thus represents a new state of the art. Notably, the magnitude of the improvement was considerably larger than that of adding hand-crafted features to the original QCH model. 7 50 20, 20 50, 50 100, 100 50, 50, 50 100, 100, 100 940 960 980 1000 1020 1040 NLL (Test Loss) 50 20, 20 50, 50 100, 100 50, 50, 50 100, 100, 100 Model Variations (# hidden units) 7500 8000 8500 9000 9500 NLL (Training Loss) 50, 50 (no pooling) 50, 50 (pooling) 100,100,100 (no pooling) 100,100,100 (pooling) 940 960 980 1000 1020 1040 NLL (Test Loss) 50, 50 (no pooling) 50, 50 (pooling) 100,100,100 (no pooling) 100,100,100 (pooling) Pooling Comparison (# units) 7500 8000 8500 9000 9500 NLL (Training Loss) 1 2 3 4 940 960 980 1000 1020 1040 NLL (Test Loss) 1 2 3 4 Action Response (# layers) 7500 8000 8500 9000 9500 NLL (Training Loss) Figure 4: Negative Log Likelihood Performance. The error bars represent 95% confidence intervals across 10 rounds of 10-fold cross-validation. We compare various models built using our architecture to QCH Uniform (pink line) and QCH Linear4 (blue line). Figure 4 (left) considers the effect of varying the number of hidden units and layers on performance using a single action response layer. Perhaps unsurprisingly, we found that a two layer network with only a single hidden layer of 50 units performed poorly on both training and test data. Adding a second hidden layer resulted in test set performance that improved on the previous state of the art. For these three layer networks (denoted (20, 20), (50, 50) and (100, 100)), performance improved with more units per layer, but there were diminishing returns to increasing the number of units per layer beyond 50. The four-layer networks (denoted (50, 50, 50) and (100, 100, 100)) offered further improvements in training set performance but test set performance diminished as the networks were able to overfit the data. To test the effect of pooling units on performance, in Figure 4 (center) we first removed the pooling units from two of the network configurations, keeping the rest of the hyper-parameters unchanged. The models that did not use pooling layers under fit on the training data and performed very poorly on the test set. While we were able to improve their performance by turning off dropout, these unregularized networks didn’t match the training set performance of the corresponding network configurations that had pooling units (see Section 3 of the supplementary material). Thus, our final network contained two layers of 50 hidden units and pooling units. Our next set of experiments committed to this configuration for feature layers and investigated configurations of action-response layers, varying their number between one and four (i.e., from no iterative reasoning up to three levels of iterative reasoning; see Figure 4 (right) ). The networks with more than one action-response layer showed signs of overfitting: performance on the training set improved steadily as we added AR layers but test set performance suffered. Thus, our final network used only one action-response layer. We nevertheless remain committed to an architecture that can capture iterative strategic reasoning; we intend to investigate more effective methods of regularizing the parameters of action-response layers in future work. 5 Discussion and Conclusions To design systems that efficiently interact with human players, we need an accurate model of boundedly rational behavior. We present an architecture for learning such models that significantly improves upon state-of-the-art performance without needing hand-tuned features developed by domain experts. Interestingly, while the full architecture can include action response layers to explicitly incorporate the iterative reasoning process modeled by level-k-style models, our best performing model did not need them to achieve set a new performance benchmark. This indicates that the model is performing the mapping from payoffs to distributions over actions in a manner that is substantially different from previous successful models. Some natural future directions, besides those already discussed above, are to extend our architecture beyond two-player, unrepeated games to games with more than two players, as well as to richer interaction environments, such as games in which the same players interact repeatedly and games of imperfect information. 8 References [1] Y. Bengio, A. Courville, and P. Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 2013. [2] C.F. Camerer. Behavioral game theory: Experiments in strategic interaction. Princeton University Press, 2003. [3] C.F. Camerer, T.H. Ho, and J.K. Chong. A cognitive hierarchy model of games. Quarterly Journal of Economics, 119(3), 2004. [4] C. Clark and A. J. Storkey. Training deep convolutional neural networks to play go. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, 2015. [5] M. Costa-Gomes, V.P. Crawford, and B. Broseta. Cognition and behavior in normal-form games: An experimental study. Econometrica, 69(5), 2001. [6] B. Edelman, M. Ostrovsky, and M. Schwarz. Internet advertising and the generalized secondprice auction: Selling billions of dollars worth of keywords. The American Economic Review, 97(1), 2007. [7] A. Goldstein. Convex programming in hilbert space. Bulletin of the American Mathematical Society, 70(5), 09 1964. [8] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In The International Conference on Learning Representations (ICLR), 2015. [9] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 2015. [10] M. Lin, Q. Chen, and S. Yan. Network in network. In International Conference on Learning Representations, volume abs/1312.4400. 2014. [11] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, June 2015. [12] R.D. McKelvey and T.R. Palfrey. Quantal response equilibria for normal form games. GEB, 10 (1), 1995. [13] P. Milgrom and I. Segal. Deferred-acceptance auctions and radio spectrum reallocation. In Proceedings of the Fifteenth ACM Conference on Economics and Computation. ACM, 2014. [14] D. C. Parkes and M. P. Wellman. Economic reasoning and artificial intelligence. Science, 349 (6245), 2015. [15] J. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 2015. [16] Y. Shoham and K. Leyton-Brown. Multiagent Systems: Algorithmic, Game-theoretic, and Logical Foundations. Cambridge University Press, 2008. [17] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, Grewe D, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529, 2016. [18] D.O. Stahl and P.W. Wilson. Experimental evidence on players’ models of other players. JEBO, 25(3), 1994. [19] M. Tambe. Security and Game Theory: Algorithms, Deployed Systems, Lessons Learned. Cambridge University Press, New York, NY, USA, 1st edition, 2011. [20] H. R. Varian. Position auctions. International Journal of Industrial Organization, 25, 2007. [21] J. R. Wright and K. Leyton-Brown. Beyond equilibrium: Predicting human behavior in normalform games. In AAAI. AAAI Press, 2010. [22] J. R. Wright and K. Leyton-Brown. Behavioral game-theoretic models: A Bayesian framework for parameter analysis. In Proceedings of the 11th International Conference on Autonomous Agents and Multiagent Systems (AAMAS-2012), volume 2, pages 921–928, 2012. [23] J. R. Wright and K. Leyton-Brown. Level-0 meta-models for predicting human behavior in games. In Proceedings of the Fifteenth ACM Conference on Economics and Computation, pages 857–874, 2014. [24] R. Yang, C. Kiekintvled, F. Ordonez, M. Tambe, and R. John. Improving resource allocation strategies against human adversaries in security games: An extended study. Artificial Intelligence Journal (AIJ), 2013. 9 | 2016 | 283 |
6,198 | Online and Differentially-Private Tensor Decomposition Yining Wang Machine Learning Department Carnegie Mellon University yiningwa@cs.cmu.edu Animashree Anandkumar Department of EECS University of California, Irvine a.anandkumar@uci.edu Abstract Tensor decomposition is an important tool for big data analysis. In this paper, we resolve many of the key algorithmic questions regarding robustness, memory efficiency, and differential privacy of tensor decomposition. We propose simple variants of the tensor power method which enjoy these strong properties. We present the first guarantees for online tensor power method which has a linear memory requirement. Moreover, we present a noise calibrated tensor power method with efficient privacy guarantees. At the heart of all these guarantees lies a careful perturbation analysis derived in this paper which improves up on the existing results significantly. Keywords: Tensor decomposition, tensor power method, online methods, streaming, differential privacy, perturbation analysis. 1 Introduction In recent years, tensor decomposition has emerged as a powerful tool to solve many challenging problems in unsupervised [1], supervised [18] and reinforcement learning [4]. Tensors are higher order extensions of matrices which can reveal far greater information compared to matrices, while retaining most of the efficiencies of matrix operations [1]. A central task in tensor analysis is the process of decomposing the tensor into its rank-1 components, which is usually referred to as CP (Candecomp/Parafac) decomposition in the literature. While decomposition of arbitrary tensors is NP-hard [13], it becomes tractable for the class of tensors with linearly independent components. Through a simple whitening procedure, such tensors can be converted to orthogonally decomposable tensors. Tensor power method is a popular method for computing the decomposition of an orthogonal tensor. It is simple and efficient to implement, and a natural extension of the matrix power method. In the absence of noise, the tensor power method correctly recovers the components under a random initialization followed by deflation. On the other hand, perturbation analysis of tensor power method is much more delicate compared to the matrix case. This is because the problem of tensor decomposition is NP-hard, and if a large amount of arbitrary noise is added to an orthogonal tensor, the decomposition can again become intractable. In [1], guaranteed recovery of components was proven under bounded noise, and the bound was improved in [2]. In this paper, we significantly improve upon the noise requirements, i.e. the extent of noise that can be withstood by the tensor power method. In order for tensor methods to be deployed in large-scale systems, we require fast, parallelizable and scalable algorithms. To achieve this, we need to avoid the exponential increase in computation and memory requirements with the order of the tensor; i.e. a naive implementation on a 3rd-order d-dimensional tensor would require O(d3) computation and memory. Instead, we analyze the online tensor power method that requires only linear (in d) memory and does not form the entire tensor. This is achieved in settings, where the tensor is an empirical higher order moment, computed from the stream of data samples. We can avoid explicit construction of the tensor by running online tensor 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. power method directly on i.i.d. data samples. We show that this algorithm correctly recovers tensor components in time1 ˜O(nk2d) and ˜O(dk) memory for a rank-k tensor and n number of data samples. Additionally, we provide efficient sample complexity analysis. As spectral methods become increasingly popular with recommendation system and health analytics applications [29, 17], data privacy is particularly relevant in the context of preserving sensitive private information. Differential privacy could still be useful even if data privacy is not the prime concern [30]. We propose the first differentially private tensor decomposition algorithm with both privacy and utility guarantees via noise calibrated power iterations. We show that under the natural assumption of tensor incoherence, privacy parameters have no (polynomial) dependence on tensor dimension d. On the other hand, straightforward input perturbation type methods lead to far worse bounds and do not yield guaranteed recovery for all values of privacy parameters. 1.1 Related work Online tensor SGD Stochastic gradient descent (SGD) is an intuitive approach for online tensor decomposition and has been successful in practical large-scale tensor decomposition problems [16]. Despite its simplicity, theoretical properties are particularly hard to establish. [11] considered a variant of the SGD objective and proved its correctness. However, the approach in [11] only works for even-order tensors and its sample complexity dependency upon tensor dimension d is poor. Tensor PCA In the statistical tensor PCA [24] model a d×d×d tensor T = v⊗3+E is observed and one wishes to recover component v under the presence of Gaussian random noise E. [24] shows that ∥E∥op = O(d−1/2) is sufficient to guarantee approximate recovery of v and [14] further improves the noise condition to ∥E∥op = O(d−1/4) via a 4th-order sum-of-squares relaxation. Techniques in both [24, 14] are rather complicated and could be difficult to adapt to memory or privacy constraints. Furthermore, in [24, 14] only one component is considered. On the other hand, [25] shows that ∥E∥op = O(d−1/2) is sufficient for recovering multiple components from noisy tensors. However, [25] assumes exact computation of rank-1 tensor approximation, which is NP-hard in general. Noisy matrix power methods Our relaxed noise condition analysis for tensor power method is inspired by recent analysis of noisy matrix power methods [12, 6]. Unlike the matrix case, tensor decomposition no longer requires spectral gap among eigenvalues and eigenvectors are usually recovered one at a time [1, 2]. This poses new challenges and requires non-trivial extensions of matrix power method analysis to the tensor case. 1.2 Notation and Preliminaries We use [n] to denote the set {1, 2, · · · , n}. We use bold characters A, T, v for matrices, tensors, vectors and normal characters λ, µ for scalars. A pth order tensor T of dimensions d1, · · · , dp has d1 × · · · × dp elements, each indexed by a p-tuple (i1, · · · , ip) ∈[d1] × · · · × [dp]. A tensor T of dimensions d × · · · × d is super-symmetric or simply symmetric if Ti1,··· ,ip = Tσ(i1),··· ,σ(ip) for all permutations σ : [p] →[p]. For a tensor T ∈Rd1×···×dp and matrices A1 ∈Rm1×d1, · · · , Ap ∈ Rmp×dp, the multi-linear form T(A1, · · · , Ap) is a m1 × · · · × mp tensor defined as [T(A1, · · · , Ap)]i1,··· ,ip = X j1∈[d1] · · · X jp∈[dp] Tj1,··· ,jp[A1]j1,i1 · · · [Ap]jp,ip. We use ∥v∥2 = pP i v2 i for vector 2-norm and ∥v∥∞= maxi |vi| for vector infinity norm. We use ∥T∥op to denote the operator norm or spectral norm of a tensor T, which is defined as ∥T∥op = sup∥u1∥2=···∥up∥2=1 T(u1, · · · , up). An event A is said to occur with overwhelming probability if Pr[A] ≥1 −d−10. We limit ourselves to symmetric 3rd-order tensors (p = 3) in this paper. The results can be directly extended to asymmetric tensors since they can first be symmetrized using simple matrix operations (see [1]). Extension to higher-order tensors is also straightforward. A symmetric 3rd-order tensor T is rank-1 if it can be written in the form of T = λ · v ⊗v ⊗v = λv⊗3 ⇐⇒ Ti,j,ℓ= λ · v(i) · v(j) · v(ℓ), (1) 1 ˜O hides poly-logarithmic factors. 2 Algorithm 1 Robust tensor power method [1] 1: Input: symmetric d × d × d tensor eT, number of components k ≤d, number of iterations L, R. 2: for i = 1 to k do 3: Initialization: Draw u0 uniformly at random from the unit sphere in Rd. 4: Power iteration: Compute ut = eT(I, ut−1, ut−1)/∥eT(I, ut−1, ut−1)∥2 for t = 1, · · · , R. 5: Boosting: Repeat Steps 3 and 4 for L times and obtain u(1) R , · · · , u(L) R . Let τ ∗= argmaxL τ=1 eT(u(τ) R , u(τ) R , u(τ) R ). Set ˆvi = u(τ) R and ˆλi = eT(u(τ) R , u(τ) R , u(τ) R ). 6: Deflation: eT ←eT −ˆλiˆv⊗3 i . 7: end for 8: Output: Estimated eigenvalue/Eigenvector pairs {ˆλi, ˆvi}k i=1. where ⊗represents the outer product, and v ∈Rd is a unit vector (i.e., ∥v∥2 = 1) and λ ∈R+. 2 A tensor T ∈Rd×d×d is said to have a CP (Candecomp/Parafac) rank k if it can be (minimally) written as the sum of k rank-1 tensors: T = X i∈[k] λivi ⊗vi ⊗vi, λi ∈R+, vi ∈Rd. (2) A tensor is said to be orthogonally decomposable if in the above decomposition ⟨vi, vj⟩= 0 for i ̸= j. Any tensor can be converted to an orthogonal tensor through an invertible whitening transform, provided that v1, v2, . . . , vk are linearly independent [1]. We thus limit our analysis to orthogonal tensors in this paper since it can be extended to this more general class in a straightforward manner. Tensor Power Method: A popular algorithm for finding the tensor decomposition in (2) is through the tensor power method. The full algorithm is given in Algorithm 1. We first provide an improved noise analysis for the robust power method, improving error tolerance bounds previously established in [1]. We next propose memory-efficient and/or differentially private variants of the robust power method and give performance guarantee based on our improved noise analysis. 2 Improved Noise Analysis for Tensor Power Method When the tensor T has an exact orthogonal decomposition, the power method provably recovers all the components with random initialization and deflation. However, the analysis is more subtle under noise. While matrix perturbation bounds are well understood, it is an open problem in the case of tensors. This is because the problem of tensor decomposition is NP-hard, and becomes tractable only under special conditions such as orthogonality (and more generally linear independence). If a large amount of arbitrary noise is added, the decomposition can again become intractable. In [1], guaranteed recovery of components was proven under bounded noise and we recap the result below. Theorem 2.1 ([1] Theorem 5.1, simplified version). Suppose eT = T+∆T , where T = Pk i=1 λiv⊗3 i with λi > 0 and orthonormal basis vectors{v1, · · · , vk} ⊆Rd, d ≥k, and noise ∆T satisfies ∥∆T ∥op ≤ϵ. Let λmax, λmin be the largest and smallest values in {λi}k i=1 and {ˆλi, ˆvi}k i=1 be outputs of Algorithm 1. There exist absolute constants K0, C1, C2, C3 > 0 such that if ϵ ≤C1·λmin/d, R = Ω(log d+log log(λmax/ϵ)), L = Ω(max{K0, k} log(max{K0, k})), (3) then with probability at least 0.9, there exists a permutation π : [k] →[k] such that |λi −ˆλπ(i)| ≤C2ϵ, ∥vi −ˆvπ(i)∥2 ≤C3ϵ/λi, ∀i = 1, · · · , k. Theorem 2.1 is the first provably correct result on robust tensor decomposition under general noise conditions. In particular, the noise term ∆T can be deterministic or even adversarial. However, one important drawback of Theorem 2.1 is that ∥∆T ∥op must be upper bounded by O(λmin/d), which is a strong assumption for many practical applications [28]. On the other hand, [2, 24] show that by using smart initializations the robust tensor power method is capable of tolerating O(λmin/ √ d) 2One can always assume without loss of generality that λ ≥0 by replacing v with −v instead. 3 magnitude of noise, and [25] suggests that such noise magnitude cannot be improved if deflation (i.e., successive rank-one approximation) is to be performed. In this paper, we show that the relaxed noise bound O(λmin/ √ d) holds even if the initialization of robust TPM is as simple as a vector uniformly sampled from the d-dimensional sphere (Algorithm 1). Our claim is formalized below: Theorem 2.2 (Improved noise tolerance analysis for robust TPM). Assume the same notation as in Theorem 2.1. Let ϵ ∈(0, 1/2) be an error tolerance parameter. There exist absolute constants K0, C0, C1, C2, C3 > 0 such that if ∆T satisfies ∥∆T (I, u(τ) t , u(τ) t )∥2 ≤ϵ, |∆T (vi, u(τ) t , u(τ) t )| ≤min{ϵ/ √ k, C0λmin/d} (4) for all i ∈[k], t ∈[T], τ ∈[L] and furthermore ϵ ≤C1 · λmin/ √ k, R = Ω(log(λmaxd/ϵ)), L = Ω(max{K0, k} log(max{K0, k})), (5) then with probability at least 0.9, there exists a permutation π : [k] →[k] such that |λi −ˆλπ(i)| ≤C2ϵ, ∥vi −ˆvπ(i)∥2 ≤C3ϵ/λi, ∀i = 1, · · · , k. Due to space constraints, proof of Theorem 2.2 is placed in Appendix C. We next make several remarks on our results. In particular, we consider three scenarios with increasing assumptions imposed on the noise tensor ∆T and compare the noise conditions in Theorem 2.2 with existing results on orthogonal tensor decomposition: 1. ∆T does not have any special structure: in this case, we only have |∆T (vi, ut, ut)| ≤ ∥∆T ∥op and our noise conditions reduces to the classical one: ∥∆T ∥op = O(λmin/d). 2. ∆T is “round” in the sense that |∆T (vi, ut, ut)| ≤O(1/ √ d) · ∥∆T (I, ut, ut)∥2: this is the typical setting when the noise ∆T follows Gaussian or sub-Gaussian distributions, as we explain in Sec. 3 and 4. Our noise condition in this case is ∥∆T ∥op = O(λmin/ √ d), strictly improving Theorem 2.1 on robust tensor power method with random initializations and matching the bound for more advanced SVD initialization techniques in [2]. 3. ∆T is weakly correlated with signal in the sense that ∥∆T (vi, I, I)∥2 = O(λmin/d) for all i ≤k: in this case our noise condition reduces to ∥∆T ∥op = O(λmin/ √ k), strictly improving over SVD initialization [2] in the “undercomplete” regime k = o(d). Note that the whitening trick [3, 1] does not attain our bound, as we explain in Appendix B. Finally, we remark that the log log(1/ϵ) quadratic convergence rate in Eq. (3) is worsened to log(1/ϵ) linear rate in Eq. (5). We are not sure whether this is an artifact of our analysis, because similar analysis for the matrix noisy power method [12] also reveals a linear convergence rate. Implications Our bounds in Theorem 2.2 results in sharper analysis of both memory-efficient and differentially private power methods which we propose in Sec. 3, 4. Using the original analysis (Theorem 2.1) for the two applications, the memory-efficient tensor power method would have sample complexity cubic in the dimension d and for differentially private tensor decomposition the privacy level ε needs to scale as ˜Ω( √ d) as d increases, which is particularly bad as the quality of privacy protection eε degrades exponentially with tensor dimension d. On the other hand, our improved noise condition in Theorem 2.2 greatly sharpens the bounds in both applications: for memory efficient decomposition, we now require only quadratic sample complexity and for differentially private decomposition, the privacy level ε has no polynomial dependence on d. This makes our results far more practical for high-dimensional tensor decomposition applications. Numerical verification of noise conditions and comparison with whitening techniques We verify our improved noise conditions for robust tensor power method on simulation tensor data. In particular, we consider three noise models and demonstrate varied asymptotic noise magnitudes at which tensor power method succeeds. The simulation results nicely match our theoretical findings and also suggest, in an empirical way, tightness of noise bounds in Theorem 2.2. Due to space constraints, simulation results are placed in Appendix A. 4 We also compare our improved noise bound with those obtained by whitening, a popular technique that reduces tensor decomposition to matrix decomposition problems [1, 21, 28]. We show in Appendix B that, without side information the standard analysis of whitening based tensor decomposition leads to worse noise tolerance bounds than what we obtained in Theorem 2.2. 3 Memory-Efficient Streaming Tensor Decomposition Tensor power method in Algorithm 1 requires significant storage to be deployed: Ω(d3) memory is required to store a dense d × d × d tensor, which is prohibitively large in many real-world applications as tensor dimension d could be really high. We show in this section how to compute tensor decomposition in a memory efficient manner, with storage scaling linearly in d. In particular, we consider the case when tensor T to be decomposed is a population moment Ex∼D[x⊗3] with respect to some unknown underlying data distribution D, and data points x1, x2, · · · i.i.d. sampled from D are fed into a tensor decomposition algorithm in a streaming fashion. One classical example is topic modeling, where each xi represents documents that come in streams and consistent estimation of topics can be achieved by decomposing variants of the population moment [1, 3]. Algorithm 2 displays memory-efficient tensor decomposition procedure on streaming data points. The main idea is to replace the power iteration step T(I, u, u) in Algorithm 1 with a “data association” step that exploits the empirical-moment structure of the tensor T to be decomposed and evaluates approximate power iterations from stochastic data samples. This procedure is highly efficient, in that both time and space complexity scale linearly with tensor dimension d: Proposition 3.1. Algorithm 2 runs in O(nkdLR) time and O(d(k + L)) memory, with O(nkR) sample complexity (number of data point gone through). In the remainder of this section we show Algorithm 2 recovers eigenvectors of the population moment Ex∼D[x⊗3] with high probability and we derive corresponding sample complexity bounds. To facilitate our theoretical analysis we need several assumptions on the data distribution D. The first natural assumption is the low-rankness of the population moment Ex∼D[x⊗3] to be decomposed: Assumption 3.1 (Low-rank moment). The mean tensor T = Ex∼D[x⊗3] admits a low-rank representation T = Pk i=1 λiv⊗3 i for λ1, · · · , λk > 0 and orthonormal {v1, · · · , vk} ⊆Rd. We also place restrictions on the “noise model”, which imply that the population moment Ex∼D[x⊗3] can be well approximated by a reasonable number of samples with high probability. In particular, we consider sub-Gaussian noise as formulated in Definition 3.1 and Assumption 3.2: Definition 3.1 (Multivariate sub-Gaussian distribution, [15]). A D-dimensional random variable x belongs to the sub-Gaussian distribution family SGD(σ) with parameter σ > 0 if it has zero mean and E exp(a⊤x) ≤exp ∥a∥2 2σ2/2 for all a ∈RD. Assumption 3.2 (Sub-Gaussian noise). There exists σ > 0 such that the mean-centered vectorized random variable vec(x⊗3 −E[x⊗3]) belongs to SGd3(σ) as defined in Definition 3.1. We remark that Assumption 3.2 includes a wide family of distributions that are of practical importance, for example noise that have compact support. Assumption 3.2 also resembles (B, p)-round noise considered in [12] that imposes spherical symmetry constraints onto the noise distribution. We are now ready to present the main theorem that bounds the recovery (approximation) error of eigenvalues and eigenvectors of the streaming robust tensor power method in Algorithm 2: Theorem 3.1 (Analysis of streaming robust tensor power method). Let Assumptions 3.1, 3.2 hold true and suppose ϵ < C1λmin/ √ k for some sufficiently small absolute constant C1 > 0. If n = eΩ min σ2d ϵ2 , σ2d2 λ2 min , R = Ω(log(λmaxd/ϵ)), L = Ω(k log k), then with probability at least 0.9 there exists permutation π : [k] →[k] such that |λi −ˆλπ(i)| ≤C2ϵ, ∥vi −ˆvπ(i)∥2 ≤C3ϵ/λi, ∀i = 1, · · · , k for some universal constants C2, C3 > 0. Corollary 3.1 is then an immediate consequence of Theorem 3.1, which simplifies the bounds and highlights asymptotic dependencies over important model parameters d, k and σ: 5 Algorithm 2 Online robust tensor power method 1: Input: data stream x1, x2, · · · ∈Rd, no. of components k, parameters L, R, n. 2: for i = 1 to k do 3: Draw u(1) 0 , · · · , u(L) 0 i.i.d. uniformly at random from the unit sphere Sd−1. 4: for t = 0 to R −1 do 5: Initialization: Set accumulators ˜u(1) t+1, · · · , ˜u(L) t+1 and ˜λ(1), · · · , ˜λ(L) to 0. 6: Data association: Read the next n data points; update ˜u(τ) t+1 ←˜u(τ) t+1 + 1 n(x⊤ ℓu(τ) t )2xi and ˜λ(τ) ←˜λ(τ) + 1 n(x⊤ ℓu(τ) t )3 for each ℓ∈[n] and τ ∈[L]. 7: Deflation: For each τ ∈[L], update ˜u(τ) t+1 ←˜u(τ) t+1 −Pi−1 j=1 ˆλjξ2 j,τ ˆvj and ˜λ(τ) ←˜λ(τ) −Pi−1 j=1 ˆλjξ3 j,τ, where ξj,τ = ˆv⊤ j ˜u(τ) t . 8: Normalization: u(τ) t+1 = ˜u(τ) t+1/∥˜u(τ) t+1∥2, for each τ ∈[L]. 9: end for 10: Find τ ∗= argmaxτ∈[L]˜λ(τ) and store ˆλi = ˜λ(τ ∗), ˆvi = u(τ ∗) R . 11: end for 12: Output: approximate eigenvalue and eigenvector pairs {ˆλi, ˆvi}k i=1 of ˆEx∼D[x⊗3]. Corollary 3.1. Under Assumptions 3.1, 3.2, Algorithm 2 correctly learns {λi, vi}k i=1 up to O(1/ √ d) additive error with ˜O(σ2kd2) samples and ˜O(dk) memory. Proofs of Theorem 3.1 and Corollary 3.1 are both deferred to Appendix D. Compared to streaming noisy matrix PCA considered in [12], the bound is weaker with an additional 1/k factor in the term involving ϵ and 1/d factor in the term that does not involve ϵ. We conjecture this to be a fundamental difficulty of the tensor decomposition problem. On the other hand, our bounds resulting from the analysis in Sec. 2 have a O(1/d) improvement compared to applying existing analysis in [1] directly. Remark on comparison with SGD: Our proposed streaming tensor power method is nothing but the projected stochastic gradient descent (SGD) procedure on the objective of maximizing the tensor norm on the sphere. The optimal solution of this coincides with the objective of finding the best rank-1 approximation of the tensor. Here, we can estimate all the components of the tensor through deflation. An alternative method is to run SGD based a combined objective function to obtain all the components of the tensor simultaneously, as considered in [16, 11]. However, the analysis in [11] only works for even-order tensors and has worse dependency (at least d9) on tensor dimension d. 4 Differentially private tensor decomposition The objective of private data processing is to release data summaries such that any particular entry of the original data cannot be reliably inferred from the released results. Formally speaking, we adopt the popular (ε, δ)-differential privacy criterion proposed in [9]: Definition 4.1 ((ε, δ)-differential privacy [9]). Let M denote all symmetric d-dimensional real third order tensors and O be an arbitrary output set. A randomized algorithm A : M →O is (ε, δ)-differentially private if for all neighboring tensors T, T′ and measurable set O ⊆O we have Pr [A(T) ∈O] ≤eε Pr [A(T′) ∈O] + δ, where ε > 0, δ ∈[0, 1) are privacy parameters and probabilities are taken over randomness in A. Since our tensor decomposition analysis concerns symmetric tensors primarily, we adopt a “symmetric” definition of neighboring tensors in Definition 4.1, as shown below: Definition 4.2 (Neighboring tensors). Two d×d×d symmetric tensors T, T′ are neighboring tensors if there exists i, j, k ∈[d] such that T′−T = ±symmetrize(ei⊗ej ⊗ek) = ± (ei ⊗ej ⊗ek + ei ⊗ek ⊗ej + · · · + ek ⊗ej ⊗ei) . As noted earlier, the above notions can be similarly extended to asymmetric tensors as well as the guarantees for tensor power method on asymmetric tensors. We also remark that the difference of 6 Algorithm 3 Differentially private robust tensor power method 1: Input: tensor T, no. of components k, number of iterations L, R, privacy parameters ε, δ. 2: Initialization: D = 0, ν = 6√ 2 ln(1.25/δ′) ε′ , δ′ = δ 2K , ε′ = ε √ K(4+ln(2/δ)), K = kL(R + 1). 3: for i = 1 to k do 4: Initialization: Draw u(1) 0 , · · · , u(τ) 0 uniformly at random from the unit sphere in Rd. 5: for t = 0 to R −1 do 6: Power iteration: compute ˜u(τ) t+1 = (T −D)(I, u(τ) t , u(τ) t ). 7: Noise calibration: release ¯u(τ) t+1 = ˜u(τ) t+1 + ν∥u(τ) t ∥2 ∞· z(τ) t , where z(τ) t i.i.d. ∼N(0, Id). 8: Normalization: u(τ) t+1 = ¯u(τ) t+1/∥¯u(τ) t+1∥2. 9: end for 10: Compute ˜λ(τ) = (T −D)(u(τ) R , u(τ) R , u(τ) R ) + ν∥u(τ) R ∥3 ∞· zτ and let τ ∗= argmaxτ ˜λ(τ). 11: Deflation: ˆλi = ˜λ(τ ∗), ˆvi = u(τ ∗) R , D ←D + ˆλiˆv⊗3 i . 12: end for 13: Output: eigenvalue/eigenvector pairs {ˆλi, ˆvi}k i=1. “neighboring tensors” as defined above has Frobenious norm bounded by O(1). This is necessary because an arbitrary perturbation of a tensor, even if restricted to only one entry, is capable of destroying any utility guarantee possible. In a nutshell, Definitions 4.1, 4.2 state that an algorithm A is differentially private if, conditioned on any set of possible outputs of A, one cannot distinguish with high probability between two “neighboring” tensors T, T′ that differ only in a single entry (up to symmetrization), thus protecting the privacy of any particular element in the original tensor T. Here ε, δ are parameters controlling the level of privacy, with smaller ε, δ values implying stronger privacy guarantee as Pr[A(T) ∈O] and Pr[A(T′) ∈O] are closer to each other. Algorithm 3 describes the procedure of privately releasing eigenvectors of a low-rank input tensor T. The main idea for privacy preservation is the following noise calibration step ¯ut+1 = ˜ut+1 + ν∥ut∥2 ∞· zt, where zt is a d-dimensional standard Normal random variable and ν∥ut∥2 ∞is a carefully designed noise magnitude in order to achieved desired privacy level (ε, δ). One key aspect is that the noise calibration step occurs at every power iteration, which adds to the robustness of the algorithm and achieves sharper bounds. We discuss at the end of this section. Theorem 4.1 (Privacy guarantee). Algorithm 3 satisfies (ε, δ)-differential privacy. Proof. The only power iteration step of Algorithm 3 can be thought of as K = kL(R + 1) queries directed to a private data sanitizer which produces f1(T; u) = T(I, u, u) or f2(T; u) = T(u, u, u) each time. The ℓ2-sensitivity of both queries can be separately bounded as ∆2f1 = sup T′ ∥T(I, u, u) −T′(I, u, u)∥2 ≤sup i,j,k 2(|uiuj| + |uiuk| + |ujuk|) ≤6∥u∥2 ∞; ∆2f2 = sup T′ T(u, u, u) −T′(u, u, u) = sup i,j,k 6 uiujuk ≤6∥u∥3 ∞, where T′ = T + symmetrize(ei ⊗ej ⊗ek) is some neighboring tensor of T. Thus, applying the Gaussian mechanism [9] we can (ε, δ)-privately release one output of either f1(u) or f2(u) by fℓ(u) + ∆2fℓ· p 2 ln(1.25/δ) ε · w, where ℓ= 1, 2 and w ∼N(0, I) are i.i.d. standard Normal random variables. Finally, applying advanced composition [9] across all K = kL(R + 1) private releases we complete the proof of this proposition. Note that both normalization and deflation steps do not affect the differential privacy of Algorithm 3 due to the closeness under post-processing property of DP. The rest of the section is devoted to discussing the “utility” of Algorithm 3; i.e., to show that the algorithm is still capable of producing approximate eigenvectors, despite the privacy constraints. Similar to [12], we adopt the following incoherence assumptions on the eigenspace of T: 7 Assumption 4.1 (Incoherent basis). Suppose V ∈Rd×k is the stacked matrix of orthonormal component vectors {vi}k i=1. There exists constant µ0 > 0 such that d k max 1≤i≤d ∥V⊤ei∥2 2 ≤µ0. (6) Note that by definition, µ0 is always in the range of [1, d/k]. Intuitively, Assumption 4.1 with small constant µ0 implies a relatively “flat” distribution of element magnitudes in T. The incoherence level µ0 plays an important role in the utility guarantee of Algorithm 3, as we show below: Theorem 4.2 (Guaranteed recovery of eigenvector under privacy requirements). Suppose T = Pk i=1 λiv⊗3 i for λ1 > λ2 ≥λ3 ≥· · · ≥λk > 0 with orthonormal v1, · · · , vk ∈Rd, and suppose Assumption 4.1 holds with µ0. Assume λ1 −λ2 ≥c/ √ d for some sufficiently small universal constant c > 0. If R = Θ(log(λmaxd)), L = Θ(k log k) and ε, δ satisfy ε = Ω µ0k2 log(λmaxd/δ) λmin , (7) then with probability at least 0.9 the first eigen pair (ˆλ1, ˆv1) returned by Algorithm 3 satisfies λ1 −ˆλ1 = O(1/ √ d), ∥v1 −ˆv1∥2 = O(1/(λ1 √ d)). At a high level, Theorem 4.2 states that when the privacy parameter ε is not too small (i.e., privacy requirements are not too stringent), Algorithm 3 approximately recovers the largest eigenvalue and eigenvector with high probability. Furthermore, when µ0 is a constant, the lower bound condition on the privacy parameter ε does not depend polynomially upon tensor dimension d, which is a much desired property for high-dimensional data analysis. On the other hand, similar results cannot be achieved via simpler methods like input perturbation, as we discuss below: Comparison with input perturbation Input perturbation is perhaps the simplest method for differentially private data analysis and has been successful in numerous scenarios, e.g. private matrix PCA [10]. In our context, this would entail appending a random Gaussian tensor E directly onto the input tensor T before tensor power iterations. By Gaussian mechanism, the standard deviation σ of each element in E scales as σ = Ω(ε−1p log(1/δ)). On the other hand, noise analysis for tensor decomposition derived in [24, 2] and in the subsequent section of this paper requires σ = O(1/d) or ∥E∥op = O(1/ √ d), which implies ε = ˜Ω(d) (cf. Lemma F.9). That is, the privacy parameter ε must scale linearly with tensor dimension d to successfully recover even the first principle eigenvector, which renders the privacy guarantee of the input perturbation procedure useless for high-dimensional tensors. Thus, we require a non-trivial new approach for differentially private tensor decomposition. Finally, we remark that a more desired utility analysis would bound the approximation error ∥vi−ˆvi∥2 for every component v1, · · · , vk, and not just the top eigenvector. Unfortunately, our current analysis cannot handle deflation effectively as the deflated vector ˆvi −vi may not be incoherent. Extension to deflated tensor decomposition remains an interesting open question. 5 Conclusion We consider memory-efficient and differentially private tensor decomposition problems in this paper and derive efficient algorithms for both online and private tensor decomposition based on the popular tensor power method framework. Through an improved noise condition analysis of robust tensor power method, we obtain sharper dimension-dependent sample complexity bounds for online tensor decomposition and wider range of privacy parameters values for private tensor decomposition while still retaining utility. Simulation results verify the tightness of our noise conditions in principle. One important direction of future research is to extend our online and/or private tensor decomposition algorithms and analysis to practical applications such as topic modeling and community detection, where tensor decomposition acts as one critical step for data analysis. An end-to-end analysis of online/private methods for these applications would be theoretically interesting and could also greatly benefit practical machine learning of important models. Acknowledgement A. Anandkumar is supported in part by Microsoft Faculty Fellowship, NSF Career award CCF-1254106, ONR Award N00014- 14-1-0665, ARO YIP Award W911NF-13-1-0084 and AFOSR YIP FA9550-15-1-0221. 8 References [1] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. Journal of Machine Learning Research, 15(1):2773–2832, 2014. [2] A. Anandkumar, R. Ge, and M. Janzamin. Learning overcomplete latent variable models through tensor methods. In Proc. of COLT, 2015. [3] A. Anandkumar, Y.-k. Liu, D. J. Hsu, D. P. Foster, and S. M. Kakade. A spectral algorithm for latent dirichlet allocation. In NIPS, 2012. [4] K. Azizzadenesheli, A. Lazaric, and A. Anandkumar. Reinforcement learning of POMDP’s using spectral methods. In COLT, 2016. [5] B. W. Bader and T. G. Kolda. Algorithm 862: Matlab tensor classes for fast algorithm prototyping. ACM Transactions on Mathematical Software, 32(4):635–653, 2006. [6] M.-F. Balcan, S. Du, Y. Wang, and A. W. Yu. An improved gap-dependency analysis of the noisy power method. In COLT, 2016. [7] L. Birgé. An alternative point of view on lepski’s method. Lecture Notes-Monograph Series, pages 113–133, 2001. [8] B. Cirel’soN, I. Ibragimov, and V. Sudakov. Norms of gaussian sample functions. Lecture Notes in Mathematics, 550:20–41, 1976. [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. Talwar, A. Thakurta, and L. Zhang. Analyze gauss: optimal bounds for privacy-preserving principal component analysis. In STOC, 2014. [11] R. Ge, F. Huang, C. Jin, and Y. Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In COLT, 2015. [12] M. Hardt and E. Price. The noisy power method: A meta algorithm with applications. In NIPS, 2014. [13] C. J. Hillar and L.-H. Lim. Most tensor problems are np-hard. Journal of the ACM (JACM), 60(6):45, 2013. [14] S. B. Hopkins, J. Shi, and D. Steurer. Tensor principal component analysis via sum-of-squares proofs. In COLT, 2015. [15] D. Hsu, S. M. Kakade, and T. Zhang. A tail inequality for quadratic forms of subgaussian random vectors. Electron. Commun. Probab, 17(52):1–6, 2012. [16] F. Huang, U. Niranjan, M. U. Hakeem, and A. Anandkumar. Online tensor methods for learning latent variable models. Journal of Machine Learning Research, 16:2797–2835, 2015. [17] F. Huang, I. Perros, R. Chen, J. Sun, A. Anandkumar, et al. Scalable latent tree model and its application to health analytics. arXiv preprint arXiv:1406.4566, 2014. [18] M. Janzamin, H. Sedghi, and A. Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv preprint arXiv:1506.08473, 2015. [19] G. Kamath. Bounds on the expectation of the maximum of samples from a gaussian. [Online; accessed April, 2016]. [20] T. G. Kolda and J. R. Mayo. Shifted power method for computing tensor eigenpairs. SIAM Journal on Matrix Analysis and Applications, 32(4):1095–1124, 2011. [21] V. Kuleshov, A. T. Chaganty, and P. Liang. Tensor factorization via matrix factorization. In AISTATS, 2015. [22] B. Laurent and P. Massart. Adaptive estimation of a quadratic functional by model selection. Annals of Statistics, pages 1302–1338, 2000. [23] P. Massart. Concentration inequalities and model selection, volume 6. Springer, 2007. [24] A. Montanari and E. Richard. A statistical model for tensor PCA. In NIPS, 2014. [25] C. Mu, D. Hsu, and D. Goldfarb. Successive rank-one approximations for nearly orthogonally decomposable symmetric tensors. SIAM Journal on Matrix Analysis and Applications, 36(4):1638–1659, 2015. [26] G. W. Stewart, J.-g. Sun, and H. B. Jovanovich. Matrix perturbation theory. Academic press New York, 1990. [27] R. Tomioka and T. Suzuki. Spectral norm of random tensors. arXiv:1407.1870, 2014. [28] Y. Wang, H.-Y. Tung, A. J. Smola, and A. Anandkumar. Fast and guaranteed tensor decomposition via sketching. In NIPS, 2015. [29] Y. Wang and J. Zhu. Spectral methods for supervised topic models. In NIPS, 2014. [30] R. Zemel, Y. Wu, K. Swersky, T. Pitassi, and C. Dwork. Learning fair representations. In ICML, 2013. 9 | 2016 | 284 |
6,199 | Multivariate tests of association based on univariate tests Ruth Heller Department of Statistics and Operations Research Tel-Aviv University Tel-Aviv, Israel 6997801 ruheller@gmail.com Yair Heller heller.yair@gmail.com Abstract For testing two vector random variables for independence, we propose testing whether the distance of one vector from an arbitrary center point is independent from the distance of the other vector from another arbitrary center point by a univariate test. We prove that under minimal assumptions, it is enough to have a consistent univariate independence test on the distances, to guarantee that the power to detect dependence between the random vectors increases to one with sample size. If the univariate test is distribution-free, the multivariate test will also be distribution-free. If we consider multiple center points and aggregate the center-specific univariate tests, the power may be further improved, and the resulting multivariate test may have a distribution-free critical value for specific aggregation methods (if the univariate test is distribution free). We show that certain multivariate tests recently proposed in the literature can be viewed as instances of this general approach. Moreover, we show in experiments that novel tests constructed using our approach can have better power and computational time than competing approaches. 1 Introduction Let X ∈ℜp and Y ∈ℜq be random vectors, where p and q are positive integers. The null hypothesis of independence is H0 : FXY = FXFY , where the joint distribution of (X, Y ) is denoted by FXY , and the distributions of X and Y , respectively, by FX and FY . If X is a categorical variable with K categories, then the null hypothesis of independence is the null hypothesis in the K-sample problem, H0 : F1 = . . . = FK, where Fk, k ∈{1, . . . , K} is the distribution of Y in category k. The problem of testing for independence of random vectors, as well as the K-sample problem on a multivariate Y , against the general alternative H1 : FXY ̸= FXFY , has received increased attention in recent years. The most common approach is based on pairwise distances or similarity measures. See (26), (6), (24), and (12) for consistent tests of independence, and (10), (25), (1), (22), (5), and (8) for recent K-sample tests. Earlier tests based on nearest neighbours include (23) and (13). For the K-sample problem, the practice of comparing multivariate distributions based on pairwise distances is justified by the fact that, under mild conditions, the distributions differ if and only if the distributions of within and between pairwise distances differ (19). Other innovative approaches have also been considered in recent years. In (4) and (28), the authors suggest to reduce the multivariate data to a lower dimensional sub-space by (random) projections. Recently, in (3) another approach was introduced for the two sample problem, which is based on distances between analytic functions representing each of the distributions. Their novel tests are almost surely consistent when randomly selecting locations or frequencies and are fast to compute. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. We suggest the following approach for testing for independence: first compute the distances from a fixed center point, then apply any univariate independence test on the distances. We show that this approach can result in novel powerful multivariate tests, that are attractive due to their theoretical guarantees and computational complexity. Specifically, in Section 2 we show that if H0 is false, then applying a univariate consistent test on distances from a single center point will result in a multivariate consistent test (except for a measure zero set of center points), where a consistent test is a test with power (i.e., probability of rejecting H0 when H0 is false) increasing to one as the sample size increases when H0 is false. Moreover, the computational time is that of the univariate test, which means that it can be very fast. In particular, a desirable requirement is that the null distribution of the test statistic does not depend on the marginal distributions of X and Y , i.e., that the test is distribution-free. Powerful univariate consistent distribution-free tests exist (see (11) for novel tests and a review), so if one of these distribution-free univariate test is applied on the distances, the resulting multivariate test is distribution-free. In Section 3 we show that considering the distances from M > 1 points and aggregating the resulting statistics can also result in consistent tests, which may be more powerful than tests that consider a single center point. Both distribution-free and permutation-based tests can be generated, depending on the choice of aggregation method and univariate test. In Section 4 we draw the connection between these results and some known tests mentioned above. The tests of (10) and of (12) can be viewed as instances of this approach, where the fixed center point is a sample point, and all sample points are considered each in turn as a fixed center point, for a particular univariate test. In Section 5 we demonstrate in simulations that novel tests based on our approach can have both a power advantage and a great computational advantage over existing multivariate tests. In Section 6 we discuss further extensions. 2 From multivariate to univariate We use the following result by (21). Let Bd(x, r) = {y ∈ℜd : ∥x −y∥≤r} be a ball centered at x with radius r. A complex Radon measure µ, defined formally in Supplementary Material (SM) § D, on ℜd is said to be of at most exponential-quadratic growth if there exist positive constants A and α such that |µ|(Bd(0, r)) ≤Aeαr2. Proposition 2.1 (Rawat and Sitaram (21)). Let Γ ⊂ℜd be such that the only real analytic function (defined on an open set containing Γ) that vanishes on Γ, is the zero function. Let C = {Bd(x, r) : x ∈Γ, r > 0}. Then for any complex Radon measure µ on ℜd of at most exponential-quadratic growth, if µ(C) = 0 for all C ∈C, then it necessarily follows that µ = 0. For the two-sample problem, let Y ∈ℜq be a random variable with cumulative distribution F1 in category X = 1, and F2 in category X = 2. For z ∈ℜq, let F ′ iz be the cumulative distribution function of ∥Y −z∥when Y has cumulative distribution Fi, i ∈{1, 2}. We show that if the distribution of Y differs across categories, then so does the distribution of the distance of Y from almost every point z. Therefore, any univariate consistent two-sample test on the distances from z results in a consistent test of the equality of the multivariate distributions F1 and F2, for almost every z. It is straightforward to generalize these results to K > 2 categories. Proofs of all Theorems are in SM § A. Theorem 2.1. If H0 : F1 = F2 is false, then for every z ∈ℜq, apart from at most a set of Lebesgue measure 0, there exists an r > 0 such that F ′ 1z(r) ̸= F ′ 2z(r). Corollary 2.1. For every z ∈ℜq, apart from at most a set of Lebesgue measure 0, a consistent two-sample univariate test of the null hypothesis H′ 0 : F ′ 1z = F ′ 2z will result in a multivariate consistent test of the null hypothesis H0 : F1 = F2. For the multivariate independence test, let X ∈Rp and Y ∈ℜq be two random vectors with marginal distributions FX and FY , respectively, and with joint distribution FXY . For z = (zx, zy), zx ∈ ℜp, zy ∈ℜq, let F ′ XY z be the joint distribution of (∥X −zx∥, ∥Y −zy∥). Let F ′ Xz and F ′ Y z be the marginal distribution of ∥X −zx∥and ∥Y −zy∥, respectively. Theorem 2.2. If H0 : FXY = FXFY is false, then for every zx ∈ℜp, zy ∈ℜq, apart from at most a set of Lebesgue measure 0, there exists rx > 0, ry > 0, such that F ′ XY z(rx, ry) ̸= F ′ Xz(rx)F ′ Y z(ry). 2 Corollary 2.2. For every z ∈ℜp+q, apart from at most a set of Lebesgue measure 0, a consistent univariate test of independence of the null hypothesis H′ 0 : F ′ XY z = F ′ XzF ′ Y z will result in a multivariate consistent test of the null hypothesis H0 : FXY = FXFY . We have N independent copies (xi, yi) (i = 1, . . . , N) from the joint distribution FXY . The above results motivate the following two-step procedure for the multivariate tests. For the K-sample test, xi ∈{1, . . . , K} determines the category and yi ∈ℜq is the observation in category xi, so the two-step procedure is to first choose z ∈ℜq and then to apply a univariate K-sample consistent test on (x1, ∥y1 −z∥), . . . , (xN, ∥yN −z∥). Examples of such univariate tests include the classic Kolmogorov-Smirnov and Cramer-von Mises tests. For the independence test, the two-step procedure is to first choose zx ∈ℜp and zy ∈ℜq, and then to apply a univariate consistent independence test on (∥x1 −zx∥, ∥y1 −zy∥), . . . , (∥xN −zx∥, ∥yN −zy∥). An example of such a univariate test is the classic test of Hoeffding (14). Note that the consistency of a univariate test may be satisfied only under some assumptions on the distribution of the distances of the multivariate vectors. For example, the consistency of (14) follows if the densities of ∥X −zx∥and ∥Y −zy∥are continuous. See (11) for additional distribution-free univariate K-sample and independence tests. A great advantage of this two-step procedure is the fact that it has the same computational complexity as the univariate test. For example, if one chooses to use Hoeffding’s univariate independence test (14) , then the total complexity is only O(N log N), which is the cost of computing the test statistic. The p-value can be extracted from a look-up table since Hoeffding’s test is distributionfree. In comparison, the computational complexity of the multivariate permutation tests of (26) and (12) is O(BN 2), and O(BN 2 log N), respectively, where B is the number of permutations. For many univariate tests the asymptotic null distribution is known, thus it can be used to compute the significance efficiently without resorting to permutations, which are typically required for assessing the multivariate significance. Another advantage of the two-step procedure is the fact that the test statistic may be estimating an easily interpretable population value. The univariate test statistics often converge to easily interpretable population values, which are often between 0 and 1. These values carry over to provide meaning to the new multivariate statistics, see examples in equations (1) and (2). In practice, the choice of the center value from which the distances are measured can have a significant impact on power, as demonstrated in the following example. Let Pk i=1 piN2(µi, diag(σ2 i1, σ2 i2)) denote the mixture distribution of k bivariate normals, with mean µi and a diagonal covariance matrix with diagonal entries σ2 i1 and σ2 i2, denoted by diag(σ2 i1, σ2 i2), i = 1, . . . , k. Consider the following bivariate two sample problem which is depicted in Figure 1, where F1 = 1 2N2(0, diag(1, 9)) + 1 2N2(0, diag(100, 100)) and F2 = 1 2N2(0, diag(9, 1)) + 1 2N2(0, diag(100, 100)). Clearly F ′ 1z has the same distribution as F ′ 2z if z ∈{(y1, y2) : y1 = y2 or y1 = −y2}, see Figure 1 (c). In agreement with theorem 2.1 the measure of these non-informative center points is zero. On the other hand, if we use as a center point a point on one of the axes, the distribution of the distances will be very different. See in particular the distribution of distances from the point (0,100) in Figure 1 (b) and the power analysis in Table 2. 3 Pooling univariate tests together We need not rely on a single z ∈ℜp+q (or a single z ∈ℜq for the K-sample problem). If we apply a consistent univariate test using many points zi for i = 1, . . . , M as our center points, where the test is applied on the distances of the N sample points from the center point, we obtain M test-statistics and corresponding p-values, p1, . . . , pM. We can use the p-values or the test statistics of the univariate tests to design consistent multivariate tests. We suggest three useful approaches. The first approach is to combine the p-values, using a combining function f : [0, 1]M →[0, 1]. Common combining functions include f(p1, . . . , pM) = mini=1,...,M pi, and f(p1, . . . , pM) = −2 PM i=1 log pi. The second approach is to combine the univariate test statistics, by a combining function such as the average, maximum, or minimum statistic. These aggregation methods can result in test statistics which converge to meaningful population values, see equations (1) and (2) below for multivariate tests based on the univariate Kolmogorov-Smirnov two sample test (18). We note that if the univariate 3 −20 −10 0 10 20 −20 −10 0 10 20 Y1 Y2 (a) 70 80 90 100 110 120 130 0.00 0.05 0.10 0.15 0.20 ||Y−(0,100)|| Density (b) 110 120 130 140 150 160 170 0.00 0.02 0.04 0.06 0.08 0.10 ||Y−(100,100)|| Density (c) Figure 1: (a) Realizations from two bivariate normal distributions, with a sample size of 1000 from each group: 1 2N2(0, diag(1, 9)) + 1 2N2(0, diag(100, 100)) (black points), and F2 = 1 2N2(0, diag(9, 1)) + 1 2N2(0, diag(100, 100)) (red points); (b) the empirical density of the distance from the point (0,100) in each group; (c) the empirical density of the distance from the point (100,100) in each group. tests are distribution-free then taking the maximum (minimum) p-value is equivalent to taking the minimum (maximum) test statistic (when the test rejects for large values of the test statistic). The significance of the combined p-value or the combined test statistic can be computed by a permutation test. A drawback of the two approaches above is that the distribution-free property of the univariate test does not carry over to the multivariate test. In our third approach, we consider the set of M p-values as coming from the family of M null hypotheses, and then apply a valid test of the global null hypothesis that all M null hypotheses are true. Let p(1) ≤. . . ≤p(M) be the sorted p-values. The simplest valid test for any type of dependence is the Bonferroni test, which will reject the global null if Mp(1) ≤α. Another valid test is the test of Hommel (16), which rejects if minj≥1{M(PM l=1 1/l)p(j)/j} ≤α. (This test statistic was suggested independently in a multiple testing procedure for false discovery rate control under general dependence in (2).) The third approach is computationally much more efficient than the first two approaches, since no permutation test is required after the computation of the univariate p-values, but it may be less powerful. Clearly, if the univariate test is distribution free, the resulting multivariate test has a distribution-free critical value. As an example we prove that when using the Kolmogorov-Smirnov two sample test as the univariate test, all the pooling methods above result in consistent multivariate two-sample tests. Let KS(z) = supd∈ℜ|F ′ 1z(d)−F ′ 2z(d)| be the population value of the univariate Kolmogorov-Smirnov two sample test statistic comparing the distribution of the distances. Let N be the total number of independent observations. We assume for simplicity an equal number of observations from F1 and F2. Theorem 3.1. Let z1, . . . , zM be a sample of center points from an absolutely continuous distribution with probability measure ν, whose support S has a positive Lebesgue measure in ℜq. Let KSN(zi) be the empirical value of KS(zi) with corresponding p-value pi, i = 1, . . . , M. Let p(1) ≤. . . ≤p(M) be the sorted p-values. Assume that the distribution functions F1 and F2 are continuous. For M = o(eN), if H0 : F1 = F2 is false, then ν-almost surely, the multivariate test will be consistent for the following level α tests: 1. the permutation test using the test statistics S1 = maxi=1,...,M{KSN(zi)} or S2 = p(1). 2. the test based on Bonferroni, which rejects H0 if Mp(1) ≤α. 3. for M log M = o(eN), the test based on Hommel’s global null p-value, which rejects H0 if minj=1,...,M n M(PM l=1 1/l)p(j)/j o ≤α. 4. the permutation tests using the statistics T1 = PM i=1 KSN(zi) or T2 = −2 PM i=1 log pi. 4 Arguably, the most natural choice of center points is the sample points themselves. Interestingly, if the univariate test statistic is a U-statistic (15) of order m (defined formally in SM §sup-sec-technical), then the resulting multivariate test statistic is a U-statistic of order m + 1, if each sample point acts as a center point, and the univariate test statistics are averaged, as stated in the following Lemma (see SM § A for the proof). Lemma 3.1. For univariate random variables (U, V ), let TN−1((uk, vk), k = 1, . . . , N −1) be a univariate test statistic based on a random sample of size N −1 from the joint distribution of (U, V ). If TN−1 is a U-statistic of order m, then SN = 1 N [T{(∥xk −x1∥, ∥yk −y1∥), k = 2, . . . , N} + . . . + T{(∥xk −xN∥, ∥yk −yN∥), k = 1, . . . , N −1}] is a U-statistic of order m + 1. The test statistics S1 and T1/M converge to meaningful population quantities, lim N,M→∞S1 = lim M→∞max z1,...,zM KS(z) = sup z∈S KS(z), (1) lim N,M→∞T1/M = lim M→∞ M X i=1 KS(zi)/M = E{KS(Z)}, (2) where the expectation is over the distribution of the center point Z. 4 Connection to existing methods We are aware of two multivariate test statistics of the above-mentioned form: aggregation of the univariate test statistics on the distances from center points. The tests are the two sample test of (10) and the independence test of (12). Both these tests use the second pooling method mentioned above by summing up the univariate test statistics. Furthermore, both these tests use the N sample points as the center points (or z’s) and perform a univariate test on the remaining N −1 points. Indeed, (10) recognized that their test can be viewed as summing up univariate Cramer von-Mises tests on the distances from each sample point. We shall show that the test statistic of (12) can be viewed as aggregation by summation of the univariate weighted Hoeffding independence test suggested in (27). In (12) a permutation test was introduced, using the test statistic PN i=1 PN j=1,j̸=i S(i, j), where S(i, j) is the Pearson test score for the 2×2 contingency table for the random variables I(∥X −xi∥≤ ∥xj −xi∥) and I(∥Y −yi∥≤∥yj −yi∥), where I(·) is the indicator function. Since ∥X −xi∥ and ∥Y −yi∥are univariate random variables, S(i, j) can also be viewed as the test statistic for the independence test between ∥X −xi∥and ∥Y −yi∥, based on the 2 × 2 contingency table induced by the 2 × 2 partition of ℜ2 about the point (∥xj −xi∥, ∥yj −yi∥) using the N −2 sample points (∥xk −xi∥, ∥yk −yi∥), k = 1, . . . , N, k ̸= i, k ̸= j. The statistic that sums the Pearson test statistics over all 2 × 2 partitions of ℜ2 based on the observations, results in a consistent independence test for univariate random variables (27). The test statistic of (27) on the sample points (∥xk −xi∥, ∥yk −yi∥), k = 1, . . . , N, k ̸= i, is therefore PN j=1,j̸=i S(i, j). The multivariate test statistic of (12) aggregates by summation the univariate test statistics of (27), where the ith univariate test statistic is based on the N −1 distances of xk from xi, and the N −1 distances of yk from yi, for k = 1, . . . , N, k ̸= i. Of course, not all known consistent multivariate tests belong to the framework defined above. As an interesting example we discuss the energy test of (25) and (1) for the two-sample problem. Without loss of generality, let y1, . . . , yN1 be the observations from F1, and yN1+1, . . . , yN be the observations from F2, N2 = N −N1. The test statistic E is equal to N1N2 N 2 N1N2 N1 X l=1 N X m=N1+1 ∥yl −ym∥−1 N 2 1 N1 X l=1 N1 X m=1 ∥yl −ym∥−1 N 2 2 N X l=N1+1 N X m=N1+1 ∥yl −ym∥ ! , where ∥· ∥is the Euclidean norm. It is easy to see that E = PN i=1 Si, where the univariate score is Si = ( 1 N1 N1 X m=1 ∥yi −ym∥−1 N2 N X m=N1+1 ∥yi −ym∥ ) w(i), (3) and w(i) = −N2 N if i ≤N1 and w(i) = N1 N if i > N1, for i ∈{1, . . . , N}. The statistic Si is not an omnibus consistent test statistic, since a test based on Si will have no power to detect difference in distributions with the same expected distance from yi across groups. However, the energy test is omnibus consistent. 5 5 Experiments In order to assess the effect of using our novel approach, we carry out experiments. We have three specific aims: (1) to compare the power of using a single center point versus multiple center points; (2) to assess the effect of different univariate tests on the power; and (3) to see how the resulting tests fare against other multivariate tests. For simplicity, we address the two-sample problem, and we do not consider the more computationally intensive pooling approaches one and two, but rather consider only the third approach that results in a distribution-free critical value for the multivariate test. Simulation 1: distributions of dimension ≥2. We examined the distributions depicted in Figure 2. Scenario (a) was chosen to examine the classical setting of discovering differences in multivariate normal distributions. The other scenarios were chosen to discover differences in the distributions when one or both distributions have clusters. These are similar to the settings considered in (9). In addition, we examined the following scenario from (25) in five dimensions: F1 is the multivariate standard normal distribution, and F2 = t(5)(5) is the multivariate t distribution, where each of the independent 5 coordinates has the univariate t distribution with five degrees of freedom. Regarding the choice of center points, we examine as single center point a sample point selected at random or the center of mass (CM), and as multiple center points all sample points pooled by the third approach (using either Bonferroni’s test or Hommel’s test). Regarding the univariate tests, we examine: the test of Kolmogorov-Smirnov (18), referred to as KS; the test of the Anderson and Darling family, constructed by (20) for the univariate two-sample problem, referred to as AD; the generalized test of (11), that aggregates over all partition sizes using the minimum p-value statistic, referred to as minP (see SM § C for a detailed description). We compare our tests to Hotelling’s T 2 classical generalization of the Student’s t statistic for multivariate normal data (17), referred to as Hotelling; to the energy test of (25) and (1), referred to as Edist; and to the maximum mean discrepancy test of (8), referred to as MMD. −2 −1 0 1 2 3 −2 −1 0 1 2 Y1 Y2 (a) −3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3 Y1 Y2 (b) 10 15 20 25 30 10 15 20 25 30 Y1 Y2 (c) Figure 2: Realizations from the three non-null bivariate settings considered, with a sample size of 100 from each group: (a) F1 = N2{(0, 0), diag(1, 1)} and F2 = N2{(0, 0.05), diag(0.9, 0.9)}; (b) F1 = N2{(0, 0), diag(1, 1)} and F2 = P4 i=1 1 4N2{µi, diag(0.25, 0.25)}, where µ1 = c(1, 1), µ2 = c(−1, 1), µ3 = c(1, −1), µ4 = c(−1, −1) ; (c) F1 = P9 i=1 1 9N2{µi, diag(1, 1)} and F2 = P9 i=1 1 9N2{µi + (1, 1), diag(0.25, 0.25)} are both mixtures of nine bivariate normals with equal probability of being sampled, but the centers of the bivariate normals of F1 are on the grid points (10, 20, 30) × (10, 20, 30) and have covariance diag(1, 1), and the centers of the bivariate normals of F2 are on the grid points (11, 21, 31)×(11, 21, 31) and have covariance diag(0.25, 0.25). Table 1 shows the actual significance level (column 3) and power (columns 4–7), for the different multivariate tests considered, at the α = 0.1 significance level. We see that the choice of center point matters: comparing rows 4–6 to rows 7–9 shows that depending on the data generation, there can be more or less power to the test that selects as the center point a sample point at random, versus the center of mass, depending on whether the distances from the center of mass are more informative than the distances from a random point. Comparing these rows with rows 10–15 shows that in most settings there was benefit in considering all sample points as center points versus only a single center point, even at the price of paying for multiplicity of the different center points. This was true despite 6 Table 1: The fraction of rejections at the 0.1 significance level for the null case (column 3), the three scenarios depicted in Figure 2 (columns 4–6), and the additional scenario of higher dimension (column 7). The sample size in each group was 100. Rows 4–6 use the center of mass (CM) as a single center point; rows 7–9 use a random sample point as the single center point; rows 10–12 use all sample points as center points. The adjustment for the multiple center points is by Bonferroni in rows 10–12, and by Hommel’s test in rows 13–15. Based on 500 repetitions for columns 4–7, and on 1000 repetitions for the true null setting in column 3. F1 = F2 = Scenarios in Figure 2 N5{(0, 0), diag(1, 1, 1, 1, 1)} Row Test N2{(0, 0), diag(1, 1)} (a) (b) (c) , t(5)(5) 1 Hotelling 0.097 0.952 0.064 0.246 0.080 2 Edist 0.090 0.958 0.826 0.298 0.438 3 MMD 0.114 0.908 0.926 0.190 0.682 4 single Z-CM - minP 0.095 0.308 0.990 0.634 0.974 5 single Z -CM - KS 0.087 0.262 0.982 0.214 0.924 6 single Z-CM-AD 0.112 0.350 0.994 0.266 0.978 7 single Z -random - minP 0.097 0.504 0.736 0.922 0.754 8 single Z -random - KS 0.099 0.502 0.702 0.394 0.656 9 single Z - random - AD 0.102 0.556 0.708 0.436 0.750 10 vector Z - minP-Bonf 0.028 0.592 0.962 1.000 0.906 11 vector Z - KS-Bonf 0.013 0.692 0.858 0.196 0.722 12 vector Z-ad-Bonf 0.011 0.772 0.820 0.132 0.778 13 vector Z - minP-Hommel 0.008 0.606 0.936 1.000 0.774 14 vector Z - KS-Hommel 0.009 0.588 0.776 0.174 0.550 15 vector Z-AD-Hommel 0.007 0.720 0.760 0.150 0.668 the fact that the cut-off for significance when considering all sample points was conservative, as manifest by the lower significance levels when the null is true (in column 3, rows 10-15 the actual significance level is at most 0.028). Applying Hommel’s versus Bonferroni’s test matters as well, and the latter has better power in most scenarios. The greatest difference in power is due to the univariate test choice. A comparison of using KS (rows 5, 8, 11, and 14) versus AD (rows 6, 9, 12, and 15) and minP (rows 4, 7, 10, and 13) shows that AD and minP are more powerful than KS, with a large power gain for using minP when there are many clusters in the data (column 6). As expected, Hotelling, Edist and MMD perform best for differences in the Gaussian distribution (column 4). However, in all other settings Hotelling’s test has poor power, and our approach with minP as the univariate test has more power than Edist and MMD in columns 5–7. A possible explanation for the power advantage using an omnibus consistent univariate test over Edist is the fact that Edist aggregates over the univariate scores in (3), and the absolute value of these scores is close to zero for sample points that are on average the same distance away from both groups (even if the spread of the distances from these sample points is different across groups), and for certain center points the score can even be negative. Simulation 2: a closer inspection of a specific alternative. For the data generation of Figure 1, we can actually predict which of the partition based univariate tests should be most powerful. This of course requires knowing the data generations mechanism, which is unknown in practice, but it is interesting to examine the magnitude of the gaps in power from using optimal versus other choices of center points and univariate tests. As one intuitively expects, choosing a point on one of the axes gives the best power. Specifically, looking at the densities of the distributions of distances from (0,100) in Figure 1 (b) one can expect that a good way to differentiate between the two densities is by partitioning the sample space into at least five sections, defined by the four intersections of the two densities closest to the center. In the power analysis in Table 2, M5, a test which looks for the best 5-way partition, has the highest power among all Mk scores, k = 2, 3, . . .. Similarly, an Sk score sums up all the scores of partitions into exactly k parts, and we would like a partition to be a refinement of the best five way partition in order for it to get a good score. Here, S8 has the best power among all Sk scores, k = 2, 3, . . .. For more details about these univariate tests see SM § C. In summary, in this specific situation, it is possible to predict both a good center point and a good very specific univariate score. However this is not the typical situation since usually we do not know enough about the alternative and therefore it is best to pool information from multiple center points together as suggested in Section 3, and to use a more general univariate score, such as minP, which is the minimum of the p-values of the scores Sk, k ∈{2, 3, . . .}. We expect pooling methods one and two to be more powerful than the third pooling method used in the current study, since the Bonferroni and Hommel tests are conservative compared to using 7 Table 2: The fraction of rejections at the 0.1 significance level for testing H0 : F1 = F2 when F1 = 1 2N2(0, diag(1, 9)) + 1 2N2(0, diag(100, 100)) and F2 = 1 2N2(0, diag(9, 1)) + 1 2N2(0, diag(100, 100)), based on a sample of 100 points from each group, using different univariate tests and different center points schemes. Based on 500 repetitions. The competitors had the following power: Hotelling, 0.090; Edist, 0.274; MMD 0.250. Test Partitions Aggregation Single center point Sample points are the center points considered type z = (0, 100) z = (0, 4) Bonferroni Hommel minP all 0.896 0.864 0.870 0.758 KS 2 × 2 maximum 0.574 0.508 0.208 0.110 AD 2 × 2 sum 0.504 0.702 0.064 0.030 M5 5 × 5 maximum 0.850 0.834 0.904 0.644 S5 5 × 5 sum 0.890 0.902 0.706 0.550 M8 8 × 8 maximum 0.820 0.794 0.856 0.586 S8 8 × 8 sum 0.924 0.912 0.876 0.736 the exact permutation null distribution of their corresponding test statistics. We learn from the experiments above and in SM § B, that our approach can be useful in designing well-powered tests, but that important choices need to be made, especially the choice of univariate test, for the resulting multivariate test to have good power. 6 Discussion We showed that multivariate K-sample and independence tests can be performed by comparing the univariate distributions of the distances from center points, and that favourable properties of the univariate tests can carry over to the multivariate test. Specifically, (1) if the univariate test is consistent then the multivariate test will be consistent (except for a measure zero set of center points); (2) if the univariate test is distribution-free, the multivariate test has a distribution-free critical value if the third pooling method is used; and (3) if the univariate test-statistic is a U-statistic of order m, then aggregating by summation with the sample points as center points produces a multivariate test-statistic which is a U-statistic of order m + 1. The last property may be useful in working out the asymptotic null distribution of the multivariate test-statistic, thus avoiding the need for permutations when using the second pooling method. It may also be useful for working out the non-null distribution of the test-statistic, which may converge to a meaningful population quantity. The experiments show great promise for designing multivariate tests using our approach. Even though only the most conservative distribution-free tests were considered, they had excellent power. The approach is general, and several important decisions have to be made when tailoring a test to a specific application: (1) the number and location of the center points; (2) the univariate test; and (3) the pooling method.We plan to carry out a comprehensive empirical investigation to assess the impact of the different choices. We believe that our approach will generate useful multivariate tests for various modern applications, especially applications where the data are naturally represented by distances such as the study of microbiome diversity (see SM § B for an example). The main results were stated for given center points, yet in simulations we select the center points using the sample. The theoretical results hold for a center point selected at random from the sample. This can be seen by considering a two-step process, of first selecting the sample point that will be a center point, and then testing the distances from this center point to the remaining N-1 sample points. Since the N sample points are independent, the consistency result holds. However, if the center point is the center of mass, and it converges to a bad point, then such a test will not be consistent. Therefore we always recommend at least one center point randomly sampled from a distribution with a support of positive measure. Our theoretical results were shown to hold for the Euclidean norm. However, imposing the restriction that the multivariate distribution function is smooth, the theoretical results will hold more generally for any norms or quasi-norms. From a practical point of view, adding a small Gaussian error to the measured signal guarantees that these results will hold for any normed distance. Acknowledgments We thank Boaz Klartag and Elchanan Mossel for useful discussions of the main results. 8 References [1] BARINGHAUS, L. & FRANZ, C. (2004). On a new multivariate two-sample test. Journal of Multivariate Analysis, 88:190–206. [2] BENJAMINI, Y. & YEKUTIELI, D. (2001). The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, 29 (4):1165–1188. [3] CHWIALKOWSKI, K., RAMDAS, A. , SEJDINOVIC, D. & GRETTON, A. (2015). Fast two-sample testing with analytic representations of probability measures. Advances in Neural Information Processing Systems (NIPS) , 28. [4] CUESTA-ALBERTOS, J. A., FREIMAN, R. & RANSFORD, T. (2006). Random projections and goodness-offit tests in infinite-dimensional spaces. Bull. Braz. Math. Soc. 37(4), 1–25. [5] GRETTON, A., BOGWARDT, K.M., RASCH, M.J., SCHOLKOPF, B & SMOLA, A. (2007). A kernel method for the two-sample problem. Advances in Neural Information Processing Systems (NIPS), 19. [6] GRETTON, A., FUKUMIZU, K., TEO, C.H., SONG, L., SCHOLKOPF, B. & SMOLA, A. (2008). A kernel statistical test of independence. Advances in Neural Information Processing Systems, 20:585–592. [7] GRETTON, A. & GYORFI, L. (2010). Consistent nonparametric tests of independence. Journal of Machine Learning Research, 11:1391–1423. [8] GRETTON, A., BORGWARDT, K.M., RASCH, M.J. SCHOLKOPF, B. & SMOLA, A. (2012). A kernel two-sample test. The Journal of Machine Learning Research, 13:723–773. [9] GRETTON, A., SEJDINOVIC, D., STRATHMANN, H. BALAKRISHNAN, S. & PONTIL, M. & FUKUMIZU, K. & SRIPERUMBUDUR, B.K.(2012). Optimal kernel choice for large-scale two-sample tests. Advances in Neural Information Processing Systems, 25:1205–1213. [10] HALL, P. & TAJVIDI, N. (2002). Permutation tests for equality of distributions in high-dimensional settings. Biometrika, 89 (2):359–374. [11] HELLER, R., HELLER, Y., KAUFMAN, S., BRILL, B. & GORFINE, M. (2016). Consistent distribution-free K-sample and independence tests for univariate random variables Journal of Machine Learning 17 (29): 1–54. [12] HELLER, R., HELLER, Y. & GORFINE, M. (2013). A consistent multivariate test of association based on ranks of distances. Biometrika, 100(2):503–510. [13] HENZE, N.(1988). A multivariate two-sample test based on the number of nearest neighbor type coincidences. The Annals of Statistics, 16(2): 772–783. [14] HOEFFDING, W.(1948a). A non-parametric test of independence. Ann. Math. Stat., 19 (4), 546–557. [15] HOEFFDING, W.(1948b). A class of statistics with asymptotically normal distributions. Annals of Statistics, 19, 293-325. [16] HOMMEL, G. (1983). Tests of the overall hypothesis for arbitrary dependence structures Biom. J. 25:423–430 [17] HOTELLING, H. (1931). The Generalization of Student’s Ratio Ann. Math. Statist. 3:360–378 [18] KOLMOGOROV, A. N.(1941). Confidence limits for an unknown distribution function. Ann. Math. Stat. 12, 461–463. [19] MAA, J.F., PEARL, D.K, & BARTOSZYNSKI, R. (1996). Reducing multidimensional two-sample data to one-dimensional interpoint comparisons. Annals of Statistics, 24 (3), 1069-1074. [20] PETTITT, A.N.(1976). A two-sample Anderson-Darling rank statistics. Biometrika, 63 (1) 161-168. [21] RAWAT, R. & SITARAM, A. (2000). Injectivity sets for spherical means on Rn and on symmetric spaces Journal of Fourier Analysis and Applications, 6(3):343–348. [22] ROSENBAUM, R. (2005). An exact distribution-free test comparing two multivariate distributions based on adjacency. Journal of the Royal Statitistical Society B, 67:515–530. [23] SCHILLING, M. F. (1986). Multivariate two-sample tests based on nearest neighbors. J. Am. Statist. Assoc. 81, 799–806. [24] SEJDINOVIC, D., SRIPERUMBUDUR, B., GRETTON, A. & FUKUMIZU, K. (2013). Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Annals of Statistics, 41 (5):2263–2291. [25] SZÉKELY, G. & RIZZO, M. (2004). Testing for equal distributions in high dimensions. InterStat. [26] SZÉKELY, G., RIZZO, M. & BAKIROV, N. (2007). Measuring and testing dependence by correlation of distances. The Annals of Statistics, 35:2769–2794. [27] THAS, O. & OTTOY, J.P. (2004). A nonparamteric test for independence based on sample space partitions.. Communcations in Statistics - Simulation and Computation 33 (3), 711–728. [28] WEI, S., LEE, C., WICHERS, L. & MARRON, J. S. (2015). Direction-Projection-Permutation for High Dimensional Hypothesis Tests. Journal of Computational and Graphical Statisitcs, doi: 10.1080/10618600.2015.1027773. 9 | 2016 | 285 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.