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
5,300
Spectral Methods for Indian Buffet Process Inference Hsiao-Yu Fish Tung Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 Alexander J. Smola Machine Learning Department Carnegie Mellon University and Google Pittsburgh, PA 15213 Abstract The Indian Buffet Process is a versatile statistical tool for modeling distributions over binary matrices. We provide an efficient spectral algorithm as an alternative to costly Variational Bayes and sampling-based algorithms. We derive a novel tensorial characterization of the moments of the Indian Buffet Process proper and for two of its applications. We give a computationally efficient iterative inference algorithm, concentration of measure bounds, and reconstruction guarantees. Our algorithm provides superior accuracy and cheaper computation than comparable Variational Bayesian approach on a number of reference problems. 1 Introduction Inferring the distributions of latent variables is a key tool in statistical modeling. It has a rich history dating back over a century to mixture models for identifying crabs [27] and has served as a key tool for describing diverse sets of distributions ranging from text [10] to images [1] and user behavior [4]. In recent years spectral methods have become a credible alternative to sampling [19] and variational methods [9, 13] for the inference of such structures. In particular, the work of [6, 5, 11, 21, 29] demonstrates that it is possible to infer latent variable structure accurately, despite the problem being nonconvex, thus exhibiting many local minima. A particularly attractive aspect of spectral methods is that they allow for efficient means of inferring the model complexity in the same way as the remaining parameters, simply by thresholding eigenvalue decomposition appropriately. This makes them suitable for nonparametric Bayesian approaches. While the issue of spectral inference in Dirichlet Distribution is largely settled [6, 7], the domain of nonparametric tools is much richer and it is therefore desirable to see whether the methods can be extended to other models such as the Indian Buffet Process (IBP). This is the main topic of our paper. We provide a full analysis of the tensors arising from the IBP and how spectral algorithms need to be modified, since a degeneracy in the third order tensor requires fourth order terms. To recover the parameters and latent factors, we use Excess Correlation Analysis (ECA) [8] to whiten the higher order tensors and to reduce their dimensionality. Subsequently we employ the power method to obtain symmetric factorization of the higher-order terms. The method provided in this work is simple to implement and has high efficiency in recovering the latent factors and related parameters. We demonstrate how this approach can be used in inferring an IBP structure in the models discussed in [18] and [24]. Moreover, we show that empirically the spectral algorithm provides higher accuracy and lower runtime than variational methods [14]. Statistical guarantees for recovery and stability of the estimates conclude the paper. Outline: Section 2 gives a brief primer on the IBP. Section 3 contains the lower-order moments of IBP and its application on different model. Section 5 discusses concentration of measure of moments. Section 4 applies Excess Correlation Analysis to the moments and it provides the basic structure of this Algorithm. Section 6 shows the empirical performance of our algorithm. Due to space constraints we relegate most derivations and proofs to the appendix. 1 2 The Indian Buffet Process The Indian Buffet Process defines a distribution over equivalence classes of binary matrices Z with a finite number of rows and a (potentially) infinite number of columns [17, 18]. The idea is that this allows for automatic adjustment of the number of binary entries, corresponding to the number of independent sources, underlying causes, etc. This is a very useful strategy and it has led to many applications including structuring Markov transition matrices [15], learning hidden causes with a bipartite graph [30] and finding latent features in link prediction [26]. n ∈N the number of rows of Z, i.e. the number of customers sampling dishes from the “ Indian Buffet”, let mk be the number of customers who have sampled dish k, let K+ be the total number of dishes sampled, and denote by Kh the number of dishes with a particular selection history h ∈{0; 1}n. That is, Kh > 1 only if there are two or more dishes that have been selected by exactly the same set of customers. Then the probability of generating a particular matrix Z is given by [18] p(Z) = αK+ Q h Kh! exp " −α n X j=1 1 j # K+ Y k=1 (n −mk)!(mk −1)! n! (1) Here α is a parameter determining the expected number of nonzero columns in Z. Due to the conjugacy of the prior an alternative way of viewing p(Z) is that each column (aka dish) contains nonzero entries Zij that are drawn from the binomial distribution Zij ∼Bin(πi). That is, if we knew K+, i.e. if we knew how many nonzero features Z contains, and if we knew the probabilities πi, we could draw Z efficiently from it. We take this approach in our analysis: determine K+ and infer the probabilities πi directly from the data. This is more reminiscent of the model used to derive the IBP — a hierarchical Beta-Binomial model, albeit with a variable number of entries: j ∈{n} i ∈  K+ α πi Zij In general, the binary attributes Zij are not observed. Instead, they capture auxiliary structure pertinent to a statistical model of interest. To make matters more concrete, consider the following two models proposed by [18] and [24]. They also serve to showcase the algorithm design in our paper. Linear Gaussian Latent Feature Model [18]. The assumption is that we observe vectorial data x. It is generated by linear combination of dictionary atoms A and an associated unknown number of binary causes z, all corrupted by some additive noise ϵ. That is, we assume that x = Az + ϵ where ϵ ∼N(0, σ21) and z ∼IBP(α). (2) The dictionary matrix A is considered to be fixed but unknown. In this model our goal is to infer both A, σ2 and the probabilities πi associated with the IBP model. Given that, a maximum-likelihood estimate of Z can be obtained efficiently. Infinite Sparse Factor Analysis [24]. A second model is that of sparse independent component analysis. In a way, it extends (2) by replacing binary attributes with sparse attributes. That is, instead of z we use the entry-wise product z.∗y. This leads to the model x = A(z.∗y) + ϵ where ϵ ∼N(0, σ21) , z ∼IBP(α) and yi ∼p(y) (3) Again, the goal is to infer A, the probabilities πi and then to associate likely values of Zij and Yij with the data. In particular, [24] make a number of alternative assumptions on p(y), namely either that it is iid Gaussian or that it is iid Laplacian. Note that the scale of y itself is not so important since an equivalent model can always be found by rescaling A suitably. Note that in (3) we used the shorthand .∗to denote point-wise multiplication of two vectors in ’Matlab’ notation. While (2) and (3) appear rather similar, the latter model is considerably more complex since it not only amounts to a sparse signal but also to an additional multiplicative scale. [24] refer to the model as Infinite Sparse Factor Analysis (isFA) or Infinite Independent Component Analysis (iICA) depending on the choice of p(y) respectively. 2 3 Spectral Characterization We are now in a position to define the moments of the associated binary matrix. In our approach we assume that Z ∼IBP(α). We assume that the number of nonzero attributes k is unknown (but fixed). Our analysis begins by deriving moments for the IBP proper. Subsequently we apply this to the two models described above. All proofs are deferred to the Appendix. For notational convenience we denote by S the symmetrized version of a tensor where care is taken to ensure that existing multiplicities are satisfied. That is, for a generic third order tensor we set S6[A]ijk = Aijk + Akij + Ajki + Ajik + Akji + Aikj. However, if e.g. A = B ⊗c with Bij = Bji, we only need S3[A]ijk = Aijk + Akij + Ajki to obtain a symmetric tensor. 3.1 Tensorial Moments for the IBP A degeneracy in the third order tensor requires that we compute a fourth order moment. We can exclude the cases of πi = 0 and πi = 1 since the former amounts to a nonexistent feature and the latter to a constant offset. We use Mi to denote moments of order i and Si to denote diagonal(izable) tensors of order i. Finally, we use π ∈RK+ to denote the vector of probabilities πi. Order 1 This is straightforward, since we have M1 := Ez [z] = π =: S1. (4) Order 2 The second order tensor is given by M2 := Ez [z ⊗z] = π ⊗π + diag π −π2 = S1 ⊗S1 + diag π −π2 . (5) Solving for the diagonal tensor we have S2 := M2 −S1 ⊗S1 = diag π −π2 . (6) The degeneracies {0, 1} of π −π2 = (1 −π)π can be ignored since they amount to non-existent and degenerate probability distributions. Order 3 The third order moments yield M3 :=Ez [z ⊗z ⊗z] = π ⊗π ⊗π + S3  π ⊗diag π −π2 + diag π −3π2 + 2π3 (7) =S1 ⊗S1 ⊗S1 + S3 [S1 ⊗S2] + diag π −3π2 + 2π3 . (8) S3 :=M3 −S3 [S1 ⊗S2] + S1 ⊗S1 ⊗S1 = diag π −3π2 + 2π3 . (9) Note that the polynomial π −3π2 + 2π3 = π(2π −1)(π −1) vanishes for π = 1 2. This is undesirable for the power method — we need to compute a fourth order tensor to exclude this. Order 4 The fourth order moments are M4 :=Ez [z ⊗z ⊗z ⊗z] = S1 ⊗S1 ⊗S1 ⊗S1 + S6 [S2 ⊗S1 ⊗S1] + S3 [S2 × S2] + S4 [S3 ⊗S1] + diag π −7π2 + 12π3 −6π4 S4 :=M4 −S1 ⊗S1 ⊗S1 ⊗S1 −S6 [S2 ⊗S1 ⊗S1] −S3 [S2 × S2] + S4 [S3 ⊗S1] =diag π −7π2 + 12π3 −6π4 . (10) The roots of the polynomial are  0, 1 2 −1/ √ 12, 1 2 + 1/ √ 12, 1 . Hence the latent factors and their corresponding πk can be inferred either by S3 or S4. 3.2 Application of the IBP The above derivation showed that if we were able to access z directly, we could infer π from it by reading off terms from a diagonal tensor. Unfortunately, this is not quite so easy in practice since z generally acts as a latent attribute in a more complex model. In the following we show how the models of (2) and (3) can be converted into spectral form. We need some notation to indicate multiplications of a tensor M of order k by a set of matrices Ai. [T(M, A1, . . . , Ak)]i1,...ik := X j1,...jk Mj1,...jk [A1]i1j1 · . . . · [Ak]ikjk . (11) 3 Note that this includes matrix multiplication. For instance, A⊤ 1 MA2 = T(M, A1, A2). Also note that in the special case where the matrices Ai are vectors, this amounts to a reduction to a scalar. Any such reduced dimensions are assumed to be dropped implicitly. The latter will become useful in the context of the tensor power method in [6]. Linear Gaussian Latent Factor Model. When dealing with (2) our goal is to infer both A and π. The main difference is that rather than observing z we have Az, hence all tensors are colored. Moreover, we also need to deal with the terms arising from the additive noise ϵ. This yields S1 :=M1 = T(π, A) (12) S2 :=M2 −S1 ⊗S1 −σ21 = T(diag(π −π2), A, A) (13) S3 :=M3 −S1 ⊗S1 ⊗S1 −S3 [S1 ⊗S2] −S3 [m1 ⊗1] (14) =T diag π −3π2 + 2π3 , A, A, A  S4 :=M4 −S1 ⊗S1 ⊗S1 ⊗S1 −S6 [S2 ⊗S1 ⊗S1] −S3 [S2 ⊗S2] −S4 [S3 ⊗S1] (15) −σ2S6 [S2 ⊗1] −m4S3 [1 ⊗1] =T diag −6π4 + 12π3 −7π2 + π  , A, A, A, A  Here we used the auxiliary statistics m1 and m4. Denote by v the eigenvector with the smallest eigenvalue of the covariance matrix of x. Then the auxiliary variables are defined as m1 :=Ex h x ⟨v, (x −E [x])⟩2i = σ2T(π, A) (16) m4 :=Ex h ⟨v, (x −Ex [x])⟩4i /3 = σ4. (17) These terms are used in a tensor power method to infer both A and π (Appendix A has a derivation). Infinite Sparse Factor Analysis. Using the model of (3) it follows that z is a symmetric distribution with mean 0 provided that p(y) has this property. From that it follows that the first and third order moments and tensors vanish, i.e. S1 = 0 and S3 = 0. We have the following statistics: S2 :=M2 −σ21 = T (c · diag(π), A, A) (18) S4 :=M4 −S3 [S2 ⊗S2] −σ2S6 [S2 ⊗1] −m4S3 [1 ⊗1] = T (diag(f(π)), A, A, A, A) . (19) Here m4 is defined as in (17). Whenever p(y) in (3) is Gaussian, we have c = 1 and f(π) = π −π2. Moreover, whenever p(y) follows the Laplace distribution, we have c = 2 and f(π) = 24π −12π2. Lemma 1 Any linear model of the form (2) or (3) with the property that ϵ is symmetric and satisfies E[ϵ2] = E  ϵ2 Gauss  and E[ϵ4] = E  ϵ4 Gauss  the same properties for y, will yield the same moments. Proof This follows directly from the fact that z, ϵ and y are independent and that the latter two have zero mean and are symmetric. Hence the expectations carry through regardless of the actual underlying distribution. 4 Parameter Inference Having derived symmetric tensors that contain both A and polynomials of π, we need to separate those two factors and the additive noise, as appropriate. In a nutshell the approach is as follows: we first identify the noise floor using the assumption that the number of nonzero probabilities in π is lower than the dimensionality of the data. Secondly, we use the noise-corrected second order tensor to whiten the data. This is akin to methods used in ICA [12]. Finally, we perform power iterations on the data to obtain S3 and S4, or rather, their applications to data. Note that the eigenvalues in the re-scaled tensors differ slightly since we use S † 1 2 2 x directly rather than x. Robust Tensor Power Method Our reasoning follows that of [6]. It is our goal to obtain an orthogonal decomposition of the tensors Si into an orthogonal matrix V together with a set of corresponding eigenvalues λ such that Si = T[diag(λ), V ⊤, . . . , V ⊤]. This is accomplished by generalizing the Rayleigh quotient and power iterations as described in [6, Algorithm 1]: θ ←T[S, 1, θ, . . . , θ] and θ ←∥θ∥−1 θ. (20) 4 Algorithm 1 Excess Correlation Analysis for Linear-Gaussian model with IBP prior Inputs: the moments M1, M2, M3, M4. 1: Infer K and σ2: 2: Optionally find a subspace R ∈Rd×K′ with K < K′ by random projection. Range (R) = Range (M2 −M1 ⊗M1) and project down to R 3: Set σ2 := λmin (M2 −M1 ⊗M1) 4: Set S2 = M2 −M1 ⊗M1 −σ21  ϵ by truncating to eigenvalues larger than ϵ 5: Set K = rank S2 6: Set W = UΣ−1 2 , where [U, Σ] = svd(S2) 7: Whitening: (best carried out by preprocessing x) 8: Set W3 := T(S3, W, W, W) 9: Set W4 := T(S4, W, W, W, W) 10: Tensor Power Method: 11: Compute generalized eigenvalues and vectors of W3. 12: Keep all K1 ≤K (eigenvalue, eigenvector) pairs (λi, vi) of W3 13: Deflate W4 with (λi, vi) for all i ≤K1 14: Keep all K −K1 (eigenvalue, eigenvector) pairs (λi, vi) of deflated W4 15: Reconstruction: With corresponding eigenvalues {λ1, · · · , λK}, return the set A: A =  1 Zi W †⊤vi : vi ∈Λ  (21) where Zi = p πi −π2 i with πi = f −1(λi). f(π) = −2π+1 √ π−π2 if i ∈[K1] and f(π) = 6π2−6π+1 π−π2 otherwise. (The proof of Equation (21) is provided in the Appendix.) In a nutshell, we use a suitable number of random initialization l, perform a few iterations (v) and then proceed with the most promising candidate for another d iterations. The rationale for picking the best among l candidates is that we need a high probability guarantee that the selected initialization is non-degenerate. After finding a good candidate and normalizing its length we deflate (i.e. subtract) the term from the tensor S. Excess Correlation Analysis (ECA) The algorithm for recovering A is shown in Algorithm 1. We first present the method of inferring the number of latent features, K, which can be viewed as the rank of the covariance matrix. An efficient way of avoiding eigendecomposition on a d × d matrix is to find a low-rank approximation R ∈Rd×K′ such that K < K′ ≪d and R spans the same space as the covariance matrix. One efficient way to find such matrix is to set R to be R = (M2 −M1 × M1) Θ, (22) where Θ ∈Rd×K′ is a random matrix with entries sampled independently from a standard normal. This is described, e.g. by [20]. Since there is noise in the data, it is not possible that we get exactly K non-zero eigenvalues with the remainder being constant at noise floor σ2. An alternative strategy to thresholding by σ2 is to determine K by seeking the largest slope on the curve of sorted eigenvalues. Next, we whiten the observations by multiplying data with W ∈Rd×K. This is computationally efficient, since we can apply this directly to x, thus yielding third and fourth order tensors W3 and W4 of size k. Moreover, approximately factorizing S2 is a consequence of the decomposition and random projection techniques arising from [20]. To find the singular vectors of W3 and W4 we use the robust tensor power method, as described above. From the eigenvectors we found in the last step, A could be recovered with Equation 21. The fact that this algorithm only needs projected tensors makes it very efficient. Streaming variants of the robust tensor power method are subject of future research. Further Details on the projected tensor power method. Explicitly calculating tensors M2, M3, M4 is not practical in high dimensional data. It may not even be desirable to compute the projected variants of M3 and M4, that is, W3 and W4 (after suitable shifts). Instead, we can use 5 the analog of a kernel trick to simplify the tensor power iterations to W ⊤T(Ml, 1, Wu, . . . , Wu) = 1 m m X i=1 W ⊤xi ⟨xi, Wu⟩l−1 = W ⊤ m m X i=1 xi W ⊤xi, u l−1 By using incomplete expansions memory complexity and storage are reduced to O(d) per term. Moreover, precomputation is O(d2) and it can be accomplished in the first pass through the data. 5 Concentration of Measure Bounds There exist a number of concentration of measure inequalities for specific statistical models using rather specific moments [8]. In the following we derive a general tool for bounding such quantities, both for the case where the statistics are bounded and for unbounded quantities alike. Our analysis borrows from [3] for the bounded case, and from the average-median theorem, see e.g. [2]. 5.1 Bounded Moments We begin with the analysis for bounded moments. Denote by φ : X →F a set of statistics on X and let φl be the l-times tensorial moments obtained from l. φ1(x) := φ(x); φ2(x) := φ(x) ⊗φ(x); φl(x) := φ(x) ⊗. . . ⊗φ(x) (23) In this case we can define inner products via kl(x, x′) := ⟨φl(x), φl(x′)⟩= T[φl(x), φ(x′), . . . , φ(x′)] = ⟨φ(x), φ(x′)⟩l = kl(x, x′) as reductions of the statistics of order l for a kernel k(x, x′) := ⟨φ(x), φ(x′)⟩. Finally, denote by Ml := Ex∼p(x)[φl(x)] and ˆ Ml := 1 m m X j=1 φl(xj) (24) the expectation and empirical averages of φl. Note that these terms are identical to the statistics used in [16] whenever a polynomial kernel is used. It is therefore not surprising that an analogous concentration of measure inequality to the one proven by [3] holds: Theorem 2 Assume that the sufficient statistics are bounded via ∥φ(x)∥≤R for all x ∈X. With probability at most 1 −δ the following guarantee holds: Pr ( sup u:∥u∥≤1 T(Ml, u, · · · , u) −T( ˆ Ml, u, · · · , u) > ϵl ) ≤δ where ϵl ≤  2 + √−2 log δ  Rl √m . Using Lemma 1 this means that we have concentration of measure immediately for the moments S1, . . . S4.Details are provided in the appendix. In particular, we need a chaining result (Lemma 4) that allows us to compute bounds for products of terms efficiently. By utilizing an approach similar to [8], overall guarantees for reconstruction accuracy can be derived. 5.2 Unbounded Moments We are interested in proving concentration of the following four tensors in (13), (14), (15) and one scalar in (27). Whenever the statistics are unbounded, concentration of moment bounds are less trivial and require the use of subgaussian and gaussian inequalities [22]. We derive a bound for fourth-order subgaussian random variables (previous work only derived up to third order bounds). Lemma 5 and 6 has details on how to obtain such guarantees. We further get the bounds for the tensors based on the concentration of moment in Lemma 7 and 8. Bounds for reconstruction accuracy of our algorithm are provided. The full proof is in the Appendix. Theorem 3 (Reconstruction Accuracy) Let ςk [S2] be the k−th largest singular value of S2. Define πmin = argmaxi∈[K] |πi −0.5|, πmax = argmaxi∈[K] πi and ˜π = Q {i:πi≤0.5} πi Q {i:πi>0.5}(1− 6 πi). Pick any δ, ϵ ∈(0, 1). There exists a polynomial poly(·) such that if sample size m statisfies m ≥poly d, K, 1 ϵ , log(1/δ), 1 ˜π , ς1 [S2] ςK [S2], K P i=1 ∥Ai∥2 2 ςK [S2] , σ2 ςK [S2], 1 √πmin −πmin2 , πmax p πmax −π2max ! with probability greater than 1 −δ, there is a permutation τ on [K] such that the ˆA returns by Algorithm 1 satifies ˆAτ(i) −Ai ≤  ∥Ai∥2 + p ς1 [S2]  ϵ for all i ∈[K]. 6 Experiments We evaluate the algorithm on a number of problems suitable for the two models of (2) and (3). The problems are largely identical to those put forward in [18] in order to keep our results comparable with a more traditional inference approach. We demonstrate that our algorithm is faster, simpler, and achieves comparable or superior accuracy. Synthetic data Our goal is to demonstrate the ability to recover latent structure of generated data. Following [18] we generate images via linear noisy combinations of 6 × 6 templates. That is, we use the binary additive model of (2). The goal is to recover both the above images and to assess their respective presence in observed data. Using an additive noise variance of σ2 = 0.5 we are able to recover the original signal quite accurately (from left to right: true signal, signal inferred from 100 samples, signal inferred from 500 samples). Furthermore, as the second row indicates, our algorithm also correctly infers the attributes present in the images. 0 1 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 0 0 1 Text 1 0 1 0 0 1 1 0 For a more quantitative evaluation we compared our results to the infinite variational algorithm of [14]. The data is generated using σ ∈{0.1, 0.2, 0.3, 0.4, 0.5} and with sample size n ∈ {100, 200, 300, 400, 500}. Figure 1 shows that our algorithm is faster and comparatively accurate. 0.1 0.2 0.3 0.4 0.5 0.6 0 1000 2000 3000 4000 5000 6000 7000 8000 negative log likelihood to σ σ negative loglikelihood Infinite Variational Approach Spectral Method on IBP 200 400 600 800 1000 0 50 100 150 200 250 300 CPU time to N N CPU time(sec) Infinite Variational Approach Spectral Method on IBP Figure 1: Comparison to infinite variational approach. The first plot compares the test negative log likelihood training on N = 500 samples with different σ. The second plot shows the CPU time to data size, N, between the two methods. Image Source Recovery We repeated the same test using 100 photos from [18]. We first reduce dimensionality on the data set by representing the images with 100 principal components and apply our algorithm on the 100-dimensional dataset (see Algorithm 1 for details). Figure 2 shows the result. We used 10 initial iterations 50 random seeds and 30 final iterations 50 in the Robust Power Tensor Method. The total runtime was 0.2788s. 7 Figure 2: Results of modeling 100 images from [18] of size 240 × 320 by model (2). Row 1: four sample images containing up to four objects ($20 bill, Klein bottle, prehistoric handaxe, cellular phone). An object basically appears in the same location, but some small variation noise is generated because the items are put into scene by hand; Row 2: Independent attributes, as determined by infinite variational inference of [14] (note, the results in [18] are black and white only); Row 3: Independent attributes, as determined by spectral IBP; Row 4: Reconstruction of the images via spectral IBP. The binary superscripts indicate the items identified in the image. Original G Spectral isFA MCMC Figure 3: Recovery of the source matrix A in model (3) when comparing MCMC sampling and spectral methods. MCMC sampling required 1.72 seconds and yielded a Frobenius distance ∥A −AMCM∥F = 0.77. Our spectral algorithm required 0.77 seconds to achieve a distance ∥A −ASpectral∥F = 0.31. Figure 4: Gene signatures derived by the spectral IBP. They show that there are common hidden causes in the observed expression levels, thus offering a considerably simplified representation. Gene Expression Data As a first sanity check of the feasibility of our model for (3), we generated synthetic data using x ∈R7 with k = 4 sources and n = 500 samples, as shown in Figure 3. For a more realistic analysis we used a microarray dataset. The data consisted of 587 mouse liver samples detecting 8565 gene probes, available as dataset GSE2187 as part of NCBI’s Gene Expression Omnibus www.ncbi.nlm.nih.gov/geo. There are four main types of treatments, including Toxicant, Statin, Fibrate and Azole. Figure 4 shows the inferred latent factors arising from expression levels of samples on 10 derived gene signatures. According to the result, the group of fibrate-induced samples and a small group of toxicant-induced samples can be classified accurately by the special patterns. Azole-induced samples have strong positive signals on gene signatures 4 and 8, while statin-induced samples have strong positive signals only on the 9 gene signatures. Summary In this paper we introduced a spectral approach to inferring latent parameters in the Indian Buffet Process. We derived tensorial moments for a number of models, provided an efficient inference algorithm, concentration of measure theorems and reconstruction guarantees. All this is backed up by experiments comparing spectral and MCMC methods. We believe that this is a first step towards expanding spectral nonparametric tools beyond the more common Dirichlet Process representations. Applications to more sophisticated models, larger datasets and efficient implementations are subject for future work. 8 References [1] R. Adams, Z. Ghahramani, and M. Jordan. Tree-structured stick breaking for hierarchical data. In Neural Information Processing Systems, pages 19–27, 2010. [2] N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. Journal of Computers and System Sciences, 58(1):137–147, 1999. [3] Y. Altun and A. J. Smola. Unifying divergence minimization and statistical inference via convex duality. In H.U. Simon and G. Lugosi, editors, Proc. Annual Conf. Computational Learning Theory, LNCS, pages 139–153. Springer, 2006. [4] M. Aly, A. Hatch, V. Josifovski, and V.K. Narayanan. Web-scale user modeling for targeting. In Conference on World Wide Web, pages 3–12. ACM, 2012. [5] A. Anandkumar, K. Chaudhuri, D. Hsu, S. Kakade, L. Song, and T. Zhang. Spectral methods for learning multivariate latent tree structure. In Neural Information Processing Systems, 2011. [6] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. arXiv preprint arXiv:1210.7559, 2012. [7] Anima Anandkumar, Rong Ge, Daniel Hsu, and Sham M Kakade. A tensor spectral approach to learning mixed membership community models. In Proc. Annual Conf. Computational Learning Theory, 2013. [8] Animashree Anandkumar, Dean P. Foster, Daniel Hsu, Sham M. Kakade, and Yi-Kai Liu. Two svds suffice: Spectral decompositions for probabilistic topic modeling and latent dirichlet allocation. CoRR, abs/1204.6703, 2012. [9] D. Blei and M. Jordan. Variational inference for dirichlet process mixtures. In Bayesian Analysis, volume 1, pages 121–144, 2005. [10] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, January 2003. [11] Byron Boots, Arthur Gretton, and Geoffrey J Gordon. Hilbert space embeddings of predictive state representations. In Conference on Uncertainty in Artificial Intelligence, 2013. [12] J.-F. Cardoso. Blind signal separation: statistical principles. Proceedings of the IEEE, 90(8):2009–2026, 1998. [13] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39(1):1–22, 1977. [14] F. Doshi, K. Miller, J. Van Gael, and Y. W. Teh. Variational inference for the indian buffet process. Journal of Machine Learning Research - Proceedings Track, 5:137–144, 2009. [15] E. B. Fox, E. B. Sudderth, M. I. Jordan, and A. S. Willsky. Sharing features among dynamical systems with beta processes. nips, 22, 2010. [16] A. Gretton, K. Borgwardt, M. Rasch, B. Schoelkopf, and A. Smola. A kernel two-sample test. JMLR, 13:723–773, 2012. [17] T. Griffiths and Z. Ghahramani. Infinite latent feature models and the indian buffet process. Advances in Neural Information Processing Systems 18, pages 475–482, 2006. [18] T. Griffiths and Z. Ghahramani. The indian buffet process: An introduction and review. Journal of Machine Learning Research, 12:11851224, 2011. [19] T.L. Griffiths and M. Steyvers. Finding scientific topics. Proceedings of the National Academy of Sciences, 101:5228–5235, 2004. [20] N. Halko, P.G. Martinsson, and J. A. Tropp. Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions, 2009. oai:arXiv.org:0909.4061. [21] D. Hsu, S. Kakade, and T. Zhang. A spectral algorithm for learning hidden markov models. In Proc. Annual Conf. Computational Learning Theory, 2009. [22] D. Hsu, S. Kakade, and T. Zhang. Tail inequalities for sums of random matrices that depend on the intrinsic dimension. Electron. Commun. Probab., 17:13, 2012. [23] D. Hsu and S.M. Kakade. Learning mixtures of spherical gaussians: moment methods and spectral decompositions. 2012. [24] D. Knowles and Z. Ghahramani. Infinite sparse factor analysis and infinite independent components analysis. In International Conference on Independent Component Analysis and Signal Separation, 2007. [25] C. McDiarmid. On the method of bounded differences. In Survey in Combinatorics, pages 148–188. Cambridge University Press, 1989. [26] K.T. Miller, T.L. Griffiths, and M.I. Jordan. Latent feature models for link prediction. In Snowbird, page 2 pages, 2009. [27] K. Pearson. Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society, pages 71–71, 1894. [28] G. Pisier. The Volume of Convex Bodies and Banach Space Geometry. Cambridge University Press, Cambridge, 1989. [29] L. Song, B. Boots, S. Siddiqi, G. Gordon, and A. J. Smola. Hilbert space embeddings of hidden markov models. In International Conference on Machine Learning, 2010. [30] F. Wood, T. L. Grifths, and Z. Ghahramani. A non-parametric bayesian method for inferring hidden causes. uai, 2006. 9
2014
208
5,301
Deep Fragment Embeddings for Bidirectional Image Sentence Mapping Andrej Karpathy Armand Joulin Li Fei-Fei Department of Computer Science, Stanford University, Stanford, CA 94305, USA {karpathy,ajoulin,feifeili}@cs.stanford.edu Abstract We introduce a model for bidirectional retrieval of images and sentences through a deep, multi-modal embedding of visual and natural language data. Unlike previous models that directly map images or sentences into a common embedding space, our model works on a finer level and embeds fragments of images (objects) and fragments of sentences (typed dependency tree relations) into a common space. We then introduce a structured max-margin objective that allows our model to explicitly associate these fragments across modalities. Extensive experimental evaluation shows that reasoning on both the global level of images and sentences and the finer level of their respective fragments improves performance on image-sentence retrieval tasks. Additionally, our model provides interpretable predictions for the image-sentence retrieval task since the inferred inter-modal alignment of fragments is explicit. 1 Introduction There is significant value in the ability to associate natural language descriptions with images. Describing the contents of images is useful for automated image captioning and conversely, the ability to retrieve images based on natural language queries has immediate image search applications. In particular, in this work we are interested in training a model on a set of images and their associated natural language descriptions such that we can later rank a fixed set of withheld sentences given an image query, and vice versa. This task is challenging because it requires detailed understanding of the content of images, sentences and their inter-modal correspondence. Consider an example sentence query, such as “A dog with a tennis ball is swimming in murky water” (Figure 1). In order to successfully retrieve a corresponding image, we must accurately identify all entities, attributes and relationships present in the sentence and ground them appropriately to a complex visual scene. Our primary contribution is in formulating a structured, max-margin objective for a deep neural network that learns to embed both visual and language data into a common, multimodal space. Unlike previous work that embeds images and sentences, our model breaks down and embeds fragments of images (objects) and fragments of sentences (dependency tree relations [1]) in a common embedding space and explicitly reasons about their latent, inter-modal correspondences. Extensive empirical evaluation validates our approach. In particular, we report dramatic improvements over state of the art methods on image-sentence retrieval tasks on Pascal1K [2], Flickr8K [3] and Flickr30K [4] datasets. We make our code publicly available. 2 Related Work Image Annotation and Image Search. There is a growing body of work that associates images and sentences. Some approaches focus on the direction of describing the contents of images, formulated either as a task of mapping images to a fixed set of sentences written by people [5, 6], or as a task of automatically generating novel captions [7, 8, 9, 10, 11, 12]. More closely related to our motivation are methods that allow natural bi-drectional mapping between the two modalities. Socher and FeiFei [13] and Hodosh et al. [3] use Kernel Canonical Correlation Analysis to align images and sentences, but their method is not easily scalable since it relies on computing kernels quadratic in 1 Figure 1: Our model takes a dataset of images and their sentence descriptions and learns to associate their fragments. In images, fragments correspond to object detections and scene context. In sentences, fragments consist of typed dependency tree [1] relations. number of images and sentences. Farhadi et al. [5] learn a common meaning space, but their method is limited to representing both images and sentences with a single triplet of (object, action, scene). Zitnick et al. [14] use a Conditional Random Field to reason about spatial relationships in cartoon scenes and their relation to natural language descriptions. Finally, joint models of language and perception have also been explored in robotics settings [15]. Multimodal Representation Learning. Our approach falls into a general category of learning from multi-modal data. Several probabilistic models for representing joint multimodal probability distributions over images and sentences have been developed, using Deep Boltzmann Machines [16], log-bilinear models [17], and topic models [18, 19]. Ngiam et al. [20] described an autoencoder that learns audio-video representations through a shared bottleneck layer. More closely related to our task and approach is the work of Frome et al. [21], who introduced a model that learns to map images and words to a common semantic embedding with a ranking cost. Adopting a similar approach, Socher et al. [22] described a Dependency Tree Recursive Neural Network that puts entire sentences into correspondence with visual data. However, these methods reason about the image only on the global level using a single, fixed-sized representation from the top layer of a Convolutional Neural Network as a description for the entire image. In contrast, our model explicitly reasons about objects that make up a complex scene. Neural Representations for Images and Natural Language. Our model is a neural network that is connected to image pixels on one side and raw 1-of-k word representations on the other. There have been multiple approaches for learning neural representations in these data domains. In Computer Vision, Convolutional Neural Networks (CNNs) [23] have recently been shown to learn powerful image representations that support state of the art image classification [24, 25, 26] and object detection [27, 28]. In language domain, several neural network models have been proposed to learn word/n-gram representations [29, 30, 31, 32, 33, 34], sentence representations [35] and paragraph/document representations [36]. 3 Proposed Model Learning and Inference. Our task is to retrieve relevant images given a sentence query, and conversely, relevant sentences given an image query. We train our model on a set of N images and N corresponding sentences that describe their content (Figure 2). Given this set of correspondences, we learn the weights of a neural network with a structured loss to output a high score when a compatible image-sentence pair is fed through the network, and low score otherwise. Once the training is complete, all training data is discarded and the network is evaluated on a withheld set of images and sentences. The evaluation scores all image-sentence pairs in the test set, sorts the images/sentences in order of decreasing score and records the location of a ground truth result in the list. Fragment Embeddings. Our core insight is that images are complex structures that are made up of multiple entities that the sentences make explicit references to. We capture this intuition directly in our model by breaking down both images and sentences into fragments and reason about their alignment. In particular, we propose to detect objects as image fragments and use sentence dependency tree relations [1] as sentence fragments (Figure 2). Objective. We will compute the representation of both image and sentence fragments with a neural network, and interpret the top layer as high-dimensional vectors embedded in a common multimodal space. We will think of the inner product between these vectors as a fragment compatibility score, and compute the global image-sentence score as a fixed function of the scores of their respective fragments. Intuitively, an image-sentence pair will obtain a high global score if the sentence fragments can each be confidently matched to some fragment in the image. Finally, we will learn the weights of the neural networks such that the true image-sentence pairs achieve a score higher (by a margin) than false image-sentence pairs. 2 Figure 2: Computing the Fragment and image-sentence similarities. Left: CNN representations (green) of detected objects are mapped to the fragment embedding space (blue, Section 3.2). Right: Dependency tree relations in the sentence are embedded (Section 3.1). Our model interprets inner products (shown as boxes) between fragments as a similarity score. The alignment (shaded boxes) is latent and inferred by our model (Section 3.3.1). The image-sentence similarity is computed as a fixed function of the pairwise fragment scores. We first describe the neural networks that compute the Image and Sentence Fragment embeddings. Then we discuss the objective function, which is composed of the two aforementioned objectives. 3.1 Dependency Tree Relations as Sentence Fragments We would like to extract and represent the set of visually identifiable entities described in a sentence. For instance, using the example in Figure 2, we would like to identify the entities (dog, child) and characterise their attributes (black, young) and their pairwise interactions (chasing). Inspired by previous work [5, 22] we observe that a dependency tree of a sentence provides a rich set of typed relationships that can serve this purpose more effectively than individual words or bigrams. We discard the tree structure in favor of a simpler model and interpret each relation (edge) as an individual sentence fragment (Figure 2, right shows 5 example dependency relations). Thus, we represent every word using 1-of-k encoding vector w using a dictionary of 400,000 words and map every dependency triplet (R, w1, w2) into the embedding space as follows: s = f  WR Wew1 Wew2  + bR  . (1) Here, We is a d × 400, 000 matrix that encodes a 1-of-k vector into a d-dimensional word vector representation (we use d = 200). We fix We to weights obtained through an unsupervised objective described in Huang et al. [34]. Note that every relation R can have its own set of weights WR and biases bR. We fix the element-wise nonlinearity f(.) to be the Rectified Linear Unit (ReLU), which computes x →max(0, x). The size of the embedded space is cross-validated, and we found that values of approximately 1000 generally work well. 3.2 Object Detections as Image Fragments Similar to sentences, we wish to extract and describe the set of entities that images are composed of. Inspired by prior work [7], as a modeling assumption we observe that the subject of most sentence descriptions are attributes of objects and their context in a scene. This naturally motivates the use of objects and the global context as the fragments of an image. In particular, we follow Girshick et al. [27] and detect objects in every image with a Region Convolutional Neural Network (RCNN). The CNN is pre-trained on ImageNet [37] and finetuned on the 200 classes of the ImageNet Detection Challenge [38]. We use the top 19 detected locations and the entire image as the image fragments and compute the embedding vectors based on the pixels Ib inside each bounding box as follows: v = Wm[CNNθc(Ib)] + bm, (2) where CNN(Ib) takes the image inside a given bounding box and returns the 4096-dimensional activations of the fully connected layer immediately before the classifier. The CNN architecture is identical to the one described in Girhsick et al. [27]. It contains approximately 60 million parameters θc and closely resembles the architecture of Krizhevsky et al [25]. 3.3 Objective Function We are now ready to formulate the objective function. Recall that we are given a training set of N images and corresponding sentences. In the previous sections we described parameterized functions that map every sentence and image to a set of fragment vectors {s} and {v}, respectively. All parameters of our model are contained in these two functions. As shown in Figure 2, our model 3 Figure 3: The two objectives for a batch of 2 examples. Left: Rows represent fragments vi, columns sj. Every square shows an ideal scenario of yij = sign(vT i sj) in the MIL objective. Red boxes are yij = −1. Yellow indicates members of positive bags that happen to currently be yij = −1. Right: The scores are accumulated with Equation 6 into image-sentence score matrix Skl. then interprets the inner product vT i sj between an image fragment vi and a sentence fragment sj as a similarity score, and computes the image-sentence similarity as a fixed function of the scores of their respective fragments. We are motivated by two criteria in designing the objective function. First, the image-sentence similarities should be consistent with the ground truth correspondences. That is, corresponding image-sentence pairs should have a higher score than all other image-sentence pairs. This will be enforced by the Global Ranking Objective. Second, we introduce a Fragment Alignment Objective that explicitly learns the appearance of sentence fragments (such as “black dog”) in the visual domain. Our full objective is the sum of these two objectives and a regularization term: C(θ) = CF (θ) + βCG(θ) + α||θ||2 2, (3) where θ is a shorthand for parameters of our neural network (θ = {We, WR, bR, Wm, bm, θc}) and α and β are hyperparameters that we cross-validate. We now describe both objectives in more detail. 3.3.1 Fragment Alignment Objective The Fragment Alignment Objective encodes the intuition that if a sentence contains a fragment (e.g.“blue ball”, Figure 3), at least one of the boxes in the corresponding image should have a high score with this fragment, while all the other boxes in all the other images that have no mention of “blue ball” should have a low score. This assumption can be violated in multiple ways: a triplet may not refer to anything visually identifiable in the image. The box that the triplet refers to may not be detected by the RCNN. Lastly, other images may contain the described visual concept but its mention may omitted in the associated sentence descriptions. Nonetheless, the assumption is still satisfied in many cases and can be used to formulate a cost function. Consider an (incomplete) Fragment Alignment Objective that assumes a dense alignment between every corresponding image and sentence fragments: C0(θ) = X i X j max(0, 1 −yijvT i sj). (4) Here, the sum is over all pairs of image and sentence fragments in the training set. The quantity vT i sj can be interpreted as the alignment score of visual fragment vi and sentence fragment sj. In this incomplete objective, we define yij as +1 if fragments vi and sj occur together in a corresponding image-sentence pair, and −1 otherwise. Intuitively, C0(θ) encourages scores in red regions of Figure 3 to be less than -1 and scores along the block diagonal (green and yellow) to be more than +1. Multiple Instance Learning extension. The problem with the objective C0(θ) is that it assumes dense alignment between all pairs of fragments in every corresponding image-sentence pair. However, this is hardly ever the case. For example, in Figure 3, the “boy playing” triplet refers to only one of the three detections. We now describe a Multiple Instance Learning (MIL) [39] extension of the objective C0 that attempts to infer the latent alignment between fragments in corresponding image-sentence pairs. Concretely, for every triplet we put image fragments in the associated image into a positive bag, while image fragments in every other image become negative examples. Our precise formulation is inspired by the mi-SVM [40], which is a simple and natural extension of a Support Vector Machine to a Multiple Instance Learning setting. Instead of treating the yij as constants, we minimize over them by wrapping Equation 4 as follows: 4 CF (θ) = min yij C0(θ) s.t. X i∈pj yij + 1 2 ≥1 ∀j yij = −1 ∀i, j s.t. mv(i) ̸= ms(j) and yij ∈{−1, 1} (5) Here, we define pj to be the set of image fragments in the positive bag for sentence fragment j. mv(i) and ms(j) return the index of the image and sentence (an element of {1, . . . , N}) that the fragments vi and sj belong to. Note that the inequality simply states that at least one of the yij should be positive for every sentence fragment j (i.e. at least one green box in every column in Figure 3). This objective cannot be solved efficiently [40] but a commonly used heuristic is to set yij = sign(vT i sj). If the constraint is not satisfied for any positive bag (i.e. all scores were below zero), the highest-scoring item in the positive bag is set to have a positive label. 3.3.2 Global Ranking Objective Recall that the Global Ranking Objective ensures that the computed image-sentence similarities are consistent with the ground truth annotation. First, we define the image-sentence alignment score to be the average thresholded score of their pairwise fragment scores: Skl = 1 |gk|(|gl| + n) X i∈gk X j∈gl max(0, vT i sj). (6) Here, gk is the set of image fragments in image k and gl is the set of sentence fragments in sentence l. Both k, l range from 1, . . . , N. We truncate scores at zero because in the mi-SVM objective, scores greater than 0 are considered correct alignments and scores less than 0 are considered to be incorrect alignments (i.e. false members of a positive bag). In practice, we found that it was helpful to add a smoothing term n, since short sentences can otherwise have an advantage (we found that n = 5 works well and that this setting is not very sensitive). The Global Ranking Objective then becomes: CG(θ) = X k h X l max(0, Skl −Skk + ∆) | {z } rank images + X l max(0, Slk −Skk + ∆) | {z } rank sentences i . (7) Here, ∆is a hyperparameter that we cross-validate. The objective stipulates that the score for true image-sentence pairs Skk should be higher than Skl or Slk for any l ̸= k by at least a margin of ∆. 3.4 Optimization We use Stochastic Gradient Descent (SGD) with mini-batches of 100, momentum of 0.9 and make 20 epochs through the training data. The learning rate is cross-validated and annealed by a fraction of ×0.1 for the last two epochs. Since both Multiple Instance Learning and CNN finetuning benefit from a good initialization, we run the first 10 epochs with the fragment alignment objective C0 and CNN weights θc fixed. After 10 epochs, we switch to the full MIL objective CF and begin finetuning the CNN. The word embedding matrix We is kept fixed due to overfitting concerns. Our implementation runs at approximately 1 second per batch on a standard CPU workstation. 4 Experiments Datasets. We evaluate our image-sentence retrieval performance on Pascal1K [2], Flickr8K [3] and Flickr30K [4] datasets. The datasets contain 1,000, 8,000 and 30,000 images respectively and each image is annotated using Amazon Mechanical Turk with 5 independent sentences. Sentence Data Preprocessing. We did not explicitly filter, spellcheck or normalize any of the sentences for simplicity. We use the Stanford CoreNLP parser to compute the dependency trees for every sentence. Since there are many possible relation types (as many as hundreds), due to overfitting concerns and practical considerations we remove all relation types that occur less than 1% of the time in each dataset. In practice, this reduces the number of relations from 136 to 16 in Pascal1K, 170 to 17 in Flickr8K, and from 212 to 21 in Flickr30K. Additionally, all words that are not found in our dictionary of 400,000 words [34] are discarded. Image Data Preprocessing. We use the Caffe [41] implementation of the ImageNet Detection RCNN model [27] to detect objects in all images. On our machine with a Tesla K40 GPU, the RCNN processes one image in approximately 25 seconds. We discard the predictions for 200 ImageNet detection classes and only keep the 4096-D activations of the fully connect layer immediately before the classifier at all of the top 19 detected locations and from the entire image. 5 Pascal1K Image Annotation Image Search Model R@1 R@5 R@10 Mean r R@1 R@5 R@10 Mean r Random Ranking 4.0 9.0 12.0 71.0 1.6 5.2 10.6 50.0 Socher et al. [22] 23.0 45.0 63.0 16.9 16.4 46.6 65.6 12.5 kCCA. [22] 21.0 47.0 61.0 18.0 16.4 41.4 58.0 15.9 DeViSE [21] 17.0 57.0 68.0 11.9 21.6 54.6 72.4 9.5 SDT-RNN [22] 25.0 56.0 70.0 13.4 25.4 65.2 84.4 7.0 Our model 39.0 68.0 79.0 10.5 23.6 65.2 79.8 7.6 Table 1: Pascal1K ranking experiments. R@K is Recall@K (high is good). Mean r is the mean rank (low is good). Note that the test set only consists of 100 images. Flickr8K Image Annotation Image Search Model R@1 R@5 R@10 Med r R@1 R@5 R@10 Med r Random Ranking 0.1 0.6 1.1 631 0.1 0.5 1.0 500 Socher et al. [22] 4.5 18.0 28.6 32 6.1 18.5 29.0 29 DeViSE [21] 4.8 16.5 27.3 28 5.9 20.1 29.6 29 SDT-RNN [22] 6.0 22.7 34.0 23 6.6 21.6 31.7 25 Fragment Alignment Objective 7.2 21.9 31.8 25 5.9 20.0 30.3 26 Global Ranking Objective 5.8 21.8 34.8 20 7.5 23.4 35.0 21 (†) Fragment + Global 12.5 29.4 43.8 14 8.6 26.7 38.7 17 † →Images: Fullframe Only 5.9 19.2 27.3 34 5.2 17.6 26.5 32 † →Sentences: BOW 9.1 25.9 40.7 17 6.9 22.4 34.0 23 † →Sentences: Bigrams 8.7 28.5 41.0 16 8.5 25.2 37.0 20 Our model († + MIL) 12.6 32.9 44.0 14 9.7 29.6 42.5 15 * Hodosh et al. [3] 8.3 21.6 30.3 34 7.6 20.7 30.1 38 * Our model († + MIL) 9.3 24.9 37.4 21 8.8 27.9 41.3 17 Table 2: Flickr8K experiments. R@K is Recall@K (high is good). Med r is the median rank (low is good). The starred evaluation criterion (*) in [3] is slightly different since it discards 4,000 out of 5,000 test sentences. Evaluation Protocol for Bidirectional Retrieval. For Pascal1K we follow Socher et al. [22] and use 800 images for training, 100 for validation and 100 for testing. For Flickr datasets we use 1,000 images for validation, 1,000 for testing and the rest for training (consistent with [3]). We compute the dense image-sentence similarity Skl between every image-sentence pair in the test set and rank images and sentences in order of decreasing score. For both Image Annotation and Image Search, we report the median rank of the closest ground truth result in the list, as well as Recall@K which computes the fraction of times the correct result was found among the top K items. When comparing to Hodosh et al. [3] we closely follow their evaluation protocol and only keep a subset of N sentences out of total 5N (we use the first sentence out of every group of 5). 4.1 Comparison Methods SDT-RNN. Socher et al. [22] embed a fullframe CNN representation with the sentence representation from a Semantic Dependency Tree Recursive Neural Network (SDT-RNN). Their loss matches our global ranking objective. We requested the source code of Socher et al. [22] and substituted the Flickr8K and Flick30K datasets. To better understand the benefits of using our detection CNN and for a more fair comparison we also train their method with our CNN features. Since we have multiple objects per image, we average representations from all objects with detection confidence above a (cross-validated) threshold. We refer to the exact method of Socher et al. [22] with a single fullframe CNN as “Socher et al”, and to their method with our combined CNN features as “SDT-RNN”. DeViSE. The DeViSE [21] source code is not publicly available but their approach is a special case of our method with the following modifications: we use the average (L2-normalized) word vectors as a sentence fragment, the average CNN activation of all objects above a detection threshold (as discussed in case of SDT-RNN) as an image fragment and only use the global ranking objective. 4.2 Quantitative Evaluation Our model outperforms previous methods. Our full method consistently outperforms previous methods on Flickr8K (Table 2) and Flickr30K (Table 3) datasets. On Pascal1K (Table 1) the SDT-RNN appears to be competitive on Image Search. Fragment and Global Objectives are complementary. As seen in Tables 2 and 3, both objectives perform well independently, but benefit from the combination. Note that the Global Objective performs consistently better, possibly because it directly minimizes the evaluation criterion (ranking 6 Flickr30K Image Annotation Image Search Model R@1 R@5 R@10 Med r R@1 R@5 R@10 Med r Random Ranking 0.1 0.6 1.1 631 0.1 0.5 1.0 500 DeViSE [21] 4.5 18.1 29.2 26 6.7 21.9 32.7 25 SDT-RNN [22] 9.6 29.8 41.1 16 8.9 29.8 41.1 16 Fragment Alignment Objective 11 28.7 39.3 18 7.6 23.8 34.5 22 Global Ranking Objective 11.5 33.2 44.9 14 8.8 27.6 38.4 17 (†) Fragment + Global 12.0 37.1 50.0 10 9.9 30.5 43.2 14 Our model († + MIL) 14.2 37.7 51.3 10 10.2 30.8 44.2 14 Our model + Finetune CNN 16.4 40.2 54.7 8 10.3 31.4 44.5 13 Table 3: Flickr30K experiments. R@K is Recall@K (high is good). Med r is the median rank (low is good). Figure 4: Qualitative Image Annotation results. Below each image we show the top 5 sentences (among a set of 5,000 test sentences) in descending confidence. We also show the triplets for the top sentence and connect each to the detections with the highest compatibility score (indicated by lines). The numbers next to each triplet indicate the matching fragment score. We color a sentence green if it correct and red otherwise. cost), while the Fragment Alignment Objective only does so indirectly. Extracting object representations is important. Using only the global scene-level CNN representation as a single fragment for every image leads to a consistent drop in performance, suggesting that a single fullframe CNN alone is inadequate in effectively representing the images. (Table 2) Dependency tree relations outperform BoW/bigram representations. We compare to a simpler Bag of Words (BoW) baseline to understand the contribution of dependency relations. In BoW baseline we iterate over words instead of dependency triplets when creating bags of sentence fragments (set w1 = w2 in Equation1). As can be seen in the Table 2, this leads to a consistent drop in performance. This drop could be attributed to a difference between using one word or two words at a time, so we also compare to a bigram baseline where the words w1, w2 in Equation 1 refer to consecutive words in a sentence, not nodes that share an edge in the dependency tree. Again, we observe a consistent performance drop, which suggests that the dependency relations provide useful structure that the neural network takes advantage of. Finetuning the CNN helps on Flickr30K. Our end-to-end Neural Network approach allows us to backpropagate gradients all the way down to raw data (pixels or 1-of-k word encodings). In particular, we observed additional improvements on the Flickr30K dataset (Table 3) when we finetune the CNN. Training the CNN improves the validation error for a while but the model eventually starts to overfit. Thus, we found it critical to keep track of the validation error and freeze the model before it overfits. We were not able to improve the validation performance on Pascal1K and Flickr8K datasets and suspect that there is an insufficient amount of training data. 4.3 Qualitative Experiments Interpretable Predictions. We show some example sentence retrieval results in Figure 4. The alignment in our model is explicitly inferred on the fragment level, which allows us to interpret the scores between images and sentences. For instance, in the last image it is apparent that the model retrieved the top sentence because it erroneously associated a mention of a blue person to the blue flag on the bottom right of the image. Fragment Alignment Objective trains attribute detectors. The detection CNN is trained to predict one of 200 ImageNet Detection classes, so it is not clear if the representation is powerful enough to support learning of more complex attributes of the objects or generalize to novel classes. To see whether our model successfully learns to predict sentence triplets, we fix a triplet vector and 7 Figure 5: We fix a triplet and retrieve the highest scoring image fragments in the test set. Note that ball, person and dog are ImageNet Detection classes but their visual properties (e.g. soccer, standing, snowboarding, black) are not. Jackets and rocky scenes are not ImageNet Detection classes. Find more in supplementary material. search for the highest scoring boxes in the test set. Qualitative results shown in Figure 5 suggest that the model is indeed capable of generalizing to more fine-grained subcategories (such as “black dog”, “soccer ball”) and to out of sample classes such as “rocky terrain” and “jacket”. Limitations. Our model is subject to multiple limitations. From a modeling perspective, the use of edges from a dependency tree is simple, but not always appropriate. First, a single complex phrase that describes a single visual entity can be split across multiple sentence fragments. For example, “black and white dog” is parsed as two relations (CONJ, black, white) and (AMOD, white, dog). Conversely, there are many dependency relations that don’t have a clear grounding in the image (for example “each other”). Furthermore, phrases such as “three children playing” that describe some particular number of visual entiries are not modeled. While we have shown that the relations give rise to more powerful representations than words or bigrams, a more careful treatment of sentence fragments will likely lead to further improvements. On the image side, the non-maximum suppression in the RCNN can sometimes detect, for example, multiple people inside one person. Since the model does not take into account any spatial information associated with the detections, it is hard for it to disambiguate between two distinct people or spurious detections of one person. 5 Conclusions We addressed the problem of bidirectional retrieval of images and sentences. Our neural network learns a multi-modal embedding space for fragments of images and sentences and reasons about their latent, inter-modal alignment. We have shown that our model significantly improves the retrieval performance on image sentence retrieval tasks compared to previous work. Our model also produces interpretable predictions. In future work we hope to develop better sentence fragment representations, incorporate spatial reasoning, and move beyond bags of fragments. Acknowledgments. We thank Justin Johnson and Jon Krause for helpful comments and discussions. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the GPUs used for this research. This research is supported by an ONR MURI grant, and NSF ISS-1115313. References [1] De Marneffe, M.C., MacCartney, B., Manning, C.D., et al.: Generating typed dependency parses from phrase structure parses. In: Proceedings of LREC. Volume 6. (2006) 449–454 [2] Rashtchian, C., Young, P., Hodosh, M., Hockenmaier, J.: Collecting image annotations using amazon’s mechanical turk. In: Proceedings of the NAACL HLT 2010 Workshop on Creating Speech and Language Data with Amazon’s Mechanical Turk, Association for Computational Linguistics (2010) 139–147 [3] Hodosh, M., Young, P., Hockenmaier, J.: Framing image description as a ranking task: data, models and evaluation metrics. Journal of Artificial Intelligence Research (2013) [4] Young, P., Lai, A., Hodosh, M., Hockenmaier, J.: From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. TACL (2014) [5] Farhadi, A., Hejrati, M., Sadeghi, M.A., Young, P., Rashtchian, C., Hockenmaier, J., Forsyth, D.: Every picture tells a story: Generating sentences from images. In: ECCV. (2010) [6] Ordonez, V., Kulkarni, G., Berg, T.L.: Im2text: Describing images using 1 million captioned photographs. In: NIPS. (2011) [7] Kulkarni, G., Premraj, V., Dhar, S., Li, S., Choi, Y., Berg, A.C., Berg, T.L.: Baby talk: Understanding and generating simple image descriptions. In: CVPR. (2011) 8 [8] Yao, B.Z., Yang, X., Lin, L., Lee, M.W., Zhu, S.C.: I2t: Image parsing to text description. Proceedings of the IEEE 98(8) (2010) 1485–1508 [9] Yang, Y., Teo, C.L., Daum´e III, H., Aloimonos, Y.: Corpus-guided sentence generation of natural images. In: EMNLP. (2011) [10] Li, S., Kulkarni, G., Berg, T.L., Berg, A.C., Choi, Y.: Composing simple image descriptions using web-scale n-grams. In: CoNLL. (2011) [11] Mitchell, M., Han, X., Dodge, J., Mensch, A., Goyal, A., Berg, A., Yamaguchi, K., Berg, T., Stratos, K., Daum´e, III, H.: Midge: Generating image descriptions from computer vision detections. In: EACL. (2012) [12] Kuznetsova, P., Ordonez, V., Berg, A.C., Berg, T.L., Choi, Y.: Collective generation of natural image descriptions. In: ACL. (2012) [13] Socher, R., Fei-Fei, L.: Connecting modalities: Semi-supervised segmentation and annotation of images using unaligned text corpora. In: CVPR. (2010) [14] Zitnick, C.L., Parikh, D., Vanderwende, L.: Learning the visual interpretation of sentences. ICCV (2013) [15] Matuszek*, C., FitzGerald*, N., Zettlemoyer, L., Bo, L., Fox, D.: A Joint Model of Language and Perception for Grounded Attribute Learning. In: Proc. of the 2012 International Conference on Machine Learning, Edinburgh, Scotland (June 2012) [16] Srivastava, N., Salakhutdinov, R.: Multimodal learning with deep boltzmann machines. In: NIPS. (2012) [17] Kiros, R., Zemel, R.S., Salakhutdinov, R.: Multimodal neural language models. ICML (2014) [18] Jia, Y., Salzmann, M., Darrell, T.: Learning cross-modality similarity for multinomial data. In: ICCV. (2011) [19] Barnard, K., Duygulu, P., Forsyth, D., De Freitas, N., Blei, D.M., Jordan, M.I.: Matching words and pictures. JMLR (2003) [20] Ngiam, J., Khosla, A., Kim, M., Nam, J., Lee, H., Ng, A.Y.: Multimodal deep learning. In: ICML. (2011) [21] Frome, A., Corrado, G.S., Shlens, J., Bengio, S., Dean, J., Mikolov, T., et al.: Devise: A deep visualsemantic embedding model. In: NIPS. (2013) [22] Socher, R., Karpathy, A., Le, Q.V., Manning, C.D., Ng, A.Y.: Grounded compositional semantics for finding and describing images with sentences. TACL (2014) [23] LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. Proceedings of the IEEE 86(11) (1998) 2278–2324 [24] Le, Q.V.: Building high-level features using large scale unsupervised learning. In: Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, IEEE (2013) 8595–8598 [25] Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: NIPS. (2012) [26] Zeiler, M.D., Fergus, R.: Visualizing and understanding convolutional neural networks. arXiv preprint arXiv:1311.2901 (2013) [27] Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: CVPR. (2014) [28] Sermanet, P., Eigen, D., Zhang, X., Mathieu, M., Fergus, R., LeCun, Y.: Overfeat: Integrated recognition, localization and detection using convolutional networks. In: ICLR. (2014) [29] Bengio, Y., Schwenk, H., Sen´ecal, J.S., Morin, F., Gauvain, J.L.: Neural probabilistic language models. In: Innovations in Machine Learning. Springer (2006) [30] Mnih, A., Hinton, G.: Three new graphical models for statistical language modelling. In: ICML. (2007) [31] Mikolov, T., Sutskever, I., Chen, K., Corrado, G.S., Dean, J.: Distributed representations of words and phrases and their compositionality. In: NIPS. (2013) [32] Turian, J., Ratinov, L., Bengio, Y.: Word representations: a simple and general method for semisupervised learning. In: ACL. (2010) [33] Collobert, R., Weston, J.: A unified architecture for natural language processing: Deep neural networks with multitask learning. In: ICML. (2008) [34] Huang, E.H., Socher, R., Manning, C.D., Ng, A.Y.: Improving word representations via global context and multiple word prototypes. In: ACL. (2012) [35] Socher, R., Lin, C.C., Manning, C., Ng, A.Y.: Parsing natural scenes and natural language with recursive neural networks. In: ICML. (2011) [36] Le, Q.V., Mikolov, T.: Distributed representations of sentences and documents. ICML (2014) [37] Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: CVPR. (2009) [38] Russakovsky, O., Deng, J., Krause, J., Berg, A., Fei-Fei, L.: Large scale visual recognition challenge 2013. http://image-net.org/challenges/LSVRC/2013/ (2013) [39] Chen, Y., Bi, J., Wang, J.Z.: Miles: Multiple-instance learning via embedded instance selection. CVPR 28(12) (2006) [40] Andrews, S., Hofmann, T., Tsochantaridis, I.: Multiple instance learning with generalized support vector machines. In: AAAI/IAAI. (2002) 943–944 [41] Jia, Y.: Caffe: An open source convolutional architecture for fast feature embedding. http://caffe.berkeleyvision.org/ (2013) 9
2014
209
5,302
Diverse Sequential Subset Selection for Supervised Video Summarization Boqing Gong∗ Department of Computer Science University of Southern California Los Angeles, CA 90089 boqinggo@usc.edu Wei-Lun Chao∗ Department of Computer Science University of Southern California Los Angeles, CA 90089 weilunc@usc.edu Kristen Grauman Department of Computer Science University of Texas at Austin Austin, TX 78701 grauman@cs.utexas.edu Fei Sha Department of Computer Science University of Southern California Los Angeles, CA 90089 feisha@usc.edu Abstract Video summarization is a challenging problem with great application potential. Whereas prior approaches, largely unsupervised in nature, focus on sampling useful frames and assembling them as summaries, we consider video summarization as a supervised subset selection problem. Our idea is to teach the system to learn from human-created summaries how to select informative and diverse subsets, so as to best meet evaluation metrics derived from human-perceived quality. To this end, we propose the sequential determinantal point process (seqDPP), a probabilistic model for diverse sequential subset selection. Our novel seqDPP heeds the inherent sequential structures in video data, thus overcoming the deficiency of the standard DPP, which treats video frames as randomly permutable items. Meanwhile, seqDPP retains the power of modeling diverse subsets, essential for summarization. Our extensive results of summarizing videos from 3 datasets demonstrate the superior performance of our method, compared to not only existing unsupervised methods but also naive applications of the standard DPP model. 1 Introduction It is an impressive yet alarming fact that there is far more video being captured—by consumers, scientists, defense analysts, and others—than can ever be watched or browsed efficiently. For example, 144,000 hours of video are uploaded to YouTube daily; lifeloggers with wearable cameras amass Gigabytes of video daily; 422,000 CCTV cameras perched around London survey happenings in the city 24/7. With this explosion of video data comes an ever-pressing need to develop automatic video summarization algorithms. By taking a long video as input and producing a short video (or keyframe sequence) as output, video summarization has great potential to reign in raw video and make it substantially more browseable and searchable. Video summarization methods often pose the problem in terms of subset selection: among all the frames (subshots) in the video, which key frames (subshots) should be kept in the output summary? There is a rich literature in computer vision and multimedia developing a variety of ways to answer this question [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. Existing techniques explore a plethora of properties that a good summary should capture, designing criteria that the algorithm should prioritize when deciding ∗Equal contribution 1 which subset of frames (or subshots) to select. These include representativeness (the frames should depict the main contents of the videos) [1, 2, 10], diversity (they should not be redundant) [4, 11], interestingness (they should have salient motion/appearance [2, 3, 6] or trackable objects [5, 12, 7]), or importance (they should contain important objects that drive the visual narrative) [8, 9]. Despite valuable progress in developing the desirable properties of a summary, prior approaches are impeded by their unsupervised nature. Typically the selection algorithm favors extracting content that satisfies criteria like the above (diversity, importance, etc.), and performs some sort of frame clustering to discover events. Unfortunately, this often requires some hand-crafting to combine the criteria effectively. After all, the success of a summary ultimately depends on human perception. Furthermore, due to the large number of possible subsets that could be selected, it is difficult to directly optimize the criteria jointly on the selected frames as a subset; instead, sampling methods that identify independently useful frames (or subshots) are common. To address these limitations, we propose to consider video summarization as a supervised subset selection problem. The main idea is to use examples of human-created summaries—together with their original source videos—to teach the system how to select informative subsets. In doing so, we can escape the hand-crafting often necessary for summarization, and instead directly optimize the (learned) factors that best meet evaluation metrics derived from human-perceived quality. Furthermore, rather than independently select “high scoring” frames, we aim to capture the interlocked dependencies between a given frame and all others that could be chosen. To this end, we propose the sequential determinantal point process (seqDPP), a new probabilistic model for sequential and diverse subset selection. The determinantal point process (DPP) has recently emerged as a powerful method for selecting a diverse subset from a “ground set” of items [13], with applications including document summarization [14] and information retrieval [15]. However, existing DPP techniques have a fatal modeling flaw if applied to video (or documents) for summarization: they fail to capture their inherent sequential nature. That is, a standard DPP treats the inputs as bags of randomly permutable items agnostic to any temporal structure. Our novel seqDPP overcomes this deficiency, making it possible to faithfully represent the temporal dependencies in video data. At the same time, it lets us pose summarization as a supervised learning problem. While learning how to summarize from examples sounds appealing, why should it be possible— particularly if the input videos are expected to vary substantially in their subject matter?1 Unlike more familiar supervised visual recognition tasks, where test data can be reasonably expected to look like the training instances, a supervised approach to video summarization must be able to learn generic properties that transcend the specific content of the training set. For example, the learner can recover a “meta-cue” for representativeness, if the input features record profiles of the similarity between a frame and its increasingly distant neighbor frames. Similarly, category-independent cues about an object’s placement in the frame, the camera person’s active manipulation of viewpoint/zoom, etc., could play a role. In any such case, we can expect the learning algorithm to focus on those meta-cues that are shared by the human-selected frames in the training set, even though the subject matter of the videos may differ. In short, our main contributions are: a novel learning model (seqDPP) for selecting diverse subsets from a sequence, its application to video summarization (the model is applicable to other sequential data as well), an extensive empirical study with three benchmark datasets, and a successful firststep/proof-of-concept towards using human-created video summaries for learning to select subsets. The rest of the paper is organized as follows. In section 2, we review DPP and its application to document summarization. In section 3, we describe our seqDPP method, followed by a discussion of related work in section 4. We report results in section 5, then conclude in section 6. 2 Determinantal point process (DPP) The DPP was first used to characterize the Pauli exclusion principle, which states that two identical particles cannot occupy the same quantum state simultaneously [16]. The notion of exclusion has made DPP an appealing tool for modeling diversity in application such as document summarization [14, 13], or image search and ranking [17]. In what follows, we give a brief account on DPP and how to apply it to document summarization where the goal is to generate a summary by selecting 1After all, not all videos on YouTube are about cats. 2 several sentences from a long document [18, 19]. The selected sentences should be not only diverse (i.e., different) to reduce the redundancy in the summary, but also representative of the document. Background Let Y = {1, 2, · · · , N} be a ground set of N items (eg., sentences). In its simplest form, a DPP defines a discrete probability distribution over all the 2N subsets of Y. Let Y denote the random variable of selecting a subset. Y is then distributed according to P(Y = y) = det(Ly) det(L + I) (1) for y ⊆Y. The kernel L ∈SN×N + is the DPP’s parameter and is constrained to be positive semidefinite. I is the identity matrix. Ly is the principal minor (sub-matrix) with rows and columns selected according to the indices in y. The determinant function det(·) gives rise to the interesting property of pairwise repulsion. To see that, consider selecting a subset of two items i and j. We have P(Y = {i, j}) ∝LiiLjj −L2 ij. (2) If the items i and j are the same, then P(Y = {i, j}) = 0 (because Lij = Lii = Ljj). Namely, identical items should not appear together in the same set. A more general case also holds: if i and j are similar to each other, then the probability of observing i and j in a subset together is going to be less than that of observing either one of them alone (see the excellent tutorial [13] for details). The most diverse subset of Y is thus the one that attains the highest probability y∗= arg maxy P(Y = y) = arg maxy det(Ly), (3) where y∗results from MAP inference. This is a NP-hard combinatorial optimization problem. However, there are several approaches to obtaining approximate solutions [13, 20]. Learning DPPs for document summarization Suppose we model selecting a subset of sentences as a DPP over all sentences in a document. We are given a set of training samples in the form of documents (i.e., ground sets) and the ground-truth summaries. How can we discover the underlying parameter L so as to use it for generating summaries for new documents? Note that the new documents will likely have sentences that have not been seen before in the training samples. Thus, the kernel matrix L needs to be reparameterized in order to generalize to unseen documents. [14] proposed a special reparameterization called quality/diversity decomposition: Lij = qiφT i φjqj, qi = exp 1 2θTxi  , (4) where φi is the normalized TF-IDF vector of the sentence i so that φT i φj computes the cosine angle between two sentences. The “quality” feature vector xi encodes the contextual information about i and its representativeness of other items. In document summarization, xi are the sentence lengths, positions of the sentences in the texts, and other meta cues. The parameter θ is then optimized with maximum likelihood estimation (MLE) such that the target subsets have the highest probabilities θ∗= arg maxθ X n log P(Y = y∗ n; Ln(θ)), (5) where Ln is the L matrix formulated using sentences in the n-th ground set, and y∗ n is the corresponding ground-truth summary. Despite its success in document summarization [14], a direct application of DPP to video summarization is problematic. The DPP model is agnostic about the order of the items. For video (and to a large degree, text data), it does not respect the inherent sequential structures. The second limitation is that the quality-diversity decomposition, while cleverly leading to a convex optimization, limits the power of modeling complex dependencies among items. Specifically, only the quality factor qi is optimized on the training data. We develop new approaches to overcoming those limitations. 3 Approach In what follows, we describe our approach for video summarization. Our approach contains three components: (1) a preparatory yet crucial step that generates ground-truth summaries from multiple human-created ones (section 3.1); (2) a new probabilistic model—the sequential determinantal point process (seqDPP)—that models the process of sequentially selecting diverse subsets (section 3.2); (3) a novel way of re-parameterizing seqDPP that enables learning more flexible and powerful representations for subset selection from standard visual and contextual features (section 3.3). 3 Figure 1: The agreement among human-created summaries is high, as is the agreement between the oracle summary generated by our algorithm (cf. section 3.1) and human annotations. 3.1 Generating ground-truth summaries The first challenge we need to address is what to provide to our learning algorithm as ground-truth summaries. In many video datasets, each video is annotated (manually summarized) by multiple human users. While the users were often well instructed on the annotation task, discrepancies are expected due to many uncontrollable individual factors such as whether the person was attentive, idiosyncratic viewing preferences, etc. There are some studies on how to evaluate automatically generated summaries in the presence of multiple human-created annotations [21, 22, 23]. However, for learning, our goal is to generate one single ground-truth or “oracle” summary per video. Our main idea is to synthesize the oracle summary that maximally agrees with all annotators. Our hypothesis is that despite the discrepancies, those summaries nonetheless share the common traits of reflecting the subject matters in the video. These commonalities, to be discovered by our synthesis algorithm, will provide strong enough signals for our learning algorithm to be successful. To begin with, we first describe a few metrics in quantifying the agreement in the simplest setting where there are only two summaries. These metrics will also be used later in our empirical studies to evaluate various summarization methods. Using those metrics, we then analyze the consistency of human-created summaries in two video datasets to validate our hypothesis. Finally, we present our algorithm for synthesizing one single oracle summary per video. Evaluation metrics Given two video summaries A and B, we measure how much they are in agreement by first matching their frames, as they might be of different lengths. Following [24], we compute the pairwise distances between all frames across the two summaries. Two frames are then “matched” if their visual difference is below some threshold; a frame is constrained to appear in the matched pairs at most once. After the matching, we compute the following metrics (commonly known as Precision, Recall and F-score): PAB = #matched frames #frames in A , RAB = #matched frames #frames in B , FAB = PAB · RAB 0.5(PAB + RAB). All of them lie between 0 and 1, and higher values indicate better agreement between A and B. Note that these metrics are not symmetric – if we swap A and B, the results will be different. Our idea of examining the consistency among all summaries is to treat each summary in turn as if it were the gold-standard (and assign it as B) while treating the other summaries as A’s. We report our analysis of existing video datasets next. Consistency in existing video databases We analyze video summaries in two video datasets: 50 videos from the Open Video Project (OVP) [25] and another 50 videos from Youtube [24]. Details about these two video datasets are in section 5. We briefly point out that the two datasets have very different subject matters and composition styles. Each of the 100 videos has 5 annotated summaries. For each video, we compute the pairwise evaluation metrics in precision, recall, and F-score by forming total 20 pairs of summaries from two different annotators. We then average them per video. We plot how these averaged metrics distribute in Fig. 1. The plots show the number of videos (out of 100) whose averaged metrics exceed certain thresholds, marked on the horizontal axes. For example, more than 80% videos have an averaged F-score greater than 0.6, and 60% more than 0.7. Note that there are many videos (≈20) with averaged F-scores greater than 0.8, indicating that on average, human-created summaries have a high degree of agreement. Note that the mean values of the averaged metrics per video are also high. 4 Greedy algorithm for synthesizing an oracle summary Encouraged by our findings, we develop a greedy algorithm for synthesizing one oracle summary per video, from multiple human-created ones. This algorithm is adapted from a similar one for document summarization [14]. Specifically, for each video, we initialize the oracle summary with the empty set y∗= ∅. Iteratively, we then add to y∗one frame i at a time from the video sequence y∗←y∗∪arg maxi X u Fy∗∪i,yu. (6) In words, the frame i is selected to maximally increase the F-score between the new oracle summary and the human-created summaries yu. To avoid adding all frames in the video sequence, we stop the greedy process as soon as there is no frame that can increase the F-score. We measure the quality of the synthesized oracle summaries by computing their mean agreement with the human annotations. The results are shown in Fig. 1 too. The quality is high: more than 90% of the oracle summaries agree well with other summaries, with an F-score greater than 0.6. In what follows, we will treat the oracle summaries as ground-truth to inform our learning algorithms. 3.2 Sequential determinantal point processes (seqDPP) The determinantal point process, as described in section 2, is a powerful tool for modeling diverse subset selection. However, video frames are more than items in a set. In particular, in DPP, the ground set is a bag – items are randomly permutable such that the most diverse subset remains unchanged. Translating this into video summarization, this modeling property essentially suggests that we could randomly shuffle video frames and expect to get the same summary! To address this serious deficiency, we propose sequential DPP, a new probabilistic model to introduce strong dependency structures between items. As a motivating example, consider a video portraying the sequence of someone leaving home for school, coming back to home for lunch, leaving for market and coming back for dinner. If only visual appearance cues are available, a vanilla DPP model will likely select only one frame from the home scene and repel other frames occurring at the home. Our model, on the other hand, will recognize that the temporal span implies those frames are still diverse despite their visual similarity. Thus, our modeling intuition is that diversity should be a weaker prior for temporally distant frames but ought to act more strongly for closely neighboring frames. We now explain how our seqDPP method implements this intuition. Model definition Given a ground set (a long video sequence) Y, we partition it into T disjoint yet consecutive short segments ST t=1 Yt = Y. At time t, we introduce a subset selection variable Yt. We impose a DPP over two neighboring segments where the ground set is Ut = Yt ∪yt−1, ie., the union between the video segments and the selected subset in the immediate past. Let Ωt denote the L-matrix defined over the ground set Ut. The conditional distribution of Yt is thus given by, P(Yt = yt|Yt−1 = yt−1) = det Ωyt−1∪yt det(Ωt + It). (7) As before, the subscript yt−1 ∪yt selects the corresponding rows and columns from Ωt. It is a diagonal matrix, the same size as Ut. However, the elements corresponding to yt−1 are zeros and the elements corresponding to Yt are 1 (see [13] for details). Readers who are familiar with DPP might identify the conditional distribution is also a DPP, restricted to the ground set Yt. The conditional probability is defined in such a way that at time t, the subset selected should be diverse among Yt as well as be diverse from previously selected yt−1. However, beyond those two priors, the subset is not constrained by subsets selected in the distant past. Fig. 2 illustrates the idea in graphical model notation. In particular, the joint distribution of all subsets is factorized P(Y1 = y1, Y2 = y2, · · · , YT = yT ) = P(Y1 = y1) Y t=2 P(Yt = yt|Yt−1 = yt−1). (8) Inference and learning The MAP inference for the seqDPP model eq. (8) is as hard as the standard DPP model. Thus, we propose to use the following online inference, analogous to Bayesian belief updates (for Kalman filtering): y∗ 1 = arg maxy∈Y1 P(Y1 = y) y∗ 2 = arg maxy∈Y2 P(Y2 = y|Y1 = y∗ 1) · · · y∗ t = arg maxy∈Yt P(Yt = y|Yt−1 = y∗ t−1) · · · · · · 5 Y1 Y2 Y3 · · · Yt · · · YT Y1 Y2 Y3 Yt YT Figure 2: Our sequential DPP for modeling sequential video data, drawn as a Bayesian network Note that, at each step, the ground set could be quite small; thus an exhaustive search for the most diverse subset is plausible. The parameter learning is similar to the standard DPP model. We describe the details in the supplementary material. 3.3 Learning representations for diverse subset selection As described previously, the kernel L of DPP hinges on the reparameterization with features of the items that can generalize across different ground sets. The quality-diversity decomposition in eq. (4), while elegantly leading to convex optimization, is severely limited in its power in modeling complex items and dependencies among them. In particular, learning the subset selection rests solely on learning the quality factor, as the diversity component remains handcrafted and fixed. We overcome this deficiency with more flexible and powerful representations. Concretely, let fi stand for the feature representation for item (frame) i, including both low-level visual cues and meta-cues such as contextual information. We reparameterize the L matrix with fi in two ways. Linear embeddings The simplest way is to linearly transform the original features Lij = f T i W TW fj, (9) where W is the transformation matrix. Nonlinear hidden representation We use a one-hidden-layer neural network to infer a hidden representation for fi Lij = zT i W TW zj where zi = tanh(Ufi), (10) where tanh(·) stands for the hyperbolic transfer function. To learn the parameters W or U and W , we use maximum likelihood estimation (cf. eq. (5)), with gradient-descent to optimize. Details are given in the supplementary material. 4 Related work Space does not permit a thorough survey of video summarization methods. Broadly speaking, existing approaches develop a variety of selection criteria to prioritize frames for the output summary, often combined with temporal segmentation. Prior work often aims to retain diverse and representative frames [2, 1, 10, 4, 11], and/or defines novel metrics for object and event saliency [3, 2, 6, 8]. When the camera is known to be stationary, background subtraction and object tracking are valuable cues (e.g., [5]). Recent developments tackle summarization for dynamic cameras that are worn or handheld [10, 8, 9] or design online algorithms to process streaming data [7]. Whereas existing methods are largely unsupervised, our idea to explicitly learn subset selection from human-given summaries is novel. Some prior work includes supervised learning components that are applied during selection (e.g., to generate learned region saliency metrics [8] or train classifiers for canonical viewpoints [10]), but they do not train/learn the subset selection procedure itself. Our idea is also distinct from “interactive” methods, which assume a human is in the loop to give supervision/feedback on each individual test video [26, 27, 12]. Our focus on the determinantal point process as the building block is largely inspired by its appealing property in modeling diversity in subset selection, as well as its success in search and ranking [17], document summarization [14], news headline displaying [28], and pose estimation [29]. Applying DPP to video summarization, however, is novel to the best of our knowledge. Our seqDPP is closest in spirit to the recently proposed Markov DPP [28]. While both models enjoy the Markov property by defining conditional probabilities depending only on the immediate past, 6 Table 1: Performance of various video summarization methods on OVP. Ours and its variants perform the best. Unsupervised methods Supervised subset selection DT STIMO VSUMM1 VSUMM2 DPP + Q/D Ours (seqDPP+) [30] [31] [24] [24] [14] Q/D LINEAR N.NETS F 57.6 63.4 70.3 68.2 70.8±0.3 68.5±0.3 75.5±0.4 77.7±0.4 P 67.7 60.3 70.6 73.1 71.5±0.4 66.9±0.4 77.5±0.5 75.0±0.5 R 53.2 72.2 75.8 69.1 74.5±0.3 75.8±0.5 78.4±0.5 87.2±0.3 Table 2: Performance of our method with different representation learning VSUMM2 [24] seqDPP+LINEAR seqDPP+N. NETS F P R F P R F P R Youtube 55.7 59.7 58.7 57.8±0.5 54.2±0.7 69.8±0.5 60.3±0.5 59.4±0.6 64.9±0.5 Kodak 68.9 75.7 80.6 75.3±0.7 77.8±1.0 80.4±0.9 78.9±0.5 81.9±0.8 81.1±0.9 Markov DPP’s ground set is still the whole video sequence, whereas seqDPP can select diverse sets from the present time. Thus, one potential drawback of applying Markov DPP is to select video frames out of temporal order, thus failing to model the sequential nature of the data faithfully. 5 Experiments We validate our approach of sequential determinantal point processes (seqDPP) for video summarization on several datasets, and obtain superior performance to competing methods. 5.1 Setup Data We benchmark various methods on 3 video datasets: the Open Video Project (OVP), the Youtube dataset [24], and the Kodak consumer video dataset [32]. They have 50, 392, and 18 videos, respectively. The first two have 5 human-created summaries per video and the last has one humancreated summary per video. Thus, for the first two datasets, we follow the algorithm described in section 3.1 to create an oracle summary per video. We follow the same procedure as in [24] to preprocess the video frames. We uniformly sample one frame per second and then apply two stages of pruning to remove uninformative frames. Details are in the supplementary material. Features Each frame is encoded with an ℓ2-normalized 8192-dimensional Fisher vector φi [33], computed from SIFT features [34]. The Fisher vector represents well the visual appearance of the video frame, and is hence used to compute the pairwise correlations of the frames in the qualitydiversity decomposition (cf. eq. (4)). We derive the quality features xi by measuring the representativeness of the frame. Specifically, we place a contextual window centered around the frame of interest, and then compute its mean correlation (using the SIFT Fisher vector) to the other frames in the window. By varying the size of the windows from 5 to 15, we obtain 12-dimensional contextual features. We also add features computed from the frame saliency map [35]. To apply our method for learning representations (cf. section 3.3), however, we do not make a distinction between the two types, and instead compose a feature vector fi by concatenating xi and φi. The dimension of our linear transformed features W fi is 10, 40 and 100 for OVP, Youtube, and Kodak, respectively. For the neural network, we use 50 hidden units and 50 output units. Other details For each dataset, we randomly choose 80% of the videos for training and use the remaining 20% for testing. We run 100 rounds of experiments and report the average performance, which is evaluated by the aforementioned F-score, Precision, and Recall (cf. section 3.1). For evaluation, we follow the standard procedure: for each video, we treat each human-created summary as golden-standard and assess the quality of the summary output by our algorithm. We then average over all human annotators to obtain the evaluation metrics for that video. 5.2 Results We contrast our approach to several state-of-the-art methods for video summarization—which include several leading unsupervised methods—as well as the vanilla DPP model that has been successfully used for document summarization but does not model sequential structures. We compare the methods in greater detail on the OVP dataset. Table 1 shows the results. 2In total there are 50 Youtube videos. We keep 39 of them after excluding the cartoon videos. 7 Sequential LINEAR (F=70, P=60, R=88) Oracle VSUMM1 (F=59, P=65, R=55) Youtube (Video 99) User Sequential LINEAR (F=86, P=75, R=100) VSUMM1 (F=50, P=100, R=33) Kodak (Video 4) Figure 3: Exemplar video summaries by our seqDPP LINEAR vs. VSUMM summary [24]. Unsupervised or supervised? The four unsupervised methods are DT [30], STIMO [31], VSUMM1 [24], and VSUMM2 with a postprocessing step to VSUMM1 to improve the precision of the results. We implement VSUMM ourselves using features described in the orignal paper and tune its parameters to have the best test performance. All 4 methods use clustering-like procedures to identify key frames as video summaries. Results of DT and STIMO are taken from their original papers. They generally underperform VSUMM. What is interesting is that the vanilla DPP does not outperform the unsupervised methods, despite its success in other tasks. On the other end, our supervised method seqDPP, when coupled with the linear or neural network representation learning, performs significantly better than all other methods. We believe the improvement can be attributed to two factors working in concert: (1) modeling sequential structures of the video data, and (2) more flexible and powerful representation learning. This is evidenced by the rather poor performance of seqDPP with the quality/diversity (Q/D) decomposition, where the representation of the items is severely limited such that modeling temporal structures alone is simply insufficient. Linear or nonlinear? Table 2 concentrates on comparing the effectiveness of these two types of representation learning. The performances of VSUMM are provided for reference only. We see that learning representations with neural networks generally outperforms the linear representations. Qualitative results We present exemplar video summaries by different methods in Fig. 3. The challenging Youtube video illustrates the advantage of sequential diverse subset selection. The visual variance in the beginning of the video is far greater (due to close-shots of people) than that at the end (zooming out). Thus the clustering-based VSUMM method is prone to select key frames from the first half of the video, collapsing the latter part. In contrast, our seqDPP copes with time-varying diversity very well. The Kodak video demonstrates again our method’s ability in attaining high recall when users only make diverse selections locally but not globally. VSUMM fails to acknowledge temporally distant frames can be diverse despite their visual similarities. 6 Conclusion Our novel learning model seqDPP is a successful first step towards using human-created summaries for learning to select subsets for the challenging video summarization problem. We just scratched the surface of this fruit-bearing direction. We plan to investigate how to learn more powerful representations from low-level visual cues. Acknowledgments B. G., W. C. and F. S. are partially supported by DARPA D11-AP00278, NSF IIS-1065243, and ARO #W911NF-12-1-0241. K. G. is supported by ONR YIP Award N00014-12-1-0754 and gifts from Intel and Google. B. G. and W. C. also acknowledge supports from USC Viterbi Doctoral Fellowship and USC Annenberg Graduate Fellowship. We are grateful to Jiebo Luo for providing the Kodak dataset [32]. 8 References [1] R. Hong, J. Tang, H. Tan, S. Yan, C. Ngo, and T. Chua. Event driven summarization for web videos. In ACM SIGMM Workshop on Social Media, 2009. [2] C.-W. Ngo, Y.-F. Ma, and H.-J. Zhang. Automatic video summarization by graph modeling. In ICCV, 2003. [3] Yu-Fei Ma, Lie Lu, Hong-Jiang Zhang, and Mingjing Li. A user attention model for video summarization. In ACM MM, 2002. [4] Tiecheng Liu and John R. Kender. Optimization algorithms for the selection of key frame sequences of variable length. In ECCV, 2002. [5] Y. Pritch, A. Rav-Acha, A. Gutman, and S. Peleg. Webcam synopsis: Peeking around the world. In ICCV, 2007. [6] H. Kang, X. Chen, Y. Matsushita, and Tang X. Space-time video montage. In CVPR, 2006. [7] Shikun Feng, Zhen Lei, Dong Yi, and Stan Z. Li. Online content-aware video condensation. In CVPR, 2012. [8] Yong Jae Lee, Joydeep Ghosh, and Kristen Grauman. Discovering important people and objects for egocentric video summarization. In CVPR, 2012. [9] Zheng Lu and Kristen Grauman. Story-driven summarization for egocentric video. In CVPR, 2013. [10] A. Khosla, R. Hamid, C-J. Lin, and N. Sundaresan. Large-scale video summarization using web-image priors. In CVPR, 2013. [11] Hong-Jiang Zhang, Jianhua Wu, Di Zhong, and Stephen W. Smoliar. An integrated system for contentbased video retrieval and browsing. Pattern Recognition, 30(4):643–658, 1997. [12] D. Liu, Gang Hua, and Tsuhan Chen. A hierarchical visual model for video object summarization. PAMI, 32(12):2178–2190, 2010. [13] Alex Kulesza and Ben Taskar. Determinantal point processes for machine learning. Foundations and Trends R⃝in Machine Learning, 5(2-3):123–286, 2012. [14] Alex Kulesza and Ben Taskar. Learning determinantal point processes. In UAI, 2011. [15] Jennifer Gillenwater, Alex Kulesza, and Ben Taskar. Discovering diverse and salient threads in document collections. In EMNLP/CNLL, 2012. [16] Odile Macchi. The coincidence approach to stochastic point processes. Advances in Applied Probability, 7(1):83–122, 1975. [17] Alex Kulesza and Ben Taskar. k-dpps: Fixed-size determinantal point processes. In ICML, 2011. [18] Hoa Trang Dang. Overview of duc 2005. In Document Understanding Conf., 2005. [19] Hui Lin and Jeff Bilmes. Multi-document summarization via budgeted maximization of submodular functions. In NAACL/HLT, 2010. [20] Jennifer Gillenwater, Alex Kulesza, and Ben Taskar. Near-optimal map inference for determinantal point processes. In NIPS, 2012. [21] V´ıctor Vald´es and Jos´e M Mart´ınez. Automatic evaluation of video summaries. ACM Trans. on multimedia computing, communications, and applications, 8(3):25, 2012. [22] Emilie Dumont and Bernard M´erialdo. Automatic evaluation method for rushes summary content. In ICME, 2009. [23] Yingbo Li and Bernard Merialdo. Vert: automatic evaluation of video summaries. In ACM MM, 2010. [24] Sandra Eliza Fontes de Avila, Ana Paula Brand˜ao Lopes, et al. Vsumm: A mechanism designed to produce static video summaries and a novel evaluation method. Pattern Recognition Letters, 32(1):56– 68, 2011. [25] Open video project. http://www.open-video.org/. [26] M. Ellouze, N. Boujemaa, and A. Alimi. Im(s)2: Interactive movie summarization system. J VCIR, 21(4):283–294, 2010. [27] Dan B Goldman, Brian Curless, and Steven M. Seitz. Schematic storyboarding for video visualization and editing. In SIGGRAPH, 2006. [28] R. H. Affandi, A. Kulesza, and E. B. Fox. Markov determinantal point processes. In UAI, 2012. [29] A. Kulesza and B. Taskar. Structured determinantal point processes. In NIPS, 2011. [30] Padmavathi Mundur, Yong Rao, and Yelena Yesha. Keyframe-based video summarization using delaunay clustering. Int’l J. on Digital Libraries, 6(2):219–232, 2006. [31] Marco Furini, Filippo Geraci, Manuela Montangero, and Marco Pellegrini. Stimo: Still and moving video storyboard for the web scenario. Multimedia Tools and Applications, 46(1):47–69, 2010. [32] Jiebo Luo, Christophe Papin, and Kathleen Costello. Towards extracting semantically meaningful key frames from personal video clips: from humans to computers. IEEE Trans. on Circuits and Systems for Video Technology, 19(2):289–301, 2009. [33] Florent Perronnin and Christopher Dance. Fisher kernels on visual vocabularies for image categorization. In CVPR, 2007. [34] David G Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91–110, 2004. [35] Esa Rahtu, Juho Kannala, Mikko Salo, and Janne Heikkil. Segmenting salient objects from images and videos. In ECCV, 2010. 9
2014
21
5,303
Greedy Subspace Clustering Dohyung Park Dept. of Electrical and Computer Engineering The University of Texas at Austin dhpark@utexas.edu Constantine Caramanis Dept. of Electrical and Computer Engineering The University of Texas at Austin constantine@utexas.edu Sujay Sanghavi Dept. of Electrical and Computer Engineering The University of Texas at Austin sanghavi@mail.utexas.edu Abstract We consider the problem of subspace clustering: given points that lie on or near the union of many low-dimensional linear subspaces, recover the subspaces. To this end, one first identifies sets of points close to the same subspace and uses the sets to estimate the subspaces. As the geometric structure of the clusters (linear subspaces) forbids proper performance of general distance based approaches such as K-means, many model-specific methods have been proposed. In this paper, we provide new simple and efficient algorithms for this problem. Our statistical analysis shows that the algorithms are guaranteed exact (perfect) clustering performance under certain conditions on the number of points and the affinity between subspaces. These conditions are weaker than those considered in the standard statistical literature. Experimental results on synthetic data generated from the standard unions of subspaces model demonstrate our theory. We also show that our algorithm performs competitively against state-of-the-art algorithms on realworld applications such as motion segmentation and face clustering, with much simpler implementation and lower computational cost. 1 Introduction Subspace clustering is a classic problem where one is given points in a high-dimensional ambient space and would like to approximate them by a union of lower-dimensional linear subspaces. In particular, each subspace contains a subset of the points. This problem is hard because one needs to jointly find the subspaces, and the points corresponding to each; the data we are given are unlabeled. The unions of subspaces model naturally arises in settings where data from multiple latent phenomena are mixed together and need to be separated. Applications of subspace clustering include motion segmentation [23], face clustering [8], gene expression analysis [10], and system identification [22]. In these applications, data points with the same label (e.g., face images of a person under varying illumination conditions, feature points of a moving rigid object in a video sequence) lie on a lowdimensional subspace, and the mixed dataset can be modeled by unions of subspaces. For detailed description of the applications, we refer the readers to the reviews [10, 20] and references therein. There is now a sizable literature on empirical methods for this particular problem and some statistical analysis as well. Many recently proposed methods, which perform remarkably well and have theoretical guarantees on their performances, can be characterized as involving two steps: (a) finding a “neighborhood” for each data point, and (b) finding the subspaces and/or clustering the points given these neighborhoods. Here, neighbors of a point are other points that the algorithm estimates to lie on the same subspace as the point (and not necessarily just closest in Euclidean distance). 1 Subspace Conditions for: Algorithm What is guaranteed condition Fully random model Semi-random model SSC [4, 16] Correct neighborhoods None d p = O( log(n/d) log(nL) ) max a↵= O( p log(n/d) log(nL) ) LRR [14] Exact clustering No intersection SSC-OMP [3] Correct neighborhoods No intersection TSC [6, 7] Exact clustering None d p = O( 1 log(nL) ) max a↵= O( 1 log(nL) ) LRSSC [24] Correct neighborhoods None d p = O( 1 log(nL) ) NSN+GSR Exact clustering None d p = O( log n log(ndL) ) max a↵= O( q log n (log dL)·log(ndL) ) NSN+Spectral Exact clustering None d p = O( log n log(ndL) ) Table 1: Subspace clustering algorithms with theoretical guarantees. LRR and SSC-OMP have only deterministic guarantees, not statistical ones. In the two standard statistical models, there are n data points on each of L d-dimensional subspaces in Rp. For the definition of max a↵, we refer the readers to Section 3.1. Our contributions: In this paper we devise new algorithms for each of the two steps above; (a) we develop a new method, Nearest Subspace Neighbor (NSN), to determine a neighborhood set for each point, and (b) a new method, Greedy Subspace Recovery (GSR), to recover subspaces from given neighborhoods. Each of these two methods can be used in conjunction with other methods for the corresponding other step; however, in this paper we focus on two algorithms that use NSN followed by GSR and Spectral clustering, respectively. Our main result is establishing statistical guarantees for exact clustering with general subspace conditions, in the standard models considered in recent analytical literature on subspace clustering. Our condition for exact recovery is weaker than the conditions of other existing algorithms that only guarantee correct neighborhoods1, which do not always lead to correct clustering. We provide numerical results which demonstrate our theory. We also show that for the real-world applications our algorithm performs competitively against those of state-of-the-art algorithms, but the computational cost is much lower than them. Moreover, our algorithms are much simpler to implement. 1.1 Related work The problem was first formulated in the data mining community [10]. Most of the related work in this field assumes that an underlying subspace is parallel to some canonical axes. Subspace clustering for unions of arbitrary subspaces is considered mostly in the machine learning and the computer vision communities [20]. Most of the results from those communities are based on empirical justification. They provided algorithms derived from theoretical intuition and showed that they perform empirically well with practical dataset. To name a few, GPCA [21], Spectral curvature clustering (SCC) [2], and many iterative methods [1, 19, 26] show their good empirical performance for subspace clustering. However, they lack theoretical analysis that guarantees exact clustering. As described above, several algorithms with a common structure are recently proposed with both theoretical guarantees and remarkable empirical performance. Elhamifar and Vidal [4] proposed an algorithm called Sparse Subspace Clustering (SSC), which uses `1-minimization for neighborhood construction. They proved that if the subspaces have no intersection2, SSC always finds a correct neighborhood matrix. Later, Soltanolkotabi and Candes [16] provided a statistical guarantee of the algorithm for subspaces with intersection. Dyer et al. [3] proposed another algorithm called SSCOMP, which uses Orthogonal Matching Pursuit (OMP) instead of `1-minimization in SSC. Another algorithm called Low-Rank Representation (LRR) which uses nuclear norm minimization is proposed by Liu et al. [14]. Wang et al. [24] proposed an hybrid algorithm, Low-Rank and Sparse Subspace Clustering (LRSSC), which involves both `1-norm and nuclear norm. Heckel and B¨olcskei [6] presented Thresholding based Subspace Clustering (TSC), which constructs neighborhoods based on the inner products between data points. All of these algorithms use spectral clustering for the clustering step. The analysis in those papers focuses on neither exact recovery of the subspaces nor exact clustering in general subspace conditions. SSC, SSC-OMP, and LRSSC only guarantee correct neighborhoods which do not always lead to exact clustering. LRR guarantees exact clustering only when 1By correct neighborhood, we mean that for each point every neighbor point lies on the same subspace. 2By no intersection between subspaces, we mean that they share only the null point. 2 the subspaces have no intersections. In this paper, we provide novel algorithms that guarantee exact clustering in general subspace conditions. When we were preparing this manuscript, it is proved that TSC guarantees exact clustering under certain conditions [7], but the conditions are stricter than ours. (See Table 1) 1.2 Notation There is a set of N data points in Rp, denoted by Y = {y1, . . . , yN}. The data points are lying on or near a union of L subspaces D = [L i=1Di. Each subspace Di is of dimension di which is smaller than p. For each point yj, wj denotes the index of the nearest subspace. Let Ni denote the number of points whose nearest subspace is Di, i.e., Ni = PN j=1 Iwj=i. Throughout this paper, sets and subspaces are denoted by calligraphic letters. Matrices and key parameters are denoted by letters in upper case, and vectors and scalars are denoted by letters in lower case. We frequently denote the set of n indices by [n] = {1, 2, . . . , n}. As usual, span{·} denotes a subspace spanned by a set of vectors. For example, span{v1, . . . , vn} = {v : v = Pn i=1 ↵ivi, ↵1, . . . , ↵n 2 R}. ProjUy is defined as the projection of y onto subspace U. That is, ProjUy = arg minu2U ky −uk2. I{·} denotes the indicator function which is one if the statement is true and zero otherwise. Finally, L denotes the direct sum. 2 Algorithms We propose two algorithms for subspace clustering as follows. • NSN+GSR : Run Nearest Subspace Neighbor (NSN) to construct a neighborhood matrix W 2 {0, 1}N⇥N, and then run Greedy Subspace Recovery (GSR) for W. • NSN+Spectral : Run Nearest Subspace Neighbor (NSN) to construct a neighborhood matrix W 2 {0, 1}N⇥N, and then run spectral clustering for Z = W + W >. 2.1 Nearest Subspace Neighbor (NSN) NSN approaches the problem of finding neighbor points most likely to be on the same subspace in a greedy fashion. At first, given a point y without any other knowledge, the one single point that is most likely to be a neighbor of y is the nearest point of the line span{y}. In the following steps, if we have found a few correct neighbor points (lying on the same true subspace) and have no other knowledge about the true subspace and the rest of the points, then the most potentially correct point is the one closest to the subspace spanned by the correct neighbors we have. This motivates us to propose NSN described in the following. Algorithm 1 Nearest Subspace Neighbor (NSN) Input: A set of N samples Y = {y1, . . . , yN}, The number of required neighbors K, Maximum subspace dimension kmax. Output: A neighborhood matrix W 2 {0, 1}N⇥N yi yi/kyik2, 8i 2 [N] . Normalize magnitudes for i = 1, . . . , N do . Run NSN for each data point Ii {i} for k = 1, . . . , K do . Iteratively add the closest point to the current subspace if k kmax then U span{yj : j 2 Ii} end if j⇤ arg maxj2[N]\Ii kProjUyjk2 Ii Ii [ {j⇤} end for Wij Ij2Ii or yj2U, 8j 2 [N] . Construct the neighborhood matrix end for NSN collects K neighbors sequentially for each point. At each step k, a k-dimensional subspace U spanned by the point and its k −1 neighbors is constructed, and the point closest to the subspace is 3 newly collected. After k ≥kmax, the subspace U constructed at the kmaxth step is used for collecting neighbors. At last, if there are more points lying on U, they are also counted as neighbors. The subspace U can be stored in the form of a matrix U 2 Rp⇥dim(U) whose columns form an orthonormal basis of U. Then kProjUyjk2 can be computed easily because it is equal to kU >yjk2. While a naive implementation requires O(K2pN 2) computational cost, this can be reduced to O(KpN 2), and the faster implementation is described in Section A.1. We note that this computational cost is much lower than that of the convex optimization based methods (e.g., SSC [4] and LRR [14]) which solve a convex program with N 2 variables and pN constraints. NSN for subspace clustering shares the same philosophy with Orthogonal Matching Pursuit (OMP) for sparse recovery in the sense that it incrementally picks the point (dictionary element) that is the most likely to be correct, assuming that the algorithms have found the correct ones. In subspace clustering, that point is the one closest to the subspace spanned by the currently selected points, while in sparse recovery it is the one closest to the residual of linear regression by the selected points. In the sparse recovery literature, the performance of OMP is shown to be comparable to that of Basis Pursuit (`1-minimization) both theoretically and empirically [18, 11]. One of the contributions of this work is to show that this high-level intuition is indeed born out, provable, as we show that NSN also performs well in collecting neighbors lying on the same subspace. 2.2 Greedy Subspace Recovery (GSR) Suppose that NSN has found correct neighbors for a data point. How can we check if they are indeed correct, that is, lying on the same true subspace? One natural way is to count the number of points close to the subspace spanned by the neighbors. If they span one of the true subspaces, then many other points will be lying on the span. If they do not span any true subspaces, few points will be close to it. This fact motivates us to use a greedy algorithm to recover the subspaces. Using the neighborhood constructed by NSN (or some other algorithm), we recover the L subspaces. If there is a neighborhood set containing only the points on the same subspace for each subspace, the algorithm successfully recovers the unions of the true subspaces exactly. Algorithm 2 Greedy Subspace Recovery (GSR) Input: N points Y = {y1, . . . , yN}, A neighborhood matrix W 2 {0, 1}N⇥N, Error bound ✏ Output: Estimated subspaces ˆD = [L l=1 ˆDl. Estimated labels ˆw1, . . . , ˆwN yi yi/kyik2, 8i 2 [N] . Normalize magnitudes Wi Top-d{yj : Wij = 1}, 8i 2 [N] . Estimate a subspace using the neighbors for each point I [N] while I 6= ; do . Iteratively pick the best subspace estimates i⇤ arg maxi2I PN j=1 I{kProjWiyjk2 ≥1 −✏} ˆDl ˆ Wi⇤ I I \ {j : kProjWi⇤yjk2 ≥1 −✏} end while ˆwi arg maxl2[L] kProj ˆ Dlyik2, 8i 2 [N] . Label the points using the subspace estimates Recall that the matrix W contains the labelings of the points, so that Wij = 1 if point i is assigned to subspace j. Top-d{yj : Wij = 1} denotes the d-dimensional principal subspace of the set of vectors {yj : Wij = 1}. This can be obtained by taking the first d left singular vectors of the matrix whose columns are the vector in the set. If there are only d vectors in the set, Gram-Schmidt orthogonalization will give us the subspace. As in NSN, it is efficient to store a subspace Wi in the form of its orthogonal basis because we can easily compute the norm of a projection onto the subspace. Testing a candidate subspace by counting the number of near points has already been considered in the subspace clustering literature. In [25], the authors proposed to run RANdom SAmple Consensus (RANSAC) iteratively. RANSAC randomly selects a few points and checks if there are many other points near the subspace spanned by the collected points. Instead of randomly choosing sample points, GSR receives some candidate subspaces (in the form of sets of points) from NSN (or possibly some other algorithm) and selects subspaces in a greedy way as specified in the algorithm above. 4 3 Theoretical results We analyze our algorithms in two standard noiseless models. The main theorems present sufficient conditions under which the algorithms cluster the points exactly with high probability. For simplicity of analysis, we assume that every subspace is of the same dimension, and the number of data points on each subspace is the same, i.e., d , d1 = · · · = dL, n , N1 = · · · = NL. We assume that d is known to the algorithm. Nonetheless, our analysis can extend to the general case. 3.1 Statistical models We consider two models which have been used in the subspace clustering literature: • Fully random model: The subspaces are drawn iid uniformly at random, and the points are also iid randomly generated. • Semi-random model: The subspaces are arbitrarily determined, but the points are iid randomly generated. Let Di 2 Rp⇥d, i 2 [L] be a matrix whose columns form an orthonormal basis of Di. An important measure that we use in the analysis is the affinity between two subspaces, defined as a↵(i, j) , kD> i DjkF p d = sPd k=1 cos2 ✓i,j k d 2 [0, 1], where ✓i,j k is the kth principal angle between Di and Dj. Two subspaces Di and Dj are identical if and only if a↵(i, j) = 1. If a↵(i, j) = 0, every vector on Di is orthogonal to any vectors on Dj. We also define the maximum affinity as max a↵, max i,j2[L],i6=j a↵(i, j) 2 [0, 1]. There are N = nL points, and there are n points exactly lying on each subspace. We assume that each data point yi is drawn iid uniformly at random from Sp−1 \ Dwi where Sp−1 is the unit sphere in Rp. Equivalently, yi = Dwixi, xi ⇠Unif(Sd−1), 8i 2 [N]. As the points are generated randomly on their corresponding subspaces, there are no points lying on an intersection of two subspaces, almost surely. This implies that with probability one the points are clustered correctly provided that the true subspaces are recovered exactly. 3.2 Main theorems The first theorem gives a statistical guarantee for the fully random model. Theorem 1 Suppose L d-dimensional subspaces and n points on each subspace are generated in the fully random model with n polynomial in d. There are constants C1, C2 > 0 such that if n d > C1 ⇣ log ne dδ ⌘2 , d p < C2 log n log(ndLδ−1), (1) then with probability at least 1 −3Lδ 1−δ, NSN+GSR3 clusters the points exactly. Also, there are other constants C0 1, C0 2 > 0 such that if (1) with C1 and C2 replaced by C0 1 and C0 2 holds then NSN+Spectral4 clusters the points exactly with probability at least 1 −3Lδ 1−δ. e is the exponential constant. 3NSN with K = kmax = d followed by GSR with arbitrarily small ✏. 4NSN with K = kmax = d. 5 Our sufficient conditions for exact clustering explain when subspace clustering becomes easy or difficult, and they are consistent with our intuition. For NSN to find correct neighbors, the points on the same subspace should be many enough so that they look like lying on a subspace. This condition is spelled out in the first inequality of (1). We note that the condition holds even when n/d is a constant, i.e., n is linear in d. The second inequality implies that the dimension of the subspaces should not be too high for subspaces to be distinguishable. If d is high, the random subspaces are more likely to be close to each other, and hence they become more difficult to be distinguished. However, as n increases, the points become dense on the subspaces, and hence it becomes easier to identify different subspaces. Let us compare our result with the conditions required for success in the fully random model in the existing literature. In [16], it is required for SSC to have correct neighborhoods that n should be superlinear in d when d/p fixed. In [6, 24], the conditions on d/p becomes worse as we have more points. On the other hand, our algorithms are guaranteed exact clustering of the points, and the sufficient condition is order-wise at least as good as the conditions for correct neighborhoods by the existing algorithms (See Table 1). Moreover, exact clustering is guaranteed even when n is linear in d, and d/p fixed. For the semi-random model, we have the following general theorem. Theorem 2 Suppose L d-dimensional subspaces are arbitrarily chosen, and n points on each subspace are generated in the semi-random model with n polynomial in d. There are constants C1, C2 > 0 such that if n d > C1 ⇣ log ne dδ ⌘2 , max a↵< s C2 log n log(dLδ−1) · log(ndLδ−1). (2) then with probability at least 1 −3Lδ 1−δ, NSN+GSR5 clusters the points exactly. In the semi-random model, the sufficient condition does not depend on the ambient dimension p. When the affinities between subspaces are fixed, and the points are exactly lying on the subspaces, the difficulty of the problem does not depend on the ambient dimension. It rather depends on max a↵, which measures how close the subspaces are. As they become closer to each other, it becomes more difficult to distinguish the subspaces. The second inequality of (2) explains this intuition. The inequality also shows that if we have more data points, the problem becomes easier to identify different subspaces. Compared with other algorithms, NSN+GSR is guaranteed exact clustering, and more importantly, the condition on max a↵improves as n grows. This remark is consistent with the practical performance of the algorithm which improves as the number of data points increases, while the existing guarantees of other algorithms are not. In [16], correct neighborhoods in SSC are guaranteed if max a↵= O( p log(n/d)/ log(nL)). In [6], exact clustering of TSC is guaranteed if max a↵= O(1/ log(nL)). However, these algorithms perform empirically better as the number of data points increases. 4 Experimental results In this section, we empirically compare our algorithms with the existing algorithms in terms of clustering performance and computational time (on a single desktop). For NSN, we used the fast implementation described in Section A.1. The compared algorithms are K-means, K-flats6, SSC, LRR, SCC, TSC7, and SSC-OMP8. The numbers of replicates in K-means, K-flats, and the K5NSN with K = d −1 and kmax = d2 log de followed by GSR with arbitrarily small ✏. 6K-flats is similar to K-means. At each iteration, it computes top-d principal subspaces of the points with the same label, and then labels every point based on its distances to those subspaces. 7The MATLAB codes for SSC, LRR, SCC, and TSC are obtained from http://www.cis. jhu.edu/˜ehsan/code.htm, https://sites.google.com/site/guangcanliu, and http://www.math.duke.edu/˜glchen/scc.html, http://www.nari.ee.ethz.ch/ commth/research/downloads/sc.html, respectively. 8For each data point, OMP constructs a neighborhood for each point by regressing the point on the other points up to 10−4 accuracy. 6 SSC Ambient dimension (p) 2 4 6 8 10 50 35 20 10 5 SSC−OMP 2 4 6 8 10 50 35 20 10 5 LRR 2 4 6 8 10 50 35 20 10 5 TSC Number of points per dimension for each subspace (n/d) 2 4 6 8 10 50 35 20 10 5 NSN+Spectral 2 4 6 8 10 50 35 20 10 5 NSN+GSR 2 4 6 8 10 50 35 20 10 5 0 0.2 0.4 0.6 0.8 1 Figure 1: CE of algorithms on 5 random d-dimensional subspaces and n random points on each subspace. The figures shows CE for different numbers of n/d and ambient dimension p. d/p is fixed to be 3/5. Brighter cells represent that less data points are clustered incorrectly. l1−minimization (SSC) Ambient dimension (p) 2 4 6 8 10 50 35 20 10 5 OMP (SSC−OMP) 2 4 6 8 10 50 35 20 10 5 Nuclear norm min. (LRR) Number of points per dimension for each subspace (n/d) 2 4 6 8 10 50 35 20 10 5 Nearest neighbor (TSC) 2 4 6 8 10 50 35 20 10 5 NSN 2 4 6 8 10 50 35 20 10 5 0 0.2 0.4 0.6 0.8 1 Figure 2: NSE for the same model parameters as those in Figure 1. Brighter cells represent that more data points have all correct neighbors. 20 40 60 80 100 0 1 2 3 4 5 Number of data points per subspace (n) Time (sec) 100−dim ambient space, five 10−dim subspaces l1−minimization (SSC) OMP (SSC−OMP) Nuclear norm min. (LRR) Thresholding (TSC) NSN 5 10 15 20 25 0 1 2 3 4 5 Number of subspaces (L) Time (sec) 100−dim ambient space, 10−dim subspaces, 20 points/subspace Figure 3: Average computational time of the neighborhood selection algorithms means used in the spectral clustering are all fixed to 10. The algorithms are compared in terms of Clustering error (CE) and Neighborhood selection error (NSE), defined as (CE) = min ⇡2⇧L 1 N N X i=1 I(wi 6= ⇡( ˆwi)), (NSE) = 1 N N X i=1 I(9j : Wij 6= 0, wi 6= wj) where ⇧L is the permutation space of [L]. CE is the proportion of incorrectly labeled data points. Since clustering is invariant up to permutation of label indices, the error is equal to the minimum disagreement over the permutation of label indices. NSE measures the proportion of the points which do not have all correct neighbors.9 4.1 Synthetic data We compare the performances on synthetic data generated from the fully random model. In Rp, five d-dimensional subspaces are generated uniformly at random. Then for each subspace n unitnorm points are generated iid uniformly at random on the subspace. To see the agreement with the theoretical result, we ran the algorithms under fixed d/p and varied n and d. We set d/p = 3/5 so that each pair of subspaces has intersection. Figures 1 and 2 show CE and NSE, respectively. Each error value is averaged over 100 trials. Figure 1 indicates that our algorithm clusters the data points better than the other algorithms. As predicted in the theorems, the clustering performance improves 9For the neighborhood matrices from SSC, LRR, and SSC-OMP, the d points with the maximum weights are regarded as neighbors for each point. For TSC, the d nearest neighbors are collected for each point. 7 L Algorithms K-means K-flats SSC LRR SCC SSC-OMP(8) TSC(10) NSN+Spectral(5) Mean CE (%) 19.80 13.62 1.52 2.13 2.06 16.92 18.44 3.62 2 Median CE (%) 17.92 10.65 0.00 0.00 0.00 12.77 16.92 0.00 Avg. Time (sec) 0.80 3.03 3.42 1.28 0.50 0.50 0.25 Mean CE (%) 26.10 14.07 4.40 4.03 6.37 27.96 28.58 8.28 3 Median CE (%) 20.48 14.18 0.56 1.43 0.21 30.98 29.67 2.76 Avg. Time (sec) 1.89 5.39 4.05 2.16 0.82 1.15 0.51 Table 2: CE and computational time of algorithms on Hopkins155 dataset. L is the number of clusters (motions). The numbers in the parentheses represent the number of neighbors for each point collected in the corresponding algorithms. L Algorithms K-means K-flats SSC SSC-OMP TSC NSN+Spectral Mean CE (%) 45.98 37.62 1.77 4.45 11.84 1.71 2 Median CE (%) 47.66 39.06 0.00 1.17 1.56 0.78 Avg. Time (sec) 15.78 37.72 0.45 0.33 0.78 Mean CE (%) 62.55 45.81 5.77 6.35 20.02 3.63 3 Median CE (%) 63.54 47.92 1.56 2.86 15.62 3.12 Avg. Time (sec) 27.91 49.45 0.76 0.60 3.37 Mean CE (%) 73.77 55.51 4.79 8.93 11.90 5.81 5 Median CE (%) 74.06 56.25 2.97 5.00 33.91 4.69 Avg. Time (sec) 52.90 74.91 1.41 1.17 5.62 Mean CE (%) 82.68 62.72 9.43 15.32 39.48 9.82 10 Median CE (%) 82.97 62.89 8.75 17.11 39.45 9.06 Avg. Time (sec) 134.0 157.5 5.26 3.17 14.73 Table 3: CE and computational time of algorithms on Extended Yale B dataset. For each number of clusters (faces) L, the algorithms ran over 100 random subsets drawn from the overall 38 clusters. as the number of points increases. However, it also improves as the dimension of subspaces grows in contrast to the theoretical analysis. We believe that this is because our analysis on GSR is not tight. In Figure 2, we can see that more data points obtain correct neighbors as n increases or d decreases, which conforms the theoretical analysis. We also compare the computational time of the neighborhood selection algorithms for different numbers of subspaces and data points. As shown in Figure 3, the greedy algorithms (OMP, Thresholding, and NSN) are significantly more scalable than the convex optimization based algorithms (`1-minimization and nuclear norm minimization). 4.2 Real-world data : motion segmentation and face clustering We compare our algorithm with the existing ones in the applications of motion segmentation and face clustering. For the motion segmentation, we used Hopkins155 dataset [17], which contains 155 video sequences of 2 or 3 motions. For the face clustering, we used Extended Yale B dataset with cropped images from [5, 13]. The dataset contains 64 images for each of 38 individuals in frontal view and different illumination conditions. To compare with the existing algorithms, we used the set of 48 ⇥42 resized raw images provided by the authors of [4]. The parameters of the existing algorithms were set as provided in their source codes.10 Tables 2 and 3 show CE and average computational time.11 We can see that NSN+Spectral performs competitively with the methods with the lowest errors, but much faster. Compared to the other greedy neighborhood construction based algorithms, SSC-OMP and TSC, our algorithm performs significantly better. Acknowledgments The authors would like to acknowledge NSF grants 1302435, 0954059, 1017525, 1056028 and DTRA grant HDTRA1-13-1-0024 for supporting this research. This research was also partially supported by the U.S. Department of Transportation through the Data-Supported Transportation Operations and Planning (D-STOP) Tier 1 University Transportation Center. 10As SSC-OMP and TSC do not have proposed number of parameters for motion segmentation, we found the numbers minimizing the mean CE. The numbers are given in the table. 11The LRR code provided by the author did not perform properly with the face clustering dataset that we used. We did not run NSN+GSR since the data points are not well distributed in its corresponding subspaces. 8 References [1] P. S. Bradley and O. L. Mangasarian. K-plane clustering. Journal of Global Optimization, 16(1):23–32, 2000. [2] G. Chen and G. Lerman. Spectral curvature clustering. International Journal of Computer Vision, 81(3): 317–330, 2009. [3] E. L. Dyer, A. C. Sankaranarayanan, and R. G. Baraniuk. Greedy feature selection for subspace clustering. The Journal of Machine Learning Research (JMLR), 14(1):2487–2517, 2013. [4] E. Elhamifar and R. Vidal. Sparse subspace clustering: Algorithm, theory, and applications. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 35(11):2765–2781, 2013. [5] A. S. Georghiades, P. N. Belhumeur, and D. J. Kriegman. From few to many: Illumination cone models for face recognition under variable lighting and pose. IEEE Trans. Pattern Anal. Mach. Intelligence, 23 (6):643–660, 2001. [6] R. Heckel and H. B¨olcskei. Subspace clustering via thresholding and spectral clustering. In IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), May 2013. [7] R. Heckel and H. B¨olcskei. Robust subspace clustering via thresholding. arXiv preprint arXiv:1307.4891v2, 2014. [8] J. Ho, M.-H. Yang, J. Lim, K.-C. Lee, and D. Kriegman. Clustering appearances of objects under varying illumination conditions. In IEEE conference on Computer Vision and Pattern Recognition (CVPR), 2003. [9] T. Inglot. Inequalities for quantiles of the chi-square distribution. Probability and Mathematical Statistics, 30(2):339–351, 2010. [10] H.-P. Kriegel, P. Kr¨oger, and A. Zimek. Clustering high-dimensional data: A survey on subspace clustering, pattern-based clustering, and correlation clustering. ACM Transactions on Knowledge Discovery from Data (TKDD), 3(1):1, 2009. [11] S. Kunis and H. Rauhut. Random sampling of sparse trigonometric polynomials, ii. orthogonal matching pursuit versus basis pursuit. Foundations of Computational Mathematics, 8(6):737–763, 2008. [12] M. Ledoux. The concentration of measure phenomenon, volume 89. AMS Bookstore, 2005. [13] K. C. Lee, J. Ho, and D. Kriegman. Acquiring linear subspaces for face recognition under variable lighting. IEEE Trans. Pattern Anal. Mach. Intelligence, 27(5):684–698, 2005. [14] G. Liu, Z. Lin, S. Yan, J. Sun, Y. Yu, and Y. Ma. Robust recovery of subspace structures by low-rank representation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 35(1):171–184, 2013. [15] V. D. Milman and G. Schechtman. Asymptotic Theory of Finite Dimensional Normed Spaces: Isoperimetric Inequalities in Riemannian Manifolds. Lecture Notes in Mathematics. Springer, 1986. [16] M. Soltanolkotabi and E. J. Candes. A geometric analysis of subspace clustering with outliers. The Annals of Statistics, 40(4):2195–2238, 2012. [17] R. Tron and R. Vidal. A benchmark for the comparison of 3-d motion segmentation algorithms. In IEEE conference on Computer Vision and Pattern Recognition (CVPR), 2007. [18] J. A. Tropp and A. C. Gilbert. Signal recovery from random measurements via orthogonal matching pursuit. Information Theory, IEEE Transactions on, 53(12):4655–4666, 2007. [19] P. Tseng. Nearest q-flat to m points. Journal of Optimization Theory and Applications, 105(1):249–252, 2000. [20] R. Vidal. Subspace clustering. Signal Processing Magazine, IEEE, 28(2):52–68, 2011. [21] R. Vidal, Y. Ma, and S. Sastry. Generalized principal component analysis. In IEEE conference on Computer Vision and Pattern Recognition (CVPR), 2003. [22] R. Vidal, S. Soatto, Y. Ma, and S. Sastry. An algebraic geometric approach to the identification of a class of linear hybrid systems. In Decision and Control, 2003. Proceedings. 42nd IEEE Conference on, volume 1, pages 167–172. IEEE, 2003. [23] R. Vidal, R. Tron, and R. Hartley. Multiframe motion segmentation with missing data using power factorization and GPCA. International Journal of Computer Vision, 79(1):85–105, 2008. [24] Y.-X. Wang, H. Xu, and C. Leng. Provable subspace clustering: When LRR meets SSC. In Advances in Neural Information Processing Systems (NIPS), December 2013. [25] A. Y. Yang, S. R. Rao, and Y. Ma. Robust statistical estimation and segmentation of multiple subspaces. In IEEE conference on Computer Vision and Pattern Recognition (CVPR), 2006. [26] T. Zhang, A. Szlam, Y. Wang, and G. Lerman. Hybrid linear modeling via local best-fit flats. International journal of computer vision, 100(3):217–240, 2012. 9
2014
210
5,304
Feature Cross-Substitution in Adversarial Classification Bo Li and Yevgeniy Vorobeychik Electrical Engineering and Computer Science Vanderbilt University {bo.li.2,yevgeniy.vorobeychik}@vanderbilt.edu Abstract The success of machine learning, particularly in supervised settings, has led to numerous attempts to apply it in adversarial settings such as spam and malware detection. The core challenge in this class of applications is that adversaries are not static data generators, but make a deliberate effort to evade the classifiers deployed to detect them. We investigate both the problem of modeling the objectives of such adversaries, as well as the algorithmic problem of accounting for rational, objective-driven adversaries. In particular, we demonstrate severe shortcomings of feature reduction in adversarial settings using several natural adversarial objective functions, an observation that is particularly pronounced when the adversary is able to substitute across similar features (for example, replace words with synonyms or replace letters in words). We offer a simple heuristic method for making learning more robust to feature cross-substitution attacks. We then present a more general approach based on mixed-integer linear programming with constraint generation, which implicitly trades off overfitting and feature selection in an adversarial setting using a sparse regularizer along with an evasion model. Our approach is the first method for combining an adversarial classification algorithm with a very general class of models of adversarial classifier evasion. We show that our algorithmic approach significantly outperforms state-of-the-art alternatives. 1 Introduction The success of machine learning has led to its widespread use as a workhorse in a wide variety of domains, from text and language recognition to trading agent design. It has also made significant inroads into security applications, such as fraud detection, computer intrusion detection, and web search [1, 2]. The use of machine (classification) learning in security settings has especially piqued the interest of the research community in recent years because traditional learning algorithms are highly susceptible to a number of attacks [3, 4, 5, 6, 7]. The class of attacks that is of interest to us are evasion attacks, in which an intelligent adversary attempts to adjust their behavior so as to evade a classifier that is expressly designed to detect it [3, 8, 9]. Machine learning has been an especially important tool for filtering spam and phishing email, which we treat henceforth as our canonical motivating domain. To date, there has been extensive research investigating spam and phish detection strategies using machine learning, most without considering adversarial modification [10, 11, 12]. Failing to consider an adversary, however, exposes spam and phishing detection systems to evasion attacks. Typically, the predicament of adversarial evasion is dealt with by repeatedly re-learning the classifier. This is a weak solution, however, since evasion tends to be rather quick, and re-learning is a costly task, since it requires one to label a large number of instances (in crowdsourced labeling, one also exposes the system to deliberate corruption of the training data). Therefore, several efforts have focused on proactive approaches of modeling the 1 learner and adversary as players in a game in which the learner chooses a classifier or a learning algorithm, and the attacker modifies either the training or test data [13, 14, 15, 16, 8, 17, 18]. Spam and phish detection, like many classification domains, tends to suffer from the curse of dimensionality [11]. Feature reduction is therefore standard practice, either explicitly, by pruning features which lack sufficient discriminating power, implicitly, by using regularization, or both [19]. One of our key novel insights is that in adversarial tasks, feature selection can open the door for the adversary to evade the classification system. This metaphorical door is open particularly widely in cases where feature cross-substitution is viable. By feature cross-substitution, we mean that the adversary can accomplish essentially the same end by using one feature in place of another. Consider, for example, a typical spam detection system using a “bag-of-words” feature vector. Words which in training data are highly indicative of spam can easily be substituted for by an adversary using synonyms or through substituting characters within a word (such replacing an “o” with a “0”). We support our insight through extensive experiments, exhibiting potential perils of traditional means for feature selection. While our illustration of feature cross-substitution focuses on spam, we note that the phenomenon is quite general. As another example, many Unix system commands have substitutes. For example, you can scan text using “less”, “more”, “cat”, and you can copy file1 to file2 by ”cp file1 file2” or ”cat file1 > file2”. Thus, if one learns to detect malicious scripts without accounting for such equivalences, the resulting classifier will be easy to evade. Our first proposed solution to the problem of feature reduction in adversarial classification is equivalence-based learning, or constructing features based on feature equivalence classes, rather than the underlying feature space. We show that this heuristic approach does, indeed, significantly improve resilience of classifiers to adversarial evasion. Our second proposed solution is more principled, and takes the form of a general bi-level mixed integer linear program to solve a Stackelberg game model of interactions between a learner and a collection of adversaries whose objectives are inferred from training data. The baseline formulation is quite intractable, and we offer two techniques for making it tractable: first, we cluster adversarial objectives, and second, we use constraint generation to iteratively converge upon a locally optimal solution. The principal merits of our proposed bi-level optimization approach over the state of the art are: a) it is able to capture a very general class of adversary models, including the model proposed by Lowd and Meek [8], as well as our own which enables feature cross-substitution; in contrast, state-of-the-art approaches are specifically tailored to their highly restrictive threat models; and b) it makes an implicit tradeoff between feature selection through the use of sparse (l1) regularization and adversarial evasion (through the adversary model), thereby solving the problem of adversarial feature selection. In summary, our contributions are: 1. A new adversarial evasion model that explicitly accounts for the ability to cross-substitute features (Section 3), 2. an experimental demonstration of the perils of traditional feature selection (Section 4), 3. a heuristic class-based learning approach (Section 5), and 4. a bi-level optimization framework and solution methods that make a principled tradeoff between feature selection and adversarial evasion (Section 6). 2 Problem definition The Learner Let X ⊆Rn be the feature space, with n the number of features. For a feature vector x ∈X, we let xi denote the ith feature. Suppose that the training set (x, y) is comprised of feature vectors x ∈X generated according to some unknown distribution x ∼D, with y ∈{−1, +1} the corresponding binary labels, where the meaning of −1 is that the instance x is benign, while +1 indicates a malicious instance. The learner’s task is to learn a classifier g : X →{−1, +1} to label instances as malicious or benign, using a training data set of labeled instances {(x1, y1), . . . , (xm, ym)}. 2 The Adversary We suppose that every instance x ∼D corresponds to a fixed label y ∈{−1, +1}, where a label of +1 indicates that this instance x was generated by an adversary. In the context of a threat model, therefore, we take this malicious x to be an expression of revealed preferences of the adversary: that is, x is an “ideal” instance that the adversary would generate if it were not marked as malicious (e.g., filtered) by the classifier. The core question is then what alternative instance, x′ ∈X, will be generated by the adversary. Clearly, x′ would need to evade the classifier g, i.e., g(x′) = −1. However, this cannot be a sufficient condition: after all, the adversary is trying to accomplish some goal. This is where the ideal instance, which we denote xA comes in: we suppose that the ideal instance achieves the goal and consequently the adversary strives to limit deviations from it according to a cost function c(x′, xA). Therefore, the adversary aims to solve the following optimization problem: min x′∈X:g(x′)=−1 c(x′, xA). (1) There is, however, an additional caveat: the adversary typically only has query access to g(x), and queries are costly (they correspond to actual batches of emails being sent out, for example). Thus, we assume that the adversary has a fixed query budget, Bq. Additionally, we assume that the adversary also has a cost budget, Bc so that if the solution to the optimization problem (1) found after making Bq queries falls above the cost budget, the adversary will use the ideal instance xA as x′, since deviations fail to satisfy the adversary’s main goals. The Game The game between the learner and the adversary proceeds as follows: 1. The learner uses training data to choose a classifier g(x). 2. Each adversary corresponding to malicious feature vectors x uses a query-based algorithm to (approximately) solve the optimization problem (1) subject to the query and cost budget constraints. 3. The learner’s “test” error is measured using a new data set in which every malicious x ∈X is replaced with a corresponding x′ computed by the adversary in step 2. 3 Modeling Feature Cross-Substitution Distance-Based Cost Functions In one of the first adversarial classification models, Lowd and Meek [8] proposed a natural l1 distance-based cost function which penalizes for deviations from the ideal feature vector xA: c(x′, xA) = X i ai|x′ i −xA i |, (2) where ai is a relative importance of feature i to the adversary. All follow-up work in the adversarial classification domain has used either this cost function or variations [3, 4, 7, 20]. Feature Cross-Substitution Attacks While distance-based cost functions seem natural models of adversarial objective, they miss an important phenomenon of feature cross-substitution. In spam or phishing, this phenomenon is most obvious when an adversary substitutes words for their synonyms or substitutes similar-looking letters in words. As an example, consider Figure 1 (left), where some features can naturally be substituted for others without significantly changing the original content. These words can contain features with the similar meaning or effect (e.g. money and cash) or differ in only a few letters (e.g clearance and claerance). The impact is that the adversary can achieve a much lower cost of transforming an ideal instance xA using similarity-based feature substitutions than simple distance would admit. To model feature cross-substitution attacks, we introduce for each feature i an equivalence class of features, Fi, which includes all admissible substitutions (e.g., k-letter word modifications or 3 Figure 1: Left: illustration of feature substitution attacks. Right: comparison between distancebased and equivalence-based cost functions. synonyms), and generalize (2) to account for such cross-feature equivalence: c(x′, xA) = X i min j∈Fi|xA j ⊕x′ j=1 ai|x′ j −xA i |, (3) where ⊕is the exclusive-or, so that xA j ⊕x′ j = 1 ensures that we only substitute between different features rather than simply adding features. Figure 1 (right) shows the cost comparison between the Lowd and Meek and equivalence-based cost functions under letter substitution attacks based on Enron email data [21], with the attacker simulated by running a variation of the Lowd and Meek algorithm (see the Supplement for details), given a specified number of features (see Section 4 for the details about how we choose the features). The key observation is that the equivalence-based cost function significantly reduces attack costs compared to the distance-based cost function, with the difference increasing in the size of the equivalence class. The practical import of this observation is that the adversary will far more frequently come under cost budget when he is able to use such substitution attacks. Failure to capture this phenomenon therefore results in a threat model that significantly underestimates the adversary’s ability to evade a classifier. 4 The Perils of Feature Reduction in Adversarial Classification Feature reduction is one of the fundamental tasks in machine learning aimed at controlling overfitting. The insight behind feature reduction in traditional machine learning is that there are two sources of classification error: bias, or the inherent limitation in expressiveness of the hypothesis class, and variance, or inability of a classifier to make accurate generalizations because of overfitting the training data. We now observe that in adversarial classification, there is a crucial third source of generalization error, introduced by adversarial evasion. Our main contribution in this section is to document the tradeoff between feature reduction and the ability of the adversary to evade the classifier and thereby introduce this third kind of generalization error. In addition, we show the important role that feature cross-substitution can play in this phenomenon. To quantify the perils of feature reduction in adversarial classification, we first train each classifier using a different number of features n. In order to draw a uniform comparison across learning algorithms and cost functions, we used an algorithm-independent means to select a subset of features given a fixed feature budget n. Specifically, we select the set of features in each case based on a score function score(i) = |FR−1(i) −FR+1(i)|, where FRC(i) represents the frequency that a feature i appears in instances x in class C ∈{−1, +1}. We then sort all the features i according to score and select a subset of n highest ranked features. Finally, we simulate an adversary as running an algorithm which is a generalization of the one proposed by Lowd and Meek [8] to support our proposed equivalence-based cost function (see the Supplement, Section 2, for details). Our evaluation uses three data sets: Enron email data [21], Ling-spam data [22], and internet advertisement dataset from the UCI repository [23]. The Enron data set was divided into training set of 3172 and a test set of 2000 emails in each of 5 folds of cross-validation, with an equal number of spam and non-spam instances [21]. A total of 3000 features were chosen for the complete feature pool, and we sub-selected between 5 and 1000 of these features for our experiments. The Ling-spam data set was divided into 1158 instances for training and 289 for test in cross-validation with five 4 times as much non-spam as spam, and contains 1000 features from which between 5 and 500 were sub-selected for the experiments. Finally, the UCI data set was divided into 476 training and 119 test instances in five-fold cross validation, with four times as many advertisement as non-advertisement instances. This data set contains 200 features, of which between 5 and 200 were chosen. For each data set, we compared the effect of adversarial evasion on the performance of four classification algorithms: Naive Bayes, SVM with linear and rbf kernels, and neural network classifiers. (a) (b) (c) (d) Figure 2: Effect of adversarial evasion on feature reduction strategies. (a)-(d) deterministic Naive Bayes classifier, SVM with linear kernel, SVM with rbf kernel, and Neural network, respectively. Top sets of figures correspond to distance-based and bottom figures are equivalence-based cost functions, where equivalence classes are formed using max-2-letter substitutions. The results of Enron data are documented in Figure 2; the others are shown in the Supplement. Consider the lowest (purple) lines in all plots, which show cross-validation error as a function of the number of features used, as the baseline comparison. Typically, there is an “optimal” number of features (the small circle), i.e., the point at which the cross-validation error rate first reaches a minimum, and traditional machine learning methods will strive to select the number of features near this point. The first key observation is that whether the adversary uses the distance- or equivalencebased cost functions, there tends to be a shift of this “optimal” point to the right (the large circle): the learner should be using more features when facing a threat of adversarial evasion, despite the potential risk of overfitting. The second observation is that when a significant amount of malicious traffic is present, evasion can account for a dominant portion of the test error, shifting the error up significantly. Third, feature cross-substitution attacks can make this error shift more dramatic, particularly as we increase the size of the equivalence class (as documented in the Supplement). 5 Equivalence-Based Classification Having documented the problems associated with feature reduction in adversarial classification, we now offer a simple heuristic solution: equivalence-based classification (EBC). The idea behind EBC is that instead of using underlying features for learning and classification, we use equivalence classes in their place. Specifically, we partition features into equivalence classes. Then, for each equivalence class, we create a corresponding meta-feature to be used in learning. For example, if the underlying features are binary and indicating a presence of a particular word in an email, the equivalence-class meta-feature would be an indicator that some member of the class is present in the email. As another example, when features represent frequencies of word occurrences, meta-features could represent aggregate frequencies of features in the corresponding equivalence class. 6 Stackelberg Game Multi-Adversary Model The proposed equivalence-based classification method is a highly heuristic solution to the issue of adversarial feature reduction. We now offer a more principled and general approach to adversarial 5 classification based on the game model described in Section 2. Formally, we aim to compute a Stackelberg equilibrium of the game in which the learner moves first by choosing a linear classifier g(x) = wT x and all the attackers simultaneously and independently respond to g by choosing x′ according to a query-based algorithm optimizing the cost function c(x′, xA) subject to query and cost budget constraints. Consequently, we term this approach Stackelberg game multi-adversary model (SMA). The optimization problem for the learner then takes the following form: min w α X j|yj=−1 l(−wT xj) + (1 −α) X j|yj=1 l(wT F(xj; w)) + λ||w||1, (4) where l(·) is the hinge loss function and α ∈[0, 1] trades off between the importance of false positives and false negatives. Note the addition of l1 regularizer to make an explicit tradeoff between overfitting and resilience to adversarial evasion. Here, F(xj; w) generically captures the adversarial decision model. In our setting, the adversary uses a query-based algorithm (which is an extension of the algorithm proposed by Lowd and Meek [8]) to approximately minimize cost c(x′, xj) over x′ : wT x′ ≤0, subject to budget constraints on cost and the number of queries. In order to solve the optimization problem (4) we now describe how to formulate it as a (very large) mixed-integer linear program (MILP), and then propose several heuristic methods for making it tractable. Since adversaries here correspond to feature vectors xj which are malicious (and which we interpret as the “ideal” instances xA of these adversaries), we henceforth refer to a given adversary by the index j. The first step is to observe that the hinge loss function and ∥w∥1 can both be easily linearized using standard methods. We therefore focus on the more challenging task of expressing the adversarial decision in response to a classification choice w as a collection of linear constraints. To begin, let ¯X be the set of all feature vectors that an adversary can compute using a fixed query budget (this is just a conceptual tool; we will not need to know this set in practice, as shown below). The adversary’s optimization problem can then be described as computing zj = arg min x′∈¯ X|wT x′≤0 c(x′, xj) when the minimum is below the cost budget, and setting zj = xj otherwise. Now define an auxiliary matrix T in which each column corresponds to a particular attack feature vector x′, which we index using variables a; thus Tia corresponds to the value of feature i in attack feature vector with index a. Define another auxiliary binary matrix L where Laj = 1 iff the strategy a satisfies the budget constraint for the attacker j. Next, define a matrix c where caj is the cost of the strategy a to adversary j (computed using an arbitrary cost function; we can use either the distance- or equivalence-based cost functions, for example). Finally, let zaj be a binary variable that selects exactly one feature vector a for the adversary j. First, we must have a constraint that zaj = 1 for exactly one strategy a: P a zaj = 1 ∀j. Now, suppose that the strategy a that is selected is the best available option for the attacker j; it may be below the cost budget, in which case this is the strategy used by the adversary, or above budget, in which case xj is used. We can calculate the resulting value of wT F(xj; w) using ej = P a zajwT (LajTa +(1−Laj)xj). This expression introduces bilinear terms zajwT , but since zaj are binary these terms can be linearized using McCormick inequalities [24]. To ensure that zja selects the strategy which minimizes cost among all feasible options, we introduce constraints P a zajcaj ≤ca′j + M(1 −ra′), where M is a large constant and ra′ is an indicator variable which is 1 iff wT Ta′ ≤0 (that is, if a′ is classified as benign); the corresponding term ensures that the constraint is non-trivial only for a′ which are classified benign. Finally, we calculate ra for all a using constraints (1 −2ra)wT Ta ≤0. While this constraint again introduces bilinear terms, these can be linearized as well since ra are binary. The full MILP formulation is shown in Figure 3 (left). As is, the resulting MILP is intractable for two reasons: first, the best response must be computed (using a set of constraints above) for each adversary j, of which there could be many, and second, we need a set of constraints for each feasible attack action (feature vector) x ∈¯X (which we index by a). We tackle the first problem by clustering the “ideal” attack vectors xj into a set of 100 clusters and using the mean of each cluster as xA for the representative attacker. This dramatically reduces the number of adversaries and, therefore, the size of the problem. To tackle the second problem we use constraint generation to iteratively add strategies a into the above program by executing the Lowd and Meek algorithm in each iteration in response to the classifier w computed in previous iteration. In combination, these techniques allow us to scale the proposed optimization method to realistic problem instances. The full SMA algorithm is shown in Figure 3 (right). 6 min w,z,r α X i|yi=0 Di + (1 −α) X i|yi=1 Si + λ X j Kj s.t. : ∀a, i, j : zi(a), r(a) ∈{0, 1} X a zi(a) = 1 ∀i : ei = X a mi(a)(LaiTa + (1 −Lai)xi) ∀a, i, j : −Mzi(a) ≤mij(a) ≤Mzi(a) ∀a, i, j : wj −M(1 −zi(a)) ≤mij(a) ≤wj + M(1 −zi(a)) ∀a : X j wjTaj ≤2 X j Tajyaj ∀a, j : −Mra ≤yaj ≤Mra ∀a, j : wj −M(1 −ra) ≤yaj ≤wj + M(1 −ra) ∀i : Di = max(0, 1 −wT xi) ∀i : Si = max(0, 1 + ei) ∀j : Kj = max(wj, −wj) Algorithm 1 SMA(X) T =randStrats() // initial set of attacks X′ ←cluster(X) w0 ←MILP(X′, T) w ←w0 while T changes do for xA ∈X′ spam do t =computeAttack(xA, w) T ←T ∪t end for w ←MILP(X′, T) end while return w Figure 3: Left: MILP to compute solution to (4). Right: SMA iterative algorithm using clustering and constraint generation. The matrices L and C in the MILP can be pre-computed using the matrix of strategies and corresponding indices T in each iteration, as well as the cost budget Bc. computeAttack() is the attacker’s best response (see the Supplement for details). 7 Experiments In this section we investigate the effectiveness of the two proposed methods: the equivalence-based classification heuristic (EBC) and the Stackelberg game multi-adversary model (SMA) solved using mixed-integer linear programming. As in Section 4, we consider three data sets: the Enron data, Ling-spam data, and UCI data. We draw a comparison to three baselines: 1) “traditional” machine learning algorithms (we report the results for SVM; comparisons to Naive Bayes and Neural Network classifiers are provided in the Supplement, Section 3), 2) Stackelberg prediction game (SPG) algorithm with linear loss [17], and 3) SPG with logistic loss [17]. Both (2) and (3) are state-of-theart alternative methods developed specifically for adversarial classification problems. Our first set of results (Figure 4) is a performance comparison of our proposed methods to the three baselines, evaluated using an adversary striving to evade the classifier, subject to query and cost budget constraints. For the Enron data, we can see, remarkably, that the equivalence-based classifier (a) (b) (c) Figure 4: Comparison of EBC and SMA approaches to baseline alternatives on Enron data (a), Ling-spam data (b), and UCI data(c). Top: Bc = 5, Bq = 5. Bottom: Bc = 20, Bq = 10. 7 often significantly outperforms both SPG with linear and logistic loss. On the other hand, the performance of EBC is relatively poor on Ling-spam data, although observe that even the traditional SVM classifier has a reasonably low error rate in this case. While the performance of EBC is clearly datadependent, SMA (purple lines in Figure 4) exhibits dramatic performance improvement compared to alternatives in all instances (see the Supplement, Section 3, for extensive additional experiments, including comparisons to other classifiers, and varying adversary’s budget constraints). Figure 5 (left) looks deeper at the nature of SMA solution vectors w. Specifically, we consider how the adversary’s strength, as measured by the query budget, affects the sparsity of solutions as measured by ∥w∥0. We can see a clear trend: as the adversary’s budget increases, solutions become less sparse (only the result for Ling data is shown, but the same trend is observed for other data sets; see the Supplement, Section 3, for details). This is to be expected in the context of our investigation of the impact that adversarial evasion has on feature reduction (Section 4): SMA automatically accounts for the tradeoff between resilience to adversarial evasion and regularization. Finally, Figure 5 (middle, right) considers the impact of the number of clusters used in solving the Figure 5: Left: ∥w∥0 of the SMA solution for Ling data. Middle: SMA error rates, and Right: SMA running time, as a function of the number of clusters used. SMA problem on running time and error. The key observation is that with relatively few (80-100) clusters we can achieve near-optimal performance, with significant savings in running time. 8 Conclusions We investigated two phenomena in the context of adversarial classification settings: classifier evasion and feature reduction, exhibiting strong tension between these. The tension is surprising: feature/dimensionality reduction is a hallmark of practical machine learning, and, indeed, is generally viewed as increasing classifier robustness. Our insight, however, is that feature selection will typically provide more room for the intelligent adversary to choose features not used in classification, but providing a near-equivalent alternative to their “ideal” attacks which would otherwise be detected. Terming this idea feature cross-substitution (i.e., the ability of the adversary to effectively use different features to achieve the same goal), we offer extensive experimental evidence that aggressive feature reduction does, indeed, weaken classification efficacy in adversarial settings. We offer two solutions to this problem. The first is highly heuristic, using meta-features constructed using feature equivalence classes for classification. The second is a principled and general Stackelberg game multi-adversary model (SMA), solved using mixed-integer linear programming. We use experiments to demonstrate that the first solution often outperforms state-of-the-art adversarial classification methods, while SMA is significantly better than all alternatives in all evaluated cases. We also show that SMA in fact implicitly makes a tradeoff between feature reduction and adversarial evasion, with more features used in the context of stronger adversaries. Acknowledgments This research was partially supported by Sandia National Laboratories. Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL85000. 8 References [1] Tom Fawcett and Foster Provost. Adaptive fraud detection. Data mining and knowledge discovery, 1(3):291–316, 1997. [2] Matthew V Mahoney and Philip K Chan. Learning nonstationary models of normal network traffic for detecting novel attacks. In Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 376–385. ACM, 2002. [3] Marco Barreno, Blaine Nelson, Anthony D Joseph, and JD Tygar. The security of machine learning. Machine Learning, 81(2):121–148, 2010. [4] Marco Barreno, Peter L Bartlett, Fuching Jack Chi, Anthony D Joseph, Blaine Nelson, Benjamin IP Rubinstein, Udam Saini, and J Doug Tygar. Open problems in the security of learning. In Proceedings of the 1st ACM workshop on Workshop on AISec, pages 19–26. ACM, 2008. [5] Battista Biggio, Giorgio Fumera, and Fabio Roli. Security evaluation of pattern classifiers under attack. IEEE Transactions on Data and Knowledge Engineering, 26(4):984–996, 2013. [6] Pavel Laskov and Richard Lippmann. Machine learning in adversarial environments. Machine learning, 81(2):115–119, 2010. [7] Blaine Nelson, Benjamin IP Rubinstein, Ling Huang, Anthony D Joseph, and JD Tygar. Classifier evasion: Models and open problems. In Privacy and Security Issues in Data Mining and Machine Learning, pages 92–98. Springer, 2011. [8] Daniel Lowd and Christopher Meek. Adversarial learning. In Proceedings of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, pages 641–647. ACM, 2005. [9] Christoph Karlberger, G¨unther Bayler, Christopher Kruegel, and Engin Kirda. Exploiting redundancy in natural language to penetrate bayesian spam filters. WOOT, 7:1–7, 2007. [10] Mehran Sahami, Susan Dumais, David Heckerman, and Eric Horvitz. A bayesian approach to filtering junk e-mail. In Learning for Text Categorization: Papers from the 1998 workshop, volume 62, pages 98–105, 1998. [11] KONG Ying and ZHAO Jie. Learning to filter unsolicited commercial e-mail. International Proceedings of Computer Science & Information Technology, 49, 2012. [12] Vangelis Metsis, Ion Androutsopoulos, and Georgios Paliouras. Spam filtering with naive bayes-which naive bayes? In CEAS, pages 27–28, 2006. [13] Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, Deepak Verma, et al. Adversarial classification. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 99–108. ACM, 2004. [14] Laurent El Ghaoui, Gert Ren´e Georges Lanckriet, Georges Natsoulis, et al. Robust classification with interval data. Computer Science Division, University of California, 2003. [15] Wei Liu and Sanjay Chawla. A game theoretical model for adversarial learning. In Data Mining Workshops, 2009. ICDMW’09. IEEE International Conference on, pages 25–30. IEEE, 2009. [16] Tom Fawcett. In vivo spam filtering: a challenge problem for kdd. ACM SIGKDD Explorations Newsletter, 5(2):140–148, 2003. [17] Michael Br¨uckner and Tobias Scheffer. Stackelberg games for adversarial prediction problems. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 547–555. ACM, 2011. [18] Ion Androutsopoulos, Evangelos F Magirou, and Dimitrios K Vassilakis. A game theoretic model of spam e-mailing. In CEAS, 2005. [19] Tiago A Almeida, Akebo Yamakami, and Jurandy Almeida. Evaluation of approaches for dimensionality reduction applied with naive bayes anti-spam filters. In Machine Learning and Applications, 2009. ICMLA’09. International Conference on, pages 517–522. IEEE, 2009. [20] B. Nelson, B. Rubinstein, L. Huang, A. Joseph, S. Lee, S. Rao, and J. D. Tygar. Query strategies for evading convex-inducing classifiers. Journal of Machine Learning Research, 13:1293–1332, 2012. [21] Bryan Klimt and Yiming Yang. The enron corpus: A new dataset for email classification research. In Machine learning: ECML 2004, pages 217–226. Springer, 2004. [22] Ion Androutsopoulos, John Koutsias, Konstantinos V Chandrinos, George Paliouras, and Constantine D Spyropoulos. An evaluation of naive bayesian anti-spam filtering. arXiv preprint cs/0006013, 2000. [23] K. Bache and M. Lichman. UCI machine learning repository, 2013. [24] Garth P McCormick. Computability of global solutions to factorable nonconvex programs: Part iconvex underestimating problems. Mathematical programming, 10(1):147–175, 1976. 9
2014
211
5,305
Distributed Balanced Clustering via Mapping Coresets MohammadHossein Bateni Google NYC bateni@google.com Aditya Bhaskara Google NYC bhaskaraaditya@google.com Silvio Lattanzi Google NYC silviol@google.com Vahab Mirrokni Google NYC mirrokni@google.com Abstract Large-scale clustering of data points in metric spaces is an important problem in mining big data sets. For many applications, we face explicit or implicit size constraints for each cluster which leads to the problem of clustering under capacity constraints or the “balanced clustering” problem. Although the balanced clustering problem has been widely studied, developing a theoretically sound distributed algorithm remains an open problem. In this paper we develop a new framework based on “mapping coresets” to tackle this issue. Our technique results in first distributed approximation algorithms for balanced clustering problems for a wide range of clustering objective functions such as k-center, k-median, and k-means. 1 Introduction Large-scale clustering of data points in metric spaces is an important problem in mining big data sets. Many variants of such clustering problems have been studied spanning, for instance, a wide range of ℓp objective functions including the k-means, k-median, and k-center problems. Motivated by a variety of big data applications, distributed clustering has attracted significant attention over the literature [11, 4, 5]. In many of these applications, an explicit or implicit size constraint is imposed for each cluster; e.g., if we cluster the points such that each cluster fits on one machine, the size constraint is enforced by the storage constraint on each machine. We refer to this as balanced clustering. In the setting of network location problems, these are referred to as capacitated clustering problems [6, 16, 17, 10, 3]. The distributed balanced clustering problem is also well-studied and several distributed algorithms have been developed for it in the context of large-scale graph partitioning [21, 20]1. Despite this extensive literature, none of the distributed algorithms developed for the balanced version of the problem have theoretical approximation guarantees. The present work presents the first such distributed algorithms for a wide range of balanced clustering problems with provable approximation guarantees. To acheive this goal, we develop a new technique based on mapping coresets. A coreset for a set of points in a metric space is a subset of these points with the property that an approximate solution to the whole point-set can be obtained given the coreset alone. An augmented concept for coresets is the notion of composable coresets which have the following property: for a collection of sets, the approximate solution to the union of the sets in the collection can be obtained given the union of the composable coresets for the point sets in the collection. This notion was 1A main difference between the balanced graph partitioning problems and balanced clustering problems considered here is that in the graph partitioning problems a main objective function is to minimize the cut function. 1 MapReduce model Problem Approximation Rounds L-balanced k-center O(1) O(1) k-clustering in ℓp O(p) O(1) L-balanced k-clustering in ℓp (O(p),2) O(1) Streaming model Problem Approximation Passes L-balanced k-center O(1) O(1) k-clustering in ℓp O(p) O(1) L-balanced k-clustering in ℓp (O(p),2) O(1) Table 1: Our contributions, all results hold for k < n 1/2−ϵ, for constant ϵ > 0. We notice that for the L-balanced k-clustering (p) general we get a bicriteria optimization (we can potentially open 2k centers in our solutions). formally defined in a recent paper by Indyk et al [14]. In this paper, we augment the notion of composable coresets further, and introduce the concept of mapping coresets. A mapping coreset is a coreset with an additional mapping of points in the original space to points in the coreset. As we will see, this will help us solve balanced clustering problems for a wide range of objective functions and a variety of massive data processing applications, including streaming algorithms and MapReduce computations. Roughly speaking, this is how a mapping coreset is used to develop a distributed algorithm for the balanced clustering problems: we first partition the data set into several blocks in a specific manner. We then compute a coreset for each block. In addition, we compute a mapping of points in the original space to points in the coreset. Finally, we collect all these coresets, and then solve the clustering problem for the union of the coresets. We can them use the (inverse) map to get back a clustering for the original points. Our Contributions. In this paper, we introduce a framework for solving distributed clustering problems. Using the concept of mapping coresets as described above, our framework applies to balanced clustering problems, which are much harder than their unrestricted counterparts in terms of approximation. The rough template of our results is the following: given a single machine α-approximation algorithm for a clustering problem (with or without balance constraints), we give a distributed algorithm for the problem that has an O(α) approximation guarantee. Our results also imply streaming algorithms for such clustering problems, using sublinear memory and constant number of passes. More precisely, we consider balanced clustering problems with an ℓp objective. For specific choice of p, it captures the commonly used k-center, k-median and k-means objectives. Our results are also very robust—for instance, bicriteria approximations (violating either the number of clusters or the cluster sizes) on a single machine can be used to give distributed bicriteria approximation algorithms, with a constant loss in the cost. This is particularly important for balanced versions of k-median and k-means, for which we know of constant factor approximation to the cost only if we allow violating one of the constraints. (Moreover, mild violation might not be terribly bad in certain applications, as long as we obtain small cost.) Finally, other than presenting the first distributed approximations for balanced clustering, our general framework also implies constant-factor distributed approximations for a general class of uncapacitated clustering problems (for which we are not aware of distributed algorithms with formal guarantees). We summarize our new results in Table 1. Related Work. The notion of coresets has been introduced in [2]. In this paper, we use the term coresets to refer to an augmented notion of coresets, referred to as “composable coresets” [14]. The notion of (composable) coresets are also related to the concept of mergeable summaries that have been studied in the literature [1]. The main difference between the two is that aggregating mergeable summaries does not increase the approximation error, while in the case of coresets the error amplifies. The idea of using coresets has been applied either explicitly or implicitly in the streaming model [12, 2] and in the MapReduce framework [15, 18, 5, 14]. However, none of the previous work applies these ideas for balanced clustering problems. 2 There has been a lot of work on designing efficient distributed algorithms for clustering problems in metric spaces. A formal computation model for the MapReduce framework has been introduced by Karloff et al. [15]. The first paper that studied clustering problems in this model is by Ene et al. [11], where the authors prove that one can use an α approximation algorithm for the k-center or k-median problem to obtain a 4α + 2 and a 10α + 3 approximation respectively for the k-center or k-median problems in the MapReduce model. Subsequently Bahmani et al. [4] showed how to implement kmeans++ efficiently in the MapReduce model. Finally, very recently, Balcan et al. [5] demonstrate how one can use an α approximation algorithm for the k-means or k-median problem to obtain coresets in the distributed (and MapReduce) setting. They however do not consider the balanced clustering problems or the general set of clustering problems with the ℓp objective function. The literature of clustering in the streaming model is also very rich. The first paper we are aware of is due to Charikar et al. [7], who study the k-center problem in the classic streaming setting. Subsquently Guha et al. [12] give the first single pass constant approximation algorithm to the kmedian problem. Following up on this, the memory requirements and the approximation factors of their result were further improved by Charikar et al. in [8]. Finally, capacitated (or balanced) clustering is well studied in approximation algorithms [6, 16, 9], with constant factors known in some cases and only bicriteria in others. Our results may be interpreted as saying that the capacity constraints may be a barrier to approximation, but are not a barrier to parallelizability. This is the reason our approximation guarantees are bicriteria. 2 Preliminaries In all the problems we study, we will denote by (V, d) the metric space we are working with. We will denote n = |V |, the number of points in V . We will also write duv as short hand for d(u, v). Given points u, v, we assume we have an oracle access to duv (or can compute it, as in geometric settings). Formally, a clustering C of a set of points V is a collection of sets C1, C2, . . . , Cr which partition V . Each cluster Ci has a center vi, and we define the ‘ℓp cost’ of this clustering as costp(C) := X i X v∈Ci d(v, vi)p !1/p . (1) When p is clear from the context, we will simply refer to this quantity as the cost of the clustering and denote it cost(C). Let us now define the L-balanced k-clustering problem with ℓp cost. Definition 1 (L-balanced k-clustering (p)). Given (V, d) and a size bound L, find a clustering C of V which has at most k clusters, at most L points in each cluster, and cluster centers v1, . . . , vk so as to minimize costp(C), the ℓp cost defined in Eq. (1). The case p = 1 is the capacitated k-median and with p = ∞is also known as the capacitated k-center problem (with uniform capacities). Definition 2 (Mapping and mapping cost). Given a multiset S and a set V , we call a bijective function f : V →S a mapping from V to S and we define the cost of a mapping as P v∈V d(v, f(v))p. Definition 3 (Clustering and optimal solution). Given a clustering problem P with an ℓp objective, we define OPTP as the cost of the optimal solution to P. 3 Mapping coreset framework The main idea behind our distributed framework is a new family of coresets that help in dealing with balanced clustering. Definition 4 (δ-mapping coreset). Given a set of points V , a δ-mapping coreset for a clustering problem P consists of a multiset S with elements from V , and a mapping from V to S such that the total cost of the mapping is upper bounded by δ · OPT p P. We define the size of a δ-mapping coreset as the number of distinct elements in S. Note that our definition does not prescribe the size of the mapping coreset – this can be a parameter we choose. We now define the composability of coresets. 3 Definition 5 (Composable δ-mapping coreset). Given disjoint sets of points V1, V2, . . . , Vm, and corresponding δ-mapping coresets S1, S2, . . . , Sm, the coresets are said to be composable if we have that ∪iSi is a 2pδ-mapping coreset for ∪iVi (the overall map is the union of those for V1, . . . , Vm). Remark. The non-trivial aspect of showing that coresets compose comes from the fact that we compare the cost of mapping to the cost of OPTP on the union of Vi (which we need to show is not too small). Our main theorem is now the following Theorem 1. Let V be a set of points and suppose L, k, p ≥1 are parameters. Then for any U ⊆V , there exists an algorithm that takes U as input, and produces a 2p-mapping coreset for the L-balanced k-clustering (p) problem for U. The size of this coreset is ˜O(k),2 and the algorithm uses space that is quadratic in |U|. Furthermore, for any partition V1, V2, . . . , Vr of V , the mapping coresets produced by the algorithm on V1, V2, . . . , Vr compose. 3.1 Clustering via δ-mapping coresets The theorem implies a simple general framework for distributed clustering: 1. Split the input into m chunks arbitrarily (such that each chunk fits on a machine), and compute a (composable) 2p-mapping coreset for each of the chunks. For each point in the coreset, assign a multiplicity equal to the number of points mapped to it (including itself). 2. Gather all the coresets (and multiplicities of their points) into one machine, and compute a k-clustering of this multiset. 3. Once clusters for the points (and their copies) are found, we can ‘map back’, and find a clustering of the original points. The idea is that in each chunk, the size of the coreset will be small, thus the union of the coresets is small (and hence fits on one machine). The second step requires care: the clustering algorithm should work when the points have associated multiplicities, and use limited memory. This is captured as follows. Definition 6 (Space-efficient algorithm). Given an instance (V, d) for a k-clustering problem in which V has N distinct points, each with some multiplicity, a sequential α-approximation algorithm is called space-efficient if the space used by the algorithm is O(N 2 · poly(k)). The framework itself is a very natural one, thus the key portions are the step of finding the mapping coresets that (a) have small mapping cost and (b) compose well on arbitrary partition of the input, and that of finding space efficient algorithms. Sections 4 and 5 give details of these two steps. Further, because the framework is general, we can apply many “levels” of it. This is illustrated below in Section 3.2. To prove the correctness of the framework, we also need to prove that moving from the original points in a chunk to a coreset with multiplicities (as described in (1)) does not affect us too much in the approximation. We prove this using a general theorem: Theorem 2. Let f : V 7→S be a bijection. Let C be any clustering of V , and let C′ denote the clustering of S obtained by applying a bijection f to the clustering C. Then there exists a choice of centers for C′ such that cost(C′)p ≤22p−1(cost(C)p + µtotal), where µtotal denotes P v∈V d(v, f(v))p. In our case, if we consider the set of points in the coreset with multiplicities, the mapping gives a bijection, thus the above theorem applies in showing that the cost of clustering is not much more than the “mapping cost” given by the bijection. The theorem can also be used in the opposite direction, as will be crucial in obtaining an approximation guarantee. Preserving balanced property. The above theorem allows us to move back and forth (algorithmically) between clusterings of V and (the coreset with multiplicities) S as long as there is a small-cost mapping. Furthermore, since f is a bijection, we have the property that if the clustering was balanced in V , the corresponding one in S will be balanced as well, and vice versa. Putting things together. Let us now see how to use the theorems to obtain approximation guarantees. Suppose we have a mapping f from V to the union of the coresets of the chunks (called 2Here and elsewhere below, ˜O(·) is used to hide a logarithmic factor. 4 S, which is a multi set), with total mapping cost µtotal. Suppose also that we have an α spaceefficient approximation algorithm for clustering S. Now we can use the Theorem 2 to show that in S, there exists a clustering whose cost, raised to the p-th power, is at most 22p−1(cost(C)p + µtotal). This means that the approximation algorithm on S gives a clustering of cost (to the pth power) ≤22p−1αp(cost(C)p + µtotal). Finally, using Theorem 2 in the opposite direction, we can map back the clusters from S to V and get a an upper bound on the clustering cost (to the pth power) of 22p−1(22p−1αp(cost(C)p +µtotal)+µtotal). But now using Theorem 1, we know that for the f in our algorithm, µtotal ≤2pcost(C)p. So plugging this into the bound above, and after some manipulations (and taking pth roots) we obtain that the cost of the final clustering is ≤32αcost(C). The details of this calculation can be found in the supplementary material. Remark. The approximation ratio (i.e., 32α) seems quite pessimistic. In our experiments, we have observed (if we randomly partition the points initially) that the constants are much better (often at most 1.5). The slack in our analysis arises mainly because of Theorem 2, in which the worst case in the analysis is very unlikely to occur in practice. 3.2 Mapping Coresets for Clustering in MapReduce The above distributed algorithm can be placed in the formal model for MapReduce introduced by Karloff et al. [15]. The model has two main restrictions, one on the total number of machines and another on the memory available on each machine. In particular, given an input of size N, and a sufficiently small γ > 0, in the model there are N 1−γ machines, each with N 1−γ memory available for the computation. As a result, the total amount of memory available to the entire system is O(N 2−2γ). In each round a computation is executed on each machine in parallel and then the outputs of the computation are shuffled between the machines. In this model the efficiency of an algorithm is measured by the number of the ‘rounds’ of MapReduce in the algorithm. A class of algorithms of particular interest are the ones that run in a constant number of rounds. This class of algorithms are denoted MRC0. The high level idea is to use coreset construction and a sequential space-efficient α-approximation algorithm (as outlined above). Unfortunately, this approach does not work as such in the MapReduce model because both the coreset construction algorithm, and the space-efficient algorithm, require memory quadratic in the size of their input. Therefore we perform multiple ‘levels’ of our framework. Given an instance (V, d), the MapReduce algorithm proceeds as follows: 1. Partition the points arbitrarily into 2n (1+γ)/2 sets. 2. Compute the composable 2p-mapping coreset on each of the machines (in parallel) to obtain f and the multisets S1, S2, . . . , S2n(1+γ)/2, each with roughly eO(k) distinct points. 3. Partition the computed coreset again into n 1/4 sets. 4. Compute composable 2p-mapping coresets on each of the machines (in parallel) to obtain f ′, and multisets S′ 1, S′ 2, . . . , S′ n1/4, each with eO(k) distinct points. 5. Merge all the S′ 1, S′ 2, . . . , S′ n1/4 on a single machine and compute a clustering using the sequential space-efficient α-approximation algorithm. 6. Map back the points in S′ 1, S′ 2, . . . , S′ n1/4 to the points in S1, S2, . . . , S2n(1+γ)/2 using the function f ′−1 and obtain a clustering of the points in S1, S2, . . . , S2n(1+γ)/2. 7. Map back the points in S1, S2, . . . , S2n(1+γ)/2 to the points in V using the function f −1 and thus obtain a clustering of the initial set of points. Note that if k < n 1/4−ϵ, for constant ϵ > γ, at every step of the MapReduce, the input size on each machine is bounded by n (1−γ)/2 and thus we can run our coreset reduction and a space-efficient algorithm (in which we think of the poly(k) as constant – else we need minor modification). Furthermore if n 1/4−ϵ ≤k < n (1−ϵ)/2, for constant ϵ > γ, we can exploit the trade-off between number of rounds and approximation factor to get a similar result (refer to the supplement for details). 5 Figure 1: We split the input into m parts, compute mapping coresets for each part, and aggregate them. We then compute a solution to this aggregate and map the clustering back to the input. We are now ready to state our main theorem in the MapReduce framework: Theorem 3. Given an instance (V, d) for a k-clustering problem, with |V | = n and a sequential space-efficient α approximation algorithm for the (L-balanced) k-clustering (p) problem, there exists a MapReduce algorithm that runs in O(1) rounds and obtains an O(α) approximation for the (L-balanced) k-clustering (p) problem, for L, p ≥1 and 0 < k < n (1−ϵ)/2 (constant ϵ > 0). The previous theorem combined with the results of Section 5 gives us the results presented in Table 1. Furthermore it is possible to extend this approach to obtain streaming algorithms via the same techniques. We defer the details of this to the supplementary material. 4 Coresets and Analysis We now come to the proof of our main result—Theorem 1. We give an algorithm to construct coresets, and then show that coresets constructed this way compose. Constructing composable coresets. Suppose we are given a set of points V . We first show how to select a set of points S that are close to each vertex in V , and use this set as a coreset with a good mapping f. The selection of S uses a modification of the algorithm of Lin and Vitter [19] for k-median. We remark that any approximation algorithm for k-median with ℓp objective can be used in place of the linear program (as we did in our experiments, for p = ∞, in which a greedy farthest point traversal can be used). Consider a solution (x, y) to the following linear programming (LP) relaxation: min X u X v d(u, v)pxuv subject to X v xuv = 1 for all u (every u assigned to a center) xuv ≤yv for all u, v (assigned only to center) X u yu ≤k (at most k centers) 0 ≤xuv, yu ≤1 for all u, v. In the above algorithms, we can always treat p ≤log n, and in particular the case p = ∞, as p = log n. This introduces only negligible error in our computations but make them tractable. More specifically, when working with p = log n, the power operators do not increase the size of the input by more than a factor log n. 6 Rounding We perform a simple randomized rounding with weights scaled up by O(log n): round each yu to 1 with a probability equal to min{1, yu(4 log n)/ϵ}. Let us denote this probability by y′ u, and the set of “centers” thus obtained, by S. We prove the following (proof in the supplement) Lemma 4. With probability (1−1/n), the set S of selected centers satisfies the following properties. 1. Each vertex has a relatively close selected center. In particular, for every u ∈V , there is a center opened at distance at most h (1 + ϵ) P v d(u, v)pxuv i1/p . 2. Not too many centers are selected; i.e., |S| < 8k log n ϵ . Mapping and multiplicity. Once we have a set S of centers, we map every v ∈V the center closest to it, i.e., f(v) = arg mins∈S d(v, s). If ms points in V are mapped to some s ∈S, we set its multiplicty to ms. This defines a bijection from V to the resulting multiset. Composability of the coresets. We now come to the crucial step, the proof of composability for the mapping coresets constructed earlier, i.e., the ‘furthermore’ part of Theorem 1. To show this, we consider any vertex sets V1, V2, . . . , Vm, and mapping coresets S1, S2, . . . , Sm obtained by the rounding algorithm above. We have to prove that the total moving cost is at most (1 + ϵ)2pOPTP, where the optimum value is for the instance ∪iVi. We denote by LP(Vi) the optimum value of the linear program above, when the set of points involved is Vi. Finally, we write µv := d(v, fv)p, and µtotal := P v∈V µv. We now have: Lemma 5. Let LPi denote the objective value of the optimum solution to LP(Vi), i.e., the LP relaxation written earlier when only vertices in Vi are considered. Then we have µtotal ≤(1 + ϵ) X i LPi. The proof follows directly from Lemma 4 and the definition of f. The next lemma is crucial: it shows that LP(V ) cannot be too small. The proof is deferred to the supplement. Lemma 6. In the notation above, we have P i LPi ≤2p · LP(V ). The two lemmas imply that the total mapping cost is at most (1 + ϵ)2pOPTP, because LP(V ) is clearly ≤OPTP. This completes the proof of Theorem 1. 5 Space efficient algorithms on a single machine Our framework ultimately reduces distributed computation to a sequential computation on a compressed instance. For this, we need to adapt the known algorithms on balanced k-clustering, in order to handle compressed instances. We now give a high level overview and defer the details to the supplementary material. For balanced k-center, we modify the linear programming (LP) based algorithm of [16], and its analysis to deal with compressed instances. This involves the following trick: if we have a compressed instance with N points, since there are only k centers to open, at most k “copies” of each point are candidate centers. We believe this trick can be applied more generally to LP based algorithms. For balanced k-clustering with other ℓp objectives (even p = 1), it is not known how to obtain constant factor approximation algorithms (even without the space efficient restriction). Thus we consider bicriteria approximations, in which we respect the cluster size constraints, but have up to 2k clusters. This can be done for all ℓp objectives as follows: first solve the problem approximately without enforcing the balanced constraint, then post-process the clusters obtained. If a cluster contains ni points for ni > L, then subdivide the cluster into ⌈ni/L⌉many clusters. The division should be done carefully (see supplement). The post-processing step only involves the counts of the vertices in different clusters, and hence can be done in a space efficient manner. Thus the crucial part is to find the ‘unconstrained’ k-clustering in a space efficient way. For this, the typical algorithms are either based on local search (e.g., due 7 Graph Relative size of sequential instance Relative increase in radius US 0.33% +52% World 0.1% +58% Table 2: Quality degradation due to the two-round approach. Figure 2: Scalability of parallel implementation. to [13]), or based on rounding linear programs. The former can easily be seen to be space efficient (we only need to keep track of the number of centers picked at each location). The latter can be made space efficient using the same trick we use for k-center. 6 Empirical study In order to gauge its practicality, we implement our algorithm. We are interested in measuring its scalability in addition to the effect of having several rounds on the quality of the solution. In particular, we compare the quality of the solution (i.e., the maximum radius from the k-center objective) produced by the parallel implementation to that of the sequential one-machine implementation of the farthest seed heuristic. In some sense, our algorithm is a parallel implementation of this algorithm. However, the instance is too big for the sequential algorithm to be feasible. As a result, we run the sequential algorithm on a small sample of the instance, hence a potentially easier instance. Our experiments deal with two instances to test this effect: the larger instance is the world graph with hundreds of millions of nodes, and the smaller one is the graph of US road networks with tens of millions of nodes. Each node has the coordinate locations, which we use to compute great-circle distances—the closest distance between two points on the surface of the earth. We always look for 1000 clusters, and run our parallel algorithms on a few hundred machines. Table 2 shows that the quality of the solution does not degrade substantially if we use the tworound algorithm, more suited to parallel implementation. The last column shows the increase in the maximum radius of clusters due to computing the k-centers in two rounds as described in the paper. Note that the radius increase numbers quoted in the table are upper bounds since the sequential algorithm could only be run on a simpler instance. In reality, the quality reduction may be even less. In case of the US Graph, the sequential algorithm was run on a random 1 300 subset of the actual graph, whereas a random 1 1000 subset was used for the World Graph. We next investigate how the running time of our algorithm scales with the size of the instance. We focus on the bigger instance (World Graph) and once again take its random samples of different sizes (10% up to 100%). This yields to varying instance sizes, but does not change the structure of the problem significantly, and is perfect for measuring scalability. Figure 2 shows the increase in running time is sublinear. In particular, a ten-fold increase in instance size only leads to a factor 3.6 increase in running time. 8 References [1] P. K. AGARWAL, G. CORMODE, Z. HUANG, J. PHILLIPS, Z. WEI, AND K. YI, Mergeable summaries, in Proceedings of the 31st symposium on Principles of Database Systems, ACM, 2012, pp. 23–34. [2] P. K. AGARWAL, S. HAR-PELED, AND K. R. VARADARAJAN, Approximating extent measures of points, Journal of the ACM (JACM), 51 (2004), pp. 606–635. [3] H.-C. AN, A. BHASKARA, AND O. SVENSSON, Centrality of trees for capacitated k-center, CoRR, abs/1304.2983 (2013). [4] B. BAHMANI, B. MOSELEY, A. VATTANI, R. KUMAR, AND S. VASSILVITSKII, Scalable k-means++, PVLDB, 5 (2012), pp. 622–633. [5] M.-F. BALCAN, S. EHRLICH, AND Y. LIANG, Distributed clustering on graphs, in NIPS, 2013, p. to appear. [6] J. BAR-ILAN, G. KORTSARZ, AND D. PELEG, How to allocate network centers, J. Algorithms, 15 (1993), pp. 385–415. [7] M. CHARIKAR, C. CHEKURI, T. FEDER, AND R. MOTWANI, Incremental clustering and dynamic information retrieval, in Proceedings of the Twenty-ninth Annual ACM Symposium on Theory of Computing, STOC ’97, New York, NY, USA, 1997, ACM, pp. 626–635. [8] M. CHARIKAR, L. O’CALLAGHAN, AND R. PANIGRAHY, Better streaming algorithms for clustering problems, in In Proc. of 35th ACM Symposium on Theory of Computing (STOC, 2003, pp. 30–39. [9] J. CHUZHOY AND Y. RABANI, Approximating k-median with non-uniform capacities, in SODA, 2005, pp. 952–958. [10] M. CYGAN, M. HAJIAGHAYI, AND S. KHULLER, LP rounding for k-centers with nonuniform hard capacities, in FOCS, 2012, pp. 273–282. [11] A. ENE, S. IM, AND B. MOSELEY, Fast clustering using mapreduce, in KDD, 2011, pp. 681– 689. [12] S. GUHA, N. MISHRA, R. MOTWANI, AND L. O’CALLAGHAN, Clustering data streams, STOC, (2001). [13] A. GUPTA AND K. TANGWONGSAN, Simpler analyses of local search algorithms for facility location, CoRR, abs/0809.2554 (2008). [14] P. INDYK, S. MAHABADI, M. MAHDIAN, AND V. MIRROKNI, Composable core-sets for diversity and coverage maximization, in unpublished, 2014. [15] H. J. KARLOFF, S. SURI, AND S. VASSILVITSKII, A model of computation for mapreduce, in SODA, 2010, pp. 938–948. [16] S. KHULLER AND Y. J. SUSSMANN, The capacitated k-center problem, SIAM J. Discrete Math., 13 (2000), pp. 403–418. [17] M. R. KORUPOLU, C. G. PLAXTON, AND R. RAJARAMAN, Analysis of a local search heuristic for facility location problems, in SODA, 1998, pp. 1–10. [18] S. LATTANZI, B. MOSELEY, S. SURI, AND S. VASSILVITSKII, Filtering: a method for solving graph problems in mapreduce, in SPAA, 2011, pp. 85–94. [19] J.-H. LIN AND J. S. VITTER, Approximation algorithms for geometric median problems, Inf. Process. Lett., 44 (1992), pp. 245–249. [20] F. RAHIMIAN, A. H. PAYBERAH, S. GIRDZIJAUSKAS, M. JELASITY, AND S. HARIDI, Jabe-ja: A distributed algorithm for balanced graph partitioning, in SASO, 2013, pp. 51–60. [21] J. UGANDER AND L. BACKSTROM, Balanced label propagation for partitioning massive graphs, in WSDM, 2013, pp. 507–516. 9
2014
212
5,306
Stochastic Variational Inference for Hidden Markov Models Nicholas J. Foti†, Jason Xu†, Dillon Laird, and Emily B. Fox University of Washington {nfoti@stat,jasonxu@stat,dillonl2@cs,ebfox@stat}.washington.edu Abstract Variational inference algorithms have proven successful for Bayesian analysis in large data settings, with recent advances using stochastic variational inference (SVI). However, such methods have largely been studied in independent or exchangeable data settings. We develop an SVI algorithm to learn the parameters of hidden Markov models (HMMs) in a time-dependent data setting. The challenge in applying stochastic optimization in this setting arises from dependencies in the chain, which must be broken to consider minibatches of observations. We propose an algorithm that harnesses the memory decay of the chain to adaptively bound errors arising from edge effects. We demonstrate the effectiveness of our algorithm on synthetic experiments and a large genomics dataset where a batch algorithm is computationally infeasible. 1 Introduction Modern data analysis has seen an explosion in the size of the datasets available to analyze. Significant progress has been made scaling machine learning algorithms to these massive datasets based on optimization procedures [1, 2, 3]. For example, stochastic gradient descent employs noisy estimates of the gradient based on minibatches of data, avoiding a costly gradient computation using the full dataset [4]. There is considerable interest in leveraging these methods for Bayesian inference since traditional algorithms such as Markov chain Monte Carlo (MCMC) scale poorly to large datasets, though subset-based MCMC methods have been recently proposed as well [5, 6, 7, 8]. Variational Bayes (VB) casts posterior inference as a tractable optimization problem by minimizing the Kullback-Leibler divergence between the target posterior and a family of simpler variational distributions. Thus, VB provides a natural framework to incorporate ideas from stochastic optimization to perform scalable Bayesian inference. Indeed, a scalable modification to VB harnessing stochastic gradients—stochastic variational inference (SVI)—has recently been applied to a variety of Bayesian latent variable models [9, 10]. Minibatch-based VB methods have also proven effective in a streaming setting where data arrives sequentially [11]. However, these algorithms have been developed assuming independent or exchangeable data. One exception is the SVI algorithm for the mixed-membership stochastic block model [12], but independence at the level of the generative model must be exploited. SVI for Bayesian time series including HMMs was recently considered in settings where each minibatch is a set of independent series [13], though in this setting again dependencies do not need to be broken. In contrast, we are interested in applying SVI to very long time series. As a motivating example, consider the application in Sec. 4 of a genomics dataset consisting of T = 250 million observations in 12 dimensions modeled via an HMM to learn human chromatin structure. An analysis of the entire sequence is computationally prohibitive using standard Bayesian inference techniques for † Co-first authors contributed equally to this work. 1 HMMs due to a per-iteration complexity linear in T. Unfortunately, despite the simple chain-based dependence structure, applying a minibatch-based method is not obvious. In particular, there are two potential issues immediately arising in sampling subchains as minibatches: (1) the subsequences are not mutually independent, and (2) updating the latent variables in the subchain ignores the data outside of the subchain introducing error. We show that for (1), appropriately scaling the noisy subchain gradients preserves unbiased gradient estimates. To address (2), we propose an approximate message-passing scheme that adaptively bounds error by accounting for memory decay of the chain. We prove that our proposed SVIHMM algorithm converges to a local mode of the batch objective, and empirically demonstrate similar performance to batch VB in significantly less time on synthetic datasets. We then consider our genomics application and show that SVIHMM allows efficient Bayesian inference on this massive dataset where batch inference is computationally infeasible. 2 Background 2.1 Hidden Markov models Hidden Markov models (HMMs) [14] are a class of discrete-time doubly stochastic processes consisting of observations yt and latent states xt ∈{1, . . . , K} generated by a discrete-valued Markov chain. Specifically, for y = (y1, . . . , yT ) and x = (x1, . . . , xT ), the joint distribution factorizes as p(x, y) = π0(x1)p(y1|x1) T Y t=2 p(xt|xt−1, A)p(yt|xt, φ) (1) where A = [Aij]K i,j=1 is the transition matrix with Aij = Pr(xt = j|xt−1 = i), φ = {φk}K k=1 the emission parameters, and π0 the initial distribution. We denote the set of HMM parameters as θ = (π0, A, φ). We assume that the underlying chain is irreducible and aperiodic so that a stationary distribution π exists and is unique. Furthermore, we assume that we observe the sequence at stationarity so that π0 = π, where π is given by the leading left-eigenvector of A. As such, we do not seek to learn π0 in the setting of observing a single realization of a long chain. We specify conjugate Dirichlet priors on the rows of the transition matrix as p(A) = K Y j=1 Dir(Ai: | αA j ). (2) Here, Dir(π | α) denotes a K-dimensional Dirichlet distribution with concentration parameters α. Although our methods are more broadly applicable, we focus on HMMs with multivariate Gaussian emissions where φk = {µk, Σk}, with conjugate normal-inverse-Wishart (NIW) prior yt | xt ∼N(yt | µxt, Σxt), φk = (µk, Σk) ∼NIW(µ0, κ0, Σ0, ν0). (3) For simplicity, we suppress dependence on θ and write π(x0), p(xt|xt−1), and p(yt|xt) throughout. 2.2 Structured mean-field VB for HMMs We are interested in the posterior distribution of the state sequence and parameters given an observation sequence, denoted p(x, θ|y). While evaluating marginal likelihoods, p(y|θ), and most probable state sequences, arg maxx p(x|y, θ), are tractable via the forward-backward (FB) algorithm when parameter values θ are fixed [14], exact computation of the posterior is intractable for HMMs. Markov chain Monte Carlo (MCMC) provides a widely used sampling-based approach to posterior inference in HMMs [15, 16]. We instead focus on variational Bayes (VB), an optimization-based approach that approximates p(x, θ|y) by a variational distribution q(θ, x) within a simpler family. Typically, for HMMs a structured mean field approximation is considered: q(θ, x) = q(A)q(φ)q(x), (4) breaking dependencies only between the parameters θ = {A, φ} and latent state sequence x [17]. Note that making a full mean field assumption in which q(x) = QT i=1 q(xi) loses crucial information about the latent chain needed for accurate inference. 2 Each factor in Eq. (4) is endowed with its own variational parameter and is set to be in the same exponential family distribution as its respective complete conditional. The variational parameters are optimized to maximize the evidence lower bound (ELBO) L: ln p(y) ≥Eq [ln p(θ)] −Eq [ln q(θ)] + Eq [ln p(y, x|θ)] −Eq [ln q(x)] := L(q(θ), q(x)). (5) Maximizing L is equivalent to minimizing the KL divergence KL(q(x, θ)||p(x, θ|y)) [18]. In practice, we alternate updating the global parameters θ—those coupled to the entire set of observations—and the local variables {xt}—a variable corresponding to each observation, yt. Details on computing the terms in the equations and algorithms that follow are in the Supplement. The global update is derived by differentiating L with respect to the global variational parameters [17]. Assuming a conjugate exponential family leads to a simple coordinate ascent update [9]: w = u + Eq(x) [t(x, y)] . (6) Here, t(x, y) denotes the vector of sufficient statistics, and w = (wA, wφ) and u = (uA, uφ) the variational parameters and model hyperparameters, respectively, in natural parameter form. The local update is derived analogously, yielding the optimal variational distribution over the latent sequence: q∗(x) ∝exp Eq(A) [ln π(x1)] + T X t=2 Eq(A)  ln Axt−1,xt  + T X t=1 Eq(φ) [ln p(yt|xt)] ! . (7) Compare with Eq. (1). Here, we have replaced probabilities by exponentiated expected log probabilities under the current variational distribution. To determine the optimal q∗(x) in Eq. (7), define: eAj,k := exp  Eq(A) ln(Aj,k)  ep(yt|xt = k) := exp  Eq(φ) ln p(yt|xt = k)  . (8) We estimate π with ˆπ being the leading eigenvector of Eq(A)[A]. We then use ˆπ, ˜A = ( eAj,k), and ˜p = {ep(yt|xt = k), k = 1, . . . , K, t = 1, . . . , T} to run a forward-backward algorithm, producing forward messages α and backward messages β which allow us to compute q∗(xt = k) and q∗(xt−1 = j, xt = k). [19, 17]. See the Supplement. 2.3 Stochastic variational inference for non-sequential models Even in non-sequential models, the batch VB algorithm requires an entire pass through the dataset for each update of the global parameters. This can be costly in large datasets, and wasteful when local-variable passes are based on uninformed initializations of the global parameters or when many data points contain redundant information. To cope with this computational challenge, stochastic variational inference (SVI) [9] leverages a Robbins-Monro algorithm [1] to optimize the ELBO via stochastic gradient ascent. When the data are independent, the ELBO in Eq. (5) can be expressed as L = Eq(θ) [ln p(θ)] −Eq(θ) [ln q(θ)] + T X i=1 Eq(xi) [ln p(yi, xi|θ)] −Eq(x) [ln q(x)] . (9) If a single observation index s is sampled uniformly s ∼Unif(1, . . . , T), the ELBO corresponding to (xs, ys) as if it were replicated T times is given by Ls = Eq(θ) [ln p(θ)] −Eq(θ) [ln q(θ)] + T · Eq(xs) [ln p(ys, xs|θ)] −Eq(xs) [ln q(xs)]  , (10) and it is clear that Es[Ls] = L. At each iteration n of the SVI algorithm, a data point ys is sampled and its local q∗(xs) is computed given the current estimate of global variational parameters wn. Next, the global update is performed via a noisy, unbiased gradient step (Es[ ˆ∇wLs] = ∇wL). When all pairs of distributions in the model are conditionally conjugate, it is cheaper to compute the stochastic natural gradient, e∇wLs, which additionally accounts for the information geometry of the distribution [9]. The resulting stochastic natural gradient step with step-size ρn is: wn+1 = wn + ρn e∇wLs(wn). (11) We show the form of e∇wLs in Sec. 3.2, specifically in Eq. (13) with details in the Supplement. 3 3 Stochastic variational inference for HMMs The batch VB algorithm of Sec. 2.2 becomes prohibitively expensive as the length of the chain T becomes large. In particular, the forward-backward algorithm in the local step takes O(K2T) time. Instead, we turn to a subsampling approach, but naively applying SVI from Sec. 2.3 fails in the HMM setting: decomposing the sum over local variables into a sum of independent terms as in Eq. (9) ignores crucial transition counts, equivalent to making a full mean-field approximation. Extending SVI to HMMs requires additional considerations due to the dependencies between the observations. It is clear that subchains of consecutive observations rather than individual observations are necessary to capture the transition structure (see Sec. 3.1). We show that if the local variables of each subchain can be exactly optimized, then stochastic gradients computed on subchains can be scaled to preserve unbiased estimates of the full gradient (see Sec. 3.2). Unfortunately, as we show in Sec. 3.3, the local step becomes approximate due to edge effects: local variables are incognizant of nodes outside of the subchain during the forward-backward pass. Although an exact scheme requires message passing along the entire chain, we harness the memory decay of the latent Markov chain to guarantee that local state beliefs in each subchain form an ϵapproximation qϵ(x) to the full-data beliefs q∗(x). We achieve these approximations by adaptively buffering the subchains with extra observations based on current global parameter estimates. We then prove that for ϵ sufficiently small, the noisy gradient computed using qϵ(x) corresponds to an ascent direction in L, guaranteeing convergence of our algorithm to a local optimum. We refer to our algorithm, which is outlined in Alg. 1, as SVIHMM. Algorithm 1 Stochastic Variational Inference for HMMs (SVIHMM) 1: Initialize variational parameters (wA 0 , wφ 0) and choose stepsize schedule ρn, n = 1, 2, . . . 2: while (convergence criterion is not met) do 3: Sample a subchain yS ⊂{y1, . . . , yT } with S ∼p(S) 4: Local step: Compute ˆπ, eA, epS and run q(xS) = ForwardBackward(yS, ˆπ, eA, epS). 5: Global update: wn+1 = wn(1 −ρn) + ρn(u + cT Eq(xS)[t(xS, yS)]) 6: end while 3.1 ELBO for subsets of data Unlike the independent data case (Eq. (9)), the local term in the HMM setting decomposes as ln p(y, x|θ) = ln π(x1) + T X t=2 ln Axt−1,xt + T X i=1 ln p(yt|xt). (12) Because of the paired terms in the first sum, it is necessary to consider consecutive observations to learn transition structure. For the SVIHMM algorithm, we define our basic sampling unit as subchains yS = (yS 1 , . . . , yS L), where S refers to the associated indices. We denote the ELBO restricted to yS as LS, and associated natural gradient as e∇wLS. 3.2 Global update We detail the global update assuming we have optimized q∗(x) exactly (i.e., as in the batch setting), although this assumption will be relaxed as discussed in Sec 3.3. Paralleling Sec. 2.3, the global SVIHMM step involves updating the global variational parameters w via stochastic (natural) gradient ascent based on q∗(xS), the beliefs corresponding to our current subchain S. Recall from Eq. (10) that the original SVI algorithm maintains Es[e∇wLs] = e∇wL by scaling the gradient based on an individual observation s by the total number of observations T. In the HMM case, we analogously derive a batch factor vector c = (cA, cφ) such that ES[e∇wLS] = e∇wL with e∇wLS = u + cT Eq∗(xS)  t(xS, yS)  −w. (13) The specific form of Eq. (13) for Gaussian emissions is in the Supplement. Now, the Robbins-Monro average in Eq. (11) can be written as wn+1 = wn(1 −ρn) + ρn(u + cT Eq∗(xS)[t(xS, yS)]). (14) 4 When the noisy natural gradients e∇wLS are independent and unbiased estimates of the true natural gradient, the iterates in Eq. (14) converge to a local maximum of L under mild regularity conditions as long as step-sizes ρn satisfy P n ρ2 n < ∞, and P n ρn = ∞[2, 9]. In our case, the noisy gradients are necessarily correlated even for independently sampled subchains due to dependence between observations (y1, . . . , yT ). However, as detailed in [20], unbiasedness suffices for convergence of Eq. (14) to a local mode. Batch factor Recalling our assumption of being at stationarity, Eq(π) ln π(x1) = Eq(π) ln π(xi) for all i. If we sample subchains from the uniform distribution over subchains of length L, denoted p(S), then we can write ES  Eq ln p(yS, xS|θ)  ≈p(S)Eq "T −L+1 X t=1 ln π(xt) + (L −1) T X t=2 ln Axt−1,xt + L T X t=1 p(yt|xt) # , (15) where the expectation is with respect to (π, A, φ); this is detailed in the Supplement. The approximate equality in Eq. (15) arises because while most transitions appear in L −1 subchains, those near the endpoints of the full chain do not, e.g., x1 and xT appear in only one subchain. This error becomes negligible as the length of the HMM increases. Since p(S) is uniform over all length L subchains, by linearity of expectation the batch factor c = (cA, cφ) is given by cA = (T−L+1)/(L−1), cφ = (T −L + 1)/L. Other choices of p(S) can be used by considering the appropriate version of Eq. (15) analogously to [12], generally with a batch factor cS varying with each subset yS. 3.3 Local update The optimal SVIHMM local variational distribution arises just as in the batch case of Eq. (7), but with time indices restricted to the length L subchain yS: q∗(xS) ∝exp Eq(A)  ln π(xS 1 )  + L X ℓ=2 Eq(A) h ln AxS ℓ−1,xS ℓ i + L X ℓ=1 Eq(φ)  ln p(yS ℓ|xS ℓ)  ! . (16) To compute these local beliefs, we use our current q(A), q(φ)—which have been informed by all previous subchains—to form ˆπ, eA, epS = {ep(yS ℓ|xS ℓ= k), ∀k, ℓ= 1, . . . , L}, with these parameters defined as in the batch case. We then use these parameters in a forward-backward algorithm detailed in the Supplement. However, this message passing produces only an approximate optimization due to loss of information incurred at the ends of the subchain. Specifically, for yS = (yt, . . . , yt+L), the forward messages coming from y1, . . . , yt−1 are not available to yt, and similarly the backwards messages from yt+L+1, . . . , yT are not available to yt+L. Recall our assumption in the global update step that q∗(xS) corresponds to a subchain of the fulldata optimal beliefs q∗(x). Here, we see that this assumption is assuredly false; instead, we analyze the implications of using approximate local subchain beliefs and aim to ameliorate the edge effects. Buffering subchains To cope with the subchain edge effects, we augment the subchain S with enough extra observations on each end so that the local state beliefs, q(xi), i ∈S, are within an ϵ-ball of q∗(xi) — those had we considered the entire chain. The practicality of this approach arises from the approximate finite memory of the process. In particular, consider performing a forwardbackward pass on (xS 1−τ, . . . , xS L+τ) leading to approximate beliefs ˜qτ(xi). Given ϵ > 0, define τϵ as the smallest buffer length τ such that max i∈S ||˜qτ(xi) −q∗(xi)||1 ≤ϵ. (17) The τ that satisfies Eq. (17) determines the number of observations used to buffer the subchain. After improving subchain beliefs, we discard ˜qτ(xi), i ∈buffer, prior to the global update. As will be seen in Sec. 4, in practice the necessary τϵ is typically very small relative to the lengthy observation sequences of interest. Buffering subchains is related to splash belief propagation (BP) for parallel inference in undirected graphical models, where the belief at any given node is monitored based on locally-aware message passing in order to maintain a good approximation to the true belief [21]. Unlike splash BP, we 5 embed the buffering scheme inside an iterative procedure for updating both the local latent structure and the global parameters, which affects the ϵ-approximation in future iterations. Likewise, we wish to maintain the approximation on an entire subchain, not just at a single node. Even in settings where parameters θ are known, as in splash BP, analytically choosing τϵ is generally infeasible. As such, we follow the approach of splash BP to select an approximate τϵ. We then go further by showing that SVIHMM still converges using approximate messages within an uncertain parameter setting where θ is learned simultaneously with the state sequence x. Specifically, we approximate τϵ by monitoring the change in belief residuals with a sub-routine GrowBuf, outlined in Alg. 2, that iteratively expands a buffer qold →qnew around a given subchain yS. Growbuf terminates when all belief residuals satisfy max i∈S ||q(xi)new −q(xi)old||1 ≤ϵ. (18) The GrowBuf sub-routine can be computed efficiently due to (1) monotonicity of the forward and backward messages so that only residuals at endpoints, q(xS 1 ) and q(xS L), need be considered, and (2) the reuse of computations. Specifically, the forward-backward pass can be rooted at the midpoint of yS so that messages to the endpoints can be efficiently propagated, and vice versa [22]. Furthermore, choosing sufficiently small ϵ guarantees that the noisy natural gradient lies in the same half-plane as the true natural gradient, a sufficient condition for maintaining convergence when using approximate gradients [23]; the proof is presented in the Supplement. Algorithm 2 GrowBuf procedure. 1: Input: subchain S, min buffer length u ∈Z+, error tolerance ϵ > 0. 2: Initialize qold(xS) = ForwardBackward(yS, ˆπ, eA, epS) and set Sold = S. 3: while true do 4: Grow buffer Snew by extending Sold by u observations in each direction. 5: qnew(xSnew) = ForwardBackward(ySnew, ˆπ, eA, epSnew), reusing messages from Sold. 6: if qnew(xS) −qold(xS) < ϵ then 7: return q∗(xS) = qnew(xS) 8: end if 9: Set Sold = Snew and qold = qnew. 10: end while 3.4 Minibatches for variance mitigation and their effect on computational complexity Stochastic gradient algorithms often benefit from sampling multiple observations in order to reduce the variance of the gradient estimates at each iteration. We use a similar idea in SVIHMM by sampling a minibatch B = (yS1, . . . , ySM ) consisting of M subchains. If the latent Markov chain tends to dwell in one component for extended periods, sampling one subchain may only contain information about a select number of states observed in that component. Increasing the length of this subchain may only lead to redundant information from this component. In contrast, using a minibatch of many smaller subchains may discover disparate components of the chain at comparable computational cost, accelerating learning and leading to a better local optimum. However, subchains must be sufficiently long to be informative of transition dynamics. In this setting, the local step on each subchain is identical; summing over subchains in the minibatch yields the gradient update: ˆwB = X S∈B cT Eq(xS)  t(xS, yS)  , wn+1 = wn(1 −ρn) + ρn  u + ˆwB |B|  . We see that the computational complexity of SVIHMM is O(K2(L+2τϵ)M), leading to significant efficiency gains compared to O(K2T) in batch inference when (L + 2τϵ)M << T. 4 Experiments We evaluate the performance of SVIHMM compared to batch VB on synthetic experiments designed to illustrate the trade off between the choice of subchain length L and the number of subchains per 6 Table 1: Runtime and predictive log-probability (without GrowBuf) on RC data. ⌊L/2⌋ Runtime (sec.) Avg. iter. time (sec.) log-predictive 100 2.74 ± 0.001 0.03 ± 0.000 −5.915 ± 0.004 500 11.79 ± 0.004 0.12 ± 0.000 −5.850 ± 0.000 1000 23.17 ± 0.006 0.23 ± 0.000 −5.850 ± 0.000 batch 1240.73 ± 0.370 248.15 ± 0.074 −5.840 ± 0.000 minibatch M. We also demonstrate the utility of GrowBuf. We then apply our algorithm to gene segmentation in a large human chromatin data set. Synthetic data We create two synthetic datasets with T = 10, 000 observations and K = 8 latent states. The first, called diagonally dominant (DD), illustrates the potential benefit of large M, the number of sampled subchains per minibatch. The Markov chain heavily self-transitions so that most subchains contain redundant information with observations generated from the same latent state. Although transitions are rarely observed, the emission means are set to be distinct so that this example is likelihood-dominated and highly identifiable. Thus, fixing a computational budget, we expect large M to be preferable to large L, covering more of the observation sequence and avoiding poor local modes arising from redundant information. The second dataset we consider contains two reversed cycles (RC): the Markov chain strongly transitions from states 1 →2 →3 →1 and 5 →7 →6 →5 with a small probability of transitioning between cycles via bridge states 4 and 8. The emission means for the two cycles are very similar but occur in reverse order with respect to the transitions. Transition information in observing long enough dynamics is thus crucial to identify between states 1, 2, 3 and 5, 6, 7, and a large enough L is imperative. The Supplement contains details for generating both synthetic datasets. We compare SVIHMM to batch VB on these two synthetic examples. For each per parameter setting, we ran 20 random restarts of SVIHMM for 100 iterations and batch VB until convergence of the ELBO. A forgetting rate κ parametrizes step sizes ρn = (1 + n)−κ. We fix the total number of observations L × M used per iteration of SVIHMM such that increasing M implies decreasing L (and vice versa). In Fig. 1(a) we compare || ˆA−A||F , where A is the true transition matrix and ˆA its learned variational mean. We see trends one would expect: the small L, large M settings achieve better performance for the DD example, but the opposite holds for RC, with ⌊L/2⌋= 1 significantly underperforming. (Of course, allowing large L and M is always preferable, except computationally.) Under appropriate settings in both cases, we achieve comparable performance to batch VB. In Fig. 1(b), we see similar trends in terms of predictive log-probability holding out 10% of the observations as a test set and using 5-fold cross validation. Here, we actually notice that SVIHMM often achieves higher predictive log-probability than batch VB, which is attributed to the fact that stochastic algorithms can find better local modes than their non-random counterparts. A timing comparison of SVIHMM to batch VB with T = 3 million is presented in Table 4. All settings of SVIHMM run faster than even a single iteration of batch, with only a negligible change in predictive log-likelihood. Further discussion on these timing results is in the Supplement. Motivated by the demonstrated importance of choice of L, we now turn to examine the impact of the GrowBuf routine via predictive log-probability. In Fig. 1(b), we see a noticeable improvement for small L settings when GrowBuf is incorporated (the dashed lines in Fig. 1(b)). In particular, the RC example is now learning dynamics of the chain even with ⌊L/2⌋= 1, which was not possible without buffering. GrowBuf thus provides robustness by guarding against poor choice of L. We note that the buffer routine does not overextend subchains, on average growing by only ≈8 observations with ϵ = 1×10−6. Since the number of observations added is usually small, GrowBuf does not significantly add to per-iteration computational cost (see the Supplement). Human chromatin segmentation We apply the SVIHMM algorithm to a massive human chromatin dataset provided by the ENCODE project [24]. This data was studied in [25] with the goal of unsupervised pattern discovery via segmentation of the genome. Regions sharing the same labels have certain common properties in the observed data, and because the labeling at each position is unknown but influenced by the label at the previous position, an HMM is a natural model [26]. 7 G G G G G G G G G G 0.0 0.5 1.0 1.5 0.00 0.25 0.50 0.75 1.00 Diag. Dom. Rev. Cycles 1 10 100 L/2 (log−scale) ||A||F (a) L/2 = 1 L/2 = 3 L/2 = 10 −4.5 −4.0 −3.5 −3.0 −6.6 −6.4 −6.2 −6.0 Diag. Dom. Rev. Cycles 0 20 40 60 0 20 40 60 0 20 40 60 Iteration Held out log−probability GrowBuffer Off On κ 0.1 0.3 0.5 0.7 (b) Figure 1: (a) Transition matrix error varying L with L × M fixed. (b) Effect of incorporating GrowBuf. Batch results denoted by horizontal red line in both figures. We were provided with 250 million observations consisting of twelve assays carried out in the chronic myeloid leukemia cell line K562. We analyzed the data using SVIHMM on an HMM with 25 states and 12 dimensional Gaussian emissions. We compare our performance to the corresponding segmentation learned by an expectation maximization (EM) algorithm applied to a more flexible dynamic Bayesian network model (DBN) [27]. Due to the size of the dataset, the analysis of [27] requires breaking the chain into several blocks, severing long range dependencies. We assess performance by comparing the false discovery rate (FDR) of predicting active promoter elements in the sequence. The lowest (best) FDR achieved with SVIHMM over 20 random restarts trials was .999026 using ⌊L/2⌋= 2000, M = 50, κ = .51, comparable and slightly lower than the .999038 FDR obtained using DBN-EM on the severed data [27]. We emphasize that even when restricted to a simpler HMM model, learning on the full data via SVIHMM attains similar results to that of [27] with significant gains in efficiency. In particular, our SVIHMM runs require only under an hour for a fixed 100 iterations, the maximum iteration limit specified in the DBN-EM approach. In contrast, even with a parallelized implementation over the broken chain, the DBN-EM algorithm can take days. In conclusion, SVIHMM enables scaling to the entire dataset, allowing for a more principled approach by utilizing the data jointly. 5 Discussion We have presented stochastic variational inference for HMMs, extending such algorithms from independent data settings to handle time dependence. We elucidated the complications that arise when sub-sampling dependent observations and proposed a scheme to mitigate the error introduced from breaking dependencies. Our approach provides an adaptive technique with provable guarantees for convergence to a local mode. Further extensions of the algorithm in the HMM setting include adaptively selecting the length of meta-observations and parallelizing the local step when the number of meta-observations is large. Importantly, these ideas generalize to other settings and can be applied to Bayesian nonparametric time series models, general state space models, and other graph structures with spatial dependencies. Acknowledgements This work was supported in part by the TerraSwarm Research Center sponsored by MARCO and DARPA, DARPA Grant FA9550-12-1-0406 negotiated by AFOSR, and NSF CAREER Award IIS-1350133. JX was supported by an NDSEG fellowship. We also appreciate the data, discussions, and guidance on the ENCODE project provided by Max Libbrecht and William Noble. 1Other parameter settings were explored. 8 References [1] H. Robbins and S. Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 22(3):400–407, 1951. [2] L. Bottou. Online algorithms and stochastic approximations. In Online Learning and Neural Networks. Cambridge University Press, 1998. [3] L. Bottou. Large-Scale Machine Learning with Stochastic Gradient Descent. In International Conference on Computational Statistics, pages 177–187, August 2010. [4] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM J. on Optimization, 19(4):1574–1609, January 2009. [5] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In International Conference on Machine Learning, pages 681–688, 2011. [6] D. Maclaurin and R. P. Adams. Firefly Monte Carlo: Exact MCMC with subsets of data. CoRR, abs/1403.5693, 2014. [7] X. Wang and D. B. Dunson. Parallelizing MCMC via Weierstrass sampler. CoRR, abs/1312.4605, 2014. [8] W. Neiswanger, C. Wang, and E. Xing. Asymptotically exact, embarrassingly parllel MCMC. CoRR, abs/1311.4780, 2014. [9] M. D. Hoffman, D. M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14(1):1303–1347, May 2013. [10] M. Bryant and E. B. Sudderth. Truly nonparametric online variational inference for hierarchical Dirichlet processes. In Advances in Neural Information Processing Systems, pages 2708–2716, 2012. [11] T. Broderick, N. Boyd, A. Wibisono, A. C. Wilson, and M. I. Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems, pages 1727–1735, 2013. [12] P. Gopalan, D. M. Mimno, S. Gerrish, M. J. Freedman, and D. M. Blei. Scalable inference of overlapping communities. In Advances in Neural Information Processing Systems, pages 2258–2266, 2012. [13] M. J. Johnson and A. S. Willsky. Stochastic variational inference for Bayesian time series models. In International Conference on Machine Learning, 2014. [14] L. R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. [15] S. Fr¨uhwirth-Schnatter. Finite mixture and Markov switching models. Springer Verlag, 2006. [16] S. L. Scott. Bayesian methods for hidden Markov models: Recursive computing in the 21st century. Journal of the American Statistical Association, 97(457):337–351, March 2002. [17] M. J. Beale. Variational Algorithms for Approximate Bayesian Inference. Ph.D. thesis, University College London, 2003. [18] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, November 1999. [19] C. M. Bishop. Pattern Recognition and Machine Learning. Springer Verlag, 2006. [20] B. T. Polyak and Y. Tsypkin. Pseudo-gradient adaptation and learning algorithms. Automatics and Telemechanics, 3:45–68, 1973. [21] J. Gonzalez, Y. Low, and C. Guestrin. Residual splash for optimally parallelizing belief propagation. In International Conference on Artificial Intelligence and Statistics, 2009. [22] S. J. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Pearson Education, 2003. [23] J. Nocedal and S. Wright. Numerical Optimization. Springer Series in Operations Research and Financial Engineering. Springer, 2006. [24] ENCODE Project Consortium. An integrated encyclopedia of DNA elements in the human genome. Nature, 489(7414):57–74, September 2012. [25] M. M. Hoffman, O. J. Buske, J. Wang, Z. Weng, J. A. Bilmes, and W. S. Noble. Unsupervised pattern discovery in human chromatin structure through genomic segmentation. Nature Methods, 9:473–476, 2012. [26] N. Day, A. Hemmaplardh, R. E. Thurman, J. A. Stamatoyannopoulos, and W. S. Noble. Unsupervised segmentation of continuous genomic data. Bioinformatics, 23(11):1424–1426, 2007. [27] M. M. Hoffman, J. Ernst, S. P. Wilder, A. Kundaje, R. S. Harris, M. Libbrecht, B. Giardine, P. M. Ellenbogen, J. A. Bilmes, E. Birney, R. C. Hardison, M. Dunham, I. Kellis, and W. S. Noble. Integrative annotation of chromatin elements from encode data. Nucleic Acids Research, 41(2):827–841, 2013. 9
2014
213
5,307
Tight convex relaxations for sparse matrix factorization Emile Richard Electrical Engineering Stanford University Guillaume Obozinski Universit´e Paris-Est Ecole des Ponts - ParisTech Jean-Philippe Vert MINES ParisTech Institut Curie Abstract Based on a new atomic norm, we propose a new convex formulation for sparse matrix factorization problems in which the number of non-zero elements of the factors is assumed fixed and known. The formulation counts sparse PCA with multiple factors, subspace clustering and low-rank sparse bilinear regression as potential applications. We compute slow rates and an upper bound on the statistical dimension [1] of the suggested norm for rank 1 matrices, showing that its statistical dimension is an order of magnitude smaller than the usual ℓ1-norm, trace norm and their combinations. Even though our convex formulation is in theory hard and does not lead to provably polynomial time algorithmic schemes, we propose an active set algorithm leveraging the structure of the convex problem to solve it and show promising numerical results. 1 Introduction A range of machine learning problems such as link prediction in graphs containing community structure [16], phase retrieval [5], subspace clustering [18] or dictionary learning [12] amount to solve sparse matrix factorization problems, i.e., to infer a low-rank matrix that can be factorized as the product of two sparse matrices with few columns (left factor) and few rows (right factor). Such a factorization allows more efficient storage, faster computation, more interpretable solutions and especially leads to more accurate estimates in many situations. In the case of interaction networks, for example, this is related to the assumption that the network is organized as a collection of highly connected communities which can overlap. More generally, considering sparse low-rank matrices combines two natural forms of sparsity, in the spectrum and in the support, which can be motivated by the need to explain systems behaviors by a superposition of latent processes which only involve a few parameters. Landmark applications of sparse matrix factorization are sparse principal components analysis (SPCA) [8, 21] or sparse canonical correlation analysis (SCCA)[19], which are widely used to analyze high-dimensional data such as genomic data. In this paper, we propose new convex formulations for the estimation of sparse low-rank matrices. In particular, we assume that the matrix of interest should be factorized as the sum of rank one factors that are the product of column and row vectors with respectively k and q non zero-entries, where k and q are known. We first introduce below the (k, q)-rank of a matrix as the minimum number of left and right factors, having respectively k and q non-zeros, required to reconstruct a matrix. This index is a more involved complexity measure for matrices than the rank in that it conditions on the number of non-zero elements of the left and right factors of the matrix. Based on this index, we propose a new atomic norm for matrices [7] by considering its convex hull restricted to the unit ball of the operator norm, resulting in convex surrogates to low (k, q)-rank matrix estimation problem. We analyze the statistical dimension of the new norm and compare it to that of linear combinations of the ℓ1 and trace norms. In the vector case, our atomic norm actually reduces to k-support norm introduced by [2] and our analysis shows that its statistical power is not better than that of the ℓ11 norm. By contrast, in the matrix case, the statistical dimension of our norm is at least one order of magnitude better than combinations of the ℓ1-norm and the trace norm. However, while in the vector case the computation remains feasible in polynomial time, the norm we introduce for matrices can not be evaluated in polynomial time. We propose algorithmic schemes to approximately learn with the new norm. The same norm and meta-algorithms can be used as a regularizer in supervised problems such as multitask learning or quadratic regression and phase retrieval, highlighting the fact that our algorithmic contribution does not consist in providing more efficient solutions to the rank-1 SPCA problem, but to combine atoms found by the rank-1 solvers in a principled way. 2 Tight convex relaxations of sparse factorization constraints In this section we propose a new matrix norm allowing to formulate various sparse matrix factorization problems as convex optimization problems. We start by defining the (k, q)-rank of a matrix in section 2.1, a useful generalization of the rank which also quantifies the sparseness of a matrix factorization. We then introduce in section 2.2 the (k, q)-trace norm, an atomic norm defined as the convex relaxations of the (k, q)-rank over the operator norm ball. We discuss further properties and potential applications of this norm used as a regularizer in section 2.3. 2.1 The (k, q)-rank of a matrix The rank of a matrix Z ∈Rm1×m2 is the minimum number of rank-1 matrices needed to express Z as a linear combination of the form Z = Pr i=1 aib⊤ i . The following definition generalizes this rank to incorporate conditions on the sparseness of the rank-1 elements: Definition 1 ((k, q)-sparse decomposition and (k, q)-rank) For a matrix Z ∈Rm1×m2, we call (k, q)-sparse decomposition of Z any decomposition of the form Z = Pr i=1 ciaib⊤ i where ai (resp. bi) are unit vectors with at most k (resp. q) non-zero elements, and with minimal r, which we call the (k, q)-rank of Z. The (k, q)-rank and (k, q)-sparse decomposition of Z can equivalently be defined as the optimal value and a solution of the optimization problem: min ∥c∥0 s.t. Z = ∞ X i=1 ciaib⊤ i , (ai, bi, ci) ∈Am1 k × Am2 q × R+ , (1) where for any 1 ≤j ≤n, An j = {a ∈Rn | ∥a∥0 ≤j, ∥a∥2 = 1}. Since An i ⊂An j when i ≤j, we have for any k and q rank(Z) ≤(k, q)-rank(Z) ≤∥Z∥0. The (k, q)-rank is useful to formalize problems such as sparse matrix factorization, which can be defined as approximating the solution of a matrix valued problem by a matrix having low (k, q)-rank. For instance the standard rank-1 SPCA problem consists in finding the symmetric matrix with (k, k)-rank equal to 1 and providing the best approximation of the sample covariance matrix [21]. 2.2 A convex relaxation for the (k, q)-rank The (k, q)-rank is a discrete, nonconvex index, like the rank or the cardinality, leading to computational difficulties if one wants to learn matrices with small (k, q)-rank. We propose a convex relaxation of the (k, q)-rank aimed at mitigating these difficulties. For that purpose, we consider an atomic norm [7] that provides a convex relaxation of the (k, q)-trace norm, just like the ℓ1 norm and the trace norm are convex relaxations of the ℓ0 semi-norm and the rank, respectively. An atomic norm is a convex function defined based on a small set of elements called atoms which constitute a basis on which an object of interest can be sparsely decomposed. The function (a norm if the set is centrally symmetric) is defined as the gauge of the convex hull of atoms. In other terms, its unit ball or level-set of value 1 is formed by the convex envelope of atoms. In case of atoms of interest, namely rank-1 factors of given sparsities k and q, we define Definition 2 ((k, q)-trace norm) Let Ak,q be a set of atoms Ak,q =  ab⊤: a ∈Am1 k , b ∈Am2 q . For a matrix Z ∈Rm1×m2, the (k, q)-trace norm Ωk,q(Z) is the atomic norm induced by Ak,q, i.e., 2 Ωk,q(Z) = inf n X A∈Ak,q cA : Z = X A∈Ak,q cAA, cA ≥0, ∀A ∈Ak,q o . (2) In words, Ak,q is the set of matrices A ∈Rm1×m2 such that (k, q)-rank(A) = 1 and ∥A∥op = 1. The next lemma provides an explicit formulation for the (k, q)-trace norm and its dual: Lemma 1 For any Z, K ∈Rm1×m2, and denoting Gm k = {I ⊂[[1, m]] : |I| = k}, we have Ωk,q(Z) = inf n X (I,J)∈Gm1 k ×Gm2 q ∥Z(I,J)∥∗: Z = X (I,J) Z(I,J) , supp(Z(I,J)) ⊂I × J o , (3) and Ω∗ k,q(K) = max  ∥KI,J∥op : I ∈Gm1 k , J ∈Gm2 q . 2.3 Learning matrices with sparse factors In this section, we briefly discuss how the (k, q)-trace norm norm can be used to formulate various problems involving the estimation of sparse low-rank matrices. A way to learn a matrix Z with low empirical risk L(Z) and with low (k, q)-rank is to use Ωk,q as a regularizer and minimize an objective of the form min Z∈Rm1×m2 L(Z) + λΩk,q(Z). (4) A number of problems can be formulated as variants of (4). Bilinear regression. In bilinear regression, given two inputs x ∈Rm1 and x′ ∈Rm2 one observes as output a noisy version of y = x⊤Zx′. Assuming that Z has low (k, q)-rank means that the noiseless response is a sum of a small number of terms, each involving only a small number of features from either of the input vectors. To estimate within such a model from observations (xi, x′ i, yi)i=1,...,n one can consider the following formulation, in which ℓis a convex loss : min Z∈Rm1×m2 X i ℓ x⊤ i Zx′ i, yi  + λΩk,q(Z) . (5) Subspace clustering. In subspace clustering, one assumes that the data can be clustered in such a way that the points in each cluster belong to a low dimensional space. If we have a design matrix X ∈Rn×p with each row corresponding to an observation, then the previous assumption means that if X(j) ∈Rnj×p is a matrix formed by the rows of cluster j, there exist a low rank matrix Z(j) ∈Rnj×nj such that Z(j)X(j) = X(j). This means that there exists a block-diagonal matrix Z such that ZX = X and with low-rank diagonal blocks. This idea, exploited recently by [18] implies that Z is a sum of low rank sparse matrices; and this property still holds if the clustering is unknown. We therefore suggest that if all subspaces are of dimension k, Z may be estimated via min Z∈Rn×n Ωk,k(Z) s.t. ZX = X . Sparse PCA. One possible formulation of sparse PCA with multiple factors is the problem of approximation of an empirical covariance matrix ˆΣn by a low-rank matrix with sparse factors. This suggests to formulate sparse PCA as follows: min Z  ∥ˆΣn −Z∥F : (k, k)-rank(Z) ≤r and Z ⪰0 , (6) where q is the maximum number of non-zero coefficients allowed in each principal direction. By contrast to sequential approaches that estimate the principal components one-by-one [11], this formulation requires to find simultaneously a set of complementary factors. If we require the decomposition of Z to be a sum of positive semi-definite (k, k)-sparse rank one factors (which is a stronger assumption than assuming that Z is p.s.d.), the positivity constraint on Z is no longer necessary and a natural convex relaxation for (6) using another atomic norm (in fact only a gauge here) is min Z∈Rm×m ∥ˆΣn −Z∥2 F + λΩk,⪰(Z) , (7) where Ωk,⪰is the gauge of the set of atoms Ak,⪰:= {aa⊤, a ∈Am k }. 3 3 Performance of the (k, q)-trace norm for denoising In this section, we consider the problem of denoising a low-rank matrix Z⋆∈Rm1×m2 with sparse factors corrupted by additive Gaussian noise, that is noisy observations Y ∈Rm1×m2 of the form Y = Z⋆+ σG , where σ > 0 and G is a random matrix with i.i.d. N(0, 1) entries. For a convex penalty Ω: Rm1×m2 →R, we consider, for any λ > 0, the estimator ˆZλ Ω= arg min Z 1 2∥Z −Y ∥2 F + λΩ(Z) . (8) The following result is a straightforward generalization to any norm Ωof the so-called slow rates that are well know for the ℓ1 norms and other norms such as the trace-norm (see e.g. [10]). Lemma 2 If λ ≥σΩ∗(G) then ˆZλ Ω−Z⋆ 2 F ≤4λΩ(Z⋆) . To derive an upper bound in estimation error from these inequalities, and to keep the argument as simple as possible we consider the oracle1 estimate ˆZOracle Ω equal to ˆZλ Ωwhere λ = σΩ∗(G). From Lemma 2 we immediately get E ˆZOracle Ω −Z⋆∥2 F ≤4σ Ω(Z⋆) E Ω∗(G) . (9) This upper bound can be computed for Z⋆= ab⊤∈Ak,q for different norms. In particular, for Ω(Z⋆), we have ∥ab⊤∥1 ≤√kq and Ωk,q(ab⊤) = ∥ab⊤∥∗= 1 which lead to the corollary: Corollary 1 When Z⋆= ab⊤∈Ak,q is an atom, the expected errors of the oracle estimators ˆZOracle Ωk,q , ˆZOracle 1 and ˆZOracle ∗ using respectively the (k, q)-trace norm, the ℓ1 norm and the trace norm are upper bounded as follows: E ∥ˆZOracle Ωk,q −Z⋆∥2 F ≤8 σ r k log m1 k + 2k + r q log m2 q + 2q  , E ∥ˆZOracle 1 −Z⋆∥2 F ≤2σ∥Z⋆∥1 p 2 log(m1m2) ≤2σ p 2kq log(m1m2) , E ∥ˆZOracle ∗ −Z⋆∥2 F ≤2σ(√m1 + √m2) . (10) When the smallest entry in absolute value of a or b is close to 0, then the expected error is smaller for ˆZOracle 1 , reaching σ p 2 log(m1m2) on e1e⊤ 1 while not changing for the two other norms. But under the assumption that the smallest nonzero entries in absolute value of a and b are lower bounded by c/√kq with c a constant, the upper bound on the rates obtained for the (k, q)-trace norm is at least an order of magnitude larger than for the other norms. We report the order of magnitude of these upper bounds in Table 1 for m1 = m2 = m and k = q and assuming that nonzeros coefficients are lower bounded in magnitude by c/√kq. Obviously the comparison of upper bounds is not enough to conclude to the superiority of (k, q)-trace norm and, admittedly, the problem of denoising considered here is a special instance of linear regression in which the design matrix is the identity, and, since this is a case in which the design is trivially incoherent, it is possible to obtain fast rates for decomposable norms such as the ℓ1 or trace norm [13]; however, the slow rates obtained are the same if instead of Y a linear transformation of Z with incoherent design is observed, or when the signal to recover is only weakly sparse, which is not the case for the fast rates. Moreover, Lemma 2 applies to matrices of any rank and Corollary 1 generalizes to rank greater than 1. We present in the next section more sophisticated results, based on bounds on the so-called statistical dimension of different norms [1]. 4 A bound on the statistical dimension of the (k, q)-trace norm The squared Gaussian width [7, and ref. therein] and the statistical dimension introduced recently by Amelunxen et al. [1], provide quantified estimation guarantees. The two quantities are equal 1We call it oracle estimate because the choice of λ depends on the unknown noise level. Virtually identical bounds (up to constants) holding with large probability could be derived for the non-oracle estimator by controlling the deviations of Ω∗(G) from its expectation. 4 up to an additive term smaller than 1 and we thus present results only in terms of the statistical dimension. The sample complexity of exact recovery and robust recovery are characterized by this quantity [7]. It is also equal to the signal to noise ratio necessary for denoising [6] and demixing [1] (see supplementary section 3). The statistical dimension is defined as follows: if TΩ(A) is the tangent cone of a matrix norm Ω: Rm1×m2 →R+ at A, then, the statistical dimension of TΩ(A) is S(Z, Ω) := E h ΠTΩ(Z)(G) 2 F i , where G ∈Rm1×m2 is a random matrix with i.i.d. standard normal entries and ΠTΩ(Z)(G) is the orthogonal projection of G onto the cone TΩ(Z). In this section, we compute an upper bound on the statistical dimension of Ωk,q at an atoms A of Ak,q, which we will denote by S(A, Ωk,q), and compare it to results known for linear combinations of the ℓ1 and the trace norm of the form Γµ with ∀µ ∈[0, 1], ∀Z ∈Rm1×m2, Γµ(Z) := µ √kq ∥Z∥1 + (1 −µ)∥Z∥⋆, (11) which are norms that have been used in the literature to infer sparse low-rank matrices [17]. The ability to recover the support of a sparse vector typically depends on the size of its smallest non-zero coefficient. For the recovery of a sparse rank 1 matrix, this motivates the following definition Definition 3 Let A = ab⊤∈Ak,q with I0 =supp(a) and J0 =supp(b). Denote a2 min =min i∈I0 a2 i and b2 min =min j∈J0 b2 j. We define the strength γ(a, b) ∈(0, 1] as γ(a, b) := (k a2 min) ∧(q b2 min). The strength of an atom takes the maximal value of 1 when |ai| = 1/ √ k, i ∈I and |bj| = 1/√q, j ∈ J where I and J are the supports of a and b. On the contrary, its strength is close to 0 as soon as one of its nonzero entries is close to zero. We can now present our main result: a bound on the statistical dimension of Ωk,q on Ak,q. Proposition 1 For A = ab⊤∈Ak,q with strength γ = γ(a, b), there exist universal constants c1, c2, independent of m1, m2, k, q such that S(A, Ωk,q) ≤ c1 γ2 (k + q) + c2 γ (k + q) log(m1 ∨m2) . Our proof, presented in the appendix, follows the scheme proposed in [7] and used for the trace norm and ℓ1 norm. However, Ωk,q is not decomposable and requires some work to obtain precise upper bounds on various quantities. Note first that S must be larger than the number of degrees of freedoms of elements of Ak,q which is k + q −1. So the bound could not possibly be improved beyond logarithmic factors, besides the logarithmic dependence on the dimension of the overall space is expected. To appreciate the result, it should be compared with the statistical dimension for the ℓ1-norm which scales as the product of the size of the support with the logarithm of the dimension of the ambient space, that is as kq log(m1m2). Using Landau notation, we report in Table 1 the upper and lower bounds known for the statistical dimension of other norms in the case where k = q and m1 = m2 = m. The rates are known exactly up to constants for the ℓ1 and the trace norm (see e.g. [1]). Of particular relevance is the comparison with norms of the form Γµ which have been introduced with the aim of improving over both the ℓ1-norm and the trace norm and have been the object of a significant literature [17, 15, 9]. Using theorem 3.2 in [15], we prove in appendix 4 a lower bound on the statistical dimension of Γµ of order kq∧(m1 +m2) which holds for all values of µ, and which show that, up to logarithmic factors, Ωk,q is an order of magnitude smaller in term of k ∧q. In the right column of Table 1 we also report results in the vector case, that is, when m2 = q = 1. In fact, in that case, Ωk,1 is exactly the k-support norm proposed by [2]. But the statistical dimension of that norm and the ℓ1 norm is the same as it is known that the rate k log p k cannot be improved ([4]). So, perhaps surprisingly, there improvement in the matrix case but not in the vector case. 5 Algorithm In this section, we present a working set algorithm that attempts to solve problem (4). Injecting the variational form (3) of Ωk,q in (4) and eliminating the variable Z from the optimization problem 5 Matrix norm S Ω(Z⋆)E Ω∗(G) Vector norm S (k, q)-trace O(k log m) (k log m k )1/2 k-support Θ(k log p k) ℓ1 Θ(k2 log m k2 ) (k2 log m)1/2 ℓ1 Θ(k log p k) trace-norm Θ(m) m1/2 ℓ2 p ℓ1 + trace-n. Ω k2 ∧m  O m1/2 ∧(k2 log m)1/2 elastic net Θ(k log p k) Table 1: Scaling of the statistical dimension S and of the upper bound Ω(Z⋆) EΩ∗(G) in estimation error (slow-rates) of different matrix norms for elements of Ak,q with strength (see Definition 3) lower bounded by a constant (or equivalently with nonzero coefficient lower bounded by c/√kq for c a constant). Leftmost columns: scalings for matrices with k = q, m = m1 = m2; rightmost columns: scalings for vectors with m1 = p and m2 = q = 1. We use the notations Ωand Θ with f = Ω(g) meaning g = O(f) and f = Θ(g) to mean that both g = O(f) and f = O(g). using Z = P (I,J)∈S Z(IJ), one obtains that, when S = Gm1 k × Gm2 q , problem (4) is equivalent to min Z(IJ)∈Rm1m2 L  X (I,J)∈S Z (IJ) + λ X (I,J)∈S ∥Z (IJ)∥∗, s.t. Supp(Z (IJ)) ⊂I × J, (I, J) ∈S. (PS) At the optimum of (4) however, most of the variables Z(IJ) are equal to zero, and the solution is the same as the solution obtained from (PS) in which S is reduced to the set of non-zero matrices Z(IJ) obtained at optimality, that are often called the active components. We thus propose to solve problem (4) using a so-called working set algorithm which solves a sequence of problems of the form (PS) for a growing sequence of working sets S, so as to keep a small number of non-zero matrices Z(IJ) throughout. Problem (PS) is solved easily using approximate block coordinate descent on the (Z(IJ))(I,J)∈S [3, Chap. 4] , which consists in iterating proximal operators of the trace norm on blocks I × J. The principle of the working set algorithm is to solve problem (PS) for the current working set S and to check whether a new component should be added. It can be shown that a component with support I × J should be added if and only if ∥[∇L(Z)]IJ∥op > λ for the current value of Z. If such a component is found, the corresponding (I, J) pair is added in S and problem (PS) is solved again. Given that for any component in S, we have ∥[∇L(Z)]IJ∥op ≤λ at the optimum of (PS), the algorithm terminates if Ω∗ k,q(∇L(Z)) ≤λ. The main difficulty is that Ω∗ k,q(K) = max{a⊤Kb | a ∈Am1 k , b ∈Am2 q }, which is NP-hard to compute, since it reduces in particular to rank 1 sparse PCA when k = q and K is p.s.d.. This implies that determining when the algorithm should stop and which new component to add is hard. However, a significant amount of research has been carried out on sparse PCA recently, and we thus propose to leverage some of the recently proposed relaxations and heuristics to solve this rank 1 sparse PCA problem (see [8, 20] and references therein). In particular, the Truncated Power iteration (TPI) algorithm of [20] can easily be modified to compute Ω∗ k,q which corresponds to a generalization of the rank 1 sparse PCA in which in general a ̸= b and k ̸= q. In our numerical experiments, we used a variant of Truncated Power Iteration with multiple restarts, keeping track of the highest found variance. It should be noted that under RIP conditions on the matrix, [20] shows that the solution returned by TPI is guaranteed to solve the rank 1 sparse PCA problem. Also, even if TPI finds a pair (I, J) which is suboptimal, adding it in S does not hurt as the algorithm might determine subsequently that it is not necessary. However TPI might fail to find some of the components violating the optimality conditions and terminate the algorithm early. The proposed algorithm cannot be guaranteed to solve (4) if Ω∗ k,q is not computed exactly, but it exploits as much as possible the structure of the convex optimization problem to find a candidate solution. A similar active set algorithm can be designed to solve problems regularized by Ωk,⪰. Formulations regularized by the trace norm require to compute its proximal operator, and thus to compute an SVD. However, even when m1, m2 are large, solving PS involves the computation of trace norms of matrices of size only k × q and so the SVDs that need to be computed are fairly small. This means that the computational bottleneck of the algorithm is clearly in finding candidate supports. It has been proved [20] that, under some conditions, the problem can be solved in linear time. Multiple restarts allow to find good candidate supports in practice. 6 10 0 10 1 10 2 10 3 10 1 10 2 10 3 10 4 10 5 10 6 k NMSE (k,k)−rank = 1 l1 Trace Ωk,q 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 100 200 300 400 500 600 700 800 900 (k,q)−rank NMSE 10 0 10 1 10 2 10 3 10 1 10 2 10 3 10 4 10 5 10 6 k NMSE No overlap l1 Trace Ωk,q 10 0 10 1 10 2 10 1 10 2 10 3 10 4 10 5 10 6 k NMSE 90 % overlap l1 Trace Ωk,q Figure 1: Estimates of the statistical dimensions of the ℓ1, trace and Ωk,q norms at a matrix Z ∈ R1000×1000 in different setting. From left to right: (a): Z is an atom in e Ak,k for different values of k. (b) Z is a sum of r atoms in e Ak,k with non-overlapping support, with k = 10 and varying r, (c) Z is a sum of 3 atoms in e Ak,k with non-overlapping support, for varying k. (d) Z is a sum of 3 atoms in e Ak,k with overlapping support, for varying k. 6 Numerical experiments In this section we report experimental results to assess the performance of sparse low-rank matrix estimation using different techniques. We start in Section 6.1 with simulations that confirm and illustrate the theoretical results on statistical dimension of Ωk,q and assess how they generalize to matrices with (k, q)-rank larger than 1. In Section 6.2 we compare several techniques for sparse PCA on simulated data. 6.1 Empirical estimates of the statistical dimension. In order to numerically estimate the statistical dimension S(Z, Ω) of a regularizer Ωat a matrix Z, we add to Z a random Gaussian noise matrix and observe Y = Z + σG where G has normal i.i.d. entries following N(0, 1). We then denoise Y to form an estimate ˆZ of Z. For small σ, the normalized mean-squared error (NMSE) defined as NMSE(σ) := E∥ˆZ −Z∥2 F/σ2 is a good estimate of the statistical dimension, since [14] show that S(Z, Ω) = limσ→0 NMSE(σ) . Numerically, we therefore estimate S(Z, Ω) with the empirical NMSE(σ) for σ = 10−4, averaged over 20 replicates. We consider square matrices with m1 = m2 = 1000, and estimate the statistical dimension of Ωk,q, the ℓ1 and the trace norms at different matrices Z. The constrained denoiser has a simple closed-form for the ℓ1 and the trace norm. For Ωk,q, it can be obtained by a sequence of proximal projections with different parameters λ until Ωk,q( ˆZ) has the correct value Ωk,q(Z). Since the noise is small, we found that it was sufficient and faster to perform a (k, q)-SVD of Y by computing a proximal of Ωk,q with a small λ, and then apply the ℓ1 constrained denoiser to the set of (k, q)-sparse singular values. We first estimate the statistical dimensions of the three norms at an atom Z in e Ak,q for different values of k = q, where e Ak,q = {ab⊤∈Ak,q | ∥ab⊤∥∞= 1/√kq} is the set of elements of Ak,q with nonzero entries of constant magnitude . Figure 1.a shows the results, which confirm the theoretical bounds summarized in Table 1. The statistical dimension of the trace norm does not depend on k, while that of the ℓ1 norm increases almost quadratically with k and that of Ωk,q increases linearly with k. The linear versus quadratic dependence of the statistical dimension on k are reflected by the slopes of the curves in the log-log plot in Figure 1.a. As expected, Ωk,q interpolates between the ℓ1 norm (for k = 1) and the trace norm (for k = m1), and outperforms both norms for intermediate values of k. This experiments therefore confirms that our upper bound (1) on S(Z, Ωk,q) captures the correct order in k, although the constants can certainly be much improved, and that our algorithm manages, in this simple setting, to correctly approximate the solution of the convex minimization problem. Second, we estimate the statistical dimension of Ωk,q on matrices with (k, q)-rank larger than 1, a setting for which we proved no theoretical result. Figure 1.b shows the numerical estimate of S(Z, Ωk,q) for matrices Z which are sums of r atoms in e Ak,k with non-overlapping support, for k = 10 and varying r. We observe that the increase in statistical dimension is roughly linear in the (k, q)-rank. For a fixed (k, q)-rank of 3, Figures 1.c and 1.d compare the estimated statistical dimensions of the three regularizers on matrices Z which are sums of 3 atoms in e Ak,k with re7 Sample covariance Trace ℓ1 Trace + ℓ1 Sequential Ωk,⪰ 4.20 ± 0.02 0.98 ± 0.01 2.07 ± 0.01 0.96 ± 0.01 0.93 ± 0.08 0.59 ± 0.03 Table 2: Relative error of covariance estimation with different methods. spectively non-overlapping or overlapping supports. The shapes of the different curves are overall similar to the rank 1 case, although the performance of Ωk,q degrades when the supports of atoms overlap. In both cases, Ωk,q consistently outperforms the two other norms. Overall these experiments suggest that the statistical dimension of Ωk,q at a linear combination of r atoms increases as Cr (k log m1 + q log m2) where the coefficient C increases with the overlap among the supports of the atoms. 6.2 Comparison of algorithms for sparse PCA In this section we compare the performance of different algorithms in estimating a sparsely factored covariance matrix that we denote Σ⋆. The observed sample consists of n i.i.d. random vectors generated according to N(0, Σ⋆+ σ2Idp), where (k, k)-rank(Σ⋆) = 3. The matrix Σ⋆is formed by adding 3 blocks of rank 1, Σ⋆= a1a⊤ 1 +a2a⊤ 2 +a3a⊤ 3 , having all the same sparsity ∥ai∥0 = k = 10, 3 × 3 overlaps and nonzero entries equal to 1/ √ k. The noise level σ = 0.8 is set in order to make the signal to noise ratio below the level σ = 1 where a spectral gap appears and makes the spectral baseline (penalizing the trace of the PSD matrix) work. In our experiments the number of variables is p = 200 and n = 80 points are observed. To estimate the true covariance matrix from the noisy observation, first the sample covariance matrix is formed as ˆΣn = 1 n Pn i=1 xix⊤ i , and given as input to various algorithms which provide a new estimate ˆΣ. The methods we compared are the following: • Sample covariance. Output ˆΣn as the estimate of the covariance. • ℓ1 penalty. Soft-threshold ˆΣn elementwise. • Trace penalty on the PSD cone. minZ⪰0 1 2∥Z −ˆΣn∥2 F + λ Tr Z . • Trace + ℓ1 penalty. minZ⪰0 1 2∥Z −ˆΣn∥2 F + λΓµ(Z). • Ωk,⪰penalty. minZ∈Rp×p 1 2∥Z −ˆΣn∥2 F + λΩk,⪰(Z) , with Ωk,⪰the gauge associated with Ak,⪰ introduced in Section 2.3. • Sequential sparse PCA. This is the standard way of estimating multiple sparse principal components which consists of solving the problem for a single component at each step t = 1 . . . r, and deflate to switch to the next (t + 1)st component. The deflation step used in this algorithm is the orthogonal projection Zt+1 = (Idp −utu⊤ t ) Zt (Idp −utu⊤ t ) . The tuning parameters for this approach are the sparsity level k and the number of principal components r. The hyperparameters were chosen by leaving one portion of the train data off (validation) and selecting the parameter which allows to build an estimator approximating the best the validation set’s empirical covariance. We assumed the true value of k known in advance for all algorithms. We report the relative errors ∥ˆΣ −Σ⋆∥F/∥Σ⋆∥F over 10 runs of our experiments in Table 2. The results indicate that sparse PCA methods, whether based on Ωk,⪰or the sequential method with deflation steps, outperform spectral and ℓ1 baselines, and that penalizing Ωk,⪰is superior to the sequential approach. This was to be expected since our algorithm minimizes a loss function close to the error measure used, whereas the sequential scheme does not optimize a well-defined objective. 7 Conclusion We formulated the problem of matrix factorization with sparse factors of known sparsity as the minimization of an index, the (k, q)-rank which tight convex relaxation is the (k, q)-trace norm regularizer. This penalty is proved to have near optimal statistical performance. Despite theoretical computational hardness in the worst-case scenario, exploiting the convex geometry of the problem allowed us to build an efficient algorithm to minimize it. Future work will consist of relaxing the constraint on the blocks size, and exploring applications such as finding small comminuties in large random graph background. Acknowlegments This project was partially funded by Agence Nationale de la Recherche grant ANR-13-MONU-005-10 (CHORUS project) and by ERC grant SMAC-ERC-280032. 8 References [1] D. Amelunxen, M. Lotz, M. McCoy, and J. Tropp. Living on the edge: a geometric theory of phase transition in convex optimization. Information and Inference, 3(3):224–294, 2014. [2] A. Argyriou, R. Foygel, and N. Srebro. Sparse prediction with the k-support norm. In Advances in Neural Information Processing Systems (NIPS), pages 1466–1474, 2012. [3] F. Bach. Optimization with sparsity-inducing penalties. Foundations and Trends R⃝in Machine Learning, 4(1):1–106, 2011. [4] E. J. Candes and M. A. Davenport. How well can we estimate a sparse vector? Applied and Computational Harmonic Analysis 34, 34(2):317–323, 2013. [5] E.J. Cand`es, T Strohmer, and V. Voroninski. Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming. Comm. Pure Appl. Math., 2011. [6] V. Chandrasekaran and M. I. Jordan. Computational and statistical tradeoffs via convex relaxation. Proc. Natl. Acad. Sci. USA, 2013. [7] V. Chandrasekaran, B. Recht, P.A. Parrilo, and A.S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12, 2012. [8] A. d’Aspremont, L. El Ghaoui, M.I. Jordan, and G.R.G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. SIAM review, 2007. [9] X.V. Doan and S.A. Vavasis. Finding approximately rank-one submatrices with the nuclear norm and l1 norm. SIAM Journal on Optimization, 23:2502 – 2540, 2013. [10] V. Koltchinskii, K. Lounici, and A. Tsybakov. Nuclear-norm penalization and optimal rates for noisy low-rank matrix completion. Ann. Stat., 39(5):2302–2329, 2011. [11] L. Mackey. Deflation methods for sparse PCA. Advances in Neural Information Processing Systems (NIPS), 21:1017–1024, 2008. [12] J. Mairal, F. Bach, J. Ponce, and G. Sapiro. Online learning for matrix factorization and sparse coding. J. Mach. Learn. Res., 11:19–60, 2010. [13] S. N Negahban, P. Ravikumar, M. J Wainwright, and B. Yu. A unified framework for highdimensional analysis of M-estimators. Statistical Science, 27(4):538–557, 2012. [14] S. Oymak and B. Hassibi. Sharp MSE bounds for proximal denoising. Technical Report 1305.2714, arXiv, 2013. [15] S. Oymak, A. Jalali, M. Fazel, Y. Eldar, and B. Hassibi. Simultaneously structured models with application to sparse and low-rank matrices. arXiv preprint 1212.3753, 2012. [16] E. Richard, S. Gaiffas, and N. Vayatis. Link prediction in graphs with autoregressive features. In Neural Information Processing Systems, volume 15, pages 565–593. MIT Press, 2012. [17] E. Richard, P.-A. Savalle, and N. Vayatis. Estimation of simultaneously sparse and low-rank matrices. In International Conference on Machine Learning (ICML), 2012. [18] Y.X. Wang, H. Xu, and C. Leng. Provable subspace clustering: When LRR meets SSC. In Advances in Neural Information Processing Systems (NIPS), pages 64–72. 2013. [19] D Witten, R Tibshirani, and T Hastie. A penalized matrix decomposition, with applications to sparse PCA and CCA. Biostatistics, 10(3):515–534, 2009. [20] X.-T. Yuan and T. Zhang. Truncated power method for sparse eigenvalue problems. J. Mach. Learn. Res., 14(1):899–925, 2013. [21] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of computational and graphical statistics, 15(2):265–286, 2006. 9
2014
214
5,308
Extremal Mechanisms for Local Differential Privacy Peter Kairouz1 Sewoong Oh2 Pramod Viswanath1 1Department of Electrical & Computer Engineering 2Department of Industrial & Enterprise Systems Engineering University of Illinois Urbana-Champaign Urbana, IL 61801, USA {kairouz2,swoh,pramodv}@illinois.edu Abstract Local differential privacy has recently surfaced as a strong measure of privacy in contexts where personal information remains private even from data analysts. Working in a setting where the data providers and data analysts want to maximize the utility of statistical inferences performed on the released data, we study the fundamental tradeoff between local differential privacy and information theoretic utility functions. We introduce a family of extremal privatization mechanisms, which we call staircase mechanisms, and prove that it contains the optimal privatization mechanism that maximizes utility. We further show that for all information theoretic utility functions studied in this paper, maximizing utility is equivalent to solving a linear program, the outcome of which is the optimal staircase mechanism. However, solving this linear program can be computationally expensive since it has a number of variables that is exponential in the data size. To account for this, we show that two simple staircase mechanisms, the binary and randomized response mechanisms, are universally optimal in the high and low privacy regimes, respectively, and well approximate the intermediate regime. 1 Introduction In statistical analyses involving data from individuals, there is an increasing tension between the need to share the data and the need to protect sensitive information about the individuals. For example, users of social networking sites are increasingly cautious about their privacy, but still find it inevitable to agree to share their personal information in order to benefit from customized services such as recommendations and personalized search [1, 2]. There is a certain utility in sharing data for both data providers and data analysts, but at the same time, individuals want plausible deniability when it comes to sensitive information. For such systems, there is a natural core optimization problem to be solved. Assuming both the data providers and analysts want to maximize the utility of the released data, how can they do so while preserving the privacy of participating individuals? The formulation and study of an optimal framework addressing this tradeoff is the focus of this paper. Local differential privacy. The need for data privacy appears in two different contexts: the local privacy context, as in when individuals disclose their personal information (e.g., voluntarily on social network sites), and the global privacy context, as in when institutions release databases of information of several people or answer queries on such databases (e.g., US Government releases census data, companies like Netflix release proprietary data for others to test state of the art data analytics). In both contexts, privacy is achieved by randomizing the data before releasing it. We study the setting of local privacy, in which data providers do not trust the data collector (analyst). Local privacy dates back to Warner [29], who proposed the randomized response method to provide plausible deniability for individuals responding to sensitive surveys. 1 A natural notion of privacy protection is making inference of information beyond what is released hard. Differential privacy has been proposed in the global privacy context to formally capture this notion of privacy [11, 13, 12]. In a nutshell, differential privacy ensures that an adversary should not be able to reliably infer whether or not a particular individual is participating in the database query, even with unbounded computational power and access to every entry in the database except for that particular individual’s data. Recently, the notion of differential privacy has been extended to the local privacy context [10]. Formally, consider a setting where there are n data providers each owning a data Xi defined on an input alphabet X. In this paper, we shall deal, almost exclusively, with finite alphabets. The Xi’s are independently sampled from some distribution Pν parameterized by ν ∈{0, 1}. A statistical privatization mechanism Qi is a conditional distribution that maps Xi ∈X stochastically to Yi ∈Y, where Y is an output alphabet possibly larger than X. The Yi’s are referred to as the privatized (sanitized) views of Xi’s. In a non-interactive setting where the individuals do not communicate with each other and the Xi’s are independent and identically distributed, the same privatization mechanism Q is used by all individuals. For a non-negative ε, we follow the definition of [10] and say that a mechanism Q is ε-locally differentially private if sup S∈σ(Y),x,x′∈X Q(S|Xi = x) Q(S|Xi = x′) ≤eε , (1) where σ(Y) denotes an appropriate σ-field on Y. Information theoretic utilities for statistical analyses. The data analyst is interested in the statistics of the data as opposed to individual samples. Naturally, the utility should also be measured in terms of the distribution rather than sample quantities. Concretely, consider a client-server setting, where each client with data Xi sends a privatized version of the data Yi, via an ε-locally differentially private privatization mechanism Q. Given the privatized views {Yi}n i=1, the data analyst wants to make inferences based on the induced marginal distribution Mν(S) ≡ Z Q(S|x)dPν(x) , (2) for S ∈σ(Y) and ν ∈{0, 1}. The power to discriminate data generated from P0 to data generated from P1 depends on the ‘distance’ between the marginals M0 and M1. To measure the ability of such statistical discrimination, our choice of utility of a particular privatization mechanism Q is an information theoretic quantity called Csisz´ar’s f-divergence defined as Df(M0||M1) = Z f  dM0 dM1  dM1 , (3) for some convex function f such that f(1) = 0. The Kullback-Leibler (KL) divergence Dkl(M0||M1) is a special case with f(x) = x log x, and so is the total variation ∥M0 −M1∥TV with f(x) = (1/2)|x −1|. Such f-divergences capture the quality of statistical inference, such as minimax rates of statistical estimation or error exponents in hypothesis testing [28]. As a motivating example, suppose a data analyst wants to test whether the data is generated from P0 or P1 based on privatized views Y1, . . . , Yn. According to Chernoff-Stein’s lemma, for a bounded type I error probability, the best type II error probability scales as e−n Dkl(M0||M1). Naturally, we are interested in finding a privatization mechanism Q that minimizes the probability of error by solving the following constraint maximization problem maximize Q∈Dε Dkl(M0||M1) , (4) where Dε is the set of all ε-locally differentially private mechanisms satisfying (1). Motivated by such applications in statistical inference, our goal is to provide a general framework for finding optimal privatization mechanisms that maximize the f-divergence between the induced marginals under local differential privacy. Contributions. We study the fundamental tradeoff between local differential privacy and fdivergence utility functions. The privacy-utility tradeoff is posed as a constrained maximization problem: maximize f-divergence utility functions subject to local differential privacy constraints. This maximization problem is (a) nonlinear: f-divergences are convex in Q; (b) non-standard: we are maximizing instead of minimizing a convex function; and (c) infinite dimensional: the space of all differentially private mechanisms is uncountable. We show, in Theorem 2.1, that for all fdivergences, any ε, and any pair of distributions P0 and P1, a finite family of extremal mechanisms 2 (a subset of the corner points of the space of privatization mechanisms), which we call staircase mechanisms, contains the optimal privatization mechanism. We further prove, in Theorem 2.2, that solving the original problem is equivalent to solving a linear program, the outcome of which is the optimal staircase mechanism. However, solving this linear program can be computationally expensive since it has 2|X| variables. To account for this, we show that two simple staircase mechanisms (the binary and randomized response mechanisms) are optimal in the high and low privacy regimes, respectively, and well approximate the intermediate regime. This contributes an important progress in the differential privacy area, where the privatization mechanisms have been few and almost no exact optimality results are known. As an application, we show that the effective sample size reduces from n to ε2n under local differential privacy in the context of hypothesis testing. Related work. Our work is closely related to the recent work of [10] where an upper bound on Dkl(M0||M1) was derived under the same local differential privacy setting. Precisely, Duchi et. al. proved that the KL-divergence maximization problem in (4) is at most 4(eε −1)2∥P1 −P2∥2 T V . This bound was further used to provide a minimax bound on statistical estimation using information theoretic converse techniques such as Fano’s and Le Cam’s inequalities. In a similar spirit, we are also interested in maximizing information theoretic quantities of the marginals under local differential privacy. We generalize the results of [10], and provide stronger results in the sense that we (a) consider a broader class of information theoretic utilities; (b) provide explicit constructions of the optimal mechanisms; and (c) recover the existing result of [10, Theorem 1] (with a stronger condition on ε). While there is a vast literature on differential privacy, exact optimality results are only known for a few cases. The typical recipe is to propose a differentially private mechanism inspired by [11, 13, 26, 20], and then establish its near-optimality by comparing the achievable utility to a converse, for example in principal component analysis [8, 5, 19, 24], linear queries [21, 18], logistic regression [7] and histogram release [25]. In this paper, we take a different route and solve the utility maximization problem exactly. Optimal differentially private mechanisms are known only in a few cases. Ghosh et. al. showed that the geometric noise adding mechanism is optimal (under a Bayesian setting) for monotone utility functions under count queries (sensitivity one) [17]. This was generalized by Geng et. al. (for a worst-case input setting) who proposed a family of mechanisms and proved its optimality for monotone utility functions under queries with arbitrary sensitivity [14, 16, 15]. The family of optimal mechanisms was called staircase mechanisms because for any y and any neighboring x and x′, the ratio of Q(y|x) to Q(y|x′) takes one of three possible values eε, e−ε, or 1. Since the optimal mechanisms we develop also have an identical property, we retain the same nomenclature. 2 Main results In this section, we give a formal definition for staircase mechanisms and show that they are the optimal solutions to maximization problems of the form (5). Using the structure of staircase mechanisms, we propose a combinatorial representation for this family of mechanisms. This allows us to reduce the nonlinear program of (5) to a linear program with 2|X| variables. Potentially, for any instance of the problem, one can solve this linear program to obtain the optimal privatization mechanism, albeit with significant computational challenges since the number of variables scales exponentially in the alphabet size. To address this, we prove that two simple staircase mechanisms, which we call the binary mechanism and the randomized response mechanism, are optimal in high and low privacy regimes, respectively. We also show how our results can be used to derive upper bounds on f-divergences under privacy. Finally, we give a concrete example illustrating the exact tradeoff between privacy and statistical inference in the context of hypothesis testing. 2.1 Optimality of staircase mechanisms Consider a random variable X ∈X generated according to Pν, ν ∈{0, 1}. The distribution of the privatized output Y , whenever X is distributed according to Pν, is represented by Mν and given by (2). We are interested in characterizing the optimal solution of maximize Q∈Dε Df(M0||M1) , (5) 3 where Dε is the set of all ε-differentially private mechanisms satisfying, for all x, x′ ∈X and y ∈Y, 0 ≤ ln  Q(y|x) Q(y|x′)  ≤ ε . (6) This includes maximization over information theoretic quantities of interest in statistical estimation and hypothesis testing such as total variation, KL-divergence, and χ2-divergence [28]. In general this is a complicated nonlinear program: we are maximizing a convex function in Q; further, the dimension of Q might be unbounded: the optimal privatization mechanism Q∗might produce an infinite output alphabet Y. The following theorem proves that one never needs an output alphabet larger than the input alphabet in order to achieve the maximum divergence, and provides a combinatorial representation of the optimal solution. Theorem 2.1. For any ε, any pair of distributions P0 and P1, and any f-divergence, there exists an optimal mechanism Q∗maximizing the f-divergence in (5) over all ε-locally differentially private mechanisms, such that ln  Q∗(y|x) Q∗(y|x′)  ∈{0, ε} , (7) for all y ∈Y, x, x′ ∈X and the output alphabet size is at most equal to the input alphabet size: |Y| ≤|X|. The optimal solution is an extremal mechanism, since the absolute value of the log-likelihood ratios can only take one of the two extremal values (see Figure 1). We refer to such a mechanism as a staircase mechanism, and define the family of staircase mechanisms as Sε ≡{Q | satisfying (7)} . This family includes all the optimal mechanisms (for all choices of ε ≥0, P0, P1 and f), and since (7) implies (6), staircase mechanisms are locally differentially private. y = 1 2 x = 1 2 3 4 5 eε 1+eε 1 1+eε y = 1 2 3 4 x = 1 2 3 4 eε 3+eε 1 3+eε Figure 1: Examples of staircase mechanisms: the binary and randomized response mechanisms. For global differential privacy, we can generalize the definition of staircase mechanisms to hold for all neighboring database queries x, x′ (or equivalently within some sensitivity), and recover all known existing optimal mechanisms. Precisely, the geometric mechanism shown to be optimal in [17], and the mechanisms shown to be optimal in [14, 16] (also called staircase mechanisms) are special cases of the staircase mechanisms defined above. We believe that the characterization of these extremal mechanisms and the analysis techniques developed in this paper can be of independent interest to researchers interested in optimal mechanisms for global privacy and more general utilities. Combinatorial representation of the staircase mechanisms. Now that we know staircase mechanisms are optimal, we can try to combinatorially search for the best staircase mechanism for any fixed ε, P0, P1, and f. To this end, we give a simple representation of all staircase mechanisms, exploiting the fact that they are scaled copies of a finite number of patterns. Let Q ∈R|X|×|Y| be a staircase mechanism and k = |X| denote the input alphabet size. Then, using the definition of staircase mechanisms, Q(y|x)/Q(y|x′) ∈{e−ε, 1, eε} and each column Q(y|·) must be proportional to one of the canonical staircase patterns. For example, when k = 3, 4 there are 2k = 8 canonical patterns. Define a staircase pattern matrix S(k) ∈{1, eε}k×(2k) taking values either 1 or eε, such that the i-th column of S(k) has a staircase pattern corresponding to the binary representation of i −1 ∈{0, . . . , 2k −1}. We order the columns of S(k) in this fashion for notational convenience. For example, S(3) = "1 1 1 1 eε eε eε eε 1 1 eε eε 1 1 eε eε 1 eε 1 eε 1 eε 1 eε # . For all values of k, there are exactly 2k such patterns, and any column of Q(y|·) is a scaled version of one of the columns of S(k). Using this “pattern” matrix, we will show that we can represent (an equivalence class of) any staircase mechanism Q as Q = S(k)Θ , (8) where Θ ∈R2k×2k is a diagonal matrix representing the scaling of the columns of S(k). We can now formulate the problem of maximizing the divergence between the induced marginals as a linear program and prove that it is equivalent the original nonlinear program. Theorem 2.2. For any ε, any pair of distributions P0 and P1, and any f-divergence, the nonlinear program of (5) and the following linear program have the same optimal value maximize Θ∈R2k×2k 2k X i=1 µ(S(k) i )Θii (9) subject to S(k)Θ 1 = 1 , Θ is a diagonal matrix , Θ ≥0 , where µ(S(k) i ) = (P x∈X P1(x)S(k) xi )f(P x∈X P0(x)S(k) xi / P x∈X P1(x)S(k) xi ) and S(k) i is the i-th column of S(k), such that Df(M0||M1) = P2k i=1 µ(S(k) i )Θii. The solutions of (5) and (9) are related by (8). The infinite dimensional nonlinear program of (5) is now reduced to a finite dimensional linear program. The first constraint ensures that we get a valid probability transition matrix Q = S(k)Θ with a row sum of one. One could potentially solve this LP with 2k variables but its computational complexity scales exponentially in the alphabet size k = |X|. For practical values of k this might not always be possible. However, in the following section, we give a precise description for the optimal mechanisms in the high privacy and low privacy regimes. In order to understand the above theorem, observe that both the f-divergences and the differential privacy constraints are invariant under permutation (or relabelling) of the columns of a privatization mechanism Q. For example, the KL-divergence Dkl(M0||M1) does not change if we permute the columns of Q. Similarly, both the f-divergences and the differential privacy constraints are invariant under merging/splitting of outputs with the same pattern. To be specific, consider a privatization mechanism Q and suppose there exist two outputs y and y′ that have the same pattern, i.e. Q(y|·) = C Q(y′|·) for some positive constant C. Then, we can consider a new mechanism Q′ by merging the two columns corresponding to y and y′. Let y′′ denote this new output. It follows that Q′ satisfies the differential privacy constraints and the resulting f-divergence is also preserved. Precisely, using the fact that Q(y|·) = C Q(y′|·), it follows that M ′ 0(y′′) M ′ 1(y′′) = P x(Q(y|x) + Q(y′|x))P0(x) P x(Q(y|x) + Q(y′|x))P1(x) = (1 + C) P x Q(y|x)P0(x) (1 + C) P x Q(y|x)P1(x) = M0(y) M1(y) = M0(y′) M1(y′) , and thus the corresponding f-divergence is invariant: f M0(y) M1(y)  M1(y) + f M0(y′) M1(y′)  M1(y′) = f M ′ 0(y′′) M ′ 1(y′′)  M ′ 1(y′′) . We can naturally define equivalence classes for staircase mechanisms that are equivalent up to a permutation of columns and merging/splitting of columns with the same pattern: [Q] = {Q′ ∈Sε | exists a sequence of permutations and merge/split of columns from Q′ to Q} . (10) 5 To represent an equivalence class, we use a mechanism in [Q] that is ordered and merged to match the patterns of the pattern matrix S(k). For any staircase mechanism Q, there exists a possibly different staircase mechanism Q′ ∈[Q] such that Q′ = S(k)Θ for some diagonal matrix Θ with nonnegative entries. Therefore, to solve optimization problems of the form (5), we can restrict our attention to such representatives of equivalent classes. Further, for privatization mechanisms of the form Q = S(k)Θ, the f-divergences take the form given in (9), a simple linear function of Θ. 2.2 Optimal mechanisms in high and low privacy regimes For a given P0 and P1, the binary mechanism is defined as a staircase mechanism with only two outputs y ∈{0, 1} satisfying (see Figure 1) Q(0|x) =  eε 1+eε if P0(x) ≥P1(x) , 1 1+eε if P0(x) < P1(x) . Q(1|x) =  eε 1+eε if P0(x) < P1(x) , 1 1+eε if P0(x) ≥P1(x) . (11) Although this mechanism is extremely simple, perhaps surprisingly, we will establish that this is the optimal mechanism when high level of privacy is required. Intuitively, the output is very noisy in the high privacy regime, and we are better off sending just one bit of information that tells you whether your data is more likely to have come from P0 or P1. Theorem 2.3. For any pair of distributions P0 and P1, there exists a positive ε∗that depends on P0 and P1 such that for any f-divergences and any positive ε ≤ε∗, the binary mechanism maximizes the f-divergence between the induced marginals over all ε-local differentially private mechanisms. This implies that in the high privacy regime, which is a typical setting studied in much of differential privacy literature, the binary mechanism is a universally optimal solution for all f-divergences in (5). In particular this threshold ε∗is universal, in that it does not depend on the particular choice of which f-divergence we are maximizing. This is established by proving a very strong statistical dominance using Blackwell’s celebrated result on comparisons of statistical experiments [4]. In a nutshell, we prove that for sufficiently small ε, the output of any ε-locally differentially private mechanism can be simulated from the output of the binary mechanism. Hence, the binary mechanism dominates over all other mechanisms and at the same time achieves the maximum divergence. A similar idea has been used previously in [27] to exactly characterize how much privacy degrades under composition. The optimality of binary mechanisms is not just for high privacy regimes. The next theorem shows that it is the optimal solution of (5) for all ε, when the objective function is the total variation Df(M0||M1) = ∥M0 −M1∥TV. Theorem 2.4. For any pair of distributions P0 and P1, and any ε ≥0, the binary mechanism maximizes total variation between the induced marginals M0 and M1 among all ε-local differentially private mechanisms. When maximizing the KL-divergence between the induced marginals, we show that the binary mechanism still achieves a good performance for all ε ≤C where C ≥ε∗now does not depend on P0 and P1. For the special case of KL-divergence, let OPT denote the maximum value of (5) and BIN denote the KL-divergence when the binary mechanism is used. The next theorem shows that BIN ≥ 1 2(eε + 1)2 OPT . Theorem 2.5. For any ε and for any pair of distributions P0 and P1, the binary mechanism is an 1/(2(eε + 1)2) approximation of the maximum KL-divergence between the induced marginals M0 and M1 among all ε-locally differentially private mechanisms. Note that 2(eε + 1)2 ≤32 for ε ≤1, and ε ≤1 is a common regime of interest in differential privacy. Therefore, we can always use the simple binary mechanism in this regime and the resulting divergence is at most a constant factor away from the optimal one. The randomized response mechanism is defined as a staircase mechanism with the same set of outputs as the input, Y = X, satisfying (see Figure 1) Q(y|x) = ( eε |X|−1+eε if y = x , 1 |X|−1+eε if y ̸= x . 6 It is a randomization over the same alphabet where we are more likely to give an honest response. We view it as a multiple choice generalization of the randomized response proposed by Warner [29], assuming equal privacy level for all choices. We establish that this is the optimal mechanism when low level of privacy is required. Intuitively, the noise is small in the low privacy regime, and we want to send as much information about our current data as allowed, but no more. For a special case of maximizing KL-divergence, we show that the randomized response mechanism is the optimal solution of (5) in the low privacy regime (ε ≥ε∗). Theorem 2.6. There exists a positive ε∗that depends on P0 and P1 such that for any P0 and P1, and all ε ≥ε∗, the randomized response mechanism maximizes the KL-divergence between the induced marginals over all ε-locally differentially private mechanisms. 2.3 Lower bounds in differential privacy In this section, we provide converse results on the fundamental limit of differentially private mechanisms. These results follow from our main theorems and are of independent interest in other applications where lower bounds in statistical analysis are studied [3, 21, 6, 9]. For example, a bound similar to (12) was used to provide converse results on the sample complexity for statistical estimation with differentially private data in [10]. Corollary 2.7. For any ε ≥0, let Q be any conditional distribution that guarantees ε-local differential privacy. Then, for any pair of distributions P0 and P1, and any positive δ > 0, there exists a positive ε∗that depends on P0, P1, and δ such that for any ε ≤ε∗, the induced marginals M0 and M1 satisfy the bound Dkl M0||M1  + Dkl M1||M0  ≤ 2(1 + δ)(eε −1)2 (eε + 1) P0 −P1 2 TV . (12) This follows from Theorem 2.3 and the fact that under the binary mechanism, Dkl M0||M1  = P0 −P1 2 TV(eε −1)2/(eε + 1) + O(ε3) . Compared to [10, Theorem 1], we recover their bound of 4(eε −1)2∥P0 −P1∥2 TV with a smaller constant. We want to note that Duchi et al.’s bound holds for all values of ε and uses different techniques. However no achievable mechanism is provided. We instead provide an explicit mechanism that is optimal in high privacy regime. Similarly, in the high privacy regime, we can show the following converse result. Corollary 2.8. For any ε ≥0, let Q be any conditional distribution that guarantees ε-local differential privacy. Then, for any pair of distributions P0 and P1, and any positive δ > 0, there exists a positive ε∗that depends on P0, P1, and δ such that for any ε ≥ε∗, the induced marginals M0 and M1 satisfy the bound Dkl M0||M1  + Dkl M1||M0  ≤ Dkl(P0||P1) −(1 −δ)G(P0, P1)e−ε . where G(P0, P1) = P x∈X (1 −P0(x)) log(P1(x)/P0(x)). This follows directly from Theorem 2.6 and the fact that under the randomized response mechanism, Dkl(M0||M1) = Dkl(P0||P1) −G(P0, P1)e−ε + O(e−2ε) . Similarly for total variation, we can get the following converse result. This follows from Theorem 2.4 and explicitly computing the total variation achieved by the binary mechanism. Corollary 2.9. For any ε ≥0, let Q be any conditional distribution that guarantees ε-local differential privacy. Then, for any pair of distributions P0 and P1, the induced marginals M0 and M1 satisfy the bound M0 −M1 TV ≤((eε −1)/(eε + 1)) P0 −P1 TV , and equality is achieved by the binary mechanism. 2.4 Connections to hypothesis testing Under the data collection scenario, there are n individuals each with data Xi sampled from a distribution Pν for a fixed ν ∈{0, 1}. Let Q be a non-interactive privatization mechanism guaranteeing ε-local differential privacy. The privatized views {Yi}n i=1, are independently distributed according to one of the induced marginals M0 or M1 defined in (2). 7 Given the privatized views {Yi}n i=1, the data analyst wants to test whether they were generated from M0 or M1. Let the null hypothesis be H0 : Yi’s are generated from M0, and the alternative hypothesis H1 : Yi’s are generated from M1. For a choice of rejection region R ⊆Yn, the probability of false alarm (type I error) is α = M n 0 (R) and the probability of miss detection (type II error) is β = M n 1 (Yn \ R). Let βδ = minR⊆Yn,α<α∗β denote the minimum type II error achievable while keeping type I error rate at most α∗. According to Chernoff-Stein lemma, we know that lim n→∞ 1 n log βα∗= −Dkl(M0||M1) . Suppose the analyst knows P0, P1, and Q. Then, in order to achieve optimal asymptotic error rate, one would want to maximize the KL-divergence between the induced marginals over all ε-locally differentially private mechanisms Q. Theorems 2.3 and 2.6 provide an explicit construction of the optimal mechanisms in high and low privacy regimes. Further, our converse results in Section 2.3 provides a fundamental limit on the achievable error rates under differential privacy. Precisely, with data collected from an ε-locally differentially privatization mechanism, one cannot achieve an asymptotic type II error smaller than lim n→∞ 1 n log βα∗≥−(1 + δ)(eε −1)2 (eε + 1) ∥P0 −P1∥2 TV ≥−(1 + δ)(eε −1)2 2(eε + 1) Dkl(P0||P1) , whenever ε ≤ε∗, where ε∗is dictated by Theorem 2.3. In the equation above, the second inequality follows from Pinsker’s inequality. Since (eε −1)2 = O(ε2) for small ε, the effective sample size is now reduced from n to ε2n. This is the price of privacy. In the low privacy regime where ε ≥ε∗, for ε∗dictated by Theorem 2.6, one cannot achieve an asymptotic type II error smaller than lim n→∞ 1 n log βα∗≥−Dkl(P0||P1) + (1 −δ)G(P0, P1)e−ε . 3 Discussion In this paper, we have considered f-divergence utility functions and assumed a setting where individuals cannot collaborate (communicate with each other) before releasing their data. It turns out that the optimality results presented in Section 2 are general and hold for a large class of convex utility function [22]. In addition, the techniques developed in this work can be generalized to find optimal privatization mechanisms in a setting where different individuals can collaborate interactively and each individual can be an analyst [23]. Binary hypothesis testing is a canonical statistical inference problem with a wide range of applications. However, there are a number of nontrivial and interesting extensions to our work. Firstly, in some scenarios the Xi’s could be correlated (e.g., when different individuals observe different functions of the same random variable). In this case, the data analyst is interested in inferring whether the data was generated from P n 0 or P n 1 , where P n ν is one of two possible joint priors on X1, ..., Xn. This is a challenging problem because knowing Xi reveals information about Xj, j ̸= i. Therefore, the utility maximization problems for different individuals are coupled in this setting. Secondly, in some cases the data analyst need not have access to P0 and P1, but rather two classes of prior distribution Pθ0 and Pθ1 for θ0 ∈Λ0 and θ1 ∈Λ1. Such problems are studied under the rubric of universal hypothesis testing and robust hypothesis testing. One possible direction is to select the privatization mechanism that maximizes the worst case utility: Q∗= arg maxQ∈Dε minθ0∈Λ0,θ1∈Λ1 Df(Mθ0||Mθ1), where Mθν is the induced marginal under Pθν. Finally, the more general problem of private m-ary hypothesis testing is also an interesting but challenging one. In this setting, the Xi’s can follow one of m distributions P0, P1, ..., Pm−1, and therefore the Yi’s can follow one of m distributions M0, M1, ..., Mm−1. The utility can be defined as the average f-divergence between any two distributions: 1/(m(m −1)) P i̸=j Df(Mi||Mj), or the worst case one: mini̸=j Df(Mi||Mj). References [1] Alessandro Acquisti. Privacy in electronic commerce and the economics of immediate gratification. In Proceedings of the 5th ACM conference on Electronic commerce, pages 21–29. ACM, 2004. 8 [2] Alessandro Acquisti and Jens Grossklags. What can behavioral economics teach us about privacy. Digital Privacy, page 329, 2007. [3] A. Beimel, K. Nissim, and E. Omri. Distributed private data analysis: Simultaneously solving how and what. In Advances in Cryptology–CRYPTO 2008, pages 451–468. Springer, 2008. [4] D. Blackwell. Equivalent comparisons of experiments. The Annals of Mathematical Statistics, 24(2):265– 272, 1953. [5] J. Blocki, A. Blum, A. Datta, and O. Sheffet. The johnson-lindenstrauss transform itself preserves differential privacy. In Foundations of Computer Science, 2012 IEEE 53rd Annual Symposium on, pages 410–419. IEEE, 2012. [6] K. Chaudhuri and D. Hsu. Convergence rates for differentially private statistical estimation. arXiv preprint arXiv:1206.6395, 2012. [7] K. Chaudhuri and C. Monteleoni. Privacy-preserving logistic regression. In NIPS, volume 8, pages 289–296, 2008. [8] K. Chaudhuri, A. D. Sarwate, and K. Sinha. Near-optimal differentially private principal components. In NIPS, pages 998–1006, 2012. [9] A. De. Lower bounds in differential privacy. In Theory of Cryptography, pages 321–338. Springer, 2012. [10] John C Duchi, Michael I Jordan, and Martin J Wainwright. Local privacy and statistical minimax rates. In Foundations of Computer Science, 2013 IEEE 54th Annual Symposium on, pages 429–438. IEEE, 2013. [11] C. Dwork. Differential privacy. In Automata, languages and programming, pages 1–12. Springer, 2006. [12] C. Dwork and J. Lei. Differential privacy and robust statistics. In Proceedings of the 41st annual ACM symposium on Theory of computing, pages 371–380. ACM, 2009. [13] C. Dwork, F. McSherry, K. Nissim, and A. Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography, pages 265–284. Springer, 2006. [14] Q. Geng and P. Viswanath. The optimal mechanism in differential privacy. arXiv preprint arXiv:1212.1186, 2012. [15] Q. Geng and P. Viswanath. The optimal mechanism in differential privacy: Multidimensional setting. arXiv preprint arXiv:1312.0655, 2013. [16] Q. Geng and P. Viswanath. The optimal mechanism in (ϵ,δ)-differential privacy. arXiv preprint arXiv:1305.1330, 2013. [17] A. Ghosh, T. Roughgarden, and M. Sundararajan. Universally utility-maximizing privacy mechanisms. SIAM Journal on Computing, 41(6):1673–1693, 2012. [18] M. Hardt, K. Ligett, and F. McSherry. A simple and practical algorithm for differentially private data release. In NIPS, pages 2348–2356, 2012. [19] M. Hardt and A. Roth. Beating randomized response on incoherent matrices. In Proceedings of the 44th symposium on Theory of Computing, pages 1255–1268. ACM, 2012. [20] M. Hardt and G. N. Rothblum. A multiplicative weights mechanism for privacy-preserving data analysis. In Foundations of Computer Science, 2010 51st Annual IEEE Symposium on, pages 61–70. IEEE, 2010. [21] M. Hardt and K. Talwar. On the geometry of differential privacy. In Proceedings of the 42nd ACM symposium on Theory of computing, pages 705–714. ACM, 2010. [22] P. Kairouz, S. Oh, and P. Viswanath. Extremal mechanisms for local differential privacy. arXiv preprint arXiv:1407.1338, 2014. [23] P. Kairouz, S. Oh, and P. Viswanath. Optimality of non-interactive randomized response. arXiv preprint arXiv:1407.1546, 2014. [24] M. Kapralov and K. Talwar. On differentially private low rank approximation. In SODA, volume 5, page 1. SIAM, 2013. [25] J. Lei. Differentially private m-estimators. In NIPS, pages 361–369, 2011. [26] F. McSherry and K. Talwar. Mechanism design via differential privacy. In Foundations of Computer Science, 2007. 48th Annual IEEE Symposium on, pages 94–103. IEEE, 2007. [27] S. Oh and P. Viswanath. The composition theorem for differential privacy. arXiv preprint arXiv:1311.0776, 2013. [28] A. B. Tsybakov and V. Zaiats. Introduction to nonparametric estimation, volume 11. Springer, 2009. [29] Stanley L Warner. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63–69, 1965. 9
2014
215
5,309
Optimization Methods for Sparse Pseudo-Likelihood Graphical Model Selection Sang-Yun Oh Computational Research Division Lawrence Berkeley National Lab syoh@lbl.gov Onkar Dalal Stanford University onkar@alumni.stanford.edu Kshitij Khare Department of Statistics University of Florida kdkhare@stat.ufl.edu Bala Rajaratnam Department of Statistics Stanford University brajarat@stanford.edu Abstract Sparse high dimensional graphical model selection is a popular topic in contemporary machine learning. To this end, various useful approaches have been proposed in the context of ℓ1-penalized estimation in the Gaussian framework. Though many of these inverse covariance estimation approaches are demonstrably scalable and have leveraged recent advances in convex optimization, they still depend on the Gaussian functional form. To address this gap, a convex pseudo-likelihood based partial correlation graph estimation method (CONCORD) has been recently proposed. This method uses coordinate-wise minimization of a regression based pseudo-likelihood, and has been shown to have robust model selection properties in comparison with the Gaussian approach. In direct contrast to the parallel work in the Gaussian setting however, this new convex pseudo-likelihood framework has not leveraged the extensive array of methods that have been proposed in the machine learning literature for convex optimization. In this paper, we address this crucial gap by proposing two proximal gradient methods (CONCORDISTA and CONCORD-FISTA) for performing ℓ1-regularized inverse covariance matrix estimation in the pseudo-likelihood framework. We present timing comparisons with coordinate-wise minimization and demonstrate that our approach yields tremendous payoffs for ℓ1-penalized partial correlation graph estimation outside the Gaussian setting, thus yielding the fastest and most scalable approach for such problems. We undertake a theoretical analysis of our approach and rigorously demonstrate convergence, and also derive rates thereof. 1 Introduction Sparse inverse covariance estimation has received tremendous attention in the machine learning, statistics and optimization communities. These sparse models, popularly known as graphical models, have widespread use in various applications, especially in high dimensional settings. The most popular inverse covariance estimation framework is arguably the ℓ1-penalized Gaussian likelihood optimization framework as given by minimize Ω∈Sp ++ −log det Ω+ tr(SΩ) + λ∥Ω∥1 where Sp ++ denotes the space of p-dimensional positive definite matrices, and ℓ1-penalty is imposed on the elements of Ω= (ωij)1≤i≤j≤p by the term ∥Ω∥1 = P i,j |ωij| along with the scaling factor 1 λ > 0. The matrix S denotes the sample covariance matrix of the data Y ∈IRn×p. As the ℓ1penalized log likelihood is convex, the problem becomes more tractable and has benefited from advances in convex optimization. Recent efforts in the literature on Gaussian graphical models therefore have focused on developing principled methods which are increasingly more and more scalable. The literature on this topic is simply enormous and for the sake of brevity, space constraints and the topic of this paper, we avoid an extensive literature review by referring to the references in the seminal work of [1] and the very recent work of [2]. These two papers contain references to recent work, including past NIPS conference proceedings. 1.1 The CONCORD method Despite their tremendous contributions, one shortcoming of the traditional approaches to ℓ1penalized likelihood maximization is the restriction to the Gaussian assumption. To address this gap, a number of ℓ1-penalized pseudo-likelihood approaches have been proposed: SPACE [3] and SPLICE [4], SYMLASSO [5]. These approaches are either not convex, and/or convergence of corresponding maximization algorithms are not established. In this sense, non-Gaussian partial correlation graph estimation methods have lagged severely behind, despite the tremendous need to move beyond the Gaussian framework for obvious practical reasons. In very recent work, a convex pseudo-likelihood approach with good model selection properties called CONCORD [6] was proposed. The CONCORD algorithm minimizes Qcon(Ω) = − p X i=1 n log ωii + 1 2 p X i=1 ∥ωiiYi + X j̸=i ωijYj∥2 2 + nλ X 1≤i<j≤p |ωij| (1) via cyclic coordinate-wise descent that alternates between updating off-diagonal elements and diagonal elements. It is straightforward to show that operators Tij for updating (ωij)1≤i<j≤p (holding (ωii)1≤i≤p constant) and Tii for updating (ωii)1≤i≤p (holding (ωij)1≤i<j≤p constant) are given by (Tij(Ω))ij = Sλ  − P j′̸=j ωij′sjj′ + P i′̸=i ωi′jsii′  sii + sjj (2) (Tii(Ω))ii = −P j̸=i ωijsij + rP j̸=i ωijsij 2 + 4sii 2sii . (3) This coordinate-wise algorithm is shown to converge to a global minima though no rate is given [6]. Note that the equivalent problem assuming a Gaussian likelihood has seen much development in the last ten years, but a parallel development for the recently introduced CONCORD framework is lacking for obvious reasons. We address this important gap by proposing state-of-the-art proximal gradient techniques to minimize Qcon. A rigorous theoretical analysis of the pseudo-likelihood framework and the associated proximal gradient methods which are proposed is undertaken. We establish rates of convergence and also demonstrate that our approach can lead to massive computational speed-ups, thus yielding extremely fast and principled solvers for the sparse inverse covariance estimation problem outside the Gaussian setting. 2 CONCORD using proximal gradient methods The penalized matrix version the CONCORD objective function in (1) is given by Qcon(Ω) = n 2  −log |Ω2 D| + tr(SΩ2) + λ∥ΩX∥1  . (4) where ΩD and ΩX denote the diagonal and off-diagonal elements of Ω. We will use the notation A = AD + AX to split any matrix A into its diagonal and off-diagonal terms. This section proposes a scalable and thorough approach to solving the CONCORD objective function using recent advances in convex optimization and derives rates of convergence for such algorithms. In particular, we use proximal gradient-based methods to achieve this goal and demonstrate the efficacy of such methods for the non-Gaussian graphical modeling problem. First, we propose CONCORD-ISTA and CONCORD-FISTA in section 2.1: methods which are inspired by the iterative soft-thresholding algorithms in [7]. We undertake a comprehensive treatment of the CONCORD 2 optimization problem by also investigating the dual of the CONCORD problem. Other popular methods in the literature, including the potential use of alternating minimization algorithm and the second order proximal Newtons method are considered in Supplemental section A.8. 2.1 Iterative Soft Thresholding Algorithms: CONCORD-ISTA, CONCORD-FISTA The iterative soft-thresholding algorithms (ISTA) have recently gained popularity after the seminal paper by Beck and Teboulle [7]. The ISTA methods are based on the Forward-Backward Splitting method from [8] and Nesterov’s accelerated gradient methods [9] using soft-thresholding as the proximal operator for the ℓ1-norm. The essence of the proximal gradient algorithms is to divide the objective function into a smooth part and a non-smooth part, then take a proximal step (w.r.t. the non-smooth part) in the negative gradient direction of the smooth part. Nesterov’s accelerated gradient extension [9] uses a combination of gradient and momentum steps to achieve accelerated rates of convergence. In this section, we apply these methods in the context of CONCORD which also has a composite objective function. The matrix CONCORD objective function (4) can be split into a smooth part h1(Ω) and a nonsmooth part h2(Ω): h1(Ω) = −log det ΩD + 1 2 tr(ΩSΩ), h2(Ω) = λ∥ΩX∥1. (5) The gradient and hessian of the smooth function h1 are given by ∇h1(Ω) = ΩD −1 + 1 2 SΩT + ΩS  , ∇2h1(Ω) = i=p X i=1 ω−2 ii  eiei T ⊗eiei T  + 1 2 (S ⊗I + I ⊗S) , (6) where ei is a column vector of zeros except for a one in the i-th position. The proximal operator for h2 is given by element-wise soft-thresholding operator Sλ as proxh2(Ω) = arg min Θ  h2(Θ) + 1 2∥Ω−Θ∥2 F  = SΛ(Ω) = sign(Ω) max{|Ω| −Λ, 0}, (7) where Λ is a matrix with 0 diagonal and λ for each off-diagonal entry. The details of the proximal gradient algorithm CONCORD-ISTA are given in Algorithm 1, and the details of the accelerated proximal gradient algorithm CONCORD-FISTA are given in Algorithm 2. 2.2 Choice of step size In the absence of a good estimate of the Lipschitz constant L, the step size for each iteration of CONCORD-ISTA and CONCORD-FISTA is chosen using backtracking line search. The line search for iteration k starts with an initial step size τ(k,0) and reduces the step with a constant factor c until the new iterate satisfies the sufficient descent condition: h1(Ω(k+1)) ≤Q(Ω(k+1), Ω(k)) (8) where, Q(Ω, Θ) = h1(Θ) + tr (Ω−Θ)T ∇h1(Θ)  + 1 2τ Ω−Θ 2 F . In section 4, we have implemented algorithms choosing the initial step size in three different ways: (a) a constant starting step size (=1), (b) the feasible step size from the previous iteration τk−1, (c) the step size heuristic of Barzilai-Borwein. The Barzilai-Borwein heuristic step size is given by τk+1,0 = tr (Ω(k+1) −Ω(k))T (Ω(k+1) −Ω(k))  tr (Ω(k+1) −Ω(k))T (G(k+1) −G(k)) . (9) This is an approximation of the secant equation which works as a proxy for second order information using successive gradients (see [10] for details). 3 Algorithm 1 CONCORD-ISTA Input: sample covariance matrix S, penalty Λ Set: Ω(0) ∈Sp +, τ(0,0) ≤1, c < 1, ∆subg = 1 while ∆subg > ϵsubg do G(k) = −  Ω(k) D −1 + 1 2 S Ω(k) + Ω(k)S  Take largest τk ∈{cjτ(k,0)}j=0,1,... s.t. Ω(k+1) = SτkΛ  Ω(k) −τkG(k) ⊢(8). Compute: τ(k+1,0) Compute: ∆subg1 end while 1: ∆subg = ∥∇h1(Ω(k)) + ∂h2(Ω(k))∥ ∥Ω(k)∥ Algorithm 2 CONCORD-FISTA Input: sample covariance matrix S, penalty Λ Set: (Θ(1) =)Ω(0) ∈Sp +, α1 = 1, τ(0,0) ≤1, c < 1, ∆subg = 1. while ∆subg > ϵsubg do G(k) = −  Θ(k) D −1 + 1 2 SΘ(k) + Θ(k)S  Take largest τk ∈{cjτ(k,0)}j=0,1,... s.t. Ω(k) = SτkΛ  Θ(k) −τkG(k) ⊢(8) αk+1 = (1 + p 1 + 4αk2)/2 Θ(k+1) = Ω(k) +  αk−1 αk+1  Ω(k) −Ω(k−1) Compute: τ(k+1,0) Compute: ∆subg1 end while 2.3 Computational complexity After the one time calculation of S, the most significant computation for each iteration in CONCORD-ISTA and CONCORD-FISTA algorithms is the matrix-matrix multiplication W = SΩ in the gradient term. If s is the number of non-zeros in Ω, then W can be computed using O(sp2) operations if we exploit the extreme sparsity in Ω. The second matrix-matrix multiplication for the term tr(Ω(SΩ)) can be computed efficiently using tr(ΩW) = P ωijwij over the set of non-zero ωij’s. This computation only requires O(s) operations. The remaining computations are all at the element level which can be completed in O(p2) operations. Therefore, the overall computational complexity for each iteration reduces to O(sp2). On the other hand, the proximal gradient algorithms for the Gaussian framework require inversion of a full p × p matrix which is non-parallelizable and requires O(p3) operations. The coordinate-wise method for optimizing CONCORD in [6] also requires cycling through the p2 entries of Ωin specified order and thus does not allow parallelization. In contrast, CONCORD-ISTA and CONCORD-FISTA can use ‘perfectly parallel’ implementations to distribute the above matrix-matrix multiplications. At no step do we need to keep all of the dense matrices S, SΩ, ∇h1 on a single machine. Therefore, CONCORD-ISTA and CONCORD-FISTA are scalable to any high dimensions restricted only by the number of machines. 3 Convergence Analysis In this section, we prove convergence of CONCORD-ISTA and CONCORD-FISTA methods along with their respective convergence rates of O(1/k) and O(1/k2). We would like to point out that, although the authors in [6] provide a proof of convergence for their coordinate-wise minimization algorithm for CONCORD, they do not provide any rates of convergence. The arguments for convergence leverage the results in [7] but require some essential ingredients. We begin with proving lower and upper bounds on the diagonal entries ωkk for Ωbelonging to a level set of Qcon(Ω). The lower bound on the diagonal entries of Ωestablishes Lipschitz continuity of the gradient ∇h1(Ω) based on the hessian of the smooth function as stated in (6). The proof for the lower bound uses the existence of an upper bound on the diagonal entries. Hence, we prove both bounds on the diagonal entries. We begin by defining a level set C0 of the objective function starting with an arbitrary initial point Ω(0) with a finite function value as C0 = n Ω| Qcon(Ω) ≤Qcon(Ω(0)) = M o . (10) For the positive semidefinite matrix S, let U denote 1 √ 2 times the upper triangular matrix from the LU decomposition of S, such that S = 2U T U (the factor 2 simplifies further arithmetic). Assuming 4 the diagonal entries of S to be strictly nonzero (if skk = 0, then the kth component can be ignored upfront since it has zero variance and is equal to a constant for every data point), we have at least one k such that uki ̸= 0 for every i. Using this, we prove the following theorem. Theorem 3.1. For any symmetric matrix Ωsatisfying Ω∈C0, the diagonal elements of Ωare bounded above and below by constants which depend only on M, λ and S. In other words, 0 < a ≤|ωkk| ≤b, ∀k = 1, 2, . . . , p, for some constants a and b. (((removed subscripts for a and b))) Proof. (a) Upper bound: Suppose |ωii| = max{|ωkk|, for k = 1, 2, . . . , p}. Then, we have M = Qcon(Ω(0)) ≥Qcon(Ω) = h1(Ω) + h2(Ω) ≥−log det ΩD + tr (UΩ)T (UΩ)  + λ∥ΩX∥1 = −log det ΩD + ∥UΩ∥2 F + λ∥ΩX∥1. (11) Considering kith entry in the Frobenious norm and the ith column in the third term we get M ≥−p log |ωii| +   j=p X j=k ukjωji   2 + λ j=p X j=k,j̸=i |ωji|. (12) Now, suppose |ukiωii| = z and Pj=p j=k,j̸=i ukjωji = x. Then |x| ≤ j=p X j=k,j̸=i |ukj||ωji| ≤¯u j=p X j=k,j̸=i |ωji|, where ¯u = max{|ukj|}, for j = k, . . . , p, j ̸= i. Substituting in (12), for ¯λ = λ 2¯u, we have ¯ M = M + ¯λ2 −p log |uki| ≥−p log z + (z + x)2 + 2¯λ|x| + ¯λ2 (13) = −p log z + z + x + ¯λsign(x) 2 −2¯λz sign(x) (14) Here, if x ≥0, then ¯ M ≥−p log z + z2 using the first inequality (13), and if x < 0, then ¯ M ≥ −p log z + 2¯λz using the second inequality (14). In either cases, the functions −p log z + z2 and −p log z + 2¯λz are unbounded as z →∞. Hence, the upper bound of ¯ M on these functions guarantee an upper bound b such that |ωii| ≤b. Therefore, |ωkk| ≤b for all k = 1, 2, . . . , p. (b) Lower bound: By positivity of the trace term and the ℓ1 term (for off-diagonals), we have M ≥−log det ΩD = i=p X i=1 −log |ωii|. (15) The negative log function g(z) = −log(z) is a convex function with a lower bound at z∗= b with g(z∗) = −log b. Therefore, for any k = 1, 2, . . . , p, we have M ≥ i=p X i=1 −log |ωii| ≥−(p −1) log b −log |ωkk|. (16) Simplifying the above equation, we get log |ωkk| ≥−M −(p −1) log b. Therefore, |ωkk| ≥a = e−M−(p−1) log b > 0 serves as a lower bound for all k = 1, 2, . . . , p. Given that the function values are non-increasing along the iterates of Algorithms 1, 2 and 3, the sequence of Ω(k) satisfy Ω(k) ∈C0 for k = 1, 2, ..... The lower bounds on the diagonal elements of Ω(k) provides the Lipschitz continuity using ∇2h1(Ω(k)) ⪯ a−2 + ∥S∥2  (I ⊗I) . (17) Therefore, using the mean-value theorem, the gradient ∇h1 satisfies ∥∇h1(Ω) −∇h1(Θ)∥F ≤L∥Ω−Θ∥F , (18) with the Lipschitz continuity constant L = a−2 + ∥S∥2. The remaining argument for convergence follows from the theorems in [7]. 5 Theorem 3.2. ([7, Theorem 3.1]). Let {Ω(k)} be the sequence generated by either Algorithm 1 with constant step size or with backtracking line-search. Then, for the solution Ω∗, for any k ≥1, Qcon(Ω(k)) −Qcon(Ω∗) ≤αL∥Ω(0) −Ω∗∥2 F 2k , (19) where α = 1 for the constant step size setting and α = c for the backtracking step size setting. Theorem 3.3. ([7, Theorem 4.4]). Let {Ω(k)}, {Θ(k)} be the sequences generated by Algorithm 2 with either constant step size or backtracking line-search. Then, for the solution Ω∗, for any k ≥1, Qcon(Ω(k)) −Qcon(Ω∗) ≤2αL∥Ω(0) −Ω∗∥2 F (k + 1)2 , (20) where α = 1 for the constant step size setting and α = c for the backtracking step size setting. Hence, CONCORD-ISTA and CONCORD-FISTA converge at the rates of O(1/k) and O(1/k2) for the kth iteration. 4 Implementation & Numerical Experiments In this section, we outline algorithm implementation details and present results of our comprehensive numerical evaluation. Section 4.1 gives performance comparisons from using synthetic multivariate Gaussian datasets. These datasets are generated from a wide range of sample sizes (n) and dimensionality (p). Additionally, convergence of CONCORD-ISTA and CONCORD-FISTA will be illustrated. Section 4.2 has timing results from analyzing a real breast cancer dataset with outliers. Comparisons are made to the coordinate-wise CONCORD implementation in gconcord package for R available at http://cran.r-project.org/web/packages/gconcord/. For implementing the proposed algorithms, we can take advantage of existing linear algebra libraries. Most of the numerical computations in Algorithms 1 and 2 are linear algebra operations, and, unlike the sequential coordinate-wise CONCORD algorithm, CONCORD-ISTA and CONCORD-FISTA implementations can solve increasingly larger problems as more and more scalable and efficient linear algebra libraries are made available. For this work, we opted to using Eigen library [11] for its sparse linear algebra routines written in C++. Algorithms 1 and 2 were also written in C++ then interfaced to R for testing. Table 1 gives names for various CONCORD-ISTA and CONCORD-FISTA versions using different initial step size choices. 4.1 Synthetic Datasets Synthetic datasets were generated from true sparse positive random Ωmatrices of three sizes: p = {1000, 3000, 5000}. Instances of random matrices used here consist of 4995, 14985 and 24975 non-zeros, corresponding to 1%, 0.33% and 0.20% edge densities, respectively. For each p, Gaussian and t-distributed datasets of sizes n = {0.25p, 0.75p, 1.25p} were used as inputs. The initial guess, Ω(0), and the convergence criteria was matched to those of coordinate-wise CONCORD implementation. Highlights of the results are summarized below, and the complete set of comparisons are given in Supplementary materials Section A. For normally distributed synthetic datasets, our experiments indicate that two variations of the CONCORD-ISTA method show little performance difference. However, ccista 0 was marginally faster in our tests. On the other hand, ccfista 1 variation of CONCORD-FISTA that uses τ(k+1,0) = τk as initial step size was significantly faster than ccfista 0. Table 2 gives actual running times for the two best performing algorithms, ccista 0 and ccfista 1, against the coordinate-wise concord. As p and n increase ccista 0 performs very well. For smaller n and λ, coordinate-wise concord performs well (more in Supplemental section A). This can be attributed to min(O(np2), O(p3)) computational complexity of coordinate-wise CONCORD [6], and the sparse linear algebra routines used in CONCORD-ISTA and CONCORD-FISTA implementations slowing down as the number of non-zero elements in Ωincreases. On the other hand, for large n fraction (n = 1.25p), the proposed methods ccista 0 and ccfista 1 are significantly faster than coordinate-wise concord. In particular, when p = 5000 and n = 6250, the speed-up of ccista 0 can be as much as 150 times over coordinate-wise concord. Also, for t-distributed synthetic datasets, ccista 0 is generally fastest, especially when n and p are both large. 6 ccista_0 ccfista_1 G G G G G GGG GG GG GG GG GG GG GG GG G G G G G G GGGGGG G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 1e−01 1e−02 1e−03 1e−04 1e−05 0 20 40 0 20 40 iter ∆subg method G G ccista_0 ccfista_1 lambda G 0.05 0.1 0.2 0.4 0.5 ccista_0 ccfista_1 G G G G G GGG GG GG GG GG GG GG GG GG G G G G G G GGGGGG G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 1e−01 1e−02 1e−03 1e−04 1e−05 0 20 40 0 20 40 iter ∆subg method G G ccista_0 ccfista_1 lambda G 0.05 0.1 0.2 0.4 0.5 ccista_0 ccfista_1 G G G G G GGG GG GG GG GG GG GG GG GG G G G G G G GGGGGG G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 1e−01 1e−02 1e−03 1e−04 1e−05 0 20 40 0 20 40 iter ∆subg method G G ccista_0 ccfista_1 lambda G 0.05 0.1 0.2 0.4 0.5 Figure 1: Convergence of CONCORD-ISTA and CONCORD-FISTA for threshold ∆subg < 10−5 When a good initial guess Ω(0) is available, warm-starting cc ista 0 and cc fista 0 algorithms substantially shortens the running times. Simulations with Gaussian datasets indicate the running times can be shortened by, on average, as much as 60%. Complete simulation results are given in the Supplemental Section A.6. Convergence behavior of CONCORD-ISTA and CONCORD-FISTA methods is shown in Figure 1. The best performing algorithms ccista 0 and ccfista 1 are shown. The vertical axis is the subgradient ∆subg (See Algorithms 1, 2). Plots show that ccista 0 seems to converge at a constant rate much faster than ccfista 1 that appears to slow down after a few initial iterations. While the theoretical convergence results from section 3 prove convergence rates of O(1/k) and O(1/k2) for CONCORD-ISTA and CONCORD-FISTA, in practice, ccista 0 with constant step size performed the fastest for the tests in this section. 4.2 Real Data Real datasets arising from various physical and biological sciences often are not multivariate Gaussian and can have outliers. Hence, convergence characteristic may be different on such datasets. In this section, the performance of proposed methods are assessed on a breast cancer dataset [12]. This dataset contains expression levels of 24481 genes on 266 patients with breast cancer. Following the approach in Khare et al. [6], the number of genes are reduced by utilizing clinical information that is provided together with the microarray expression dataset. In particular, survival analysis via univariate Cox regression with patient survival times is used to select a subset of genes closely associated with breast cancer. A choice of p-value < 0.03 yields a reduced dataset with p = 4433 genes. Often times, graphical model selection algorithms are applied in a non-Gaussian and n ≪p setting such as the case here. In this n ≪p setting, coordinate-wise CONCORD algorithm is especially fast due to its computational complexity O(np2). However, even in this setting, the newly proposed methods ccista 0, ccista 1, and ccfista 1 perform competitively to, or often better than, concord as illustrated in Table 3. On this real dataset, ccista 1 performed the fastest whereas ccista 0 was the fastest on synthetic datasets. 5 Conclusion The Gaussian graphical model estimation or inverse covariance estimation has seen tremendous advances in the past few years. In this paper we propose using proximal gradient methods to solve the general non-Gaussian sparse inverse covariance estimation problem. Rates of convergence were established for the CONCORD-ISTA and CONCORD-FISTA algorithms. Coordinate-wise minimization has been the standard approach to this problem thus far, and we provide numerical results comparing CONCORD-ISTA/FISTA and coordinate-wise minimization. We demonstrate that CONCORD-ISTA outperforms coordinate-wise in general, and in high dimensional settings CONCORD-ISTA can outperform coordinate-wise optimization by orders of magnitude. The methodology is also tested on real data sets. We undertake a comprehensive treatment of the problem by also examining the dual formulation and consider methods to maximize the dual objective. We note that efforts similar to ours for the Gaussian case has appeared in not one, but several NIPS and other publications. Our approach on the other hand gives a complete and thorough treatment of the non-Gaussian partial correlation graph estimation problem, all in this one self-contained paper. 7 Table 1: Naming convention for step size variations Variation concord ccista 0 ccista 1 ccfista 0 ccfista 1 Method Coordinatewise ISTA ISTA FISTA FISTA Initial step Constant Barzilai-Borwein Constant τk Table 2: Timing comparison of concord and proposed methods: ccista 0 and ccfista 1. p n λ NZ% concord ccista 0 ccfista 1 iter seconds iter seconds iter seconds 1000 250 0.150 1.52 9 3.2 13 1.8 20 3.3 0.163 0.99 9 2.6 18 2.0 26 3.3 0.300 0.05 9 2.6 15 1.2 23 2.7 750 0.090 1.50 9 8.9 11 1.4 17 2.5 0.103 0.76 9 8.4 15 1.6 24 3.3 0.163 0.23 9 8.0 15 1.6 24 2.8 1250 0.071 1.41 9 41.3 10 1.4 17 2.9 0.077 0.97 9 40.5 15 1.7 24 3.3 0.163 0.23 9 43.8 13 1.2 23 2.8 3000 750 0.090 1.10 17 147.4 20 32.4 25 53.2 0.103 0.47 17 182.4 28 36.0 35 60.1 0.163 0.08 16 160.1 28 28.3 26 39.9 2250 0.053 1.07 16 388.3 17 28.5 17 39.6 0.059 0.56 16 435.0 28 38.5 26 61.9 0.090 0.16 16 379.4 16 19.9 15 23.6 3750 0.040 1.28 16 2854.2 17 33.0 17 47.3 0.053 0.28 16 2921.5 15 23.5 16 31.4 0.163 0.07 15 2780.5 25 35.1 32 56.1 5000 1250 0.066 1.42 17 832.7 32 193.9 37 379.2 0.077 0.53 17 674.7 30 121.4 35 265.8 0.103 0.10 17 667.6 27 81.2 33 163.0 3750 0.039 1.36 17 2102.8 18 113.0 17 176.3 0.049 0.31 17 1826.6 16 73.4 17 107.4 0.077 0.10 17 2094.7 29 95.8 33 178.1 6250 0.039 0.27 17 15629.3 17 93.9 17 130.0 0.077 0.10 17 15671.1 27 101.0 25 123.9 0.163 0.04 16 14787.8 26 97.3 34 173.7 Table 3: Running time comparison on breast cancer dataset λ NZ% concord ccista 0 ccista 1 ccfista 0 ccfista 1 iter sec iter sec iter sec iter sec iter sec 0.450 0.110 80 724.5 132 686.7 123 504.0 250 10870.3 201 672.6 0.451 0.109 80 664.2 129 669.2 112 457.0 216 7867.2 199 662.9 0.454 0.106 80 690.3 130 686.2 81 352.9 213 7704.2 198 677.8 0.462 0.101 79 671.6 125 640.4 109 447.1 214 7978.4 196 646.3 0.478 0.088 77 663.3 117 558.6 87 337.9 202 6913.1 197 609.0 0.515 0.063 63 600.6 104 466.0 75 282.4 276 9706.9 184 542.0 0.602 0.027 46 383.5 80 308.0 66 229.7 172 4685.2 152 409.1 0.800 0.002 24 193.6 45 133.8 32 92.2 74 1077.2 70 169.8 Acknowledgments: S.O., O.D. and B.R. were supported in part by the National Science Foundation under grants DMS-0906392, DMS-CMG 1025465, AGS-1003823, DMS-1106642, DMS CAREER-1352656 and grants DARPA-YFAN66001-111-4131 and SMC-DBNKY. K.K was partially supported by NSF grant DMS-1106084. S.O. was supported also in part by the Laboratory Directed Research and Development Program of Lawrence Berkeley National Laboratory under U.S. Department of Energy Contract No. DE-AC02-05CH11231. 8 References [1] Onureena Banerjee, Laurent El Ghaoui, and Alexandre DAspremont. Model Selection Through Sparse Maximum Likelihood Estimation for Multivariate Gaussian or Binary Data. JMLR, 9:485–516, 2008. [2] Onkar Anant Dalal and Bala Rajaratnam. G-ama: Sparse gaussian graphical model estimation via alternating minimization. arXiv preprint arXiv:1405.3034, 2014. [3] Jie Peng, Pei Wang, Nengfeng Zhou, and Ji Zhu. Partial Correlation Estimation by Joint Sparse Regression Models. Journal of the American Statistical Association, 104(486):735–746, June 2009. [4] Guilherme V Rocha, Peng Zhao, and Bin Yu. A path following algorithm for Sparse PseudoLikelihood Inverse Covariance Estimation (SPLICE). Technical Report 60628102, 2008. [5] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Applications of the lasso and grouped lasso to the estimation of sparse graphical models. Technical report, 2010. [6] Kshitij Khare, Sang-Yun Oh, and Bala Rajaratnam. A convex pseudo-likelihood framework for high dimensional partial correlation estimation with convergence guarantees. Journal of the Royal Statistical Society: Series B (to appear), 2014. [7] Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [8] R.T. Rockafellar. Monotone operators and the proximal point algorithm. SIAM Journal on Control and Optimization, 14(5):877–898, 1976. [9] Yurii Nesterov. A method of solving a convex programming problem with convergence rate O(1/k2). In Soviet Mathematics Doklady, volume 27, pages 372–376, 1983. [10] J. Barzilai and J.M. Borwein. Two-point step size gradient methods. IMA Journal of Numerical Analysis, 8(1):141–148, 1988. [11] Ga¨el Guennebaud, Benoˆıt Jacob, et al. Eigen v3. http://eigen.tuxfamily.org, 2010. [12] Howard Y Chang, Dimitry S A Nuyten, Julie B Sneddon, Trevor Hastie, Robert Tibshirani, Therese Sø rlie, Hongyue Dai, Yudong D He, Laura J van’t Veer, Harry Bartelink, Matt van de Rijn, Patrick O Brown, and Marc J van de Vijver. Robustness, scalability, and integration of a wound-response gene expression signature in predicting breast cancer survival. Proceedings of the National Academy of Sciences of the United States of America, 102(10):3738–43, March 2005. 9
2014
216
5,310
Unsupervised Deep Haar Scattering on Graphs Xu Chen1,2, Xiuyuan Cheng2, and St´ephane Mallat2 1Department of Electrical Engineering, Princeton University, NJ, USA 2D´epartement d’Informatique, ´Ecole Normale Sup´erieure, Paris, France Abstract The classification of high-dimensional data defined on graphs is particularly difficult when the graph geometry is unknown. We introduce a Haar scattering transform on graphs, which computes invariant signal descriptors. It is implemented with a deep cascade of additions, subtractions and absolute values, which iteratively compute orthogonal Haar wavelet transforms. Multiscale neighborhoods of unknown graphs are estimated by minimizing an average total variation, with a pair matching algorithm of polynomial complexity. Supervised classification with dimension reduction is tested on data bases of scrambled images, and for signals sampled on unknown irregular grids on a sphere. 1 Introduction The geometric structure of a data domain can be described with a graph [11], where neighbor data points are represented by vertices related by an edge. For sensor networks, this connectivity depends upon the sensor physical locations, but in social networks it may correspond to strong interactions or similarities between two nodes. In many applications, the connectivity graph is unknown and must therefore be estimated from data. We introduce an unsupervised learning algorithm to classify signals defined on an unknown graph. An important source of variability on graphs results from displacement of signal values. It may be due to movements of physical sources in a sensor network, or to propagation phenomena in social networks. Classification problems are often invariant to such displacements. Image pattern recognition or characterization of communities in social networks are examples of invariant problems. They require to compute locally or globally invariant descriptors, which are sufficiently rich to discriminate complex signal classes. Section 2 introduces a Haar scattering transform which builds an invariant representation of graph data, by cascading additions, subtractions and absolute values in a deep network. It can be factorized as a product of Haar wavelet transforms on the graph. Haar wavelet transforms are flexible representations which characterize multiscale signal patterns on graphs [6, 10, 11]. Haar scattering transforms are extensions on graphs of wavelet scattering transforms, previously introduced for uniformly sampled signals [1]. For unstructured signals defined on an unknown graph, recovering the full graph geometry is an NP complete problem. We avoid this complexity by only learning connected multiresolution graph approximations. This is sufficient to compute Haar scattering representations. Multiscale neighborhoods are calculated by minimizing an average total signal variation over training examples. It involves a pair matching algorithm of polynomial complexity. We show that this unsupervised learning algorithms computes sparse scattering representations. This work was supported by the ERC grant InvariantClass 320959. 1 x S1x S2x S3x v Figure 1: A Haar scattering network computes each coefficient of a layer Sj+1x by adding or subtracting a pair of coefficients in the previous layer Sjx. For classification, the dimension of unsupervised Haar scattering representations are reduced with supervised partial least square regressions [12]. It amounts to computing a last layer of reduced dimensionality, before applying a Gaussian kernel SVM classifier. The performance of a Haar scattering classification is tested on scrambled images, whose graph geometry is unknown. Results are provided for MNIST and CIFAR-10 image data bases. Classification experiments are also performed on scrambled signals whose samples are on an irregular grid of a sphere. All computations can be reproduced with a software available at www.di.ens.fr/data/scattering/haar. 2 Orthogonal Haar Scattering on a Graph 2.1 Deep Networks of Permutation Invariant Operators We consider signals x defined on an unweighted graph G = (V, E), with V = {1, ..., d}. Edges relate neighbor vertices. We suppose that d is a power of 2 to simplify explanations. A Haar scattering is calculated by iteratively applying the following permutation invariant operator (α, β) −→(α + β, |α −β|) . (1) Its values are not modified by a permutation of α and β, and both values are recovered by max(α, β) = 1 2 α + β + |α −β|  and min(α, β) = 1 2 α + β −|α −β|  . (2) An orthogonal Haar scattering transform computes progressively more invariant signal descriptors by applying this invariant operator at multiple scales. This is implemented along a deep network illustrated in Figure 1. The network layer j is a two-dimensional array Sjx(n, q) of d = 2−jd × 2j coefficients, where n is a node index and q is a feature type. The input network layer is S0x(n, 0) = x(n). We compute Sj+1x by regrouping the 2−jd nodes of Sjx in 2−j−1d pairs (an, bn), and applying the permutation invariant operator (1) to each pair (Sjx(an, q), Sjx(bn, q)): Sj+1x(n, 2q) = Sjx(an, q) + Sjx(bn, q) (3) and Sj+1x(n, 2q + 1) = |Sjx(an, q) −Sjx(bn, q)| . (4) This transform is iterated up to a maximum depth J ≤log2(d). It computes SJx with Jd/2 additions, subtractions and absolute values. Since Sjx ≥0 for j > 0, one can put an absolute value on the sum in (3) without changing Sj+1x. It results that Sj+1x is calculated from the previous layer Sjx by applying a linear operator followed by a non-linearity as in most deep neural network architectures. In our case this non-linearity is an absolute value as opposed to rectifiers used in most deep networks [4]. For each n, the 2j scattering coefficients {Sjx(n, q)}0≤q<2j are calculated from the values of x in a vertex set Vj,n of size 2j. One can verify by induction on (3) and (4) that V0,n = {n} for 0 ≤n < d, and for any j ≥0 Vj+1,n = Vj,an ∪Vj,bn . (5) 2 V1,n V2,n V3,n (a) V1,n V2,n V3,n (b) Figure 2: A connected multiresolution is a partition of vertices with embedded connected sets Vj,n of size 2j. (a): Example of partition for the graph of a square image grid, for 1 ≤j ≤3. (b): Example on an irregular graph. The embedded subsets {Vj,n}j,n form a multiresolution approximation of the vertex set V . At each scale 2j, different pairings (an, bn) define different multiresolution approximations. A small graph displacement propagates signal values from a node to its neighbors. To build nearly invariant representations over such displacements, a Haar scattering transform must regroup connected vertices. It is thus computed over multiresolution vertex sets Vj,n which are connected in the graph G. It results from (5) that a necessary and sufficient condition is that each pair (an, bn) regroups two connected sets Vj,an and Vj,bn. Figure 2 shows two examples of connected multiresolution approximations. Figure 2(a) illustrates the graph of an image grid, where pixels are connected to 8 neighbors. In this example, each Vj+1,n regroups two subsets Vj,an and Vj,bn which are connected horizontally if j is even and connected vertically if j is odd. Figure 2(b) illustrates a second example of connected multiresolution approximation on an irregular graph. There are many different connected multiresolution approximations resulting from different pairings at each scale 2j. Different multiresolution approximations correspond to different Haar scattering transforms. In the following, we compute several Haar scattering transforms of a signal x, by defining different multiresolution approximations. The following theorem proves that a Haar scattering preserves the norm and that it is contractive up to a normalization factor 2j/2. The contraction is due to the absolute value which suppresses the sign and hence reduces the amplitude of differences. The proof is in Appendix A. Theorem 2.1. For any j ≥0, and any x, x′ defined on V ∥Sjx −Sjx′∥≤2j/2∥x −x′∥, and ∥Sjx∥= 2j/2∥x∥. 2.2 Iterated Haar Wavelet Transforms We show that a Haar scattering transform can be written as a cascade of orthogonal Haar wavelet transforms and absolute value non-linearities. It is a particular example of scattering transforms introduced in [1]. It computes coefficients measuring signal variations at multiple scales and multiple orders. We prove that the signal can be recovered from Haar scattering coefficients computed over enough multiresolution approximations. A scattering operator is contractive because of the absolute value. When coefficients have an arbitrary sign, suppressing the sign reduces by a factor 2 the volume of the signal space. We say that SJx(n, q) is a coefficient of order m if its computation includes m absolute values of differences. The amplitude of scattering coefficients typically decreases exponentially when the scattering order m increases, because of the contraction produced by the absolute value. We verify from (3) and (4) 3 that SJx(n, q) is a coefficient of order m = 0 if q = 0 and of order m > 0 if q = m X k=1 2J−jk for 0 ≤jk < jk+1 ≤J . It results that there are J m  2−Jd coefficients SJx(n, q) of order m. We now show that Haar scattering coefficients of order m are obtained by cascading m orthogonal Haar wavelet tranforms defined on the graph G. A Haar wavelet at a scale 2J is defined over each Vj,n = Vj−1,an ∪Vj−1,bn by ψj,n = 1Vj−1,an −1Vj−1,bn . For any J ≥0, one can verify [10, 6] that {1VJ,n}0≤n<2−Jd ∪{ψj,n}0≤n<2−jd,0≤j<J is a non-normalized orthogonal Haar basis of the space of signals defined on V . Let us denote ⟨x, x′⟩= P v∈V x(v) x′(v). Order m = 0 scattering coefficients sum the values of x in each VJ,n SJx(n, 0) = ⟨x , 1VJ,n⟩. Order m = 1 scattering coefficients are sums of absolute values of orthogonal Haar wavelet coefficients. They measure the variation amplitude x at each scale 2j, in each VJ,n: SJx(n, 2J−j1) = X p Vj1,p⊂VJ,n |⟨x , ψj1,p⟩|. Appendix B proves that second order scattering coefficients SJx(n, 2J−j1 + 2J−j2) are computed by applying a second orthogonal Haar wavelet transform to first order scattering coefficients. A coefficient SJx(n, 2J−j1 +2J−j2) is an averaged second order increment over VJ,n, calculated from the variations at the scale 2j2, of the increments of x at the scale 2j1. More generally, Appendix B also proves that order m coefficients measure multiscale variations of x at the order m, and are obtained by applying a Haar wavelet transform on scattering coefficients of order m −1. A single Haar scattering transform loses information since it applies a cascade of permutation invariant operators. However, the following theorem proves that x can be recovered from scattering transforms computed over 2J different multiresolution approximations. Theorem 2.2. There exist 2J multiresolution approximations such that almost all x ∈Rd can be reconstructed from their scattering coefficients on these multiresolution approximations. This theorem is proved in Appendix C. The key idea is that Haar scattering transforms are computed with permutation invariants operators. Inverting these operators allows to recover values of signal pairs but not their locations. However, recombining these values on enough overlapping sets allows one to recover their locations and hence the original signal x. This is done with multiresolutions which are interlaced at each scale 2j, in the sense that if a multiresolution is pairing (an, bn) and (a′ n, b′ n) then another multiresolution approximation is pairing (a′ n, bn). Connectivity conditions are needed on the graph G to guarantee the existence of “interlaced” multiresolution approximations which are all connected. 3 Learning 3.1 Sparse Unsupervised Learning of Multiscale Connectivity Haar scattering transforms compute multiscale signal variations of multiple orders, over nonoverlapping sets of size 2J. To build signal descriptors which are nearly invariant to signal displacements on the graph, we want to compute scattering transforms over connected sets in the graph, which a priori requires to know the graph connectivity. However, in many applications, the graph connectivity is unknown. For piecewise regular signals, the graph connectivity implies some form of correlation between neighbor signal values, and may thus be estimated from a training set of unlabeled examples {xi}i [7]. 4 Instead of estimating the full graph geometry, which is an NP complete problem, we estimate multiresolution approximations which are connected. This is a hierarchical clustering problem [19]. A multiresolution approximation is connected if at each scale 2j, each pair (an, bn) regroups two vertex sets (Vj,an, Vj,bn) which are connected. This connection is estimated by minimizing the total variation within each set Vj,n, which are clusters of size 2j [19]. It is done with a fine to coarse aggregation strategy. Given {Vj,n}0≤n<2−jd, we compute Vj+1,n at the next scale, by finding an optimal pairing {an, bn}n which minimizes the total variation of scattering vectors, averaged over the training set {xi}i: 2−j−1d X n=0 2j−1 X q=0 X i |Sjxi(an, q) −Sjxi(bn, q)| . (6) This is a weighted matching problem which can be solved by the Blossom Algorithm of Edmonds [8] with O(d3) operations. We use the implementation in [9]. Iterating on this algorithm for 0 ≤j < J thus computes a multiresolution approximation at the scale 2J, with a hierarchical aggregation of graph vertices. Observe that ∥Sj+1x∥1 = ∥Sjx∥1 + X q X n |Sjx(an, q) −Sjx(bn, q)| . Given Sjx, it results that the minimization of (6) is equivalent to the minimization of P i ∥Sj+1xi∥1. This can be interpreted as finding a multiresolution approximation which yields an optimally sparse scattering transform. It operates with a greedy layerwise strategy across the network layers, similarly to sparse autoencoders for unsupervised deep learning [4]. As explained in the previous section, several Haar scattering transforms are needed to obtain a complete signal representation. The unsupervised learning computes N multiresolution approximations by dividing the training set {xi}i in N non-overlapping subsets, and learning a different multiresolution approximation from each training subset. 3.2 Supervised Feature Selection and Classification The unsupervised learning computes a vector of scattering coefficients which is typically much larger than the dimension d of x. However, only a subset of these invariants are needed for any particular classification task. The classification is improved by a supervised dimension reduction which selects a subset of scattering coefficients. In this paper, the feature selection is implemented with a partial least square regression [12, 13, 14]. The final supervised classifier is a Gaussian kernel SVM. Let us denote by Φx = {φpx}p the set of all scattering coefficients at a scale 2J, computed from N multiresolution approximations. We perform a feature selection adapted to each class c, with a partial least square regression of the one-versus-all indicator function fc(x) =  1 if x belongs to class c 0 otherwise . A partial least square greedily selects and orthogonalizes each feature, one at a time. At the kth iteration, it selects a φpkx, and a Gram-Schmidt orthogonalization yields a normalized ˜φpkx, which is uncorrelated relatively to all previously selected features: ∀r < k , X i ˜φpk(xi) ˜φpr(xi) = 0 and X i |˜φpk(xi)|2 = 1 . The kth feature φpkx is selected so that the linear regression of fc(x) on {˜φprx}1≤r≤k has a minimum mean-square error, computed on the training set. This is equivalent to finding φpk so that P i fc(xi) ˜φpk(xi) is maximum. The partial least square regression thus selects and computes K decorrelated scattering features {˜φpkx}k<K for each class c. For a total of C classes, the union of all these feature sets defines a dictionary of size M = K C. They are linear combinations of the original Haar scattering coefficients {φpx}p. This dimension reduction can thus be interpreted as a last fully connected network 5 Figure 3: MNIST images (left) and images after random pixel permutations (right). layer, which outputs a vector of size M. The parameter M allows one to optimize the bias versus variance trade-off. It can be adjusted from the decay of the regression error of each fc [12]. In our numerical experiments, it is set to a fixed size for all data bases. 4 Numerical Experiments Unsupervised Haar scattering representations are tested on classification problems, over scrambled images and scrambled data on a sphere, for which the geometry is therefore unknown. Classification results are compared with a Haar scattering algorithm computed over the known signal geometry, and with state of the art algorithms. A Haar scattering representation involves few parameters which are reviewed. The scattering scale 2J ≤d is the invariance scale. Scattering coefficients are computed up to the a maximum order m, which is set to 4 in all experiments. Indeed, higher order scattering coefficient have a negligible relative energy, which is below 1%. The unsupervised learning algorithm computes N multiresolution approximations, corresponding to N different scattering transforms. Increasing N decreases the classification error but it increases computations. The error decay becomes negligible for N ≥40. The supervised dimension reduction selects a final set of M orthogonalized scattering coefficients. We set M = 1000 in all numerical experiments. For signals defined on an unknown graph, the unsupervised learning computes an estimation of connected multiresolution sets by minimizing an average total variation. For each data basis of scrambled signals, the precision of this estimation is evaluated by computing the percentage of multiscale sets which are indeed connected in the original topology (an image grid or a grid on the sphere). 4.1 MNIST Digit Recognition MNIST is a data basis with 6 × 104 hand-written digit images of size d ≤210, with 5 × 104 images for training and 104 for testing. Examples of MNIST images before and after pixel scrambling are shown in Figure 3. The best classification results are obtained with a maximum invariance scale 2J = 210. The classification error is 0.9%, with an unsupervised learning of N = 40 multiresolution approximations. Table 1 shows that it is below but close to state of the art results obtained with fully supervised deep convolution, which are optimized with supervised backpropagation algorithms. The unsupervised learning computes multiresolution sets Vj,n from scrambled images. At scales 1 ≤2j ≤23, 100% of these multiresolution sets are connected in the original image grid, which proves that the geometry is well estimated at these scales. This is only evaluated on meaningful pixels which do not remain zero on all training images. For j = 4 and j = 5 the percentages of connected sets are respectively 85% and 67%. The percentage of connected sets decreases because long range correlations are weaker. One can reduce the Haar scattering classification error from 0.9% to 0.59% with a known image geometry. The Haar scattering transform is then computed over multiresolution approximations which are directly constructed from the image grid as in Figure 2(a). Rotations and translations define N = 64 different connected multiresolution approximations, which yield a reduced error of 0.59%. State of the art classification errors on MNIST, for non-augmented data basis (without elastic deformations), are respectively 0.46% with a Gabor scattering [2] and 0.53% with a supervised training of deep convolution networks [5]. This shows that without any learning, a Haar scattering using geometry is close to the state of the art. 6 Maxout MLP + dropout [15] Deep convex net. [16] DBM + dropout [17] Haar Scattering 0.94 0.83 0.79 0.90 Table 1: Percentage of errors for the classification of scrambled MNIST images, obtained by different algorithms. Figure 4: Images of digits mapped on a sphere. 4.2 CIFAR-10 Images CIFAR-10 images are color images of 32 × 32 pixels, which are much more complex than MNIST digit images. It includes 10 classes, such as “dogs”, “cars”, “ships” with a total of 5 × 104 training examples and 104 testing examples. The 3 color bands are represented with Y, U, V channels and scattering coefficients are computed independently in each channel. The Haar scattering is first applied to scrambled CIFAR images whose geometry is unknown. The minimum classification error is obtained at the scale 2J = 27 which is below the maximum scale d = 210. It maintains some localization information on the image features. With N = 10 multiresolution approximations, a Haar scattering transform has an error of 27.3%. It is 10% below previous results obtained on this data basis, given in Table 2. Nearly 100% of the multiresolution sets Vj,n computed from scrambled images are connected in the original image grid, for 1 ≤j ≤4, which shows that the multiscale geometry is well estimated at these fine scales. For j = 5, 6 and 7, the proportions of connected sets are 98%, 93% and 83% respectively. As for MNIST images, the connectivity is not as precisely estimated at large scales. Fastfood [18] Random Kitchen Sinks [18] Haar Scattering 36.9 37.6 27.3 Table 2: Percentage of errors for the classification of scrambled CIFAR-10 images, with different algorithms. The Haar scattering classification error is reduced from 27.7% to 21.3% if the image geometry is known. Same as for MNIST, we compute N = 64 multiresolution approximations obtained by translating and rotating. After dimension reduction, the classification error is 21.3%. This error is above the state of the art obtained by a supervised convolutional network [15] (11.68%), but the Haar scattering representation involves no learning. 4.3 Signals on a Sphere A data basis of irregularly sampled signals on a sphere is constructed in [3], by projecting the MNIST image digits on d = 4096 points randomly sampled on the 3D sphere, and by randomly rotating these images on the sphere. The random rotation is either uniformly distributed on the sphere or restricted with a smaller variance (small rotations) [3]. The digit ‘9’ is removed from the data set because it can not be distinguished from a ‘6’ after rotation. Examples of the dataset are shown in Figure 4. The classification algorithms introduced in [3] use the known distribution of points on the sphere, by computing a representation based on the graph Laplacian. Table 3 gives the results reported in [3], with a fully connected neural network, and a spectral graph Laplacian network. As opposed to these algorithms, the Haar scattering algorithm uses no information on the positions of points on the sphere. Computations are performed from a scrambled set of signal values, without any 7 geometric information. Scattering transforms are calculated up to the maximum scale 2J = d = 212. A total of N = 10 multiresolution approximations are estimated by unsupervised learning, and the classification is performed from M = 103 selected coefficients. Despite the fact that the geometry is unknown, the Haar scattering reduces the error rate both for small and large 3D random rotations. In order to evaluate the precision of our geometry estimation, we use the neighborhood information based on the 3D coordinates of the 4096 points on the sphere of radius 1. We say that two points are connected if their geodesic distance is smaller than 0.1. Each point on the sphere has on average 8 connected points. For small rotations, the percentage of learned multiresolution sets which are connected is 92%, 92%, 88% and 83% for j going from 1 to 4. It is computed on meaningful points with nonneglegible energy. For large rotations, it is 97%, 96%, 95% and 95%. This shows that the multiscale geometry on the sphere is well estimated. Nearest Fully Spectral Haar Neighbors Connect. Net.[3] Scattering Small rotations 19 5.6 6 2.2 Large rotations 80 52 50 47.7 Table 3: Percentage of errors for the classification of MNIST images rotated and sampled on a sphere [3], with a nearest neighbor classifier, a fully connected two layer neural network, a spectral network [3], and a Haar scattering. 5 Conclusion A Haar scattering transform computes invariant data representations by iterating over a hierarchy of permutation invariant operators, calculated with additions, subtractions and absolute values. The geometry of unstructured signals is estimated with an unsupervised learning algorithm, which minimizes the average total signal variation over multiscale neighborhoods. This shows that unsupervised deep learning can be implemented with a polynomial complexity algorithm. The supervised classification includes a feature selection implemented with a partial least square regression. State of the art results have been shown on scrambled images as well as random signals sampled on a sphere. The two important parameters of this architecture are the network depth, which corresponds to the invariance scale, and the dimension reduction of the final layer, set to 103 in all experiments. It can thus easily be applied to any data set. This paper concentrates on scattering transforms of real valued signals. For a boolean vector x, a boolean scattering transform is computed by replacing the operator (1) by a boolean permutation invariant operator which transforms (α, β) into (α and β , α xor β). Iteratively applying this operator defines a boolean scattering transform Sjx having similar properties. 8 References [1] S. Mallat, “Recursive interferometric representations”. Proc. of EUSICO Conf. 2010, Denmark. [2] J. Bruna, S. Mallat, “Invariant Scattering Convolution Networks,” IEEE Trans. PAMI, 35(8): 1872-1886, 2013. [3] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun, “Spectral Networks and Deep Locally Connected Networks on Graphs,” ICLR 2014. [4] Y. Bengio, A. Courville, P. Vincent, “Representation Learning: A Review and New Perspectives”, IEEE Trans. on PAMI, no.8, vol. 35, pp 1798-1828, 2013. [5] Y. LeCun, K. Kavukvuoglu, and C. Farabet, “Convolutional Networks and Applications in Vision,” Proc. IEEE Int. Sump. Circuits and Systems 2010. [6] M. Gavish, B. Nadler, and R. R. Coifman. “Multiscale wavelets on trees, graphs and high dimensional data: Theory and applications to semi supervised learning”, in ICML, pages 367374, 2010. [7] N. L. Roux, Y. Bengio, P. Lamblin, M. Joliveau and B. K´egl, “Learning the 2-D topology of images”, in NIPS, pages 841-848, 2008. [8] J. Edmonds. Paths, trees, and flowers. Canadian Journal of Mathematics, 1965. [9] E. Rothberg of H. Gabow’s “An Efficient Implementation of Edmond’s Algorithm for Maximum Matching on Graphs.” JACM, 23, 1v976. [10] R. Rustamov, L. Guibas, “Wavelets on Graphs via Deep Learning,” NIPS 2013. [11] D. Shuman, S. Narang, P. Frossard, A. Ortega, P. Vanderghenyst, “The Emmerging Field of Signal Processing on Graphs,” IEEE Signal Proc. Magazine, May 2013. [12] T. Mehmood, K. H. Liland, L. Snipen and S. Sæbø, “A Review of Variable Selection Methods in Partial Least Squares Regression”, Chemometrics and Intelligent Laboratory Systems, vol. 118, pages 62-69, 2012. [13] H. Zhang, S. Kiranyaz and M. Gabbouj, “Cardinal Sparse Partial Least Square Feature Selection and its Application in Face Recognition”, Signal Processing Conference (EUSIPCO), 2014 Proceedings of the 22st European, Sep. 2014. [14] W. R. Schwartz, A. Kembhavi, D. Harwood and L. S. Davis, “Human Detection Using Partial Least Squares Analysis”, Computer vision, ICCV 2009. [15] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville and Y. Benjio, “Maxout Networks”, Arxiv preprint, arxiv:1302.4389, 2013. [16] D. Yu and L. Deng, “Deep Convex Net: A Scalable Architecture for Speech Pattern Classification”,in Proc. INTERSPEECH, 2011, pp.2285-2288. [17] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Improving neural networks by preventing co-adaptation of feature detectors”, Technical report, arXiv:1207.0580, 2012. [18] Q. Le, T. Sarlos and A. Smola,“Fastfood - Approximating Kernel Expansions in Loglinear Time”, ICML, 2013. [19] M Hein and S. Setzer, “Beyond Spectral Clustering - Tight Relaxations of Balanced Graph Cuts,” NIPS 2011. 9
2014
217
5,311
Communication-Efficient Distributed Dual Coordinate Ascent Martin Jaggi ∗ ETH Zurich Virginia Smith ∗ UC Berkeley Martin Tak´aˇc Lehigh University Jonathan Terhorst UC Berkeley Sanjay Krishnan UC Berkeley Thomas Hofmann ETH Zurich Michael I. Jordan UC Berkeley Abstract Communication remains the most significant bottleneck in the performance of distributed optimization algorithms for large-scale machine learning. In this paper, we propose a communication-efficient framework, COCOA, that uses local computation in a primal-dual setting to dramatically reduce the amount of necessary communication. We provide a strong convergence rate analysis for this class of algorithms, as well as experiments on real-world distributed datasets with implementations in Spark. In our experiments, we find that as compared to stateof-the-art mini-batch versions of SGD and SDCA algorithms, COCOA converges to the same .001-accurate solution quality on average 25× as quickly. 1 Introduction With the immense growth of available data, developing distributed algorithms for machine learning is increasingly important, and yet remains a challenging topic both theoretically and in practice. On typical real-world systems, communicating data between machines is vastly more expensive than reading data from main memory, e.g. by a factor of several orders of magnitude when leveraging commodity hardware.1 Yet, despite this reality, most existing distributed optimization methods for machine learning require significant communication between workers, often equalling the amount of local computation (or reading of local data). This includes for example popular mini-batch versions of online methods, such as stochastic subgradient (SGD) and coordinate descent (SDCA). In this work, we target this bottleneck. We propose a distributed optimization framework that allows one to freely steer the trade-off between communication and local computation. In doing so, the framework can be easily adapted to the diverse spectrum of available large-scale computing systems, from high-latency commodity clusters to low-latency supercomputers or the multi-core setting. Our new framework, COCOA (Communication-efficient distributed dual Coordinate Ascent), supports objectives for linear reguarlized loss minimization, encompassing a broad class of machine learning models. By leveraging the primal-dual structure of these optimization problems, COCOA effectively combines partial results from local computation while avoiding conflict with updates simultaneously computed on other machines. In each round, COCOA employs steps of an arbitrary dual optimization method on the local data on each machine, in parallel. A single update vector is then communicated to the master node. For example, when choosing to perform H iterations (usually order of the data size n) of an online optimization method locally per round, our scheme saves a factor of H in terms of communication compared to the corresponding naive distributed update ∗Both authors contributed equally. 1On typical computers, the latency for accessing data in main memory is in the order of 100 nanoseconds. In contrast, the latency for sending data over a standard network connection is around 250,000 nanoseconds. 1 scheme (i.e., updating a single point before communication). When processing the same number of datapoints, this is clearly a dramatic savings. Our theoretical analysis (Section 4) shows that this significant reduction in communication cost comes with only a very moderate increase in the amount of total computation, in order to reach the same optimization accuracy. We show that, in general, the distributed COCOA framework will inherit the convergence rate of the internally-used local optimization method. When using SDCA (randomized dual coordinate ascent) as the local optimizer and assuming smooth losses, this convergence rate is geometric. In practice, our experiments with the method implemented on the fault-tolerant Spark platform [1] confirm both the clock time performance and huge communication savings of the proposed method on a variety distributed datasets. Our experiments consistently show order of magnitude gains over traditional mini-batch methods of both SGD and SDCA, and significant gains over the faster but theoretically less justified local SGD methods. Related Work. As we discuss below (Section 5), our approach is distinguished from recent work on parallel and distributed optimization [2, 3, 4, 5, 6, 7, 8, 9] in that we provide a general framework for improving the communication efficiency of any dual optimization method. To the best of our knowledge, our work is the first to analyze the convergence rate for an algorithm with this level of communication efficiency, without making data-dependent assumptions. The presented analysis covers the case of smooth losses, but should also be extendable to the non-smooth case. Existing methods using mini-batches [4, 2, 10] are closely related, though our algorithm makes significant improvements by immediately applying all updates locally while they are processed, a scheme that is not considered in the classic mini-batch setting. This intuitive modification results in dramatically improved empirical results and also strengthens our theoretical convergence rate. More precisely, the convergence rate shown here only degrades with the number of workers K, instead of with the significantly larger mini-batch-size (typically order n) in the case of mini-batch methods. Our method builds on a closely related recent line of work of [2, 3, 11, 12]. We generalize the algorithm of [2, 3] by allowing the use of arbitrary (dual) optimization methods as the local subroutine within our framework. In the special case of using coordinate ascent as the local optimizer, the resulting algorithm is very similar, though with a different computation of the coordinate updates. Moreover, we provide the first theoretical convergence rate analysis for such methods, without making strong assumptions on the data. The proposed COCOA framework in its basic variant is entirely free of tuning parameters or learning rates, in contrast to SGD-based methods. The only choice to make is the selection of the internal local optimization procedure, steering the desired trade-off between communication and computation. When choosing a primal-dual optimizer as the internal procedure, the duality gap readily provides a fair stopping criterion and efficient accuracy certificates during optimization. Paper Outline. The rest of the paper is organized as follows. In Section 2 we describe the problem setting of interest. Section 3 outlines the proposed framework, COCOA, and the convergence analysis of this method is presented in Section 4. We discuss related work in Section 5, and compare against several other state-of-the-art methods empirically in Section 6. 2 Setup A large class of methods in machine learning and signal processing can be posed as the minimization of a convex loss function of linear predictors with a convex regularization term: min w∈Rd h P(w) := λ 2 ∥w∥2 + 1 n n X i=1 ℓi(wT xi) i , (1) Here the data training examples are real-valued vectors xi ∈Rd; the loss functions ℓi, i = 1, . . . , n are convex and depend possibly on labels yi ∈R; and λ > 0 is the regularization parameter. Using the setup of [13], we assume the regularizer is the ℓ2-norm for convenience. Examples of this class of problems include support vector machines, as well as regularized linear and logistic regression, ordinal regression, and others. 2 The most popular method to solve problems of the form (1) is the stochastic subgradient method (SGD) [14, 15, 16]. In this setting, SGD becomes an online method where every iteration only requires access to a single data example (xi, yi), and the convergence rate is well-understood. The associated conjugate dual problem of (1) takes the following form, and is defined over one dual variable per each example in the training set. max α∈Rn h D(α) := −λ 2 ∥Aα∥2 −1 n n X i=1 ℓ∗ i (−αi) i , (2) where ℓ∗ i is the conjugate (Fenchel dual) of the loss function ℓi, and the data matrix A ∈Rd×n collects the (normalized) data examples Ai := 1 λnxi in its columns. The duality comes with the convenient mapping from dual to primal variables w(α) := Aα as given by the optimality conditions [13]. For any configuration of the dual variables α, we have the duality gap defined as P(w(α))−D(α). This gap is a computable certificate of the approximation quality to the unknown true optimum P(w∗) = D(α∗), and therefore serves as a useful stopping criteria for algorithms. For problems of the form (2), coordinate descent methods have proven to be very efficient, and come with several benefits over primal methods. In randomized dual coordinate ascent (SDCA), updates are made to the dual objective (2) by solving for one coordinate completely while keeping all others fixed. This algorithm has been implemented in a number of software packages (e.g. LibLinear [17]), and has proven very suitable for use in large-scale problems, while giving stronger convergence results than the primal-only methods (such as SGD), at the same iteration cost [13]. In addition to superior performance, this method also benefits from requiring no stepsize, and having a welldefined stopping criterion given by the duality gap. 3 Method Description The COCOA framework, as presented in Algorithm 1, assumes that the data {(xi, yi)}n i=1 for a regularized loss minimization problem of the form (1) is distributed over K worker machines. We associate with the datapoints their corresponding dual variables {αi}n i=1, being partitioned between the workers in the same way. The core idea is to use the dual variables to efficiently merge the parallel updates from the different workers without much conflict, by exploiting the fact that they all work on disjoint sets of dual variables. Algorithm 1: COCOA: Communication-Efficient Distributed Dual Coordinate Ascent Input: T ≥1, scaling parameter 1 ≤βK ≤K (default: βK := 1). Data: {(xi, yi)}n i=1 distributed over K machines Initialize: α(0) [k] ←0 for all machines k, and w(0) ←0 for t = 1, 2, . . . , T for all machines k = 1, 2, . . . , K in parallel (∆α[k], ∆wk) ←LOCALDUALMETHOD(α(t−1) [k] , w(t−1)) α(t) [k] ←α(t−1) [k] + βK K ∆α[k] end reduce w(t) ←w(t−1) + βK K PK k=1 ∆wk end In each round, the K workers in parallel perform some steps of an arbitrary optimization method, applied to their local data. This internal procedure tries to maximize the dual formulation (2), only with respect to their own local dual variables. We call this local procedure LOCALDUALMETHOD, as specified in the template Procedure A. Our core observation is that the necessary information each worker requires about the state of the other dual variables can be very compactly represented by a single primal vector w ∈Rd, without ever sending around data or dual variables between the machines. Allowing the subroutine to process more than one local data example per round dramatically reduces the amount of communication between the workers. By definition, COCOA in each outer iteration 3 Procedure A: LOCALDUALMETHOD: Dual algorithm for prob. (2) on a single coordinate block k Input: Local α[k] ∈Rnk, and w ∈Rd consistent with other coordinate blocks of α s.t. w = Aα Data: Local {(xi, yi)}nk i=1 Output: ∆α[k] and ∆w := A[k]∆α[k] Procedure B: LOCALSDCA: SDCA iterations for problem (2) on a single coordinate block k Input: H ≥1, α[k] ∈Rnk, and w ∈Rd consistent with other coordinate blocks of α s.t. w = Aα Data: Local {(xi, yi)}nk i=1 Initialize: w(0) ←w, ∆α[k] ←0 ∈Rnk for h = 1, 2, . . . , H choose i ∈{1, 2, . . . , nk} uniformly at random find ∆α maximizing −λn 2 ∥w(h−1) + 1 λn∆α xi∥2 −ℓ∗ i −(α(h−1) i + ∆α)  α(h) i ←α(h−1) i + ∆α (∆α[k])i ←(∆α[k])i + ∆α w(h) ←w(h−1) + 1 λn∆α xi end Output: ∆α[k] and ∆w := A[k]∆α[k] only requires communication of a single vector for each worker, that is ∆wk ∈Rd. Further, as we will show in Section 4, COCOA inherits the convergence guarantee of any algorithm run locally on each node in the inner loop of Algorithm 1. We suggest to use randomized dual coordinate ascent (SDCA) [13] as the internal optimizer in practice, as implemented in Procedure B, and also used in our experiments. Notation. In the same way the data is partitioned across the K worker machines, we write the dual variable vector as α = (α[1], . . . , α[K]) ∈Rn with the corresponding coordinate blocks α[k] ∈Rnk such that P k nk = n. The submatrix A[k] collects the columns of A (i.e. rescaled data examples) which are available locally on the k-th worker. The parameter T determines the number of outer iterations of the algorithm, while when using an online internal method such as LOCALSDCA, then the number of inner iterations H determines the computation-communication trade-off factor. 4 Convergence Analysis Considering the dual problem (2), we define the local suboptimality on each coordinate block as: εD,k(α) := max ˆα[k]∈Rnk D((α[1], . . . , ˆα[k], . . . , α[K])) −D((α[1], . . . , α[k], . . . , α[K])), (3) that is how far we are from the optimum on block k with all other blocks fixed. Note that this differs from the global suboptimality max ˆα D( ˆα) −D((α[1], . . . , α[K])). Assumption 1 (Local Geometric Improvement of LOCALDUALMETHOD). We assume that there exists Θ ∈[0, 1) such that for any given α, LOCALDUALMETHOD when run on block k alone returns a (possibly random) update ∆α[k] such that E[ϵD,k((α[1], . . . , α[k−1], α[k] + ∆α[k], α[k+1], . . . , α[K]))] ≤Θ · ϵD,k(α). (4) Note that this assumption is satisfied for several available implementations of the inner procedure LOCALDUALMETHOD, in particular for LOCALSDCA, as shown in the following Proposition. From here on, we assume that the input data is scaled such that ∥xi∥≤1 for all datapoints. Proofs of all statements are provided in the supplementary material. Proposition 1. Assume the loss functions ℓi are (1/γ)-smooth. Then for using LOCALSDCA, Assumption 1 holds with Θ =  1 − λnγ 1 + λnγ 1 ˜n H . (5) where ˜n := maxk nk is the size of the largest block of coordinates. 4 Theorem 2. Assume that Algorithm 1 is run for T outer iterations on K worker machines, with the procedure LOCALDUALMETHOD having local geometric improvement Θ, and let βK := 1. Further, assume the loss functions ℓi are (1/γ)-smooth. Then the following geometric convergence rate holds for the global (dual) objective: E[D(α∗) −D(α(T ))] ≤  1 −(1 −Θ) 1 K λnγ σ + λnγ T  D(α∗) −D(α(0))  . (6) Here σ is any real number satisfying σ ≥σmin := max α∈Rn λ2n2 PK k=1∥A[k]α[k]∥2 −∥Aα∥2 ∥α∥2 ≥0. (7) Lemma 3. If K = 1 then σmin = 0. For any K ≥1, when assuming ∥xi∥≤1 ∀i, we have 0 ≤σmin ≤˜n. Moreover, if datapoints between different workers are orthogonal, i.e. (AT A)i,j = 0 ∀i, j such that i and j do not belong to the same part, then σmin = 0. If we choose K = 1 then, Theorem 2 together with Lemma 3 implies that E[D(α∗) −D(α(T ))] ≤ΘT  D(α∗) −D(α(0))  , as expected, showing that the analysis is tight in the special case K = 1. More interestingly, we observe that for any K, in the extreme case when the subproblems are solved to optimality (i.e. letting H →∞in LOCALSDCA), then the algorithm as well as the convergence rate match that of serial/parallel block-coordinate descent [18, 19]. Note: If choosing the starting point as α(0) := 0 as in the main algorithm, then it is known that D(α∗) −D(α(0)) ≤1 (see e.g. Lemma 20 in [13]). 5 Related Work Distributed Primal-Dual Methods. Our approach is most closely related to recent work by [2, 3], which generalizes the distributed optimization method for linear SVMs as in [11] to the primal-dual setting considered here (which was introduced by [13]). The difference between our approach and the ‘practical’ method of [2] is that our internal steps directly correspond to coordinate descent iterations on the global dual objective (2), for coordinates in the current block, while in [3, Equation 8] and [2], the inner iterations apply to a slightly different notion of the sub-dual problem defined on the local data. In terms of convergence results, the analysis of [2] only addresses the mini-batch case without local updates, while the more recent paper [3] shows a convergence rate for a variant of COCOA with inner coordinate steps, but under the unrealistic assumption that the data is orthogonal between the different workers. In this case, the optimization problems become independent, so that an even simpler single-round communication scheme summing the individual resulting models w would give an exact solution. Instead, we show a linear convergence rate for the full problem class of smooth losses, without any assumptions on the data, in the same generality as the non-distributed setting of [13]. While the experimental results in all papers [11, 2, 3] are encouraging for this type of method, they do not yet provide a quantitative comparison of the gains in communication efficiency, or compare to the analogous SGD schemes that use the same distribution and communication patterns, which is the main goal or our experiments in Section 6. For the special case of linear SVMs, the first paper to propose the same algorithmic idea was [11], which used LibLinear in the inner iterations. However, the proposed algorithm [11] processes the blocks sequentially (not in the parallel or distributed setting). Also, it is assumed that the subproblems are solved to near optimality on each block before selecting the next, making the method essentially standard block-coordinate descent. While no convergence rate was given, the empirical results in the journal paper [12] suggest that running LibLinear for just one pass through the local data performs well in practice. Here, we prove this, quantify the communication efficiency, and show that fewer local steps can improve the overall performance. For the LASSO case, [7] has proposed a parallel coordinate descent method converging to the true optimum, which could potentially also be interpreted in our framework here. 5 Mini-Batches. Another closely related avenue of research includes methods that use mini-batches to distribute updates. In these methods, a mini-batch, or sample, of the data examples is selected for processing at each iteration. All updates within the mini-batch are computed based on the same fixed parameter vector w, and then these updates are either added or averaged in a reduce step and communicated back to the worker machines. This concept has been studied for both SGD and SDCA, see e.g. [4, 10] for the SVM case. The so-called naive variant of [2] is essentially identical to mini-batch dual coordinate descent, with a slight difference in defining the sub-problems. As is shown in [2] and below in Section 6, the performance of these algorithms suffers when processing large batch sizes, as they do not take local updates immediately into account. Furthermore, they are very sensitive to the choice of the parameter βb, which controls the magnitude of combining all updates between βb := 1 for (conservatively) averaging, and βb := b for (aggressively) adding the updates (here we denote b as the size of the selected mini-batch, which can be of size up to n). This instability is illustrated by the fact that even the change of βb := 2 instead of βb := 1 can lead to divergence of coordinate descent (SDCA) in the simple case of just two coordinates [4] . In practice it can be very difficult to choose the correct data-dependent parameter βb especially for large mini-batch sizes b ≈n, as the parameter range spans many orders of magnitude, and directly controls the step size of the resulting algorithm, and therefore the convergence rate [20, 21]. For sparse data, the work of [20, 21] gives some data dependent choices of βb which are safe. Known convergence rates for the mini-batch methods degrade linearly with the growing batch size b ≈Θ(n). More precisely, the improvement in objective function per example processed degrades with a factor of βb in [4, 20, 21]. In contrast, our convergence rate as shown in Theorem 2 only degrades with the much smaller number of worker machines K, which in practical applications is often several orders of magnitudes smaller than the mini-batch size b. Single Round of Communication. One extreme is to consider methods with only a single round of communication (e.g. one map-reduce operation), as in [22, 6, 23]. The output of these methods is the average of K individual models, trained only on the local data on each machine. In [22], the authors give conditions on the data and computing environment under which these one-communication algorithms may be sufficient. In general, however, the true optimum of the original problem (1) is not the average of these K models, no matter how accurately the subproblems are solved [24]. Naive Distributed Online Methods, Delayed Gradients, and Multi-Core. On the other extreme, a natural way to distribute updates is to let every machine send updates to the master node (sometimes called the “parameter server”) as soon as they are performed. This is what we call the naive distributed SGD / CD in our experiments. The amount of communication for such naive distributed online methods is the same as the number of data examples processed. In contrast to this, the number of communicated vectors in our method is divided by H, that is the number of inner local steps performed per outer iteration, which can be Θ(n). The early work of [25] introduced the nice framework of gradient updates where the gradients come with some delays, i.e. are based on outdated iterates, and shows some robust convergence rates. In the machine learning setting, [26] and the later work of [27] have provided additional insights into these types of methods. However, these papers study the case of smooth objective functions of a sum structure, and so do not directly apply to general case we consider here. In the same spirit, [5] implements SGD with communication-intense updates after each example processed, allowing asynchronous updates again with some delay. For coordinate descent, the analogous approach was studied in [28]. Both methods [5, 28] are H times less efficient in terms of communication when compared to COCOA, and are designed for multi-core shared memory machines (where communication is as fast as memory access). They require the same amount of communication as naive distributed SGD / CD, which we include in our experiments in Section 6, and a slightly larger number of iterations due to the asynchronicity. The 1/t convergence rate shown in [5] only holds under strong sparsity assumptions on the data. A more recent paper [29] deepens the understanding of such methods, but still only applies to very sparse data. For general data, [30] theoretically shows that 1/ε2 communications rounds of single vectors are enough to obtain ε-quality for linear classifiers, with the rate growing with K2 in the number of workers. Our new analysis here makes the dependence on 1/ε logarithmic. 6 6 Experiments In this section, we compare COCOA to traditional mini-batch versions of stochastic dual coordinate ascent and stochastic gradient descent, as well as the locally-updating version of stochastic gradient descent. We implement mini-batch SDCA (denoted mini-batch-CD) as described in [4, 2]. The SGD-based methods are mini-batch and locally-updating versions of Pegasos [16], differing only in whether the primal vector is updated locally on each inner iteration or not, and whether the resulting combination/communication of the updates is by an average over the total size KH of the minibatch (mini-batch-SGD) or just over the number of machines K (local-SGD). For each algorithm, we additionally study the effect of scaling the average by a parameter βK, as first described in [4], while noting that it is a benefit to avoid having to tune this data-dependent parameter. We apply these algorithms to standard hinge loss ℓ2-regularized support vector machines, using implementations written in Spark on m1.large Amazon EC2 instances [1]. Though this non-smooth case is not yet covered in our theoretical analysis, we still see remarkable empirical performance. Our results indicate that COCOA is able to converge to .001-accurate solutions nearly 25× as fast compared the other algorithms, when all use βK = 1. The datasets used in these analyses are summarized in Table 1, and were distributed among K = 4, 8, and 32 nodes, respectively. We use the same regularization parameters as specified in [16, 17]. Table 1: Datasets for Empirical Study Dataset Training (n) Features (d) Sparsity λ Workers (K) cov 522,911 54 22.22% 1e-6 4 rcv1 677,399 47,236 0.16% 1e-6 8 imagenet 32,751 160,000 100% 1e-5 32 In comparing each algorithm and dataset, we analyze progress in primal objective value as a function of both time (Figure 1) and communication (Figure 2). For all competing methods, we present the result for the batch size (H) that yields the best performance in terms of reduction in objective value over time. For the locally-updating methods (COCOA and local-SGD), these tend to be larger batch sizes corresponding to processing almost all of the local data at each outer step. For the non-locally updating mini-batch methods, (mini-batch SDCA [4] and mini-batch SGD [16]), these typically correspond to smaller values of H, as averaging the solutions to guarantee safe convergence becomes less of an impediment for smaller batch sizes. 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 Cov Time (s) Log Primal Suboptimality 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 Cov COCOA (H=1e5) minibatch−CD (H=100) local−SGD (H=1e5) batch−SGD (H=1) 0 100 200 300 400 10 −6 10 −4 10 −2 10 0 10 2 RCV1 Time (s) Log Primal Suboptimality 0 100 200 300 400 10 −6 10 −4 10 −2 10 0 10 2 COCOA (H=1e5) minibatch−CD (H=100) local−SGD (H=1e4) batch−SGD (H=100) 0 200 400 600 800 10 −6 10 −4 10 −2 10 0 10 2 Imagenet Time (s) Log Primal Suboptimality 0 200 400 600 800 10 −6 10 −4 10 −2 10 0 10 2 Imagenet COCOA (H=1e3) mini−batch−CD (H=1) local−SGD (H=1e3) mini−batch−SGD (H=10) Figure 1: Primal Suboptimality vs. Time for Best Mini-Batch Sizes (H): For βK = 1, COCOA converges more quickly than all other algorithms, even when accounting for different batch sizes. 0 50 100 150 200 250 300 10 −6 10 −4 10 −2 10 0 10 2 Cov # of Communicated Vectors Log Primal Suboptimality 0 50 100 150 200 250 300 10 −6 10 −4 10 −2 10 0 10 2 Cov COCOA (H=1e5) minibatch−CD (H=100) local−SGD (H=1e5) batch−SGD (H=1) 0 100 200 300 400 500 600 700 10 −6 10 −4 10 −2 10 0 10 2 RCV1 # of Communicated Vectors Log Primal Suboptimality 0 100 200 300 400 500 600 700 10 −6 10 −4 10 −2 10 0 10 2 RCV1 COCOA (H=1e5) minibatch−CD (H=100) local−SGD (H=1e4) batch−SGD (H=100) 0 500 1000 1500 2000 2500 3000 10 −6 10 −4 10 −2 10 0 10 2 Imagenet # of Communicated Vectors Log Primal Suboptimality 0 500 1000 1500 2000 2500 3000 10 −6 10 −4 10 −2 10 0 10 2 Imagenet COCOA (H=1e3) mini−batch−CD (H=1) local−SGD (H=1e3) mini−batch−SGD (H=10) Figure 2: Primal Suboptimality vs. # of Communicated Vectors for Best Mini-Batch Sizes (H): A clear correlation is evident between the number of communicated vectors and wall-time to convergence (Figure 1). 7 First, we note that there is a clear correlation between the wall-time spent processing each dataset and the number of vectors communicated, indicating that communication has a significant effect on convergence speed. We see clearly that COCOA is able to converge to a more accurate solution in all datasets much faster than the other methods. On average, COCOA reaches a .001-accurate solution for these datasets 25x faster than the best competitor. This is a testament to the algorithm’s ability to avoid communication while still making significant global progress by efficiently combining the local updates of each iteration. The improvements are robust for both regimes n ≫d and n ≪d. 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 Time (s) Log Primal Suboptimality 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 1e5 1e4 1e3 100 1 Figure 3: Effect of H on COCOA. 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 Time (s) Log Primal Suboptimality 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 COCOA (βk=1) mini−batch−CD (βk=10) local−SGD (βk=1) mini−batch−sgd (βk=10) 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 Time (s) Log Primal Suboptimality 0 20 40 60 80 100 10 −6 10 −4 10 −2 10 0 10 2 COCOA (βk=1) mini−batch−CD (βk=100) local−SGD (βk=1) mini−batch−sgd (βk=1) Figure 4: Best βK Scaling Values for H = 1e5 and H = 100. In Figure 3 we explore the effect of H, the computation-communication trade-off factor, on the convergence of COCOA for the Cov dataset on a cluster of 4 nodes. As described above, increasing H decreases communication but also affects the convergence properties of the algorithm. In Figure 4, we attempt to scale the averaging step of each algorithm by using various βK values, for two different batch sizes on the Cov dataset (H = 1e5 and H = 100). We see that though βK has a larger impact on the smaller batch size, it is still not enough to improve the mini-batch algorithms beyond what is achieved by COCOA and local-SGD. 7 Conclusion We have presented a communication-efficient framework for distributed dual coordinate ascent algorithms that can be used to solve large-scale regularized loss minimization problems. This is crucial in settings where datasets must be distributed across multiple machines, and where communication amongst nodes is costly. We have shown that the proposed algorithm performs competitively on real-world, large-scale distributed datasets, and have presented the first theoretical analysis of this algorithm that achieves competitive convergence rates without making additional assumptions on the data itself. It remains open to obtain improved convergence rates for more aggressive updates corresponding to βK > 1, which might be suitable for using the ‘safe’ updates techniques of [4] and the related expected separable over-approximations of [18, 19], here applied to K instead of n blocks. Furthermore, it remains open to show convergence rates for local SGD in the same communication efficient setting as described here. Acknowledgments. We thank Shivaram Venkataraman, Ameet Talwalkar, and Peter Richt´arik for fruitful discussions. MJ acknowledges support by the Simons Institute for the Theory of Computing. References [1] Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Murphy McCauley, Michael J Franklin, Scott Shenker, and Ion Stoica. Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing. NSDI, 2012. [2] Tianbao Yang. Trading Computation for Communication: Distributed Stochastic Dual Coordinate Ascent. NIPS, 2013. [3] Tianbao Yang, Shenghuo Zhu, Rong Jin, and Yuanqing Lin. On Theoretical Analysis of Distributed Stochastic Dual Coordinate Ascent. arXiv:1312.1031, December 2013. [4] Martin Tak´aˇc, Avleen Bijral, Peter Richt´arik, and Nathan Srebro. Mini-Batch Primal and Dual Methods for SVMs. ICML, 2013. 8 [5] Feng Niu, Benjamin Recht, Christopher R´e, and Stephen J Wright. Hogwild!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. NIPS, 2011. [6] Martin A Zinkevich, Markus Weimer, Alex J Smola, and Lihong Li. Parallelized Stochastic Gradient Descent. NIPS 23, 2010. [7] Joseph K Bradley, Aapo Kyrola, Danny Bickson, and Carlos Guestrin. Parallel Coordinate Descent for L1-Regularized Loss Minimization. ICML, 2011. [8] Jakub Mareˇcek, Peter Richt´arik, and Martin Tak´aˇc. Distributed Block Coordinate Descent for Minimizing Partially Separable Functions. arXiv:1408.2467, June 2014. [9] Ion Necoara and Dragos Clipici. Efficient parallel coordinate descent algorithm for convex optimization problems with separable constraints: Application to distributed MPC. Journal of Process Control, 23(3):243–253, 2013. [10] Martin Tak´aˇc, Peter Richt´arik, and Nathan Srebro. Primal-Dual Parallel Coordinate Descent for Machine Learning Optimization. Manuscript, 2014. [11] Hsiang-Fu Yu, Cho-Jui Hsieh, Kai-Wei Chang, and Chih-Jen Lin. Large linear classification when data cannot fit in memory. the 16th ACM SIGKDD international conference, page 833, 2010. [12] Hsiang-Fu Yu, Cho-Jui Hsieh, Kai-Wei Chang, and Chih-Jen Lin. Large Linear Classification When Data Cannot Fit in Memory. ACM Transactions on Knowledge Discovery from Data, 5(4):1–23, 2012. [13] Shai Shalev-Shwartz and Tong Zhang. Stochastic Dual Coordinate Ascent Methods for Regularized Loss Minimization. JMLR, 14:567–599, 2013. [14] Herbert Robbins and Sutton Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 22(3):400–407, 1951. [15] L´eon Bottou. Large-Scale Machine Learning with Stochastic Gradient Descent. COMPSTAT’2010 Proceedings of the 19th International Conference on Computational Statistics, pages 177–187, 2010. [16] Shai Shalev-Shwartz, Yoram Singer, Nathan Srebro, and Andrew Cotter. Pegasos: Primal Estimated Sub-Gradient Solver for SVM. Mathematical Programming, 127(1):3–30, 2010. [17] Cho-Jui Hsieh, Kai-Wei Chang, Chih-Jen Lin, S Sathiya Keerthi, and S Sundararajan. A Dual Coordinate Descent Method for Large-scale Linear SVM. ICML, 2008. [18] Peter Richt´arik and Martin Tak´aˇc. Iteration complexity of randomized block-coordinate descent methods for minimizing a composite function. Mathematical Programming, 144(1-2):1–38, April 2014. [19] Peter Richt´arik and Martin Tak´aˇc. Parallel Coordinate Descent Methods for Big Data Optimization. arXiv:1212.0873, 2012. [20] Peter Richt´arik and Martin Tak´aˇc. Distributed Coordinate Descent Method for Learning with Big Data. arXiv:1310.2059, 2013. [21] Olivier Fercoq, Zheng Qu, Peter Richt´arik, and Martin Tak´aˇc. Fast Distributed Coordinate Descent for Non-Strongly Convex Losses. IEEE Workshop on Machine Learning for Signal Processing, May 2014. [22] Yuchen Zhang, John C Duchi, and Martin J Wainwright. Communication-Efficient Algorithms for Statistical Optimization. JMLR, 14:3321–3363, November 2013. [23] Gideon Mann, Ryan McDonald, Mehryar Mohri, Nathan Silberman, and Daniel D Walker. Efficient Large-Scale Distributed Training of Conditional Maximum Entropy Models. NIPS, 1231–1239, 2009. [24] Ohad Shamir, Nathan Srebro, and Tong Zhang. Communication-Efficient Distributed Optimization using an Approximate Newton-type Method. ICML, 32(1):1000–1008, 2014. [25] John N Tsitsiklis, Dimitri P Bertsekas, and Michael Athans. Distributed asynchronous deterministic and stochastic gradient optimization algorithms. IEEE Trans. on Automatic Control, 31(9):803–812, 1986. [26] Ofer Dekel, Ran Gilad-Bachrach, Ohad Shamir, and Lin Xiao. Optimal Distributed Online Prediction Using Mini-Batches. JMLR, 13:165–202, 2012. [27] Alekh Agarwal and John C Duchi. Distributed Delayed Stochastic Optimization. NIPS, 873–881, 2011. [28] Ji Liu, Stephen J Wright, Christopher R´e, Victor Bittorf, and Srikrishna Sridhar. An Asynchronous Parallel Stochastic Coordinate Descent Algorithm. ICML, 2014. [29] John C Duchi, Michael I Jordan, and H Brendan McMahan. Estimation, Optimization, and Parallelism when Data is Sparse. NIPS, 2013. [30] Maria-Florina Balcan, Avrim Blum, Shai Fine, and Yishay Mansour. Distributed Learning, Communication Complexity and Privacy. COLT, 23:26.1–26.22, 2012. 9
2014
218
5,312
Learning convolution filters for inverse covariance estimation of neural network connectivity George O. Mohler∗ Department of Mathematics and Computer Science Santa Clara University University Santa Clara, CA, USA gmohler@scu.edu Abstract We consider the problem of inferring direct neural network connections from Calcium imaging time series. Inverse covariance estimation has proven to be a fast and accurate method for learning macro- and micro-scale network connectivity in the brain and in a recent Kaggle Connectomics competition inverse covariance was the main component of several top ten solutions, including our own and the winning team’s algorithm. However, the accuracy of inverse covariance estimation is highly sensitive to signal preprocessing of the Calcium fluorescence time series. Furthermore, brute force optimization methods such as grid search and coordinate ascent over signal processing parameters is a time intensive process, where learning may take several days and parameters that optimize one network may not generalize to networks with different size and parameters. In this paper we show how inverse covariance estimation can be dramatically improved using a simple convolution filter prior to applying sample covariance. Furthermore, these signal processing parameters can be learned quickly using a supervised optimization algorithm. In particular, we maximize a binomial log-likelihood loss function with respect to a convolution filter of the time series and the inverse covariance regularization parameter. Our proposed algorithm is relatively fast on networks the size of those in the competition (1000 neurons), producing AUC scores with similar accuracy to the winning solution in training time under 2 hours on a cpu. Prediction on new networks of the same size is carried out in less than 15 minutes, the time it takes to read in the data and write out the solution. 1 Introduction Determining the topology of macro-scale functional networks in the brain and micro-scale neural networks has important applications to disease diagnosis and is an important step in understanding brain function in general [11, 19]. Modern neuroimaging techniques allow for the activity of hundreds of thousands of neurons to be simultaneously monitored [19] and recent algorithmic research has focused on the inference of network connectivity from such neural imaging data. A number of approaches to solve this problem have been proposed, including Granger causality [3], Bayesian networks [6], generalized transfer entropy [19], partial coherence [5], and approaches that directly model network dynamics [16, 18, 14, 22]. ∗ 1 Several challenges must be overcome when reconstructing network connectivity from imaging data. First, imaging data is noisy and low resolution. The rate of neuron firing may be faster than the image sampling rate [19] and light scattering effects [13, 19] lead to signal correlations at short distances irrespective of network connectivity. Second, causality must be inferred from observed correlations in neural activity. Neuron spiking is highly correlated both with directly connected neurons and those connected through intermediate neurons. Coupled with the low sampling rate this poses a significant challenge, as it may be the case that neuron i triggers neuron j, which then triggers neuron k, all within a time frame less than the sampling rate. To solve the second challenge, sparse inverse covariance estimation has recently become a popular technique for disentangling causation from correlation [11, 15, 23, 1, 9, 10]. While the sample covariance matrix only provides information on variable correlations, zeros in the inverse covariance matrix correspond to conditional independence of variables under normality assumptions on the data. In the context of inferring network connectivity from leaky integrate and fire neural network time-series, however, it is not clear what set of random variables one should use to compute sample covariance (a necessary step for estimating inverse covariance). While the simplest choice is the raw time-series signal, the presence of both Gaussian and jump-type noise make this significantly less accurate than applying signal preprocessing aimed at filtering times at which neurons fire. In a recent Kaggle competition focused on inferring neural network connectivity from Calcium imaging time series, our approach used inverse covariance estimation to predict network connections. Instead of using the raw time series to compute sample covariance, we observed improved Area Under the Curve (receiver operating characteristic [2]) scores by thresholding the time derivative of the time-series signal and then combining inverse covariance corresponding to several thresholds and time-lags in an ensemble. This is similar to the approach of the winning solution [21], though they considered a significantly larger set of thresholds and nonlinear filters learned via coordinate ascent, the result of which produced a private leaderboard AUC score of .9416 compared to our score of .9338. However, both of these approaches are computationally intensive, where prediction on a new network alone takes 10 hours in the case of the winning solution [21]. Furthermore, parameters for signal processing were highly tuned for optimizing AUC of the competition networks and don’t generalize to networks of different size or parameters [21]. Given that coordinate ascent takes days for learning parameters of new networks, this makes such an approach impractical. In this paper we show how inverse covariance estimation can be significantly improved by applying a simple convolution filter to the raw time series signal. The filter can be learned quickly in a supervised manner, requiring no time intensive grid search or coordinate ascent. In particular, we optimize a smooth binomial log-likelihood loss function with respect to a time series convolution kernel, along with the inverse covariance regularization parameter, using L-BFGS [17]. Training the model is fast and accurate, running in under 2 hours on a CPU and producing AUC scores that are competitive with the winning Kaggle solution. The outline of the paper is as follows. In Section 2 we review inverse covariance estimation and introduce our convolution based method for signal preprocessing. In Section 3 we provide the details of our supervised learning algorithm and in Section 4 we present results of the algorithm applied to the Kaggle Connectomics dataset. 2 Modeling framework for inferring neural connectivity 2.1 Background on inverse covariance estimation Let X ∈Rn×p be a data set of n observations from a multivariate Gaussian distribution with p variables, let Σ denote the covariance matrix of the random variables, and S the sample covariance. Variables i and j are conditionally independent given all other variables if the ijth component of Θ = Σ−1 is zero. For this reason, a popular approach for inferring connectivity in sparse networks is to estimate the inverse covariance matrix via l1 penalized maximum likelihood, ˆΘ = arg max Θ  log  det(Θ)  −tr(SΘ) −λ∥Θ∥1  , (1) 2 [11, 15, 23, 1, 9, 10], commonly referred to as GLASSO (graphical least absolute shrinkage and selection operator). GLASSO has been used to infer brain connectivity for the purpose of diagnosing Alzheimer’s disease [11] and determining brain architecture and pathologies [23]. While GLASSO is a useful method for imposing sparsity on network connections, in the Kaggle Connectomics competition AUC was the metric used for evaluating competing models and on AUC GLASSO only performs marginally better (AUC≈.89) than the generalized transfer entropy Kaggle benchmark (AUC≈.88). The reason for the poor performance of GLASSO on AUC is that l1 penalization forces a large percentage of neuron connection scores to zero, whereas high AUC performance requires ranking all possible connections. We therefore use l2 penalized inverse covariance estimation [23, 12], ˆΘ =  S + λI −1 , (2) instead of optimizing Equation 1. While one advantage of Equation 2 is that all connections are assigned a non-zero score, another benefit is derivatives with respect to model parameters are easy to determine and compute using the standard formula for the derivative of an inverse matrix. In particular, our model consists of parametrizing S using a convolution filter applied to the raw Calcium fluorescence time series and Equation 2 facilitates derivative based optimization. We return to GLASSO in the discussion section at the end of the paper. 2.2 Signal processing Next we introduce a model for the covariance matrix S taking as input observed imaging data from a neural network. Let f be the Calcium fluorescence time series signal, where f i t is the signal observed at neuron i in the network at time t. The goal in this paper is to infer direct network connections from the observed fluorescence time series (see Figure 1). While f i t can be used directly to calculate 1200 1400 1600 1800 2000 2200 0 0.2 0.4 0.6 0.8 time (20 ms) Fluorescence amplitude 1200 1400 1600 1800 2000 2200 0.75 0.8 0.85 0.9 0.95 1 time (20 ms) Filtered fluorescence amplitude 0 2 4 6 8 10 −5 −3 −1 1 3 5 k αk (B) (A) (C) Figure 1: (A) Fluorescence time series f i for neuron i = 1 (blue) of Kaggle Connectomics network 2 and time series for two neurons (red and green) connected to neuron 1. Synchronized firing of all 1000 neurons occurs around time 1600. (B) Neuron locations (gray) in network 2 and direct connections to neuron 1 (green and red connections correspond to time series in Fig 1A). The task is to reconstruct network connectivity as in Fig 1B for all neurons given time series data as in Fig 1A. (C) Filtered fluorescence time series σ(f i ∗α + αbias) using the convolution kernel α (inset figure) learned from our method detailed in Section 3. covariance between fluorescence time series, significant improvements in model performance are achieved by filtering the signal to obtain an estimate of ni t, the number of times neuron i fired between t and t + ∆t. In the competition we used simple thresholding of the time series derivative 3 ∆f i t = f i t+∆t −f i t to estimate neuron firing times, ni t = 1{∆f i t >µ}. (3) The covariance matrix was then computed using a variety of threshold values µ and time-lags k. In particular, the (i, j)th entry of S(µ, k) was determined by, sij = 1 T T X t=k (ni t −ni)(nj t−k −nj), (4) where ni is the mean signal. The covariance matrices were then inverted using Equation 2 and combined using LambdaMart [4] to optimize AUC, along with a restricted Boltzmann machine and generalized linear model. In Figure 2, we illustrate the sensitivity of inverse covariance estimation on the threshold parameter µ, regularization parameter λ, and time-lag parameter k. Using the raw time series signal leads to AUC scores between 0.84 and 0.88, whereas for good choices of the threshold and regularization parameter Equation 2 yields AUC scores above 0.92. Further gains are achieved by using an ensemble over varying µ, λ, and k. .1 .11 .12 .13 .912 .916 0.92 .924 µ AUC .1 .11 .12 .13 0.84 .86 0.88 µ AUC 2 1 0 0.84 0.86 0.88 k AUC λ=.01 λ=.025 λ=.05 λ=.01 λ=.025 λ=.05 λ=.01 λ=.025 λ=.05 k=0 k=1 (B) (C) (A) Figure 2: (A) AUC scores for network 2 using Equations 2, 3, and 4 with a time lag of k = 0 and varying threshold µ and regularization parameter λ. (B) AUC scores analogous to Figure 2A, but for a time lag of k = 1. (C) AUC scores corresponding to inverse covariance estimation using raw time series signal. For comparison, generalized transfer entropy [19] corresponds to AUC≈.88 and simple correlation corresponds to AUC≈.66. In this paper we take a different approach in order to jointly learn the processed fluorescence signal and the inverse covariance estimate. In particular, we convolve the fluorescence time series f i with a kernel α and then pass the convolution through the logistic function σ(x), yi = σ(f i ∗α + αbias). (5) Note for α0 = −α1 (and αk = 0 otherwise) this convolution filter approximates the threshold filter in Equation 3. However, it turns out that the learned optimal filter is significantly different than time derivative thresholding (see Figure 1C). Inverse covariance is then estimated via Equation 2, where the sample covariance is given by, sij = 1 T T X t=1 (yi t −yi)(yj t −yj). (6) The time lags no longer appear in Equation 6, but instead are reflected in the convolution filter. 4 2.3 Supervised inverse covariance estimation Given the sensitivity of model performance on signal processing illustrated in Figure 2, our goal is now to learn the optimal filter α by optimizing a smooth loss function. To do this we introduce a model for the probability of neurons being connected as a function of inverse covariance. Let zij = 1 if neuron i connects to neuron j and zero otherwise and let Θ(α, λ) be the inverse covariance matrix that depends on the smoothing parameter λ from Section 2.1 and the convolution filter α from Section 2.2. We model the probability of neuron i connecting to j as σij = σ(θijβ0 + β1) where σ is the logistic function and θij is the (i, j)th entry of Θ. In summary, our model for scoring the connection from i to j is detailed in Algorithm 1. Algorithm 1: Inverse covariance scoring algorithm Input: f α αbias λ β0 β1 \\ fluorescence signal and model parameters yi = σ(f i ∗α + αbias) \\ apply convolution filter and logistic function to signal for i ←1 to N do for j ←1 to N do sij = 1 T PT t=1(yi t −yi)(yj t −yj) \\ compute sample covariance matrix end end Θ = (S + λI)−1 \\ compute inverse covariance matrix Output: σ(Θβ0 + β1) \\ output connection probability matrix The loss function we aim to optimize is the binomial log-likelihood, given by, L(α, λ, β0, β1) = X i̸=j χzij log(σij) + (1 −χ)(1 −zij) log(1 −σij), (7) where the parameter χ is chosen to balance the dataset. The networks in the Kaggle dataset are sparse, with approximately 1.2% connections, so we choose χ = .988. For χ values within 10% of the true percentage of connections, AUC scores are above .935. Without data balancing, the model achieves an AUC score of .925, so the introduction of χ is important. While smooth approximations of AUC are possible, we find that optimizing Equation 7 instead still yields high AUC scores. To use derivative based optimization methods that converge quickly, we need to calculate the derivatives of Equation 7. Defining, ωij = χzij(1 −σij) −(1 −χ)(1 −zij)σij, (8) then the derivatives of the loss function with respect to the model parameters are specified by, dL dβ0 = X i̸=j ωijθij, dL dβ1 = X i̸=j ωij, (9) dL dλ = X i̸=j β0ωij dθij dλ , dL dαk = X i̸=j β0ωij dθij dαk . (10) Using the inverse derivative formula, we have that the derivatives of the inverse covariance matrix satisfy the following convenient equations, dΘ dλ = − (S(α) + λI)−12, dΘ dαk = −(S(α) + λI)−1 dS dαk (S(α) + λI)−1, (11) where S is the sample covariance matrix from Section 2.2. The derivatives of the sample covariance are then found by substituting dyi t dαk = yi t(1 −yi t)f i t−k into Equation 6 and using the product rule. 5 3 Results We test our methodology using data provided through the Kaggle Connectomics competition. In the Kaggle competition, neural activity was modeled using a leaky integrate and fire model outlined in [19]. Four 1000 neuron networks with 179,500 time series observations per network were provided for training, a test network of the same size and parameters was provided without labels to determine the public leaderboard, and final standings were computed using a 6th network for validation. The goal of the competition was to infer the network connections from the observed Fluorescence time series signal (see Figure 1) and the error metric for determining model performance was AUC. There are two ways in which we determined the size of the convolution filter. The first is through inspecting the decay of cross-correlation as a function of the time-lag. For the networks we consider in the paper, this decay takes place over 10-15 time units. The second method is to add an additional time unit one at a time until cross-validated AUC scores no longer improve. This happens for the networks we consider at 10 time units. We therefore consider a convolution filter with k = 0...10. We use the off-the-shelf optimization method L-BFGS [17] to optimize Equation 7. Prior to applying the convolution filter, we attempt to remove light scattering effects simulated in the competition by inverting the equation, F i t = f i t + Asc X j̸=i f j t exp  −(dij/λsc)2  . (12) Here F i t is the observed fluorescence provided for the competition with light scattering effects (see [19]) and dij is the distance between neuron i and j. The parameter values Asc = .15 and λsc = .025 were determined such that the correlation between neuron distance and signal covariance was approximately zero. We learn the model parameters using network 2 and training time takes less than 2 hours in Matlab on a laptop with a 2.3 GHz Intel Core i7 processor and 16GB of RAM. Whereas prediction alone takes 10 hours on one network for the winning Kaggle entry [21], prediction using Algorithm 1 takes 15 minutes total and the algorithm itself runs in 20 seconds (the rest of the time is dedicated to reading the competition csv files into and out of Matlab). In Figure 3 we display results for all four of the training networks using 80 iterations of L-BFGS (we used four outer iterations with maxIter= 20 and TolX= 1e −5). The convolution filter is initialized to random values and at every 20 iterations we plot the corresponding filtered signal for neuron 1 of network 2 over the first 1000 time series observations. After 10 iterations all four networks have an AUC score above 0.9. After 80 iterations the AUC private leaderboard score of the winning solution is within the range of the AUC scores of networks 1, 3, and 4 (trained on network 2). We note that during training intermediate AUC scores do not increase monotonically and also exhibit several plateaus. This is likely due to the fact that AUC is a non-smooth loss function and we used the binomial likelihood in its stead. 4 Discussion We introduced a model for inferring connectivity in neural networks along with a fast and easy to implement optimization strategy. In this paper we focused on the application to leaky integrate and fire models of neural activity, but our methodology may find application to other types of crossexciting point processes such as models of credit risk contagion [7] or contagion processes on social networks [20]. It is worth noting that we used a Gaussian model for inverse covariance even though the data was highly non-Gaussian. In particular, neural firing time series data is generated by a nonlinear, mutually-exciting point process. We believe that it is the fact that the input data is non-Gaussian that the signal processing is so crucial. In this case f i t and f j s are highly dependent for 10 > t −s > 0 6 0 10 20 30 40 50 60 70 80 0.7 0.8 0.9 L−BFGS iterations AUC 0 500 1000 0.2 0.4 0.6 0.8 1 Filtered fluorescence amplitude 0 500 1000 0.2 0.4 0.6 0.8 1 0 500 1000 0.2 0.4 0.6 0.8 1 time (20 ms) 0 500 1000 0.2 0.4 0.6 0.8 1 0 500 1000 0.2 0.4 0.6 0.8 1 75 76 77 78 79 80 .936 0.94 .944 network1 network2 network3 network4 winning solution on valid network (A) (B) (C) (D) (E) (F) Figure 3: (A) Networks 1-4 AUC values plotted against L-BFGS iterations where network 2 was used to learn the convolution filter. The non-monotonic increase can be attributed to optimizing the binomial log-likelihood rather than AUC directly. (B-F) Every 20 iterations we also plot a subsection of the filtered signal of neuron 1 from network 2. The filter is initially given random values but quickly produces impulse-like signals with high AUC scores. The AUC score of the winning solution is within the range of the AUC scores of held-out networks 1, 3, 4 after 80 iterations of L-BFGS. and j →i. Empirically, the learned convolution filter compensates for the model mis-specification and allows for the “wrong” model to still achieve a high degree of accuracy. We also note that using directed network estimation did not improve our methods, nor the methods of other top solutions in the competition. This may be due to the fact that the resolution of Calcium fluorescence imaging is coarser than the timescale of network dynamics, so that directionality information is lost in the imaging process. That being said, it is possible to adapt our method for estimation of directed networks. This can be accomplished by introducing two different filters αi and αj into Equations 5 and 6 to allow for an asymmetric covariance matrix S in Equation 6. It would be interesting to assess the performance of such a method on networks with higher resolution imaging in future research. While the focus here was on AUC maximization, other loss functions may be useful to consider. For sparse networks where the average network degree is known, precision or discounted cumulative gain may be reasonable alternatives to AUC. Here it is worth noting that l1 penalization is more accurate for these types of loss functions that favor sparse solutions. In Table 1 we compare the accuracy of Equation 1 vs Equation 2 on both AUC and PREC@k (where k is chosen to be the known number of network connections). For signal processing we return to time-derivative thresholding and use the parameters that yielded the best single inverse covariance estimate during the competition. While l2 penalization is significantly more accurate for AUC, this is not the case for PREC@k for which GLASSO achieves a higher precision. It is clear that the sample covariance S in Equation 1 can be parameterized by a convolution kernel α, but supervised learning is no longer as straightforward. Coordinate ascent can be used, but given that Equation 1 is orders of magnitude slower to solve than Equation 2, such an approach may not be practical. Letting G(Θ, S) be the penalized log-likelihood corresponding to GLASSO in Equation 1, another possibility is to jointly optimize ρG(Θ, S) + (1 −ρ)L(Θ, S) (13) 7 λl1 = 5 · 10−5 λl1 = 1 · 10−4 λl1 = 5 · 10−4 λl2 = 2 · 10−2 Network1 .894/.423 .884/.420 .882/.420 .926/.394 Network2 .894/.417 .885/.416 .885/.415 .924/.385 Network3 .894/.423 .885/.425 .884/.427 .925/.397 Table 1: AUC/PREC@k for l1 vs. l2 penalized inverse covariance estimation (where k equals the true number of connections). Time series preprocessed by a derivative threshold of .125 and removing spikes when 800 or more neurons fire simultaneously. For l1 penalization AUC increases as λl1 decreases, though the Rglasso solver [8] becomes prohibitively slow for λl1 on the order of 10−5 or smaller. where L is the binomial log-likelihood in Equation 7. In this case both the convolution filter and the inverse covariance estimate Θ would need to be learned jointly and the parameter ρ could be determined via cross validation on a held-out network. Extending the results in this paper to GLASSO will be the focus of subsequent research. References [1] Onureena Banerjee, Laurent El Ghaoui, and Alexandre d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. The Journal of Machine Learning Research, 9:485–516, 2008. [2] Andrew P Bradley. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern recognition, 30(7):1145–1159, 1997. [3] Steven L Bressler and Anil K Seth. Wiener–granger causality: a well established methodology. Neuroimage, 58(2):323–329, 2011. [4] Christopher JC Burges, Krysta Marie Svore, Paul N Bennett, Andrzej Pastusiak, and Qiang Wu. Learning to rank using an ensemble of lambda-gradient models. Journal of Machine Learning Research-Proceedings Track, 14:25–35, 2011. [5] Rainer Dahlhaus, Michael Eichler, and J¨urgen Sandk¨uhler. Identification of synaptic connections in neural ensembles by graphical models. Journal of neuroscience methods, 77(1):93– 107, 1997. [6] Seif Eldawlatly, Yang Zhou, Rong Jin, and Karim G Oweiss. On the use of dynamic bayesian networks in reconstructing functional neuronal networks from spike train ensembles. Neural computation, 22(1):158–189, 2010. [7] Eymen Errais, Kay Giesecke, and Lisa R Goldberg. Affine point processes and portfolio credit risk. SIAM Journal on Financial Mathematics, 1(1):642–665, 2010. [8] Jerome Friedman, Trevor Hastie, Rob Tibshirani, and Maintainer Rob Tibshirani. Package rglasso. 2013. [9] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008. [10] Cho-Jui Hsieh, Matyas A Sustik, Inderjit S Dhillon, and Pradeep D Ravikumar. Sparse inverse covariance matrix estimation using quadratic approximation. In NIPS, pages 2330–2338, 2011. [11] Shuai Huang, Jing Li, Liang Sun, Jun Liu, Teresa Wu, Kewei Chen, Adam Fleisher, Eric Reiman, and Jieping Ye. Learning brain connectivity of alzheimer’s disease from neuroimaging data. In NIPS, volume 22, pages 808–816, 2009. 8 [12] Olivier Ledoit and Michael Wolf. A well-conditioned estimator for large-dimensional covariance matrices. Journal of multivariate analysis, 88(2):365–411, 2004. [13] Olaf Minet, J¨urgen Beuthan, and Urszula Zabarylo. Deconvolution techniques for experimental optical imaging in medicine. Medical Laser Application, 23(4):216–225, 2008. [14] Yuriy Mishchenko, Joshua T Vogelstein, Liam Paninski, et al. A bayesian approach for inferring neuronal connectivity from calcium fluorescent imaging data. The Annals of Applied Statistics, 5(2B):1229–1261, 2011. [15] Bernard Ng, Ga¨el Varoquaux, Jean-Baptiste Poline, and Bertrand Thirion. A novel sparse graphical approach for multimodal brain connectivity inference. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2012, pages 707–714. Springer, 2012. [16] Yasser Roudi, Joanna Tyrcha, and John Hertz. Ising model for neural data: Model quality and approximate methods for extracting functional connectivity. Physical Review E, 79(5):051915, 2009. [17] Mark Schmidt. http://www.di.ens.fr/ mschmidt/software/minfunc.html. 2014. [18] Srinivas Gorur Shandilya and Marc Timme. Inferring network topology from complex dynamics. New Journal of Physics, 13(1):013004, 2011. [19] Olav Stetter, Demian Battaglia, Jordi Soriano, and Theo Geisel. Model-free reconstruction of excitatory neuronal connectivity from calcium imaging signals. PLoS computational biology, 8(8):e1002653, 2012. [20] Alexey Stomakhin, Martin B Short, and Andrea L Bertozzi. Reconstruction of missing data in social networks based on temporal patterns of interactions. Inverse Problems, 27(11):115013, 2011. [21] Antonio Sutera, Arnaud Joly, Aaron Qiu, Gilles Louppe, and Vincent Francois. https://github.com/asutera/kaggle-connectomics. 2014. [22] Frank Van Bussel, Birgit Kriener, and Marc Timme. Inferring synaptic connectivity from spatio-temporal spike patterns. Frontiers in computational neuroscience, 5, 2011. [23] Ga¨el Varoquaux, Alexandre Gramfort, Jean-Baptiste Poline, Bertrand Thirion, et al. Brain covariance selection: better individual functional connectivity models using population prior. In NIPS, volume 10, pages 2334–2342, 2010. 9
2014
219
5,313
Simultaneous Model Selection and Optimization through Parameter-free Stochastic Learning Francesco Orabona∗ Yahoo! Labs New York, USA francesco@orabona.com Abstract Stochastic gradient descent algorithms for training linear and kernel predictors are gaining more and more importance, thanks to their scalability. While various methods have been proposed to speed up their convergence, the model selection phase is often ignored. In fact, in theoretical works most of the time assumptions are made, for example, on the prior knowledge of the norm of the optimal solution, while in the practical world validation methods remain the only viable approach. In this paper, we propose a new kernel-based stochastic gradient descent algorithm that performs model selection while training, with no parameters to tune, nor any form of cross-validation. The algorithm builds on recent advancement in online learning theory for unconstrained settings, to estimate over time the right regularization in a data-dependent way. Optimal rates of convergence are proved under standard smoothness assumptions on the target function as well as preliminary empirical results. 1 Introduction Stochastic Gradient Descent (SGD) algorithms are gaining more and more importance in the Machine Learning community as efficient and scalable machine learning tools. There are two possible ways to use a SGD algorithm: to optimize a batch objective function, e.g. [23], or to directly optimize the generalization performance of a learning algorithm, in a stochastic approximation way [20]. The second use is the one we will consider in this paper. It allows learning over streams of data, coming Independent and Identically Distributed (IID) from a stochastic source. Moreover, it has been advocated that SGD theoretically yields the best generalization performance in a given amount of time compared to other more sophisticated optimization algorithms [6]. Yet, both in theory and in practice, the convergence rate of SGD for any finite training set critically depends on the step sizes used during training. In fact, often theoretical analysis assumes the use of optimal step sizes, rarely known in reality, and in practical applications wrong step sizes can result in arbitrarily bad performance. While in finite dimensional hypothesis spaces simple optimal strategies are known [2], in infinite dimensional spaces the only attempts to solve this problem achieve convergence only in the realizable case, e.g. [25], or assume prior knowledge of intrinsic (and unknown) characteristic of the problem [24, 29, 31, 33, 34]. The only known practical and theoretical way to achieve optimal rates in infinite Reproducing Kernel Hilbert Space (RKHS) is to use some form of cross-validation to select the step size that corresponds to a form of model selection [26, Chapter 7.4]. However, cross-validation techniques would result in a slower training procedure partially neglecting the advantage of the stochastic training. A notable exception is the algorithm in [21], that keeps the step size constant and the number of epochs on the training set acts as a regularizer. Yet, the number of epochs is decided through the use of a validation set [21]. ∗Work done mainly while at Toyota Technological Institute at Chicago. 1 Note that the situation is exactly the same in the batch setting where the regularization takes the role of the step size. Even in this case, optimal rates can be achieved only when the regularization is chosen in a problem dependent way [12, 17, 27, 32]. On a parallel route, the Online Convex Optimization (OCO) literature studies the possibility to learn in a scenario where the data are not IID [9, 36]. It turns out that this setting is strictly more difficult than the IID one and OCO algorithms can also be used to solve the corresponding stochastic problems [8]. The literature on OCO focuses on the adversarial nature of the problem and on various ways to achieve adaptivity to its unknown characteristics [1, 11, 14, 15]. This paper is in between these two different worlds: We extend tools from OCO to design a novel stochastic parameter-free algorithm able to obtain optimal finite sample convergence bounds in infinite dimensional RKHS. This new algorithm, called Parameter-free STOchastic Learning (PiSTOL), has the same complexity as the plain stochastic gradient descent procedure and implicitly achieves the model selection while training, with no parameters to tune nor the need for cross-validation. The core idea is to change the step sizes over time in a data-dependent way. As far as we know, this is the first algorithm of this kind to have provable optimal convergence rates. The rest of the paper is organized as follows. After introducing some basic notations (Sec. 2), we will explain the basic intuition of the proposed method (Sec. 3). Next, in Sec. 4 we will describe the PiSTOL algorithm and its regret bounds in the adversarial setting and in Sec. 5 we will show its convergence results in the stochastic setting. The detailed discussion of related work is deferred to Sec. 6. Finally, we show some empirical results and draw the conclusions in Sec. 7. 2 Problem Setting and Definitions Let X ⊂Rd a compact set and HK the RKHS associated to a Mercer kernel K : X × X →R implementing the inner product ⟨· , ·⟩K that satisfies the reproducing property, ⟨K(x, ·) , f(·)⟩K = f(x). Without loss of generality, in the following we will always assume ∥k(xt, ·)∥K ≤1. Performance is measured w.r.t. a loss function ℓ: R →R+. We will consider L-Lipschitz losses, that is |ℓ(x) −ℓ(x′)| ≤L|x −x′|, ∀x, x′ ∈R, and H-smooth losses, that is differentiable losses with the first derivative H-Lipschitz. Note that a loss can be both Lipschitz and smooth. A vector x is a subgradient of a convex function ℓat v if ℓ(u) −ℓ(v) ≥⟨u −v, x⟩for any u in the domain of ℓ. The differential set of ℓat v, denoted by ∂ℓ(v), is the set of all the subgradients of ℓat v. 1(Φ) will denote the indicator function of a Boolean predicate Φ. In the OCO framework, at each round t the algorithm receives a vector xt ∈X, picks a ft ∈HK, and pays ℓt(ft(xt)), where ℓt is a loss function. The aim of the algorithm is to minimize the regret, that is the difference between the cumulative loss of the algorithm, PT t=1 ℓt(ft(xt)), and the cumulative loss of an arbitrary and fixed competitor h ∈HK, PT t=1 ℓt(h(xt)). For the statistical setting, let ρ a fixed but unknown distribution on X × Y, where Y = [−1, 1]. A training set {xt, yt}T t=1 will consist of samples drawn IID from ρ. Denote by fρ(x) := R Y ydρ(y|x) the regression function, where ρ(·|x) is the conditional probability measure at x induced by ρ. Denote by ρX the marginal probability measure on X and let L2 ρX be the space of square integrable functions with respect to ρX , whose norm is denoted by ∥f∥L2ρX := qR X f 2(x)dρX . Note that fρ ∈L2 ρX . Define the ℓ-risk of f, as Eℓ(f) := R X×Y ℓ(yf(x))dρ. Also, define f ℓ ρ(x) := arg mint∈R R Y ℓ(yt)dρ(y|x), that gives the optimal ℓ-risk, Eℓ(f ℓ ρ) = inff∈L2 ρX Eℓ(f). In the binary classification case, define the misclassification risk of f as R(f) := P(y ̸= sign(f(x))). The infimum of the misclassification risk over all measurable f will be called Bayes risk and fc := sign(fρ), called the Bayes classifier, is such that R(fc) = inff∈L2ρX R(f). Let LK : L2 ρX →HK the integral operator defined by (LKf)(x) = R X K(x, x′)f(x′)dρX (x′). There exists an orthonormal basis {Φ1, Φ2, · · · } of L2 ρX consisting of eigenfunctions of LK with corresponding non-negative eigenvalues {λ1, λ2, · · · } and the set {λi} is finite or λk →0 when k →∞[13, Theorem 4.7]. Since K is a Mercer kernel, LK is compact and positive. Therefore, the fractional power operator Lβ K is well defined for any β ≥0. We indicate its range space by 2 Algorithm 1 Averaged SGD. Parameters: η > 0 Initialize: f1 = 0 ∈HK for t = 1, 2, . . . do Receive input vector xt ∈X Predict with ˆyt = ft(xt) Update ft+1 = ft + ηytℓ′(ytˆyt)k(xt, ·) end for Return ¯fT = 1 T PT t=1 ft Algorithm 2 The Kernel Perceptron. Parameters: None Initialize: f1 = 0 ∈HK for t = 1, 2, . . . do Receive input vector xt ∈X Predict with ˆyt = sign(ft(xt)) Suffer loss 1(ˆyt ̸= yt) Update ft+1 = ft + yt1(ˆyt ̸= yt)k(xt, ·) end for Figure 1: L2 ρX , HK, and Lβ K(L2 ρX ) spaces, with 0 < β1 < 1 2 < β2. Lβ K(L2 ρX ) :=  f = ∞ X i=1 aiΦi : X i:ai̸=0 a2 i λ−2β i < ∞  . (1) By the Mercer’s theorem, we have that L 1 2 K(L2 ρX ) = HK, that is every function f ∈HK can be written as L 1 2 Kg for some g ∈ L2 ρX , with ∥f∥K = ∥g∥L2ρX . On the other hand, by definition of the orthonormal basis, L0 K(L2 ρX ) = L2 ρX . Thus, the smaller β is, the bigger this space of the functions will be,1 see Fig. 1. This space has a key role in our analysis. In particular, we will assume that f ℓ ρ ∈Lβ K(L2 ρX ) for β > 0, that is ∃g ∈L2 ρX : f ℓ ρ = Lβ Kg. (2) 3 A Gentle Start: ASGD, Optimal Step Sizes, and the Perceptron Consider the square loss, ℓ(x) = (1 −x)2. We want to investigate the problem of training a predictor, ¯fT , on the training set {xt, yt}T t=1 in a stochastic way, using each sample only once, to have Eℓ( ¯fT ) converge to Eℓ(f ℓ ρ). The Averaged Stochastic Gradient Descent (ASGD) in Algorithm 1 has been proposed as a fast stochastic algorithm to train predictors [35]. ASGD simply goes over all the samples once, updates the predictor with the gradients of the losses, and returns the averaged solution. For ASGD with constant step size 0 < η ≤1 4, it is immediate to show2 that E[Eℓ( ¯fT )] ≤ inf h∈HK Eℓ(h) + ∥h∥2 K (ηT)−1 + 4η. (3) This result shows the link between step size and regularization: In expectation, the ℓ-risk of the averaged predictor will be close to the ℓ-risk of the best regularized function in HK. Moreover, the amount of regularization depends on the step size used. From (3), one might be tempted to choose η = O(T −1 2 ). With this choice, when the number of samples goes to infinity, ASGD would converge to the performance of the best predictor in HK at a rate of O(T −1 2 ), only if the infimum infh∈HK Eℓ(h) is attained by a function in HK. Note that even with a universal kernel we only have Eℓ(f ℓ ρ) = infh∈HK Eℓ(h) but there is no guarantee that the infimum is attained [26]. On the other hand, there is a vast, and often ignored, literature examining the general case when (2) holds [4, 7, 12, 17, 24, 27, 29, 31–34]. Under this assumption, this infimum is attained only when β ≥1 2, yet it is possible to prove convergence for β > 0. In fact, when (2) holds it is known that minh∈HK h Eℓ(h) + ∥h∥2 K (ηT)−1i −Eℓ(f ℓ ρ) = O((ηT)−2β) [13, Proposition 8.5]. Hence, it was observed in [33] that setting η = O(T − 2β 2β+1 ) in (3), we obtain E[Eℓ( ¯fT )]−Eℓ(f ℓ ρ) = O  T − 2β 2β+1  , 1The case that β < 1 implicitly assumes that HK is infinite dimensional. If HK has finite dimension, β is 0 or 1. See also the discussion in [27]. 2The proofs of this statement and of all other presented results are in [19] . 3 that is the optimal rate [27, 33]. Hence, the setting η = O(T −1 2 ) is optimal only when β = 1 2, that is f ℓ ρ ∈HK. In all the other cases, the convergence rate of ASGD to the optimal ℓ-risk is suboptimal. Unfortunately, β is typically unknown to the learner. On the other hand, using the tools to design self-tuning algorithms, e.g. [1, 14], it may be possible to design an ASGD-like algorithm, able to self-tune its step size in a data-dependent way. Indeed, we would like an algorithm able to select the optimal step size in (3), that is E[Eℓ( ¯fT )] ≤ inf h∈HK Eℓ(h) + min η>0 ∥h∥2 K (ηT)−1 + 4η = inf h∈HK Eℓ(h) + 4 ∥h∥K T −1 2 . (4) In the OCO setting, this would correspond to a regret bound of the form O(∥h∥K T 1 2 ). An algorithm that has this kind of guarantee is the Perceptron algorithm [22], see Algorithm 2. In fact, for the Perceptron it is possible to prove the following mistake bound [9]: Number of Mistakes ≤ inf h∈HK T X t=1 ℓh(yth(xt)) + ∥h∥2 K + ∥h∥K v u u t T X t=1 ℓh(yth(xt)), (5) where ℓh is the hinge loss, ℓh(x) = max(1 −x, 0). The Perceptron algorithm is similar to SGD but its behavior is independent of the step size, hence, it can be thought as always using the optimal one. Unfortunately, we are not done yet: While (5) has the right form of the bound, it is not a regret bound, rather only a mistake bound, specific for binary classification. In fact, the performance of the competitor h is measured with a different loss (hinge loss) than the performance of the algorithm (misclassification loss). For this asymmetry, the convergence when β < 1 2 cannot be proved. Instead, we need an online algorithm whose regret bound scales as O(∥h∥K T 1 2 ), returns the averaged solution, and, thanks to the equality in (4), obtains a convergence rate which would depend on min η>0 ∥h∥2 K (ηT)−1 + η. (6) Note that (6) has the same form of the expression in (3), but with a minimum over η. Hence, we can expect such algorithm to always have the optimal rate of convergence. In the next section, we will present an algorithm that has this guarantee. 4 PiSTOL: Parameter-free STOchastic Learning In this section we describe the PiSTOL algorithm. The pseudo-code is in Algorithm 3. The algorithm builds on recent advancement in unconstrained online learning [16, 18, 28]. It is very similar to a SGD algorithm [35], the main difference being the computation of the solution based on the past gradients, in line 4. Note that the calculation of ∥gt∥2 K can be done incrementally, hence, the computational complexity is the same as ASGD in a RKHS, Algorithm 1, that is O(d) in Rd and O(t) in a RKHS. For the PiSTOL algorithm we have the following regret bound. Theorem 1. Assume that the losses ℓt are convex and L-Lipschitz. Let a > 0 such that a ≥2.25L. Then, for any h ∈HK, the following bound on the regret holds for the PiSTOL algorithm T X t=1 [ℓt(ft(xt)) −ℓt(h(xt))] ≤∥h∥K v u u t2a L + T −1 X t=1 |st| ! log ∥h∥K √ aLT b + 1 ! + bφ a−1L  log (1 + T) , where φ(x) := x 2 exp  exp( x 2)(x+1)+2 1−x exp( x 2)−x  exp x 2  (x + 1) + 2  . This theorem shows that PiSTOL has the right dependency on ∥h∥K and T that was outlined in Sec. 3 and its regret bound is also optimal up to √log log T terms [18]. Moreover, Theorem 1 improves on the results in [16, 18], obtaining an almost optimal regret that depends on the sum of the absolute values of the gradients, rather than on the time T. This is critical to obtain a tighter bound when the losses are H-smooth, as shown in the next Corollary. 4 Algorithm 3 PiSTOL: Parameter-free STOchastic Learning. 1: Parameters: a, b, L > 0 2: Initialize: g0 = 0 ∈HK, α0 = aL 3: for t = 1, 2, . . . do 4: Set ft = gt−1 b αt−1 exp  ∥gt−1∥2 K 2αt−1  5: Receive input vector xt ∈X 6: Adversarial setting: Suffer loss ℓt(ft(xt)) 7: Receive subgradient st ∈partialℓt(ft(xt)) 8: Update gt = gt−1 −stk(xt, ·) and αt = αt−1 + a|st| ∥k(xt, ·)∥K 9: end for 10: Statistical setting: Return ¯fT = 1 T PT t=1 ft Corollary 1. Under the same assumptions of Theorem 1, if the losses ℓt are also H-smooth, then3 T X t=1 [ℓt(ft(xt)) −ℓt(h(xt))] = ˜O  max   ∥h∥ 4 3 K T 1 3 , ∥h∥K T 1 4 T X t=1 ℓt(h(xt)) + 1 ! 1 4     . This bound shows that, if the cumulative loss of the competitor is small, the regret can grow slower than √ T. It is worse than the regret bounds for smooth losses in [9, 25] because when the cumulative loss of the competitor is equal to 0, the regret still grows as ˜O  ∥f∥ 4 3 K T 1 3  instead of being constant. However, the PiSTOL algorithm does not require the prior knowledge of the norm of the competitor function h, as all the ones in [9, 25] do. In [19] , we also show a variant of PiSTOL for linear kernels with almost optimal learning rate for each coordinate. Contrary to other similar algorithms, e.g. [14], it is a truly parameter-free one. 5 Convergence Results for PiSTOL In this section we will use the online-to-batch conversion to study the ℓ-risk and the misclassification risk of the averaged solution of PiSTOL. We will also use the following definition: ρ has Tsybakov noise exponent q ≥0 [30] iff there exist cq > 0 such that PX({x ∈X : −s ≤fρ(x) ≤s}) ≤cqsq, ∀s ∈[0, 1]. (7) Setting α = q q+1 ∈[0, 1], and cα = cq + 1, condition (7) is equivalent [32, Lemma 6.1] to: PX(sign(f(x)) ̸= fc(x)) ≤cα(R(f) −R(fρ))α, ∀f ∈L2 ρX . (8) These conditions allow for faster rates in relating the expected excess misclassification risk to the expected ℓ-risk, as detailed in the following Lemma that is a special case of [3, Theorem 10]. Lemma 1. Let ℓ: R →R+ be a convex loss function, twice differentiable at 0, with ℓ′(0) < 0, ℓ′′(0) > 0, and with the smallest zero in 1. Assume condition (8) is verified. Then for the averaged solution ¯fT returned by PiSTOL it holds E[R( ¯fT )] −R(fc) ≤  32cα C E[Eℓ( ¯fT )] −Eℓ(f ℓ ρ)  1 2−α , C = min  −ℓ′(0), (ℓ′(0))2 ℓ′′(0)  . The results in Sec. 4 give regret bounds over arbitrary sequences. We now assume to have a sequence of training samples (xt, yt)T t=1 IID from ρ. We want to train a predictor from this data, that minimizes the ℓ-risk. To obtain such predictor we employ a so-called online-to-batch conversion [8]. For a convex loss ℓ, we just need to run an online algorithm over the sequence of data (xt, yt)T t=1, using the losses ℓt(x) = ℓ(ytx), ∀t = 1, · · · , T. The online algorithm will generate a sequence of solutions ft and the online-to-batch conversion can be obtained with a simple averaging of all the solutions, ¯fT = 1 T PT t=1 ft, as for ASGD. The average regret bound of the online algorithm becomes a convergence guarantee for the averaged solution [8]. Hence, for the averaged solution of PiSTOL, we have the following Corollary that is immediate from Corollary 1 and the results in [8]. 3For brevity, the ˜O notation hides polylogarithmic terms. 5 Corollary 2. Assume that the samples (xt, yt)T t=1 are IID from ρ, and ℓt(x) = ℓ(ytx). Then, under the assumptions of Corollary 1, the averaged solution of PiSTOL satisfies E[Eℓ( ¯fT )] ≤ inf h∈HK Eℓ(h) + ˜O  max n ∥h∥ 4 3 K T −2 3 , ∥h∥K T −3 4 TEℓ(h) + 1  1 4 o . Hence, we have a ˜O(T −2 3 ) convergence rate to the φ-risk of the best predictor in HK, if the best predictor has φ-risk equal to zero, and ˜O(T −1 2 ) otherwise. Contrary to similar results in literature, e.g. [25], we do not have to restrict the infimum over a ball of fixed radius in HK and our bounds depends on ˜O(∥h∥K) rather than O(∥h∥2 K), e.g. [35]. The advantage of not restricting the competitor in a ball is clear: The performance is always close to the best function in HK, regardless of its norm. The logarithmic terms are exactly the price we pay for not knowing in advance the norm of the optimal solution. For binary classification using Lemma 1, we can also prove a ˜O(T − 1 2(2−α) ) bound on the excess misclassification risk in the realizable setting, that is if f ℓ ρ ∈HK. It would be possible to obtain similar results with other algorithms, as the one in [25], using a doubling-trick approach [9]. However, this would result most likely in an algorithm not useful in any practical application. Moreover, the doubling-trick itself would not be trivial, for example the one used in [28] achieves a suboptimal regret and requires to start from scratch the learning over two different variables, further reducing its applicability in any real-world application. As anticipated in Sec. 3, we now show that the dependency on ˜O(∥h∥K) rather than on O(∥h∥2 K) gives us the optimal rates of convergence in the general case that f ℓ ρ ∈Lβ K(L2 ρX ), without the need to tune any parameter. This is our main result. Theorem 2. Assume that the samples (xt, yt)T t=1 are IID from ρ, (2) holds for β ≤1 2, and ℓt(x) = ℓ(ytx). Then, under the assumptions of Corollary 1, the averaged solution of PiSTOL satisfies • If β ≤1 3 then E[Eℓ( ¯fT )] −Eℓ(f ℓ ρ) ≤˜O  max n (Eℓ(f ℓ ρ) + 1/T) β 2β+1 T − 2β 2β+1 , T −2β β+1 o . • If 1 3 < β ≤1 2, then E[Eℓ( ¯fT )] −Eℓ(f ℓ ρ) ≤˜O  max n (Eℓ(f ℓ ρ) + 1/T) β 2β+1 T − 2β 2β+1 , (Eℓ(f ℓ ρ) + 1/T) 3β−1 4β T −1 2 , T −2β β+1 o . 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 −3 10 −2 10 −1 10 0 10 1 T Bound Excess ℓ-risk bound Eℓ(fℓ ρ) = 0 Eℓ(fℓ ρ) = 0.1 Eℓ(fℓ ρ) = 1 Figure 2: Upper bound on the excess ℓ-risk of PiSTOL for β = 1 2. This theorem guarantees consistency w.r.t. the ℓ-risk. We have that the rate of convergence to the optimal ℓ-risk is ˜O(T − 3β 2β+1 ), if Eℓ(f ℓ ρ) = 0, and ˜O(T − 2β 2β+1 ) otherwise. However, for any finite T the rate of convergence is ˜O(T −2β β+1 ) for any T = O(Eℓ(f ℓ ρ)−β+1 2β ). In other words, we can expect a first regime at faster convergence, that saturates when the number of samples becomes big enough, see Fig. 2. This is particularly important because often in practical applications the features and the kernel are chosen to have good performance, meaning low optimal ℓ-risk. Using Lemma 1, we have that the excess misclassification risk is ˜O(T − 2β (2β+1)(2−α) ) if Eℓ(f ℓ ρ) ̸= 0, and ˜O(T − 2β (β+1)(2−α) ) if Eℓ(f ℓ ρ) = 0. It is also worth noting that, being the algorithm designed to work in the adversarial setting, we expect its performance to be robust to small deviations from the IID scenario. Also, note that the guarantees of Corollary 2 and Theorem 2 hold simultaneously. Hence, the theoretical performance of PiSTOL is always better than both the ones of SGD with the step sizes tuned with the knowledge of β or with the agnostic choice η = O(T −1 2 ). In [19] , we also show another convergence result assuming a different smoothness condition. Regarding the optimality of our results, lower bounds for the square loss are known [27] under assumption (2) and further assuming that the eigenvalues of LK have a polynomial decay, that is (λi)i∈N ∼i−b, b ≥1. (9) 6 Condition (9) can be interpreted as an effective dimension of the space. It always holds for b = 1 [27] and this is the condition we consider that is usually denoted as capacity independent, see the discussion in [21, 33]. In the capacity independent setting, the lower bound is O(T − 2β 2β+1 ), that matches the asymptotic rates in Theorem 2, up to logarithmic terms. Even if we require the loss function to be Lipschitz and smooth, it is unlikely that different lower bounds can be proved in our setting. Note that the lower bounds are worst case w.r.t. Eℓ(f ℓ ρ), hence they do not cover the case Eℓ(f ℓ ρ) = 0, where we get even better rates. Hence, the optimal regret bound of PiSTOL in Theorem 1 translates to an optimal convergence rate for its averaged solution, up to logarithmic terms, establishing a novel link between these two areas. 6 Related Work The approach of stochastically minimizing the ℓ-risk of the square loss in a RKHS has been pioneered by [24]. The rates were improved, but still suboptimal, in [34], with a general approach for locally Lipschitz loss functions in the origin. The optimal bounds, matching the ones we obtain for Eℓ(f ℓ ρ) ̸= 0, were obtained for β > 0 in expectation by [33]. Their rates also hold for β > 1 2, while our rates, as the ones in [27], saturate at β = 1 2. In [29], high probability bounds were proved in the case that 1 2 ≤β ≤1. Note that, while in the range β ≥ 1 2, that implies fρ ∈HK, it is possible to prove high probability bounds [4, 7, 27, 29], the range 0 < β < 1 2 considered in this paper is very tricky, see the discussion in [27]. In this range no high probability bounds are known without additional assumptions. All the previous approaches require the knowledge of β, while our algorithm is parameter-free. Also, we obtain faster rates for the excess ℓ-risk, when Eℓ(f ℓ ρ) = 0. Another important difference is that we can use any smooth and Lipschitz loss, useful for example to generate sparse solutions, while the optimal results in [29, 33] are specific for the square loss. For finite dimensional spaces and self-concordant losses, an optimal parameter-free stochastic algorithm has been proposed in [2]. However, the convergence result seems specific to finite dimension. The guarantees obtained from worst-case online algorithms, for example [25], have typically optimal convergence only w.r.t. the performance of the best in HK, see the discussion in [33]. Instead, all the guarantees on the misclassification loss w.r.t. a convex ℓ-risk of a competitor, e.g. the Perceptron’s guarantee, are inherently weaker than the presented ones. To see why, assume that the classifier returned by the algorithm after seeing T samples is fT , these bounds are of the form of R(fT ) ≤Eℓ(h)+O(T −1 2 (∥h∥2 K +1)). For simplicity, assume the use of the hinge loss so that easy calculations show that f ℓ ρ = fc and Eℓ(f ℓ ρ) = 2R(fc). Hence, even in the easy case that fc ∈HK, we have R(fT ) ≤2R(fc) + O(T −1 2 (∥fc∥2 K + 1)), i.e. no convergence to the Bayes risk. In the batch setting, the same optimal rates were obtained by [4, 7] for the square loss, in high probability, for β > 1 2. In [27], using an additional assumption on the infinity norm of the functions in HK, they give high probability bounds also in the range 0 < β ≤1 2. The optimal tuning of the regularization parameter is achieved by cross-validation. Hence, we match the optimal rates of a batch algorithm, without the need to use validation methods. In Sec. 3 we saw that the core idea to have the optimal rate was to have a classifier whose performance is close to the best regularized solution, where the regularizer is ∥h∥K. Changing the regularization term from the standard ∥h∥2 K to ∥h∥q K with q ≥1 is not new in the batch learning literature. It has been first proposed for classification by [5], and for regression by [17]. Note that, in both cases no computational methods to solve the optimization problem were proposed. Moreover, in [27] it was proved that all the regularizers of the form ∥h∥q K with q ≥1 gives optimal convergence rates bound for the square loss, given an appropriate setting of the regularization weight. In particular, [27, Corollary 6] proves that, using the square loss and under assumptions (2) and (9), the optimal weight for the regularizer ∥h∥q K is T −2β+q(1−β) 2β+2/b . This implies a very important consequence, not mentioned in that paper: In the the capacity independent setting, that is b = 1, if we use the regularizer ∥h∥K, the optimal regularization weight is T −1 2 , independent of the exponent of the range space (1) where fρ belongs. Moreover, in the same paper it was argued that “From an algorithmic point of view however, q = 2 is currently the only feasible case, which in turn makes SVMs the method of choice”. Indeed, in this paper we give a parameter-free efficient procedure to 7 10 1 10 2 10 3 10 4 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 Number of Training Samples Percentage of Errors on the Test Set a9a, Gaussian Kernel SVM, 5−folds CV PiSTOL, averaged solution 10 2 10 3 10 4 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 Number of Training Samples Percentage of Errors on the Test Set SensIT Vehicle, Gaussian Kernel SVM, 5−folds CV PiSTOL, averaged solution 10 2 10 3 10 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Number of Training Samples Percentage of Errors on the Test Set news20.binary, Linear Kernel SVM, 5−folds CV PiSTOL, averaged solution Figure 3: Average test errors and standard deviations of PiSTOL and SVM w.r.t. the number of training samples over 5 random permutations, on a9a, SensIT Vehicle, and news20.binary. train predictors with smooth losses, that implicitly uses the ∥h∥K regularizer. Thanks to this, the regularization parameter does not need to be set using prior knowledge of the problem. 7 Discussion Borrowing from OCO and statistical learning theory tools, we have presented the first parameterfree stochastic learning algorithm that achieves optimal rates of convergence w.r.t. the smoothness of the optimal predictor. In particular, the algorithm does not require any validation method for the model selection, rather it automatically self-tunes in an online and data-dependent way. Even if this is mainly a theoretical work, we believe that it might also have a big potential in the applied world. Hence, as a proof of concept on the potentiality of this method we have also run a few preliminary experiments, to compare the performance of PiSTOL to an SVM using 5-folds cross-validation to select the regularization weight parameter. The experiments were repeated with 5 random shuffles, showing the average and standard deviations over three datasets.4 The latest version of LIBSVM was used to train the SVM [10]. We have that PiSTOL closely tracks the performance of the tuned SVM when a Gaussian kernel is used. Also, contrary to the common intuition, the stochastic approach of PiSTOL seems to have an advantage over the tuned SVM when the number of samples is small. Probably, cross-validation is a poor approximation of the generalization performance in that regime, while the small sample regime does not affect at all the analysis of PiSTOL. Note that in the case of News20, a linear kernel is used over the vectors of size 1355192. The finite dimensional case is not covered by our theorems, still we see that PiSTOL seems to converge at the same rate of SVM, just with a worse constant. It is important to note that the total time the 5-folds cross-validation plus the training with the selected parameter for the SVM on 58000 samples of SensIT Vehicle takes ∼6.5 hours, while our unoptimized Matlab implementation of PiSTOL less than 1 hour, ∼7 times faster. The gains in speed are similar on the other two datasets. This is the first work we know of in this line of research of stochastic adaptive algorithms for statistical learning, hence many questions are still open. In particular, it is not clear if high probability bounds can be obtained, as the empirical results hint, without additional hypothesis. Also, we only proved convergence w.r.t. the ℓ-risk, however for β ≥1 2 we know that f ℓ ρ ∈HK, hence it would be possible to prove the stronger convergence results on fT −f ℓ ρ K, e.g. [29]. Probably this would require a major change in the proof techniques used. Finally, it is not clear if the regret bound in Theorem 1 can be improved to depend on the squared gradients. This would result in a ˜O(T −1) bound for the excess ℓ-risk for smooth losses when Eℓ(f ℓ ρ) = 0 and β = 1 2. Acknowledgments I am thankful to Lorenzo Rosasco for introducing me to the beauty of the operator Lβ K and to Brendan McMahan for fruitful discussions. 4Datasets available at http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/. The precise details to replicate the experiments are in [19] . 8 References [1] P. Auer, N. Cesa-Bianchi, and C. Gentile. Adaptive and self-confident on-line learning algorithms. J. Comput. Syst. Sci., 64(1):48–75, 2002. [2] F. Bach and E. Moulines. Non-strongly-convex smooth stochastic approximation with convergence rate O(1/n). In NIPS, pages 773–781, 2013. [3] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, Classification, and Risk Bounds. Journal of the American Statistical Association, 101(473):138–156, March 2006. [4] F. Bauer, S. Pereverzev, and L. Rosasco. On regularization algorithms in learning theory. J. Complexity, 23(1):52–72, February 2007. [5] G. Blanchard, O. Bousquet, and P. Massart. Statistical performance of support vector machines. Ann. Statist., 36(2):489–531, 04 2008. [6] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems, volume 20, pages 161–168. NIPS Foundation, 2008. [7] A. Caponnetto and E. De Vito. Optimal rates for the regularized least-squares algorithm. Foundations of Computational Mathematics, 7(3):331–368, 2007. [8] N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Trans. Inf. Theory, 50(9):2050–2057, 2004. [9] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [10] C.-C. Chang and C.-J. Lin. LIBSVM: a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/˜cjlin/libsvm. [11] K. Chaudhuri, Y. Freund, and D. J. Hsu. A parameter-free hedging algorithm. In Advances in neural information processing systems, pages 297–305, 2009. [12] D.-R. Chen, Q. Wu, Y. Ying, and D.-X. Zhou. Support vector machine soft margin classifiers: Error analysis. Journal of Machine Learning Research, 5:1143–1175, 2004. [13] F. Cucker and D. X. Zhou. Learning Theory: An Approximation Theory Viewpoint. Cambridge University Press, New York, NY, USA, 2007. [14] J. C. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011. [15] H. Luo and R. E. Schapire. A drifting-games analysis for online learning and applications to boosting. In Advances in Neural Information Processing Systems, 2014. [16] H. B. McMahan and F. Orabona. Unconstrained online linear learning in Hilbert spaces: Minimax algorithms and normal approximations. In COLT, 2014. [17] S. Mendelson and J. Neeman. Regularization in kernel learning. Ann. Statist., 38(1):526–565, 02 2010. [18] F. Orabona. Dimension-free exponentiated gradient. In Advances in Neural Information Processing Systems 26, pages 1806–1814. Curran Associates, Inc., 2013. [19] F. Orabona. Simultaneous model selection and optimization through parameter-free stochastic learning, 2014. arXiv:1406.3816. [20] H. Robbins and S. Monro. A stochastic approximation method. Ann. Math. Stat., 22:400–407, 1951. [21] L. Rosasco, A. Tacchetti, and S. Villa. Regularization by early stopping for online learning algorithms, 2014. arXiv:1405.0042. [22] F. Rosenblatt. The Perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65:386–407, 1958. [23] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal Estimated sub-GrAdient SOlver for SVM. In Proc. of ICML, pages 807–814, 2007. [24] S. Smale and Y. Yao. Online learning algorithms. Found. Comp. Math, 6:145–170, 2005. [25] N. Srebro, K. Sridharan, and A. Tewari. Smoothness, low noise and fast rates. In Advances in Neural Information Processing Systems 23, pages 2199–2207. Curran Associates, Inc., 2010. [26] I. Steinwart and A. Christmann. Support Vector Machines. Springer, 2008. [27] I. Steinwart, D. R. Hush, and C. Scovel. Optimal rates for regularized least squares regression. In COLT, 2009. [28] M. Streeter and B. McMahan. No-regret algorithms for unconstrained online convex optimization. In Advances in Neural Information Processing Systems 25, pages 2402–2410. Curran Associates, Inc., 2012. [29] P. Tarr`es and Y. Yao. Online learning as stochastic approximation of regularization paths, 2013. arXiv:1103.5538. [30] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Ann. Statist., 32:135–166, 2004. [31] Y. Yao. On complexity issues of online learning algorithms. IEEE Trans. Inf. Theory, 56(12):6470–6481, 2010. [32] Y. Yao, L. Rosasco, and A. Caponnetto. On early stopping in gradient descent learning. Constr. Approx., 26:289–315, 2007. [33] Y. Ying and M. Pontil. Online gradient descent learning algorithms. Foundations of Computational Mathematics, 8(5):561–596, 2008. [34] Y. Ying and D.-X. Zhou. Online regularized classification algorithms. IEEE Trans. Inf. Theory, 52(11):4775–4788, 2006. [35] T. Zhang. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In Proc. of ICML, pages 919–926, New York, NY, USA, 2004. ACM. [36] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proc. of ICML, pages 928–936, 2003. 9
2014
22
5,314
General Stochastic Networks for Classification Matthias Z¨ohrer and Franz Pernkopf Signal Processing and Speech Communication Laboratory Graz University of Technology matthias.zoehrer@tugraz.at, pernkopf@tugraz.at Abstract We extend generative stochastic networks to supervised learning of representations. In particular, we introduce a hybrid training objective considering a generative and discriminative cost function governed by a trade-off parameter λ. We use a new variant of network training involving noise injection, i.e. walkback training, to jointly optimize multiple network layers. Neither additional regularization constraints, such as ℓ1, ℓ2 norms or dropout variants, nor pooling- or convolutional layers were added. Nevertheless, we are able to obtain state-of-the-art performance on the MNIST dataset, without using permutation invariant digits and outperform baseline models on sub-variants of the MNIST and rectangles dataset significantly. 1 Introduction Since 2006 there has been a boost in machine learning due to improvements in the field of unsupervised learning of representations. Most accomplishments originate from variants of restricted Boltzmann machines (RBMs) [1], auto-encoders (AE) [2, 3] and sparse-coding [4, 5, 6]. Deep models in representation learning, also obtain impressive results in supervised learning problems, such as speech recognition, e.g. [7, 8, 9] and computer vision tasks [10]. If no a-priori knowledge is modeled in the architecture, cf. convolutional layers or pooling layers [11], generatively pre-trained networks are among the best when applied to supervised learning tasks [12]. Usually, a generative representation is obtained through a greedy-layerwise training procedure called contrastive divergence (CD) [1]. In this case, the network layer learns the representation from the layer below by treating the latter as static input. Despite of the impressive results achieved with CD, we identify two (minor) drawbacks when used for supervised learning: Firstly, after obtaining a representation by pre-training a network, a new discriminative model is initialized with the trained weights, splitting the training into two separate models. This seems to be neither biologically plausible, nor optimal when it comes to optimization, as carefully designed early stopping criteria have to be implemented to prevent over- or under-fitting. Secondly, generative and discriminative objectives might influence each other beneficially when combined during training. CD does not take this into account. In this work, we introduce a new training procedure for supervised learning of representations. In particular we define a hybrid training objective for general stochastic networks (GSN), dividing the cost function into a generative and discriminative part, controlled by a trade-off parameter λ. It turns out that by annealing λ, when solving this unconstrained non-convex multi-objective optimization problem, we do not suffer from the shortcomings described above. We are able to obtain stateof-the-art performance on the MNIST [13] dataset, without using permutation invariant digits and significantly outperform baseline models on sub-variants of the MNIST and rectangle database [14]. Our approach is related to the generative-discriminative training approach of RBMs [15]. However a different model and a new variant of network training involving noise injection, i.e. walkback training [16, 17], is used to jointly optimize multiple network layers. Most notably, we did not 1 apply any additional regularization constraints, such as ℓ1, ℓ2 norms or dropout variants [12], [18], unlocking further potential for possible optimizations. The model can be extended to learn multiple tasks at the same time using jointly trained weights and by introducing multiple objectives. This might also open a new prospect in the field of transfer learning [19] and multi-task learning [20] beyond classification. This paper is organized as follows: Section 2 presents mathematical background material i.e. the GSN and a hybrid learning criterion. In Section 3 we empirically study the influence of hyper parameters of GSNs and present experimental results. Section 4 concludes the paper and provides a perspective on future work. 2 General Stochastic Networks Recently, a new supervised learning algorithm called walkback training for generalized autoencoders (GAE) was introduced [16]. A follow-up study [17] defined a new network model – generative stochastic networks, extending the idea of walkback training to multiple layers. When applied to image reconstruction, they were able to outperform various baseline systems, due to its ability to learn multi-modal representations [17, 21]. In this paper, we extend the work of [17]. First, we provide mathematical background material for generative stochastic networks. Then, we introduce modifications to make the model suitable for supervised learning. In particular we present a hybrid training objective, dividing the cost into a generative and discriminative part. This paves the way for any multi-objective learning of GSNs. We also introduce a new terminology, i.e. general stochastic networks, a model class including generative-, discriminative- and hybrid stochastic network variants. General Stochastic Networks for Unsupervised Learning Restricted Boltzmann machines (RBM) [22] and denoising autoencoders (DAE) [3] share the following commonality; The input distribution P(X) is sampled to convergence in a Markov chain. In the case of the DAE, the transition operator first samples the hidden state Ht from a corruption distribution C(H|X), and generates a reconstruction from the parametrized model, i.e the density Pθ2(X|H). Xt+0 Xt+1 Xt+2 Xt+3 Xt+4 Ht+1 Ht+2 Ht+3 Ht+4 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Figure 1: DAE Markov chain. The resulting DAE Markov chain, shown in Figure 1, is defined as Ht+1 ∼Pθ1(H|Xt+0) and Xt+1 ∼Pθ2(X|Ht+1), (1) where Xt+0 is the input sample X, fed into the chain at time step 0 and Xt+1 is the reconstruction of X at time step 1. In the case of a GSN, an additional dependency between the latent variables Ht over time is introduced to the network graph. The GSN Markov chain is defined as follows: Ht+1 ∼Pθ1(H|Ht+0, Xt+0) and Xt+1 ∼Pθ2(X|Ht+1). (2) Figure 2 shows the corresponding network graph. This chain can be expressed with deterministic functions of random variables fθ ⊇{ ˆfθ, ˇfθ}. In particular, the density fθ is used to model Ht+1 = fθ(Xt+0, Zt+0, Ht+0), specified for some independent noise source Zt+0, with the condition that Xt+0 cannot be recovered exactly from Ht+1. 2 Xt+0 Xt+1 Xt+2 Xt+3 Xt+4 Ht+1 Ht+2 Ht+3 Ht+4 Ht+0 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Pθ2 Pθ1 Figure 2: GSN Markov chain. We introduce ˆf i θ as a back-probable stochastic non-linearity of the form ˆf i θ = ηout + g(ηin + ˆai) with noise processes Zt ⊇{ηin, ηout} for layer i. The variable ˆai is the activation for unit i, where ˆai = W iIi t + bi with a weight matrix W i and bias bi, representing the parametric distribution. It is embedded in a non-linear activation function g. The input Ii t is either the realization xi t of observed sample Xi t or the hidden realization hi t of Hi t. In general, ˆf i θ(Ii t) specifies an upward path in a GSN for a specific layer i. In the case of Xi t+1 = ˇf i θ(Zt+0, Ht+1) we define ˇf i θ(Hi t) = ηout +g(ηin +ˇai) as a downward path in the network i.e. ˇai = (W i)T Hi t + bi, using the transpose of the weight matrix W i and the bias bi. This formulation allows to directly back-propagate the reconstruction log-likelihood P(X|H) for all parameters θ ⊇{W 0, ..., W d, b0, ..., bd} where d is the number of hidden layers. In Figure 2 the GSN includes a simple hidden layer. This can be extended to multiple hidden layers requiring multiple deterministic functions of random variables fθ ∈{ ˆf 0 θ , ..., ˆf d θ , ˇf 0 θ , ... ˇf d θ }. Figure 3 visualizes the Markov chain for a multi-layer GSN, inspired by the unfolded computational graph of a deep Boltzmann machine Gibbs sampling process. X0 t+0 X0 t+1 X0 t+2 X0 t+3 X0 t+4 H1 t+1 H1 t+2 H1 t+3 H1 t+4 H2 t+2 H2 t+3 H2 t+4 H3 t+3 H3 t+4 Xt+0 Lt{X0 t+1, Xt+0} Lt{X0 t+2, Xt+0} Lt{X0 t+3, Xt+0} Lt{X0 t+4, Xt+0} ˆf 0 θ ˇf 0 θ ˆf 0 θ ˇf 0 θ ˆf 0 θ ˆf 0 θ ˇf 0 θ ˆf 1 θ ˇf 0 θ ˆf 1 θ ˇf 1 θ ˇf 1 θ ˆf 1 θ ˇf 1 θ ˆf 2 θ ˇf 2 θ ˆf 2 θ ˇf 2 θ ˆf 0 θ ˆf 1 θ ˆf 2 θ Figure 3: GSN Markov chain with multiple layers and backprop-able stochastic units. In the training case, alternatively even or odd layers are updated at the same time. The information is propagated both upwards and downwards for K steps allowing the network to build higher order representations. An example for this update process is given in Figure 3. In the even update (marked in red) H1 t+1 = ˆf 0 θ (X0 t+0). In the odd update (marked in blue) X0 t+1 = ˇf 0 θ (H1 t+1) and H2 t+2 = ˆf 1 θ (H1 t+1) for k = 0. In the case of k = 1, H1 t+2 = ˆf 0 θ (X0 t+1) + ˇf 1 θ (H2 t+2) and H3 t+3 = ˆf 2 θ (H2 t+2) in the even update and X0 t+2 = ˇf 0 θ (H1 t+2) and H2 t+3 = ˆf 1 θ (H1 t+2) + ˇf 2 θ (H3 t+3) in the odd update. In case of k = 2, H1 t+3 = ˆf 0 θ (X0 t+2) + ˇf 1 θ (H2 t+3) and H3 t+4 = ˆf 2 θ (H2 t+3) in the even update and X0 t+3 = ˇf 0 θ (H1 t+3) and H2 t+4 = ˆf 1 θ (H1 t+3) + ˇf 2 θ (H3 t+4) in the odd update. The cost function of a generative GSN can be written as: C = K X k=1 Lt{X0 t+k, Xt+0}, (3) 3 Lt is a specific loss-function such as the mean squared error (MSE) at time step t. In general any arbitrary loss function could be used (as long as they can be seen as a log-likelihood) [16]. X0 t+k is the reconstruction of the input X0 t+0 at layer 0 after k steps. Optimizing the loss function by building the sum over the costs of multiple corrupted reconstructions is called walkback training [16, 17]. This form of network training leads to a significant performance boost when used for input reconstruction. The network is able to handle multi-modal input representations and is therefore considerably more favorable than standard generative models [16]. General Stochastic Networks for Supervised Learning In order to make a GSN suitable for a supervised learning task we introduce the output Y to the network graph. In this case L = log P(X) + log P(Y |X). Although the target Y is not fed into the network, it is introduced as an additional cost term. The layer update-process stays the same. X0 t+0 X0 t+1 X0 t+2 X0 t+3 X0 t+4 H1 t+1 H1 t+2 H1 t+3 H1 t+4 H2 t+2 H2 t+3 H2 t+4 H3 t+3 H3 t+4 Xt+0 Lt{X0 t+1, Xt+0} Lt{X0 t+2, Xt+0} Lt{X0 t+3, Xt+0} Lt{X0 t+4, Xt+0} Lt{H3 t+1, Yt+0} Lt{H3 t+2, Yt+0} ˆf 0 θ ˇf 0 θ ˆf 0 θ ˇf 0 θ ˆf 0 θ ˆf 0 θ ˇf 0 θ ˆf 1 θ ˇf 0 θ ˆf 1 θ ˇf 1 θ ˇf 1 θ ˆf 1 θ ˇf 1 θ ˆf 2 θ ˇf 2 θ ˆf 2 θ ˇf 2 θ ˆf 0 θ ˆf 1 θ ˆf 2 θ Figure 4: GSN Markov chain for input Xt+0 and target Yt+0 with backprop-able stochastic units. We define the following cost function for a 3-layer GSN: C = λ K K X k=1 Lt{Xt+k, Xt+0} | {z } generative + 1 −λ K −d + 1 K X k=d Lt{H3 t+k, Yt+0 | {z } discriminative } (4) This is a non-convex multi-objective optimization problem, where λ weights the generative and discriminative part of C. The parameter d specifies the number of network layers i.e. depth of the network. Scaling the mean loss in (4) is not mandatory, but allows to equally balance both loss terms with λ = 0.5 for input Xt+0 and target Yt+0 scaled to the same range. Again Figure 4 shows the corresponding network graph for supervised learning with red and blue edges denoting the even and odd network updates. In general the hybrid objective optimization criterion is not restricted to ⟨X, Y ⟩, as additional input and output terms could be introduced to the network. This setup might be useful for transfer-learning [19] or multi-task scenarios [20], which is not discussed in this paper. 3 Experimental Results In order to evaluate the capabilities of GSNs for supervised learning, we studied MNIST digits [13], variants of MNIST digits [14] and the rectangle datasets [14]. The first database consists of 60.000 labeled training and 10.000 labeled test images of handwritten digits. The second dataset includes 6 variants of MNIST digits, i.e. { mnist-basic, mnist-rot, mnist-back-rand, mnist-back-image, mnist-rot-back-image }, with additional factors of variation added to the original data. Each variant includes 10.000 labeled training, 2000 labeled validation, and 50.000 labeled test images. The third dataset involves two subsets, i.e. { rectangle, rectangle-image }. The dataset rectangle consists of 4 1000 labeled training, 200 labeled validation, and 50.000 labeled test images. The dataset rectangleimage includes 10.000 labeled train, 2000 labeled validation and 50.000 labeled test images. In a first experiment we focused on the multi-objective optimization problem defined in (4). Next we evaluated the number of walkback steps in a GSN, necessary for convergence. In a third experiment we analyzed the influence of different Gaussian noise settings during walkback training, improving the generalization capabilities of the network. Finally we summarize classification results for all datasets and compare to baseline systems [14]. 3.1 Multi-Objective Optimization in a Hybrid Learning Setup In order to solve the non-convex multi-objective optimization problem, variants of stochastic gradient descent (SGD) can be used. We applied a search over fixed λ values on all problems. Furthermore, we show that the use of an annealed λ factor, during training works best in practice. In all experiments a three layer GSN, i.e. GSN-3, with 2000 neurons in each layer, randomly initialized with small Gaussian noise, i.e. 0.01 · N(0, 1), and an MSE loss function for both inputs and targets was used. Regarding optimization we applied SGD with a learning rate η = 0.1, a momentum term of 0.9 and a multiplicative annealing factor ηn+1 = ηn · 0.99 per epoch n for the learning rate. A rectifier unit [23] was chosen as activation function. Following the ideas of [24] no explicit sampling was applied at the input and output layer. In the test case the zero-one loss was computed averaging the network’s output over k walkback steps. Analysis of the Hybrid Learning Parameter λ Concerning the influence of the trade-off parameter λ, we tested fixed λ values in the range λ ∈{0.01, 0.1, 0.2, ..., 0.9, 0.99}, where low values emphasize the discriminative part in the objective and vice versa. Walkback training with K = 6 steps using zero-mean pre- and postactivation Gaussian noise with zero mean and variance σ = 0.1 was performed for 500 training epochs. In a more dynamic scenario λn=1 = 1 was annealed by λn+1 = λn · τ to reach λn=500 ∈{0.01, 0.1, 0.2, ..., 0.9, 0.99} within 500 epochs, simulating generative pre-training to a certain extend. Figure 5: Influence of dynamic and static λ on MNIST variants basic (left), rotated (middle) and background (right) where ⋆denotes the training-, △the validation- and ▽the test-set. The dashed line denotes the static setup, the bold line the dynamic setup. Figure 5 compares the results of both GSNs, using static and dynamic λ setups on the MNIST variants basic, rotated and background. The use of a dynamic i.e. annealed λn=500 = 0.01, achieved the best validation and test error in all experiments. In this case, more attention was given to the generative proportion P(X) of the objective (4) in the early stage of training. After approximately 400 epochs discriminative training i.e. fine-tuning, dominates. This setup is closely related to DBN training, where emphasis is on optimizing P(X) at the beginning of the optimization, whereas P(Y |X) is important at the last stages. In case of the GSN, the annealed λ achieves a more smooth transition by shifting the weight in the optimization criterion from P(X) to P(Y |X) within one model. 5 Analysis of Walkback Steps K In a next experiment we tested the influence of K walkback steps for GSNs. Figure 6 shows the results for different GSNs, trained with K ∈{6, 7, 8, 9, 10} walkback steps and annealed λ with τ = 0.99. In all cases the information was at least propagated once up and once downwards in the d = 3 layer network using fixed Gaussian pre- and post-activation noise with µ = 0 and σ = 0.1. Figure 6: Evaluating the number of walkback steps on MNIST variants basic (left), rotated (middle) and background (right) where ⋆denotes the training-, △the validation- and ▽the test-set. Figure 6 shows that increasing the walkback steps, does not improve the generalization capabilities of the used GSNs. The setup K = 2 · d is sufficient for convergence and achieves the best validation and test result in all experiments. Analysis of Pre- and Post-Activation Noise Injecting noise during the training process of GSNs serves as a regularizer and improves the generalization capabilities of the model [17]. In this experiment the influence of Gaussian pre- and post-activation noise with µ = 0 and σ ∈{0.05, 0.1, 0.15, 0.2, 0.25, 0.3} and deactivated noise during training, was tested on a GSN-3 trained for K = 6 walkback steps. The trade-off factor λ was annealed with τ = 0.99. Figure 7 summarizes the results of the different GSNs for the MNIST variants basic, rotated and background. Setting σ = 0.1 achieved the best overall result on the validation- and test-set for all three experiments. In all other cases the GSNs either over- or underfitted the data. Figure 7: Evaluating noise injections during training on MNIST variants basic (left), rotated (middle) and background (right) where ⋆denotes the training-, △the validation- and ▽the test-set. 3.2 MNIST results Table 1 presents the average classification error of three runs of all MNIST variation datasets obtained by a GSN-3, using fixed Gaussian pre- and post-activation noise with µ = 0, σ = 0.1 and K = 6 walkback steps. The hybrid learning parameter λ was annealed with τ = 0.99 and λn=1 = 1. A small grid test was performed in the range of N × d with N ∈{1000, 2000, 3000} neurons per layer for d ∈{1, 2, 3} layers to find the optimal network configuration. 6 Dataset SVMrbf SVMpoly NNet DBN-1 SAA-3 DBN-3 GSN-3 mnist-basic 3.03 ±0.15 3.69 ±0.17 4.69 ±0.19 3.94 ±0.17 3.46 ±0.16 3.11 ±0.15 2.40 ±0.04 mnist-rot* 11.11 ±0.28 15.42 ±0.32 18.11 ±0.34 10.30 ±0.27 10.30 ±0.27 14.69 ±0.31 8.66 ±0.08 mnist-back-rand 14.58 ±0.31 16.62 ±0.33 20.04 ±0.35 9.80 ±0.26 11.28 ±0.28 6.73 ±0.22 9.38 ±0.03 mnist-back-image 22.61 ±0.37 24.01 ±0.37 27.41 ±0.39 16.15 ±0.32 23.00 ±0.37 16.31 ±0.32 16.04 ±0.04 mnist-rot-back-image* 55.18 ±0.44 56.41 ±0.43 62.16 ±0.43 47.39 ±0.44 51.93 ±0.44 52.21 ±0.44 43.86 ±0.05 rectangles 2.15 ±0.13 2.15 ±0.13 7.16 ±0.23 4.71 ±0.19 2.41 ±0.13 2.60 ±0.14 2.04 ±0.04 rectangles-image 24.04 ±0.37 24.05 ±0.37 33.20 ±0.41 23.69 ±0.37 24.05 ±0.37 22.50 ±0.37 22.10 ±0.03 Table 1: MNIST variations and recangle results [14]; For datasets marked by (*) updated results are shown [25]. Table 1 shows that a three layer GSN clearly outperforms all other models, except for the MNIST random-background dataset. In particular, when comparing the GSN-3 to the radial basis function support vector machine (SVMrbf), i.e. the second best model on MNIST basic, the GSN-3 achieved an relative improvement of 20.79% on the test set. On the MNIST rotated dataset the GSN-3 was able to beat the second best model i.e. DBN-1, by 15.92% on the test set. On the MNIST rotatedbackground there is an relative improvement of 7.25% on the test set between the second best model, i.e. DBN-1, and the GSN-3. All results are statistically significant. Regarding the number of model parameters, although we cannot directly compare the models in terms of network parameters, it is worth to mention that a far smaller grid test was used to generate the results for all GSNs, cf. [14]. When comparing the classification error of the GSN-3 trained without noise, obtained in the previous experiments (7) with Table 1, the GSN-3 achieved the test error of 2.72% on the MNIST variant basic, outperforming all other models on this task. On the MNIST variant rotated, the GSN-3 also outperformed the DBN-3, obtaining a test error of 11.2%. This indicates that not only the Gaussian regularizer in the walkback training improves the generalization capabilities of the network, but also the hybrid training criterion of the GSN. Table 2 lists the results for the MNIST dataset without additional affine transformations applied to the data i.e. permutation invariant digits. A three layer GSN achieved the state-of-the-art test error of 0.80%. Network Result Rectifier MLP + dropout [12] 1.05% DBM [26] 0.95% Maxout MLP + dropout [27] 0.94% MP-DBM [28] 0.91% Deep Convex Network [29] 0.83% Manifold Tangent Classifier [30] 0.81% DBM + dropout [12] 0.79% GSN-3 0.80% Table 2: MNIST results. 7 It might be worth noting that in addition to the noise process in walkback training, no other regularizers, such as ℓ1, ℓ2 norms and dropout variants [12], [18] were used in the GSNs. In general ≤800 training epochs with early-stopping are necessary for GSN training. All simulations1 were executed on a GPU with the help of the mathematical expression compiler Theano [31]. 4 Conclusions and Future Work We have extended GSNs for classification problems. In particular we defined an hybrid multiobjective training criterion for GSNs, dividing the cost function into a generative and discriminative part. This renders the need for generative pre-training unnecessary. We analyzed the influence of the objective’s trade-off parameter λ empirically, showing that by annealing λ we outperform a static choice of λ. Furthermore, we discussed effects of noise injections and sampling steps during walkback training. As a conservative starting point we restricted the model to use only rectifier units. Neither additional regularization constraints, such as ℓ1, ℓ2 norms or dropout variants [12], [18], nor pooling- [11, 32] or convolutional layers [11] were added. Nevertheless, the GSN was able to outperform various baseline systems, in particular a deep belief network (DBN), a multi layer perceptron (MLP), a support vector machine (SVM) and a stacked auto-associator (SSA), on variants of the MNIST dataset. Furthermore, we also achieved state-of-the-art performance on the original MNIST dataset without permutation invariant digits. The model not only converges faster in terms of training iterations, but also show better generalization behavior in most cases. Our approach opens a wide field of new applications for GSNs. In future research we explore adaptive noise injection methods for GSNs and non-convex multi-objective optimization strategies. References [1] G. E. Hinton, S. Osindero, and Y. Teh, “A fast learning algorithm for deep belief nets.” Neural computation, vol. 18, no. 7, pp. 1527–1554, 2006. [2] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle, “Greedy layer-wise training of deep networks,” in Advances in Neural Information Processing Systems (NIPS), 2007, pp. 153–160. [3] P. Vincent, H. Larochelle, Y. Bengio, and P. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in International Conference on Machine Learning (ICML), 2008, pp. 1096– 1103. [4] H. Lee, A. Battle, R. Raina, and A. Y. Ng, “Efficient sparse coding algorithms,” in Advances in Neural Information Processing Systems (NIPS), 2007, pp. 801–808. [5] J. Ngiam, Z. Chen, S. A. Bhaskar, P. W. Koh, and A. Y. Ng, “Sparse filtering,” in Advances in Neural Information Processing Systems (NIPS), 2011, pp. 1125–1133. [6] M. Ranzato, M. Poultney, S. Chopra, and Y. LeCun, “Efficient learning of sparse representations with an energy-based model,” in Advances in Neural Information Processing Systems (NIPS), 2006, pp. 1137– 1144. [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 (NIPS), 2010, pp. 469–477. [8] L. Deng, M. L. Seltzer, D. Yu, A. Acero, A. Mohamed, and G. E. Hinton, “Binary coding of speech spectrograms using a deep auto-encoder.” in Interspeech, 2010, pp. 1692–1695. [9] F. Seide, G. Li, and D. Yu, “Conversational speech transcription using context-dependent deep neural networks.” in Interspeech, 2011, pp. 437–440. [10] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems (NIPS), 2012, pp. 1097–1105. [11] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, 1998. [12] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Improving neural networks by preventing co-adaptation of feature detectors,” CoRR, vol. abs/1207.0580, 2012. 1The code will be made publicly available for reproducing the results. 8 [13] Y. Lecun and C. Cortes, “The MNIST database of handwritten digits,” 2014. [Online]. Available: http://yann.lecun.com/exdb/mnist/ [14] H. Larochelle, D. Erhan, A. Courville, J. Bergstra, and Y. Bengio, “An empirical evaluation of deep architectures on problems with many factors of variation,” in International Conference on Machine Learning (ICML), 2007, pp. 473–480. [15] H. Larochelle, M. Mandel, R. Pascanu, and Y. Bengio, “Learning algorithms for the classification restricted Boltzmann machine,” Journal of Machine Learning Research (JMLR), vol. 13, pp. 643–669, 2012. [16] Y. Bengio, L. Yao, G. Alain, and P. Vincent, “Generalized denoising auto-encoders as generative models,” in Advances in Neural Information Processing Systems (NIPS), 2013, pp. 899–907. [17] Y. Bengio, E. Thibodeau-Laufer, and J. Yosinski, “Deep generative stochastic networks trainable by backprop,” CoRR, vol. abs/1306.1091, 2013. [18] L. Wan and M. Zeiler, “Regularization of neural networks using dropconnect,” in International Conference on Machine Learning (ICML), 2013, pp. 109–111. [19] G. Mesnil, Y. Dauphin, X. Glorot, S. Rifai, Y. Bengio, I. J. Goodfellow, E. Lavoie, X. Muller, G. Desjardins, D. Warde-Farley, P. Vincent, A. Courville, and J. Bergstra, “Unsupervised and transfer learning challenge: a deep learning approach,” in Unsupervised and Transfer Learning challenge and workshop (JMLR W& CP), 2012, pp. 97–110. [20] K. Abhishek and D. Hal, “Learning task grouping and overlap in multi-task learning,” in International Conference on Machine Learning (ICML), 2012. [21] S. Ozair, L. Yao, and Y. Bengio, “Multimodal transitions for generative stochastic networks.” CoRR, vol. abs/1312.5578, 2013. [22] P. Smolensky, Information processing in dynamical systems: Foundations of harmony theory. MIT Press, 1986, vol. 1, no. 1, pp. 194–281. [23] X. Glorot, A. Bordes, and Y. Bengio, “Deep sparse rectifier neural networks,” in International Conference on Artificial Intelligence and Statisitics (AISTATS), 2011, pp. 315–323. [24] G. E. Hinton, “A practical guide to training restricted boltzmann machines,” in Neural Networks: Tricks of the Trade (2nd ed.), ser. Lecture Notes in Computer Science. Springer, 2012, pp. 599–619. [25] H. Larochelle, D. Erhan, A. Courville, J. Bergstra, and Y. Bengio, “Online companion for the paper an empirical evaluation of deep architectures on problems with many factors of variation,” 2014. [Online]. Available: http://www.iro.umontreal.ca/∼lisa/twiki/bin/view.cgi/Public/ DeepVsShallowComparisonICML2007 [26] R. Salakhutdinov and G. E. Hinton, “Deep boltzmann machines,” in International Conference on Artificial Intelligence and Statistics (AISTATS), 2009, pp. 448–455. [27] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio, “Maxout networks,” in International Conference on Machine Learning (ICML), 2013, pp. 1319–1327. [28] I. J. Goodfellow, A. C. Courville, and Y. Bengio, “Joint training deep boltzmann machines for classification,” CoRR, vol. abs/1301.3568, 2013. [29] D. Yu and L. Deng, “Deep convex net: A scalable architecture for speech pattern classification.” in Interspeech, 2011, pp. 2285–2288. [30] S. Rifai, Y. Dauphin, P. Vincent, Y. Bengio, and X. Muller, “The manifold tangent classifier,” in Advances in Neural Information Processing Systems (NIPS), 2012, pp. 2294–2302. [31] 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 Python for Scientific Computing Conference (SciPy), 2010. [32] M. Zeiler and R. Fergus, “Stochastic pooling for regularization of deep convolutional neural networks,” CoRR, vol. abs/1301.3557, 2013. 9
2014
220
5,315
Articulated Pose Estimation by a Graphical Model with Image Dependent Pairwise Relations Xianjie Chen University of California, Los Angeles Los Angeles, CA 90024 cxj@ucla.edu Alan Yuille University of California, Los Angeles Los Angeles, CA 90024 yuille@stat.ucla.edu Abstract We present a method for estimating articulated human pose from a single static image based on a graphical model with novel pairwise relations that make adaptive use of local image measurements. More precisely, we specify a graphical model for human pose which exploits the fact the local image measurements can be used both to detect parts (or joints) and also to predict the spatial relationships between them (Image Dependent Pairwise Relations). These spatial relationships are represented by a mixture model. We use Deep Convolutional Neural Networks (DCNNs) to learn conditional probabilities for the presence of parts and their spatial relationships within image patches. Hence our model combines the representational flexibility of graphical models with the efficiency and statistical power of DCNNs. Our method significantly outperforms the state of the art methods on the LSP and FLIC datasets and also performs very well on the Buffy dataset without any training. 1 Introduction Articulated pose estimation is one of the fundamental challenges in computer vision. Progress in this area can immediately be applied to important vision tasks such as human tracking [2], action recognition [25] and video analysis. Most work on pose estimation has been based on graphical model [8, 6, 27, 1, 10, 2, 4]. The graph nodes represent the body parts (or joints), and the edges model the pairwise relationships between the parts. The score function, or energy, of the model contains unary terms at each node which capture the local appearance cues of the part, and pairwise terms defined at the edges which capture the local contextual relations between the parts. Recently, DeepPose [23] advocates modeling pose in a holistic manner and captures the full context of all body parts in a Deep Convolutional Neural Network (DCNN) [12] based regressor. In this paper, we present a graphical model with image dependent pairwise relations (IDPRs). As illustrated in Figure 1, we can reliably predict the relative positions of a part’s neighbors (as well as the presence of the part itself) by only observing the local image patch around it. So in our model the local image patches give input to both the unary and pairwise terms. This gives stronger pairwise terms because data independent relations are typically either too loose to be helpful or too strict to model highly variable poses. Our approach requires us to have a method that can extract information about pairwise part relations, as well as part presence, from local image patches. We require this method to be efficient and to share features between different parts and part relationships. To do this, we train a DCNN to output 1 Lower Arm: Upper Arm: Elbow: Wrist: Figure 1: Motivation. The local image measurements around a part, e.g., in an image patch, can reliably predict the relative positions of all its neighbors (as well as detect the part). Center Panel: The local image patch centered at the elbow can reliably predict the relative positions of the shoulder and wrist, and the local image patch centered at the wrist can reliably predict the relative position of the elbow. Left & Right Panels: We define different types of pairwise spatial relationships (i.e., a mixture model) for each pair of neighboring parts. The Left Panel shows typical spatial relationships the elbow can have with its neighbors, i.e., the shoulder and wrist. The Right Panel shows typical spatial relationships the wrist can have with its neighbor, i.e., the elbow. estimates for the part presence and spatial relationships which are used in our unary and pairwise terms of our score function. The weight parameters of different terms in the model are trained using Structured Supported Vector Machine (S-SVM) [24]. In summary, our model combines the representational flexibility of graphical models, including the ability to represent spatial relationships, with the data driven power of DCNNs. We perform experiments on two standard pose estimation benchmarks: LSP dataset [10] and FLIC dataset [20]. Our method outperforms the state of the art methods by a significant margin on both datasets. We also do cross-dataset evaluation on Buffy dataset [7] (without training on this dataset) and obtain strong results which shows the ability of our model to generalize. 2 The Model The Graphical Model and its Variables: We represent human pose by a graphical model G = (V, E) where the nodes V specify the positions of the parts (or joints) and the edges E indicates which parts are spatially related. For simplicity, we impose that the graph structure forms a K−node tree, where K = |V|. The positions of the parts are denoted by l, where li = (x, y) specifies the pixel location of part i, for i ∈{1, . . . , K}. For each edge in the graph (i, j) ∈E, we specify a discrete set of spatial relationships indexed by tij, which corresponds to a mixture of different spatial relationships (see Figure 1). We denote the set of spatial relationships by t = {tij, tji|(i, j) ∈E}. The image is written as I. We will define a score function F(l, t|t) as follows as a sum of unary and pairwise terms. Unary Terms: The unary terms give local evidence for part i ∈V to lie at location li and is based on the local image patch I(li). They are of form: U(li|I) = wiφ(i|I(li); θ), (1) where φ(.|.; θ) is the (scalar-valued) appearance term with θ as its parameters (specified in the next section), and wi is a scalar weight parameter. Image Dependent Pairwise Relational (IDPR) Terms: These IDPR terms capture our intuition that neighboring parts (i, j) ∈E can roughly predict their relative spatial positions using only local information (see Figure 1). In our model, the relative positions of parts i and j are discretized into several types tij ∈{1, . . . , Tij} (i.e., a mixture of different relationships) with corresponding mean relative positions rtij ij plus small deformations which are modeled by the standard quadratic 2 deformation term. More formally, the pairwise relational score of each edge (i, j) ∈E is given by: R(li, lj, tij, tji|I) = ⟨wtij ij , ψ(lj −li −rtij ij )⟩+ wijϕ(tij|I(li); θ) + ⟨wtji ji , ψ(li −lj −rtji ji )⟩+ wjiϕ(tji|I(lj); θ) , (2) where ψ(∆l = [∆x, ∆y]) = [∆x ∆x2 ∆y ∆y2]⊺are the standard quadratic deformation features, ϕ(.|.; θ) is the Image Dependent Pairwise Relational (IDPR) term with θ as its parameters (specified in the next section), and wtij ij , wij, wtji ji , wji are the weight parameters. The notation ⟨., .⟩specifies dot product and boldface indicates a vector. The Full Score: The full score F(l, t|I) is a function of the part locations l, the pairwise relation types t, and the input image I. It is expressed as the sum of the unary and pairwise terms: F(l, t|I) = X i∈V U(li|I) + X (i,j)∈E R(li, lj, tij, tji|I) + w0, (3) where w0 is a scalar weight on constant 1 (i.e., the bias term). The model consists of three sets of parameters: the mean relative positions r = {rtij ij , rtji ji |(i, j) ∈E} of different pairwise relation types; the parameters θ of the appearance terms and IDPR terms; and the weight parameters w (i.e., wi, wtij ij , wij, wtji ji , wji and w0). See Section 4 for the learning of these parameters. 2.1 Image Dependent Terms and DCNNs The appearance terms and IDPR terms depend on the image patches. In other words, a local image patch I(li) not only gives evidence for the presence of a part i, but also about the relationship tij between it and its neighbors j ∈N(i), where j ∈N(i) if, and only if, (i, j) ∈E. This requires us to learn distribution for the state variables i, tij conditioned on the image patches I(li). In order to specify this distribution we must define the state space more precisely, because the number of pairwise spatial relationships varies for different parts with different numbers of neighbors (see Figure 1), and we need also consider the possibility that the patch does not contain a part. We define c to be the random variable which denotes which part is present c = i for i ∈{1, ..., K} or c = 0 if no part is present (i.e., the background). We define mcN(c) to be the random variable that determines the spatial relation types of c and takes values in McN(c). If c = i has one neighbor j (e.g., the wrist), then MiN(i) = {1, . . . , Tij}. If c = i has two neighbors j and k (e.g., the elbow), then MiN(i) = {1, . . . , Tij} × {1, . . . , Tik}. If c = 0, then we define M0N(0) = {0}. The full space is represented as: S = ∪K c=0{c} × McN(c) (4) The size of the space is |S| = PK c=0 |McN(c)|. Each element in this space corresponds to a part with all the types of its pairwise relationships, or the background. We use DCNN [12] to learn the conditional probability distribution p(c, mcN(c)|I(li); θ). DCNN is suitable for this task because it is very efficient and enables us to share features. See section 4 for more details. We specify the appearance terms φ(.|.; θ) and IDPR terms ϕ(.|.; θ) in terms of p(c, mcN(c)|I(li); θ) by marginalization: φ(i|I(li); θ) = log(p(c = i|I(li); θ)) (5) ϕ(tij|I(li); θ) = log(p(mij = tij|c = i, I(li); θ)) (6) 2.2 Relationship to other models We now briefly discuss how our method relates to standard models. Pictorial Structure: We recover pictorial structure models [6] by only allowing one relationship type (i.e., Tij = 1). In this case, our IDPR term conveys no information. Our model reduces to 3 standard unary and (image independent) pairwise terms. The only slight difference is that we use DCNN to learn the unary terms instead of using HOG filters. Mixtures-of-parts: [27] describes a model with a mixture of templates for each part, where each template is called a “type” of the part. The “type” of each part is defined by its relative position with respect to its parent. This can be obtained by restricting each part in our model to only predict the relative position of its parent (i.e., Tij = 1, if j is not parent of i). In this case, each part is associated with only one informative IDPR term, which can be merged with the appearance term of each part to define different “types” of part in [27]. Also this method does not use DCNNs. Conditional Random Fields (CRFs): Our model is also related to the conditional random field literature on data-dependent priors [18, 13, 15, 19]. The data-dependent priors and unary terms are typically modeled separately in the CRFs. In this paper, we efficiently model all the image dependent terms (i.e. unary terms and IDPR terms) together in a single DCNN by exploiting the fact the local image measurements are reliable for predicting both the presence of a part and the pairwise relationships of a part with its neighbors. 3 Inference To detect the optimal configuration for each person, we search for the configurations of the locations l and types t that maximize the score function: (l∗, t∗) = arg maxl,t F(l, t|I). Since our relational graph is a tree, this can be done efficiently via dynamic programming. Let K(i) be the set of children of part i in the graph (K(i) = ∅, if part i is a leaf), and Si(li|I) be maximum score of the subtree rooted at part i with part i located at li. The maximum score of each subtree can be computed as follow: Si(li|I) = U(li|I) + X k∈K(i) max lk,tik,tki(R(li, lk, tik, tki|I) + Sk(lk|I)) (7) Using Equation 7, we can recursively compute the overall best score of the model, and the optimal configuration of locations and types can be recovered by the standard backward pass of dynamic programming. Computation: Since our pairwise term is a quadratic function of locations, li and lj, the max operation over lk in Equation 7 can be accelerated by using the generalized distance transforms [6]. The resulting approach is very efficient, taking O(T 2LK) time once the image dependent terms are computed, where T is the number of relation types, L is the total number of locations, and K is the total number of parts in the model. This analysis assumes that all the pairwise spatial relationships have the same number of types, i.e., Tij = Tji = T, ∀(i, j) ∈E. The computation of the image dependent terms is also efficient. They are computed over all the locations by a single DCNN. Applying DCNN in a sliding fashion is inherently efficient, since the computations common to overlapping regions are naturally shared [22]. 4 Learning Now we consider the problem of learning the model parameters from images with labeled part locations, which is the data available in most of the human pose datasets [17, 7, 10, 20]. We derive type labels tij from part location annotations and adopt a supervised approach to learn the model. Our model consists of three sets of parameters: the mean relative positions r of different pairwise relation types; the parameters θ of the image dependent terms; and the weight parameters w. They are learnt separately by the K-means algorithm for r, DCNN for θ, and S-SVM for w. Mean Relative Positions and Type Labels: Given the labeled positive images {(In, ln)}N n=1, let dij be the relative position from part i to its neighbor j. We cluster the relative positions over the training set {dn ij}N n=1 to get Tij clusters (in the experiments Tij = 11 for all pairwise relations). Each cluster corresponds to a set of instances of part i that share similar spatial relationship with its neighbor part j. Thus we define each cluster as a pairwise relation type tij from part i to j in our model, and use the center of each cluster as the mean relative position rtij ij associated with each 4 type. In this way, the mean relative positions of different pairwise relation types are learnt, and the type label tn ij for each training instance is derived based on its cluster index. We use K-means in our experiments by setting K = Tij to do the clustering. Parameters of Image Dependent Terms: After deriving type labels, each local image patch I(ln) centered at an annotated part location is labeled with category label cn ∈{1, . . . , K}, that indicates which part is present, and also the type labels mn cnN(cn) that indicate its relation types with all its neighbors. In this way, we get a set of labelled patches {I(ln), cn, mn cnN(cn)}KN n=1 from positive images (each positive image provides K part patches), and also a set of background patches {I(ln), 0, 0} sampled from negative images. Given the labelled part patches and background patches, we train a multi-class DCNN classifier by standard stochastic gradient descent using softmax loss. The DCNN consists of five convolutional layers, 2 max-pooling layers and three fully-connected layers with a final |S| dimensions softmax output, which is defined as our conditional probability distribution, i.e., p(c, mcN(c)|I(li); θ). The architecture of our network is summarized in Figure 2. Weight Parameters: Each pose in the positive image is now labeled with annotated part locations and derived type labels: (In, ln, tn). We use S-SVM to learn the weight parameters w. The structure prediction problem is simplified by using 0 −1 loss, that is all the training examples either have all dimensions of its labels correct or all dimensions of its labels wrong. We denote the former ones as pos examples, and the later ones as neg examples. Since the full score function (Equation 3) is linear in the weight parameters w, we write the optimization function as: min w 1 2⟨w, w⟩+ C X n max(0, 1 −yn⟨w, Φ(In, ln, tn)⟩), (8) where yn ∈{1, −1}, and Φ(In, ln, tn) is a sparse feature vector representing the n-th example and is the concatenation of the image dependent terms (calculated from the learnt DCNN), spatial deformation features, and constant 1. Here yn = 1 if n ∈pos, and yn = −1 if n ∈neg. 5 Experiment This section introduces the datasets, clarifies the evaluation metrics, describes our experimental setup, presents comparative evaluation results and gives diagnostic experiments. 5.1 Datasets and Evaluation Metrics We perform our experiments on two publicly available human pose estimation benchmarks: (i) the “Leeds Sports Poses” (LSP) dataset [10], that contains 1000 training and 1000 testing images from sport activities with annotated full-body human poses; (ii) the “Frames Labeled In Cinema” (FLIC) dataset [20] that contains 3987 training and 1016 testing images from Hollywood movies with annotated upper-body human poses. We follow previous work and use the observer-centric annotations on both benchmarks. To train our models, we also use the negative training images from the INRIAPerson dataset [3] (These images do not contain people). We use the most popular evaluation metrics to allow comparison with previous work. Percentage of Correct Parts (PCP) is the standard evaluation metric on several benchmarks including the LSP dataset. However, as discussed in [27], there are several alternative interpretations of PCP that can lead to severely different results. In our paper, we use the stricter version unless otherwise stated, that is we evaluate only a single highest-scoring estimation result for one test image and a body part is considered as correct if both of its segment endpoints (joints) lie within 50% of the length of the ground-truth annotated endpoints (Each test image on the LSP dataset contains only one annotated person). We refer to this version of PCP as strict PCP. On the FLIC dataset, we use both strict PCP and the evaluation metric specified with it [20]: Percentage of Detected Joints (PDJ). PDJ measures the performance using a curve of the percentage of correctly localized joints by varying localization precision threshold. The localization precision threshold is normalized by the scale (defined as distance between left shoulder and right hip) of each ground truth pose to make it scale invariant. There are multiple people in the FLIC images, so each 5 36x36 3 5 5 conv + norm + pool conv conv conv dense dense + dropout 4096 4096 |S| 54x54 3 7 7 18x18 3 3 32 9x9 3 3 128 9x9 3 3 128 9x9 3 3 128 9x9 128 OR conv + norm + pool dense + dropout Figure 2: Architectures of our DCNNs. The size of input patch is 36 × 36 pixels on the LSP dataset, and 54 × 54 pixels on the FLIC dataset. The DCNNs consist of five convolutional layers, 2 max-pooling layers and three fully-connected (dense) layers with a final |S| dimensions output. We use dropout, local response normalization (norm) and overlapping pooling (pool) described in [12]. ground truth person is also annotated with a torso detection box. During evaluation, we return a single highest-scoring estimation result for each ground truth person by restricting our neck part to be localized inside a window defined by the provided torso box. 5.2 Implementation detail Data Augmentation: Our DCNN has millions of parameters, while only several thousand of training images are available. In order to reduce overfitting, we augment the training data by rotating the positive training images through 360◦. These images are also horizontally flipped to double the training images. This increases the number of training examples of body parts with different spatial relationships with its neighbors (See the elbows along the diagonal of the Left Panel in Figure 1). We hold out random positive images as a validation set for the DCNN training. Also the weight parameters w are trained on this held out set to reduce overfitting to training data. Note that our DCNN is trained using local part patches and background patches instead of the whole images. This naturally increases the number of training examples by a factor of K (the number of parts). Although the number of dimensions of the DCNN final output also increases linearly with the number of parts, the number of parameters only slightly increase in the last fully-connected layer. This is because most of the parameters are shared between different parts, and thus we can benefit from larger K by having more training examples per parameter. In our experiments, we increase K by adding the midway points between annotated parts, which results in 26 parts on the LSP dataset and 18 parts on the FLIC dataset. Covering a person by more parts also reduces the distance between neighboring parts, which is good for modeling foreshortening [27]. Graph Structure: We define a full-body graph structure for the LSP dataset, and a upper-body graph structure for the FLIC dataset respectively. The graph connects the annotated parts and their midways points to form a tree (See the skeletons in Figure 5 for clarification). Settings: We use the same number of types for all pairs of neighbors for simplicity. We set it as 11 on all datasets (i.e., Tij = Tji = 11, ∀(i, j) ∈E), which results in 11 spatial relation types for the parts with one neighbor (e.g., the wrist), 112 spatial relation types for the parts with two neighbors (e.g., the elbow), and so forth (recall Figure 1). The patch size of each part is set as 36 × 36 pixels on the LSP dataset, and 54 × 54 pixels on the FLIC dataset, as the FLIC images are of higher resolution. We use similar DCNN architectures on both datasets, which differ in the first layer because of different input patch sizes. Figure 2 visualizes the architectures we used. We use the Caffe [9] implementation of DCNN in our experiments. 5.3 Benchmark results We show strict PCP results on the LSP dataset in Table 1, and on the FLIC dataset in Table 2. We also show PDJ results on the FLIC dataset in Figure 3. As is shown, our method outperforms state of the art methods by a significant margin on both datasets (see the captions for detailed analysis). Figure 5 shows some estimation examples on the LSP and FLIC datasets. 6 Method Torso Head U.arms L.arms U.legs L.legs Mean Ours 92.7 87.8 69.2 55.4 82.9 77.0 75.0 Pishchulin et al. [16] 88.7 85.6 61.5 44.9 78.8 73.4 69.2 Ouyang et al. [14] 85.8 83.1 63.3 46.6 76.5 72.2 68.6 DeepPose* [23] 56 38 77 71 Pishchulin et al. [15] 87.5 78.1 54.2 33.9 75.7 68.0 62.9 Eichner&Ferrari [4] 86.2 80.1 56.5 37.4 74.3 69.3 64.3 Yang&Ramanan [26] 84.1 77.1 52.5 35.9 69.5 65.6 60.8 Table 1: Comparison of strict PCP results on the LSP dataset. Our method improves on all parts by a significant margin, and outperforms the best previously published result [16] by 5.8% on average. Note that DeepPose uses Person-Centric annotations and is trained with an extra 10,000 images. Method U.arms L.arms Mean Ours 97.0 86.8 91.9 MODEC[20] 84.4 52.1 68.3 Table 2: Comparison of strict PCP results on the FLIC dataset. Our method significantly outperforms MODEC [20]. 0 0.05 0.1 0.15 0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Precision Threshold Percentage of Detected Joints (PDJ) Elbows MODEC: 75.5% DeepPose: 91.0% Ours: 94.9% 0 0.05 0.1 0.15 0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Precision Threshold Percentage of Detected Joints (PDJ) Wrists MODEC: 57.9% DeepPose: 80.9% Ours: 92.0% Figure 3: Comparison of PDJ curves of elbows and wrists on the FLIC dataset. The legend shows the PDJ numbers at the threshold of 0.2. 5.4 Diagnostic Experiments We perform diagnostic experiments to show the cross-dataset generalization ability of our model, and better understand the influence of each term in our model. Cross-dataset Generalization: We directly apply the trained model on the FLIC dataset to the official test set of Buffy dataset [7] (i.e., no training on the Buffy dataset), which also contains upper-body human poses. The Buffy test set includes a subset of people whose upper-body can be detected. We get the newest detection windows from [5], and compare our results to previously published work on this subset. Most previous work was evaluated with the official evaluation toolkit of Buffy, which uses a less strict PCP implementation1. We refer to this version of PCP as Buffy PCP and report it along with the strict PCP in Table 3. We also show the PDJ curves in Figure 4. As is shown by both criterions, our method significantly outperforms the state of the arts, which shows the good generalization ability of our method. Also note that both DeepPose [23] and our method are trained on the FLIC dataset. Compared with Figure 3, the margin between our method and DeepPose significantly increases in Figure 4, which implies that our model generalizes better to the Buffy dataset. Method U.arms L.arms Mean Ours* 96.8 89.0 92.9 Ours* strict 94.5 84.1 89.3 Yang[27] 97.8 68.6 83.2 Yang[27] strict 94.3 57.5 75.9 Sapp[21] 95.3 63.0 79.2 FLPM[11] 93.2 60.6 76.9 Eichner[5] 93.2 60.3 76.8 Table 3: Cross-dataset PCP results on Buffy test subset. The PCP numbers are Buffy PCP unless otherwise stated. Note that our method is trained on the FLIC dataset. 0 0.05 0.1 0.15 0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Precision Threshold Percentage of Detected Joints (PDJ) Elbows Yang: 80.4% MODEC: 77.0% DeepPose*: 83.4% Ours*: 93.2% 0 0.05 0.1 0.15 0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Precision Threshold Percentage of Detected Joints (PDJ) Wrists Yang: 57.4% MODEC: 58.8% DeepPose*: 64.6% Ours*: 89.4% Figure 4: Cross-dataset PDJ curves on Buffy test subset. The legend shows the PDJ numbers at the threshold of 0.2. Note that both our method and DeepPose [23] are trained on the FLIC dataset. 1A part is considered correctly localized if the average distance between its endpoints (joints) and groundtruth is less than 50% of the length of the ground-truth annotated endpoints. 7 Method Torso Head U.arms L.arms U.legs L.legs Mean Unary-Only 56.3 66.4 28.9 15.5 50.8 45.9 40.5 No-IDPRs 87.4 74.8 60.7 43.0 73.2 65.1 64.6 Full Model 92.7 87.8 69.2 55.4 82.9 77.0 75.0 Table 4: Diagnostic term analysis strict PCP results on the LSP dataset. The unary term alone is still not powerful enough to get good results, even though it’s trained by a DCNN classifier. No-IDPRs method, whose pairwise terms are not dependent on the image (see Terms Analysis in Section 5.4), can get comparable performance with the state-of-the-art, and adding IDPR terms significantly boost our final performance to 75.0%. Terms Analysis: We design two experiments to better understand the influence of each term in our model. In the first experiment, we use only the unary terms and thus all the parts are localized independently. In the second experiment, we replace the IDPR terms with image independent priors (i.e., in Equation 2, wijϕ(tij|I(li); θ) and wjiϕ(tji|I(lj); θ) are replaced with scalar prior terms btij ij and btji ji respectively), and retrain the weight parameters along with the new prior terms. In this case, our pairwise relational terms do not depend on the image, but instead is a mixture of Gaussian deformations with image independent biases. We refer to the first experiment as Unary-Only and the second one as No-IDPRs, short for No IDPR terms. The experiments are done on the LSP dataset using identical appearance terms for fair comparison. We show strict PCP results in Table 4. As is shown, all terms in our model significantly improve the performance (see the caption for detail). 6 Conclusion We have presented a graphical model for human pose which exploits the fact the local image measurements can be used both to detect parts (or joints) and also to predict the spatial relationships between them (Image Dependent Pairwise Relations). These spatial relationships are represented by a mixture model over types of spatial relationships. We use DCNNs to learn conditional probabilities for the presence of parts and their spatial relationships within image patches. Hence our model combines the representational flexibility of graphical models with the efficiency and statistical power of DCNNs. Our method outperforms the state of the art methods on the LSP and FLIC datasets and also performs very well on the Buffy dataset without any training. Figure 5: Results on the LSP and FLIC datasets. We show the part localization results along with the graph skeleton we used in the model. The last row shows some failure cases, which are typically due to large foreshortening, occlusions and distractions from clothing or overlapping people. 7 Acknowledgements This research has been supported by grants ONR MURI N000014-10-1-0933, ONR N00014-12-10883 and ARO 62250-CS. The GPUs used in this research were generously donated by the NVIDIA Corporation. 8 References [1] X. Chen, R. Mottaghi, X. Liu, S. Fidler, R. Urtasun, and A. Yuille. Detect what you can: Detecting and representing objects using holistic models and body parts. In Computer Vision and Pattern Recognition (CVPR), 2014. [2] N.-G. Cho, A. L. Yuille, and S.-W. Lee. Adaptive occlusion state estimation for human pose tracking under self-occlusions. Pattern Recognition, 2013. [3] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Computer Vision and Pattern Recognition (CVPR), 2005. [4] M. Eichner and V. Ferrari. Appearance sharing for collective human pose estimation. In Asian Conference on Computer Vision (ACCV), 2012. [5] M. Eichner, M. Marin-Jimenez, A. Zisserman, and V. Ferrari. 2d articulated human pose estimation and retrieval in (almost) unconstrained still images. International Journal of Computer Vision (IJCV), 2012. [6] P. F. Felzenszwalb and D. P. Huttenlocher. Pictorial structures for object recognition. International Journal of Computer Vision (IJCV), 2005. [7] V. Ferrari, M. Marin-Jimenez, and A. Zisserman. Progressive search space reduction for human pose estimation. In Computer Vision and Pattern Recognition (CVPR), 2008. [8] M. A. Fischler and R. A. Elschlager. The representation and matching of pictorial structures. IEEE Transactions on Computers, 1973. [9] Y. Jia. Caffe: An open source convolutional architecture for fast feature embedding. http://caffe. berkeleyvision.org/, 2013. [10] S. Johnson and M. Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In British Machine Vision Conference (BMVC), 2010. [11] L. Karlinsky and S. Ullman. Using linking features in learning non-parametric part models. In European Conference on Computer Vision (ECCV), 2012. [12] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Neural Information Processing Systems (NIPS), 2012. [13] J. Lafferty, A. McCallum, and F. C. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In International Conference on Machine Learning (ICML), 2001. [14] W. Ouyang, X. Chu, and X. Wang. Multi-source deep learning for human pose estimation. In Computer Vision and Pattern Recognition (CVPR), 2014. [15] L. Pishchulin, M. Andriluka, P. Gehler, and B. Schiele. Poselet conditioned pictorial structures. In Computer Vision and Pattern Recognition (CVPR), 2013. [16] L. Pishchulin, M. Andriluka, P. Gehler, and B. Schiele. Strong appearance and expressive spatial models for human pose estimation. In International Conference on Computer Vision (ICCV), 2013. [17] D. Ramanan. Learning to parse images of articulated bodies. In Neural Information Processing Systems (NIPS), 2006. [18] C. Rother, V. Kolmogorov, and A. Blake. Grabcut: Interactive foreground extraction using iterated graph cuts. In ACM Transactions on Graphics (TOG), 2004. [19] B. Sapp, C. Jordan, and B. Taskar. Adaptive pose priors for pictorial structures. In Computer Vision and Pattern Recognition (CVPR), 2010. [20] B. Sapp and B. Taskar. Modec: Multimodal decomposable models for human pose estimation. In Computer Vision and Pattern Recognition (CVPR), 2013. [21] B. Sapp, A. Toshev, and B. Taskar. Cascaded models for articulated pose estimation. In European Conference on Computer Vision (ECCV), 2010. [22] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. In International Conference on Learning Representations (ICLR), 2014. [23] A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In Computer Vision and Pattern Recognition (CVPR), 2014. [24] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In International Conference on Machine Learning (ICML), 2004. [25] C. Wang, Y. Wang, and A. L. Yuille. An approach to pose-based action recognition. In Computer Vision and Pattern Recognition (CVPR), 2013. [26] Y. Yang and D. Ramanan. Articulated pose estimation with flexible mixtures-of-parts. In Computer Vision and Pattern Recognition (CVPR), 2011. [27] Y. Yang and D. Ramanan. Articulated human detection with flexible mixtures of parts. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2013. 9
2014
221
5,316
Deep Learning for Real-Time Atari Game Play Using Offline Monte-Carlo Tree Search Planning Xiaoxiao Guo Computer Science and Eng. University of Michigan guoxiao@umich.edu Satinder Singh Computer Science and Eng. University of Michigan baveja@umich.edu Honglak Lee Computer Science and Eng. University of Michigan honglak@umich.edu Richard Lewis Department of Psychology University of Michigan rickl@umich.edu Xiaoshi Wang Computer Science and Eng. University of Michigan xiaoshiw@umich.edu Abstract The combination of modern Reinforcement Learning and Deep Learning approaches holds the promise of making significant progress on challenging applications requiring both rich perception and policy-selection. The Arcade Learning Environment (ALE) provides a set of Atari games that represent a useful benchmark set of such applications. A recent breakthrough in combining model-free reinforcement learning with deep learning, called DQN, achieves the best realtime agents thus far. Planning-based approaches achieve far higher scores than the best model-free approaches, but they exploit information that is not available to human players, and they are orders of magnitude slower than needed for real-time play. Our main goal in this work is to build a better real-time Atari game playing agent than DQN. The central idea is to use the slow planning-based agents to provide training data for a deep-learning architecture capable of real-time play. We proposed new agents based on this idea and show that they outperform DQN. 1 Introduction Many real-world Reinforcement Learning (RL) problems combine the challenges of closed-loop action (or policy) selection with the already significant challenges of high-dimensional perception (shared with many Supervised Learning problems). RL has made substantial progress on theory and algorithms for policy selection (the distinguishing problem of RL), but these contributions have not directly addressed problems of perception. Deep learning (DL) approaches have made remarkable progress on the perception problem (e.g., [11, 17]) but do not directly address policy selection. RL and DL methods share the aim of generality, in that they both intend to minimize or eliminate domain-specific engineering, while providing “off-the-shelf” performance that competes with or exceeds systems that exploit control heuristics and hand-coded features. Combining modern RL and DL approaches therefore offers the potential for general methods that address challenging applications requiring both rich perception and policy-selection. The Arcade Learning Environment (ALE) is a relatively new and widely accessible class of benchmark RL problems that provide a particularly challenging combination of policy selection and perception. ALE includes an emulator and a large number of Atari 2600 (a 1970s–80s home video console) games. The complexity and diversity of the games—both in terms of perceptual challenges in mapping pixels to useful features for control and in terms of the control policies needed—make 1 ALE a useful set of benchmark RL problems, especially for evaluating general methods intended to achieve success without hand-engineered features. Since the introduction of ALE, there have been a number of attempts to build general-purpose Atari game playing agents. The departure point for this paper is a recent and significant breakthrough [16] that combines RL and DL to build agents for multiple Atari Games. It achieved the best machineagent real-time game play to date (in some games close to or better than human-level play), does not require feature engineering, and indeed reuses the same perception architecture and RL algorithm across all the games. We believe that continued progress on the ALE environment that preserves these advantages will extend to broad advances in other domains with significant perception and policy selection challenges. Thus, our immediate goal in the work reported here is to build even better performing general-purpose Atari Game playing agents. We achieve this by introducing new methods for combining RL and DL that use slow, off-line Monte Carlo tree search planning methods to generate training data for a deep-learned classifier capable of state-of-the-art real-time play. 2 Brief background on RL and DL and challenges of perception RL and more broadly decision-theoretic planning has a suite of methods that address the challenge of selecting/learning good policies, including value function approximation, policy search, and MonteCarlo Tree Search [9, 10] (MCTS). These methods have different strengths and weaknesses and there is increasing understanding of how to match them to different types of RL-environments. Indeed, an accumulating number of applications attest to this success. But it is still not the case that there are reasonably off-the-shelf approaches to solving complex RL problems of interest to Artificial Intelligence (AI) such as the games in ALE. One reason for this is that despite major advances there hasn’t been an off-the-shelf approach to significant perception problems. The perception problem itself has two components: 1) the sensors at any time step do not capture all the information in the history of observations, leading to partial observability, and 2) the sensors provide very highdimensional observations that introduce computational and sample-complexity challenges for policy selection. One way to handle the perception challenges when a model of the RL environment is available is to avoid the perception problem entirely by eschewing the building of an explicit policy and instead using repeated incremental planning via MCTS methods such as UCT [10] (discussed below). Either when a model is not available, or when an explicit representation of the policy is required, the usual approach to applied RL success has been to use expert-developed task-specific features of a short history of observations in combination with function approximation methods and some trial-anderror on the part of the application developer (on small enough problems this can be augmented with some automated feature selection methods). Eliminating the dependence of applied RL success on engineered features motivates our interest in combining RL and DL (though see [20] for early work in this direction). Over the past decades, deep learning (see [3, 19] for a survey) has emerged as a powerful technique for learning feature representations from data (again, this is in a stark contrast to the conventional way of hand-crafting features by domain experts). For example, DL has achieved state-of-the-art results in image classification [11, 4], speech recognition [15, 17, 6], and activity recognition [12, 8]. In DL, features are learned in a compositional hierarchy. Specifically, low-level features are learned to encode low-level statistical dependencies (e.g., “edges” in images), and higher-level features encode higher-order dependencies of the lower-level features (e.g., “object parts”) [14]. In particular, for data that has strong spatial or temporal dependencies, convolutional neural networks [13] have been shown to learn invariant high-level features that are informative for supervised tasks. Such convolutional neural networks were used in the recent successful combination of DL and RL for Atari Game playing [16] that forms the departure point of our work. We describe this work in more detail below. 3 Existing Work on Atari Games and a Performance Gap While the games in ALE are simpler than many modern games, they still pose significant challenges to human players. In RL terms, for a human player these games are Partially-Observable Markov Decision Processes (POMDPs). The true state of each game at any given point is captured by the 2 contents of the limited random-access memory (RAM). A human player does not observe the state and instead perceives the game screen (frame) which is a 2D array of 7-bit pixels, 160 pixels wide by 210 pixels high. The action space available to the player depends on the game but maximally consists of the 18 discrete actions defined by the joystick controller. The next state is a deterministic function of the previous state and the player’s action choice. Stochasticity in these games is limited to the choice of the initial state of the game (which can include a random number seed stored in RAM). So even though the state transitions are deterministic, the transitions from history of observations and actions to next observation can be stochastic (because of the stochastic initial hidden state). The immediate reward at any given step is defined by the game and made available by the ALE; it is usually a function of the current frame or the difference between current and previous frames. When running in real-time, the simulator generates 60 frames per second. All the games we consider terminate in a finite number of time-steps (and so are episodic). The goal in these games is to select an optimal policy, i.e., to select actions in such a way so as to maximize the expected value of the cumulative sum of rewards until termination. Model-Free RL Agents for Atari Games. Here we discuss work that does not access the state in the games and thus solves the game as a POMDP. In principle one could learn a state representation and infer an associated MDP model using frame-observation and action trajectories, but these games are so complex that this is rarely done. Instead, partial observability is dealt with by hand-engineering features of short histories of frames observed so far and model-free RL methods are used to learn good policies as a function of those feature representations. For example, the paper that introduced ALE [1], used SARSA with several different hand-engineered features sets. The contingency awareness approach [4] improved performance of the SARSA algorithm by augmenting the feature sets with a learned representation of the parts of the screen that are under the agent’s control. The sketch-based approach [2] further improves performance by using the tug-of-war sketch features. HyperNEAT-GGP [7] introduces an evolutionary policy search based Atari game player. Most recently Deep Q-Network (hereafter DQN) [16] uses a modified version of Q-Learning with a convolutional neural network (CNN) with three hidden layers for function approximation. This last approach is the state of the art in this class of methods for Atari games and is the basis for our work; we present the relevant details in Section 5. It does not use hand-engineered features but instead provides the last four raw frames as input (four instead of one to alleviate partial observability). Planning Agents for Atari Games based on UCT. These approaches access the state of the game from the emulator and hence face a deterministic MDP (other than the random choice of initial state). They incrementally plan the action to take in the current state using UCT, an algorithm widely used for games. UCT has three parameters, the number of trajectories, the maximum-depth (uniform for each trajectory), and a exploration parameter (a scalar set to 1 in all our experiments). In general, the larger the trajectory & depth parameters are, the slower UCT is but the better it is. UCT uses the emulator as a model to simulate trajectories as follows. Suppose it is generating the kth trajectory and the current node is at depth d and the current state is s. It computes a score for each possible action a in state-depth pair (s, d) as the sum of two terms, an exploitation term that is the MonteCarlo average of the discounted sum of rewards obtained from experiences with state-depth pair (s, d) in the previous k −1 trajectories, and an exploration term that is p log (n(s, d))/n(s, a, d) where n(s, a, d) and n(s, d) are the number of experiences of action a with state-depth pair (s, d) and with state-depth pair (s, d) respectively in the previous k −1 trajectories. UCT selects the action to simulate in order to extend the trajectory greedily with respect to this summed score. Once the input-parameter number of trajectories are generated each to maximum depth, UCT returns the exploitation term for each action at the root node (which is the current state it is planning an action for) as its estimate of the utility of taking that action in the current state of the game. UCT has the nice theoretical property that the number of simulation steps (number of trajectories × maximumdepth) needed to ensure any bound on the loss of following the UCT-based policy is independent of the size of the state space; this result expresses the fact that the use of UCT avoids the perception problem, but at the cost of requiring substantial computation for every time step of action selection because it never builds an explicit policy. Performance Gap & our Opportunity. The opportunity for this paper arises from the following observations. The model-free RL agents for Atari games are fast (indeed faster than real-time, e.g., the CNN-based approach from our paper takes 10−4 seconds to select an action on our computer) while the UCT-based planning agents are several orders of magnitude slower (much slower than real-time, e.g., they take seconds to select an action on the same computer). On the other hand, 3 the performance of UCT-based planning agents is much better than the performance of model-free RL agents (this will be evident in our results below). Our goal is to develop methods that retain the DL advantage of not needing hand crafted features and the online real-time play ability of the model-free RL agents by exploiting data generated by UCT-planning agents. 4 Methods for Combining UCT-based RL with DL We first describe the baseline UCT agent, and then three agents that instantiate different methods of combining the UCT agent with DL. Recall that in keeping with the goal of building general-purpose methods as in the DQN work we impose the constraint of reusing the same input representations, the same function approximation architecture, and the same planning method for all the games. 4.1 Baseline UCT agent that provides training data This agent requires no training. It does, however, require specification of its two parameters, the number of trajectories and the maximum-depth. Recall that our proposed new agents will all use data from this UCT-agent to train a CNN-based policy and so it is reasonable that the resulting performance of our proposed agents will be worse than that of the UCT-agent. Therefore, in our experiments we set these two parameters large enough to ensure that they outscore the published DQN scores, but not so large that they make our computational experiments unreasonably slow. Specifically, we elected to use 300 as maximum-depth and 10000 as number of trajectories for all games but two. Pong turns out to be a much simpler game and we could reduce the number of trajectories to 500, and Enduro turned out to have more distal rewards than the other games and so we used a maximum-depth of 400. As will be evident from the results in Section 5 this allowed the UCT agent to significantly outperform DQN in all games but Pong in which DQN already performs perfectly. We emphasize that the UCT agent does not meet our goal of real-time play. For example, to play a game just 800 times with the UCT agent (we do this to collect training data for our agent’s below) takes a few days on a recent multicore computer for each game. 4.2 Our three methods and their corresponding agents Method 1: UCTtoRegression (for UCT to CNN via Regression). The key idea is to use the action values computed by the UCT-agent to train a regression-based CNN. The following is done for each game. Collect 800 UCT-agent runs by playing the game 800 times from start to finish using the UCT agent above. Build a dataset (table) from these runs as follows. Map the last four frames of each state along each trajectory into the action-values of all the actions as computed by UCT. This training data is used to train the CNN via regression (see below for CNN details). The UCTtoRegression-agent uses the CNN learned by this training procedure to select actions during evaluation. Method 2: UCTtoClassification (for UCT to CNN via Classification). The key idea is to use the action choice computed by the UCT-agent (selected greedily from action-values) to train a classifierbased CNN. The following is done for each game. Collect 800 UCT-agent runs as above. These runs yield a table in which the rows correspond to the last four frames at each state along each trajectory and the single column is the choice of action that is best according to the UCT-agent at that state of the trajectory. This training data is used to train the CNN via multinomial classification (see below for CNN details). The UCTtoClassification-agent uses the CNN-classifier learned by this training procedure to select actions during evaluation. One potential issue with the above two agents is that the training data’s input distribution is generated by the UCT-agent while during testing the UCTtoRegression and UCTtoClassification agents will perform differently from the UCT-agent and thus could experience an input distribution quite difference from that of the UCT-agent’s. This could limit the testing performance of the UCTtoRegression and UCTtoClassification agents. Thus, it might be desirable to somehow bias the distribution over inputs to those likely to be encountered by these agents; this observation motivates our next method. Method 3: UCTtoClassification-Interleaved (for UCT to CNN via Classification-Interleaved). The key idea is to focus UCT planning on that part of the state space experienced by the (partially trained) CNN player. The method accomplishes this by interleaving training and data collection as 4 84 84 4 20 20 16 9 9 32 256 conv-layer (tanh) conv-layer (tanh) fully-connectedlayer (max(0,x)) fully-connectedlayer (linear) Figure 1: The CNN architecture from DQN [6] that we adopt in our agents. See text for details. follows1. Collect 200 UCT-agent runs as above; these will obviously have the same input distribution concern raised above. The data from these runs is used to train the CNN via multinomial classification just as in the UCTtoClassification-agent’s method (we do not do this for the UCTtoRegressionagent because as we show below it performs worse than the UCTtoClassification-agent). The trained CNN is then used to decide action choices in collecting a further 200 runs (though 5% of the time a random action is chosen to ensure some exploration). At each state of the game along each trajectory, UCT is asked to compute its choice of action and the original data set is augmented with the last four frames for each state as the rows and the column as UCT’s action choice. This 400 trajectory dataset’s input distribution is now potentially different from that of the UCT-agent. This dataset is used to train the CNN again via multinomial classification. This interleaved procedure is repeated until there are a total of 800 runs worth of data in the dataset for the final round of training of the CNN. The UCTtoClassification-Interleaved agent uses the final CNN-classifier learned by this training procedure to select actions during testing. In order to focus our empirical evaluation on the contribution of the non-DL part of our three new agents, we reused exactly the same convolutional neural network architecture as used in the DQN work (we describe this architecture in brief detail below). The DQN work modified the reward functions for some of the games (by saturating them at +1 and −1) while we use unmodified reward functions (these only play a role in the UCT-agent components of our methods and not in the CNN component). We also follow DQN’s frame-skipping techniques: the agent sees and selects actions on every kth frame instead of every frame (k = 3 for Space Invaders and k = 4 for all other games), and the latest chosen-action is repeated on subsequently-skipped frames. 4.3 Details of Data Preprocessing and CNN Architecture Preprocessing (identical to DQN to the best of our understanding). Raw Atari game frames are 160 × 210 pixel images with a 128-color palette. We convert the RGB representation to gray-scale and crop an 160 × 160 region of the image that captures the playing area, and then the cropped image is down-sampled to 84 × 84 in order to reuse DQN’s CNN architecture. This procedure is applied to the last 4 frames associated with a state and stacked to produce a 84×84×4 preprocessed input representation for each state. We subtracted the pixel-level means and scale the inputs to lie in the range [-1, 1]. We shuffle the training data to break the strong correlations between consecutive samples, which therefore reduces the variance of the updates. CNN Architecture. We use the same deep neural network architecture as DQN [16] for our agents. As depicted in Figure 1, our network consists of three hidden layers. The input to the neural network is an 84 × 84 × 4 image produced by the preprocessing procedure above. The first hidden layer convolves 16, 8 × 8, filters with stride 4 with the input image and applies a rectifier nonlinearity (tanh). The second hidden layer convolves 32, 4 × 4, filters with stride 2 again followed by a rectifier nonlinearity (tanh). The final hidden layer is fully connected and consists of 256 rectifier (max) units. In the multi-regression-based agent (UCTtoRegression), the output layer is a fully connected linear layer with a single output for each valid action. In the classification-based agents (UCTtoClassification, UCTtoClassification-Interleaved), a softmax (instead of linear) function is applied to the final output layer. We refer the reader to the DQN paper for further detail. 1Our UCTtoClassification-Interleaved method is a special case of DAgger [18] (in the use of a CNNclassifier and in the use of specific choices of parameters β1 = 1, and for i > 1, βi = 0). As a small point of difference, we note that our emphasis in this paper was in the use of CNNs to avoid the use of handcrafted domain specific features, while the empirical work for DAgger did not have the same emphasis and so used handcrafted features. 5 Table 1: Performance (game scores) of the four real-time game playing agents, where UCR is short for UCTtoRegression, UCC is short for UCTtoClassification, and UCC-I is short for UCTtoClassification-Interleaved. Agent B.Rider Breakout Enduro Pong Q*bert Seaquest S.Invaders DQN 4092 168 470 20 1952 1705 581 -best 5184 225 661 21 4500 1740 1075 UCC 5342 (20) 175(5.63) 558(14) 19(0.3) 11574(44) 2273(23) 672(5.3) -best 10514 351 942 21 29725 5100 1200 -greedy 5676 269 692 21 19890 2760 680 UCC-I 5388(4.6) 215(6.69) 601(11) 19(0.14) 13189(35.3) 2701(6.09) 670(4.24) -best 10732 413 1026 21 29900 6100 910 -greedy 5702 380 741 21 20025 2995 692 UCR 2405(12) 143(6.7) 566(10.2) 19(0.3) 12755(40.7) 1024 (13.8) 441(8.1) Table 2: Performance (game scores) of the off-line UCT game playing agent. Agent B.Rider Breakout Enduro Pong Q*bert Seaquest S.Invaders UCT 7233 406 788 21 18850 3257 2354 5 Experimental Results First we present our main performance results and then present some visualizations to help understand the performance of our agents. In Table 1 we compare and contrast the performance of the four real-time game playing agents, three of which (UCTtoRegression, UCTtoClassification, and UCTtoClassification-Interleaved) we implemented and evaluated; the performance of the DQN was obtained from [16]. The columns correspond to the seven games named in the header, and the rows correspond to different assessments of the four agents. Throughout the numbers in parentheses are standard-errors. The DQN row reports the average performance (game score) of the DQN agent (a random action is chosen 5% of the time during testing). The DQN-best row is the best performance of the DQN over all the attempts at each game incorporated in the row corresponding to DQN. Comparing the performance of the UCTtoClassification and UCTtoRegression agents (both use 5% exploration), we see that the UCTtoClassification agent either competes well with or significantly outperforms the UCTtoRegression agent. More importantly the UCTtoClassification agent outperforms the DQN agent in all games but Pong (in which both agents do nearly perfectly because the maximum score in this game is 21). In some games (B.Rider, Enduro, Q*Bert, Sequest and S.Invaders) the percentageperformance gain of UCTtoClassification over DQN is quite large. Similar gains are obtained in the comparison of UCTtoClassification-best to DQN-best. We used 5% exploration in our agents to match what the DQN agent does, but it is not clear why one should consider random action selection during testing. In any case, the effect of this randomness in action-selection will differ across games (based, e.g., on whether a wrong action can be terminal). Thus, we also present results for the UCTtoClassification-greedy agent in which we don’t do any exploration. As seen by comparing the rows corresponding to UCTtoClassification and UCTtoClassification-greedy, the latter agent always outperforms the former and in four games (Breakout, Enduro, Q*Bert, and Seaquest) achieves further large-percentage improvements. Table 2 gives the performance of our non-realtime UCT agent (again, with 5% exploration). As discussed above we selected UCT-agent’s parameters to ensure that this agent outperforms the DQN agent allowing room for our agents to perform in the middle. Finally, recall that the UCTtoClassification-Interleaved agent was designed so that its input distribution during training is more likely to match its input distribution during evaluation and we hypothesized that this would improve performance relative to UCTtoClassification. Indeed, in all games but B. Rider, Pong and S.Invaders in which the two agents perform similarly, UCTtoClassificationInterleaved significantly outperforms UCTtoClassification. The same holds when comparing 6 “submarine” “enemy” “diver” “enemy+diver” frame: t-3 t-2 t-1 t Figure 2: Visualization of the first-layer features learned from Seaquest. (Left) visualization of four first-layer filters; each filter covers four frames, showing the spatio-temporal template. (Middle) a captured screen. (Right) gray-scale version of the input screen which is fed into the CNN. Four filters were color-coded and visualized as dotted bounding boxes at the locations where they get activated. This figure is best viewed in color. UCTtoClassification-Interleaved-best and UCTtoClassification-best as well as UCTtoClassificationInterleaved-greedy and UCTtoClassification-greedy. In a further preliminary exploration of the effectiveness of the UCTtoClassification-Interleaved in exploiting additional computational resources for generating UCT runs, on the game Enduro we compared UCTtoClassification and UCTtoClassification-Interleaved where we allowed each of them twice the number of UCT runs used in producing the Table 1 above, i.e., 1600 runs while keeping a batch size of 200. The performance of UCTtoClassification improves from 558 to 581 while the performance of UCTtoClassification-Interleaved improves from 601 to 670, i.e., the interleaved method improved more in absolute and percentage terms as we increased the amount of training data. This is encouraging and is further confirmation of the hypothesis that motivated the interleaved method, because the interleaved input distribution would be even more like that of the final agent with the larger data set. Figure 3: Visualization of the second-layer features learned from Seaquest. Learned Features from Convolutional Layers. We provide visualizations of the learned filters in order to gain insights on what the CNN learns. Specifically, we apply the “optimal stimuli” method [5] to visualize the features CNN learned after training. The method picks the input image patches that generate the greatest responsive after convolution with the trained filters. We select 8*8*4 input patches to visualize the first convolutional layer features and 20*20*4 to visualize the second convolutional layer filters. Note that these patch sizes correspond to receptive field sizes of the learned features in each layer. In Figure 2, we show four first-layer filters of the CNN trained from Seaquest for UCTtoClassification-agent. Specifically, each filter covers four frames of 8*8 pixels, which can be viewed as a spatio-temporal template that captures specific patterns and their temporal changes. We also show an example screen capture and visualize where the filters get activated in the gray-scale version of the image (which is the actual input to the CNN model). The visualization suggests that the first-layer filters capture “object-part” patterns and their temporal movements. Figure 3 visualizes the four second-layer features via the optimal stimulus method, where each row corresponds to a filter. We can see that the second-layer features capture bigger spatial patterns (often covering beyond the size of individual objects), while encoding interactions between objects, such as two enemies moving together, and submarine moving along a direction. Overall, these qualitative results suggest that the CNN learns relevant patterns useful for game playing. 7 Step 69: FIRE Step 70: DOWN+FIRE Step 74:DOWN+FIRE Step 75:RIGHT+FIRE Step 76:RIGHT+FIRE Step 78: RIGHT+FIRE Step 79:DOWN+FIRE Figure 4: A visualization of the UCTtoClassification agent’s policy as it kills an enemy agent. Visualization of Learned Policy. Here we present visualizations of the policy learned by the UCTtoClassification agent with the aim of illustrating both what it does well and what it does not. Figure 4 shows the policy learned by UCTtoClassification to destroy nearby enemies. The CNN changes the action from ”Fire” to ”Down+Fire” at time step 70 when the enemies first show up at the right columns of the screen, which will move the submarine to the same horizontal position of the closest enemy. At time step 75, the submarine is at the horizontal position of the closest enemy and the action changes to “Right+Fire”. The “Right+Fire” action is repeated until the enemy is destroyed at time step 79. At time step 79, the predicted action is changed to “Down+Fire” again to move the submarine to the horizontal position of the next closest enemy. This shows the UCTtoClassification agent’s ability to deal with delayed reward as it learns to take a sequence of unrewarded actions before it obtains any reward when it finally destroys an enemy. Figure 4 also shows a shortcoming in the UCTtoClassification agent’s policy, namely it does not purposefully take actions to save a diver (saving a diver can lead to a large reward). For example, at time step 69, even though there are two divers below and to the right of the submarine (our agent), the learned policy does not move the submarine downward. This phenomenon was observed frequently. The reason for this shortcoming is that it can take a large number of time steps to capture 6 divers and bring them to surface (bringing fewer divers to the surface does not yield a reward); this takes longer than the planning depth of UCT. Thus, it is UCT that does not purposefully save divers and thus the training data collected via UCT reflects that defect which is then also present in the play of the UCTtoClassification (and UCTtoClassification-Interleaved) agent. 6 Conclusion UCT-based planning agents are unrealistic for Atari game play in at least two ways. First, to play the game they require access to the state of the game which is unavailable to human players, and second they are orders of magnitude slower than realtime. On the other hand, by slowing the game down enough to allow UCT to play leads to the highest scores on the games they have been tried on. Indeed, by allowing UCT more and more time (and thus allowing for larger number of trajectories and larger maximum-depth) between moves one can presumably raise the score more and more. We identified a gap between the UCT-based planning agents performance and the best realtime player DQN’s performance and developed new agents to partially fill this gap. Our main applied result is that at the time of the writing of this paper we have the best realtime Atari game playing agents on the same 7 games that were used to evaluate DQN. Indeed, in most of the 7 games our best agent beats DQN significantly. Another result is that at least in our experiments training the CNN to learn a classifier that maps game observations to actions was better than training the CNN to learn a regression function that maps game observations to action-values (we intend to do further work to confirm how general this result is on ALE). Finally, we hypothesized that the difference in input distribution between the UCT agent that generates the training data and the input distribution experienced by our learned agents would diminish performance. The UCTtoClassification-Interleaved agent we developed to deal with this issue indeed performed better than the UCTtoClassification agent indirectly confirming our hypothesis and solving the underlying issue. Acknowledgments. This work was supported in part by NSF grant IIS-1148668. Any opinions, findings, conclusions, or recommendations expressed here are those of the authors and do not necessarily reflect the views of the sponsors. 8 References [1] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: an evaluation platform for general agents. Journal of Artificial Intelligence Research, 47(1):253– 279, 2013. [2] M. G. Bellemare, J. Veness, and M. Bowling. Sketch-based linear value function approximation. In Advances in Neural Information Processing Systems, pages 2222–2230, 2012. [3] Y. Bengio. Learning deep architectures for AI. Foundations and trends in Machine Learning, 2(1):1–127, 2009. [4] D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012, pages 3642–3649. IEEE, 2012. [5] D. Erhan, Y. Bengio, A. Courville, and P. Vincent. Visualizing higher-layer features of a deep network. Technical report, University of Montreal, 2009. [6] A. Graves, A. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2013, pages 6645–6649. IEEE, 2013. [7] M. Hausknecht, P. Khandelwal, R. Miikkulainen, and P. Stone. HyperNEAT-GGP: A hyperNEAT-based Atari general game player. In Proceedings of the fourteenth international conference on Genetic and evolutionary computation conference, pages 217–224. ACM, 2012. [8] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. [9] M. Kearns, Y. Mansour, and A. Y. Ng. A sparse sampling algorithm for near-optimal planning in large Markov decision processes. Machine Learning, 49(2-3):193–208, 2002. [10] L. Kocsis and C. Szepesv´ari. Bandit based Monte-Carlo planning. In Machine Learning: European Conference on Machine Learning 2006, pages 282–293. Springer, 2006. [11] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. [12] Q. V. Le, W. Y. Zou, S. Y. Yeung, and A. Y. Ng. Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2011, pages 3361–3368. IEEE, 2011. [13] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [14] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the 26th International Conference on Machine Learning, pages 609–616, 2009. [15] H. Lee, P. Pham, Y. Largman, and A. Y. Ng. Unsupervised feature learning for audio classification using convolutional deep belief networks. In Advances in Neural Information Processing Systems, pages 1096–1104, 2009. [16] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller. Playing Atari with deep reinforcement learning. In Deep Learning, Neural Information Processing Systems Workshop, 2013. [17] A. Mohamed, G. E. Dahl, and G. Hinton. Acoustic modeling using deep belief networks. IEEE Transactions on Audio, Speech, and Language Processing, 20(1):14–22, 2012. [18] S. Ross, G. J. Gordon, and J. A. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics (AISTATS), 2011. [19] J. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 2014. [20] G. Tesauro. Temporal difference learning and TD-gammon. Communications of the ACM, 38(3):58–68, 1995. 9
2014
222
5,317
Near-optimal sample compression for nearest neighbors Lee-Ad Gottlieb Department of Computer Science and Mathematics, Ariel University Ariel, Israel. leead@ariel.ac.il Aryeh Kontorovich Computer Science Department, Ben Gurion University Beer Sheva, Israel. karyeh@cs.bgu.ac.il Pinhas Nisnevitch Department of Computer Science and Mathematics, Ariel University Ariel, Israel. pinhasn@gmail.com Abstract We present the first sample compression algorithm for nearest neighbors with nontrivial performance guarantees. We complement these guarantees by demonstrating almost matching hardness lower bounds, which show that our bound is nearly optimal. Our result yields new insight into margin-based nearest neighbor classification in metric spaces and allows us to significantly sharpen and simplify existing bounds. Some encouraging empirical results are also presented. 1 Introduction The nearest neighbor classifier for non-parametric classification is perhaps the most intuitive learning algorithm. It is apparently the earliest, having been introduced by Fix and Hodges in 1951 (technical report reprinted in [1]). In this model, the learner observes a sample S of labeled points (X, Y ) = (Xi, Yi)i∈[n], where Xi is a point in some metric space X and Yi ∈{1, −1} is its label. Being a metric space, X is equipped with a distance function d : X × X →R. Given a new unlabeled point x ∈X to be classified, x is assigned the same label as its nearest neighbor in S, which is argminYi∈Y d(x, Xi). Under mild regularity assumptions, the nearest neighbor classifier’s expected error is asymptotically bounded by twice the Bayesian error, when the sample size tends to infinity [2].1 These results have inspired a vast body of research on proximity-based classification (see [4, 5] for extensive background and [6] for a recent refinement of classic results). More recently, strong margin-dependent generalization bounds were obtained in [7], where the margin is the minimum distance between opposite labeled points in S. In addition to provable generalization bounds, nearest neighbor (NN) classification enjoys several other advantages. These include simple evaluation on new data, immediate extension to multiclass labels, and minimal structural assumptions — it does not assume a Hilbertian or even a Banach space. However, the naive NN approach also has disadvantages. In particular, it requires storing the entire sample, which may be memory-intensive. Further, information-theoretic considerations show that exact NN evaluation requires Θ(|S|) time in high-dimensional metric spaces [8] (and possibly Euclidean space as well [9]) — a phenomenon known as the algorithmic curse of dimensionality. Lastly, the NN classifier has infinite VC-dimension [5], implying that it tends to overfit the data. 1A Bayes-consistent modification of the 1-NN classifier was recently proposed in [3]. 1 This last problem can be mitigated by taking the majority vote among k > 1 nearest neighbors [10, 11, 5], or by deleting some sample points so as to attain a larger margin [12]. Shortcomings in the NN classifier led Hart [13] to pose the problem of sample compression. Indeed, significant compression of the sample has the potential to simultaneously address the issues of memory usage, NN search time, and overfitting. Hart considered the minimum Consistent Subset problem — elsewhere called the Nearest Neighbor Condensing problem — which seeks to identify a minimal subset S∗⊂S that is consistent with S, in the sense that the nearest neighbor in S∗of every x ∈S possesses the same label as x. This problem is known to be NP-hard [14, 15], and Hart provided a heuristic with runtime O(n3). The runtime was recently improved by [16] to O(n2), but neither paper gave performance guarantees. The Nearest Neighbor Condensing problem has been the subject of extensive research since its introduction [17, 18, 19]. Yet surprisingly, there are no known approximation algorithms for it — all previous results on this problem are heuristics that lack any non-trivial approximation guarantees. Conversely, no strong hardness-of-approximation results for this problem are known, which indicates a gap in the current state of knowledge. Main results. Our contribution aims at closing the existing gap in solutions to the Nearest Neighbor Condensing problem. We present a simple near-optimal approximation algorithm for this problem, where our only structural assumption is that the points lie in some metric space. Define the scaled margin γ < 1 of a sample S as the ratio of the minimum distance between opposite labeled points in S to the diameter of S. Our algorithm produces a consistent set S′ ⊂S of size ⌈1/γ⌉ddim(S)+1 (Theorem 1), where ddim(S) is the doubling dimension of the space S. This result can significantly speed up evaluation on test points, and also yields sharper and simpler generalization bounds than were previously known (Theorem 3). To establish optimality, we complement the approximation result with an almost matching hardness-of-approximation lower-bound. Using a reduction from the Label Cover problem, we show that the Nearest Neighbor Condensing problem is NP-hard to approximate within factor 2(ddim(S) log(1/γ))1−o(1) (Theorem 2). Note that the above upper-bound is an absolute size guarantee, and stronger than an approximation guarantee. Additionally, we present a simple heuristic to be applied in conjunction with the algorithm of Theorem 1, that achieves further sample compression. The empirical performances of both our algorithm and heuristic seem encouraging (see Section 4). Related work. A well-studied problem related to the Nearest Neighbor Condensing problem is that of extracting a small set of simple conjunctions consistent with much of the sample, introduced by [20] and shown by [21] to be equivalent to minimum Set Cover (see [22, 23] for further extensions). This problem is monotone in the sense that adding a conjunction to the solution set can only increase the sample accuracy of the solution. In contrast, in our problem the addition of a point of S to S∗ can cause S∗to be inconsistent — and this distinction is critical to the hardness of our problem. Removal of points from the sample can also yield lower dimensionality, which itself implies faster nearest neighbor evaluation and better generalization bounds. For metric spaces, [24] and [25] gave algorithms for dimensionality reduction via point removal (irrespective of margin size). The use of doubling dimension as a tool to characterize metric learning has appeared several times in the literature, initially by [26] in the context of nearest neighbor classification, and then in [27] and [28]. A series of papers by Gottlieb, Kontorovich and Krauthgamer investigate doubling spaces for classification [12], regression [29], and dimension reduction [25]. k-nearest neighbor. A natural question is whether the Nearest Neighbor Condensing problem of [13] has a direct analogue when the 1-nearest neighbor rule is replaced by a (k > 1)-nearest neighbor – that is, when the label of a point is determined by the majority vote among its k nearest neighbors. A simple argument shows that the analogy breaks down. Indeed, a minimal requirement for the condensing problem to be meaningful is that the full (uncondensed) set S is feasible, i.e. consistent with itself. Yet even for k = 3 there exist self-inconsistent sets. Take for example the set S consisting of two positive points at (0, 1) and (0, −1) and two negative points at (1, 0) and (−1, 0). Then the 3-nearest neighbor rule misclassifies every point in S, hence S itself is inconsistent. 2 Paper outline. This paper is organized as follows. In Section 2, we present our algorithm and prove its performance bound, as well as the reduction implying its near optimality (Theorem 2). We then highlight the implications of this algorithm for learning in Section 3. In Section 4 we describe a heuristic which refines our algorithm, and present empirical results. 1.1 Preliminaries Metric spaces. A metric d on a set X is a positive symmetric function satisfying the triangle inequality d(x, y) ≤d(x, z) + d(z, y); together the two comprise the metric space (X, d). The diameter of a set A ⊆X, is defined by diam(A) = supx,y∈A d(x, y). Throughout this paper we will assume that diam(S) = 1; this can always be achieved by scaling. Doubling dimension. For a metric (X, d), let λ be the smallest value such that every ball in X of radius r (for any r) can be covered by λ balls of radius r 2. The doubling dimension of X is ddim(X) = log2 λ. A metric is doubling when its doubling dimension is bounded. Note that while a low Euclidean dimension implies a low doubling dimension (Euclidean metrics of dimension d have doubling dimension O(d) [30]), low doubling dimension is strictly more general than low Euclidean dimension. The following packing property can be demonstrated via a repetitive application of the doubling property: For set S with doubling dimension ddim(X) and diam(S) ≤β, if the minimum interpoint distance in S is at least α < β then |S| ≤⌈β/α⌉ddim(X )+1 (1) (see, for example [8]). The above bound is tight up to constant factors, meaning there exist sets of size (β/α)Ω(ddim(X )). Nearest Neighbor Condensing. Formally, we define the Nearest Neighbor Condensing (NNC) problem as follows: We are given a set S = S−∪S+ of points, and distance metric d : S × S →R. We must compute a minimal cardinality subset S′ ⊂S with the property that for any p ∈S, the nearest neighbor of p in S′ comes from the same subset {S+, S−} as does p. If p has multiple exact nearest neighbors in S′, then they must all be of the same subset. Label Cover. The Label Cover problem was first introduced by [31] in a seminal paper on the hardness of computation. Several formulations of this problem have appeared the literature, and we give the description forwarded by [32]: The input is a bipartite graph G = (U, V, E), with two sets of labels: A for U and B for V . For each edge (u, v) ∈E (where u ∈U, v ∈V ), we are given a relation Πu,v ⊂A × B consisting of admissible label pairs for that edge. A labeling (f, g) is a pair of functions f : U →2A and g : V →2B\{∅} assigning a set of labels to each vertex. A labeling covers an edge (u, v) if for every label b ∈g(v) there is some label a ∈f(u) such that (a, b) ∈Πu,v. The goal is to find a labeling that covers all edges, and which minimizes the sum of the number of labels assigned to each u ∈U, that is P u∈U |f(u)|. It was shown in [32] that it is NP-hard to approximate Label Cover to within a factor 2(log n)1−o(1), where n is the total size of the input. Learning. We work in the agnostic learning model [33, 5]. The learner receives n labeled examples (Xi, Yi) ∈X ×{−1, 1} drawn iid according to some unknown probability distribution P. Associated to any hypothesis h : X →{−1, 1} is its empirical error c err(h) = n−1 P i∈[n] 1{h(Xi)̸=Yi} and generalization error err(h) = P(h(X) ̸= Y ). 2 Near-optimal approximation algorithm In this section, we describe a simple approximation algorithm for the Nearest Neighbor Condensing problem. In Section 2.1 we provide almost tight hardness-of-approximation bounds. We have the following theorem: Theorem 1. Given a point set S and its scaled margin γ < 1, there exists an algorithm that in time min{n2, 2O(ddim(S))n log(1/γ)} computes a consistent set S′ ⊂S of size at most ⌈1/γ⌉ddim(S)+1. Recall that an ε-net of point set S is a subset Sε ⊂S with two properties: 3 (i) Packing. The minimum interpoint distance in Sε is at least ε. (ii) Covering. Every point p ∈S has a nearest neighbor in Sε strictly within distance ε. We make the following observation: Since the margin of the point set is γ, a γ-net of S is consistent with S. That is, every point p ∈S has a neighbor in Sγ strictly within distance γ, and since the margin of S is γ, this neighbor must be of the same label set as p. By the packing property of doubling spaces (Equation 1), the size of Sγ is at most ⌈1/γ⌉ddim(S)+1. The solution returned by our algorithm is Sγ, and satisfies the guarantees claimed in Theorem 1. It remains only to compute the net Sγ. A brute-force greedy algorithm can accomplish this in time O(n2): For every point p ∈S, we add p to Sγ if the distance from p to all points currently in Sγ is γ or greater, d(p, Sγ) ≥γ. See Algorithm 1. Algorithm 1 Brute-force net construction Require: S 1: Sγ ←arbitrary point of S 2: for all p ∈S do 3: if d(p, Sγ) ≥γ then 4: Sγ = Sγ ∪{p} 5: end if 6: end for The construction time can be improved by building a net hierarchy, similar to the one employed by [8], in total time 2O(ddim(S))n log(1/γ). (See also [34, 35, 36].) A hierarchy consists of all nets S2i for i = 0, −1, . . ., ⌊log γ⌋, where S2i ⊂S2i−1 for all i > ⌊log γ⌋. Two points p, q ∈S2i are neighbors if d(p, q) < 4 · 2i. Further, each point q ∈S is a child of a single nearby parent point p ∈S2i satisfying d(p, q) < 2i. By the definition of a net, a parent point must exist. If two points p, q ∈S2i are neighbors (d(p, q) < 4 · 2i) then their respective parents p′, q′ ∈S2i+1 are necessarily neighbors as well: d(p′, q′) ≤d(p′, p) + d(p, q) + d(q, q′) < 2i+1 + 4 · 2i + 2i+1 = 4 · 2i+1. The net S20 = S1 consists of a single arbitrary point. Having constructed S2i, it is an easy matter to construct S2i−1: Since we require S2i−1 ⊃S2i, we will initialize S2i−1 = S2i. For each q ∈S, we need only to determine whether d(q, S2i−1) ≥2i−1, and if so add q to S2i−1. Crucially, we need not compare q to all points of S2i−1: If there exists a point p ∈S2i with d(q, p) < 2i, then the respective parents p′, q′ ∈S2i of p, q must be neighbors. Let set T include only the children of q′ and of q′’s neighbors. To determine the inclusion of every q ∈S in S2i−1, it suffices to compute whether d(q, T ) ≥2i−1, and so n such queries are sufficient to construct S2i−1. The points of T have minimum distance 2i−1 and are all contained in a ball of radius 4 · 2i + 2i−1 centered at T , so by the packing property (Equation 1) |T | = 2O(ddim(S)). It follows that the above query d(q, T ) can be answered in time 2O(ddim(S)). For each point in S we execute O(log(1/γ)) queries, for a total runtime of 2O(ddim(S))n log(1/γ). The above procedure is illustrated in the Appendix. 2.1 Hardness of approximation of NNC In this section, we prove almost matching hardness results for the NNC problem. Theorem 2. Given a set S of labeled points with scaled margin γ, it is NP-hard to approximate the solution to the Nearest Neighbor Condensing problem on S to within a factor 2(ddim(S) log(1/γ))1−o(1). To simplify the proof, we introduce an easier version of NNC called Weighted Nearest Neighbor Condensing (WNNC). In this problem, the input is augmented with a function assigning weight to each point of S, and the goal is to find a subset S′ ⊂S of minimum total weight. We will reduce Label Cover to WNNC and then reduce WNNC to NNC (with some mild assumptions on the admissible range of weights), all while preserving hardness of approximation. The theorem will follow from the hardness of Label Cover [32]. First reduction. Given a Label Cover instance of size m = |U|+|V |+|A|+|B|+|E|+P e∈E |ΠE|, fix large value c to be specified later, and an infinitesimally small constant η. We create an instance of WNNC as follows (see Figure 1). 1. We first create a point p+ ∈S+ of weight 1. 4 e1 e2 e3 u1a1 Label Cover Nearest Neighbor Condensing U V u1 u2 v1 v2 e1 e2 e3 u1a2 u2a1 u2a2 SU,A ŽS+ l1 l2 l3,,l4 l5 v1b1 v1b2 v2b1 v2b2 SL ŽS+ SV,B ŽSl1: (a1,b1)  –e1 l2: (a2,b2)  –e1 l3: (a1,b1)  –e2 l4: (a2,b1)  –e2 l5: (a1,b2)  –e3 SE ŽSp3 2 2 p+ 3+{ ‰[+ 2+2{ 2+{ Figure 1: Reduction from Label Cover to Nearest Neighbor Condensing. We introduce set SE ⊂S−representing edges in E: For each edge e ∈E, create point pe of weight ∞. The distance from pe to p+ is 3 + η. 2. We introduce set SV,B ⊂S−representing pairs in V × B: For each vertex v ∈V and label b ∈B, create point pv,b of weight 1. If edge e is incident to v and there exists a label (a, b) ∈Πe for any a ∈A, then the distance from pv,b to pe is 3. Further add a point p−∈S−of weight 1, at distance 2 from all points in SV,B. 3. We introduce set SL ⊂S+ representing labels in Πe. For each edge e = (u, v) and label b ∈B for which (a, b) ∈Πe (for any a ∈A), we create point pe,b ⊂SL of weight ∞. pe,b represents the set of labels (a, b) ∈Πe over all a ∈A. pe,b is at distance 2 + η from pv,b. Further add a point p′ + ∈S+ of weight 1, at distance 2 + 2η from all points in SL. 4. We introduce set SU,A ⊂S+ representing pairs in U × A: For each vertex u ∈U and label a ∈A, create point pu,a of weight c. For any edge e = (u, v) and label b ∈B, if (a, b) ∈Πe then the distance from pe,b ∈SL to pu,a is 2. The points of each set SE, SV,B, SL and SU,A are packed into respective balls of diameter 1. Fixing any target doubling dimension D = Ω(1) and recalling that the cardinality of each of these sets is less than m2, we conclude that the minimum interpoint distance in each ball is m−O(1/D). All interpoint distances not yet specified are set to their maximum possible value. The diameter of the resulting set is constant, so its scaled margin is γ = m−O(1/D). We claim that a solution of WNNC on the constructed instance implies some solution of the Label Cover Instance: 1. p+ must appear in any solution: The nearest neighbors of p+ are the negative points of SE, so if p+ is not included the nearest neighbor of set SE is necessarily the nearest neighbor of p+, which is not consistent. 2. Points in SE have infinite weight, so no points of SE appear in the solution. All points of SE are at distance exactly 3 + η from p+, hence each point of SE must be covered by some point of SV,B to which it is connected – other points in SV,B are farther than 3 + η. (Note that SV,B itself can be covered by including the single point p−.) Choosing covering points in SV,B corresponds to assigning labels in B to vertices of V in the Label Cover instance. 3. Points in SL have infinite weight, so no points of SL appear in the solution. Hence, either p′ + or some points of SU,A must be used to cover points of SL. Specifically, a point in SL ∈S+ incident on an included point of SV,B ∈S−is at distance exactly 2 + η from this point, and so it must be covered by some point of SU,A to which it is connected, at distance 2 – other points in SU,A are farther than 2 + η. Points of SL not incident on an included point of SV,B can be covered by p′ +, which at distance 2 + 2η is still closer than any point in SV,B. (Note that SU,A itself can be covered by including a single arbitrary point of SU,A, which at distance 1 is closer than all other point sets.) Choosing the covering point in SU,A corresponds to assigning labels in A to vertices of U in the Label Cover instance, thereby inducing a valid labeling for some edge and solving the Label Cover problem. 5 Now, a trivial solution to this instance of WNNC is to take all points of SU,A, SV,B and the single point p+: then SE and p−are covered by SV,B, and SL and p′ + by SU,A. The size of the resulting set is c|SU,A| + |SU,B| + 1, and this provides an upper bound on the optimal solution. By setting c = m4 ≫m3 > m(|SU,B|+1), we ensure that the solution cost of WNNC is asymptotically equal to the number of points of SU,A included in its solution. This in turn is exactly the sum of labels of A assigned to each vertex of U in a solution to the Label Cover problem. Label Cover is hard to approximate within a factor 2(log m)1−o(1), implying that WNNC is hard to approximate within a factor of 2(log m)1−o(1) = 2(D log(1/γ))1−o(1). Before proceeding to the next reduction, we note that to rule out the inclusion of points of SE, SL in the solution set, infinite weight is not necessary: It suffices to give each heavy point weight c2, which is itself greater than the weight of the optimal solution by a factor of at least m2. Hence, we may assume all weights are restricted to the range [1, mO(1)], and the hardness result for WNNC still holds. Second reduction. We now reduce WNNC to NNC, assuming that the weights of the n points are in the range [1, mO(1)]. Let γ be the scaled margin of the WNNC instance. To mimic the weight assignment of WNNC using the unweighted points of NNC, we introduce the following gadget graph G(w, D): Given parameter w and doubling dimension D, create a point set T of size w whose interpoint distances are the same as those realized by a set of contiguous points on the D-dimensional ℓ1-grid of side-length ⌈w1/D⌉. Now replace each point p ∈T by twin positive and negative points at mutual distance γ 2 , so that the distance from each twin replacing p to each twin replacing any q ∈T is the same as the distance from p to q. G(w, D) consists of T , as well as a single positive point at distance ⌈w1/D⌉from all positive points of T , and ⌈w1/D⌉+ γ 2 from all negative points of T , and a single negative point at distance ⌈w1/D⌉from all negative points of T , and ⌈w1/D⌉+ γ 2 from all positive points of T . Clearly, the optimal solution to NNC on the gadget instance is to choose the two points not in T . Further, if any single point in T is included in the solution, then all of T must be included in the solution: First the twin of the included point must also be included in the solution. Then, any point at distance 1 from both twins must be included as well, along with its own twin. But then all points within distance 1 of the new twins must be included, etc., until all points of T are found in the solution. To effectively assign weight to a positive point of NNC, we add a gadget to the point set, and place all negative points of the gadget at distance ⌈w1/D⌉from this point. If the point is not included in the NNC solution, then the cost of the gadget is only 2.2 But if this point is included in the NNC solution, then it is the nearest neighbor of the negative gadget points, and so all the gadget points must be included in the solution, incurring a cost of w. A similar argument allows us to assign weight to negative points of NNC. The scaled margin of the NNC instance is of size Ω(γ/w1/D) = Ω(γm−O(1/D)), which completes the proof of Theorem 2. 3 Learning In this section, we apply Theorem 1 to obtain improved generalization bounds for binary classification in doubling spaces. Working in the standard agnostic PAC setting, we take the labeled sample S to be drawn iid from some unknown distribution over X × {−1, 1}, with respect to which all of our probabilities will be defined. In a slight abuse of notation, we will blur the distinction between S ⊂X as a collection of points in a metric space and S ∈(X × {−1, 1})n as a sequence of pointlabel pairs. As mentioned in the preliminaries, there is no loss of generality in taking diam(S) = 1. Partitioning the sample S = S+ ∪S−into its positively and negatively labeled subsets, the margin induced by the sample is given by γ(S) = d(S+, S−), where d(A, B) := minx∈A,x′∈B d(x, x′) for A, B ⊂X. Any labeled sample S induces the nearest-neighbor classifier νS : X →{−1, 1} via νS(x) = +1 if d(x, S+) < d(x, S−) −1 else. 2By scaling up all weights by a factor of n2, we can ensure that the cost of all added gadgets (2n) is asymptotically negligible. 6 We say that ˜S ⊂S is ε-consistent with S if 1 n P x∈S 1{νS(x)̸=ν ˜ S(x)} ≤ε. For ε = 0, an ε-consistent ˜S is simply said to be consistent (which matches our previous notion of consistent subsets). A sample S is said to be (ε, γ)-separable (with witness ˜S) if there is an ε-consistent ˜S ⊂S with γ( ˜S) ≥γ. We begin by invoking a standard Occam-type argument to show that the existence of small εconsistent sets implies good generalization. The generalizing power of sample compression was independently discovered by [37, 38], and later elaborated upon by [39]. Theorem 3. For any distribution P, any n ∈N and any 0 < δ < 1, with probability at least 1 −δ over the random sample S ∈(X × {−1, 1})n, the following holds: (i) If ˜S ⊂S is consistent with S, then err(ν ˜S) ≤ 1 n −| ˜S|  | ˜S| log n + log n + log 1 δ  . (ii) If ˜S ⊂S is ε-consistent with S, then err(ν ˜S) ≤ εn n −| ˜S| + s | ˜S| log n + 2 log n + log 1 δ 2(n −| ˜S|) . Proof. Finding a consistent (resp., ε-consistent) ˜S ⊂S constitutes a sample compression scheme of size | ˜S|, as stipulated in [39]. Hence, the bounds in (i) and (ii) follow immediately from Theorems 1 and 2 ibid. Corollary 1. With probability at least 1 −δ, the following holds: If S is (ε, γ)-separable with witness ˜S, then err(ν ˜S) ≤ εn n −ℓ+ s ℓlog n + 2 log n + log 1 δ 2(n −ℓ) , where ℓ= ⌈1/γ⌉ddim(S)+1. Proof. Follows immediately from Theorems 1 and 3(ii). Remark. It is instructive to compare the bound above to [12, Corollary 5]. Stated in the language of this paper, the latter upper-bounds the NN generalization error in terms of the sample margin γ and ddim(X) by ε + r 2 n (dγ ln(34en/dγ) log2(578n) + ln(4/δ)), (2) where dγ = ⌈16/γ⌉ddim(X )+1 and ε is the fraction of the points in S that violate the margin condition (i.e., opposite-labeled point pairs less than γ apart in d). Hence, Corollary 1 is a considerable improvement over (2) in at least three aspects. First, the data-dependent ddim(S) may be significantly smaller than the dimension of the ambient space, ddim(X).3 Secondly, the factor of 16ddim(X )+1 is shaved off. Finally, (2) relied on some fairly intricate fat-shattering arguments [40, 41], while Corollary 1 is an almost immediate consequence of much simpler Occam-type results. One limitation of Theorem 1 is that it requires the sample to be (0, γ)-separable. The form of the bound in Corollary 1 suggests a natural Structural Risk Minimization (SRM) procedure: minimize the right-hand size over (ε, γ). A solution to this problem was (essentially) given in [12, Theorem 7]: Theorem 4. Let R(ε, γ) denote the right-hand size of the inequality in Corollary 1 and put (ε∗, γ∗) = argminε,γ R(ε, γ). Then (i) One may compute (ε∗, γ∗) in O(n4.376) randomized time. (ii) One may compute (˜ε, ˜γ) satisfying R(˜ε, ˜γ) ≤4R(ε∗, γ∗) in O(ddim(S)n2 log n) deterministic time. Both solutions yield a witness ˜S ⊂S of (ε, γ)-separability as a by-product. Having thus computed the optimal (or near-optimal) ˜ε, ˜γ with the corresponding witness ˜S, we may now run the algorithm furnished by Theorem 1 on the sub-sample ˜S and invoke the generalization bound in Corollary 1. The latter holds uniformly over all ˜ε, ˜γ. 3 In general, ddim(S) ≤c ddim(X ) for some universal constant c, as shown in [24]. 7 4 Experiments In this section we discuss experimental results. First, we will describe a simple heuristic built upon our algorithm. The theoretical guarantees in Theorem 1 feature a dependence on the scaled margin γ, and our heuristic aims to give an improved solution in the problematic case where γ is small. Consider the following procedure for obtaining a smaller consistent set. We first extract a net Sγ satisfying the guarantees of Theorem 1. We then remove points from Sγ using the following rule: for all i ∈{0, . . . ⌈log γ⌉}, and for each p ∈Sγ, if the distance from p to all opposite labeled points in Sγ is at least 2 · 2i, then remove from Sγ all points strictly within distance 2i −γ of p (see Algorithm 2). We can show that the resulting set is consistent: Lemma 5. The above heuristic produces a consistent solution. Proof. Consider a point p ∈Sγ, and assume without loss of generality that p is positive. If d(p, S− γ ) ≥2 · 2i, then the positive net-points strictly within distance 2i of p are closer to p than to any negative point in Sγ, and are “covered” by p. The removed positive net-points at distance 2i −γ themselves cover other positive points of S within distance γ, but p covers these points of S as well. Further, p cannot be removed at a later stage in the algorithm, since p’s distance from all remaining points is at least 2i −γ. Algorithm 2 Consistent pruning heuristic 1: Sγ is produced by Algorithm 1 or its fast version (Appendix) 2: for all i ∈{0, . . . , ⌈log γ⌉} do 3: for all p ∈Sγ do 4: if p ∈S± γ and d(p, S∓ γ ) ≥2 · 2i then 5: for all q ̸= p ∈Sγ with d(p, q) < 2i −γ do 6: Sγ ←Sγ\{q} 7: end for 8: end if 9: end for 10: end for As a proof of concept, we tested our sample compression algorithms on several data sets from the UCI Machine Learning Repository. These included the Skin Segmentation, Statlog Shuttle, and Covertype sets.4 The final dataset features 7 different label types, which we treated as 21 separate binary classification problems; we report results for labels 1 vs. 4, 4 vs. 6, and 4 vs. 7, and these typify the remaining pairs. We stress that the focus of our experiments is to demonstrate that (i) a significant amount of consistent sample compression is often possible and (ii) the compression does not adversely affect the generalization error. For each data set and experiment, we sampled equal sized learning and test sets, with equal representation of each label type. The L1 metric was used for all data sets. We report (i) the initial sample set size, (ii) the percentage of points retained after the net extraction procedure of Algorithm 1, (iii) the percentage retained after the pruning heuristic of Algorithm 2, and (iv) the change in prediction accuracy on test data, when comparing the heuristic to the uncompressed sample. The results, averaged over 500 trials, are summarized in Figure 2. data set original sample % after net % after heuristic ±% accuracy Skin Segmentation 10000 35.10 4.78 -0.0010 Statlog Shuttle 2000 65.75 29.65 +0.0080 Covertype 1 vs. 4 2000 35.85 17.70 +0.0200 Covertype 4 vs. 6 2000 96.50 69.00 -0.0300 Covertype 4 vs. 7 2000 4.40 3.40 0.0000 Figure 2: Summary of the performance of NN sample compression algorithms. 4 http://tinyurl.com/skin-data; http://tinyurl.com/shuttle-data; http://tinyurl.com/cover-data 8 References [1] E. Fix and J. L. Hodges, Discriminatory analysis. nonparametric discrimination: Consistency properties. International Statistical Review / Revue Internationale de Statistique, 57(3):pp. 238–247, 1989. [2] T. Cover, P. Hart. Nearest neighbor pattern classification. IEEE Trans. Info. Theo., 13:21–27, 1967. [3] A. Kontorovich, R. Weiss. A Bayes consistent 1-NN classifier (arXiv:1407.0208), 2014. [4] G. Toussaint. Open problems in geometric methods for instance-based learning. In Discrete and computational geometry, volume 2866 of Lecture Notes in Comput. Sci., pp 273–283. 2003. [5] S. Shalev-Shwartz, S. Ben-David. Understanding Machine Learning. 2014. [6] K. Chaudhuri, S. Dasgupta. Rates of Convergence for Nearest Neighbor Classification. In NIPS, 2014. [7] U. von Luxburg, O. Bousquet. Distance-based classification with Lipschitz functions. JMLR, 2004. [8] R. Krauthgamer and J. R. Lee. Navigating nets: Simple algorithms for proximity search. In SODA, 2004. [9] K. L. Clarkson. An algorithm for approximate closest-point queries. In SCG, 1994 [10] L. Devroye, L. Gy¨orfi, A. Krzy˙zak, G. Lugosi. On the strong universal consistency of nearest neighbor regression function estimates. Ann. Statist., 22(3):1371–1385, 1994. [11] R. R. Snapp and S. S. Venkatesh. Asymptotic expansions of the k nearest neighbor risk. Ann. Statist., 26(3):850–878, 1998. [12] L. Gottlieb, A. Kontorovich, R. Krauthgamer. Efficient classification for metric data. In COLT, 2010. [13] P. E. Hart. The condensed nearest neighbor rule. IEEE Trans. Info. Theo., 14(3):515–516, 1968. [14] G. Wilfong. Nearest neighbor problems. In SCG, 1991. [15] A. V. Zukhba. NP-completeness of the problem of prototype selection in the nearest neighbor method. Pattern Recognit. Image Anal., 20(4):484–494, 2010. [16] F. Angiulli. Fast condensed nearest neighbor rule. In ICML, 2005. [17] W. Gates. The reduced nearest neighbor rule. IEEE Trans. Info. Theo., 18:431–433, 1972. [18] G. L. Ritter, H. B. Woodruff, S. R. Lowry, T. L. Isenhour. An algorithm for a selective nearest neighbor decision rule. IEEE Trans. Info. Theo., 21:665–669, 1975. [19] D. R. Wilson and T. R. Martinez. Reduction techniques for instance-based learning algorithms. Mach. Learn., 38:257–286, 2000. [20] L. G. Valiant. A theory of the learnable. Commun. ACM, 27(11):1134–1142, 1984. [21] D. Haussler. Quantifying inductive bias: AI learning algorithms and valiant’s learning framework. Artificial Intelligence, 36(2):177 – 221, 1988. [22] F. Laviolette, M. Marchand, M. Shah, S. Shanian. Learning the set covering machine by bound minimization and margin-sparsity trade-off. Mach. Learn., 78(1-2):175–201, 2010. [23] M. Marchand and J. Shawe-Taylor. The set covering machine. JMLR, 3:723–746, 2002. [24] L. Gottlieb and R. Krauthgamer. Proximity algorithms for nearly doubling spaces. SIAM J. on Discr. Math., 27(4):1759–1769, 2013. [25] L. Gottlieb, A. Kontorovich, R. Krauthgamer. Adaptive metric dimensionality reduction. ALT, 2013. [26] A. Beygelzimer, S. Kakade, J. Langford. Cover trees for nearest neighbor. In ICML, 2006. [27] Y. Li and P. M. Long. Learnability and the doubling dimension. In NIPS, 2006. [28] N. H. Bshouty, Y. Li, P. M. Long. Using the doubling dimension to analyze the generalization of learning algorithms. J. Comp. Sys. Sci., 75(6):323 – 335, 2009. [29] L. Gottlieb, A. Kontorovich, R. Krauthgamer. Efficient regression in metric spaces via approximate Lipschitz extension. In SIMBAD, 2013. [30] A. Gupta, R. Krauthgamer, J. R. Lee. Bounded geometries, fractals, and low-distortion embeddings. In FOCS, 2003. [31] S. Arora, L. Babai, J. Stern, Z. Sweedyk. The hardness of approximate optima in lattices, codes, and systems of linear equations. In FOCS, 1993. [32] I. Dinur, S. Safra. On the hardness of approximating label-cover. Info. Proc. Lett., 2004. [33] M. Mohri, A. Rostamizadeh, A. Talwalkar. Foundations Of Machine Learning. 2012. [34] A. Beygelzimer, S. Kakade, J. Langford. Cover trees for nearest neighbor. In ICML 2006. [35] S. Har-Peled and M. Mendel. Fast construction of nets in low-dimensional metrics and their applications. SIAM J. on Comput., 35(5):1148–1184, 2006. [36] R. Cole, L. Gottlieb. Searching dynamic point sets in spaces with bounded doubling dimension. STOC, 2006. [37] N. Littlestone and M. K. Warmuth. Relating data compression and learnability, unpublished. 1986. [38] L. Devroye, L. Gy¨orfi, G. Lugosi. A probabilistic theory of pattern recognition, 1996. [39] T. Graepel, R. Herbrich, J. Shawe-Taylor. Pac-bayesian compression bounds on the prediction error of learning algorithms for classification. Mach. Learn., 59(1-2):55–76, 2005. [40] N. Alon, S. Ben-David, N. Cesa-Bianchi, D. Haussler. Scale-sensitive dimensions, uniform convergence, and learnability. J. ACM, 44(4):615–631, 1997. [41] P. Bartlett and J. Shawe-Taylor. Generalization performance of support vector machines and other pattern classifiers, pages 43–54. 1999. 9
2014
223
5,318
Factoring Variations in Natural Images with Deep Gaussian Mixture Models A¨aron van den Oord, Benjamin Schrauwen Electronics and Information Systems department (ELIS), Ghent University {aaron.vandenoord, benjamin.schrauwen}@ugent.be Abstract Generative models can be seen as the swiss army knives of machine learning, as many problems can be written probabilistically in terms of the distribution of the data, including prediction, reconstruction, imputation and simulation. One of the most promising directions for unsupervised learning may lie in Deep Learning methods, given their success in supervised learning. However, one of the current problems with deep unsupervised learning methods, is that they often are harder to scale. As a result there are some easier, more scalable shallow methods, such as the Gaussian Mixture Model and the Student-t Mixture Model, that remain surprisingly competitive. In this paper we propose a new scalable deep generative model for images, called the Deep Gaussian Mixture Model, that is a straightforward but powerful generalization of GMMs to multiple layers. The parametrization of a Deep GMM allows it to efficiently capture products of variations in natural images. We propose a new EM-based algorithm that scales well to large datasets, and we show that both the Expectation and the Maximization steps can easily be distributed over multiple machines. In our density estimation experiments we show that deeper GMM architectures generalize better than more shallow ones, with results in the same ballpark as the state of the art. 1 Introduction There has been an increasing interest in generative models for unsupervised learning, with many applications in Image processing [1, 2], natural language processing [3, 4], vision [5] and audio [6]. Generative models can be seen as the swiss army knives of machine learning, as many problems can be written probabilistically in terms of the distribution of the data, including prediction, reconstruction, imputation and simulation. One of the most promising directions for unsupervised learning may lie in Deep Learning methods, given their recent results in supervised learning [7]. Although not a universal recipe for success, the merits of deep learning are well-established [8]. Because of their multilayered nature, these methods provide ways to efficiently represent increasingly complex relationships as the number of layers increases. “Shallow” methods will often require a very large number of units to represent the same functions, and may therefore overfit more. Looking at real-valued data, one of the current problems with deep unsupervised learning methods, is that they are often hard to scale to large datasets. This is especially a problem for unsupervised learning, because there is usually a lot of data available, as it does not have to be labeled (e.g. images, videos, text). As a result there are some easier, more scalable shallow methods, such as the Gaussian Mixture Model (GMM) and the Student-t Mixture Model (STM), that remain surprisingly competitive [2]. Of course, the disadvantage of these mixture models is that they have less representational power than deep models. In this paper we propose a new scalable deep generative model for images, called the Deep Gaussian Mixture Model (Deep GMM). The Deep GMM is a straightforward but powerful generalization of Gaussian Mixture Models to multiple layers. It is constructed by stacking multiple GMM-layers on 1 A x x A1 A2 A3 x A1,1 A1,2 A1,3 A2,1 A2,2 A3,1 A3,2 A3,3 N (0, In) N (0, In) N (0, In) (a) Gaussian A x x A1 A2 A3 x A1,1 A1,2 A1,3 A2,1 A2,2 A3,1 A3,2 A3,3 N (0, In) N (0, In) N (0, In) (b) GMM A x x A1 A2 A3 x A1,1 A1,2 A1,3 A2,1 A2,2 A3,1 A3,2 A3,3 N (0, In) N (0, In) N (0, In) (c) Deep GMM Figure 1: Visualizations of a Gaussian, GMM and Deep GMM distribution. Note that these are not graphical models. This visualization describes the connectivity of the linear transformations that make up the multimodal structure of a deep GMM. The sampling process for the deep GMM is shown in red. Every time a sample is drawn, it is first drawn from a standard normal distribution and then transformed with all the transformations on a randomly sampled path. In the example it is first transformed with A1,3, then with A2,1 and finally with A3,2. Every path results in differently correlated normal random variables. The deep GMM shown has 3 · 2 · 3 = 18 possible paths. For each square transformation matrix Ai,j there is a corresponding bias term bi,j (not shown here). top of each other, which is similar to many other Deep Learning techniques. Although for every deep GMM, one could construct a shallow GMM with the same density function, it would require an exponential number of mixture components to do so. The multilayer architecture of the Deep GMM gives rise to a specific kind of parameter tying. The parameterization is most interpretable in the case of images: the layers in the architecture are able to efficiently factorize the different variations that are present in natural images: changes in brightness, contrast, color and even translations or rotations of the objects in the image. Because each of these variations will affect the image separately, a traditional mixture model would need an exponential number of components to model each combination of variations, whereas a Deep GMM can factor these variations and model them individually. The proposed training algorithm for the Deep GMM is based on the most popular principle for training GMMs: Expectation Maximization (EM). Although stochastic gradient (SGD) is also a possible option, we suggest the use of EM, as it is inherently more parallelizable. As we will show later, both the Expectation and the Maximization steps can easily be distributed on multiple computation units or machines, with only limited communication between compute nodes. Although there has been a lot of effort in scaling up SGD for deep networks [9], the Deep GMM is parallelizable by design. The remainder of this paper is organized as follows. We start by introducing the design of deep GMMs before explaining the EM algorithm for training them. Next, we discuss the experiments where we examine the density estimation performance of the deep GMM, as a function of the number of layers, and in comparison with other methods. We conclude in Section 5, where also discuss some unsolved problems for future work. 2 Stacking Gaussian Mixture layers Deep GMMs are best introduced by looking at some special cases: the multivariate normal distribution and the Gaussian Mixture model. One way to define a multivariate normal variable x is as a standard normal variable z ⇠N (0, In) that has been transformed with a certain linear transformation: x = Az + b, so that p (x) = N ! x|b, AAT " . 2 This is visualized in Figure 1(a). The same interpretation can be applied to Gaussian Mixture Models, see Figure 1(b). A transformation is chosen from set of (square) transformations Ai, i = 1 . . . N (each having a bias term bi) with probabilities ⇡i, i = 1 . . . N, such that the resulting distribution becomes: p (x) = N X i=1 ⇡iN ! x|bi, AiAT i " . With this in mind, it is easy to generalize GMMs in a multi-layered fashion. Instead of sampling one transformation from a set, we can sample a path of transformations in a network of k layers, see Figure 1(c). The standard normal variable z is now successively transformed with a transformation from each layer of the network. Let Φ be the set of all possible paths through the network. Each path p = (p1, p2, . . . , pk) 2 Φ has a probability ⇡p of being sampled, with X p2Φ ⇡p = X p1,p2,...,pk ⇡(p1,p2,...,pk) = 1. Here Nj is the number of components in layer j. The density function of x is: p (x) = X p2Φ ⇡pN ! x|βp, ⌦p⌦T p " , (1) with βp = bk,pk + Ak,ik (. . . (b2,p2 + A2,p2b1,p1)) (2) ⌦p = 1 Y j=k Aj,pj. (3) Here Am,n and bm,n are the n’th transformation matrix and bias of the m’th layer. Notice that one can also factorize ⇡p as follows: ⇡(p1,p2,...,pk) = ⇡p1⇡p2 . . . ⇡pk, so that each layer has its own set of parameters associated with it. In our experiments, however, this had very little difference on the log likelihood. This would mainly be useful for very large networks. The GMM is a special case of the deep GMM having only one layer. Moreover, each deep GMM can be constructed by a GMM with Qk j Nj components, where every path in the network represents one component in the GMM. The parameters of these components are tied to each other in the way the deep GMM is defined. Because of this tying, the number of parameters to train is proportional to Pk j Nj. Still, the density estimator is quite expressive as it can represent a large number of Gaussian mixture components. This is often the case with deep learning methods: Shallow architectures can often theoretically learn the same functions, but will require a much larger number of parameters [8]. When the kind of compound functions that a deep learning method is able to model are appropriate for the type of data, their performance will often be better than their shallow equivalents, because of the smaller risk of overfitting. In the case of images, but also for other types of data, we can imagine why this network structure might be useful. A lot of images share the same variations such as rotations, translations, brightness changes, etc.. These deformations can be represented by a linear transformation in the pixel space. When learning a deep GMM, the model may pick up on these variations in the data that are shared amongst images by factoring and describing them with the transformations in the network. The hypothesis of this paper is that Deep GMMs overfit less than normal GMMs as the complexity of their density functions increase because the parameter tying of the Deep GMM will force it to learn more useful functions. Note that this is one of the reasons why other deep learning methods are so successful. The only difference is that the parameter tying in deep GMMs is more explicit and interpretable. A closely related method is the deep mixture of factor analyzers (DMFA) model [10], which is an extension of the Mixture of Factor Analyzers (MFA) model [11]. The DMFA model has a tree structure in which every node is a factor analyzer that inherits the low-dimensional latent factors 3 from its parent. Training is performed layer by layer, where the dataset is hierarchically clustered and the children of each node are trained as a MFA on a different subset of the data using the MFA EM algorithm. The parents nodes are kept constant when training its children. The main difference with the proposed method is that in the Deep GMM the nodes of each layer are connected to all nodes of the layer above. The layers are trained jointly and the higher level nodes will adapt to the lower level nodes. 3 Training deep GMMs with EM The algorithm we propose for training Deep GMMs is based on Expectation Maximization (EM). The optimization is similar to that of a GMM: in the E-step we will compute the posterior probabilities γnp that a path p was responsible for generating xn, also called the responsibilities. In the maximization step, the parameters of the model will be optimized given those responsibilities. 3.1 Expectation From Equation 1 we get the the log-likelihood given the data: X n log p (xn) = X n log 2 4X p2Φ ⇡pN ! xn|βp, ⌦p⌦T p " 3 5 . This is the global objective for the Deep GMM to optimize. When taking the derivative with respect to a parameter ✓we get: r✓ X n log p (xn) = X n,p ⇡pN ! xn|βp, ⌦p⌦T p " ⇥ r✓log N ! xn|βp, ⌦p⌦T p "⇤ P q ⇡qN ! xn|βq, ⌦q⌦Tq " = X n,p γnpr✓log N ! xn|βp, ⌦p⌦T p " , with γnp = ⇡pN ! xn|βp, ⌦p⌦T p " P q2Φ ⇡qN ! xn|βq, ⌦q⌦Tq ", the equation for the responsibilities. Although γnp generally depend on the parameter ✓, in the EM algorithm the responsibilities are assumed to remain constant when optimizing the model parameters in the M-step. The E-step is very similar to that of a standard GMM, but instead of computing the responsibilities γnk for every component k, one needs to compute them for every path p = (p1, p2, . . . , pk) 2 Φ. This is because every path represents a Gaussian mixture component in the equivalent shallow GMM. Because γnp needs to be computed for each datapoint independently, the E-step is very easy to parallelize. Often a simple way to increase the speed of convergence and to reduce computation time is to use an EM-variant with “hard” assignments. Here only one of the responsibilities of each datapoint is set to 1: γnp = ⇢1 p = arg maxq ! ⇡qN ! xn|βq, ⌦q⌦T q "" 0 otherwise (4) Heuristic Because the number of paths is the product of the number of components per layer (Qk j Nj), computing the responsibilities can become intractable for big Deep GMM networks. However, when using hard-EM variant (eq. 4), this problem reduces to finding the best path for each datapoint, for which we can use efficient heuristics. Here we introduce such a heuristic that does not hurt the performance significantly, while allowing us to train much larger networks. We optimize the path p = (p1, p2, . . . , pk), which is a multivariate discrete variable, with a coordinate ascent algorithm. This means we change the parameters pi layer per layer, while keeping the 4 (a) Iterations (b) Reinitializations (c) Switch rate during training Figure 2: Visualizations for the introduced E-step heuristic. (a): The average log-likelihood of the best-path search with the heuristic as a function of the number of iterations (passes) and (b): as a function of the number of repeats with a different initialization. Plot (c) shows the percentage of data points that switch to a better path found with a different initialization as a function of the number of the EM-iterations during training. parameter values of the other layers constant. After we have changed all the variables one time (one pass), we can repeat. The heuristic described above only requires Pk j Nj path evaluations per pass. In Figure 2 we compare the heuristic with the full search. On the left we see that after 3 passes the heuristic converges to a local optimum. In the middle we see that when repeating the heuristic algorithm a couple of times with different random initializations, and keeping the best path after each iteration, the loglikelihood converges to the optimum. In our experiments we initialized the heuristic with the optimal path from the previous E-step (warm start) and performed the heuristic algorithm for 1 pass. Subsequently we ran the algorithm for a second time with a random initialization for two passes for the possibility of finding a better optimum for each datapoint. Each E-step thus required 3 ⇣Pk j Nj ⌘ path evaluations. In Figure 2(c) we show an example of the percentage of data points (called the switch-rate) that had a better optimum with this second initialization for each EM-iteration. We can see from this Figure that the switchrate quickly becomes very small, which means that using the responsibilities from the previous E-step is an efficient initialization for the current one. Although the number of path evaluations with the heuristic is substantially smaller than with the full search, we saw in our experiments that the performance of the resulting trained Deep GMMs was ultimately similar. 3.2 Maximization In the maximization step, the parameters are updated to maximize the log likelihood of the data, given the responsibilities. Although standard optimization techniques for training deep networks can be used (such as SGD), Deep GMMs have some interesting properties that allow us to train them more efficiently. Because these properties are not obvious at first sight, we will derive the objective and gradient for the transformation matrices Ai,j in a Deep GMM. After that we will discuss various ways for optimizing them. For convenience, the derivations in this section are based on the hard-EM variant and with omission of the bias-terms parameters. Equations without these simplifications can be obtained in a similar manner. In the hard-EM variant, it is assumed that each datapoint in the dataset was generated by a path p, for which γn,p = 1. The likelihood of x given the parameters of the transformations on this path is p (x) = 00A−1 1,p1 00 . . . 000A−1 k,pk 000 N ⇣ A−1 1,p1 . . . A−1 k,pkx|0, In ⌘ , (5) where we use |·| to denote the absolute value of the determinant. Now let’s rewrite: z = A−1 i+1,pi+1 . . . A−1 k,pkx (6) Q = A−1 i,pi (7) Rp = A−1 1,p1 . . . A−1 i−1,pi−1, (8) 5 ... ... ... ... N(0, In) Current layer "Folded" version of all the layers above the current layer Q R1 R2 Ri Rm z Figure 3: Optimization of a transformation Q in a Deep GMM. We can rewrite all the possible paths in the above layers by “folding” them into one layer, which is convenient for deriving the objective and gradient equations of Q. so that we get (omitting the constant term w.r.t. Q): log p (x) / log |Q| + log N (RpQz|0, In) . (9) Figure 3 gives a visual overview. We have “folded” the layers above the current layer into one. This means that each path p through the network above the current layer is equivalent to a transformation Rp in the folded version. The transformation matrix for which we will derive the objective and gradient is called Q. The average log-likelihood of all the data points that are generated by paths that pass through Q is: 1 N X i log p (xi) / log |Q| + 1 N X p X i2φp log N (RpQzi|0, I) (10) = log |Q| −1 2 X p ⇡pTr ⇥ ΓpQT ⌦pQ ⇤ , (11) where ⇡p = Np N , Γp = 1 Np P i2φp zizT i and ⌦p = RT p Rp. For the gradient we get: 1 N rQ X i log p (xi) = Q−T − X p ⇡pΓpQT ⌦p. (12) Optimization Notice how in Equation 11 the summation over the data points has been converted to a summation over covariance matrices: one for each path1. If the number of paths is small enough, this means we can use full gradient updates instead of mini-batched updates (e.g. SGD). The computation of the covariance matrices is fairly efficient and can be done in parallel. This formulation also allows us to use more advanced optimization methods, such as LBFGS-B [12]. In the setup described above, we need to keep the transformation Rp constant while optimizing Q. This is why in each M-step the Deep GMM is optimized layer-wise from top to bottom, updating one layer at a time. It is possible to go over this process multiple times for each M-step. Important to note is that this way the optimization of Q does not depend on any other parameters in the same layer. So for each layer, the optimization of the different nodes can be done in parallel on multiple cores or machines. Moreover, nodes in the same layer do not share data points when using the EMvariant with hard-assignments. Another advantage is that this method is easy to control, as there are no learning rates or other optimization parameters to be tuned, when using L-BFGS-B “out of the box”. A disadvantage is that one needs to sum over all possible paths above the current node in the gradient computation. For deeper networks, this may become problematic when optimizing the lower-level nodes. Alternatively, one can also evaluate (11) using Kronecker products as · · · = log |Q| + vec (Q)T (X p ⇡p (⌦p ⌦Γp) ) vec (Q) (13) 1Actually we only need to sum over the number of possible transformations Rp above the node Q. 6 and Equation 12 as · · · = Q−T + 2 mat (X p ⇡p (⌦p ⌦Γp) ) vec (Q) ! . (14) Here vec is the vectorization operator and mat its inverse. With these formulations we don’t have to loop over the number of paths anymore during the optimization. This makes the inner optimization with LBFGS-B even faster. We only have to construct P p ⇡p (⌦p ⌦Γp) once, which is also easy to parallelize. These equation thus allow us to train even bigger Deep GMM architectures. A disadvantage, however, is that it requires the dimensionality of the data to be small enough to efficiently construct the Kronecker products. When the aforementioned formulations are intractable because there are too number layers in the Deep GMM and the data dimensionality is to high, we can also optimize the parameters using backpropagation with a minibatch algorithm, such as Stochastic Gradient Descent (SGD). This approach works for much deeper networks, because we don’t need to sum over the number of paths. From Equation 9 we see that this is basically the same as minimizing the L2 norm of RpQz, with log |Q| as regularization term. Disadvantages include the use of learning rates and other parameters such as momentum, which requires more engineering and fine-tuning. The most naive way is to optimize the deep GMM with SGD is by simultaneously optimizing all parameters, as is common in neural networks. When doing this it is important that the parameters of all nodes are converged enough in each M-step, otherwise nodes that are not optimized enough may have very low responsibilities in the following E-step(s). This results in whole parts of the network becoming unused, which is the equivalent of empty clusters during GMM or k-means training. An alternative way of using SGD is again by optimizing the Deep GMM layer by layer. This has the advantage that we have more control over the optimization, which prevents the aforementioned problem of unused paths. But more importantly, we can now again parallelize over the number of nodes per layer. 4 Experiments and Results For our experiments we used the Berkeley Segmentation Dataset (BSDS300) [13], which is a commonly used benchmark for density modeling of image patches and the tiny images dataset [14]. For BSDS300 we follow the same setup of Uria et al. [15], which is best practice for this dataset. 8 by 8 grayscale patches are drawn from images of the dataset. The train and test sets consists of 200 and 100 images respectively. Because each pixel is quantized, it can only contain integer values between 0 and 255. To make the integer pixel values continuous, uniform noise (between 0 and 1) is added. Afterwards, the images are divided by 256 so that the pixel values lie in the range [0, 1]. Next, the patches are preprocessed by removing the mean pixel value of every image patch. Because this reduces the implicit dimensionality of the data, the last pixel value is removed. This results in the data points having 63 dimensions. For the tiny images dataset we rescale the images to 8 by 8 and then follow the same setup. This way we also have low resolution image data to evaluate on. In all the experiments described in this section, we used the following setup for training Deep GMMs. We used the hard-EM variant, with the aforementioned heuristic in the E-step. For each M-step we used LBFGS-B for 1000 iterations by using equations (13) and (14) for the objective and gradient. The total number of iterations we used for EM was fixed to 100, although fewer iterations were usually sufficient. The only hyperparameters were the number of components for each layer, which were optimized on a validation set. Because GMMs are in theory able to represent the same probability density functions as a Deep GMM, we first need to assess wether using multiple layers with a deep GMM improves performance. The results of a GMM (one layer) and Deep GMMs with two or three layers are given in 4(a). As we increase the complexity and number of parameters of the model by changing the number of components in the top layer, a plateau is reached and the models ultimately start overfitting. For the deep GMMs, the number of components in the other layers was kept constant (5 components). The Deep GMMs seem to generalize better. Although they have a similar number of parameters, they are able to model more complex relationships, without overfitting. We also tried this experiment on a more difficult dataset by using highly downscaled images from the tiny images dataset, see Figure 7 (a) BSDS300 (b) Tiny Images Figure 4: Performance of the Deep GMM for different number of layers, and the GMM (one layer). All models were trained on the same dataset of 500 Thousand examples. For comparison we varied the number of components in the top layer. 4(b). Because there are less correlations between the pixels of a downscaled image than between those of an image patch, the average log likelihood values are lower. Overall we can see that the Deep GMM performs well on both low and high resolution natural images. Next we will compare the deep GMM with other published methods on this task. Results are shown in Table 1. The first method is the RNADE model, a new deep density estimation technique which is an extension of the NADE model for real valued data [16, 15]. EoRNADE, which stands for ensemble of RNADE models, is currently the state of the art. We also report the log-likelihood results of two mixture models: the GMM and the Student-T Mixture model, from [2]. Overall we see that the Deep GMM has a strong performance. It scores better than other single models (RNADE, STM), but not as well as the ensemble of RNADE models. Model Average log likelihood RNADE: 1hl, 2hl, 3hl; 4hl, 5hl, 6hl 143.2, 149.2, 152.0, 153.6, 154.7, 155.2 EoRNADE (6hl) 157.0 GMM 153.7 STM 155.3 Deep GMM - 3 layers 156.2 Table 1: Density estimation results on image patch modeling using the BSDS300 dataset. Higher log-likelihood values are better. “hl” stands for the number of hidden layers in the RNADE models. 5 Conclusion In this work we introduced the deep Gaussian Mixture Model: a novel density estimation technique for modeling real valued data. we show that the Deep GMM is on par with the current state of the art in image patch modeling, and surpasses other mixture models. We conclude that the Deep GMM is a viable and scalable alternative for unsupervised learning. The deep GMM tackles unsupervised learning from a different angle than other recent deep unsupervised learning techniques [17, 18, 19], which makes it very interesting for future research. In follow-up work, we would like to make Deep GMMs suitable for larger images and other highdimensional data. Locally connected filters, such as convolutions would be useful for this. We would also like to extend our method to modeling discrete data. Deep GMMs are currently only designed for continuous real-valued data, but our approach of reparametrizing the model into layers of successive transformations can also be applied to other types of mixture distributions. We would also like to compare this extension to other discrete density estimators such as Restricted Boltzmann Machines, Deep Belief Networks and the NADE model [15]. 8 References [1] Daniel Zoran and Yair Weiss. From learning models of natural image patches to whole image restoration. In International Conference on Computer Vision, 2011. [2] A¨aron van den Oord and Benjamin Schrauwen. The student-t mixture model as a natural image patch prior with application to image compression. Journal of Machine Learning Research, 2014. [3] Yoshua Bengio, Holger Schwenk, Jean-Sbastien Sencal, Frderic Morin, and Jean-Luc Gauvain. Neural probabilistic language models. In Innovations in Machine Learning. Springer, 2006. [4] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. In proceedings of Workshop at ICLR, 2013. [5] Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in Neural Information Processing Systems, 2013. [6] Razvan Pascanu, C¸ aglar G¨ulc¸ehre, Kyunghyun Cho, and Yoshua Bengio. How to construct deep recurrent neural networks. In Proceedings of the International Conference on Learning Representations, 2013. [7] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. [8] Yoshua Bengio. Learning deep architectures for ai. Foundations and Trends R⃝in Machine Learning, 2(1), 2009. [9] Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. In Proceedings of the International Conference on Learning Representations, 2014. [10] Yichuan Tang, Ruslan Salakhutdinov, and Geoffrey Hinton. Deep mixtures of factor analysers. In International Conference on Machine Learning, 2012. [11] Zoubin Ghahramani and Geoffrey E Hinton. The em algorithm for mixtures of factor analyzers. Technical report, University of Toronto, 1996. [12] Richard H Byrd, Peihuang Lu, Jorge Nocedal, and Ciyou Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 1995. [13] David Martin, Charless Fowlkes, Doron Tal, and Jitendra Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Proceedings of the International Conference on Computer Vision. IEEE, 2001. [14] Antonio Torralba, Robert Fergus, and William T Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008. [15] Benigno Uria, Iain Murray, and Hugo Larochelle. A deep and tractable density estimator. In Proceedings of the International Conference on Machine Learning, 2013. [16] Benigno Uria, Iain Murray, and Hugo Larochelle. RNADE: The real-valued neural autoregressive density-estimator. In Advances in Neural Information Processing Systems, 2013. [17] Karol Gregor, Andriy Mnih, and Daan Wierstra. Deep autoregressive networks. In International Conference on Machine Learning, 2013. [18] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic back-propagation and variational inference in deep latent gaussian models. In International Conference on Machine Learning, 2014. [19] Yoshua Bengio, Eric Thibodeau-Laufer, and Jason Yosinski. Deep generative stochastic networks trainable by backprop. In International Conference on Machine Learning, 2013. 9
2014
224
5,319
Automated Variational Inference for Gaussian Process Models Trung V. Nguyen ANU & NICTA VanTrung.Nguyen@nicta.com.au Edwin V. Bonilla The University of New South Wales e.bonilla@unsw.edu.au Abstract We develop an automated variational method for approximate inference in Gaussian process (GP) models whose posteriors are often intractable. Using a mixture of Gaussians as the variational distribution, we show that (i) the variational objective and its gradients can be approximated efficiently via sampling from univariate Gaussian distributions and (ii) the gradients wrt the GP hyperparameters can be obtained analytically regardless of the model likelihood. We further propose two instances of the variational distribution whose covariance matrices can be parametrized linearly in the number of observations. These results allow gradientbased optimization to be done efficiently in a black-box manner. Our approach is thoroughly verified on five models using six benchmark datasets, performing as well as the exact or hard-coded implementations while running orders of magnitude faster than the alternative MCMC sampling approaches. Our method can be a valuable tool for practitioners and researchers to investigate new models with minimal effort in deriving model-specific inference algorithms. 1 Introduction Gaussian processes (GPs, [1]) are a popular choice in practical Bayesian non-parametric modeling. The most straightforward application of GPs is the standard regression model with Gaussian likelihood, for which the posterior can be computed in closed form. However, analytical tractability is no longer possible when having non-Gaussian likelihoods, and inference must be carried out via approximate methods, among which Markov chain Monte Carlo (MCMC, see e.g. [2]) and variational inference [3] are arguably the two techniques most widely used. MCMC algorithms provide a flexible framework for sampling from complex posterior distributions of probabilistic models. However, their generality comes at the expense of very high computational cost as well as cumbersome convergence analysis. Furthermore, methods such as Gibbs sampling may perform poorly when there are strong dependencies among the variables of interest. Other algorithms such as the elliptical slice sampling (ESS) developed in [4] are more effective at drawing samples from strongly correlated Gaussians. Nevertheless, while improving upon generic MCMC methods, the sampling cost of ESS remains a major challenge for practical usages. Alternative to MCMC is the deterministic approximation approach via variational inference, which has been used in numerous applications with some empirical success ( see e.g. [5, 6, 7, 8, 9, 10, 11]). The main insight from variational methods is that optimizing is generally easier than integrating. Indeed, they approximate a posterior by optimizing a lower bound of the marginal likelihood, the so-called evidence lower bound (ELBO). While variational inference can be considerably faster than MCMC, it lacks MCMC’s broader applicability as it requires derivations of the ELBO and its gradients on a model-by-model basis. This paper develops an automated variational inference technique for GP models that not only reduces the overhead of the tedious mathematical derivations inherent to variational methods but also 1 allows their application to a wide range of problems. In particular, we consider Gaussian process models that satisfy the following properties: (i) factorization across latent functions and (ii) factorization across observations. The former assumes that, when there is more than one latent function, they are generated from independent GPs. The latter assumes that, given the latent functions, the observations are conditionally independent. Existing GP models, such as regression [1], binary and multi-class classification [6, 12], warped GPs [13], log Gaussian Cox process [14], and multi-output regression [15], all fall into this class of models. We note, however, that our approach goes beyond standard settings for which elaborate learning machinery has been developed, as we only require access to the likelihood function in a black-box manner. Our automated deterministic inference method uses a mixture of Gaussians as the approximating posterior distribution and exploits the decomposition of the ELBO into a KL divergence term and an expected log likelihood term. In particular, we derive an analytical lower bound for the KL term; and we show that the expected log likelihood term and its gradients can be computed efficiently by sampling from univariate Gaussian distributions, without explicitly requiring gradients of the likelihood. Furthermore, we optimize the GP hyperparameters within the same variational framework by using their analytical gradients, irrespective of the specifics of the likelihood models. Additionally, we exploit the efficient parametrization of the covariance matrices in the models, which is linear in the number of observations, along with variance-reduction techniques in order to provide an automated inference framework that is useful in practice. We verify the effectiveness of our method with extensive experiments on 5 different GP settings using 6 benchmark datasets. We show that our approach performs as well as exact GPs or hard-coded deterministic inference implementations, and that it can be up to several orders of magnitude faster than state-of-the-art MCMC approaches. Related work Black box variational inference (BBVI, [16]) has recently been developed for general latent variable models. Due to this generality, it under-utilizes the rich amount of information available in GP models that we previously discussed. For example, BBVI approximates the KL term of the ELBO, but this is computed analytically in our method. A clear disadvantage of BBVI is that it does not provide an analytical or practical way of learning the covariance hyperparameters of GPs – in fact, these are set to fixed values. In principle, these values can be learned in BBVI using stochastic optimization, but experimentally, we have found this to be problematic, ineffectual, and time-consuming. In contrast, our method optimizes the hyperparameters using their exact gradients. An approach more closely related to ours is in [17], which investigates variational inference for GP models with one latent function and factorial likelihood. Their main result is an efficient parametrization when using a standard variational Gaussian distribution. Our method is more general in that it allows multiple latent functions, hence being applicable to settings such as multi-class classification and multi-output regression. Furthermore, our variational distribution is a mixture of Gaussians, with the full Gaussian distribution being a particular case. Another recent approach to deterministic approximate inference is the Integrated Nested Laplace Approximation (INLA, [18]). INLA uses numerical integration to approximate the marginal likelihood, which makes it unsuitable for GP models that contain a large number of hyperparameters. 2 A family of GP models We consider supervised learning problems with a dataset of N training inputs x = {xn}N n=1 and their corresponding targets y = {yn}N n=1. The mapping from inputs to outputs is established via Q underlying latent functions, and our objective is to reason about these latent functions from the observed data. We specify a class of GP models for which the priors and the likelihoods have the following structure: p(f|θ0) = Q Y j=1 p(f•j|θ0) = Q Y j=1 N(f•j; 0, Kj), (1) p(y|f, θ1) = N Y n=1 p(yn|fn•, θ1), (2) 2 where f is the set of all latent function values; f•j = {fj(xn)}N n=1 denotes the values of the latent function j; fn• = {fj(xn)}Q j=1 is the set of latent function values which yn depends upon; Kj is the covariance matrix evaluated at every pair of inputs induced by the covariance function kj(·, ·); and θ0 and θ1 are covariance hyperparameters and likelihood parameters, respectively. In other words, the class of models specified by Equations (1) and (2) satisfy the following two criteria: (a) factorization of the prior over the latent functions and (b) factorization of the conditional likelihood over the observations. Existing GP models including GP regression [1], binary classification [6, 12], warped GPs [13], log Gaussian Cox processes [14], multi-class classification [12], and multi-output regression [15] all belong to this family of models. 3 Automated variational inference for GP models This section describes our automated inference framework for posterior inference of the latent functions for the given family of models. Apart from Equations (1) and (2), we only require access to the likelihood function in a black-box manner, i.e. specific knowledge of its shape or its gradient is not needed. Posterior inference for general (non-Gaussian) likelihoods is analytically intractable. We build our posterior approximation framework upon variational inference principles. This entails positing a tractable family of distributions and finding the member of the family that is “closest” to the true posterior in terms of their KL divergence. Herein we choose the family of mixture of Gaussians (MoG) with K components, defined as q(f|λ) = 1 K K X k=1 qk(f|mk, Sk) = 1 K K X k=1 Q Y j=1 N(f•j; mkj, Skj), λ = {mkj, Skj}, (3) where qk(f|mk, Sk) is the component k with variational parameters mk = {mkj}Q j=1 and Sk = {Skj}Q j=1. Less general MoG with isotropic covariances have been used with variational inference in [7, 19]. Note that within each component, the posteriors over the latent functions are independent. Minimizing the divergence KL[q(f|λ)||p(f|y)] is equivalent to maximizing the evidence lower bound (ELBO) given by: log p(y) ≥Eq[−log q(f|λ)] + Eq[log p(f)] | {z } −KL[q(f|λ)||p(f)] + 1 K K X k=1 Eqk[log p(y|f)] ∆= L. (4) Observe that the KL term in Equation (4) does not depend on the likelihood. The remaining term, called the expected log likelihood (ELL), is the only contribution of the likelihood to the ELBO. We can thus address the technical difficulties regarding each component and their derivatives separately using different approaches. In particular, we can obtain a lower bound of the first term (KL) and approximate the second term (ELL) via sampling. Due to the limited space, we only show the main results and refer the reader to the supplementary material for derivation details. 3.1 A lower bound of −KL[q(f|λ)||p(f)] The first component of the KL divergence term is the entropy of a Gaussian mixture which is not analytically tractable. However, a lower bound of this entropy can be obtained using Jensen’s inequality (see e.g. [20]) giving: Eq[−log q(f|λ)] ≥− K X k=1 1 K log K X l=1 1 K N(mk; ml, Sk + Sl). (5) The second component of the KL term is a negative cross-entropy between a Gaussian mixture and a Gaussian, which can be computed analytically giving: Eq[log p(f)] = − 1 2K K X k=1 Q X j=1  N log 2π + log |Kj| + mT kjK−1 j mkj + tr (K−1 j Skj)  . (6) The gradients of the two terms in Equations (5) and (6) wrt the variational parameters can be computed analytically and are given in the supplementary material. 3 3.2 An approximation to the expected log likelihood (ELL) It is clear from Equation (4) that the ELL can be obtained via the ELLs of the individual mixture components Eqk[log p(y|f)]. Due to the factorial assumption of p(y|f), the expectation becomes: Eqk[log p(y|f)] = N X n=1 Eqk(n)[log p(yn|fn•)], (7) where qk(n) = qk(n)(fn•|λk(n)) is the marginal posterior with variational parameters λk(n) that correspond to fn•. The gradients of these individual ELL terms wrt the variational parameters λk(n) are given by: ∇λk(n)Eqk(n)[log p(yn|fn•)] =Eqk(n)∇λk(n) log qk(n)(fn•|λk(n)) log p(yn|fn•). (8) Using Equations (7) and (8) we establish the following theorem regarding the computation of the ELL and its gradients. Theorem 1. The expected log likelihood and its gradients can be approximated using samples from univariate Gaussian distributions. The proof is in Section 1 of the supplementary material. A less general result, for the case of one latent function and the variational Gaussian posterior, was obtained in [17] using a different derivation. Note that when Q > 1, qk(n) is not a univariate marginal. Nevertheless, it has a diagonal covariance matrix due to the factorization of the latent posteriors so the theorem still holds. 3.3 Learning of the variational parameters and other model parameters In order to learn the parameters of the model we use gradient-based optimization of the ELBO. For this we require the gradients of the ELBO wrt all model parameters. Variational parameters. The noisy gradients of the ELBO w.r.t. the variational means mk(n) and variances Sk(n) corresponding to data point n are given by: ˆ∇mk(n)L ≈∇mk(n)Lent + ∇mk(n)Lcross + 1 KS s−1 k(n) ◦ S X i=1 (f i n• −mk(n)) log p(yn|f i n•), (9) ˆ∇Sk(n)L ≈∇Sk(n)Lent + ∇Sk(n)Lcross + 1 2KS dg S X i=1  s−1 k(n) ◦s−1 k(n) ◦(f i n• −mk(n)) ◦(f i n• −mk(n)) −s−1 k(n)  log p(yn|f i n•) (10) where ◦is the entrywise Hadamard product; {f i n•}S i=1 are samples from qk(n)(fn•|mk(n), sk(n)); sk(n) is the diagonal of Sk(n) and s−1 k(n) is the element-wise inverse of sk(n); dg turns a vector to a diagonal matrix; and Lent = Eq[−log q(f|λ)] and Lcross = Eq[log p(f)] are given by Equations (5) and (6). The control variates technique described in [16] is also used to further reduce the variance of these estimators. Covariance hyperparameters. The ELBO in Equation (4) reveals a remarkable property: the hyperparameters depend only on the negative cross-entropy term Eq[log p(f)] whose exact expression was derived in Equation (6). This has a significant practical implication: despite using black-box inference, the hyperparameters are optimized wrt the true evidence lower bound (given fixed variational parameters). This is an additional and crucial advantage of our automated inference method over other generic inference techniques [16] that seem incapable of hyperparameter learning, in part because there are not yet techniques for reducing the variance of the gradient estimators. The gradient of the ELBO wrt any hyperparameter θ of the j-th covariance function is given by: ∇θL = −1 2K K X k=1 tr K−1 j ∇θKj −K−1 j ∇θKjK−1 j (mkjmT kj + Sj)  . (11) 4 Likelihood parameters The noisy gradients w.r.t. the likelihood parameters can also be estimated via samples from univariate marginals: ∇θ1L ≈ 1 KS K X k=1 N X n=1 S X i=1 ∇θ1 log p(yn|f k,i (n), θ1), where f k,i (n) ∼qk(n)(fn•|mk(n), sk(n)). (12) 3.4 Practical variational distributions The gradients from the previous section may be used for automated variational inference for GP models. However, the mixture of Gaussians (MoG) requires O(N 2) variational parameters for each covariance matrix, i.e. we need to estimate a total of O(QKN 2) parameters. This causes difficulties for learning when these parameters are optimized simultaneously. This section introduces two special members of the MoG family that improve the practical tractability of our inference framework. Full Gaussian posterior. This instance is the mixture with only 1 component and is thus a Gaussian distribution. Its covariance matrix has block diagonal structure, where each block is a full covariance corresponding to that of a single latent function posterior. We thus refer to it as the full Gaussian posterior. As stated in the following theorem, full Gaussian posteriors can still be estimated efficiently in our variational framework. Theorem 2. Only O(QN) variational parameters are required to parametrize the latent posteriors with full covariance structure. The proof is given Section 2 of the supplementary material. This result has been stated previously (see e.g. [6, 7, 17]) but for specific models that belong to the class of GP models considered here. Mixture of diagonal Gaussians posterior. Our second practical variational posterior is a Gaussian mixture with diagonal covariances, yielding two immediate benefits. Firstly, only O(QN) parameters are required for each mixture component. Secondly, computation is more efficient as inverting a diagonal covariance can be done in linear time. Furthermore, as a result of the following theorem, optimization will typically converge faster when using a mixture of diagonal Gaussians. Theorem 3. The estimator of the gradients wrt the variational parameters using the mixture of diagonal Gaussians has a lower variance than the full Gaussian posterior’s. The proof is in Section 3 of the supplementary material and is based on the Rao-Blackwellization technique [21]. We note that this result is different to that in [16]. In particular, our variational distribution is a mixture, thus multi-modal. The theorem is only made possible due to the analytical tractability of the KL term in the ELBO. Given the noisy gradients, we use off-the-shelf, gradient-based optimizers, such as conjugate gradient, to learn the model parameters. Note that stochastic optimization may also be used, but it may require significant time and effort in tuning the learning rates. 3.5 Prediction Given the MoG posterior, the predictive distribution for new test points x∗is given by: p(Y∗|x∗) = 1 K K X k=1 Z p(Y∗|f∗) Z p(f∗|f)qk(f)dfdf∗. (13) The inner integral is the predictive distribution of the latent values f∗and it is a Gaussian since both qk(f) and p(f∗|f) are Gaussian. The probability of the test points taking values y∗(e.g. in classification) can thus be readily estimated via Monte Carlo sampling. The predictive means and variances of a MoG can be obtained from that of the individual mixture components as described in Section 6 of the supplementary material. 5 Table 1: Datasets, their statistics, and the corresponding likelihood functions and models used in the experiments, where Ntrain, Ntest, and D are the training size, testing size, and the input dimension, respectively. See text for detailed description of the models. Dataset Ntrain Ntest D Likelihood p(y|f) Model Mining disasters 811 0 1 λy exp(−λ)/y! Log Gausian Cox process Boston housing 300 206 13 N(y; f, σ2) Standard regression Creep 800 1266 30 ∇yt(y)N(t(y); f, σ2) Warped Gaussian processes Abalone 1000 3177 8 same as above Warped Gaussian processes Breast cancer 300 383 9 1/(1 + exp(−f)) Binary classification USPS 1233 1232 256 exp(fc)/ P i=1 exp(fi) Multi-class classification 4 Experiments We perform experiments with five GP models: standard regression [1], warped GPs [13], binary classification [6, 12], multi-class classification [12], and log Gaussian Cox processes [14] on six datasets (see Table 1) and repeat the experiments five times using different data subsets. Experimental settings. The squared exponential covariance function with automatic relevance determination (see Ch. 4 in [1]) is used with the GP regression and warped GPs. The isotropic covariance is used with all other models. The noisy gradients of the ELBO are approximated with 2000 samples and 200 samples are used with control variates to reduce the variance of the gradient estimators. The model parameters (variational, covariance hyperparameters and likelihood parameters) are learned by iteratively optimizing one set while fixing the others until convergence, which is determined when changes are less than 1e-5 for the ELBO or 1e-3 for the variational parameters. Evaluation metrics. To assess the predictive accuracy, we use the standardized squared error (SSE) for the regression tasks and the classification error rates for the classification tasks. The negative log predictive density (NLPD) is also used to evaluate the confidence of the prediction. For all of the metrics, smaller figures are better. Notations. We call our method AGP and use AGP-FULL, AGP-MIX and AGP-MIX2 when using the full Gaussian and the mixture of diagonal Gaussians with 1 and 2 components, respectively. Details of these two posteriors were given in Section 3.4. On the plots, we use the shorter notations, FULL, MIX, and MIX2 due to the limited space. Reading the box plots. We used box plots to give a more complete picture of the predictive performance. Each plot corresponds to the distribution of a particular metric evaluated at all test points for a given task. The edges of a box are the q1 = 25th and q3 = 75th percentiles and the central mark is the median. The dotted line marks the limit of extreme points that are greater than the 97.5th percentile. The whiskers enclose the points in the range (q1 −1.5(q3 −q1), q3 +1.5(q3 −q1)), which amounts to approximately ±2.7σ if the data is normally distributed. The points outside the whiskers and below the dotted line are outliers and are plotted individually. 4.1 Standard regression First we consider the standard Gaussian process regression for which the predictive distribution can be computed analytically. We compare with this exact inference method (GPR) using the Boston housing dataset [22]. The results in Figure 1 show that AGP-FULL achieves nearly identical performance as GPR. This is expected as the analytical posterior is a full Gaussian. AGP-MIX and AGP-MIX2 also give comparable performance in terms of the median SSE and NLPD. 4.2 Warped Gaussian processes (WGP) The WGP allows for non-Gaussian processes and non-Gaussian noises. The likelihood for each target yn is attained by warping it through a nonlinear monotonic transformation t(y) giving p(yn|fn) = ∇ynt(yn)N(t(yn)|fn, σ2). We used the same neural net style transformation as in [13]. We fixed the warp parameters and used the same procedure for making analytical approximations to the predicted means and variances for all methods. 6 FULL MIX MIX2 GPR 0 0.2 0.4 0.6 0.8 Boston housing SSE FULL MIX MIX2 GPR 2 3 4 5 6 7 8 Boston housing NLPD Figure 1: The distributions of SSE and NLPD of all methods on the regression task. Compared to the exact inference method GPR, the performance of AGP-FULL is identical while that of AGP-MIX and AGP-MIX2 are comparable. FULL MIX MIX2 GPR WGP 0 0.1 0.2 0.3 0.4 Creep SSE FULL MIX MIX2 GPR WGP 2 3 4 5 6 7 Creep NLPD FULL MIX MIX2 GPR WGP 0 0.5 1 1.5 2 2.5 3 Abalone SSE FULL MIX MIX2 GPR WGP 1 2 3 4 5 Abalone NLPD Figure 2: The distributions of SSE and NLPD of all methods on the regression task with warped GPs. The AGP methods (FULL, MIX and MIX2) give comparable performance to exact inference with WGP and slightly outperform GPR which has narrower ranges of predictive variances. We compare with the exact implementation of [13] and the standard GP regression (GPR) on the Creep [23] and Abalone [22] datasets. The results in Figure 2 show that the AGP methods give comparable performance to the exact method WGP and slightly outperform GPR. The prediction by GPR exhibits characteristically narrower ranges of predictive variances which can be attributed to its Gaussian noise assumption. 4.3 Classification For binary classification, we use the logistic likelihood and experiment with the Wisconsin breast cancer dataset [22]. We compare with the variational bounds (VBO) and the expectation propagation (EP) methods. Details of VBO and EP can be found in [6]. All methods use the same analytical approximations when making prediction. For multi-class classification, we use the softmax likelihood and experiment with a subset of the USPS dataset [1] containing the digits 4, 7, and 9. We compare with a variational inference method (VQ) which constructs the ELBO via a quadratic lower bound to the likelihood terms [5]. Prediction is made by squashing the samples from the predictive distributions of the latent values at test points through the softmax likelihood for all methods. Breast cancer USPS 0 0.01 0.02 0.03 0.04 0.05 0.06 Error rates VQ FULL MIX MIX2 VBO EP FULL MIX MIX2 VBO EP 0 0.2 0.4 0.6 0.8 1 Breast cancer NLPD FULL MIX MIX2 VQ 0 0.2 0.4 0.6 0.8 1 USPS NLPD Figure 3: Left plot: classification error rates averaged over 5 runs (the error bars show two standard deviations). The AGP methods have classification errors comparable to the hard-coded implementations. Middle and right plots: the distribution of NLPD of all methods on the binary and multi-class classification tasks, respectively. The hard-coded methods are slightly better than AGP. 7 1860 1880 1900 1920 1940 1960 0 1 2 3 4 Time Event counts 1860 1880 1900 1920 1940 1960 0 0.1 0.2 0.3 0.4 0.5 0.6 Time Intensity Posteriors of the latent intensity FULL MIX HMC & ESS Time comparison against HMC 0 0.5 1 1.5 2 2.5 Log10 speed−up factor FULL MIX ESS Figure 4: Left plot: the true event counts during the given time period. Middle plot: the posteriors (estimated intensities) inferred by all methods. For each method, the middle line is the posterior mean and the two remaining lines enclose 90% interval. AGP-FULL infers the same posterior as HMC and ESS while AGP-MIX obtains the same mean but underestimates the variance. Right plot: speed-up factors against the HMC method. The AGP methods run more than 2 orders of magnitude faster than the sampling methods. The classification error rates and the NLPD are shown in Figure 3 for both tasks. For binary classification, the AGP methods give comparable performance to the hard-coded implementations, VBO and EP. The latter is often considered the best approximation method for this task [6]. Similar results can be observed for the multi-class classification problem. We note that the running times of our methods are comparable to that of the hard-coded methods. For example, the average training times for VBO, EP, MIX, and FULL are 76s, 63s, 210s, and 480s respectively, on the Wisconsin dataset. 4.4 Log Gaussian Cox process (LGCP) The LGCP is an inhomogeneous Poisson process with the log-intensity function being a shifted draw from a Gaussian process. Following [4], we use the likelihood p(yn|fn) = λyn n exp(−λn) yn! , where λn = exp(fn + m) is the mean of a Poisson distribution and m is the offset to the log mean. The data concerns coal-mining disasters taken from a standard dataset for testing point processes [24]. The offset m and the covariance hyperparameters are set to the same values as in [4]. We compare AGP with the Hybrid Monte Carlo (HMC, [25]) and elliptical slice sampling (ESS, [4]) methods, where the latter is designed specifically for GP models. We collected every 100th sample for a total of 10k samples after a burn-in period of 5k samples; the Gelman-Rubin potential scale reduction factors [26] are used to check for convergence. The middle plot of Figure 4 shows the posteriors learned by all methods. We see that the posterior by AGP-FULL is similar to that by HMC and ESS. AGP-MIX obtains the same posterior mean but it underestimates the variance. The right plot shows the speed-up factors of all methods against the slowest method HMC. The AGP methods run more than two orders of magnitude faster than HMC, thus confirming the computational advantages of our method to the sampling approaches. Training time was measured on a desktop with Intel(R) i7-2600 3.40GHz CPU with 8GB of RAM using Matlab R2012a. 5 Discussion We have developed automated variational inference for Gaussian process models (AGP). AGP performs as well as the exact or hard-coded implementations when testing on five models using six real world datasets. AGP has the potential to be a powerful tool for GP practitioners and researchers when devising models for new or existing problems for which variational inference is not yet available. In the future we will address the scalability of AGP to deal with very large datasets. Acknowledgements NICTA is funded by the Australian Government through the Department of Communications and the Australian Research Council through the ICT Centre of Excellence Program. 8 References [1] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian processes for machine learning. The MIT Press, 2006. [2] Radford M. Neal. Probabilistic inference using Markov chain Monte Carlo methods. Technical report, Department of Computer Science, University of Toronto, 1993. [3] Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Springer, 1998. [4] Iain Murray, Ryan Prescott Adams, and David J.C. MacKay. Elliptical slice sampling. In AISTATS, 2010. [5] Mohammad E. Khan, Shakir Mohamed, Benjamin M. Marlin, and Kevin P. Murphy. A stick-breaking likelihood for categorical data analysis with latent Gaussian models. In AISTATS, pages 610–618, 2012. [6] Hannes Nickisch and Carl Edward Rasmussen. Approximations for binary Gaussian process classification. Journal of Machine Learning Research, 9(10), 2008. [7] Trung V. Nguyen and Edwin Bonilla. Efficient variational inference for Gaussian process regression networks. In AISTATS, pages 472–480, 2013. [8] Mohammad E. Khan, Shakir Mohamed, and Kevin P. Murphy. Fast Bayesian inference for non-conjugate Gaussian process regression. In NIPS, pages 3149–3157, 2012. [9] Miguel L´azaro-Gredilla. Bayesian warped Gaussian processes. In NIPS, pages 1628–1636, 2012. [10] Mark Girolami and Simon Rogers. Variational Bayesian multinomial probit regression with Gaussian process priors. Neural Computation, 18(8):1790–1817, 2006. [11] Miguel L´azaro-Gredilla and Michalis Titsias. Variational heteroscedastic Gaussian process regression. In ICML, 2011. [12] Christopher K.I. Williams and David Barber. Bayesian classification with Gaussian processes. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 20(12):1342–1351, 1998. [13] Edward Snelson, Carl Edward Rasmussen, and Zoubin Ghahramani. Warped Gaussian processes. In NIPS, 2003. [14] Jesper Møller, Anne Randi Syversveen, and Rasmus Plenge Waagepetersen. Log Gaussian Cox processes. Scandinavian journal of statistics, 25(3):451–482, 1998. [15] Andrew G. Wilson, David A. Knowles, and Zoubin Ghahramani. Gaussian process regression networks. In ICML, 2012. [16] Rajesh Ranganath, Sean Gerrish, and David M. Blei. Black box variational inference. In AISTATS, 2014. [17] Manfred Opper and C´edric Archambeau. The variational Gaussian approximation revisited. Neural Computation, 21(3):786–792, 2009. [18] H˚avard Rue, Sara Martino, and Nicolas Chopin. Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations. Journal of the royal statistical society: Series b (statistical methodology), 71(2):319–392, 2009. [19] Samuel J. Gershman, Matthew D. Hoffman, and David M. Blei. Nonparametric variational inference. In ICML, 2012. [20] Marco F. Huber, Tim Bailey, Hugh Durrant-Whyte, and Uwe D. Hanebeck. On entropy approximation for Gaussian mixture random vectors. In IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems, 2008. [21] George Casella and Christian P. Robert. Rao-Blackwellisation of sampling schemes. Biometrika, 1996. [22] K. Bache and M. Lichman. UCI machine learning repository, 2013. [23] D. Cole, C. Martin-Moran, A.G. Sheard, H.K.D.H. Bhadeshia, and D.J.C. MacKay. Modelling creep rupture strength of ferritic steel welds. Science and Technology of Welding & Joining, 5(2):81–89, 2000. [24] R.G. Jarrett. A note on the intervals between coal-mining disasters. Biometrika, 66(1):191–193, 1979. [25] Simon Duane, Anthony D. Kennedy, Brian J. Pendleton, and Duncan Roweth. Hybrid Monte Carlo. Physics letters B, 195(2):216–222, 1987. [26] Andrew Gelman and Donald B Rubin. Inference from iterative simulation using multiple sequences. Statistical science, pages 457–472, 1992. 9
2014
225
5,320
Extreme bandits Alexandra Carpentier Statistical Laboratory, CMS University of Cambridge, UK a.carpentier@statslab.cam.ac.uk Michal Valko SequeL team INRIA Lille - Nord Europe, France michal.valko@inria.fr Abstract In many areas of medicine, security, and life sciences, we want to allocate limited resources to different sources in order to detect extreme values. In this paper, we study an efficient way to allocate these resources sequentially under limited feedback. While sequential design of experiments is well studied in bandit theory, the most commonly optimized property is the regret with respect to the maximum mean reward. However, in other problems such as network intrusion detection, we are interested in detecting the most extreme value output by the sources. Therefore, in our work we study extreme regret which measures the efficiency of an algorithm compared to the oracle policy selecting the source with the heaviest tail. We propose the EXTREMEHUNTER algorithm, provide its analysis, and evaluate it empirically on synthetic and real-world experiments. 1 Introduction We consider problems where the goal is to detect outstanding events or extreme values in domains such as outlier detection [1], security [18], or medicine [17]. The detection of extreme values is important in many life sciences, such as epidemiology, astronomy, or hydrology, where, for example, we may want to know the peak water flow. We are also motivated by network intrusion detection where the objective is to find the network node that was compromised, e.g., by seeking the one creating the most number of outgoing connections at once. The search for extreme events is typically studied in the field of anomaly detection, where one seeks to find examples that are far away from the majority, according to some problem-specific distance (cf. the surveys [8, 16]). In anomaly detection research, the concept of anomaly is ambiguous and several definitions exist [16]: point anomalies, structural anomalies, contextual anomalies, etc. These definitions are often followed by heuristic approaches that are seldom analyzed theoretically. Nonetheless, there exist some theoretical characterizations of anomaly detection. For instance, Steinwart et al. [19] consider the level sets of the distribution underlying the data, and rare events corresponding to rare level sets are then identified as anomalies. A very challenging characteristic of many problems in anomaly detection is that the data emitted by the sources tend to be heavy-tailed (e.g., network traffic [2]) and anomalies come from the sources with the heaviest distribution tails. In this case, rare level sets of [19] correspond to distributions’ tails and anomalies to extreme values. Therefore, we focus on the kind of anomalies that are characterized by their outburst of events or extreme values, as in the setting of [22] and [17]. Since in many cases, the collection of the data samples emitted by the sources is costly, it is important to design adaptive-learning strategies that spend more time sampling sources that have a higher risk of being abnormal. The main objective of our work is the active allocation of the sampling resources for anomaly detection, in the setting where anomalies are defined as extreme values. Specifically, we consider a variation of the common setting of minimal feedback also known as the bandit setting [14]: the learner searches for the most extreme value that the sources output by probing the sources sequentially. In this setting, it must carefully decide which sources to observe 1 because it only receives the observation from the source it chooses to observe. As a consequence, it needs to allocate the sampling time efficiently and should not waste it on sources that do not have an abnormal character. We call this specific setting extreme bandits, but it is also known as max-k problem [9, 21, 20]. We emphasize that extreme bandits are poles apart from classical bandits, where the objective is to maximize the sum of observations [3]. An effective algorithm for the classical bandit setting should focus on the source with the highest mean, while an effective algorithm for the extreme bandit problem should focus on the source with the heaviest tail. It is often the case that a heavy-tailed source has a small mean, which implies that the classical bandit algorithms perform poorly for the extreme bandit problem. The challenging part of our work dwells in the active sampling strategy to detect the heaviest tail under the limited bandit feedback. We proffer EXTREMEHUNTER, a theoretically founded algorithm, that sequentially allocates the resources in an efficient way, for which we prove performance guarantees. Our algorithm is efficient under a mild semi-parametric assumption common in extreme value theory, while known results by [9, 21, 20] for the extreme bandit problem only hold in a parametric setting (see Section 4 for a detailed comparison). 2 Learning model for extreme bandits In this section, we formalize the active (bandit) setting and characterize the measure of performance for any algorithm π. The learning setting is defined as follows. Every time step, each of the K arms (sources) emits a sample Xk,t ∼Pk, unknown to the learner. The precise characteristics of Pk are defined in Section 3. The learner π then chooses some arm It and then receives only the sample XIt,t. The performance of π is evaluated by the most extreme value found and compared to the most extreme value possible. We define the reward of a learner π as: Gπ n = max t≤n XIt,t The optimal oracle strategy is the one that chooses at each time the arm with the highest potential revealing the highest value, i.e., the arm ∗with the heaviest tail. Its expected reward is then: E [G∗ n] = max k≤K E  max t≤n Xk,t  The goal of learner π is to get as close as possible to the optimal oracle strategy. In other words, the aim of π is to minimize the expected extreme regret: Definition 1. The extreme regret in the bandit setting is defined as: E [Rπ n] = E [G∗ n] −E [Gπ n] = max k≤K E  max t≤n Xk,t  −E  max t≤n XIt,t  3 Heavy-tailed distributions In this section, we formally define our observation model. Let X1, . . . , Xn be n i.i.d. observations from a distribution P. The behavior of the statistic maxi≤n Xi is studied by extreme value theory. One of the main results is the Fisher-Tippett-Gnedenko theorem [11, 12] that characterizes the limiting distribution of this maximum as n converges to infinity. Specifically, it proves that a rescaled version of this maximum converges to one of the three possible distributions: Gumbel, Fr´echet, or Weibull. This rescaling factor depends on n. To be concise, we write “maxi≤n Xi converges to a distribution” to refer to the convergence of the rescaled version to a given distribution. The Gumbel distribution corresponds to the limiting distribution of the maximum of ‘not too heavy tailed’ distributions, such as sub-Gaussian or sub-exponential distributions. The Weibull distribution coincides with the behaviour of the maximum of some specific bounded random variables. Finally, the Fr´echet distribution corresponds to the limiting distribution of the maximum of heavy-tailed random variables. As many interesting problems concern heavy-tailed distributions, we focus on Fr´echet distributions in this work. The distribution function of a Fr´echet random variable is defined for x ≥m, and for two parameters α, s as: P(x) = exp  − x−m s α . 2 In this work, we consider positive distributions P : [0, ∞) →[0, 1]. For α > 0, the FisherTippett-Gnedenko theorem also states that the statement ‘P converges to an α-Fr´echet distribution’ is equivalent to the statement ‘1−P is a −α regularly varying function in the tail’. These statements are slightly less restrictive than the definition of approximately α-Pareto distributions1, i.e., that there exists C such that P verifies: lim x→∞ |1 −P(x) −Cx−α| x−α = 0, (1) or equivalently that P(x) = 1 −Cx−α + o(x−α). If and only if 1 −P is −α regularly varying in the tail, then the limiting distribution of maxi Xi is an α-Fr´echet distribution. The assumption of −α regularly varying in the tail is thus the weakest possible assumption that ensures that the (properly rescaled) maximum of samples emitted by a heavy tailed distributions has a limit. Therefore, the very related assumption of approximate Pareto is almost minimal, but it is (provably) still not restrictive enough to ensure a convergence rate. For this reason, it is natural to introduce an assumption that is slightly stronger than (1). In particular, we assume, as it is common in the extreme value literature, a second order Pareto condition also known as the Hall condition [13]. Definition 2. A distribution P is (α, β, C, C′)-second order Pareto (α, β, C, C′ > 0) if for x ≥0: 1 −P(x) −Cx−α ≤C′x−α(1+β) By this definition, P(x) = 1 −Cx−α + O x−α(1+β) , which is stronger than the assumption P(x) = 1 −Cx−α + o(x−α), but similar for small β. Remark 1. In the definition above, β defines the rate of the convergence (when x diverges to infinity) of the tail of P to the tail of a Pareto distribution 1 −Cx−α. The parameter α characterizes the heaviness of the tail: The smaller the α, the heavier the tail. In the reminder of the paper, we will be therefore concerned with learning the α and identifying the smallest one among the sources. 4 Related work There is a vast body of research in offline anomaly detection which looks for examples that deviate from the rest of the data, or that are not expected from some underlying model. A comprehensive review of many anomaly detection approaches can be found in [16] or [8]. There has been also some work in active learning for anomaly detection [1], which uses a reduction to classification. In online anomaly detection, most of the research focuses on studying the setting where a set of variables is monitored. A typical example is the monitoring of cold relief medications, where we are interested in detecting an outbreak [17]. Similarly to our focus, these approaches do not look for outliers in a broad sense but rather for the unusual burst of events [22]. In the extreme values settings above, it is often assumed, that we have full information about each variable. This is in contrast to the limited feedback or a bandit setting that we study in our work. There has been recently some interest in bandit algorithms for heavy-tailed distributions [4]. However the goal of [4] is radically different from ours as they maximize the sum of rewards and not the maximal reward. Bandit algorithms have been already used for network intrusion detection [15], but they typically consider classical or restless setting. [9, 21, 20] were the first to consider the extreme bandits problem, where our setting is defined as the max-k problem. [21] and [9] consider a fully parametric setting. The reward distributions are assumed to be exactly generalized extreme value distributions. Specifically, [21] assumes that the distributions are exactly Gumbel, P(x) = exp(−(x −m)/s)), and [9], that the distributions are exactly of Gumbel or Fr´echet P(x) = exp(−(x −m)α/(sα))). Provided that these assumptions hold, they propose an algorithm for which the regret is asymptotically negligible when compared to the optimal oracle reward. These results are interesting since they are the first for extreme bandits, but their parametric assumption is unlikely to hold in practice and the asymptotic nature of their bounds limits their impact. Interestingly, the objective of [20] is to remove the parametric assumptions of [21, 9] by offering the THRESHOLDASCENT algorithm. However, no analysis of this algorithm for extreme bandits is provided. Nonetheless, to the best of our knowledge, this is the closest competitor for EXTREMEHUNTER and we empirically compare our algorithm to THRESHOLDASCENT in Section 7. 1We recall the definition of the standard Pareto distribution as a distribution P, where for some constants α and C, we have that for x ≥C1/α, P = 1 −Cx−α. 3 In this paper we also target the extreme bandit setting, but contrary to [9, 21, 20], we only make a semi-parametric assumption on the distribution; the second order Pareto assumption (Definition 2), which is standard in extreme value theory (see e.g., [13, 10]). This is light-years better and significantly weaker than the parametric assumptions made in the prior works for extreme bandits. Furthermore, we provide a finite-time regret bound for our more general semi-parametric setting (Theorem 2), while the prior works only offer asymptotic results. In particular, we provide an upper bound on the rate at which the regret becomes negligible when compared to the optimal oracle reward (Definition 1). 5 Extreme Hunter In this section, we present our main results. In particular, we present the algorithm and the main theorem that bounds its extreme regret. Before that, we first provide an initial result on the expectation of the maximum of second order Pareto random variables which will set the benchmark for the oracle regret. We first characterize the expectation of the maximum of second order Pareto distributions. The following lemma states that the expectation of the maximum of i.i.d. second order Pareto samples is equal, up to a negligible term, to the expectation of the maximum of i.i.d. Pareto samples. This result is crucial for assessing the benchmark for the regret, in particular the expected value of the maximal oracle sample. Theorem 1 is based on Lemma 3, both provided in the appendix. Theorem 1. Let X1, . . . , Xn be n i.i.d. samples drawn according to (α, β, C, C′)-second order Pareto distribution P (see Definition 2). If α > 1, then: E(max i Xi) −(nC)1/αΓ 1−1 α  ≤4D2 n (nC)1/α + 2C′Dβ+1 Cβ+1nβ (nC)1/α + B = o  (nC)1/α , where D2, D1+β > 0 are some universal constants, and B is defined in the appendix (9). Theorem 1 implies that the optimal strategy in hindsight attains the following expected reward: E [G∗ n] ≈max k h (Ckn)1/αk Γ 1−1 α i Algorithm 1 EXTREMEHUNTER Input: K: number of arms n: time horizon b: where b ≤βk for all k ≤K N: minimum number of pulls of each arm Initialize: Tk ←0 for all k ≤K δ ←exp(−log2 n)/(2nK) Run: for t = 1 to n do for k = 1 to K do if Tk ≤N then Bk,t ←∞ else estimate bhk,t that verifies (2) estimate bCk,t using (3) update Bk,t using (5) with (2) and (4) end if end for Play arm kt ←arg maxk Bk,t Tkt ←Tkt + 1 end for Our objective is therefore to find a learner π such that E [G∗ n] −E [Gπ n] is negligible when compared to E[G∗ n], i.e., when compared to (nC∗)1/α∗Γ 1−1 α∗  ≈n1/α∗where ∗is the optimal arm. From the discussion above, we know that the minimization of the extreme regret is linked with the identification of the arm with the heaviest tail. Our EXTREMEHUNTER algorithm is based on a classical idea in bandit theory: optimism in the face of uncertainty. Our strategy is to estimate E [maxt≤n Xk,t] for any k and to pull the arm which maximizes its upper bound. From Definition 2, the estimation of this quantity relies heavily on an efficient estimation of αk and Ck, and on associated confidence widths. This topic is a classic problem in extreme value theory, and such estimators exist provided that one knows a lower bound b on βk [10, 6, 7]. From now on we assume that a constant b > 0 such that b ≤mink βk is known to the learner. As we argue in Remark 2, this assumption is necessary . Since our main theoretical result is a finite-time upper bound, in the following exposition we carefully describe all the constants and stress what quantities they depend on. Let Tk,t be the number of samples drawn from arm k at time t. Define δ = exp(−log2 n)/(2nK) and consider an estimator 4 bhk,t of 1/αk at time t that verifies the following condition with probability 1−δ, for Tk,t larger than some constant N2 that depends only on αk, Ck, C′ and b: 1 αk −bhk,t ≤D p log(1/δ)T −b/(2b+1) k,t = B1(Tk,t), (2) where D is a constant that also depends only on αk, Ck, C′, and b. For instance, the estimator in [6] (Theorem 3.7) verifies this property and provides D and N2 but other estimators are possible. Consider the associated estimator for Ck: bCk,t = T 1/(2b+1) k,t  1 Tk,t Tk,t X u=1 1 n Xk,u ≥T bhk,t/(2b+1) k,t o   (3) For this estimator, we know [7] with probability 1 −δ that for Tk,t ≥N2: Ck −bCk,t ≤E q log(Tk,t/δ) log(Tk,t)T −b/(2b+1) k,T = B2(Tk,t), (4) where E is derived in [7] in the proof of Theorem 2. Let N = max A log(n)2(2b+1)/b, N2  where A depends on (αk, Ck)k, b, D, E, and C′, and is such that: max (2B1(N), 2B2(N)/Ck) ≤1, N ≥(2D log2 n)(2b+1)/b, and N >  2D√ log(n)2 1−maxk 1/αk (2b+1)/b This inspires Algorithm 1, which first pulls each arm N times and then, at each time t > KN, pulls the arm that maximizes Bk,t, which we define as:  bCk,t + B2 (Tk,t)  n bhk,t+B1(Tk,t) ¯Γ  bhk,t, B1 (Tk,t)  , (5) where ¯Γ(x, y) = ˜Γ(1 −x −y), where we set ˜Γ = Γ for any x > 0 and +∞otherwise. Remark 2. A natural question is whether it is possible to learn βk as well. In fact, this is not possible for this model and a negative result was proved by [7]. The result states that in this setting it is not possible to test between two fixed values of β uniformly over the set of distributions. Thereupon, we define b as a lower bound for all βk. With regards to the Pareto distribution, β = ∞corresponds to the exact Pareto distribution, while β = 0 for such distribution that is not (asymptotically) Pareto. We show that this algorithm meets the desired properties. The following theorem states our main result by upper-bounding the extreme regret of EXTREMEHUNTER. Theorem 2. Assume that the distributions of the arms are respectively (αk, βk, Ck, C′) second order Pareto (see Definition 2) with mink αk > 1. If n ≥Q, the expected extreme regret of EXTREMEHUNTER is bounded from above as: E [Rn] ≤L(nC∗)1/α∗ K n log(n)(2b+1)/b + n−log(n)(1−1/α∗) + n−b/((b+1)α∗) = E [G∗ n] o(1), where L, Q > 0 are some constants depending only on (αk, Ck)k, C′, and b (Section 6). Theorem 2 states that the EXTREMEHUNTER strategy performs almost as well as the best (oracle) strategy, up to a term that is negligible when compared to the performance of the oracle strategy. Indeed, the regret is negligible when compared to (nC∗)1/α∗, which is the order of magnitude of the performance of the best oracle strategy E [G∗ n] = maxk≤K E [maxt≤n Xk,t]. Our algorithm thus detects the arm that has the heaviest tail. For n large enough (as a function of (αk, βk, Ck)k, C′ and K), the two first terms in the regret become negligible when compared to the third one, and the regret is then bounded as: E [Rn] ≤E [G∗ n] O  n−b/((b+1)α∗) We make two observations: First, the larger the b, the tighter this bound is, since the model is then closer to the parametric case. Second, smaller α∗also tightens the bound, since the best arm is then very heavy tailed and much easier to recognize. 5 6 Analysis In this section, we prove an upper bound on the extreme regret of Algorithm 1 stated in Theorem 2. Before providing the detailed proof, we give a high-level overview and the intuitions. In Step 1, we define the (favorable) high probability event ξ of interest, useful for analyzing the mechanism of the bandit algorithm. In Step 2, given ξ, we bound the estimates of αk and Ck, and use them to bound the main upper confidence bound. In Step 3, we upper-bound the number of pulls of each suboptimal arm: we prove that with high probability we do not pull them too often. This enables us to guarantee that the number of pulls of the optimal arms ∗is on ξ equal to n up to a negligible term. The final Step 4 of the proof is concerned with using this lower bound on the number of pulls of the optimal arm in order to lower bound the expectation of the maximum of the collected samples. Such step is typically straightforward in the classical (mean-optimizing) bandits by the linearity of the expectation. It is not straightforward in our setting. We therefore prove Lemma 2, in which we show that the expected value of the maximum of the samples in the favorable event ξ will be not too far away from the one that we obtain without conditioning on ξ. Step 1: High probability event. In this step, we define the favorable event ξ. We set δ def= exp(−log2n)/(2nK) and consider the event ξ such that for any k ≤K, N ≤T ≤n: 1 αk −˜hk(T) ≤D p log(1/δ)T −b/(2b+1), Ck −˜Ck(T) ≤E p log(T/δ)T −b/(2b+1), where ˜hk(T) and ˜Ck(T) are the estimates of 1/αk and Ck respectively using the first T samples. Notice, they are not the same as bhk,t and bCk,t which are the estimates of the same quantities at time t for the algorithm, and thus with Tk,t samples. The probability of ξ is larger than 1 −2nKδ by a union bound on (2) and (4). Step 2: Bound on Bk,t. The following lemma holds on ξ for upper- and lower-bounding Bk,t. Lemma 1. (proved in the appendix) On ξ, we have that for any k ≤K, and for Tk,t ≥N: (Ckn) 1 αk Γ  1−1 αk  ≤Bk,t ≤(Ckn) 1 αk Γ  1−1 αk   1 + F log(n) p log(n/δ)T −b/(2b+1) k,t  (6) Step 3: Upper bound on the number of pulls of a suboptimal arm. We proceed by using the bounds on Bk,t from the previous step to upper-bound the number of suboptimal pulls. Let ∗be the best arm. Assume that at round t, some arm k ̸= ∗is pulled. Then by definition of the algorithm B∗,t ≤Bk,t, which implies by Lemma 1: (C∗n)1/α∗ Γ 1−1 α∗  ≤(Ckn)1/αk Γ  1−1 αk   1 + F log(n) p log(n/δ)T −b/(2b+1) k,t  Rearranging the terms we get: (C∗n)1/α∗ Γ 1−1 α∗  (Ckn)1/αk Γ 1−1 αk  ≤1 + F log(n) p log(n/δ)T −b/(2b+1) k,t (7) We now define ∆k which is analogous to the gap in the classical bandits: ∆k = (C∗n)1/α∗ Γ 1−1 α∗  (Ckn)1/αk Γ 1−1 αk  −1 Since Tk,t ≤n, (7) implies for some problem dependent constants G and G′ dependent only on (αk, Ck)k, C′ and b, but independent of δ that: Tk,t ≤N + G′  log2n log(n/δ) ∆2 k (2b+1)/(2b) ≤N + G log2n log(n/δ) (2b+1)(2b) 6 This implies that number T ∗of pulls of arm ∗is with probability 1 −δ′, at least n − X k̸=∗ G log2n log(2nK/δ′) (2b+1)/(2b) −KN, where δ′ = 2nKδ. Since n is larger than Q ≥2KN + 2GK log2n log (2nK/δ′) (2b+1)/(2b) , we have that T ∗≥n 2 as a corollary. Step 4: Bound on the expectation. We start by lower-bounding the expected gain: E[Gn]=E  max t≤n XIt,Tk,t  ≥E  max t≤n XIt,Tk,t1{ξ}  ≥E  max t≤n X∗,T∗,t1{ξ}  =E  max i≤T ∗Xi1{ξ}  The next lemma links the expectation of maxt≤T ∗X∗,t with the expectation of maxt≤T ∗X∗,t1{ξ}. Lemma 2. (proved in the appendix) Let X1, . . . , XT be i.i.d. samples from an (α, β, C, C′)-second order Pareto distribution F. Let ξ′ be an event of probability larger than 1 −δ. Then for δ < 1/2 and for T ≥Q large enough so that c max 1/T, 1/T β ≤1/4 for a given constant c > 0, that depends only on C, C′ and β, and also for T ≥log(2) max C (2C′)1/β , 8 log (2)  : E  max t≤T Xt1{ξ}  ≥(TC)1/α Γ 1−1 α  − 4 + 8 α−1  (TC)1/α δ1−1/α −2  4D2 T (TC)1/α + 2C′D1+β C1+βT β (TC)1/α + B  . Since n is large enough so that 2n2Kδ′ = 2n2K exp −log2n  ≤1/2, where δ′ = exp −log2n  , and the probability of ξ is larger than 1 −δ′, we can use Lemma 2 for the optimal arm: E  max t≤T ∗X∗,t1{ξ}  ≥(T ∗C∗) 1 α∗  Γ 1−1 α∗  − 4+ 8 α−1  δ′1−1 α∗−8D2 T ∗− 4C′Dmax (C∗)1+b(T ∗)b − 2B (T ∗C∗) 1 α∗  , where Dmax def= maxi D1+βi. Using Step 3, we bound the above with a function of n. In particular, we lower-bound the last three terms in the brackets using T ∗≥n 2 and the (T ∗C∗)1/α∗factor as: (T ∗C∗)1/α∗≥(nC∗)1/α∗ 1 −GK n log(2n2K/δ′)  2b+1 2b −KN n  We are now ready to relate the lower bound on the gain of EXTREMEHUNTER with the upper bound of the gain of the optimal policy (Theorem 1), which brings us the upper bound for the regret: E [Rn] = E [G∗ n] −E [Gn] ≤E [G∗ n] −E  max i≤T ∗Xi  ≤E [G∗ n] −E  max t≤T ∗X∗,t1{ξ}  ≤H(nC∗)1/α∗ 1 n + 1 (nC∗)b + GK n log(2n2K/δ′)  2b+1 2b + KN n + δ′1−1/α∗+ B (nC∗)1/α∗  , where H is a constant that depends on (αk, Ck)k, C′, and b. To bound the last term, we use the definition of B (9) to get the n−β∗/((β∗+1)α∗) term, upper-bounded by n−b/((b+1)α∗) as b ≤β∗. Notice that this final term also eats up n−1 and n−b terms since b/((b + 1)α∗) ≤min(1, b). We finish by using δ′ = exp −log2n  and grouping the problem-dependent constants into L to get the final upper bound: E [Rn] ≤L(nC∗)1/α∗ K n log(n)(2b+1)/b + n−log(n)(1−1/α∗) + n−b/((b+1)α∗) 7 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 time t extreme regret Comparison of extreme bandit strategies (K=3) ExtremeHunter UCB ThresholdAscent 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 500 1000 1500 2000 2500 time t extreme regret Comparison of extreme bandit strategies (K=3) ExtremeHunter UCB ThresholdAscent 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 0 50 100 150 200 250 time t extreme regret Comparison of extreme bandit strategies on the network data K=5 ExtremeHunter UCB ThresholdAscent Figure 1: Extreme regret as a function of time for the exact Pareto distributions (left), approximate Pareto (middle) distributions, and the network traffic data (right). 7 Experiments In this section, we empirically evaluate EXTREMEHUNTER on synthetic and real-world data. The measure of our evaluation is the extreme regret from Definition 1. Notice that even thought we evaluate the regret as a function of time T, the extreme regret is not cumulative and it is more in the spirit of simple regret [5]. We compare our EXTREMEHUNTER with THRESHOLDASCENT [20]. Moreover, we also compare to classical UCB [3], as an example of the algorithm that aims for the arm with the highest mean as opposed to the heaviest tail. When the distribution of a single arm has both the highest mean and the heaviest-tail, both EXTREMEHUNTER and UCB are expected to perform the same with respect to the extreme regret. In the light of Remark 2, we set b = 1 to consider a wide class of distributions. Exact Pareto Distributions In the first experiment, we consider K = 3 arms with the distributions Pk(x) = 1−x−αk, where α = [5, 1.1, 2]. Therefore, the most heavy-tailed distribution is associated with the arm k = 2. Figure 1 (left) displays the averaged result of 1000 simulations with the time horizon T = 104. We observe that EXTREMEHUNTER eventually keeps allocating most of the pulls to the arm of the interest. Since in this case, the arm with the heaviest tail is also the arm with the largest mean, UCB also performs well and it is even able to detect the best arm earlier. THRESHOLDASCENT, on the other way, was not always able to allocate the pulls properly in 104 steps. This may be due to the discretization of the rewards that this algorithm is using. Approximate Pareto Distributions For the exact Pareto distributions, the smaller the tail index the higher the mean and even UCB obtains a good performance. However, this is no longer necessarily the case for the approximate Pareto distributions. For this purpose, we perform the second experiment where we mix an exact Pareto distribution with a Dirac distribution in 0. We consider K = 3 arms. Two of the arms follow the exact Pareto distributions with α1 = 1.5 and α3 = 3. On the other hand, the second arm has a mixture weight of 0.2 for the exact Pareto distribution with α2 = 1.1 and 0.8 mixture weight of the Dirac distribution in 0. For this setting, the second arm is the most heavy-tailed but the first arms has the largest mean. Figure 1 (middle) shows the result. We see that UCB performs worse since it eventually focuses on the arm with the largest mean. THRESHOLDASCENT performs better than UCB but not as good as EXTREMEHUNTER. Computer Network Traffic Data In this experiment, we evaluate EXTREMEHUNTER on heavytailed network traffic data which was collected from user laptops in the enterprise environment [2]. The objective is to allocate the sampling capacity among the computer nodes (arms), in order to find the largest outbursts of the network activity. This information then serves an IT department to further investigate the source of the extreme network traffic. For each arm, a sample at the time t corresponds to the number of network activity events for 4 consecutive seconds. Specifically, the network events are the starting times of packet flows. In this experiment, we selected K = 5 laptops (arms), where the recorded sequences were long enough. Figure 1 (right) shows that EXTREMEHUNTER again outperforms both THRESHOLDASCENT and UCB. Acknowledgements We would like to thank John Mark Agosta and Jennifer Healey for the network traffic data. The research presented in this paper was supported by Intel Corporation, by French Ministry of Higher Education and Research, and by European Community’s Seventh Framework Programme (FP7/2007-2013) under grant agreement no270327 (CompLACS). 8 References [1] Naoki Abe, Bianca Zadrozny, and John Langford. Outlier Detection by Active Learning. In Proceedings of the 12th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 504–509, 2006. [2] John Mark Agosta, Jaideep Chandrashekar, Mark Crovella, Nina Taft, and Daniel Ting. Mixture models of endhost network traffic. In IEEE Proceedings of INFOCOM,, pages 225–229. [3] Peter Auer, Nicol`o Cesa-Bianchi, and Paul Fischer. Finite-time Analysis of the Multiarmed Bandit Problem. Machine Learning, 47(2-3):235–256, 2002. [4] S´ebastien Bubeck, Nicol`o Cesa-Bianchi, and G´abor Lugosi. Bandits With Heavy Tail. Information Theory, IEEE Transactions on, 59(11):7711–7717, 2013. [5] S´ebastien Bubeck, R´emi Munos, and Gilles Stoltz. Pure Exploration in Multi-armed Bandits Problems. Algorithmic Learning Theory, pages 23–37, 2009. [6] Alexandra Carpentier and Arlene K. H. Kim. Adaptive and minimax optimal estimation of the tail coefficient. Statistica Sinica, 2014. [7] Alexandra Carpentier and Arlene K. H. Kim. Honest and adaptive confidence interval for the tail coefficient in the Pareto model. Electronic Journal of Statistics, 2014. [8] Varun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM Comput. Surv., 41(3):15:1–15:58, July 2009. [9] Vincent A. Cicirello and Stephen F. Smith. The max k-armed bandit: A new model of exploration applied to search heuristic selection. AAAI Conference on Artificial Intelligence, 2005. [10] Laurens de Haan and Ana Ferreira. Extreme Value Theory: An Introduction. Springer Series in Operations Research and Financial Engineering. Springer, 2006. [11] Ronald Aylmer Fisher and Leonard Henry Caleb Tippett. Limiting forms of the frequency distribution of the largest or smallest member of a sample. Mathematical Proceedings of the Cambridge Philosophical Society, 24:180, 1928. [12] Boris Gnedenko. Sur la distribution limite du terme maximum d’une s´erie al´eatoire. The Annals of Mathematics, 44(3):423–453, 1943. [13] Peter Hall and Alan H. Welsh. Best Attainable Rates of Convergence for Estimates of Parameters of Regular Variation. The Annals of Statistics, 12(3):1079–1084, 1984. [14] Tze L. Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [15] Keqin Liu and Qing Zhao. Dynamic Intrusion Detection in Resource-Constrained Cyber Networks. In IEEE International Symposium on Information Theory Proceedings, 2012. [16] Markos Markou and Sameer Singh. Novelty detection: a review, part 1: statistical approaches. Signal Process., 83(12):2481–2497, 2003. [17] Daniel B. Neill and Gregory F. Cooper. A multivariate Bayesian scan statistic for early event detection and characterization. Machine Learning, 79:261–282, 2010. [18] Carey E. Priebe, John M. Conroy, David J. Marchette, and Youngser Park. Scan Statistics on Enron Graphs. In Computational and Mathematical Organization Theory, volume 11, pages 229–247, 2005. [19] Ingo Steinwart, Don Hush, and Clint Scovel. A Classification Framework for Anomaly Detection. Journal of Machine Learning Research, 6:211–232, 2005. [20] Matthew J. Streeter and Stephen F. Smith. A Simple Distribution-Free Approach to the Max k-Armed Bandit Problem. In Principles and Practice of Constraint Programming, volume 4204, pages 560–574, 2006. [21] Matthew J. Streeter and Stephen F. Smith. An Asymptotically Optimal Algorithm for the Max k-Armed Bandit Problem. In AAAI Conference on Artificial Intelligence Intelligence, pages 135–142, 2006. [22] Ryan Turner, Zoubin Ghahramani, and Steven Bottone. Fast online anomaly detection using scan statistics. IEEE Workshop on Machine Learning for Signal Processing, 2010. 9
2014
226
5,321
Learning Mixed Multinomial Logit Model from Ordinal Data Sewoong Oh Dept. of Industrial and Enterprise Systems Engr. University of Illinois at Urbana-Champaign Urbana, IL 61801 swoh@illinois.edu Devavrat Shah Department of Electrical Engineering Massachussetts Institute of Technology Cambridge, MA 02139 devavrat@mit.edu Abstract Motivated by generating personalized recommendations using ordinal (or preference) data, we study the question of learning a mixture of MultiNomial Logit (MNL) model, a parameterized class of distributions over permutations, from partial ordinal or preference data (e.g. pair-wise comparisons). Despite its long standing importance across disciplines including social choice, operations research and revenue management, little is known about this question. In case of single MNL models (no mixture), computationally and statistically tractable learning from pair-wise comparisons is feasible. However, even learning mixture with two MNL components is infeasible in general. Given this state of affairs, we seek conditions under which it is feasible to learn the mixture model in both computationally and statistically efficient manner. We present a sufficient condition as well as an efficient algorithm for learning mixed MNL models from partial preferences/comparisons data. In particular, a mixture of r MNL components over n objects can be learnt using samples whose size scales polynomially in n and r (concretely, r3.5n3(log n)4, with r ≪n2/7 when the model parameters are sufficiently incoherent). The algorithm has two phases: first, learn the pair-wise marginals for each component using tensor decomposition; second, learn the model parameters for each component using RANKCENTRALITY introduced by Negahban et al. In the process of proving these results, we obtain a generalization of existing analysis for tensor decomposition to a more realistic regime where only partial information about each sample is available. 1 Introduction Background. Popular recommendation systems such as collaborative filtering are based on a partially observed ratings matrix. The underlying hypothesis is that the true/latent score matrix is lowrank and we observe its partial, noisy version. Therefore, matrix completion algorithms are used for learning, cf. [8, 14, 15, 20]. In reality, however, observed preference data is not just scores. For example, clicking one of the many choices while browsing provides partial order between clicked choice versus other choices. Further, scores do convey ordinal information as well, e.g. score of 4 for paper A and score of 7 for paper B by a reviewer suggests ordering B > A. Similar motivations led Samuelson to propose the Axiom of revealed preference [21] as the model for rational behavior. In a nutshell, it states that consumers have latent order of all objects, and the revealed preferences through actions/choices are consistent with this order. If indeed all consumers had identical ordering, then learning preference from partial preferences is effectively the question of sorting. In practice, individuals have different orderings of interest, and further, each individual is likely to make noisy choices. This naturally suggests the following model – each individual has a latent distribution over orderings of objects of interest, and the revealed partial preferences are consistent 1 with it, i.e. samples from the distribution. Subsequently, the preference of the population as a whole can be associated with a distribution over permutations. Recall that the low-rank structure for score matrices, as a model, tries to capture the fact that there are only a few different types of choice profile. In the context of modeling consumer choices as distribution over permutation, MultiNomial Logit (MNL) model with a small number of mixture components provides such a model. Mixed MNL. Given n objects or choices of interest, an MNL model is described as a parametric distribution over permutations of n with parameters w = [wi] ∈Rn: each object i, 1 ≤i ≤n, has a parameter wi > 0 associated with it. Then the permutations are generated randomly as follows: choose one of the n objects to be ranked 1 at random, where object i is chosen to be ranked 1 with probability wi/(Pn j=1 wj). Let i1 be object chosen for the first position. Now to select second ranked object, choose from remaining with probability proportional to their weight. We repeat until all objects for all ranked positions are chosen. It can be easily seen that, as per this model, an item i is ranked higher than j with probability wi/(wi + wj). In the mixed MNL model with r ≥2 mixture components, each component corresponds to a different MNL model: let w(1), . . . , w(r) be the corresponding parameters of the r components. Let q = [qa] ∈[0, 1]r denote the mixture distribution, i.e. P a qa = 1. To generate a permutation at random, first choose a component a ∈{1, . . . , r} with probability qa, and then draw random permutation as per MNL with parameters w(a). Brief history. The MNL model is an instance of a class of models introduced by Thurstone [23]. The description of the MNL provided here was formally established by McFadden [17]. The same model (in form of pair-wise marginals) was introduced by Zermelo [25] as well as Bradley and Terry [7] independently. In [16], Luce established that MNL is the only distribution over permutation that satisfies the axiom of Independence from Irrelevant Alternatives. On learning distributions over permutations, the question of learning single MNL model and more generally instances of Thurstone’s model have been of interest for quite a while now. The maximum likelihood estimator, which is logistic regression for MNL, has been known to be consistent in large sample limit, cf. [13]. Recently, RANKCENTRALITY [19] was established to be statistical efficient. For learning sparse mixture model, i.e. distribution over permutations with each mixture being delta distribution, [11] provided sufficient conditions under which mixtures can be learnt exactly using pair-wise marginals – effectively, as long as the number of components scaled as o(log n) where components satisfied appropriate incoherence condition, a simple iterative algorithm could recover the mixture. However, it is not robust with respect to noise in data or finite sample error in marginal estimation. Other approaches have been proposed to recover model using convex optimization based techniques, cf. [10, 18]. MNL model is a special case of a larger family of discrete choice models known as the Random Utility Model (RUM), and an efficient algorithm to learn RUM is introduced in [22]. Efficient algorithms for learning RUMs from partial rankings has been introduced in [3, 4]. We note that the above list of references is very limited, including only closely related literature. Given the nature of the topic, there are a lot of exciting lines of research done over the past century and we shall not be able to provide comprehensive coverage due to a space limitation. Problem. Given observations from the mixed MNL, we wish to learn the model parameters, the mixing distribution q, and parameters of each component w(1), . . . , w(r). The observations are in form of pair-wise comparisons. Formally, to generate an observation, first one of the r mixture components is chosen; and then for ℓof all possible n 2  pairs, comparison outcome is observed as per this MNL component1. These ℓpairs are chosen, uniformly at random, from a pre-determined N ≤ n 2  pairs: {(ik, jk), 1 ≤k ≤N}. We shall assume that the selection of N is such that the undirected graph G = ([n], E), where E = {(ik, jk) : 1 ≤k ≤N}, is connected. We ask following questions of interest: Is it always feasible to learn mixed MNL? If not, under what conditions and how many samples are needed? How computationally expensive are the algorithms? 1We shall assume that, outcomes of these ℓpairs are independent of each other, but coming from the same MNL mixture component. This is effectively true even they were generated by first sampling a permutation from the chosen MNL mixture component, and then observing implication of this permutation for the specific ℓpairs, as long as they are distinct due to the Irrelevance of Independent Alternative hypothesis of Luce that is satisfied by MNL. 2 We briefly recall a recent result [1] that suggests that it is impossible to learn mixed MNL models in general. One such example is described in Figure 1. It depicts an example with n = 4 and r = 2 and a uniform mixture distribution. For the first case, in mixture component 1, with probability 1 the ordering is a > b > c > d (we denote n = 4 objects by a, b, c and d); and in mixture component 2, with probability 1 the ordering is b > a > d > c. Similarly for the second case, the two mixtures are made up of permutations b > a > c > d and a > b > d > c. It is easy to see the distribution over any 3-wise comparisons generated from these two mixture models is identical. Therefore, it is impossible to differentiate these two using 3-wise or pair-wise comparisons. In general, [1] established that there exist mixture distributions with r ≤n/2 over n objects that are impossible to distinguish using log n-wise comparison data. That is, learning mixed MNL is not always possible. Mixture Model 1 a b > c > d > type 1 b a > d > c > type 2 b a > c > d > type 1 a b > d > c > type 2 a b > c > b a > c > a b > d > b a > d > a c > d > a d > c > b c > d > b d > c > Mixture Model 2 Latent Observed P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 P( ) = 0.5 Figure 1: Two mixture models that cannot be differentiated even with 3-wise preference data. Contributions. The main contribution of this work is identification of sufficient conditions under which mixed MNL model can be learnt efficiently, both statistically and computationally. Concretely, we propose a two-phase learning algorithm: in the first phase, using a tensor decomposition method for learning mixture of discrete product distribution, we identify pair-wise marginals associated with each of the mixture; in the second phase, we use these pair-wise marginals associated with each mixture to learn the parameters associated with each of the MNL mixture component. The algorithm in the first phase builds upon the recent work by Jain and Oh [12]. In particular, Theorem 3 generalizes their work for the setting where for each sample, we have limited information - as per [12], we would require that each individual gives the entire permutation; instead, we have extended the result to be able to cope with the current setting when we only have information about ℓ, potentially finite, pair-wise comparisons. The algorithm in the second phase utilizes RANKCENTRALITY [19]. Its analysis in Theorem 4 works for setting where observations are no longer independent, as required in [19]. We find that as long as certain rank and incoherence conditions are satisfied by the parameters of each of the mixture, the above described two phase algorithm is able to learn mixture distribution q and parameters associated with each mixture, w(1), . . . , w(r) faithfully using samples that scale polynomially in n and r – concretely, the number of samples required scale as r3.5n3(log n)4 with constants dependent on the incoherence between mixture components, and as long as r ≪n2/7 as well as G, the graph of potential comparisons, is a spectral expander with the total number of edges scaling as N = O(n log n). For the precise statement, we refer to Theorem 1. The algorithms proposed are iterative, and primarily based on spectral properties of underlying tensors/matrices with provable, fast convergence guarantees. That is, algorithms are not only polynomial time, they are practical enough to be scalable for high dimensional data sets. Notations. We use [N] = {1, . . . , N} for the first N positive integers. We use ⊗to denote the outer product such that (x ⊗y ⊗z)ijk = xiyjzk. Given a third order tensor T ∈Rn1×n2×n3 and a matrix U ∈Rn1×r1, V ∈Rn2×r2, W ∈Rn3×r3, we define a linear mapping T[U, V, W] ∈Rr1×r2×r3 as T[U, V, W]abc = P i,j,k TijkUiaVjbWkc. We let ∥x∥= pP i x2 i be the Euclidean norm of a vector, ∥M∥2 = max∥x∥≤1,∥y∥≤1 xT My be the operator norm of a matrix, and ∥M∥F = qP i,j M 2 ij be the Frobenius norm. We say an event happens with high probability (w.h.p) if the probability is lower bounded by 1 −f(n) such that f(n) = o(1) as n scales to ∞. 2 Main result In this section, we describe the main result: sufficient conditions under which mixed MNL models can be learnt using tractable algorithms. We provide a useful illustration of the result as well as discuss its implications. 3 Definitions. Let S denote the collection of observations, each of which is denoted as N dimensional, {−1, 0, +1} valued vector. Recall that each observation is obtained by first selecting one of the r mixture MNL component, and then viewing outcomes, as per the chosen MNL mixture component, of ℓrandomly chosen pair-wise comparisons from the N pre-determined comparisons {(ik, jk) : 1 ≤ik ̸= jk ≤n, 1 ≤k ≤N}. Let xt ∈{−1, 0, +1}N denote the tth observation with xt,k = 0 if the kth pair (ik, jk) is not chosen amongst the ℓrandomly chosen pairs, and xt,k = +1 (respectively −1) if ik < jk (respectively ik > jk) as per the chosen MNL mixture component. By definition, it is easy to see that for any t ∈S and 1 ≤k ≤N, E[xt,k] = ℓ N h r X a=1 qaPka i , where Pka = w(a) jk −w(a) ik w(a) jk + w(a) ik . (1) We shall denote Pa = [Pka] ∈[−1, 1]N for 1 ≤a ≤r. Therefore, in a vector form E[xt] = ℓ N Pq, where P = [P1 . . . Pr] ∈[−1, 1]N×r . (2) That is, P is a matrix with r columns, each representing one of the r mixture components and q is the mixture probability. By independence, for any t ∈S, and any two different pairs 1 ≤k ̸= m ≤N, E[xt,kxt,m] = ℓ2 N 2 h r X a=1 qaPkaPma i . (3) Therefore, the N ×N matrix E[xtxT t ] or equivalently tensor E[xt ⊗xt] is proportional to M2 except in diagonal entries, where M2 = PQP T ≡ r X a=1 qa(Pa ⊗Pa) , (4) Q = diag(q) being diagonal matrix with its entries being mixture probabilities, q. In a similar manner, the tensor E[xt ⊗xt ⊗xt] is proportional to M3 (except in O(N 2) entries), where M3 = r X a=1 qa(Pa ⊗Pa ⊗Pa). (5) Indeed, empirical estimates ˆ M2 and ˆ M3, defined as ˆ M2 = 1 |S| h X t∈S xt ⊗xt i , and ˆ M3 = 1 |S| h X t∈S xt ⊗xt ⊗xt i , (6) provide good proxy for M2 and M3 for large enough number of samples; and shall be utilized crucially for learning model parameters from observations. Sufficient conditions for learning. With the above discussion, we state sufficient conditions for learning the mixed MNL in terms of properties of M2: C1. M2 has rank r; let σ1(M2), σr(M2) > 0 be the largest and smallest singular values of M2. C2. For a large enough universal constant C′ > 0, N ≥C′r3.5 µ6(M2) σ1(M2) σr(M2) 4.5 . (7) In the above, µ(M2) represents incoherence of a symmetric matrix M2. We recall that for a symmetric matrix M ∈RN×N of rank r with singular value decomposition M = USU T , the incoherence is defined as µ(M) = r N r  max i∈[N] ∥Ui∥  . (8) C3. The undirected graph G = ([n], E) with E = {(ik, jk) : 1 ≤k ≤N} is connected. Let A ∈{0, 1}n×n be adjacency matrix with Aij = 1 if (i, j) ∈E and 0 otherwise; let D = diag(di) with di being degree of vertex i ∈[n] and let LG = D−1A be normalized Laplacian of G. Let dmax = maxi di and dmin = mini di. Let the n eigenvalues of stochastic matrix LG be 1 = λ1(LG) ≥. . . λn(LG) ≥−1. Define spectral gap of G: ξ(G) = 1 −max{λ2(L), −λn(L)}. (9) 4 Note that we choose a graph G = ([n], E) to collect pairwise data on, and we want to use a graph that is connected, has a large spectral gap, and has a small number of edges. In condition (C3), we need connectivity since we cannot estimate the relative strength between disconnected components (e.g. see [13]). Further, it is easy to generate a graph with spectral gap ξ(G) bounded below by a universal constant (e.g. 1/100) and the number of edges N = O(n log n), for example using the configuration model for Erd¨os-Renyi graphs. In condition (C2), we require the matrix M2 to be sufficiently incoherent with bounded σ1(M2)/σr(M2). For example, if qmax/qmin = O(1) and the profile of each type in the mixture distribution is sufficiently different, i.e. ⟨Pa, Pb⟩/(∥Pa∥∥Pb∥) < 1/(2r), then we have µ(M2) = O(1) and σ1(M2)/σr(M2) = O(1). We define b = maxr a=1 maxi,j∈[n] w(a) i /w(a) j , qmax = maxa qa, and qmin = mina qa. The following theorem provides a bound on the error and we refer to the appendix for a proof. Theorem 1. Consider a mixed MNL model satisfying conditions (C1)-(C3). Then for any δ ∈(0, 1), there exists positive numerical constants C, C′ such that for any positive ε satisfying 0 < ε <  qminξ2(G)d2 min 16qmax r σ1(M2)b5d2max 0.5 , (10) Algorithm 1 produces estimates ˆq = [ˆqa] and ˆw = [ ˆw(a)] so that with probability at least 1 −δ, ˆqa −qa ≤ε, and ∥ˆw(a) −w(a)∥ ∥w(a)∥ ≤C r qmax σ1(M2)b5d2 max qminξ2(G)d2 min 0.5 ε, (11) for all a ∈[r], as long as |S| ≥C′ rN 4 log(N/δ) qminσ1(M2)2ε2  1 ℓ2 + σ1(M2) ℓN + r4σ1(M2)4 σr(M2)5  . (12) An illustration of Theorem 1. To understand the applicability of Theorem 1, consider a concrete example with r = 2; let the corresponding weights w(1) and w(2) be generated by choosing each weight uniformly from [1, 2]. In particular, the rank order for each component is a uniformly random permutation. Let the mixture distribution be uniform as well, i.e. q = [0.5 0.5]. Finally, let the graph G = ([n], E) be chosen as per the Erd¨os-R´enyi model with each edge chosen to be part of the graph with probability ¯d/n, where ¯d > log n. For this example, it can be checked that Theorem 1 guarantees that for ε ≤C/ √ n ¯d, |S| ≥C′n2 ¯d2 log(n ¯d/δ)/(ℓε2), and n ¯d ≥C′, we have for all a ∈ {1, 2}, |ˆqa −qa| ≤ε and ∥ˆw(a) −w(a)∥/∥w(a)∥≤C′′√ n ¯d ε. That is, for ℓ= Θ(1) and choosing ε = ε′/( √ n ¯d), we need sample size of |S| = O(n3 ¯d3 log n) to guarantee error in both ˆq and ˆw smaller than ε′. Instead, if we choose ℓ= Θ(n ¯d), we only need |S| = O((n ¯d)2 log n). Limited samples per observation leads to penalty of factor of (n ¯d/ℓ) in sample complexity. To provide bounds on the problem parameters for this example, we use standard concentration arguments. It is well known for Erd¨os-R´enyi random graphs (see [6]) that, with high probability, the number of edges concentrates in [(1/2) ¯d n, (3/2) ¯d n] implying N = Θ( ¯dn), and the degrees also concentrate in [(1/2) ¯d, (3/2) ¯d], implying dmax = dmin = Θ( ¯d). Also using standard concentration arguments for spectrum of random matrices, it follows that the spectral gap of G is bounded by ξ ≥1 − (C/ √¯d) = Θ(1) w.h.p. Since we assume the weights to be in [1, 2], the dynamic range is bounded by b ≤2. The following Proposition shows that σ1(M2) = Θ(N) = Θ( ¯dn), σ2(M2) = Θ( ¯dn), and µ(M2) = Θ(1). Proposition 2.1. For the above example, when ¯d ≥log n, σ1(M2) ≤0.02N, σ2(M2) ≥0.017N, and µ(M2) ≤15 with high probability. Supposen now for general r, we are interested in well-behaved scenario where qmax = Θ(1/r) and qmin = Θ(1/r). To achieve arbitrary small error rate for ∥ˆw(a) −w(a)∥/∥w(a)∥, we need ϵ = O(1/ √ r N), which is achieved by sample size |S| = O(r3.5n3(log n)4) with ¯d = log n. 3 Algorithm We describe the algorithm achieving the bound in Theorem 1. Our approach is two-phased. First, learn the moments for mixtures using a tensor decomposition, cf. Algorithm 2: for each type a ∈[r], 5 produce estimate ˆqa ∈R of the mixture weight qa and estimate ˆPa = [ ˆP1a . . . ˆPNa]T ∈RN of the expected outcome Pa = [P1a . . . PNa]T defined as in (1). Secondly, for each a, using the estimate ˆPa, apply RANKCENTRALITY, cf. Section 3.2, to estimate ˆw(a) for the MNL weights w(a). Algorithm 1 1: Input: Samples {xt}t∈S, number of types r, number of iterations T1, T2, graph G([n], E) 2: {(ˆqa, ˆPa)}a∈[r] ←SPECTRALDIST ({xt}t∈S, r, T1) (see Algorithm 2) 3: for a = 1, . . . , r do 4: set ˜Pa ←P[−1,1]( ˆPa) where P[−1,1](·) is the projection onto [−1, 1]N 5: ˆw(a) ←RANKCENTRALITY  G, ˜Pa, T2  (see Section 3.2) 6: end for 7: Output: {(ˆq(a), ˆw(a))}a∈[r] To achieve Theorem 1, T1 = Θ log(N |S|)  and T2 = Θ b2dmax(log n + log(1/ε))/(ξdmin)  is sufficient. Next, we describe the two phases of algorithms and associated technical results. 3.1 Phase 1: Spectral decomposition. To estimate P and q from the samples, we shall use tensor decomposition of ˆ M2 and ˆ M3, the empirical estimation of M2 and M3 respectively, recall (4)-(6). Let M2 = UM2ΣM2U T M2 be the eigenvalue decomposition and let H = M3[UM2Σ−1/2 M2 , UM2Σ−1/2 M2 , UM2Σ−1/2 M2 ] . The next theorem shows that M2 and M3 are sufficient to learn P and q exactly, when M2 has rank r (throughout, we assume that r ≪n ≤N). Theorem 2 (Theorem 3.1 [12]). Let M2 ∈RN×N have rank r. Then there exists an orthogonal matrix V H = [vH 1 vH 2 . . . vH r ] ∈Rr×r and eigenvalues λH a , 1 ≤a ≤r, such that the orthogonal tensor decomposition of H is H = r X a=1 λH a (vH a ⊗vH a ⊗vH a ). Let ΛH = diag(λH 1 , . . . , λH r ). Then the parameters of the mixture distribution are P = UM2Σ1/2 M2 V HΛH and Q = (ΛH)−2 . The main challenge in estimating M2 (resp. M3) from empirical data are the diagonal entires. In [12], alternating minimization approach is used for matrix completion to find the missing diagonal entries of M2, and used a least squares method for estimating the tensor H directly from the samples. Let Ω2 denote the set of off-diagonal indices for an N × N matrix and Ω3 denote the off-diagonal entries of an N × N × N tensor such that the corresponding projections are defined as PΩ2(M)ij ≡  Mij if i ̸= j , 0 otherwise . and PΩ3(T)ijk ≡  Tijk if i ̸= j, j ̸= k, k ̸= i , 0 otherwise . for M ∈RN×N and T ∈RN×N×N. In lieu of above discussion, we shall use PΩ2 ˆ M2  and PΩ3 ˆ M3  to obtain estimation of diagonal entries of M2 and M3 respectively. To keep technical arguments simple, we shall use first |S|/2 samples based ˆ M2, denoted as ˆ M2 1, |S| 2  and second |S|/2 samples based ˆ M3, denoted by ˆ M3 |S| 2 + 1, |S|  in Algorithm 2. Next, we state correctness of Algorithm 2 when µ(M2) is small; proof is in Appendix. Theorem 3. There exists universal, strictly positive constants C, C′ > 0 such that for all ε ∈(0, C) and δ ∈(0, 1), if |S| ≥ C′ rN 4 log(N/δ) qminσ1(M2)2ε2  1 ℓ2 + σ1(M2) ℓN + r4σ1(M2)4 σr(M2)5  , and N ≥ C′r3.5µ6 σ1(M2) σr(M2) 4.5 , 6 Algorithm 2 SPECTRALDIST: Moment method for Mixture of Discrete Distribution [12] 1: Input: Samples {xt}t∈S, number of types r, number of iterations T 2: ˜ M2 ←MATRIXALTMIN  ˆ M2 1, |S| 2  , r, T  (see Algorithm 3) 3: Compute eigenvalue decomposition of ˜ M2 = ˜UM2 ˜ΣM2 ˜U T M2 4: ˜H ←TENSORLS  ˆ M3 |S| 2 + 1, |S|  , ˜UM2, ˜ΣM2  (see Algorithm 4) 5: Compute rank-r decomposition P a∈[r] ˆλ ˜ H a (ˆv ˜ H a ⊗ˆv ˜ H a ⊗ˆv ˜ H a ) of ˜H, using RTPM of [2] 6: Output: ˆP = ˜UM2 ˜Σ1/2 M2 ˆV ˜ H ˆΛ ˜ H, ˆQ = (ˆΛ ˜ H)−2, where ˆV ˜ H = [ˆv ˜ H 1 . . . ˆv ˜ H r ] and ˆΛ ˜ H = diag(λ ˜ H 1 , . . . , λ ˜ H r ) then there exists a permutation π over [r] such that Algorithm 2 achieves the following bounds with a choice of T = C′ log(N |S|) for all i ∈[r], with probability at least 1 −δ: |ˆqπi −qi| ≤ε , and ∥ˆPπi −Pi∥≤ε s r qmax σ1(M2) qmin , where µ = µ(M2) defined in (8) with run-time poly(N, r, 1/qmin, 1/ε, log(1/δ), σ1(M2)/σr(M2)). Algorithm 3 MATRIXALTMIN: Alternating Minimization for Matrix Completion [12] 1: Input: ˆ M2 1, |S| 2  , r, T 2: Initialize N × r dimensional matrix U0 ←top-r eigenvectors of PΩ2( ˆ M2 1, |S| 2  ) 3: for all τ = 1 to T −1 do 4: ˆUτ+1 = arg minU ∥PΩ2( ˆ M2 1, |S| 2  ) −PΩ2(UU T τ )∥2 F 5: [Uτ+1Rτ+1] = QR( ˆUτ+1) (standard QR decomposition) 6: end for 7: Output: ˜ M2 = ( ˆUT )(UT −1)T Algorithm 4 TENSORLS: Least Squares method for Tensor Estimation [12] 1: Input: ˆ M3 |S| 2 + 1, |S|  , ˆUM2, ˆΣM2 2: Define operator ˆν : Rr×r×r →RN×N×N as follows ˆνijk(Z) = (P abc Zabc( ˆUM2 ˆΣ1/2 M2 )ia( ˆUM2 ˆΣ1/2 M2 )jb( ˆUM2 ˆΣ1/2 M2 )kc, if i ̸= j ̸= k ̸= i , 0, otherwise. (13) 3: Define ˆA : Rr×r×r →Rr×r×r s.t. ˆA(Z) = ˆν(Z)[ ˆUM2 ˆΣ−1/2 M2 , ˆUM2 ˆΣ−1/2 M2 , ˆUM2 ˆΣ−1/2 M2 ] 4: Output: arg minZ ∥ˆA(Z) −PΩ3 ˆ M3 |S| 2 + 1, |S|  [ ˆUM2 ˆΣ−1/2 M2 , ˆUM2 ˆΣ−1/2 M2 , ˆUM2 ˆΣ−1/2 M2 ]∥2 F 3.2 Phase 2: RANKCENTRALITY. Recall that E = {(ik, jk) : ik ̸= jk ∈[n], 1 ≤k ≤N} represents collection of N = |E| pairs and G = ([n], E) is the corresponding graph. Let ˜Pa denote the estimation of Pa = [Pka] ∈[−1, 1]N for the mixture component a, 1 ≤a ≤r; where Pka is defined as per (1). For each a, using G and ˜Pa, we shall use the RANKCENTRALITY [19] to obtain estimation of w(a). Next we describe the algorithm and guarantees associated with it. Without loss of generality, we can assume that w(a) is such that P i w(a) i = 1 for all a, 1 ≤a ≤ r. Given this normalization, RANKCENTRALITY estimates w(a) as stationary distribution of an appropriate Markov chain on G. The transition probabilities are 0 for all (i, j) /∈E. For (i, j) ∈E, they are function of ˜Pa. Specifically, transition matrix ˜p(a) = [˜p(a) i,j ] ∈[0, 1]n×n with ˜p(a) i,j = 0 if 7 (i, j) /∈E, and for (ik, jk) ∈E for 1 ≤k ≤N, ˜p(a) ik,jk = 1 dmax (1 + ˜Pka) 2 and ˜p(a) jk,ik = 1 dmax (1 −˜Pka) 2 , (14) Finally, ˜p(a) i,i = 1 −P j̸=i ˜p(a) i,j for all i ∈[n]. Let ˜π(a) = [˜π(a) i ] be a stationary distribution of the Markov chain defined by ˜p(a). That is, ˜π(a) i = X j ˜p(a) ji ˜π(a) j for all i ∈[n]. (15) Computationally, we suggest obtaining estimation of ˜π by using power-iteration for T iterations. As argued before, cf. [19], T = Θ b2dmax(log n + log(1/ε))/(ξdmin)  , is sufficient to obtain reasonably good estimation of ˜π. The underlying assumption here is that there is a unique stationary distribution, which is established by our result under the conditions of Theorem 1. Now ˜p is an approximation of the ideal transition probabilities, where p(a) = [p(a) i,j ] where p(a) i,j = 0 if (i, j) /∈E and p(a) i,j ∝w(a) j /(w(a) i + w(a) j ) for all (i, j) ∈E. Such an ideal Markov chain is reversible and as long as G is connected (which is, in our case, by choice), the stationary distribution of this ideal chain is π(a) = w(a) (recall, we have assumed w(a) to be normalized so that all its components up to 1). Now ˜p(a) is an approximation of such an ideal transition matrix p(a). In what follows, we state result about how this approximation error translates into the error between ˜π(a) and w(a). Recall that b ≡maxi,j∈[n] wi/wj, dmax and dmin are maximum and minimum vertex degrees of G and ξ as defined in (9). Theorem 4. Let G = ([n], E) be non-bipartite and connected. Let ∥˜p(a) −p(a)∥2 ≤ε for some positive ε ≤(1/4)ξb−5/2(dmin/dmax). Then, for some positive universal constant C, ∥˜π(a) −w(a)∥ ∥w(a)∥ ≤C b5/2 ξ dmax dmin ε. (16) And, starting from any initial condition, the power iteration manages to produce an estimate of ˜π(a) within twice the above stated error bound in T = Θ b2dmax(log n+log(1/ε))/(ξdmin)  iterations. Proof of the above result can be found in Appendix. For spectral expander (e.g. connected ErdosRenyi graph with high probability), ξ = Θ(1) and therefore the bound is effectively O(ε) for bounded dynamic range, i.e. b = O(1). 4 Discussion Learning distribution over permutations of n objects from partial observation is fundamental to many domains. In this work, we have advanced understanding of this question by characterizing sufficient conditions and associated algorithm under which it is feasible to learn mixed MNL model in computationally and statistically efficient (polynomial in problem size) manner from partial/pairwise comparisons. The conditions are natural – the mixture components should be “identifiable” given partial preference/comparison data – stated in terms of full rank and incoherence conditions of the second moment matrix. The algorithm allows learning of mixture components as long as number of mixture components scale o(n2/7) for distribution over permutations of n objects. To the best of our knowledge, this work provides first such sufficient condition for learning mixed MNL model – a problem that has remained open in econometrics and statistics for a while, and more recently Machine learning. Our work nicely complements the impossibility results of [1]. Analytically, our work advances the recently popularized spectral/tensor approach for learning mixture model from lower order moments. Concretely, we provide means to learn the component even when only partial information about the sample is available unlike the prior works. To learn the model parameters, once we identify the moments associated with each mixture, we advance the result of [19] in its applicability. Spectral methods have also been applied to ranking in the context of assortment optimization in [5]. 8 References [1] A. Ammar, S. Oh, D. Shah, and L. Voloch. What’s your choice? learning the mixed multi-nomial logit model. In Proceedings of the ACM SIGMETRICS/international conference on Measurement and modeling of computer systems, 2014. [2] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. CoRR, abs/1210.7559, 2012. [3] H. Azari Soufiani, W. Chen, D. C Parkes, and L. Xia. Generalized method-of-moments for rank aggregation. In Advances in Neural Information Processing Systems 26, pages 2706–2714. 2013. [4] H. Azari Soufiani, D. Parkes, and L. Xia. Computing parametric ranking models via rank-breaking. In Proceedings of The 31st International Conference on Machine Learning, pages 360–368, 2014. [5] J. Blanchet, G. Gallego, and V. Goyal. A markov chain approximation to choice modeling. In EC, pages 103–104, 2013. [6] B. Bollob´as. Random Graphs. Cambridge University Press, January 2001. [7] R. A. Bradley and M. E. Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324–345, 1955. [8] E. J. Cand`es and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009. [9] C. Davis and W. M. Kahan. The rotation of eigenvectors by a perturbation. iii. SIAM Journal on Numerical Analysis, 7(1):1–46, 1970. [10] J. C. Duchi, L. Mackey, and M. I. Jordan. On the consistency of ranking algorithms. In Proceedings of the ICML Conference, Haifa, Israel, June 2010. [11] V. F. Farias, S. Jagabathula, and D. Shah. A data-driven approach to modeling choice. In NIPS, pages 504–512, 2009. [12] P. Jain and S. Oh. Learning mixtures of discrete product distributions using spectral decompositions. arXiv preprint arXiv:1311.2972, 2014. [13] L. R. Ford Jr. Solution of a ranking problem from binary comparisons. The American Mathematical Monthly, 64(8):28–33, 1957. [14] R. H. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. Information Theory, IEEE Transactions on, 56(6):2980–2998, 2010. [15] R. H. Keshavan, A. Montanari, and S. Oh. Matrix completion from noisy entries. The Journal of Machine Learning Research, 99:2057–2078, 2010. [16] D. R. Luce. Individual Choice Behavior. Wiley, New York, 1959. [17] D. McFadden. Conditional logit analysis of qualitative choice behavior. Frontiers in Econometrics, pages 105–142, 1973. [18] I. Mitliagkas, A. Gopalan, C. Caramanis, and S. Vishwanath. User rankings from comparisons: Learning permutations in high dimensions. In Communication, Control, and Computing (Allerton), 2011 49th Annual Allerton Conference on, pages 1143–1150. IEEE, 2011. [19] S. Negahban, S. Oh, and D. Shah. Iterative ranking from pair-wise comparisons. In NIPS, pages 2483– 2491, 2012. [20] S. Negahban and M. J. Wainwright. Restricted strong convexity and (weighted) matrix completion: Optimal bounds with noise. Journal of Machine Learning Research, 2012. [21] P. Samuelson. A note on the pure theory of consumers’ behaviour. Economica, 5(17):61–71, 1938. [22] H. A. Soufiani, D. C. Parkes, and L. Xia. Random utility theory for social choice. In NIPS, pages 126–134, 2012. [23] Louis L Thurstone. A law of comparative judgment. Psychological review, 34(4):273, 1927. [24] J. Tropp. User-friendly tail bounds for sums of random matrices. Foundations of Computational Mathematics, 2011. [25] E. Zermelo. Die berechnung der turnier-ergebnisse als ein maximumproblem der wahrscheinlichkeitsrechnung. Mathematische Zeitschrift, 29(1):436–460, 1929. 9
2014
227
5,322
Elementary Estimators for Graphical Models Eunho Yang IBM T.J. Watson Research Center eunhyang@us.ibm.com Aur´elie C. Lozano IBM T.J. Watson Research Center aclozano@us.ibm.com Pradeep Ravikumar University of Texas at Austin pradeepr@cs.utexas.edu Abstract We propose a class of closed-form estimators for sparsity-structured graphical models, expressed as exponential family distributions, under high-dimensional settings. Our approach builds on observing the precise manner in which the classical graphical model MLE “breaks down” under high-dimensional settings. Our estimator uses a carefully constructed, well-defined and closed-form backward map, and then performs thresholding operations to ensure the desired sparsity structure. We provide a rigorous statistical analysis that shows that surprisingly our simple class of estimators recovers the same asymptotic convergence rates as those of the `1-regularized MLEs that are much more difficult to compute. We corroborate this statistical performance, as well as significant computational advantages via simulations of both discrete and Gaussian graphical models. 1 Introduction Undirected graphical models, also known as Markov random fields (MRFs), are a powerful class of statistical models, that represent distributions over a large number of variables using graphs, and where the structure of the graph encodes Markov conditional independence assumptions among the variables. MRFs are widely used in a variety of domains, including natural language processing [1], image processing [2, 3, 4], statistical physics [5], and spatial statistics [6]. Popular instances of this class of models include Gaussian graphical models (GMRFs) [7, 8, 9, 10], used for modeling continuous real-valued data, and discrete graphical models including the Ising model where each variable takes values in a discrete set [10, 11, 12]. In this paper, we consider the problem of highdimensional estimation, where the number of variables p may exceed the number of observations n. In such high-dimensional settings, it is still possible to perform consistent estimation by leveraging low-dimensional structure. Sparse and group-sparse structural constraints, where few parameters (or parameter groups) are non-zero, are particularly pertinent in the context of MRFs as they translate into graphs with few edges. A key class of estimators for learning graphical models has thus been based on maximum likelihood estimators (MLE) with sparsity-encouraging regularization. For the task of sparse GMRF estimation, the state-of-the-art estimator minimizes the Gaussian negative log-likelihood regularized by the `1 norm of the entries (or the off-diagonal entries) of the concentration matrix (see [8, 9, 10]). Strong statistical guarantees for this estimator have been established (see [13] and references therein). The resulting optimization problem is a log-determinant program, which can be solved in polynomial time with interior point methods [14], or by co-ordinate descent algorithms [9, 10]. In a computationally simpler approach for sparse GMRFs, [7] proposed the use of neighborhood selection, which consists of estimating conditional independence relationships separately for each node in the graph, via `1-regularized linear regression, or LASSO [15]. They showed that the procedure can 1 consistently recover the sparse GMRF structure even under high-dimensional settings. The neighborhood selection approach has also been successfully applied to discrete Markov random fields. In particular, for binary graphical models, [11] showed that consistent neighborhood selection can be performed via `1-regularized logistic regression. These results were generalized to general discrete graphical models (where each variable can take m ≥2 values) by [12] through node-wise multi-class logistic regression with group sparsity. A related regularized convex program to solve for sparse GMRFs is the CLIME estimator [16], which reduces the estimation problem to solving linear programs. Overall, while state of the art optimization methods have been developed to solve all of these regularized (and consequently non-smooth) convex programs, their iterative approach is very expensive for large scale problems. Indeed, scaling such regularized convex programs to very large scale settings has attracted considerable recent research and attention. In this paper, we investigate the following leading question: “Can one devise simple estimators with closed-form solutions that are yet consistent and achieve the sharp convergence rates of the aforementioned regularized convex programs?” This question was originally considered in the context of linear regression by [17] and to which they had given a positive answer. It is thus natural to wonder whether an affirmative response can be provided for the more complicated statistical modeling setting of MRFs as well. Our key idea is to revisit the vanilla MLE for estimating a graphical model, and consider where it “breaks down” in the case of high-dimensions. The vanilla graphical model MLE can be expressed as a backward mapping [18] in an exponential family distribution that computes the model parameters corresponding to some given (sample) moments. There are however two caveats with this backward mapping: it is not available in closed form for many classes of models, and even if it were available in closed form, it need not be well-defined in high-dimensional settings (i.e. could lead to unbounded model parameter estimates). Accordingly, we consider the use of carefully constructed proxy backward maps that are both available in closed-form, and well-defined in high-dimensional settings. We then perform simple thresholding operations on these proxy backward maps to obtain our final estimators. Our class of algorithms is thus both computationally practical and highly scalable. We provide a unified statistical analysis of our class of algorithms for graphical models arising from general exponential families. We then instantiate our analysis for the specific cases of GMRFs and DMRFs, and show that the resulting algorithms come with strong statistical guarantees achieving near-optimal convergence rates, but doing so computationally much faster than the regularized convex programs. These surprising results are confirmed via simulation for both GMRFs and DMRFs. There has been considerable recent interest in large-scale statistical model estimation, and in particular, in scaling these to very large-scale settings. We believe our much simpler class of closedform graphical model estimators have the potential to be estimators of choice in such large-scale settings, particularly if it attracts research on optimizing and scaling its closed-form operations. 2 Background and Problem Setup Since most popular graphical model families can be expressed as exponential families (see [18]), we consider general exponential family distributions for a random variable X 2 Rp: P(X; ✓) = exp n h✓, φ(X)i −A(✓) o (1) where ✓2 ⌦✓Rd is the canonical parameter to be estimated, φ(X) denotes the sufficient statistics with feature function φ : Rp 7! Rd, and A(✓) is the log-partition function. An alternative parameterization of the exponential family, to the canonical parameterization above, is via the vector of “mean parameters” µ(✓) def = E✓[φ(X)], which are the moments of the sufficient statistics φ(X) under the exponential family distribution. We denote the set of all possible moments by the moment polytope: M = {µ : 9 distribution p s.t. Ep(φ) = µ}, which consist of moments of the sufficient statistics under all possible distributions. The problem of computing the mean parameters µ(✓) 2 M given the canonical parameters ✓2 ⌦constitutes the key machine learning problem of inference in graphical models (expressed in exponential family form (1)). Let us denote this computation via a so-called forward mapping A : ⌦7! M. By properties of exponential family distributions, the forward mapping A can actually be expressed in terms of the first derivative of the log-partition function A(·): A : ✓7! µ = rA(✓). It can be shown that this map is injective (one-to-one with its range) if the exponential family is minimal. Moreover, it is onto the interior of 2 M, denoted by Mo. Thus, for any mean parameter µ 2 Mo, there exists a canonical parameter ✓(µ) 2 ⌦such that E✓(µ)[φ(X)] = µ. Unless the exponential family is minimal, the corresponding canonical parameter ✓(µ) however need not be unique. Thus while there will always exist a so-called backward mapping A⇤: Mo 7! ⌦, that computes the canonical parameters corresponding to given moments, it need not be unique. A candidate backward map can be constructed via the conjugate of the log-partition function A⇤(µ) = sup✓2⇥h✓, µi −A(✓): A⇤: µ 7! ✓= rA⇤(µ). 2.1 High-dimensional Graphical Model Selection We focus on the high-dimensional setting, where the number of variables p may greatly exceed the sample size n. Under such high-dimensional settings, it is now well understood that consistent estimation is possible if structural constraints are imposed on the model parameters ✓. In this paper, we focus on the structural constraint of sparsity, for which the `1 norm is known to be well-suited. Given n samples {X(i)}n i=1 from P(X; ✓⇤) that belongs to an exponential family (1), a popular class of M-estimators for recovering the sparse model parameter ✓⇤is the `1-regularized maximum likelihood estimators: minimize ✓ h ✓, bφ i −A(✓) + λnk✓k1 (2) where bφ := 1 n Pn i=1 φ(X(i)) is the empirical mean of the sufficient statistics. Since the log partition function A(✓) in (1) is convex, the problem (2) is convex as well. We now briefly review the two most popular examples of exponential families in the context of graphical models. Gaussian Graphical Models. Consider a random vector X = (X1, . . . , Xp) with associated pvariate Gaussian distribution N(X|µ, ⌃), mean vector µ and covariance matrix ⌃. The probability density function of X can be formulated as an instance of (1): P(X|✓, ⇥) = exp ⇣ −1 2hh⇥, XX>ii + h✓, Xi −A(⇥, ✓) ⌘ (3) where hhA, Bii denotes the trace inner product tr(A BT ). Here, the canonical parameters are the precision matrix ⇥and a vector ✓, with domain ⌦:= {(✓, ⇥) 2 Rp⇥Rp⇥p : ⇥≻0, ⇥= ⇥T }. The corresponding moment parameters of the graphical model distribution are given by the mean µ = E✓[X], and the covariance matrix ⌃= E✓[XXT ] of the Gaussian. The forward map A : (✓, ⇥) 7! (µ, ⌃) computing these from the canonical parameters can be written as: ⌃= ⇥−1 and µ = ⇥−1✓. The moment polytope can be seen to be given by M = {(µ, ⌃) 2 Rp ⇥Rp⇥p : ⌃−µµT ⌫0, ⌃⌫ 0}, with interior Mo = {(µ, ⌃) 2 Rp⇥Rp⇥p : ⌃−µµT ≻0, ⌃≻0}. The corresponding backward map A⇤: (µ, ⌃) 7! (✓, ⇥) for (µ, ⌃) 2 Mo can be computed as: ⇥= ⌃−1 and ✓= ⌃−1µ. Without loss of generality, assume that µ = 0 (and hence ✓= 0). Then the set of non-zero entries in the precision matrix ⇥corresponds to the set of edges in an associated Gaussian Markov random field (GMRF). In cases where the graph underlying the GMRF has relatively few edges, it thus makes sense to impose `1 regularization on the off-diagonal entries of ⇥. Given n i.i.d. random vectors X(i) 2 Rp sampled from N(0, ⌃⇤), the corresponding `1-regularized maximum likelihood estimator (MLE) is given by: minimize ⇥≻0 hh⇥, Sii −log det ⇥+ λnk⇥k1,off , (4) where S is the sample covariance matrix defined as Pn i=1 ' X(i) −X (' X(i) −X (>, X := 1 n Pn i=1 X(i), and k · k1,off is the off-diagonal element-wise `1 norm. Discrete Graphical Models. Let X = (X1, . . . , Xp) be a random vector where each variable Xi takes values in a discrete set X of cardinality m. Given a graph G = (V, E), a pairwise Markov random field over X is specified via nodewise functions ✓s : X 7! R for all s 2 V , and pairwise functions ✓st : X ⇥X 7! R for all (s, t) 2 E, as P(X) = exp n P s2V ✓s(Xs) + P (s,t)2E ✓st(Xs, Xt) −A(✓) o . (5) This family of probability distributions can be represented using the so-called overcomplete representations [18] as follows. For each random variable Xs and j 2 {1, . . . , m}, define nodewise 3 indicators I[Xs = j] equal to 1 if Xs = j and 0 otherwise. Then pairwise MRFs in (5) can be rewritten as P(X) = exp ⇢ X s2V ;j2[m] ✓s;j I[Xs = j] + X (s,t)2E;j,k2[m] ✓st;jk I[Xs = j, Xt = k] −A(✓) + (6) for a set of parameters ✓:= {✓s;j, ✓st;jk : s, t 2 V ; (s, t) 2 E; j, k 2 [m]}. Given these sufficient statistics, the mean/moment parameters are given by the moments µs;j := E✓ ' I[Xs = j] ( = P(Xs = j; ✓), and µst;jk := E✓ ' I[Xs = j, Xt = k] ( = P(Xs = j, Xt = k; ✓), which precisely correspond to nodewise and pairwise marginals of the discrete graphical model. Thus, the forward mapping A : ✓7! µ would correspond to the inference task of computing nodewise and pairwise marginals of the discrete graphical model given the canonical parameters. A backward mapping A⇤: µ 7! ✓corresponds to computing a set of canonical parameters such that the corresponding graphical model distribution would yield the given set of nodewise and pairwise marginals. The moment polytope in this case consists of the set of all nodewise and pairwise marginals of any distribution over the random vector X, and hence is termed the marginal polytope; it is typically intractable to characterize in high-dimensions [18]. Given n i.i.d. samples from an unknown distribution (6) with parameter ✓⇤, one could consider estimating the graphical model structure with an `1-regularized MLE: b✓2 minimize✓−h✓, bφi + A(✓) + λk✓k1,E, where k · k1,E is the `1 norm of the edge-parameters: k✓k1,E = P s6=t k✓stk, and where we have collated the edgewise parameters {✓st;jk}m j,k=1 for an edge (s, t) 2 E into the vector ✓st. However, there is an critical caveat to actually computing this regularized MLE: the computation of the log-partition function A(✓) is intractable (see [18] for details). To overcome this issue, one might consider instead the following class of M-estimators, discussed in [19]: b✓2 minimize ✓ −h✓, bφi + B(✓) + λk✓k1,E. (7) Here B(✓) is a variational approximation to the log-partition function A(✓) of the form: B(✓) = supµ2Lh✓, µi −B⇤(µ), where L is a tractable bound on the marginal polytope M, and B⇤(µ) is a tractable approximation to the graphical model entropy A⇤(µ). An example of such approximation, which we shall later leverage in this paper, is the tree-reweighted entropy [20] given by B⇤ trw(µ) = P s Hs(µs) −P st ⇢stIst(µst), where Hs(µs) is the entropy for node s, Ist(µst) is the mutual information for an edge (s, t), and ⇢st denote the edge-weights that lie in a so-called spanning tree polytope. If all ⇢st are set to 1, this boils down to the Bethe approximation [21]. 3 Closed-form Estimators for Graphical Models The state-of-the-art `1-regularized MLE estimators discussed in the previous section enjoy strong statistical guarantees but involve solving difficult non-smooth programs. Scaling them to very largescale problems is thus an important and challenging ongoing research area. In this paper we tackle the scalability issue at the source by departing from regularized MLE approaches and proposing instead a family of closed-form estimators for graphical models. Elem-GM Estimation: minimize ✓ k✓k1 (8) s. t. ,,,✓−B⇤(bφ) ,,, 1 λn where B⇤(·) is the proxy of backward mapping A⇤, and λn is a regularization parameter as in (2). One of the most important properties of (8) is that the estimator is available in closed-form: b✓= Sλn ' B⇤(bφ) ( , where [Sλ(u)]i = sign(ui) max(|ui| −λ, 0) is the element-wise soft-thresholding function. This can be shown by the fact that the optimization problem (8) is decomposable into independent element-wise sub-problems, where each sub-problem corresponds to soft-thresholding. To get some intuition on our approach, let us first revisit classical MLE estimators for graphical models as in (1), and see where they “break down” in a high-dimensional setting: minimize✓h ✓, bφ i − A(✓). By the stationary condition of this optimization problem, the MLE estimator can be simply expressed as a backward mapping A⇤(bφ). There are two caveats here in high-dimensional settings. 4 The first is that this backward mapping need not have a simple closed-form, and is typically intractable to compute for a large number of variables p. The second is that the backward mapping is well-defined only for mean parameters that are in the interior Mo of the marginal polytope, whereas the sample moments bφ might well lie on the boundary of the marginal polytope. We will illustrate these two caveats in the next two examples. Our key idea is to use instead a well-defined proxy function B⇤(·) in lieu of the MLE backward map A⇤(·) so that B⇤(bφ) is both well-defined under high-dimensional settings, as well as with a simple closed-form. The optimization problem (8) seeks an estimator with minimum complexity in terms of regularizer k · k1 while being close enough to some “initial estimator” B⇤(bφ) in terms of element-wise `1 norm; ensuring that the final estimator has the desired sparse structure. 3.1 Strong Statistical Guarantees of Closed-form Estimators We now provide a statistical analysis of estimators in (8) under the following structural constraint: (C-Sparsity) The “true” canonical exponential family parameter ✓⇤is exactly sparse with k nonzero elements indexed by the support set S. All other elements in Sc are zeros. Theorem 1. Consider any graphical model in (1) with sparse canonical parameter ✓⇤as stated in (C-Sparsity). Suppose we solve (8) setting the constraint bound λn such that λn ≥ ,,✓⇤−B⇤(bφ) ,, 1. (A) Then the optimal solution b✓satisfies the following error bounds: ,,b✓−✓⇤,, 1 2λn , kb✓−✓⇤k2 4 p kλn , and ,,b✓−✓⇤,, 1 8kλn . (B) The support set of the estimate b✓correctly excludes all true zero coordinates of ✓⇤. Moreover, under the additional assumption that mins2S |✓⇤ s| ≥3 ,,✓⇤−B⇤(bφ) ,, 1, it correctly includes all non-zero coordinates of ✓⇤. Remarks. Theorem 1 is a non-probabilistic result, and holds deterministically for any selection of λn and any selection of B⇤(·). We would then use a probabilistic analysis when we applying the theorem to specific distributional settings and choices of the backward map B⇤(·). We note that while the theorem analyses the case of sparsity structured parameters, our class of estimators as well as analyses can be seamlessly extended to more general structures (such as group sparsity and low rank), by substituting appropriate regularization functions in (8). A key ingredient in our class of closed-form estimators is the proxy backward map B⇤(bφ). The conditions of the theorem require that this backward map has to be carefully constructed in order for the error bounds and sparsistency guarantees to hold. In the following sections, we will see how to precisely construct such backward maps B⇤(·) for specific problem instances, and then derive the corresponding consequences of our abstract theorem as corollaries. 4 Closed-form Estimators for Inverse Covariance Estimation in Gaussian Graphical Models In this section, we derive a class of closed-form estimators for the multivariate Gaussian setting in Section 2.1. From our discussion of Gaussian graphical models in Section 2.1, the backward mapping from moments to the canonical parameters can be simply computed as A⇤(⌃) = ⌃−1, but only provided ⌃2 Mo := {⌃2 Rp⇥p : ⌃≻0}. However, given the sample covariance, we cannot just compute the MLE as A⇤(S) = S−1 since the sample covariance matrix is rank-deficient and hence does not belong the Mo under high-dimensional settings where p > n. In our estimation framework (8), we thus use an alternative backward mapping B⇤(·) via a thresholding operator. Specifically, for any matrix M 2 Rp⇥p, we consider the family of thresholding operators T⌫(M) : Rp⇥p ! Rp⇥p with thresholding parameter ⌫, defined as [T⌫(M)]ij := ⇢⌫(Mij) where ⇢⌫(·) is an element-wise thresholding operator. Soft-thresholding is a natural option, however, along the lines of [22], we can use arbitrary sparse thresholding operators satisfying the conditions: (C-Thresh) For any input a 2 R, (i) |⇢⌫(a)| |a|, (ii) |⇢⌫(a)| = 0 for |a| ⌫, and finally (iii) |⇢⌫(a) −a| ⌫. 5 As long as T⌫(S) is invertible (which we shall examine in section 4.1), we can define B⇤(S) := [T⌫(S)]−1 and obtain the following class of estimators: Elem-GGM Estimation: minimize ⇥ k⇥k1,off (9) s. t. ,,⇥−[T⌫(S)]−1,, 1,off λn where k · k1,off is the off-diagonal element-wise `1 norm as the dual of k · k1,off. Comparison with related work. Note that [16] suggest a Dantzig-like estimator : minimize⇥k⇥k1 s. t. kS⇥−Ik1 λn where both k · k1 and k · k1 are entry-wise (`1 and `1, respectively) norms for a matrix. This estimator applies penalty functions even for the diagonal elements so that the problem can be decoupled into multiple but much simpler optimization problems. It still requires solving p linear programs with 2p linear constraints for each. On the other hand, the estimator from (9) has a closed-form solution as long as T⌫(S) is invertible. 4.1 Convergence Rates for Elem-GGM In this section we derive a corollary of theorem 1 for Elem-GGM. A prerequisite is to show that B⇤(S) := [T⌫(S)]−1 is well-defined and “well-behaved”. The following conditions define a broad class of Gaussian graphical models that satisfy this requirement. (C-MinInf⌃) The true canonical parameter ⇥⇤of (3) has bounded induced operator norm such that |||⇥⇤|||1 := supw6=02Rp k⇥⇤wk1 kwk1 1. (C-Sparse⌃) The true covariance matrix ⌃⇤:= (⇥⇤)−1 is “approximately sparse” along the lines of Bickel and Levina [23]: for some positive constant D, ⌃⇤ ii D for all diagonal entries, and moreover, for some 0 q < 1 and c0(p), maxi Pp j=1 |⌃⇤ ij|q c0(p). If q = 0, then this condition boils down to ⌃⇤being sparse. We additionally require infw6=02Rp k⌃⇤wk1 kwk1 ≥2. Now we are ready to utilize Theorem 1 and derive the convergence rates for our Elem-GGM (9). Corollary 1. Consider Gaussian graphical models (3) where the true parameter ⇥⇤has k non-zero off-diagonal elements, and the conditions in (C-MinInf⌃) and (C-Sparse⌃) hold. Suppose that we solve the optimization problem in (9) with a generalized thresholding operator satisfying (C-Thresh) and setting ⌫:= 16(maxi ⌃ii) q 10⌧log p0 n := a q log p0 n for p0 := max{n, p}. Furthermore, suppose also that we select λn := 41a 2 q log p0 n . Then, as long as n > c3 log p0, any optimal solution b⇥of (9) satisfies !!b⇥−⇥⇤!! 1,off 81a 2 r log p0 n , $$$$$$b⇥−⇥⇤$$$$$$ F 161a 2 r k log p0 n , !!b⇥−⇥⇤!! 1,off 321a 2 k r log p0 n with probability at least 1 −c1 exp(−c2 log p0). We remark that the rates in Corollary 1 are asymptotically the same as those for standard `1 regularized MLE estimators in (4); for instance, [13] show that |||b⇥MLE −⇥⇤|||F = O ⇣q k log p0 n ⌘ . This is remarkable given the simplicity of Elem-GGM. 5 Closed-form Estimators for Discrete Markov Random Fields We now specialize our class of closed-form estimators (8) to the setting of discrete Markov random fields described in Section 2.1. In this case, computing the backward mapping A⇤is non-trivial and typically intractable if the graphical structure has loops [18]. Therefore, we need an approximation of the backward map A⇤, for which we will leverage the tree-reweighted variational approximation discussed in Section 2.1. Consider the following map ¯✓:= B⇤ trw(bφ), where ¯✓s;j = log bφs;j , and ¯✓st;jk = ⇢st log bφst;jk bφs;j bφt;k (10) where bφs;j = 1 n Pn i=1 I[Xs,i = j] and bφst;jk = 1 n Pn i=1 I[Xs,i = j]I[Xt,i = k] are the empirical moments of the sufficient statistics in (6) (we define 0/0 := 1). It was shown in [20] that B⇤ trw(·) 6 satisfies the following property: the (pseudo)marginals computed by performing tree-reweighted variational inference with the parameters ¯✓:= B⇤ trw(bφ) yield the sufficient statistics bφ. In other words, the approximate backward map B⇤ trw computes an element in the pre-image of the approximate forward map given by tree-reweighted variational inference. Since tree-reweighted variational inference approximates the true marginals well in practice, the map B⇤ trw(·) is thus a great candidate for as an approximate backward map. As an alternative to the `1 regularized approximate MLE estimators (7), we thus obtain the following class of estimators using B⇤ trw(·) as an instance of (8): Elem-DMRF Estimation: minimize ✓ k✓k1,E (11) s. t. ,,✓−B⇤ trw(bφ) ,, 1,E λn where k · k1,E is the maximum absolute value of edge-parameters as a dual of k · k1,E. Note that given the empirical means of sufficient statistics, B⇤ trw(bφ) can usually be obtained easily, without the need of explicitly specifying the log-partition function approximation B(·) in (7). 5.1 Convergence Rates for Elem-DRMF We now derive the convergence rates of Elem-DRMF for the case where B⇤(·) is selected as in (10) following the tree reweighed approximation [20]. Let µ⇤be the “true” marginals (or mean parameters) from the true log-partition function and true canonical parameter ✓⇤: µ⇤= A(✓⇤). We shall require that the approximation Btrw(·) be close enough to the true A(·) in terms of backward mapping. In addition we assume that true marginal distributions are strictly positive. (C-LogPartition) ,,✓⇤−B⇤ trw(µ⇤) ,, 1,E ✏. (C-Marginal) For all s 2 V and j 2 [m], the true singleton marginal µ⇤ s;j := E✓⇤' I[Xs = j] ( = P(Xs = j; ✓⇤) satisfies ✏min < µ⇤ s;j for some strictly positive constant ✏min 2 (0, 1). Similarly, for all s, t 2 V and all j, k 2 [m], µ⇤ st;jk satisfies ✏min < µ⇤ st;jk. Now we are ready to utilize Theorem 1 to derive the convergence rates for our closed-form estimator (11) when ✓⇤has k non-zero pairwise parameters ✓⇤ st, where we recall the notatation that ✓st := {✓st;jk}m j,k=1 is a collation of the edgewise parameters for edge (s, t). We also define k✓kq,E := (P s6=t k✓stkq)1/q, for q 2 {1, 2, 1}. Corollary 2. Consider discrete Markov random fields (6) when the true parameter ✓⇤has actually k non-zero pair-wise parameters, and the conditions in (C-LogPartition) and (C-Marginal) also hold in these discrete MRFs. Suppose that we solve the optimization problem in (11) with B⇤ trw(·) set as (10) using tree reweighed approximation. Furthermore, suppose also that we select λn := ✏+ c1 q log p n for some positive constant c1 depending only on ✏min. Then, as long as n > 4c2 1 log p ✏2 min , there are universal positive constants (c2, c3) such that any optimal solution b✓of (11) satisfies kb✓−✓⇤k1,E 2✏+ 2c1 r log p n , kb✓−✓⇤k2,E 4 p k✏+ 4c1 r k log p n , kb✓−✓⇤k1,E 8k✏+ 8c1k r log p n with probability at least 1 −c2 exp(−c3 log p0). 6 Experiments In this section, we report a set of synthetic experiments corroborating our theoretical results on both Gaussian and discrete graphical models. Gaussian Graphical Models We now corroborate Corollary 1, and furthermore, compare our estimator with the `1 regularized MLE in terms of statistical performance with respect to the parameter error kb⇥−⇥⇤kq for q 2 {2, 1}, as well as in terms of computational performance. To generate true inverse covariance matrices ⇥⇤with a random sparsity structure, we follow the procedure described in [25, 24]. We first generate a sparse matrix U whose non-zero entries are set to ±1 with equal probabilities. ⇥⇤is then set to U >U and then a diagonal term is added to ensure 7 Table 1: Performance of our Elem-GM vs. state of the art QUIC algorithm [24] solving (4) under two different regimes: (Left) (n, p) = (800, 1600), (Right) (n, p) = (5000, 10000). K Time(sec) `F (off) `1 (off) FPR TPR Elem-GM 0.01 < 1 6.36 0.1616 0.48 0.99 0.02 < 1 6.19 0.1880 0.24 0.99 0.05 < 1 5.91 0.1655 0.06 0.99 0.1 < 1 6 0.1703 0.01 0.97 QUIC 0.5 2575.5 12.74 0.11 0.52 1.00 1 1009 7.30 0.13 0.35 0.99 2 272.1 6.33 0.18 0.16 0.99 3 78.1 6.97 0.21 0.07 0.94 4 28.7 7.68 0.23 0.02 0.86 K Time(sec) `F (off) `1 (off) FPR TPR Elem-GM 0.05 47.3 11.73 0.1501 0.13 1.00 0.1 46.3 8.91 0.1479 0.03 1.00 0.5 45.8 5.66 0.1308 0.0 1.00 1 46.2 8.63 0.1111 0.0 0.99 QUIC 2 * * * * * 2.5 * * * * * 3 4.8 ⇥104 9.85 0.1083 0.06 1.00 3.5 2.7 ⇥104 10.51 0.1111 0.04 0.99 Table 2: Performance of Elem-DMRF vs. the regularized MLE-based approach of [12] for structure recovery of DRMFs. Graph Type # Parameters Method Time(sec) TPR FNR Chain Graph 128 Elem-DMRF 0.17 0.87 0.01 Regularized MLE 7.30 0.81 0.01 2000 Elem-DMRF 21.67 0.79 0.12 Regularized MLE 4315.10 0.75 0.21 Grid Graph 128 Elem-DMRF 0.17 0.97 0.01 Regularized MLE 7.99 0.84 0.02 2000 Elem-DMRF 21.68 0.80 0.12 Regularized MLE 4454.44 0.77 0.18 ⇥⇤is positive definite. Finally, we normalize ⇥⇤with maxp i=1 ⇥⇤ ii so that the maximum diagonal entry is equal to 1. We control the number of non-zeros in U so that the number of non-zeros in the final ⇥⇤is approximately 10p. We additionally set the number of samples n to half of the number of variables p. Note that though the number of variables is p, the total number of entries in the canonical parameter consisting of the covariance matrix is O(p2). Table 1 summarizes the performance of our closed-form estimators in terms of computation time, kb⇥−⇥⇤k1,off and |||b⇥−⇥⇤|||F,off. We fix the thresholding parameter ⌫= 2.5 p log p/n for all settings, and vary the regularization parameter λn = K p log p/n to investigate how this regularizer affects the final estimators. Baselines are `1 regularized MLE estimators in (4); we use QUIC algorithms [24], which is one of the fastest way to solve (4). In the table, we show the results of the QUIC algorithm run with a tolerance ✏= 10−4; * indicates that the algorithm does not stop within 15 hours. In Appendix, we provide more extensive comparisons including receiver operator curves (ROC) for these methods for settings in Table 1. As can be seen from the table and the figure, the performance of Elem-GM estimators is both statistically competitive in terms of all types of errors and support set recovery, while performing much better computationally than classical methods based on `1 regularized MLE. Discrete Graphical Models We consider two different classes of pairwise graphical models: chain graphs and grids. For each case, the size of the alphabet is set to m = 3; the true parameter vector ✓⇤is generated by sampling each non-zero entry from N(0, 1). We compare Elem-DMRF with the group-sparse regularized MLE-based approach of Jalali et al. [12], which uses group `1/`2 regularization, where all the parameters of an edge form a group, so as to encourage sparsity in terms of the edges, and which we solved using proximal gradient descent. While our estimator in (11) used vanilla sparsity, we used a simple extension to the group-sparse structured setting; please see Appendix E for more details. For both methods, the tuning parameter is set to λn = c p log p/n, where c is selected using cross-validation. We use 20 simulation runs where for each run n = p/2 samples are drawn from the distribution specified by ✓⇤. We report true positive rates, false positive rates and timing for running each method. We note that the timing is for running each method without counting the time spent in the cross-validation process (Had we taken the cross-validation into account, the advantage of our method would be even more pronounced, since the entire path of solutions can be computed via simple group-wise thresholding operations.) The results in Table 2 show that Elem-DMRF is much faster than its MLE-based counterpart, and yield competitive results in terms of structure recovery. Acknowledgments E.Y and P.R. acknowledge the support of ARO via W911NF-12-1-0390 and NSF via IIS-1149803, IIS-1320894, IIS-1447574, and DMS-1264033 8 References [1] C. D. Manning and H. Schutze. Foundations of Statistical Natural Language Processing. MIT Press, 1999. [2] J.W. Woods. Markov image modeling. IEEE Transactions on Automatic Control, 23:846–850, October 1978. [3] M. Hassner and J. Sklansky. Markov random field models of digitized image texture. In ICPR78, pages 538–540, 1978. [4] G. Cross and A. Jain. Markov random field texture models. IEEE Trans. PAMI, 5:25–39, 1983. [5] E. Ising. Beitrag zur theorie der ferromagnetismus. Zeitschrift f¨ur Physik, 31:253–258, 1925. [6] B. D. Ripley. Spatial statistics. Wiley, New York, 1981. [7] N. Meinshausen and P. B¨uhlmann. High-dimensional graphs and variable selection with the Lasso. Annals of Statistics, 34:1436–1462, 2006. [8] M. Yuan and Y. Lin. Model selection and estimation in the Gaussian graphical model. Biometrika, 94(1):19–35, 2007. [9] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical Lasso. Biostatistics, 2007. [10] O. Bannerjee, , L. El Ghaoui, and A. d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate Gaussian or binary data. Jour. Mach. Lear. Res., 9:485– 516, March 2008. [11] P. Ravikumar, M. J. Wainwright, and J. Lafferty. High-dimensional ising model selection using `1-regularized logistic regression. Annals of Statistics, 38(3):1287–1319, 2010. [12] A. Jalali, P. Ravikumar, V. Vasuki, and S. Sanghavi. On learning discrete graphical models using group-sparse regularization. In Inter. Conf. on AI and Statistics (AISTATS), 14, 2011. [13] P. Ravikumar, M. J. Wainwright, G. Raskutti, and B. Yu. High-dimensional covariance estimation by minimizing `1-penalized log-determinant divergence. Electronic Journal of Statistics, 5:935–980, 2011. [14] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge University Press, Cambridge, UK, 2004. [15] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58(1):267–288, 1996. [16] T. Cai, W. Liu, and X. Luo. A constrained `1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association, 106(494):594–607, 2011. [17] E. Yang, A. Lozano, and P. Ravikumar. Elementary estimators for high-dimensional linear regression. In International Conference on Machine learning (ICML), 31, 2014. [18] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families and variational inference. Foundations and Trends in Machine Learning, 1(1–2):1—305, December 2008. [19] E. Yang and P. Ravikumar. On the use of variational inference for learning discrete graphical models. In International Conference on Machine learning (ICML), 28, 2011. [20] M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. Tree-reweighted belief propagation algorithms and approximate ML estimation by pseudomoment matching. In Inter. Conf. on AI and Statistics (AISTATS), 2003. [21] J. S. Yedidia, W. T. Freeman, and Y. Weiss. Generalized belief propagation. In NIPS 13, pages 689–695. MIT Press, 2001. [22] A. J. Rothman, E. Levina, and J. Zhu. Generalized thresholding of large covariance matrices. Journal of the American Statistical Association (Theory and Methods), 104:177–186, 2009. [23] P. J. Bickel and E. Levina. Covariance regularization by thresholding. Annals of Statistics, 36 (6):2577–2604, 2008. [24] C. J. Hsieh, M. Sustik, I. Dhillon, and P. Ravikumar. Sparse inverse covariance matrix estimation using quadratic approximation. In Neur. Info. Proc. Sys. (NIPS), 24, 2011. [25] L. Li and K. C. Toh. An inexact interior point method for l1-regularized sparse covariance selection. Mathematical Programming Computation, 2:291–315, 2010. 9
2014
228
5,323
Efficient Minimax Strategies for Square Loss Games Wouter M. Koolen Queensland University of Technology and UC Berkeley wouter.koolen@qut.edu.au Alan Malek University of California, Berkeley malek@eecs.berkeley.edu Peter L. Bartlett University of California, Berkeley and Queensland University of Technology peter@berkeley.edu Abstract We consider online prediction problems where the loss between the prediction and the outcome is measured by the squared Euclidean distance and its generalization, the squared Mahalanobis distance. We derive the minimax solutions for the case where the prediction and action spaces are the simplex (this setup is sometimes called the Brier game) and the ℓ2 ball (this setup is related to Gaussian density estimation). We show that in both cases the value of each sub-game is a quadratic function of a simple statistic of the state, with coefficients that can be efficiently computed using an explicit recurrence relation. The resulting deterministic minimax strategy and randomized maximin strategy are linear functions of the statistic. 1 Introduction We are interested in general strategies for sequential prediction and decision making (a.k.a. online learning) that improve their performance with experience. Since the early days of online learning, people have formalized such learning tasks as regret games. The learner interacts with an adversarial environment with the goal of performing almost as well as the best strategy from some fixed reference set. In many cases, we have efficient algorithms with an upper bound on the regret that meets the game-theoretic lower bound (up to a small constant factor). In a few special cases, we have the exact minimax strategy, meaning that we understand the learning problem at all levels of detail. In even fewer cases we can also efficiently execute the minimax strategy. These cases serve as exemplars to guide our thinking about learning algorithms. In this paper we add two interesting examples to the canon of efficiently computable minimax strategies. Our setup, as described in Figure 1, is as follows. The Learner and the Adversary play vectors a ∈A and x ∈X, upon which the Learner is penalized using the squared Euclidean distance ∥a −x∥2 or its generalization, the squared Mahalanobis distance, ∥a −x∥2 W = (a −x)⊺W −1(a −x), parametrized by a symmetric matrix W ≻0. After a sequence of T such interactions, we compare the loss of the Learner to the loss of the best fixed prediction a∗∈A. In all our examples, this best fixed action in hindsight is the mean outcome a∗= 1 T PT t=1 xt, regardless of W . We use regret, the difference between the loss of the learner and the loss of a∗, to evaluate performance. The minimax regret for the T-round game, also known as the value of the game, is given by V := inf a1 sup x1 · · · inf aT sup xT T X t=1 1 2∥at −xt∥2 W −inf a T X t=1 1 2∥a −xt∥2 W (1) 1 where the at range over actions A and the xt range over outcomes X. The minimax strategy chooses the at, given all past outcomes x1, . . . , xt−1, to achieve this regret. Intuitively, the minimax regret is the regret if both players play optimally while assuming the other player is doing the same. Our first example is the Brier game, where the action and outcome spaces are the probability simplex with K outcomes. The Brier game is traditionally popular in meteorology [Bri50]. Given: T, W , A, X. For t = 1, 2, . . . , T • Learner chooses prediction at ∈A • Adversary chooses outcome xt ∈X • Learner incurs loss 1 2∥at −xt∥2 W . Figure 1: Protocol Our second example is the ball game, where the action and outcome spaces are the Euclidean norm ball, i.e. A = X = {x ∈RK | ∥x∥2 = 1}. (Even though we measure loss by the squared Mahalanobis distance, we play on the standard Euclidean norm ball.) The ball game is related to Gaussian density estimation [TW00]. In each case we exhibit a strategy that can play a T-round game in O(TK2) time. (The algorithm spends O(TK + K3) time pre-processing the game, and then plays in O(K2) time per round.) 2 Outline We define our loss using the squared Mahalanobis distance, parametrized by a symmetric matrix W ≻0. We recover the squared Euclidean distance by choosing W = I. Our games will always last T rounds. For some observed data x1, . . . , xn, the value-to-go for the remaining T −n rounds is given by V (x1, . . . , xn) := inf an+1 sup xn+1 · · · inf aT sup xT T X t=n+1 1 2∥at −xt∥2 W −inf a T X t=1 1 2∥a −xt∥2 W . By definition, the minimax regret (1) is V = V (ϵ) where ϵ is the empty sequence, and the value-togo satisfies the recurrence V (x1, . . . , xn) = ( −infa PT t=1 1 2∥a −xt∥2 W if n = T, infan+1 supxn+1 1 2∥an+1 −xn+1∥2 W + V (x1, . . . , xn+1) if n < T. (2) Our analysis for the two games proceeds in a similar manner. For some past history of plays (x1, . . . , xn) of length n, we summarize the state by s = Pn t=1 xt and σ2 = Pn t=1 x⊺ t W −1xt. As we will see, the value-to-go after n of T rounds can be written as V (s, σ2, n); i.e. it only depends on the past plays through s and σ2. More surprisingly, for each n, the value-to-go V (s, σ2, n) is a quadratic function of s and a linear function of σ2 (under certain conditions on W ). While it is straightforward to see that the terminal value V (s, σ2, T) is quadratic in the state (this is easily checked by computing the loss of the best expert and using the first case of Equation (2)), it is not at all obvious that propagating from V (s + x, σ2 + x⊺W −1x, n + 1) to V (s, σ2, n), using the second case of (2), preserves this structure. This compact representation of the value-function is an essential ingredient for a computationally feasible algorithm. Many minimax approaches, such as normalized maximum likelihood [Sht87], have computational complexities that scale exponentially with the time horizon. We derive a strategy that can play in constant amortized time. Why is this interesting? We go beyond previous work in a few directions. First, we exhibit two new games that belong to the tiny class admitting computationally feasible minimax algorithms. Second, we consider the setting with squared Mahalanobis loss which allows the user intricate control over the penalization of different prediction errors. Our results clearly show how the learner should exploit this prioritization. 2.1 Related work Repeated games with minimax strategies are frequently studied ([CBL06]) and, in online learning, minimax analysis has been applied to a variety of losses and repeated games; however, computa2 tionally feasible algorithms are the exception, not the rule. For example, consider log loss, first discussed in [Sht87]. Whiile the minimax algorithm, Normalized Maximum Likelihood, is well known [CBL06], it generally requires computation that is exponential in the time horizon as one needs to aggregate over all data sequences. To our knowledge, there are two exceptions where efficient NML forecasters are possible: the multinomial case where fast Fourier transforms may be exploited [KM05], and very particular exponential families that cause NML to be a Bayesian strategy [HB12], [BGH+13]. The minimax optimal strategy is known also for: (i) the ball game with W = I [TW00] (our generalization to Mahalanobis W ̸= I results in fundamentally different strategies), (ii) the ball game with W = I and a constraint on the player’s deviation from the current empirical minimizer [ABRT08] (for which the optimal strategy is Follow-the-Leader), (iii) Lipschitz-bounded convex loss functions [ABRT08], (iv) experts with an L∗bound [AWY08], and (v) static experts with absolute loss [CBS11]. While not guaranteed to be an exhaustive list, the previous paragraph demonstrates the rarity of tractable minimax algorithms. 3 The Offline Problem The regret is defined as the difference between the loss of the algorithm and the loss of the best action in hindsight. Here we calculate that action and its loss. Lemma 3.1. Suppose A ⊇conv(X) (this will always hold in the settings we study). For data x1, . . . , xT ∈X, the loss of the best action in hindsight equals inf a∈A T X t=1 1 2∥a −xt∥2 W = 1 2 T X t=1 x⊺ t W −1xt −1 T T X t=1 xt !⊺ W −1 T X t=1 xt !! , (3) and the minimizer is the mean outcome a∗= 1 T PT t=1 xt. Proof. The unconstrained minimizer and value are obtained by equating the derivative to zero and plugging in the solution. The assumption A ⊇conv(X) ensures that the constraint a ∈A is inactive. The best action in hindsight is curiously independent of W , A and X. This also shows that the follow the leader strategy that plays at = 1 t−1 Pt−1 s=1 xs is independent of W and A as well. As we shall see, the minimax strategy does not have this property. 4 Simplex (Brier) Game In this section we analyze the Brier game. The action and outcome spaces are the probability simplex on K outcomes; A = X = △:= {x ∈RK + | 1⊺x = 1}. The loss is given by half the squared Mahalanobis distance, 1 2∥a −x∥2 W . We present a full minimax analysis of the T-round game: we calculate the game value, derive the maximin and minimax strategies, and discuss their efficient implementation. The structure of this section is as follows. In Lemmas 4.1 and 4.2, the conclusions (value and optimizers) are obtained under the proviso that the given optimizer lies in the simplex. In our main result, Theorem 4.3, we apply these auxiliary results to our minimax analysis and argue that the maximizer indeed lies in the simplex. We immediately work from a general symmetric W ≻0 with the following lemma. Lemma 4.1. Fix a symmetric matrix C ≻0 and vector d. The optimization problem max p∈△−1 2p⊺C−1p + d⊺p has value 1 2  d⊺Cd −(1⊺Cd−1)2 1⊺C1  = 1 2 d⊺C −C11⊺C 1⊺C1  d + 21⊺Cd−1 1⊺C1  attained at optimizer p∗= C  d −1⊺Cd −1 1⊺C1 1  =  C −C11⊺C 1⊺C1  d + C1 1⊺C1 provided that p∗is in the simplex. 3 Proof. We solve for the optimal p∗. Introducing Lagrange multiplier λ for the constraint P k pk = 1, we need to have p = C (d −λ1) which results in λ = 1⊺Cd−1 1⊺C1. Thus, the maximizer equals p∗= C d −1⊺Cd−1 1⊺C1 1  which produces objective value 1 2 d + 1⊺Cd−1 1⊺C1 1 ⊺C d −1⊺Cd−1 1⊺C1 1  . The statement follows from simplification. This lemma allows us to compute the value and saddle point whenever the future payoff is quadratic. Lemma 4.2. Fix symmetric matrices W ⪰0 and A such that W −1 + A ⪰0, and a vector b. The optimization problem min a∈△max x∈△ 1 2∥a −x∥2 W + 1 2x⊺Ax + b⊺x achieves its value 1 2c⊺W c −1 2 (1⊺W c −1)2 1⊺W 1 where c = 1 2 diag W −1 + A  + b at saddle point (the maximin strategy randomizes, playing x = ei with probability p∗ i ) a∗= p∗=  W −W 11⊺W 1⊺W 1  c + W 1 1⊺W 1 provided p∗⪰0. Proof. The objective is convex in x for each a as W −1 + A ⪰0, so it is maximized at a corner x = ek. We apply min-max swap (see e.g. [Sio58]), properness of the loss (which implies that a∗= p∗) and expand: min a∈△max x∈△ 1 2∥a −x∥2 W + 1 2x⊺Ax + b⊺x = min a∈△max k 1 2∥a −ek∥2 W + 1 2e⊺ kAek + b⊺ek = max p∈△min a∈△E k∼p 1 2∥a −ek∥2 W + 1 2e⊺ kAek + b⊺ek  = max p∈△E k∼p 1 2∥p −ek∥2 W + 1 2e⊺ kAek + b⊺ek  = max p∈△−1 2p⊺W −1p + 1 2 diag W −1 + A ⊺p + b⊺p The proof is completed by applying Lemma 4.1. 4.1 Minimax Analysis of the Brier Game Next, we turn to computing V (s, σ2, n) as a recursion and specifying the minimax and maximin strategies. However, for the value-to-go function to retain its quadratic form, we need an alignment condition on W . We say that W is aligned with the simplex if  W −W 11⊺W 1⊺W 1  diag(W −1) ⪰−2 W 1 1⊺W 1, (4) where ⪰denotes an entry-wise inequality between vectors. Note that many matrices besides I satisfy this condition: for example, all symmetric 2 × 2 matrices. We can now fully specify the value and strategies for the Brier game. Theorem 4.3. Consider the T-round Brier game with Mahalanobis loss 1 2∥a −x∥2 W with W satisfying the alignment condition (4). After n outcomes (x1, . . . , xn) with statistics s = Pn t=1 xt and σ2 = Pn t=1 x⊺ t W −1xt the value-to-go is V (s, σ2, n) = 1 2αns⊺W −1s −1 2σ2 + 1 2 (1 −nαn) diag(W −1)⊺s + γn, 4 and the minimax and maximin strategies are given by a∗(s, σ2, n) = p∗(s, σ2, n) = W 1 1⊺W 1 + αn+1  s −nW 1 1⊺W 1  + 1 2 (1 −nαn+1)  W −W 11⊺W 1⊺W 1  diag(W −1) where the coefficients are defined recursively by αT = 1 T γT = 0 αn = α2 n+1 + αn+1 γn = (1 −nαn+1)2 2 1 4 diag(W −1)⊺W diag(W −1) − 1 21⊺W diag(W −1) −1 2 1⊺W 1 ! + γn+1. Proof. We prove this by induction, beginning at the end of the game and working backwards in time. Assume that V (s, σ2, T) has the given form. Recall that the value at the end of the game is V (s, σ2, T) = −infa PT t=1 1 2∥a −xt∥2 W and is given by Lemma 3.1. Matching coefficients, we find V (s, σ2, T) corresponds to αT = 1 T and γT = 0. Now assume that V has the assumed form after n rounds. Using s and σ2 to denote the state after n −1 rounds, we can write V (s, σ2, n −1) = min a∈△max x∈△ 1 2∥a −x∥2 W + 1 2αn(s + x)⊺W −1(s + x) −1 2(σ2 + x⊺W −1x) + 1 2 (1 −nαn) diag(W −1)⊺(s + x) + γn. Using Lemma 4.2 to evaluate the right hand side produces a quadratic function in the state, and we can then match terms to find αn−1 and γn−1 and the minimax and maximin strategy. The final step is checking the p∗⪰0 condition necessary to apply Lemma 4.2, which is equivalent to W being aligned with the simplex. See the appendix for a complete proof. This full characterization of the game allows us to derive the following minimax regret bound. Theorem 4.4. Let W satisfy the alignment condition (4). The minimax regret of the T-round simplex game satisfies V ≤1 + ln(T) 2 1 4 diag(W −1)⊺W diag(W −1) − 1 21⊺W diag(W −1) −1 2 1⊺W 1 ! . Proof. The regret is equal to the value of the game, V = V (0, 0, 0) = γ0. First observe that (1 −nαn+1)2 = 1 −2nαn+1 + n2α2 n+1 = 1 −2nαn+1 + n2(αn −αn+1) = αn+1 + 1 −(n + 1)2αn+1 + n2αn. After summing over n the last two terms telescope, and we find γ0 ∝ T −1 X n=0 (1 −nαn+1)2 = −T 2αT + T −1 X n=0 (1 + αn+1) = T X n=1 αn. Each αn can be bounded by 1/n, as observed in [TW00, proof of Lemma 2]. In the base case n = T this holds with equality, and for n < T we have αn = α2 n+1 + αn+1 ≤ 1 (n + 1)2 + 1 n + 1 = 1 n n(n + 2) (n + 1)2 ≤1 n. It follows that γ0 ∝PT n=1 αn ≤PT n=1 1 n ≤1 + ln(T) as desired. 5 5 Norm Ball Game This section parallels the previous. Here, we consider the online game with Mahalanobis loss and A = X = ⃝:= {x ∈RK | ∥x∥≤1}, the 2-norm Euclidian ball (not the Mahalanobis ball). We show that the value-to-go function is always quadratic in s and linear in σ2 and derive the minimax and maximin strategies. Lemma 5.1. Fix a symmetric matrix A and vector b and assume A + W −1 ≻0. Let λmax be the largest eigenvalue of W −1+A and vmax the corresponding eigenvector. If b⊺(λmaxI −A)−2 b ≤ 1, then the optimization problem inf a∈⃝ sup x∈⃝ 1 2∥a −x∥2 W + 1 2x⊺Ax + x⊺b has value 1 2b⊺(λmaxI −A)−1 b + 1 2λmax, minimax strategy a∗= (λmaxI −A)−1b and a randomized maximin strategy that plays two unit length vectors, with Pr  x = a⊥± q 1 −a⊺ ⊥a⊥vmax  = 1 2 ± 1 2 s a⊺ ∥a∥ 1 −a⊺ ⊥a⊥ , where a⊥and a∥are the components of a∗perpendicular and parallel to vmax. Proof. As the objective is convex, the inner optimum must be on the boundary and hence will be at a unit vector x. Introduce a Lagrange multiplier λ for x⊺x ≤1 to get the Lagrangian inf a∈⃝ inf λ≥0 sup x 1 2∥a −x∥2 W + 1 2x⊺Ax + x⊺b + λ1 2(1 −x⊺x). This is concave in x if W −1 + A −λI ⪯0, that is, λmax ≤λ. Differentiating yields the optimizer x∗= (W −1 + A −λI)−1(W −1a −b), which leaves us with an optimization in only a and λ: inf a∈⃝ inf λ≥λmax 1 2a⊺W −1a −1 2(W −1a −b)⊺(W −1 + A −λI)−1(W −1a −b) + 1 2λ. Since the infimums are over closed sets, we can exchange their order. Unconstrained optimization of a results in a∗= (λI −A)−1 b. Evaluating the objective at a∗and using W −1a∗−b = W −1 (λI −A)−1 b −b = W −1 + A −λI  (λI −A)−1 b results in inf λ≥λmax 1 2b⊺(λI −A)−1 b + 1 2λ = inf λ≥λmax 1 2 X i (u⊺ i b)2 λ −λi + λ ! , using the spectral decomposition A = P i λiuiu⊺ i . For λ ≥λmax, we have λ ≥λi. Taking derivatives, provided b⊺(λmaxI −A)−2 b ≤1, this function is increasing in λ ≥λmax, and so obtains its infimum at λmax. Thus, when the assumed inequality is satisfied, the a∗is minimax for the given x∗. To obtain the maximin strategy, we can take the usual convexification where the Adversary plays distributions P over the unit sphere. This allows us to swap the infimum and supremum (see e.g. Sion’s minimax theorem[Sio58]) and obtain an equivalent optimization problem. We then see that the objective only depends on the mean µ = E x and second moment D = E xx⊺of the distribution P. The characterization in [KNW13, Theorem 2.1] tells us that µ, D are the first two moments of a distribution on units iff tr(D) = 1 and D ⪰µµ⊺. Then, our usual min-max swap yields V = sup P inf a∈⃝ E x∼P 1 2a⊺W −1a −a⊺W −1x + 1 2x⊺W −1x + 1 2x⊺Ax + b⊺x  = sup µ,D inf a∈⃝ 1 2a⊺W −1a −a⊺W −1µ + 1 2 tr (W −1 + A)D  + b⊺µ = sup µ,D −1 2µ⊺W −1µ + 1 2 tr (W −1 + A)D  + b⊺µ = −1 2a∗⊺W −1a∗+ b⊺a∗+ sup D⪰a∗a∗⊺ tr(D)=1 1 2 tr (W −1 + A)D  6 vmax µ Figure 2: Illustration of the maximin distribution from Lemma 5.1. The mixture of red unit vectors with mean µ has second moment D = µµ⊺+ (1 −µ⊺µ)vmaxv⊺ max. where the second equality uses a = µ and the third used the saddle point condition µ∗= a∗. The matrix D with constraint tr(D) = 1 now seeks to align with the largest eigenvector of W −1 + A but it also has to respect the constraint D ⪰a∗a∗⊺. We now re-parameterise by C = D −a∗a∗⊺. We then need to find sup C⪰0 tr(C)=1−a∗⊺a∗ 1 2 tr (W −1 + A)C  . By linearity of the objective the maximizer is of rank 1, and hence this is a (scaled) maximum eigenvalue problem, with solution given by C∗= (1 −a∗⊺a∗)vmaxv⊺ max, so that D∗= a∗a∗⊺+ (1 −a∗⊺a∗)vmaxv⊺ max. This essentially reduces finding P to a 2-dimensional problem, which can be solved in closed form [KNW13, Lemma 4.1]. It is easy to verify that the mixture in the theorem has the desired mean a∗and second moment D∗. See Figure 2 for the geometrical intuition. Notice that both the minimax and maximin strategies only depend on W through λmax and vmax. 5.1 Minimax Analysis of the Ball Game With the above lemma, we can compute the value and strategies for the ball game in an analogous way to Theorem 4.3. Again, we find that the value function at the end of the game is quadratic in the state, and, surprisingly, remains quadratic under the backwards induction. Theorem 5.2. Consider the T-round ball game with loss 1 2∥a −x∥2 W . After n rounds, the valueto-go for a state with statistics s = Pn t=1 xt and σ2 = Pn t=1 x⊺ t W −1xt is V (s, σ2, n) = 1 2s⊺Ans −1 2σ2 + γn. The minimax strategy plays a∗(s, σ2, n) = λmaxI −(An+1 −W −1) −1 An+1s and the maximin strategy plays two unit length vectors with Pr  x = a⊥± q 1 −a⊺ ⊥a⊥vmax  = 1 2 ± 1 2 s a⊺ ∥a∥ 1 −a⊺ ⊥a⊥ , where λmax and vmax correspond to the largest eigenvalue of An+1 and a⊥and a∥are the components of a∗perpendicular and parallel to vmax. The coefficients An and γn are determined recursively by base case AT = 1 T W −1 and γT = 0 and recursion An = An+1 W −1 + λmaxI −An+1 −1 An+1 + An+1 γn = 1 2λmax + γn+1. 7 Proof outline. The proof is by induction on the number n of rounds played. In the base case n = T we find (see (3)) AT = 1 T W −1 and γT = 0. For the the induction step, we need to calculate V (s, σ2, n) = inf a∈⃝ sup x∈⃝ 1 2∥a −x∥2 W + V (s + x, σ2 + x⊺W −1x, n + 1). Using the induction hypothesis, we expand the right-hand-side to inf a∈⃝ sup x∈⃝ 1 2∥a −x∥2 W + 1 2(s + x)⊺An+1(s + x) −1 2(σ2 + x⊺W −1x) + γn+1. which we can evaluate by applying Lemma 5.1 with A = An+1 −W −1 and b = s⊺An+1. Collecting terms and matching with V (s, σ2, n) = 1 2s⊺Ans −1 2σ2 + γn yields the recursion for An and γn as well as the given minimax and maximin strategies. As before, much of the algebra has been moved to the appendix. Understanding the eigenvalues of An As we have seen from the An recursion, the eigensystem is always the same as that of W −1. Thus, we can characterize the minimax strategy completely by its effect on the eigenvalues of W −1. Denote the eigenvalues of An and W −1 to be λi n and νi, respectively, with λ1 n−1 corresponding to the largest eigenvalue. The eigenvalues follow: λi n−1 = (λi n)2 νi + λ1n −λin + λi = λi n(νi + λ1 n) νi + λ1n −λin , which leaves the order of λi n unchanged. The largest eigenvalue λ1 n satisfies the recurrence λ1 T /ν1 = 1/T and λ1 n/ν1 = λ1 n+1/ν1 2 + λ1 n+1/ν1, which, remarkably, is the same recurrence for the αn parameter in the Brier game, i.e. λmax n = αnνmax. This observation is the key to analyzing the minimax regret. Theorem 5.3. The minimax regret of the T-round ball game satisfies V ≤1 + ln(T) 2 λmax(W −1). Proof. We have V = V (0, 0, 0) = γ0 = PT n=1 λmax n = λmax(W −1) PT n=1 αn, the last equality following from the discussion above. The proof of Theorem 4.4 gives the bound on PT n=1 αn. Taking stock, we find that the minimax regrets of the Brier game (Theorems 4.3) and ball game (Theorems 5.2) have identical dependence on the horizon T but differ in a complexity factor arising from the interaction of the action space and the loss matrix W . 6 Conclusion In this paper, we have presented two games that, unexpectedly, have computationally efficient minimax strategies. While the structure of the square Mahalanobis distance is important, it is the interplay between the loss and the constraint set that allows efficient calculation of the backwards induction, value-to-go, and achieving strategies. For example, the square Mahalanobis game with ℓ1 ball action spaces does not admit a quadratic value-to-go unless W = I. We emphasize the low computational cost of this method despite the exponential blow-up in state space size. In the Brier game, the αn coefficients need to be precomputed, which can be done in O(T) time. Similarly, computation of the eigenvalues of the An coefficients for the ball game can be done in O(TK + K3) time. Then, at each iteration of the algorithm, only matrix-vector multiplications between the current state and the precomputed parameters are required. Hence, playing either T round game requires O(TK2) time. Unfortunately, as is the case with most minimax algorithms, the time horizon must be known in advance. There are many different future directions. We are currently pursuing a characterization of action spaces that permit quadratic value functions under squared Mahalanobis loss, and investigating connections between losses and families of value functions closed under backwards induction. There is some notion of conjugacy between losses, value-to-go functions, and action spaces, but a generalization seems difficult: the Brier game and ball game worked out for seemingly very different reasons. 8 References [ABRT08] Jacob Abernethy, Peter L. Bartlett, Alexander Rakhlin, and Ambuj Tewari. Optimal strategies and minimax lower bounds for online convex games. In Servedio and Zhang [SZ08], pages 415–423. [AWY08] Jacob Abernethy, Manfred K. Warmuth, and Joel Yellin. When random play is optimal against an adversary. In Servedio and Zhang [SZ08], pages 437–446. [BGH+13] Peter L. Bartlett, Peter Grunwald, Peter Harremo¨es, Fares Hedayati, and Wojciech Kotłowski. Horizon-independent optimal prediction with log-loss in exponential families. CoRR, abs/1305.4324, 2013. [Bri50] Glenn W Brier. Verification of forecasts expressed in terms of probability. Monthly weather review, 78(1):1–3, 1950. [CBL06] Nicol`o Cesa-Bianchi and G´abor Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [CBS11] Nicol`o Cesa-Bianchi and Ohad Shamir. Efficient online learning via randomized rounding. In J. Shawe-Taylor, R.S. Zemel, P. Bartlett, F.C.N. Pereira, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 343–351, 2011. [HB12] Fares Hedayati and Peter L. Bartlett. Exchangeability characterizes optimality of sequential normalized maximum likelihood and bayesian prediction with jeffreys prior. In International Conference on Artificial Intelligence and Statistics, pages 504–510, 2012. [KM05] Petri Kontkanen and Petri Myllym¨aki. A fast normalized maximum likelihood algorithm for multinomial data. In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence (IJCAI-05), pages 1613–1616, 2005. [KNW13] Wouter M. Koolen, Jiazhong Nie, and Manfred K. Warmuth. Learning a set of directions. In Shai Shalev-Shwartz and Ingo Steinwart, editors, Proceedings of the 26th Annual Conference on Learning Theory (COLT), June 2013. [Sht87] Yurii Mikhailovich Shtar’kov. Universal sequential coding of single messages. Problemy Peredachi Informatsii, 23(3):3–17, 1987. [Sio58] Maurice Sion. On general minimax theorems. Pacific J. Math., 8(1):171–176, 1958. [SZ08] Rocco A. Servedio and Tong Zhang, editors. 21st Annual Conference on Learning Theory - COLT 2008, Helsinki, Finland, July 9-12, 2008. Omnipress, 2008. [TW00] Eiji Takimoto and Manfred K. Warmuth. The minimax strategy for Gaussian density estimation. In 13th COLT, pages 100–106, 2000. 9
2014
229
5,324
On the Number of Linear Regions of Deep Neural Networks Guido Mont´ufar Max Planck Institute for Mathematics in the Sciences montufar@mis.mpg.de Razvan Pascanu Universit´e de Montr´eal pascanur@iro.umontreal.ca Kyunghyun Cho Universit´e de Montr´eal kyunghyun.cho@umontreal.ca Yoshua Bengio Universit´e de Montr´eal, CIFAR Fellow yoshua.bengio@umontreal.ca Abstract We study the complexity of functions computable by deep feedforward neural networks with piecewise linear activations in terms of the symmetries and the number of linear regions that they have. Deep networks are able to sequentially map portions of each layer’s input-space to the same output. In this way, deep models compute functions that react equally to complicated patterns of different inputs. The compositional structure of these functions enables them to re-use pieces of computation exponentially often in terms of the network’s depth. This paper investigates the complexity of such compositional maps and contributes new theoretical results regarding the advantage of depth for neural networks with piecewise linear activation functions. In particular, our analysis is not specific to a single family of models, and as an example, we employ it for rectifier and maxout networks. We improve complexity bounds from pre-existing work and investigate the behavior of units in higher layers. Keywords: Deep learning, neural network, input space partition, rectifier, maxout 1 Introduction Artificial neural networks with several hidden layers, called deep neural networks, have become popular due to their unprecedented success in a variety of machine learning tasks (see, e.g., Krizhevsky et al. 2012, Ciresan et al. 2012, Goodfellow et al. 2013, Hinton et al. 2012). In view of this empirical evidence, deep neural networks are becoming increasingly favored over shallow networks (i.e., with a single layer of hidden units), and are often implemented with more than five layers. At the time being, however, the theory of deep networks still poses many questions. Recently, Delalleau and Bengio (2011) showed that a shallow network requires exponentially many more sum-product hidden units1 than a deep sum-product network in order to compute certain families of polynomials. We are interested in extending this kind of analysis to more popular neural networks, such as those with maxout and rectifier units. There is a wealth of literature discussing approximation, estimation, and complexity of artificial neural networks (see, e.g., Anthony and Bartlett 1999). A well-known result states that a feedforward neural network with a single, huge, hidden layer is a universal approximator of Borel measurable functions (see Hornik et al. 1989, Cybenko 1989). Other works have investigated universal approximation of probability distributions by deep belief networks (Le Roux and Bengio 2010, Mont´ufar and Ay 2011), as well as their approximation properties (Mont´ufar 2014, Krause et al. 2013). These previous theoretical results, however, do not trivially apply to the types of deep neural networks that have seen success in recent years. Conventional neural networks often employ either hidden units 1A single sum-product hidden layer summarizes a layer of product units followed by a layer of sum units. 1 Figure 1: Binary classification using a shallow model with 20 hidden units (solid line) and a deep model with two layers of 10 units each (dashed line). The right panel shows a close-up of the left panel. Filled markers indicate errors made by the shallow model. with a bounded smooth activation function, or Boolean hidden units. On the other hand, recently it has become more common to use piecewise linear functions, such as the rectifier activation g(a) = max{0,a} (Glorot et al. 2011, Nair and Hinton 2010) or the maxout activation g(a1,...,ak) = max{a1,...,ak} (Goodfellow et al. 2013). The practical success of deep neural networks with piecewise linear units calls for the theoretical analysis specific for this type of neural networks. In this respect, Pascanu et al. (2013) reported a theoretical result on the complexity of functions computable by deep feedforward networks with rectifier units. They showed that, in the asymptotic limit of many hidden layers, deep networks are able to separate their input space into exponentially more linear response regions than their shallow counterparts, despite using the same number of computational units. Building on the ideas from Pascanu et al. (2013), we develop a general framework for analyzing deep models with piecewise linear activations. We describe how the intermediary layers of these models are able to map several pieces of their inputs into the same output. The layer-wise composition of the functions computed in this way re-uses low-level computations exponentially often as the number of layers increases. This key property enables deep networks to compute highly complex and structured functions. We underpin this idea by estimating the number of linear regions of functions computable by two important types of piecewise linear networks: with rectifier units and with maxout units. Our results for the complexity of deep rectifier networks yield a significant improvement over the previous results on rectifier networks mentioned above, showing a favorable behavior of deep over shallow networks even with a moderate number of hidden layers. Furthermore, our analysis of deep rectifier and maxout networks provides a platform to study a broad variety of related networks, such as convolutional networks. The number of linear regions of the functions that can be computed by a given model is a measure of the model’s flexibility. An example of this is given in Fig. 1, which compares the learned decision boundary of a single-layer and a two-layer model with the same number of hidden units (see details in the Supplementary Material). This illustrates the advantage of depth; the deep model captures the desired boundary more accurately, approximating it with a larger number of linear pieces. As noted earlier, deep networks are able to identify an exponential number of input neighborhoods by mapping them to a common output of some intermediary hidden layer. The computations carried out on the activations of this intermediary layer are replicated many times, once in each of the identified neighborhoods. This allows the networks to compute very complex looking functions even when they are defined with relatively few parameters. The number of parameters is an upper bound for the dimension of the set of functions computable by a network, and a small number of parameters means that the class of computable functions has a low dimension. The set of functions computable by a deep feedforward piecewise linear network, although low dimensional, achieves exponential complexity by re-using and composing features from layer to layer. 2 Feedforward Neural Networks and their Compositional Properties In this section we discuss the ability of deep feedforward networks to re-map their input-space to create complex symmetries by using only relatively few computational units. The key observation of our analysis is that each layer of a deep model is able to map different regions of its input to a common output. This leads to a compositional structure, where computations on higher layers are effectively replicated in all input regions that produced the same output at a given layer. The capacity to replicate computations over the input-space grows exponentially with the number of network layers. Before expanding these ideas, we introduce basic definitions needed in the rest of the paper. At the end of this section, we give an intuitive perspective for reasoning about the replicative capacity of deep models. 2 2.1 Definitions A feedforward neural network is a composition of layers of computational units which defines a function F : Rn0 →Rout of the form F(x;θ) = fout ◦gL ◦fL ◦··· ◦g1 ◦f1(x), (1) where fl is a linear preactivation function and gl is a nonlinear activation function. The parameter θ is composed of input weight matrices Wl ∈Rk·nl×nl−1 and bias vectors bl ∈Rk·nl for each layer l ∈[L]. The output of the l-th layer is a vector xl = [xl,1,...,xl,nl]⊤of activations xl,i of the units i ∈[nl] in that layer. This is computed from the activations of the preceding layer by xl = gl(fl(xl−1)). Given the activations xl−1 of the units in the (l −1)-th layer, the preactivation of layer l is given by fl(xl−1) = Wlxl−1 + bl, where fl = [fl,1,...,fl,nl]⊤is an array composed of nl preactivation vectors fl,i ∈Rk, and the activation of the i-th unit in the l-th layer is given by xl,i = gl,i(fl,i(xl−1)). We will abbreviate gl ◦fl by hl. When the layer index l is clear, we will drop the corresponding subscript. We are interested in piecewise linear activations, and will consider the following two important types. • Rectifier unit: gi(fi) = max{0,fi}, where fi ∈R and k = 1. • Rank-k maxout unit: gi(fi) = max{fi,1,...,fi,k}, where fi = [fi,1,...,fi,k] ∈Rk. The structure of the network refers to the way its units are arranged. It is specified by the number n0 of input dimensions, the number of layers L, and the number of units or width nl of each layer. We will classify the functions computed by different network structures, for different choices of parameters, in terms of their number of linear regions. A linear region of a piecewise linear function F : Rn0 →Rm is a maximal connected subset of the input-space Rn0, on which F is linear. For the functions that we consider, each linear region has full dimension, n0. 2.2 Shallow Neural Networks Rectifier units have two types of behavior; they can be either constant 0 or linear, depending on their inputs. The boundary between these two behaviors is given by a hyperplane, and the collection of all the hyperplanes coming from all units in a rectifier layer forms a hyperplane arrangement. In general, if the activation function g: R →R has a distinguished (i.e., irregular) behavior at zero (e.g., an inflection point or non-linearity), then the function Rn0 →Rn1; x 7→g(Wx + b) has a distinguished behavior at all inputs from any of the hyperplanes Hi := {x ∈Rn0 : Wi,:x + bi = 0} for i ∈[n1]. The hyperplanes capturing this distinguished behavior also form a hyperplane arrangement (see, e.g., Pascanu et al. 2013). The hyperplanes in the arrangement split the input-space into several regions. Formally, a region of a hyperplane arrangement {H1,...,Hn1} is a connected component of the complement Rn0 \ (∪iHi), i.e., a set of points delimited by these hyperplanes (possibly open towards infinity). The number of regions of an arrangement can be given in terms of a characteristic function of the arrangement, as shown in a well-known result by Zaslavsky (1975). An arrangement of n1 hyperplanes in Rn0 has at most Pn0 j=0 n1 j  regions. Furthermore, this number of regions is attained if and only if the hyperplanes are in general position. This implies that the maximal number of linear regions of functions computed by a shallow rectifier network with n0 inputs and n1 hidden units is Pn0 j=0 n1 j  (see Pascanu et al. 2013; Proposition 5). 2.3 Deep Neural Networks We start by defining the identification of input neighborhoods mentioned in the introduction more formally: Definition 1. A map F identifies two neighborhoods S and T of its input domain if it maps them to a common subset F(S) = F(T) of its output domain. In this case we also say that S and T are identified by F. Example 2. The four quadrants of 2-D Euclidean space are regions that are identified by the absolute value function g: R2 →R2; (x1,x2) 7→[|x1|,|x2|]⊤. 3 1. Fold along the 2. Fold along the horizontal axis vertical axis 3. (a) S1 S2 S3 S4 S′ 4 S′ 1 S′ 1 S′ 1 S′ 1 S′ 4 S′ 4 S′ 4 S′ 2 S′ 2 S′ 2 S′ 2 S′ 3 S′ 3 S′ 3 S′ 3 S′ 1 S′ 4 S′ 2 S′ 3 Input Space First Layer Space Second Layer Space (b) (c) Figure 2: (a) Space folding of 2-D Euclidean space along the two coordinate axes. (b) An illustration of how the top-level partitioning (on the right) is replicated to the original input space (left). (c) Identification of regions across the layers of a deep model. The computation carried out by the l-th layer of a feedforward network on a set of activations from the (l −1)-th layer is effectively carried out for all regions of the input space that lead to the same activations of the (l −1)-th layer. One can choose the input weights and biases of a given layer in such a way that the computed function behaves most interestingly on those activation values of the preceding layer which have the largest number of preimages in the input space, thus replicating the interesting computation many times in the input space and generating an overall complicated-looking function. For any given choice of the network parameters, each hidden layer l computes a function hl = gl ◦fl on the output activations of the preceding layer. We consider the function Fl: Rn0 →Rnl; Fl := hl ◦···◦h1 that computes the activations of the l-th hidden layer. We denote the image of Fl by Sl ⊆Rnl, i.e., the set of (vector valued) activations reachable by the l-th layer for all possible inputs. Given a subset R ⊆Sl, we denote by P l R the set of subsets ¯R1,..., ¯Rk ⊆Sl−1 that are mapped by hl onto R; that is, subsets that satisfy hl(¯R1) = ··· = hl(¯Rk) = R. See Fig. 2 for an illustration. The number of separate input-space neighborhoods that are mapped to a common neighborhood R ⊆Sl ⊆Rnl can be given recursively as N l R = X R′∈P l R N l−1 R′ , N 0 R = 1, for each region R ⊆Rn0. (2) For example, P 1 R is the set of all disjoint input-space neighborhoods whose image by the function computed by the first layer, h1: x 7→g(Wx + b), equals R ⊆S1 ⊆Rn1. The recursive formula (2) counts the number of identified sets by moving along the branches of a tree rooted at the set R of the j-th layer’s output-space (see Fig. 2 (c)). Based on these observations, we can estimate the maximal number of linear regions as follows. Lemma 3. The maximal number of linear regions of the functions computed by an L-layer neural network with piecewise linear activations is at least N = P R∈P L N L−1 R , where N L−1 R is defined by Eq. (2), and P L is a set of neighborhoods in distinct linear regions of the function computed by the last hidden layer. Here, the idea to construct a function with many linear regions is to use the first L −1 hidden layers to identify many input-space neighborhoods, mapping all of them to the activation neighborhoods P L of the (L −1)-th hidden layer, each of which belongs to a distinct linear region of the last hidden layer. We will follow this strategy in Secs. 3 and 4, where we analyze rectifier and maxout networks in detail. 2.4 Identification of Inputs as Space Foldings In this section, we discuss an intuition behind Lemma 3 in terms of space folding. A map F that identifies two subsets S and S′ can be considered as an operator that folds its domain in such a way that the two 4 Figure 3: Space folding of 2-D space in a non-trivial way. Note how the folding can potentially identify symmetries in the boundary that it needs to learn. subsets S and S′ coincide and are mapped to the same output. For instance, the absolute value function g: R2 →R2 from Example 2 folds its domain twice (once along each coordinate axis), as illustrated in Fig. 2 (a). This folding identifies the four quadrants of 2-D Euclidean space. By composing such operations, the same kind of map can be applied again to the output, in order to re-fold the first folding. Each hidden layer of a deep neural network can be associated with a folding operator. Each hidden layer folds the space of activations of the previous layer. In turn, a deep neural network effectively folds its input-space recursively, starting with the first layer. The consequence of this recursive folding is that any function computed on the final folded space will apply to all the collapsed subsets identified by the map corresponding to the succession of foldings. This means that in a deep model any partitioning of the last layer’s image-space is replicated in all input-space regions which are identified by the succession of foldings. Fig. 2 (b) offers an illustration of this replication property. Space foldings are not restricted to foldings along coordinate axes and they do not have to preserve lengths. Instead, the space is folded depending on the orientations and shifts encoded in the input weights W and biases b and on the nonlinear activation function used at each hidden layer. In particular, this means that the sizes and orientations of identified input-space regions may differ from each other. See Fig. 3. In the case of activation functions which are not piece-wise linear, the folding operations may be even more complex. 2.5 Stability to Perturbation Our bounds on the complexity attainable by deep models (Secs. 3 and 4) are based on suitable choices of the network weights. However, this does not mean that the indicated complexity is only attainable in singular cases. The parametrization of the functions computed by a neural network is continuous. More precisely, the map ψ: RN →C(Rn0;RnL); θ 7→Fθ, which maps input weights and biases θ = {Wi,bi}L i=1 to the continuous functions Fθ : Rn0 →RnL computed by the network, is continuous. Our analysis considers the number of linear regions of the functions Fθ. By definition, each linear region contains an open neighborhood of the input-space Rn0. Given any function Fθ with a finite number of linear regions, there is an ϵ > 0 such that for each ϵ-perturbation of the parameter θ, the resulting function Fθ+ϵ has at least as many linear regions as Fθ. The linear regions of Fθ are preserved under small perturbations of the parameters, because they have a finite volume. If we define a probability density on the space of parameters, what is the probability of the event that the function represented by the network has a given number of linear regions? By the above discussion, the probability of getting a number of regions at least as large as the number resulting from any particular choice of parameters (for a uniform measure within a bounded domain) is nonzero, even though it may be very small. This is because there exists an epsilon-ball of non-zero volume around that particular choice of parameters, for which at least the same number of linear regions is attained. For example, shallow rectifier networks generically attain the maximal number of regions, even if in close vicinity of any parameter choice there may be parameters corresponding to functions with very few regions. For future work it would be interesting to study the partitions of parameter space RN into pieces where the resulting functions partition their input-spaces into isomorphic linear regions, and to investigate how many of these pieces of parameter space correspond to functions with a given number of linear regions. 2.6 Empirical Evaluation of Folding in Rectifier MLPs We empirically examined the behavior of a trained MLP to see if it folds the input-space in the way described above. First, we note that tracing the activation of each hidden unit in this model gives a piecewise linear map Rn0 →R (from inputs to activation values of that unit). Hence, we can analyze the behavior of each 5 0 1 2 1 2 3 h1 h2 h3 h1 −h2 h1 −h2 + h3 x ˜h(x) Figure 4: Folding of the real line into equal-length segments by a sum of rectifiers. unit by visualizing the different weight matrices corresponding to the different linear pieces of this map. The weight matrix of one piece of this map can be found by tracking the linear piece used in each intermediary layer, starting from an input example. This visualization technique, a byproduct of our theoretical analysis, is similar to the one proposed by Zeiler and Fergus (2013), but is motivated by a different perspective. After computing the activations of an intermediary hidden unit for each training example, we can, for instance, inspect two examples that result in similar levels of activation for a hidden unit. With the linear maps of the hidden unit corresponding to the two examples we perturb one of the examples until it results in exactly the same activation. These two inputs then can be safely considered as points in two regions identified by the hidden unit. In the Supplementary Material we provide details and examples of this visualization technique. We also show inputs identified by a deep MLP. 3 Deep Rectifier Networks In this section we analyze deep neural networks with rectifier units, based on the general observations from Sec. 2. We improve upon the results by Pascanu et al. (2013), with a tighter lower-bound on the maximal number of linear regions of functions computable by deep rectifier networks. First, let us note the following upper-bound, which follows directly from the fact that each linear region of a rectifier network corresponds to a pattern of hidden units being active: Proposition 4. The maximal number of linear regions of the functions computed by any rectifier network with a total of N hidden units is bounded from above by 2N. 3.1 Illustration of the Construction Consider a layer of n rectifiers with n0 input variables, where n ≥n0. We partition the set of rectifier units into n0 (non-overlapping) subsets of cardinality p = ⌊n/n0⌋and ignore the remainder units. Consider the units in the j-th subset. We can choose their input weights and biases such that h1(x) = max{0, wx}, h2(x) = max{0,2wx −1}, h3(x) = max{0,2wx −2}, ... hp(x) = max{0,2wx −(p −1)}, where w is a row vector with j-th entry equal to 1 and all other entries set to 0. The product wx selects the j-th coordinate of x. Adding these rectifiers with alternating signs, we obtain following scalar function: ˜hj(x) =  1,−1,1,...,(−1)p−1 [h1(x),h2(x),h3(x),...,hp(x)]⊤. (3) Since ˜hj acts only on the j-th input coordinate, we may redefine it to take a scalar input, namely the j-th coordinate of x. This function has p linear regions given by the intervals (−∞,0], [0,1], [1,2], ..., [p −1,∞). Each of these intervals has a subset that is mapped by ˜hj onto the interval (0,1), as illustrated in Fig. 4. The function ˜hj identifies the input-space strips with j-th coordinate xj restricted to the intervals (0,1),(1,2),...,(p−1,p). Consider now all the n0 subsets of rectifiers and the function ˜h = ˜h1, ˜h2,..., ˜hp ⊤. This function is locally symmetric about each hyperplane with a fixed j-th coordinate 6 equal to xj = 1,...,xj = p −1 (vertical lines in Fig. 4), for all j = 1,...,n0. Note the periodic pattern that emerges. In fact, the function ˜h identifies a total of pn0 hypercubes delimited by these hyperplanes. Now, note that ˜h arises from h by composition with a linear function (alternating sums). This linear function can be effectively absorbed in the preactivation function of the next layer. Hence we can treat ˜h as being the function computed by the current layer. Computations by deeper layers, as functions of the unit hypercube output of this rectifier layer, are replicated on each of the pn0 identified input-space hypercubes. 3.2 Formal Result We can generalize the construction described above to the case of a deep rectifier network with n0 inputs and L hidden layers of widths ni ≥n0 for all i ∈[L]. We obtain the following lower bound for the maximal number of linear regions of deep rectifier networks: Theorem 5. The maximal number of linear regions of the functions computed by a neural network with n0 input units and L hidden layers, with ni ≥n0 rectifiers at the i-th layer, is lower bounded by L−1 Y i=1  ni n0 n0! n0 X j=0 nL j  . The next corollary gives an expression for the asymptotic behavior of these bounds. Assuming that n0 = O(1) and ni = n for all i ≥1, the number of regions of a single layer model with Ln hidden units behaves as O(Ln0nn0) (see Pascanu et al. 2013; Proposition 10). For a deep model, Theorem 5 implies: Corollary 6. A rectifier neural network with n0 input units and L hidden layers of width n ≥n0 can compute functions that have Ω  (n/n0)(L−1)n0 nn0  linear regions. Thus we see that the number of linear regions of deep models grows exponentially in L and polynomially in n, which is much faster than that of shallow models with nL hidden units. Our result is a significant improvement over the bound Ω  (n/n0)L−1 nn0  obtained by Pascanu et al. (2013). In particular, our result demonstrates that even for small values of L and n, deep rectifier models are able to produce substantially more linear regions than shallow rectifier models. Additionally, using the same strategy as Pascanu et al. (2013), our result can be reformulated in terms of the number of linear regions per parameter. This results in a similar behavior, with deep models being exponentially more efficient than shallow models (see the Supplementary Material). 4 Deep Maxout Networks A maxout network is a feedforward network with layers defined as follows: Definition 7. A rank-k maxout layer with n input and m output units is defined by a preactivation function of the form f : Rn →Rm·k; f(x) = Wx+b, with input and bias weights W ∈Rm·k×n, b ∈Rm·k, and activations of the form gj(z) = max{z(j−1)k+1,...,zjk} for all j ∈[m]. The layer computes a function g ◦f : Rn →Rm; x 7→    max{f1(x),...,fk(x)} ... max{f(m−1)k+1(x),...,fmk(x)}   . (4) Since the maximum of two convex functions is convex, maxout units and maxout layers compute convex functions. The maximum of a collection of functions is called their upper envelope. We can view the graph of each linear function fi: Rn →R as a supporting hyperplane of a convex set in (n + 1)-dimensional space. In particular, if each fi, i ∈[k] is the unique maximizer fi = max{f′ i : i′ ∈[k]} at some input neighborhood, then the number of linear regions of the upper envelope g1 ◦f = max{fi: i ∈[k]} is exactly k. This shows that the maximal number of linear regions of a maxout unit is equal to its rank. The linear regions of the maxout layer are the intersections of the linear regions of the individual maxout units. In order to obtain the number of linear regions for the layer, we need to describe the structure of the linear regions of each maxout unit, and study their possible intersections. Voronoi diagrams can be 7 lifted to upper envelopes of linear functions, and hence they describe input-space partitions generated by maxout units. Now, how many regions do we obtain by intersecting the regions of m Voronoi diagrams with k regions each? Computing the intersections of Voronoi diagrams is not easy, in general. A trivial upper bound for the number of linear regions is km, which corresponds to the case where all intersections of regions of different units are different from each other. We will give a better bound in Proposition 8. Now, for the purpose of computing lower bounds, here it will be sufficient to consider certain well-behaved special cases. One simple example is the division of input-space by k−1 parallel hyperplanes. If m ≤n, we can consider the arrangement of hyperplanes Hi = {x ∈Rn: xj = i} for i = 1,...,k −1, for each maxout unit j ∈[m]. In this case, the number of regions is km. If m > n, the same arguments yield kn regions. Proposition 8. The maximal number of regions of a single layer maxout network with n inputs and m outputs of rank k is lower bounded by kmin{n,m} and upper bounded by min{Pn j=0 k2m j  ,km}. Now we take a look at the deep maxout model. Note that a rank-2 maxout layer can be simulated by a rectifier layer with twice as many units. Then, by the results from the last section, a rank-2 maxout network with L −1 hidden layers of width n = n0 can identify 2n0(L−1) input-space regions, and, in turn, it can compute functions with 2n0(L−1)2n0 = 2n0L linear regions. For the rank-k case, we note that a rank-k maxout unit can identify k cones from its input-domain, whereby each cone is a neighborhood of the positive half-ray {rWi ∈Rn: r ∈R+} corresponding to the gradient Wi of the linear function fi for all i ∈[k]. Elaborating this observation, we obtain: Theorem 9. A maxout network with L layers of width n0 and rank k can compute functions with at least kL−1kn0 linear regions. Theorem 9 and Proposition 8 show that deep maxout networks can compute functions with a number of linear regions that grows exponentially with the number of layers, and exponentially faster than the maximal number of regions of shallow models with the same number of units. Similarly to the rectifier model, this exponential behavior can also be established with respect to the number of network parameters. We note that although certain functions that can be computed by maxout layers can also be computed by rectifier layers, the rectifier construction from last section leads to functions that are not computable by maxout networks (except in the rank-2 case). The proof of Theorem 9 is based on the same general arguments from Sec. 2, but uses a different construction than Theorem 5 (details in the Supplementary Material). 5 Conclusions and Outlook We studied the complexity of functions computable by deep feedforward neural networks in terms of their number of linear regions. We specifically focused on deep neural networks having piecewise linear hidden units which have been found to provide superior performance in many machine learning applications recently. We discussed the idea that each layer of a deep model is able to identify pieces of its input in such a way that the composition of layers identifies an exponential number of input regions. This results in exponentially replicating the complexity of the functions computed in the higher layers. The functions computed in this way by deep models are complicated, but still they have an intrinsic rigidity caused by the replications, which may help deep models generalize to unseen samples better than shallow models. This framework is applicable to any neural network that has a piecewise linear activation function. For example, if we consider a convolutional network with rectifier units, as the one used in (Krizhevsky et al. 2012), we can see that the convolution followed by max pooling at each layer identifies all patches of the input within a pooling region. This will let such a deep convolutional neural network recursively identify patches of the images of lower layers, resulting in exponentially many linear regions of the input space. The structure of the linear regions depends on the type of units, e.g., hyperplane arrangements for shallow rectifier vs. Voronoi diagrams for shallow maxout networks. The pros and cons of each type of constraint will likely depend on the task and are not easily quantifiable at this point. As for the number of regions, in both maxout and rectifier networks we obtain an exponential increase with depth. However, our bounds are not conclusive about which model is more powerful in this respect. This is an interesting question that would be worth investigating in more detail. The parameter space of a given network is partitioned into the regions where the resulting functions have corresponding linear regions. The combinatorics of such structures is in general hard to compute, even for simple hyperplane arrangements. One interesting question for future analysis is whether many regions of the parameter space of a given network correspond to functions which have a given number of linear regions. 8 References M. Anthony and P. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. D. Ciresan, U. Meier, J. Masci, and J. Schmidhuber. Multi column deep neural network for traffic sign classification. Neural Networks, 32:333–338, 2012. G. Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals and Systems, 2(4):303–314, 1989. O. Delalleau and Y. Bengio. Shallow vs. deep sum-product networks. In NIPS, 2011. X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011. I. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In Proc. 30th International Conference on Machine Learning, pages 1319–1327, 2013. G. Hinton, L. Deng, G. E. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 29(6):82–97, Nov. 2012. K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2:359–366, 1989. O. Krause, A. Fischer, T. Glasmachers, and C. Igel. Approximation properties of DBNs with binary hidden units and real-valued visible units. In Proc. 30th International Conference on Machine Learning, pages 419–426, 2013. A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. N. Le Roux and Y. Bengio. Deep belief networks are compact universal approximators. Neural Computation, 22(8):2192–2207, Aug. 2010. G. Mont´ufar. Universal approximation depth and errors of narrow belief networks with discrete units. Neural Computation, 26, July 2014. G. Mont´ufar and N. Ay. Refinements of universal approximation results for deep belief networks and restricted Boltzmann machines. Neural Computation, 23(5):1306–1319, May 2011. V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In Proc. 27th International Conference on Machine Learning, pages 807–814, 2010. R. Pascanu and Y. Bengio. Revisiting natural gradient for deep networks. In International Conference on Learning Representations, 2014. R. Pascanu, G. Mont´ufar, and Y. Bengio. On the number of response regions of deep feed forward networks with piece-wise linear activations. arXiv:1312.6098, Dec. 2013. R. Stanley. An introduction to hyperplane arrangements. In Lect. notes, IAS/Park City Math. Inst., 2004. J. Susskind, A. Anderson, and G. E. Hinton. The Toronto face dataset. Technical Report UTML TR 2010-001, U. Toronto, 2010. T. Zaslavsky. Facing Up to Arrangements: Face-Count Formulas for Partitions of Space by Hyperplanes. Number 154 in Memoirs of the American Mathematical Society. American Mathematical Society, Providence, RI, 1975. M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. arXiv:1311.2901, 2013. 9
2014
23
5,325
Generalized Higher-Order Orthogonal Iteration for Tensor Decomposition and Completion Yuanyuan Liu†, Fanhua Shang‡∗, Wei Fan§, James Cheng‡, Hong Cheng† †Dept. of Systems Engineering and Engineering Management, The Chinese University of Hong Kong ‡Dept. of Computer Science and Engineering, The Chinese University of Hong Kong §Huawei Noah′s Ark Lab, Hong Kong {yyliu, hcheng}@se.cuhk.edu.hk {fhshang, jcheng}@cse.cuhk.edu.hk david.fanwei@huawei.com Abstract Low-rank tensor estimation has been frequently applied in many real-world problems. Despite successful applications, existing Schatten 1-norm minimization (SNM) methods may become very slow or even not applicable for large-scale problems. To address this difficulty, we therefore propose an efficient and scalable core tensor Schatten 1-norm minimization method for simultaneous tensor decomposition and completion, with a much lower computational complexity. We first induce the equivalence relation of Schatten 1-norm of a low-rank tensor and its core tensor. Then the Schatten 1-norm of the core tensor is used to replace that of the whole tensor, which leads to a much smaller-scale matrix SNM problem. Finally, an efficient algorithm with a rank-increasing scheme is developed to solve the proposed problem with a convergence guarantee. Extensive experimental results show that our method is usually more accurate than the state-of-the-art methods, and is orders of magnitude faster. 1 Introduction There are numerous applications of higher-order tensors in machine learning [22, 29], signal processing [10, 9], computer vision [16, 17], data mining [1, 2], and numerical linear algebra [14, 21]. Especially with the rapid development of modern computing technology in recent years, tensors are becoming ubiquitous such as multi-channel images and videos, and have become increasingly popular [10]. Meanwhile, some values of their entries may be missing due to the problems in acquisition process, loss of information or costly experiments [1]. Low-rank tensor completion (LRTC) has been successfully applied to a wide range of real-world problems, such as visual data [16, 17], EEG data [9] and hyperspectral data analysis [9], and link prediction [29]. Recently, sparse vector recovery and low-rank matrix completion (LRMC) has been intensively studied [6, 5]. Especially, the convex relaxation (the Schatten 1-norm, also known as the trace norm or the nuclear norm [7]) has been used to approximate the rank of matrices and leads to a convex optimization problem. Compared with matrices, tensor can be used to express more complicated intrinsic structures of higher-order data. Liu et al. [16] indicated that LRTC methods utilize all information along each dimension, while LRMC methods only consider the constraints along two particular dimensions. As the generalization of LRMC, LRTC problems have drawn lots of attention from researchers in past several years [10]. To address the observed tensor with missing data, some weighted least-squares methods [1, 8] have been successfully applied to EEG data analysis, nature ∗Corresponding author. 1 and hyperspectral images inpainting. However, they are usually sensitive to the given ranks due to their least-squares formulations [17]. Liu et al. [16] and Signorette et al. [23] first extended the Schatten 1-norm regularization for the estimation of partially observed low-rank tensors. In other words, the LRTC problem is converted into a convex combination of the Schatten 1-norm minimization (SNM) of the unfolding along each mode. Some similar algorithms can also be found in [17, 22, 25]. Besides these approaches described above, a number of variations [18] and alternatives [20, 28] have been discussed in the literature. In addition, there are some theoretical developments that guarantee the reconstruction of a low-rank tensor from partial measurements by solving the SNM problem under some reasonable conditions [24, 25, 11]. Although those SNM algorithms have been successfully applied in many real-world applications, them suffer from high computational cost of multiple SVDs as O(NIN+1), where the assumed size of an N-th order tensor is I × I × · · · × I. We focus on two major challenges faced by existing LRTC methods, the robustness of the given ranks and the computational efficiency. We propose an efficient and scalable core tensor Schatten 1-norm minimization method for simultaneous tensor decomposition and completion, which has a much lower computational complexity than existing SNM methods. In other words, our method only involves some much smaller unfoldings of the core tensor replacing that of the whole tensor. Moreover, we design a generalized Higher-order Orthogonal Iteration (gHOI) algorithm with a rankincreasing scheme to solve our model. Finally, we analyze the convergence of our algorithm and bound the gap between the resulting solution and the ground truth in terms of root mean square error. 2 Notations and Background The mode-n unfolding of an Nth-order tensor X ∈RI1×···×IN is a matrix denoted by X(n) ∈ RIn×Πj̸=nIj that is obtained by arranging the mode-n fibers to be the columns of X(n). The Kronecker product of two matrices A ∈Rm×n and B ∈Rp×q is an mp × nq matrix given by A⊗B = [aijB]mp×nq. The mode-n product of a tensor X ∈RI1×···×IN with a matrix U ∈RJ×In is defined as (X ×n U)i1···in−1jin+1···iN = ∑In in=1 xi1i2···iN ujin. 2.1 Tensor Decompositions and Ranks The CP decomposition approximates X by ∑R i=1 a1 i ◦a2 i ◦· · · ◦aN i , where R > 0 is a given integer, an i ∈RIn, and ◦denotes the outer product of vectors. The rank of X is defined as the smallest value of R such that the approximation holds with equality. Computing the rank of the given tensor is NP-hard in general [13]. Fortunately, the n-rank of a tensor X is efficient to compute, and it consists of the matrix ranks of all mode unfoldings of the tensor. Given the n-rank(X), the Tucker decomposition decomposes a tensor X into a core tensor multiplied by a factor matrix along each mode as follows: X = G ×1 U1 ×2 · · · ×N UN. Since the ranks Rn (n = 1, · · · , N) are in general much smaller than In, the storage of the Tucker decomposition form can be significantly smaller than that of the original tensor. In [8], the weighted Tucker decomposition model for LRTC is min G, {Un} ∥W ⊙(T −G ×1 U1 ×2 · · · ×N UN)∥2 F , (1) where the symbol ⊙denotes the Hadamard (elementwise) product, W is a nonnegative weight tensor with the same size as T : wi1,i2,··· ,iN = 1 if (i1, i2, · · · , iN) ∈Ωand wi1,i2,··· ,iN = 0 otherwise, and the elements of T in the set Ωare given while the remaining entries are missing. 2.2 Low-Rank Tensor Completion For the LRTC problem, Liu et al. [16] and Signoretto et al. [23] proposed an extension of LRMC concept to tensor data as follows: min X N ∑ n=1 αn∥X(n)∥∗, s.t., PΩ(X) = PΩ(T ), (2) where ∥X(n)∥∗denotes the Schatten 1-norm of the unfolding X(n), i.e., the sum of its singular values, αn’s are pre-specified weights, and PΩkeeps the entries in Ωand zeros out others. Gandy 2 et al. [9] presented an unweighted model, i.e., αn = 1, n = 1, . . . , N. In addition, Tomioka and Suzuki [24] proposed a latent approach for LRTC problems: min {Xn} N ∑ n=1 ∥(Xn)(n)∥∗+ λ 2 ∥PΩ( N ∑ n=1 Xn) −PΩ(T )∥2 F . (3) In fact, each mode-n unfolding X(n) shares the same entries and cannot be optimized independently. Therefore, we need to apply variable splitting and introduce a separate variable to each unfolding of the tensor X or Xn. However, all algorithms have to be solved iteratively and involve multiple SVDs of very large matrices in each iteration. Hence, they suffer from high computational cost and are even not applicable for large-scale problems. 3 Core Tensor Schatten 1-Norm Minimization The existing SNM algorithms for solving the problems (2) and (3) suffer high computational cost, thus they have a bad scalability. Moreover, current tensor decomposition methods require explicit knowledge of the rank to gain a reliable performance. Motivated by these, we propose a scalable model and then achieve a smaller-scale matrix Schatten 1-norm minimization problem. 3.1 Formulation Definition 1. The Schatten 1-norm of an Nth-order tensor X ∈RI1×···×IN is the sum of the Schatten 1-norms of its different unfoldings X(n), i.e., ∥X∥∗= N ∑ n=1 ∥X(n)∥∗, (4) where ∥X(n)∥∗denotes the Schatten 1-norm of the unfolding X(n). For the imbalance LRTC problems, the Schatten 1-norm of the tensor can be incorporated by some pre-specified weights, αn, n = 1, . . . N. Furthermore, we have the following theorem. Theorem 1. Let X ∈RI1×···×IN with n-rank=(R1, · · · , RN) and G ∈RR1×···×RN satisfy X = G ×1 U1 ×2 · · · ×N UN, and Un ∈St(In, Rn), n = 1, 2, · · · , N, then ∥X∥∗= ∥G∥∗, (5) where ∥X∥∗denotes the Schatten 1-norm of the tensor X and St(In, Rn) = {U ∈RIn×Rn : U T U = IRn} denotes the Stiefel manifold. Please see Appendix A of the supplementary material for the detailed proof of the theorem. The core tensor G with size (R1, R2, · · · , RN) has much smaller size than the observed tensor T (usually Rn ≪In, n = 1, 2, · · · , N). According to Theorem 1, our Schatten 1-norm minimization problem is formulated into the following form: min G,{Un},X N ∑ n=1 ∥G(n)∥∗+ λ 2 ∥X −G ×1 U1 · · · ×N UN∥2 F , s.t., PΩ(X) = PΩ(T ), Un ∈St(In, Rn), n = 1, · · · , N. (6) Our tensor decomposition model (6) alleviates the SVD computation burden of much larger unfolded matrices in (2) and (3). Furthermore, we use the Schatten 1-norm regularization term in (6) to promote the robustness of the rank while the Tucker decomposition model (1) is usually sensitive to the given rank-(r1, r2, · · · , rN) [17]. In addition, several works [12, 27] have provided some matrix rank estimation strategies to compute some values (r1, r2, · · · , rN) for the n-rank of the involved tensor. In this paper, we only set some relatively large integers (R1, R2, · · · , RN) such that Rn ≥rn for all n = 1, · · · , N. Different from (2) and (3), some smaller matrices Vn ∈RRn×Πj̸=nRj (n = 1, · · · , N) are introduced into (6) as the auxiliary variables, and then our model (6) is reformulated into the following equivalent form: min G,{Un},{Vn},X N ∑ n=1 ∥Vn∥∗+ λ 2 ∥X −G ×1 U1 · · · ×N UN∥2 F , s.t., PΩ(X) = PΩ(T ), Vn = G(n), Un ∈St(In, Rn), n = 1, · · · , N. (7) 3 In the following, we will propose an efficient gHOI algorithm based on alternating direction method of multipliers (ADMM) to solve the problem (7). ADMM decomposes a large problem into a series of smaller subproblems, and coordinates the solutions of subproblems to compute the optimal solution. In recent years, it has been shown in [3] that ADMM is very efficient for some convex or non-convex optimization problems in various applications. 3.2 A gHOI Algorithm with Rank-Increasing Scheme The proposed problem (7) can be solved by ADMM. Its partial augmented Lagrangian function is Lµ = N ∑ n=1 (∥Vn∥∗+ ⟨Yn, G(n) −Vn⟩+ µ 2 ∥G(n) −Vn∥2 F ) + λ 2 ∥X −G ×1 U1 ×2 · · · ×N UN∥2 F , (8) where Yn, n = 1, · · · , N, are the matrices of Lagrange multipliers, and µ > 0 is a penalty parameter. ADMM solves the proposed problem (7) by successively minimizing the Lagrange function Lµ over {G, U1, · · · , UN, V1, · · · , VN, X}, and then updating {Y1, · · · , YN}. Updating {U k+1 1 , · · · , U k+1 N , Gk+1}: The optimization problem with respect to {U1, · · · , UN} and G is formulated as follows: min G, {Un∈St(In,rn)} N ∑ n=1 µk 2 ∥G(n) −V k n + Y k n /µk∥2 F + λ 2 ∥X k −G ×1 U1 · · · ×N UN∥2 F , (9) where rn is an underestimated rank (rn ≤Rn), and is dynamically adjusted by using the following rank-increasing scheme. Different from HOOI in [14], we will propose a generalized higher-order orthogonal iteration scheme to solve the problem (9) in Section 3.3. Updating {V k+1 1 , · · · , V k+1 N }: With keeping all the other variables fixed, V k+1 n is updated by solving the following problem: min Vn ∥Vn∥∗+ µk 2 ∥Gk+1 (n) −Vn + Y k n /µk∥2 F . (10) For solving the problem (10), the spectral soft-thresholding operation [4] is considered as a shrinkage operation on the singular values and is defined as follows: V k+1 n = prox1/µk(Mn) := Udiag(max{σ −1 µk , 0})V T , (11) where Mn = Gk+1 (n) + Y k n /µk, max{·, ·} should be understood element-wise, and Mn = Udiag(σ)V T is the SVD of Mn. Here, only some matrices Mn of smaller size in (11) need to perform SVD. Thus, this updating step has a significantly lower computational complexity O(∑ n R2 n × Πj̸=nRj) at worst while the computational complexity of the convex SNM algorithms for both problems (2) and (3) is O(∑ n I2 n ×Πj̸=nIj) at each iteration. Updating X k+1: The optimization problem with respect to X is formulated as follows: min X ∥X −Gk+1 ×1 U k+1 1 · · · ×N U k+1 N ∥2 F , s.t., PΩ(X) = PΩ(T ). (12) By deriving simply the KKT conditions for (12), the optimal solution X is given by X k+1 = PΩ(T ) + PΩc(Gk+1 ×1 U k+1 1 · · · ×N U k+1 N ), (13) where Ωc is the complement of Ω, i.e., the set of indexes of the unobserved entries. Rank-increasing scheme: The idea of interlacing fixed-rank optimization with adaptive rank-adjusting schemes has appeared recently in the particular context of matrix completion [27, 28]. It is here extended to our algorithm for solving the proposed problem. Let U k+1 = (U k+1 1 , U k+1 2 , . . . , U k+1 N ), V k+1 = (V k+1 1 , V k+1 2 , . . . , V k+1 N ), and Y k+1 = (Y k+1 1 , Y k+1 2 , . . . , Y k+1 N ). Considering the fact Lµk(X k+1, Gk+1, U k+1, V k+1, Y k) ≤ Lµk(X k, Gk, U k, V k, Y k), our rank-increasing scheme starts rn such that rn ≤Rn. We increase rn to min(rn + △rn, Rn) at iteration k + 1 if 1 −Lµk(X k+1, Gk+1, U k+1, V k+1, Y k) Lµk(X k, Gk, U k, V k, Y k) ≤ϵ, (14) 4 Algorithm 1 Solving problem (7) via gHOI Input: PΩ(T ), (R1, · · · , RN), λ and tol. 1: while not converged do 2: Update U k+1 n , Gk+1, V k+1 n and X k+1 by (18), (20), (11) and (13), respectively. 3: Apply the rank-increasing scheme. 4: Update the multiplier Y k+1 n by Y k+1 n = Y k n + µk(Gk+1 (n) −V k+1 n ), n = 1, . . . , N. 5: Update the parameter µk+1 by µk+1 = min(ρµk, µmax). 6: Check the convergence condition, max(∥Gk+1 (n) −V k+1 n ∥2 F , n = 1, . . . , N) < tol. 7: end while Output: X, G, and Un, n = 1, · · · , N. which △rn is a positive integer and ϵ is a small constant. Moreover, we augment U k+1 n ←[U k n, bUn] where bHn has △rn randomly generated columns, bUn = (I −U k n(U k n)T ) bHn, and then orthonormalize bUn. Let Vn = refold(V k n ) ∈Rr1×···×rN , and Wn ∈R(r1+△r1)×···×(rN+△rN) be augmented as follows: (Wn)i1,··· ,iN = (Vn)i1,··· ,iN for all it ≤rt and t ∈[1, N], and (Wn)i1,··· ,iN = 0 otherwise, where refold(·) denotes the refolding of the matrix into a tensor and unfold(·) is the unfolding operator. Hence, we set V k n = unfold(Wn) and update Y k n by the same way. We then update the involved variables Gk+1, V k+1 n and X k+1 by (20), (11) and (13), respectively. Summarizing the analysis above, we develop an efficient gHOI algorithm for solving the tensor decomposition and completion problem (7), as outlined in Algorithm 1. Our algorithm in essence is the Gauss-Seidel version of ADMM. The update strategy of Jacobi ADMM can easily be implemented, thus our gHOI algorithm is well suited for parallel and distributed computing and hence is particularly attractive for solving certain large-scale problems [21]. Algorithm 1 can be accelerated by adaptively changing µ as in [15]. 3.3 Generalized Higher-Order Orthogonal Iteration We propose a generalized HOOI scheme for solving the problem (9), where the conventional HOOI model in [14] can be seen as a special case of the problem (9) when µk = 0. Therefore, we extend Theorem 4.2 in [14] to solve the problem (9) as follows. Theorem 2. Assume a real Nth-order tensor X, then the minimization of the following cost function f(G, U1, . . . , UN) = N ∑ n=1 µk 2 ∥G(n) −V k n + Y k n /µk∥2 F + λ 2 ∥X k −G ×1 U1 · · · ×N UN∥2 F is equivalent to the maximization, over the matrices U1, U2, . . . , UN having orthonormal columns, of the function g(U1, U2, . . . , UN) = ∥λM + µkN∥2 F , (15) where M = X k ×1 (U1)T · · · ×N (UN)T and N = ∑N n=1 refold(V k n −Y k n /µk). Please see Appendix B of the supplementary material for the detailed proof of the theorem. Updating {U k+1 1 , · · · , U k+1 N }: According to Theorem 2, our generalized HOOI scheme successively solves Un, n = 1, . . . , N with fixing other variables Uj, j ̸= n. Imagine that the matrices {U1, . . . , Un−1, Un+1, . . . , UN} are fixed and that the optimization problem (15) is thought of as a quadratic expression in the components of the matrix Un that is being optimized. Considering that the matrix has orthonormal columns, we have max Un∈St(In,rn) ∥λMn ×n U T n + µkN∥2 F , (16) where Mn = X k ×1 (U k+1 1 )T · · · ×n−1 (U k+1 n−1)T ×n+1 (U k n+1)T · · · ×N (U k N)T . (17) This is actually the well-known orthogonal procrustes problem [19], whose optimal solution is given by the singular value decomposition of (Mn)(n)N T (n), i.e., U k+1 n = U (n)(V (n))T , (18) 5 where U (n) and V (n) are obtained by the skinny SVD of (Mn)(n)N T (n). Repeating the procedure above for different modes leads to an alternating orthogonal procrustes scheme for solving the maximization of the problem (16). For any estimate of those factor matrices Un, n = 1, . . . , N, the optimal solution to the problem (9) with respect to G is updated in the following. Updating Gk+1: The optimization problem (9) with respect to G can be rewritten as follows: min G N ∑ n=1 µk 2 ∥G(n) −V k n + Y k n /µk∥2 F + λ 2 ∥X k −G ×1 U k+1 1 · · · ×N U k+1 N ∥2 F . (19) (19) is a smooth convex optimization problem, thus we can obtain a closed-form solution, Gk+1 = λ λ + Nµk X k ×1 (U k+1 1 )T · · · ×N (U k+1 N )T + µk λ + Nµk N ∑ n=1 refold(V k n −Y k n /µk). (20) 4 Theoretical Analysis In the following we first present the convergence analysis of Algorithm 1. 4.1 Convergence Analysis Theorem 3. Let (Gk, {U k 1 , . . . , U k N}, {V k 1 , . . . , V k N}, X k) be a sequence generated by Algorithm 1, then we have the following conclusions: (I) (Gk, {U k 1 , . . . , U k N}, {V k 1 , . . . , V k N}, X k) are Cauchy sequences, respectively. (II) If limk→∞µk(V k+1 n −V k n ) = 0, n = 1, · · · , N, then (Gk, {U k 1 , . . . , U k N}, X k) converges to a KKT point of the problem (6). The proof of the theorem can be found in Appendix C of the supplementary material. 4.2 Recovery Guarantee We will show that when sufficiently many entries are sampled, the KKT point of Algorithm 1 is stable, i.e., it recovers a tensor “close to” the ground-truth one. We assume that the observed tensor T ∈RI1×I2···×IN can be decomposed as a true tensor D with rank-(r1, r2, . . . , rN) and a random gaussian noise E whose entries are independently drawn from N(0, σ2), i.e., T = D + E. For convenience, we suppose I1 = · · · = IN = I and r1 = . . . = rN = r. Let the recovered tensor A = G×1U1× . . .×N UN, the root mean square error (RMSE) is a frequently used measure of the difference between the recovered tensor and the true one: RMSE := 1 √ IN ∥D −A∥F . [25] analyzes the statistical performance of the convex tensor Schatten 1-norm minimization problem with the general linear operator X : RI1×...×IN →Rm. However, our model (6) is non-convex for the LRTC problem with the operator PΩ. Thus, we follow the sketch of the proof in [26] to analyze the statistical performance of our model (6). Definition 2. The operator PS is defined as follows: PS(X) = PUN · · · PU1(X), where PUn(X) = X×n(UnU T n ). Theorem 4. Let (G, U1, U2, . . . , UN) be a KKT point of the problem (6) with given ranks R1 = · · · = RN = R. Then there exists an absolute constant C (please see Supplementary Material), such that with probability at least 1 −2 exp(−IN−1), RMSE ≤∥E∥F √ IN + Cβ (IN−1R log(IN−1) |Ω| ) 1 4 + N √ R C1λ √ |Ω| , (21) where β = maxi1,··· ,iN |Ti1,··· ,iN | and C1 = ∥PSPΩ(T −A)∥F ∥PΩ(T −A)∥F . The proof of the theorem and the analysis of lower-boundedness of C1 can be found in Appendix D of the supplementary material. Furthermore, our result can also be extended to the general linear operator X , e.g., the identity operator (i.e., tensor decomposition problems). Similar to [25], we assume that the operator satisfies the following restricted strong convexity (RSC) condition. 6 Table 1: RSE and running time (seconds) comparison on synthetic tensor data: (a) Tensor size: 30×30×30×30×30 WTucker WCP FaLRTC Latent gHOI SR RSE±std. Time RSE±std. Time RSE±std. Time RSE±std. Time RSE±std. Time 10% 0.4982±2.3e-2 2163.05 0.5003±3.6e-2 4359.23 0.6744±2.7e-2 1575.78 0.6268±5.0e-2 8324.17 0.2537±1.2e-2 159.43 30% 0.1562±1.7e-2 2226.67 0.3364±2.3e-2 3949.57 0.3153±1.4e-2 1779.59 0.2443±1.2e-2 8043.83 0.1206±6.0e-3 143.86 50% 0.0490±9.3e-3 2652.90 0.0769±5.0e-3 3260.86 0.0365±6.2e-4 2024.52 0.0559±7.7e-3 8263.24 0.0159±1.3e-3 135.60 (b) Tensor size: 60 × 60 × 60 × 60 WTucker WCP FaLRTC Latent gHOI SR RSE±std. Time RSE±std. Time RSE±std. Time RSE±std. Time RSE±std. Time 10% 0.2319±3.6e-2 1437.61 0.4766±9.4e-2 1586.92 0.4927±1.6e-2 562.15 0.5061±4.4e-2 5075.82 0.1674±3.4e-3 60.53 30% 0.0143±2.8e-3 1756.95 0.1994±6.0e-3 1696.27 0.1694±2.5e-3 603.49 0.1872±7.5e-3 5559.17 0.0076±6.5e-4 57.19 50% 0.0079±6.2e-4 2534.59 0.1335±4.9e-3 1871.38 0.0602±5.8e-4 655.69 0.0583±9.7e-4 6086.63 0.0030±1.7e-4 55.62 Definition 3 (RSC). We suppose that there is a positive constant κ(X ) such that the operator X : RI1×...×IN →Rm satisfies the inequality 1 m∥X (△)∥2 2 ≥κ(X )∥△∥2 F , where △∈RI1×...×IN is an arbitrary tensor. Theorem 5. Assume the operator X satisfies the RSC condition with a constant κ(X ) and the observations y = X (D) + ε. Let (G, U1, U2, . . . , UN) be a KKT point of the following problem with given ranks R1 = · · · = RN = R, min G, {Un∈St(In,Rn)} N ∑ n=1 ∥G(n)∥∗+ λ 2 ∥y −X (G×1U1× · · ·×N UN)∥2 2. (22) Then RMSE ≤ ∥ε∥2 √ mκ(X )IN + N √ R C2λ √ mκ(X )IN , (23) where C2 = ∥PSX ∗(y−X (A))∥F ∥y−X (A)∥2 and X ∗denotes the adjoint operator of X . The proof of the theorem can be found in Appendix E of the supplementary material. 5 Experiments 5.1 Synthetic Tensor Completion Following [17], we generated a low-n-rank tensor T ∈RI1×I2×···×IN which we used as the ground truth data. The order of the tensors varies from three to five, and r is set to 10. Furthermore, we randomly sample a few entries from T and recover the whole tensor with various sampling ratios (SRs) by our gHOI method and the state-of-the-art LRTC algorithms including WTucker [8], WCP [1], FaLRTC [17], and Latent [24]. The relative square error (RSE) of the recovered tensor X for all these algorithms is defined by RSE := ∥X −T ∥F /∥T ∥F . The average results (RSE and running time) of 10 independent runs are shown in Table 1, where the order of tensor data varies from four to five. It is clear that our gHOI method consistently yields much more accurate solutions, and outperforms the other algorithms in terms of both RSE and efficiency. Moreover, we present the running time of our gHOI method and the other methods with varying sizes of third-order tensors, as shown in Fig. 1(a). We can see that the running time of WTcuker, WCP, Latent and FaLRTC dramatically grows with the increase of tensor size whereas that of our gHOI method only increases slightly. This shows that our gHOI method has very good scalability and can address large-scale problems. To further evaluate the robustness of our gHOI method with respect to the given tensor rank changes, we conduct some experiments on the synthetic data of size 100 × 100 × 100, and illustrate the recovery results of all methods with 20% SR, where the rank parameter of gHOI, WTucker and WCP is chosen from {10, 15, · · · , 40}. The average RSE results of 10 independent runs are shown in Fig. 1(b), from which we can see that our gHOI method performs much more robust than both WTucker and WCP. 7 200 400 600 800 1000 10 2 10 4 Size of tensors Time (seconds) WTucker WCP FaLRTC Latent gHOI (a) 10 20 30 40 0 0.05 0.1 0.15 0.2 0.25 Rank RSE WTucker WCP FaLRTC Latent gHOI (b) 0.2 0.4 0.6 0.8 10 2 10 3 Sampling rates Time (seconds) WTucker FaLRTC Latent gHOI (c) 0.2 0.4 0.6 0.8 0 0.1 0.2 0.3 0.4 0.5 Sampling rates RSE WTucker FaLRTC Latent gHOI (d) Figure 1: Comparison of all these methods in terms of computational time (in seconds and in logarithmic scale) and RSE on synthetic third-order tensors by varying tensor sizes (a) or given ranks (b), and the BRAINIX data set: running time (c) and RSE (d). (a) Original (b) 30% SR (c) RSE: 0.2693 (d) RSE: 0.3005 (e) RSE: 0.2858 (f) RSE: 0.2187 Figure 2: The recovery results on the BRAINIX data set with 30% SR: (c)-(e) The results of WTucker, FaLRTC, Latent and gHOI, respectively (Best viewed zoomed in). 5.2 Medical Images Inpainting In this part, we apply our gHOI method for medical image inpainting problems on the BRAINIX data set1. The recovery results on one randomly chosen image with 30% SR are illustrated in Fig. 2. Moreover, we also present the recovery accuracy (RSE) and running time (seconds) with varying SRs, as shown in Fig. 1(c) and (d). From these results, we can observe that our gHOI method consistently performs better than the other methods in terms of both RSE and efficiency. Especially, gHOI is about 20 times faster than WTucker and FaLRTC, and more than 90 times faster than Latent, when the sample percentage is 10%. By increasing the sampling rate, the RSE results of three Schatten 1-norm minimization methods including Latent, FaLRTC and gHOI, dramatically reduce. In contrast, the RSE of WTucker decreases slightly. 6 Conclusions We proposed a scalable core tensor Schatten 1-norm minimization method for simultaneous tensor decomposition and completion. First, we induced the equivalence relation of the Schatten 1-norm of a low-rank tensor and its core tensor. Then we formulated a tractable Schatten 1-norm regularized tensor decomposition model with missing data, which is a convex combination of multiple much smaller-scale matrix SNM. Finally, we developed an efficient gHOI algorithm to solve our problem. Moreover, we also provided the convergence analysis and recovery guarantee of our algorithm. The convincing experimental results verified the efficiency and effectiveness of our gHOI algorithm. gHOI is significantly faster than the state-of-the-art LRTC methods. In the future, we will apply our gHOI algorithm to address a variety of robust tensor recovery and completion problems, e.g., higher-order RPCA [10] and robust LRTC. Acknowledgments This research is supported in part by SHIAE Grant No. 8115048, MSRA Grant No. 6903555, GRF No. 411211, CUHK direct grant Nos. 4055015 and 4055017, China 973 Fundamental R&D Program, No. 2014CB340304, and Huawei Grant No. 7010255. 1http://www.osirix-viewer.com/datasets/ 8 References [1] E. Acar, D. Dunlavy, T. Kolda, and M. Mørup. Scalable tensor factorizations with missing data. In SDM, pages 701–711, 2010. [2] A. Anandkumar, D. Hsu, M. Janzamin, and S. Kakade. When are overcomplete topic models identifiable? uniqueness of tensor Tucker decompositions with structured sparsity. In NIPS, pages 1986–1994, 2013. [3] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. Learn., 3(1):1–122, 2011. [4] J. Cai, E. Cand`es, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM J. Optim., 20(4):1956–1982, 2010. [5] E. Cand`es and B. Recht. Exact matrix completion via convex optimization. Found. Comput. Math., 9(6):717–772, 2009. [6] E. Cand`es, J. Romberg, and T. Tao. Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inform. Theory, 52(2):489–509, 2006. [7] M. Fazel. Matrix Rank Minimization with Applications. PhD thesis, Stanford University, 2002. [8] M. Filipovic and A. Jukic. Tucker factorization with missing data with application to low-n-rank tensor completion. Multidim. Syst. Sign. Process., 2014. [9] S. Gandy, B. Recht, and I. Yamada. Tensor completion and low-n-rank tensor recovery via convex optimization. Inverse Problem, 27(2), 2011. [10] D. Goldfarb and Z. Qin. Robust low-rank tesnor recovery: Models and algorithms. SIAM J. Matrix Anal. Appl., 35(1):225–253, 2014. [11] B. Huang, C. Mu, D. Goldfarb, and J. Wright. Provable low-rank tensor recovery. In OptimizationOnline:4252, 2014. [12] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. IEEE Trans. Inform. Theory, 56(6):2980–2998, 2010. [13] T. Kolda and B. Bader. Tensor decompositions and applications. SIAM Review, 51(3):455–500, 2009. [14] L. Lathauwer, B. Moor, and J. Vandewalle. On the best rank-1 and rank-(r1,r2,...,rn) approximation of high-order tensors. SIAM J. Matrix Anal. Appl., 21(4):1324–1342, 2000. [15] Z. Lin, R. Liu, and Z. Su. Linearized alternating direction method with adaptive penalty for low-rank representation. In NIPS, pages 612–620, 2011. [16] J. Liu, P. Musialski, P. Wonka, and J. Ye. Tensor completion for estimating missing values in visual data. In ICCV, pages 2114–2121, 2009. [17] J. Liu, P. Musialski, P. Wonka, and J. Ye. Tensor completion for estimating missing values in visual data. IEEE Trans. Pattern Anal. Mach. Intell., 35(1):208–220, 2013. [18] C. Mu, B. Huang, J. Wright, and D. Goldfarb. Square deal: lower bounds and improved relaxations for tensor recovery. In ICML, pages 73–81, 2014. [19] H. Nick. Matrix procrustes problems. 1995. [20] B. Romera-Paredes and M. Pontil. A new convex relaxation for tensor completion. In NIPS, pages 2967–2975, 2013. [21] F. Shang, Y. Liu, and J. Cheng. Generalized higher-order tensor decomposition via parallel ADMM. In AAAI, pages 1279–1285, 2014. [22] M. Signoretto, Q. Dinh, L. Lathauwer, and J. Suykens. Learning with tensors: A framework based on covex optimization and spectral regularization. Mach. Learn., 94(3):303–351, 2014. [23] M. Signoretto, L. Lathauwer, and J. Suykens. Nuclear norms for tensors and their use for convex multilinear estimation. Technical Report 10-186, ESATSISTA, K. U. Leuven, 2010. [24] R. Tomioka and T. Suzuki. Convex tensor decomposition via structured Schatten norm regularization. In NIPS, pages 1331–1339, 2013. [25] R. Tomioka, T. Suzuki, K. Hayashi, and H. Kashima. Statistical performance of convex tensor decomposition. In NIPS, pages 972–980, 2011. [26] Y. Wang and H. Xu. Stability of matrix factorization for collaborative filtering. In ICML, 2012. [27] Z. Wen, W. Yin, and Y. Zhang. Solving a low-rank factorization model for matrix completion by a nonlinear successive over-relaxation algorithm. Math. Prog. Comp., 4(4):333–361, 2012. [28] Y. Xu, R. Hao, W. Yin, and Z. Su. Parallel matrix factorization for low-rank tensor completion. In arXiv:1312.1254, 2013. [29] Y. Yilmaz, A. Cemgil, and U. Simsekli. Generalised coupled tensor factorisation. In NIPS, pages 2151– 2159, 2011. 9
2014
230
5,326
Submodular meets Structured: Finding Diverse Subsets in Exponentially-Large Structured Item Sets Adarsh Prasad UT Austin adarsh@cs.utexas.edu Stefanie Jegelka UC Berkeley stefje@eecs.berkeley.edu Dhruv Batra Virginia Tech dbatra@vt.edu Abstract To cope with the high level of ambiguity faced in domains such as Computer Vision or Natural Language processing, robust prediction methods often search for a diverse set of high-quality candidate solutions or proposals. In structured prediction problems, this becomes a daunting task, as the solution space (image labelings, sentence parses, etc.) is exponentially large. We study greedy algorithms for finding a diverse subset of solutions in structured-output spaces by drawing new connections between submodular functions over combinatorial item sets and High-Order Potentials (HOPs) studied for graphical models. Specifically, we show via examples that when marginal gains of submodular diversity functions allow structured representations, this enables efficient (sub-linear time) approximate maximization by reducing the greedy augmentation step to inference in a factor graph with appropriately constructed HOPs. We discuss benefits, tradeoffs, and show that our constructions lead to significantly better proposals. 1 Introduction Many problems in Computer Vision, Natural Language Processing and Computational Biology involve mappings from an input space X to an exponentially large space Y of structured outputs. For instance, Y may be the space of all segmentations of an image with n pixels, each of which may take L labels, so |Y| = Ln. Formulations such as Conditional Random Fields (CRFs) [24], Max-Margin Markov Networks (M3N) [31], and Structured Support Vector Machines (SSVMs) [32] have successfully provided principled ways of scoring all solutions y ∈Y and predicting the single highest scoring or maximum a posteriori (MAP) configuration, by exploiting the factorization of a structured output into its constituent “parts”. In a number of scenarios, the posterior P(y|x) has several modes due to ambiguities, and we seek not only a single best prediction but a set of good predictions: (1) Interactive Machine Learning. Systems like Google Translate (for machine translation) or Photoshop (for interactive image segmentation) solve structured prediction problems that are often ambiguous ("what did the user really mean?"). Generating a small set of relevant candidate solutions for the user to select from can greatly improve the results. (2) M-Best hypotheses in cascades. Machine learning algorithms are often cascaded, with the output of one model being fed into another [33]. Hence, at the initial stages it is not necessary to make a single perfect prediction. We rather seek a set of plausible predictions that are subsequently re-ranked, combined or processed by a more sophisticated mechanism. In both scenarios, we ideally want a small set of M plausible (i.e., high scoring) but non-redundant (i.e., diverse) structured-outputs to hedge our bets. Submodular Maximization and Diversity. The task of searching for a diverse high-quality subset of items from a ground set V has been well-studied in information retrieval [5], sensor placement [22], document summarization [26], viral marketing [17], and robotics [10]. Across these domains, submodularity has emerged as an a fundamental and practical concept – a property of functions for measuring diversity of a subset of items. Specifically, a set function F : 2V →R is submodular if its marginal gains, F(a|S) ≡F(S∪a)−F(S) are decreasing, i.e. F(a|S) ≥F(a|T) 1 (a) Image (b) All segmentations: |V | = Ln + argmax a∈V F(a | S) ≡ r(y) d(y | S) (c) Structured Representation. Figure 1: (a) input image; (b) space of all possible object segmentations / labelings (each item is a segmentation); (c) we convert the problem of finding the item with the highest marginal gain F(a|S) to a MAP inference problem in a factor graph over base variables y with an appropriately defined HOP. for all S ⊆T and a /∈T. In addition, if F is monotone, i.e., F(S) ≤F(T), ∀S ⊆T, then a simple greedy algorithm (that in each iteration t adds to the current set St the item with the largest marginal gain F(a|St)) achieves an approximation factor of (1 −1 e) [27]. This result has had significant practical impact [21]. Unfortunately, if the number of items |V | is exponentially large, then even a single linear scan for greedy augmentation is infeasible. In this work, we study conditions under which it is feasible to greedily maximize a submodular function over an exponentially large ground set V = {v1, . . . , vN} whose elements are combinatorial objects, i.e., labelings of a base set of n variables y = {y1, y2, . . . , yn}. For instance, in image segmentation, the base variables yi are pixel labels, and each item a ∈V is a particular labeling of the pixels. Or, if each base variable ye indicates the presence or absence of an edge e in a graph, then each item may represent a spanning tree or a maximal matching. Our goal is to find a set of M plausible and diverse configurations efficiently, i.e. in time sub-linear in |V | (ideally scaling as a low-order polynomial in log |V |). We will assume F(·) to be monotone submodular, nonnegative and normalized (F(∅) = 0), and base our study on the greedy algorithm. As a running example, we focus on pixel labeling, where each base variable takes values in a set [L] = {1, . . . , L} of labels. Contributions. Our principal contribution is a conceptual one. We observe that marginal gains of a number of submodular functions allow structured representations, and this enables efficient greedy maximization over exponentially large ground sets – by reducing the greedy augmentation step to a MAP inference query in a discrete factor graph augmented with a suitably constructed HighOrder Potential (HOP). Thus, our work draws new connections between two seemingly disparate but highly related areas in machine learning – submodular maximization and inference in graphical models with structured HOPs. As specific examples, we construct submodular functions for three different, task-dependent definitions of diversity, and provide reductions to three different HOPs for which efficient inference techniques have already been developed. Moreover, we present a generic recipe for constructing such submodular functions, which may be “plugged” with efficient HOPs discovered in future work. Our empirical contribution is an efficient algorithm for producing a set of image segmentations with significantly higher oracle accuracy1 than previous works. The algorithm is general enough to transfer to other applications. Fig. 1 shows an overview of our approach. Related work: generating multiple solutions. Determinental Point Processesare an elegant probabilistic model over sets of items with a preference for diversity. Its generalization to a structured setting [23] assumes a tree-structured model, an assumption that we do not make. Guzman-Rivera et al. [14, 15] learn a set of M models, each producing one solution, to form the set of solutions. Their approach requires access to the learning sub-routine and repeated re-training of the models, which is not always possible, as it may be expensive or proprietary. We assume to be given a single (pretrained) model from which we must generate multiple diverse, good solutions. Perhaps the closest to our setting are recent techniques for finding diverse M-best solutions [2, 28] or modes [7, 8] in graphical models. While [7] and [8] are inapplicable since they are restricted to chain and tree graphs, we compare to other baselines in Section 3.2 and 4. 1.1 Preliminaries and Notation We select from a ground set V of N items. Each item is a labeling y = {y1, y2, . . . , yn} of n base variables. For clarity, we use non-bold letters a ∈V for items, and boldface letters y for base set configurations. Uppercase letters refer to functions over the ground set items F(a|A), R(a|A), D(a|A), and lowercase letters to functions over base variables f(y), r(y), d(y). 1The accuracy of the most accurate segmentation in the set. 2 Formally, there is a bijection φ : V 7→[L]m that maps items a ∈V to their representation as base variable labelings y = φ(a). For notational simplicity, we often use y ∈S to mean φ−1(y) ∈S, i.e. the item corresponding to the labeling y is present in the set S ⊆V . We write ℓ∈y if the label ℓis used in y, i.e. ∃j s.t. yj = ℓ. For a set c ⊆[n], we use yc to denote the tuple {yi | i ∈c}. Our goal to find an ordered set or list of items S ⊆V that maximizes a scoring function F. Lists generalize the notation of sets, and allow for reasoning of item order and repetitions. More details about list vs set prediction can be found in [29, 10]. Scoring Function. We trade off the relevance and diversity of list S ⊆V via a scoring function F : 2V →R of the form F(S) = R(S) + λD(S), (1) where R(S) = P a∈S R(a) is a modular nonnegative relevance function that aggregates the quality of all items in the list; D(S) is a monotone normalized submodular function that measure the diversity of items in S; and λ ≥0 is a trade-off parameter. Similar objective functions were used e.g. in [26]. They are reminiscent of the general paradigm in machine learning of combining a loss function that measures quality (e.g. training error) and a regularization term that encourages desirable properties (e.g. smoothness, sparsity, or “diversity”). Submodular Maximization. We aim to find a list S that maximizes F(S) subject to a cardinality constraint |S| ≤M. For monotone submodular F, this may be done via a greedy algorithm that starts out with S0 = ∅, and iteratively adds the next best item: St = St−1 ∪at, at ∈argmaxa∈V F(a | St−1). (2) The final solution SM is within a factor of (1 −1 e) of the optimal solution S∗: F(SM) ≥(1 − 1 e)F(S∗) [27]. The computational bottleneck is that in each iteration, we must find the item with the largest marginal gain. Clearly, if |V | has exponential size, we cannot touch each item even once. Instead, we propose “augmentation sub-routines” that exploit the structure of V and maximize the marginal gain by solving an optimization problem over the base variables. 2 Marginal Gains in Configuration Space To solve the greedy augmentation step via optimization over y, we transfer the marginal gain from the world of items to the world of base variables and derive functions on y from F: F(φ−1(y) | S) | {z } f(y|S) = R(φ−1(y)) | {z } r(y) +λ D(φ−1(y) | S) | {z } d(y|S) . (3) Maximizing F(a|S) now means maximizing f(y|S) for y = φ(a). This can be a hard combinatorial optimization problem in general. However, as we will see, there is a broad class of useful functions F for which f inherits exploitable structure, and argmaxy f(y|S) can be solved efficiently, exactly or at least approximately. Relevance Function. We use a structured relevance function R(a) that is the score of a factor graph defined over the base variables y. Let G = (V, E) be a graph defined over {y1, y2, . . . , yn}, i.e. V = [n], E ⊆ V 2  . Let C = {C | C ⊆V} be a set of cliques in the graph, and let θC : [L]|C| 7→R be the log-potential functions (or factors) for these cliques. The quality of an item a = φ−1(y) is then given by R(a) = r(y) = P C∈C θC(yC). For instance, with only node and edge factors, this quality becomes r(y) = P p∈V θp(yp) + P (p,q)∈E θpq(yp, yq). In this model, finding the single highest quality item corresponds to maximum a posteriori (MAP) inference in the factor graph. Although we refer to terms with probabilistic interpretations such as “MAP”, we treat our relevance function as output of an energy-based model [25] such as a Structured SVM [32]. For instance, r(y) = P C∈C θC(yC) = w⊺ψ(y) for parameters w and feature vector ψ(y). Moreover, we assume that the relevance function r(y) is nonnegative2. This assumption ensures that F(·) is monotone. If F is non-monotone, algorithms other than the greedy are needed [4, 12]. We leave this generalization for future work. In most application domains the relevance function is learned from data and thus our positivity assumption is not restrictive – one can simply learn a positive relevance function. For instance, in SSVMs, the relevance weights are learnt to maximize the margin between the correct labeling and all incorrect ones. We show in the supplement that SSVM parameters that assign nonnegative scores to all labelings achieve exactly the same hinge loss (and thus the same generalization error) as without the nonnegativity constraint. 2Strictly speaking, this condition is sufficient but not necessary. We only need nonnegative marginal gains. 3 (a) Label Groups (b) Hamming Ball Groups Figure 2: Diversity via groups: (a) groups defined by the presence of labels (i.e. #groups = L); (b) groups defined by Hamming balls around each item/labeling (i.e. #groups = Ln). In each case, diversity is measured by how many groups are covered by a new item. See text for details. 3 Structured Diversity Functions We next discuss a general recipe for constructing monotone submodular diversity functions D(S), and for reducing their marginal gains to structured representations over the base variables d(y|S). Our scheme relies on constructing groups Gi that cover the ground set, i.e. V = S i Gi. These groups will be defined by task-dependent characteristics – for instance, in image segmentation, Gℓ can be the set of all segmentations that contain label ℓ. The groups can be overlapping. For instance, if a segmentation y contains pixels labeled “grass” and “cow”, then y ∈Ggrass and y ∈Gcow. Group Coverage: Count Diversity. Given V and a set of groups {Gi}, we measure the diversity of a list S in terms of its group coverage, i.e., the number of groups covered jointly by items in S: D(S) =  i | Gi ∩S ̸= ∅ , (4) where we define Gi ∩S as the intersection of Gi with the set of unique items in S. It is easy to show that this function is monotone submodular. If Gℓis the group of all segmentations that contain label ℓ, then the diversity measure of a list of segmentations S is the number of object labels that appear in any a ∈S. The marginal gain is the number of new groups covered by a: D(a | S) =  i | a ∈Gi and S ∩Gi = ∅ . (5) Thus, the greedy algorithm will try to find an item/segmentation that belongs to as many as yet unused groups as possible. Group Coverage: General Diversity. More generally, instead of simply counting the number of groups covered by S, we can use a more refined decay D(S) = X i h Gi ∩S  . (6) where h is any nonnegative nondecreasing concave scalar function. This is a sum of submodular functions and hence submodular. Eqn. (4) is a special case of Eqn. (6) with h(y) = min{1, y}. Other possibilities are √·, or log(1 + ·). For this general definition of diversity, the marginal gain is D(a | S) = X i:Gi∋a  h 1 + Gi ∩S  −h Gi ∩S  . (7) Since h is concave, the gain h 1 + Gi ∩S  −h Gi ∩S  decreases as S becomes larger. Thus, the marginal gain of an item a is proportional to how rare each group Gi ∋a is in the list S. In each step of the greedy algorithm, we maximize r(y) + λd(y|S). We already established a structured representation of r(y) via a factor graph on y. In the next few subsections, we specify three example definitions of groups Gi that instantiate three diversity functions D(S). For each D(S), we show how the marginal gains D(a|S) can be expressed as a specific High-Order Potential (HOP) d(y|S) in the factor graph over y. These HOPs are known to be efficiently optimizable, and hence we can solve the augmentation step efficiently. Table 1 summarizes these connections. Diversity and Parsimony. If the groups Gi are overlapping, some y can belong to many groups simultaneously. While such a y may offer an immediate large gain in diversity, in many applications it is more natural to seek a small list of complementary labelings rather than having all labels occur in the same y. For instance, in image segmentation with groups defined by label presence (Sec. 3.1), natural scenes are unlikely to contain many labels at the same time. Instead, the labels should be spread across the selected labelings y ∈S. Hence, we include a parsimony factor p(y) that biases towards simpler labelings y. This term is a modular function and does not affect the diversity functions directly. We next outline some example instantiations of the functions (4) and (6). 4 Groups (Gi) Higher Order Potentials Section 3.1 Labels Label Cost Supplement Label Transitions Co-operative Cuts Section 3.2 Hamming Balls Cardinality Potentials Table 1: Different diversity functions and corresponding HOPs. 3.1 Diversity of Labels For the first example, let Gℓbe the set of all labelings y containing the label ℓ, i.e. y ∈Gℓif and only if yj = ℓfor some j ∈[n]. Such a diversity function arises in multi-class image segmentation – if the highest scoring segmentation contains “sky” and “grass”, then we would like to add complementary segmentations that contain an unused class label, say “sheep” or “cow”. Structured Representation of Marginal Gains. The marginal gain for this diversity function turns out to be a HOP called label cost [9]. It penalizes each label that occurs in a previous segmentation. Let lcountS(ℓ) be the number of segmentations in S that contain label ℓ. In the simplest case of coverage diversity (4), the marginal gain provides a constant reward for every as yet unseen label ℓ: d(y | S) =  ℓ| y ∈Gℓ, S ∩Gℓ= ∅ = X ℓ∈y,lcountS(ℓ)=0 1. (8) For the general group coverage diversity (6), the gain becomes d(y|S) = X ℓ:Gℓ∋y  h 1 + Gℓ∩S  −h Gℓ∩S  = X ℓ∈y  h 1 + lcountS(ℓ)  −h lcountS(ℓ)  . Thus, d(y|S) rewards the presence of a label ℓin y by an amount proportional to how rare ℓis in the segmentations already chosen in S. The parsimony factor in this setting is p(y) = P ℓ∈y c(ℓ). In the simplest case, c(ℓ) = −1, i.e. we are charged a constant for every label used in y. With this type of diversity (and parsimony terms), the greedy augmentation step is equivalent to performing MAP inference in a factor graph augmented with label reward HOPs: argmaxy r(y) + λ(d(y | S) + p(y)). Delong et al. [9] show how to perform approximate MAP inference with such label costs via an extension to the standard α-expansion [3] algorithm. Label Transitions. Label Diversity can be extended to reward not just the presence of previously unseen labels, but also the presence of previously unseen label transitions (e.g., a person in front of a car or a person in front of a house). Formally, we define one group Gℓ,ℓ′ per label pair ℓ, ℓ′, and y ∈Gℓ,ℓ′ if it contains two adjacent variables yi, yj with labels yi = ℓ, yj = ℓ′. This diversity function rewards the presence of a label pair (ℓ, ℓ′) by an amount proportional to how rare this pair is in the segmentations that are part of S. For such functions, the marginal gain d(y|S) becomes a HOP called cooperative cuts [16]. The inference algorithm in [19] gives a fully polynomial-time approximation scheme for any nondecreasing, nonnegative h, and the exact gain maximizer for the count function h(y) = min{1, y}. Further details may be found in the supplement. 3.2 Diversity via Hamming Balls The label diversity function simply rewarded the presence of a label ℓ, irrespective of which or how many variables yi were assigned that label. The next diversity function rewards a large Hamming distance Ham(y1, y2) = Pn i=1[[y1 i ̸= y2 i ]] between configurations (where [[·]] is the Iverson bracket.) Let Bk(y) denote the k-radius Hamming ball centered at y, i.e. B(y) = {y′ | Ham(y′, y) ≤k}. The previous section constructed one group per label ℓ. Now, we construct one group Gy for each configuration y, which is the k-radius Hamming ball centered at y, i.e. Gy = Bk(y). Structured Representation of Marginal Gains. For this diversity, the marginal gain d(y|S) becomes a HOP called cardinality potential [30]. For count group coverage, this becomes d(y|S) =  y′ | Gy′ ∩(S ∪y) ̸= ∅ −  y′ | Gy′ ∩S ̸= ∅ (9a) = [ y′∈S∪y Bk(y′) − [ y′∈S Bk(y′) = Bk(y) − Bk(y) ∩ h [ y′∈S Bk(y′) i , (9b) i.e., the marginal gain of adding y is the number of new configurations y′ covered by the Hamming ball centered at y. Since the size of the intersection of Bk(y) with a union of Hamming balls does not have a straightforward structured representation, we maximize a lower bound on d(y|S) instead: d(y | S) ≥dlb(y | S) ≡ Bk(y) − X y′∈S Bk(y) ∩Bk(y′) (10) 5 This lower bound dlb(y|S) overcounts the intersection in Eqn. (9b) by summing the intersections with each Bk(y′) separately. We can also interpret this lower bound as clipping the series arising from the inclusion-exclusion principle to the first-order terms. Importantly, (10) depends on y only via its Hamming distance to y′. This is a cardinality potential that depends only on the number of variables yi assigned to a particular label. Specifically, ignoring constant terms, the lower bound can be written as a summation of cardinality factors (one for each previous solution y′ ∈S): dlb(y|S) = P y′∈S θy′(y), where θy′(y) = b |S| −Iy′(y), b is a constant (size of a k-radius Hamming ball), and Iy′(y) is the number of points in the intersection of k-radius Hamming balls centered at y′ and y. With this approximation, the greedy step means performing MAP inference in a factor graph augmented with cardinality potentials: argmaxy r(y) + λdlb(y|S). This may be solved via messagepassing, and all outgoing messages from cardinality factors can be computed in O(n log n) time [30]. While this algorithm does not offer any approximation guarantees, it performs well in practice. A subtle point to note is that dlb(y|S) is always decreasing w.r.t. |S| but may become negative due to over-counting. We can fix this by clamping dlb(y|S) to be greater than 0, but in our experiments this was unnecessary – the greedy algorithm never chose a set where dlb(y|S) was negative. Comparison to DivMBest. The greedy algorithm for Hamming diversity is similar in spirit to the recent work of Batra et al. [2], who also proposed a greedy algorithm (DivMBest) for finding diverse MAP solutions in graphical models. They did not provide any justification for greedy, and our formulation sheds some light on their work. Similar to our approach, at each greedy step, DivMBest involves maximizing a diversity-augmented score: argmaxy r(y)+λ P y′∈S θy′(y). However, their diversity function grows linearly with the Hamming distance, θy′(y) = Ham(y′, y) = Pn i=1[[y′ i ̸= yi]]. Linear diversity rewards are not robust, and tend to over-reward diversity. Our formulation uses a robust diversity function θy′(y) = b |S| −Iy′(y) that saturates as y moves far away from y′. In our experiments, we make the saturation behavior smoothly tunable via a parameter γ: Iy′(y) = e−γ Ham(y′,y). A larger γ corresponds to Hamming balls of smaller radius, and can be set to optimize performance on validation data. We found this to work better than directly tuning the radius k. 4 Experiments We apply our greedy maximization algorithms to two image segmentation problems: (1) interactive binary segmentation (object cutout) (Section 4.1); (2) category-level object segmentation on the PASCAL VOC 2012 dataset [11] (Section 4.2). We compare all methods by their respective oracle accuracies, i.e. the accuracy of the most accurate segmentation in the set of M diverse segmentations returned by that method. For a small value of M ≈5 to 10, a high oracle accuracy indicates that the algorithm has achieved high recall and has identified a good pool of candidate solutions for further processing in a cascaded pipeline. In both experiments, the label “background” is typically expected to appear somewhere in the image, and thus does not play a role in the label cost/transition diversity functions. Furthermore, in binary segmentation there is only one non-background label. Thus, we report results with Hamming diversity only (label cost and label transition diversities are not applicable). For the multi-class segmentation experiments, we report experiments with all three. Baselines. We compare our proposed methods against DivMBest [2], which greedily produces diverse segmentation by explicitly adding a linear Hamming distance term to the factor graph. Each Hamming term is decomposable along the variables yi and simply modifies the node potentials ˜θ(yi) = θ(yi)+λ P y′∈S[[yi ̸= y′ i]]. DivMBest has been shown to outperform techniques such as MBest-MAP [34, 1], which produce high scoring solutions without a focus on diversity, and samplingbased techniques, which produce diverse solutions without a focus on the relevance term [2]. Hence, we do not include those methods here. We also report results for combining different diversity functions via two operators: (⊗), where we generate the top M k solutions for each of k diversity functions and then concatenate these lists; and (⊕), where we linearly combine diversity functions (with coefficients chosen by k-D grid search) and generate M solutions using the combined diversity. 4.1 Interactive segmentation In interactive foreground-background segmentation, the user provides partial labels via scribbles. One way to minimize interactions is for the system to provide a set of candidate segmentations for the user to choose from. We replicate the experimental setup of [2], who curated 100 images from the PASCAL VOC 2012 dataset, and manually provided scribbles on objects contained in them. For each image, the relevance model r(y) is a 2-label pairwise CRF, with a node term for each 6 Label Cost (LC) Hamming Ball (HB) Label Transition (LT) MAP M=5 M=15 MAP M=5 M=15 MAP M=5 M=15 min{1, ·} 42.35 45.43 45.58 DivMBest 43.43 51.21 52.90 min{1, ·} 42.35 44.26 44.78 p (·) 42.35 45.72 50.01 HB 43.43 51.71 55.32 p (·) 42.35 45.43 46.21 log(1 + ·) 42.35 46.28 50.39 log(1 + ·) 42.35 45.92 46.89 ⊗Combined Diversity ⊕Combined Diversity M=15 M=16 M=15 HB ⊗LC ⊗LT 56.97 DivMBest ⊕HB 55.89 DivMBest ⊗HB ⊗LC ⊗LT 57.39 DivMBest ⊕LC ⊕LT 53.47 Table 2: PASCAL VOC 2012 val oracle accuracies for different diversity functions. superpixel in the image and an edge term for each adjacent pair of superpixels. At each superpixel, we extract colour and texture features. We train a Transductive SVM from the partial supervision provided by the user scribbles. The node potentials are derived from the scores of these TSVMs. The edge potentials are contrast-sensitive Potts. Fifty of the images were used for tuning the diversity parameters λ, γ, and the other 50 for reporting oracle accuracies. The 2-label contrast-sensitive Potts model results in a supermodular relevance function r(y), which can be efficiently maximized via graph cuts [20]. The Hamming ball diversity dlb(y|S) is a collection of cardinality factors, which we optimize with the Cyborg implementation [30]. Results. For each of the 50 test images in our dataset we generated the single best y1 and 5 additional solutions {y2, . . . , y6} using each method. Table 3 shows the average oracle accuracies for DivMBest, Hamming ball diversity, and their two combinations. We can see that the combinations slightly outperform both approaches. MAP M=2 M=6 DivMBest 91.57 93.16 95.02 Hamming Ball 91.57 93.95 94.86 DivMBest⊗Hamming Ball 95.16 DivMBest⊕Hamming Ball 95.14 Table 3: Interactive segmentation: oracle pixel accuracies averaged over 50 test images 4.2 Category level Segmentation In category-level object segmentation, we label each pixel with one of 20 object categories or background. We construct a multi-label pairwise CRF on superpixels. Our node potentials are outputs of category-specific regressors trained by [6], and our edge potentials are multi-label Potts. Inference in the presence of diversity terms is performed with the implementations of Delong et al. [9] for label costs, Tarlow et al. [30] for Hamming ball diversity, and Boykov et al. [3] for label transitions. Figure 3: Qualitative Results: each row shows the original image, ground-truth segmentation (GT) from PASCAL, the singlebest segmentation y1, and oracle segmentation from the M = 15 segmentations (excluding y1) for different definitions of diversity. Hamming typically performs the best. In certain situations (row3), label transitions help since the single-best segmentation y1 included a rare pair of labels (dogcat boundary). Results. We evaluate all methods on the PASCAL VOC 2012 data [11], consisting of train, val and test partitions with about 1450 images each. We train the regressors of [6] on train, and report oracle accuracies of different methods on val (we cannot report oracle results on test since those annotations are not publicly available). Diversity parameters (γ, λ) are chosen by performing cross-val on val. The standard PASCAL accuracy is the corpus-level intersection-over-union measure, averaged over all categories. For both label cost and transition, we try 3 different concave 7 functions h(·) = min{1, ·}, p (·) and log(1 + ·). Table 2 shows the results.3 Hamming ball diversity performs the best, followed by DivMBest, and label cost/transitions are worse here. We found that while worst on average, label transition diversity helps in an interesting scenario – when the first best segmentation y1 includes a pair of rare or mutually confusing labels (say dog-cat). Fig. 3 shows an example, and more illustrations are provided in the supplement. In these cases, searching for a different label transition produces a better segmentation. Finally, we note that lists produced with combined diversity significantly outperform any single method (including DivMBest). 5 Discussion and Conclusion In this paper, we study greedy algorithms for maximizing scoring functions that promote diverse sets of combinatorial configurations. This problem arises naturally in domains such as Computer Vision, Natural Language Processing, or Computational Biology, where we want to search for a set of diverse high-quality solutions in a structured output space. The diversity functions we propose are monotone submodular functions by construction. Thus, if r(y) + p(y) ≥0 for all y, then the entire scoring function F is monotone submodular. We showed that r(y) can simply be learned to be positive. The greedy algorithm for maximizing monotone submodular functions has proved useful in moderately-sized unstructured spaces. To the best of our knowledge, this is the first generalization to exponentially large structured output spaces. In particular, our contribution lies in reducing the greedy augmentation step to inference with structured, efficiently solvable HOPs. This insight makes new connections between submodular optimization and work on inference in graphical models. We now address some questions. Can we sample? One question that may be posed is how random sampling would perform for large ground sets V . Unfortunately, the expected value of a random sample of M elements can be much worse than the optimal value F(S∗), especially if N is large. Lemma 1 is proved in the supplement. Lemma 1. Let S ⊆V be a sample of size M taken uniformly at random. There exist monotone submodular functions where E[F(S)] ≤M N max|S|=M F(S). Guarantees? If F is nonnegative, monotone submodular, then using an exact HOP inference algorithm will clearly result in an approximation factor of 1 −1/e. But many HOP inference procedures are approximate. Lemma 2 formalizes how approximate inference affects the approximation bounds. Lemma 2. Let F ≥0 be monotone submodular. If each step of the greedy algorithm uses an approximate marginal gain maximizer bt+1 with F(bt+1 | St) ≥α maxa∈V F(a | St) −ϵt+1, then F(SM) ≥(1 − 1 eα ) max|S|≤M F(S) −PM i=1 ϵt. Parts of Lemma 2 have been observed in previous work [13, 29]; we show the combination in the supplement. If F is monotone but not nonnegative, then Lemma 2 can be extended to a relative error bound F (SM)−Fmin F (S∗)−Fmin ≥(1 − 1 eα ) − P i ϵi F (S∗)−Fmin that refers to Fmin = minS F(S) and the optimal solution S∗. While stating these results, we add that further additive approximation losses occur if the approximation bound for inference is computed on a shifted or reflected function (positive scores vs positive energies). We pose theoretical improvements as an open question for future work. That said, our experiments convincingly show that the algorithms perform very well in practice, even when there are no guarantees (as with Hamming Ball diversity). Generalization. In addition to the three specific examples in Section 3, our constructions generalize to the broad HOP class of upper-envelope potentials [18]. The details are provided in the supplement. Acknowledgements. We thank Xiao Lin for his help. The majority of this work was done while AP was an intern at Virginia Tech. AP and DB were partially supported by the National Science Foundation under Grant No. IIS-1353694 and IIS-1350553, the Army Research Office YIP Award W911NF-14-1-0180, and the Office of Naval Research Award N00014-14-1-0679, awarded to DB. SJ was supported by gifts from Amazon Web Services, Google, SAP, The Thomas and Stacey Siebel Foundation, Apple, C3Energy, Cisco, Cloudera, EMC, Ericsson, Facebook, GameOnTalis, Guavus, HP, Huawei, Intel, Microsoft, NetApp, Pivotal, Splunk, Virdata, VMware, WANdisco, and Yahoo!. References [1] D. Batra. An Efficient Message-Passing Algorithm for the M-Best MAP Problem. In UAI, 2012. 6 3MAP accuracies in Table 2 are different because of two different approximate MAP solvers: LabelCost/Transition use alpha-expansion and HammingBall/DivMBest use message-passing. 8 [2] D. Batra, P. Yadollahpour, A. Guzman-Rivera, and G. Shakhnarovich. Diverse M-Best Solutions in Markov Random Fields. In ECCV, 2012. 2, 6 [3] Y. Boykov, O. Veksler, and R. Zabih. Efficient approximate energy minimization via graph cuts. PAMI, 20(12):1222–1239, 2001. 5, 7 [4] N. Buchbinder, M. Feldman, J. Naor, and R. Schwartz. A tight (1/2) linear-time approximation to unconstrained submodular maximization. In FOCS, 2012. 3 [5] J. Carbonell and J. Goldstein. The use of MMR, diversity-based reranking for reordering documents and producing summaries. In Proc. 21st annual international ACM SIGIR conference on Research and Development in Information Retrieval, SIGIR ’98, pages 335–336, 1998. 1 [6] J. Carreira, R. Caseiro, J. Batista, and C. Sminchisescu. Semantic segmentation with second-order pooling. In ECCV, pages 430–443, 2012. 7 [7] C. Chen, V. Kolmogorov, Y. Zhu, D. Metaxas, and C. H. Lampert. Computing the m most probable modes of a graphical model. In AISTATS, 2013. 2 [8] C. Chen, H. Liu, D. Metaxas, and T. Zhao. Mode estimation for high dimensional discrete tree graphical models. In NIPS, 2014. 2 [9] A. Delong, A. Osokin, H. N. Isack, and Y. Boykov. Fast approximate energy minimization with label costs. In CVPR, pages 2173–2180, 2010. 5, 7 [10] D. Dey, T. Liu, M. Hebert, and J. A. Bagnell. Contextual sequence prediction with application to control library optimization. In Robotics Science and Systems (RSS), 2012. 1, 3 [11] M. Everingham, L. V. Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2012 (VOC2012). 6, 7 [12] U. Feige, V. S. Mirrokni, and J. Vondrak. Maximizing non-monotone submodular functions. In FOCS, 2007. ISBN 0-7695-3010-9. 3 [13] P. Goundan and A. Schulz. Revisiting the greedy approach to submodular set function maximization. Manuscript, 2009. 8 [14] A. Guzman-Rivera, D. Batra, and P. Kohli. Multiple Choice Learning: Learning to Produce Multiple Structured Outputs. In Proc. NIPS, 2012. 2 [15] A. Guzman-Rivera, P. Kohli, D. Batra, and R. Rutenbar. Efficiently enforcing diversity in multi-output structured prediction. In AISTATS, 2014. 2 [16] S. Jegelka and J. Bilmes. Submodularity beyond submodular energies: Coupling edges in graph cuts. In CVPR, 2011. 5 [17] D. Kempe, J. Kleinberg, and E. Tardos. Maximizing the spread of influence through a social network. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), 2003. 1 [18] P. Kohli and M. P. Kumar. Energy minimization for linear envelope MRFs. In CVPR, 2010. 8 [19] P. Kohli, A. Osokin, and S. Jegelka. A principled deep random field model for image segmentation. In CVPR, 2013. 5 [20] V. Kolmogorov and R. Zabih. What energy functions can be minimized via graph cuts? PAMI, 26(2): 147–159, 2004. 7 [21] A. Krause and S. Jegelka. Submodularity in machine learning: New directions. ICML Tutorial, 2013. 2 [22] A. Krause, A. Singh, and C. Guestrin. Near-optimal sensor placements in Gaussian processes: Theory, efficient algorithms and empirical studies. JMLR, 9:235–284, 2008. 1 [23] A. Kulesza and B. Taskar. Structured determinantal point processes. In Proc. NIPS, 2010. 2 [24] J. D. Lafferty, A. McCallum, and F. C. N. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, 2001. 1 [25] Y. LeCun, S. Chopra, R. Hadsell, M. Ranzato, and F. Huang. A tutorial on energy-based learning. In Predicting Structured Data. MIT Press, 2006. 3 [26] H. Lin and J. Bilmes. A class of submodular functions for document summarization. In ACL, 2011. 1, 3 [27] G. Nemhauser, L. Wolsey, and M. Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14(1):265–294, 1978. 2, 3 [28] D. Park and D. Ramanan. N-best maximal decoders for part models. In ICCV, 2011. 2 [29] M. Streeter and D. Golovin. An online algorithm for maximizing submodular functions. In NIPS, 2008. 3, 8 [30] D. Tarlow, I. E. Givoni, and R. S. Zemel. HOP-MAP: Efficient message passing with high order potentials. In AISTATS, pages 812–819, 2010. 5, 6, 7 [31] B. Taskar, C. Guestrin, and D. Koller. Max-Margin Markov networks. In NIPS, 2003. 1 [32] I. Tsochantaridis, T. Joachims, T. Hofmann, and Y. Altun. Large margin methods for structured and interdependent output variables. JMLR, 6:1453–1484, 2005. 1, 3 [33] P. Viola and M. J. Jones. Robust real-time face detection. Int. J. Comput. Vision, 57(2):137–154, May 2004. ISSN 0920-5691. 1 [34] C. Yanover and Y. Weiss. Finding the m most probable configurations using loopy belief propagation. In NIPS, 2003. 6 9
2014
231
5,327
Robust Bayesian Max-Margin Clustering Changyou Chen† Jun Zhu‡ Xinhua Zhang♯ †Dept. of Electrical and Computer Engineering, Duke University, Durham, NC, USA ‡State Key Lab of Intelligent Technology & Systems; Tsinghua National TNList Lab; ‡Dept. of Computer Science & Tech., Tsinghua University, Beijing 100084, China ♯Australian National University (ANU) and National ICT Australia (NICTA), Canberra, Australia cchangyou@gmail.com; dcszj@tsinghua.edu.cn; xinhua.zhang@anu.edu.au Abstract We present max-margin Bayesian clustering (BMC), a general and robust framework that incorporates the max-margin criterion into Bayesian clustering models, as well as two concrete models of BMC to demonstrate its flexibility and effectiveness in dealing with different clustering tasks. The Dirichlet process max-margin Gaussian mixture is a nonparametric Bayesian clustering model that relaxes the underlying Gaussian assumption of Dirichlet process Gaussian mixtures by incorporating max-margin posterior constraints, and is able to infer the number of clusters from data. We further extend the ideas to present max-margin clustering topic model, which can learn the latent topic representation of each document while at the same time cluster documents in the max-margin fashion. Extensive experiments are performed on a number of real datasets, and the results indicate superior clustering performance of our methods compared to related baselines. 1 Introduction Existing clustering methods fall roughly into two categories. Deterministic clustering directly optimises some loss functions, while Bayesian clustering models the data generating process and infers the clustering structure via Bayes rule. Typical deterministic methods include the well known kmeans [1], nCut [2], support vector clustering [3], Bregman divergence clustering [4, 5], and the methods built on the very effective max-margin principle [6–9]. Although these methods can flexibly incorporate constraints for better performance, it is challenging for them to finely capture hidden regularities in the data, e.g., automated inference of the number of clusters and the hierarchies underlying the clusters. In contrast, Bayesian clustering provides favourable convenience in modelling latent structures, and their posterior distributions can be inferred in a principled fashion. For example, by defining a Dirichlet process (DP) prior on the mixing probability of Gaussian mixtures, Dirichlet process Gaussian mixture models [10] (DPGMM) can infer the number of clusters in the dataset. Other priors on latent structures include the hierarchical cluster structure [11–13], coclustering structure [14], etc. However, Bayesian clustering is typically difficult to accommodate external constraints such as max-margin. This is because under the standard Bayesian inference designing some informative priors (if any) that satisfy these constraints is highly challenging. To address this issue, we propose Bayesian max-margin clustering (BMC), which allows maxmargin constraints to be flexibly incorporated into a Bayesian clustering model. Distinct from the traditional max-margin clustering, BMC is fully Bayesian and enables probabilistic inference of the number of clusters or the latent feature representations of data. Technically, BMC leverages the regularized Bayesian inference (RegBayes) principle [15], which has shown promise on supervised learning tasks, such as classification [16, 17], link prediction [18], and matrix factorisation [19], where max-margin constraints are introduced to improve the discriminative power of a Bayesian 1 model. However, little exploration has been devoted to the unsupervised setting, due in part to the absence of true labels that makes it technically challenging to enforce max-margin constraints. BMC constitutes a first extension of RegBayes to the unsupervised clustering task. Note that distinct from the clustering models using maximum entropy principle [20, 21] or posterior regularisation [22], BMC is more general due to the intrinsic generality of RegBayes [15]. We demonstrate the flexibility and effectiveness of BMC by two concrete instantiations. The first is Dirichlet process max-margin Gaussian mixture (DPMMGM), a nonparametric Bayesian clustering model that relaxes the Gaussian assumption underlying DPGMM by incorporating max-margin constraints, and is able to infer the number of clusters in the raw input space. To further discover latent feature representations, we propose the max-margin clustering topic model (MMCTM). As a topic model, it performs max-margin clustering of documents, while at the same time learns the latent topic representation for each document. For both DPMMGM and MMCTM, we develop efficient MCMC algorithms by exploiting data augmentation techniques. This avoids imposing restrictive assumptions such as in variational Bayes, thereby facilitating the inference of the true posterior. Extensive experiments demonstrate superior clustering performance of BMC over various competitors. 2 Regularized Bayesian Inference We first briefly overview the principle of regularised Bayesian inference (RegBayes) [15]. The motivation of RegBayes is to enrich the posterior of a probabilistic model by incorporating additional constraints, under an information-theoretical optimisation formulation. Formally, suppose a probabilistic model has latent variables Θ, endowed with a prior p(Θ) (examples of Θ will be clear soon later). We also have observations X := {x1, · · · , xn}, with xi ∈Rp. Let p(X|Θ) be the likelihood. Then, posterior inference via the Bayes’ theorem is equivalent to solving the following optimisation problem [15]: inf q(Θ)∈P KL(q(Θ) || p(Θ)) −EΘ∼q(Θ) [log p(X|Θ)] (1) where P is the space of probability distribution1, q(Θ) is the required posterior (here and afterwards we will drop the dependency on X for notation simplicity). In other words, the Bayesian posterior p(Θ|X) is identical to the optimal solution to (1). The power of RegBayes stems in part from the flexibility of engineering P, which typically encodes constraints imposed on q(Θ), e.g., via expectations of some feature functions of Θ (and possibly the data X). Furthermore, the constraints can be parameterised by some auxiliary variable ξ. For example, ξ may quantify the extent to which the constraints are violated, then it is penalised in the objective through a function U. To summarise, RegBayes can be generally formulated as inf ξ,q(Θ) KL(q(Θ) || p(Θ))−EΘ∼q(Θ) [log p(X|Θ)]+ U(ξ) s.t. q(Θ) ∈P(ξ). (2) To distinguish from the standard Bayesian posterior, the optimal q(Θ) is called post-data posterior. Under mild regularity conditions, RegBayes admits a generic representation theorem to characterise the solution q(Θ) [15]. It is also shown to be more general than the conventional Bayesian methods, including those methods that introduce constraints on a prior. Such generality is essential for us to develop a Bayesian framework of max-margin clustering. Note that like many sophisticated Bayesian models, posterior inference remains as a key challenge of developing novel RegBayes models. Therefore, one of our key technical contributions is on developing efficient and accurate algorithms for BMC, as detailed below. 3 Robust Bayesian Max-margin Clustering For clustering, one key assumption of our model is that X forms a latent cluster structure. In particular, let each cluster be associated with a latent projector ηk ∈Rp, which is included in Θ and has prior distribution subsumed in p(Θ). Given any distribution q on Θ, we then define the compatibility score of xi with respect to cluster k by using the marginal distribution on ηk (as ηk ∈Θ): Fk(xi) = Eq(ηk)  ηT k xi  = Eq(Θ)  ηT k xi  . (3) 1In theory, we also require that q is absolutely continuous with respect to p to make the KL-divergence well defined. The present paper treats this constraint as an implicit assumption for clarity. 2 For each example xi, we introduce a random variable yi valued in Z+, which denotes its cluster assignment and is also included in Θ. Inspired by conventional multiclass SVM [7, 23], we utilize P(ξ) in RegBayes (2) to encode the max-margin constraints based on Fk(xi), with the slack variable ξ penalised via their sum in U(ξ). This amounts to our Bayesian max-margin clustering (BMC): inf ξi≥0,q(Θ) L(q(Θ)) + 2c X i ξi (4) s.t. Fyi(xi) −Fk(xi) ≥ℓI(yi ̸= k) −ξi, ∀i, k where L(q(Θ)) = KL(q(Θ)||p(Θ)) −EΘ∼q(Θ)[log p(X|Θ)] measures the KL divergence between q and the original Bayesian posterior p(Θ|X) (up to a constant); I(·) = 1 if · holds true, and 0 otherwise; ℓ> 0 is a constant scalar of margin. Note we found that the commonly adopted balance constraints in max-margin clustering models [6] either are unnecessary or do not help in our framework. We will address this issue in specific models. Clearly by absorbing the slack variables ξ, the optimisation problem (4) is equivalent to inf q(Θ) L(q(Θ)) + 2c X i max  0, max k:k̸=yiEΘ∼q(Θ)[ζik]  (5) where ζik := ℓI(yi ̸= k) −(ηyi −ηk)T xi. Exact solution to (5) is hard to compute. An alternative approach is to approximate the posterior by assuming independence between random variables, e.g. variational inference. However, this is usually slow and susceptible to local optimal. In order to obtain an analytic optimal distribution q that facilitates efficient Bayesian inference, we resort to the technique of Gibbs classifier [17] which approximates (in fact, upper bounds due to the convexity of max function) the second term in (5) by an expected hinge loss, i.e., moving the expectation out of the max. This leads to our final formulation of BMC: inf q(Θ) L(q(Θ)) + 2c X i EΘ∼q(Θ)  max  0, max k:k̸=yi ζik  . (6) Problem (6) is still much more challenging than existing RegBayes models [17], which are restricted to supervised learning with two classes only. Specifically, BMC allows multiple clusters/classes in an unsupervised setting, and the latent cluster membership yi needs to be inferred. This complicates the model and brings challenges for posterior inference, as addressed below. In a nutshell, our inference algorithms rely on two key steps by exploring data augmentation techniques. First, in order to tackle the multi-class case, we introduce auxiliary variables si := arg maxk:k̸=yi ζik. Applying standard derivations in calculus of variation [24] and augmenting the model with {si}, we obtain an analytic form of the optimal solution to (6) by augmenting Θ (refer to Appendix A for details): q(Θ, {si}) ∝p(Θ|X) Y i exp(−2c max(0, ζisi)) . (7) Second, since the max term in (7) obfuscates efficient sampling, we apply the augmentation technique introduced by [17], which showed that q(Θ, {si}) is identical to the marginal distribution of the augmented post-data posterior q(Θ, {si}, {λi}) ∝p(Θ|X) Y i ˜φi(λi|Θ), (8) where ˜φi(λi|Θ) := λ −1 2 i exp −1 2λi (λi + cζisi)2 . Here λi is an augmented variable for xi that has an generalised inverse Gaussian distribution [25] given Θ and xi. Note that our two steps of data augmentation are exact and incur no approximation. With the augmented variables ({si}, {λi}), we can develop efficient sampling algorithms for the augmented posterior q(Θ, {si}, {λi}) without restrictive assumptions, thereby allowing us to approach the true target posterior q(Θ) by dropping the augmented variables. The details will become clear soon in our subsequent clustering models. 4 Dirichlet Process Max-margin Gaussian Mixture Models In (4), we have left unspecified the prior p(Θ) and the likelihood p(X|Θ). This section presents an instantiation of Bayesian nonparametric clustering for non-Gaussian data. We will present another instantiation of max-margin document clustering based on topic models in next section. 3 xi µk Λk ηk yi w α r, m ν, S v N ∞ wil φt ηk zil µi α yi µk µ0 α0 γ ω v β α1 K Ni T K D Figure 1: Left: Graphical model of DPMMGM. The part excluding ηk and v corresponds to DPGMM. Right: Graphical model of MMCTM. The one excluding {ηk} and the arrow between yi and wil corresponds to CTM. Here a convenient model of p(X, Θ) is mixture of Gaussian. Let the mean and variance of the k-th cluster component be µk and Λk. In a nonparametric setting, the number of clusters is allowed to be infinite, and the cluster yi that each data point belongs to is drawn from a Dirichlet process [10]. To summarize, the latent variables are Θ = {µk, Λk, ηk}∞ k=1 ∪{yi}n i=1. The prior p(Θ) is specified as: µk and Λk employ a standard Normal-inverse Wishart prior [26]: µk ∼N(µk; m, (rΛk)−1), and Λk ∼IW(Λk; S, ν). (9) yi ∈Z+ has a Dirichlet process prior with parameter α. ηk follows a normal prior with mean 0 and variance vI, where I is the identity matrix. The likelihood p(xi|Θ) is N(xi; µyi, (rΛyi)−1), i.e. independent of ηk. The max-margin constraints take effects in the model via ˜φi’s in (8). Note this model of p(Θ, X), apart from ηk, is effectively the Dirichlet process Gaussian mixture model [10] (DPGMM). Therefore, we call our post-data posterior q(Θ, {si}, {λi}) in (8) as Dirichlet process max-margin Gaussian mixture model (DPMMGM). The hyperparameters include m, r, S, ν, α, v. Interpretation as a generalised DP mixture The formula of the augmented post-data posterior in (8) reveals that, compared with DPGMM, each data point is associated with an additional factor ˜φi(λi|Θ). Thus we can interpret DPMMGM as a generalised DP mixture with Normal-inversed Wishart-Normal as the base distribution, and a generalised pseudo likelihood that is proportional to f(xi, λi|yi, µyi, Λyi, {ηk}) := N(xi; µyi, (rΛyi)−1)˜φi (λi|Θ) . (10) To summarise, DPMMGM employs the following generative process with the graphical model shown in Fig. 1 (left): (µk, Λk, ηk) ∼N µk; m, (rΛk)−1 × IW (Λk; S, ν) × N (ηk; 0, vI) , k = 1, 2, · · · w ∼Stick-Breaking(α), yi|w ∼Discrete(w), i ∈[n] (xi, λi)|yi, {µk, Λk, ηk} ≃f(xi, λi|yi, µyi, Λyi, {ηk}). i ∈[n] Here [n] := {1, · · · , n} is the set of integers up to n and ≃means that (xi, λi) is generative from a distribution that is proportional to f(·). Since this normalisation constant is shared by all samples xi, there is no need to deal with it by posterior inference. Another benefit of this interpretation is that it allows us to use existing techniques for non-conjugate DP mixtures to sample the cluster indicators yi efficiently, and to infer the number of clusters in the data. This approach is different from previous work on RegBayes nonparametric models where truncated approximation is used to deal with the infinite dimensional model space [15, 18]. In contrast, our method does not rely on any approximation. Note that DPMMGM does not need the complicated class balance constraints [6] because the Gaussians in the pseudo likelihood would balance the clusters to some extent. Posterior inference Posterior inference for DPMMGM can be done by efficient Gibbs sampling. We integrate out the infinite dimension vector w, so the variables needed to be sampled are {µk, Λk, ηk}k ∪{yi, si, λi}i. Conditional distributions are derived in Appendix B. Note that we use an extension of the Reused Algorithm [27] to jointly sample (yi, si), which allows it to allocate to empty clusters in Bayesian nonparametric setting. The time complexity is almost the same as DPGMM except for the additional step to sample ηk, with cost O(p3). So it would be necessary to put the constraints on a subspace (e.g., by projection) of the original feature space when p is high. 4 5 Max-margin Clustering Topic Model Although many applications exhibit clustering structures in the raw observed data which can be effectively captured by DPMMGM, it is common that such regularities are more salient in terms of some high-level but latent features. For example, topic distributions are often more useful than word frequency in the task of document clustering. Therefore, we develop a max-margin clustering topic model (MMCTM) in the framework of BMC, which allows topic discovery to co-occur with document clustering in a Bayesian and max-margin fashion. To this end, the latent Dirichlet allocation (LDA) [28] needs to be extended by introducing a cluster label into the model, and define each cluster as a mixture of topic distributions. This cluster-based topic model [29] (CTM) can then be used in concert with BMC to enforce large margin between clusters in the posterior q(Θ). Let V be the size of the word vocabulary, T be the number of topics, and K be the number of clusters, 1N be a N-dimensional one vector. Then the generative process of CTM for the documents goes as: 1. For each topic t, generate its word distribution φt: φt|β ∼Dir(β1V ). 2. Draw a base topic distribution µ0: µ0|α0 ∼Dir(α01T ). Then for each cluster k, generate its topic distribution mixture µk: µk|α1, µ0 ∼Dir(α1µ0). 3. Draw a base cluster distribution γ: γ|ω ∼Dir(ω1K). Then for each document i ∈[D]: • Generate a cluster label yi and a topic distribution µi: yi|γ ∼Discrete(γ), µi|α, µyi ∼ Dir(αµyi). • Generate the observed words wil: zil ∼Discrete(µi), wil ∼Discrete(φzil), ∀l ∈[Ni]. Fig. 1 (right) shows the structure. We then augment CTM with max-margin constraints, and get the same posterior as in Eq. (7), with the variables Θ corresponding to {φt}T t=1 ∪{ηk, µk}K k=1 ∪ {µ0, γ} ∪{µi, yi}D i=1 ∪{zil}D,Ni i=1,l=1. Compared with the raw word space which is normally extremely high-dimensional and sparse, it is more reasonable to characterise the clustering structure in the latent feature space–the empirical latent topic distributions as in the MedLDA [16]. Specifically, we summarise the topic distribution of document i by xi ∈RT , whose t-th element is 1 Ni PNi l=1 I(zil = t). Then the compatibility score for document i with respect to cluster k is defined similar to (3) as Fk(xi) = Eq(Θ)  ηT k xi  . Note, however, the expectation is also taken over xi since it is not observed. Posterior inference To achieve fast mixing, we integrate out {φt}T t=1 ∪{µ0, γ} ∪{µk}K k=1 ∪ {µi}D i=1 in the posterior, thus Θ = {yi}D i=1 ∪{ηk}K k=1 ∪{zil}D,Ni i=1,l=1. The integration is straightforward by the Dirichlet-Multinomial conjugacy. The detailed form of the posterior and the conditional distributions are derived in Appendix C. By extending CTM with max-margin, we note that many of the the sampling formulas are extension of those in CTM [29], with additional sampling for ηk, thus the sampling can be done fairly efficiently. Dealing with vacuous solutions Different from DPMMGM, the max-margin constraints in MMCTM do not interact with the observed words wil, but with the latent topic representations xi (or zil) that are also inferred from the model. This easily makes the latent representation zi’s collapse into a single cluster, a vacuous solution plaguing many other unsupervised learning methods as well. One remedy is to incorporate the cluster balance constraints into the model [7]. However, this does not help in our Bayesian setting because apart from significant increase in computational cost, MCMC often fails to converge in practice2. Another solution is to morph the problem into a weakly semisupervised setting, where we assign to each cluster a few documents according to their true label (we will refer to these documents as landmarks), and sample the rest as in the above unsupervised setting. These “labeled examples” can be considered as introducing constraints that are alternative to the balance constraints. Usually only a very small number of labeled documents are needed, thus barely increasing the cost in training and labelling. We will focus on this setting in experiment. 6 Experiments 6.1 Dirichlet Process Max-margin Gaussian Mixture 2We observed the cluster sizes kept bouncing with sampling iterations. This is probably due to the highly nonlinear mapping from observed word space to the feature space (topic distribution), making the problem multi-modal, i.e., there are multiple optimal topic assignments in the post-data posterior (8). Also the balance constraints might weaken the max-margin constraints too much. 5 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 Figure 2: An illustration of DPGMM (up) and DPMMGM (bottom). We first show the distinction between our DPMMGM and DPGMM by running both models on the non-Gaussian half-rings data set [30]. There are a number of hyperparameters to be determined, e.g., (α, r, S, ν, v, c, ℓ); see Section 4. It turns out the cluster structure is insensitive to (α, r, S, ν), and so we use a standard sampling method to update α [31], while r, ν, S are sampled by employing Gamma, truncated Poisson, inverse Wishart priors respectively, as is done in [32]. We set v = 0.01, c = 0.1, ℓ= 5 in this experiment. Note that the clustering structure is sensitive to the values of c and ℓ, which will be studied below. Empirically we find that DPMMGM converges much faster than DPGMM, both converging well within 200 iterations (see Appendix D.4 for examples). In Fig. 2, the clustering structures demonstrate clearly that DPMMGM relaxes the Gaussian assumption of the data distribution, and correctly finds the number of clusters based on the margin boundary, whereas DPGMM produces a too fragmented partition of the data for the clustering task. Parameter sensitivity We next study the sensitivity of hyperparameters c and ℓ, with other hyperparameters sampled during inference as above. Intuitively the impact of these parameters is as follows. c controls the weight that the max-margin constraint places on the posterior. If there were no other constraint, the max-margin constraint would drive the data points to collapse into a single cluster. As a result, we expect that a larger value of the weight c will result in fewer clusters. Similarly, increasing the value of ℓwill lead to a higher loss for any violation of the constraints, thus driving the data points to collapse as well. To test these implications, we run DPMMGM on a 2-dimensional synthetic dataset with 15 clusters [33]. We vary c and ℓto study how the cluster structures change with respect to these parameter settings. As can be observed from Fig. 3, the results indeed follow our intuition, providing a mean to control the cluster structure in applications. 2 4 6 8 0 2 4 6 8 (a) c :5e-6, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (b) c :5e-4, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (c) c :5e-3, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (d) c :5e-2, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (e) c :5e-1, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (f) c :5e-3, ℓ:5e-4 2 4 6 8 0 2 4 6 8 (g) c :5e-3, ℓ:5e-2 2 4 6 8 0 2 4 6 8 (h) c :5e-3, ℓ:5e-1 2 4 6 8 0 2 4 6 8 (i) c :5e-3, ℓ:2 2 4 6 8 0 2 4 6 8 (j) c :5e-3, ℓ:5 Figure 3: Clustering structures with varied ℓand c: (first row) fixed ℓand increasing c; (second row) fixed c and increasing ℓ. Lines are η’s. Clearly the number cluster decreases with growing c and ℓ. Real Datasets. As other clustering models, we test DPMMGM on ten real datasets (small to moderate sizes) from the UCI repository [34]. Scaling up to large dataset is an interesting future. The first three columns of Table 1 list some of the statistics of these datasets (we used random subsets of the three large datasets – Letter, MNIST, and Segmentation). A heuristic approach for model selection. Model selection is generally hard for unsupervised clustering. Most existing algorithms simply fix the hyperparameters without examining their impacts on model performance [10, 35]. In DPMMGM, the hyperparameters c and ℓare critical to clustering quality since they control the number of clusters. Without training data in our setting they can not be set using cross validation. Moreover, they are not feasible to be estimated use Bayesian sampling as well because they are not parameters from a proper Bayesian model. we thus introduce a timeefficient heuristic approach to selecting appropriate values. Suppose the dataset is known to have K clusters. Our heuristic goes as follows. First initialise c and ℓto 0.1. Then at each iteration, we compare the inferred number of clusters with K. If it is larger than K (otherwise we do the converse), we choose c or ℓrandomly, and increase its value by u n, where u is a uniform random variable in [0, 1] and n is the number of iterations so far. According to the parameter sensitivity studied above, increasing c or ℓtends to decrease the number of clusters, and the model eventually 6 Dataset Data property NMI n p K kmeans nCut DPGMM DPMMGM DPMMGM∗ Glass 214 10 7 0.37±0.04 0.22±0.00 0.37±0.05 0.46±0.01 0.45±0.01 Half circle 300 2 2 0.43±0.00 1.00±0.00 0.49±0.02 0.67±0.02 0.51±0.07 Iris 150 4 3 0.72±0.08 0.61±0.00 0.73±0.00 0.73±0.00 0.73±0.00 Letter 1000 16 10 0.33±0.01 0.04±0.00 0.19±0.09 0.38±0.04 0.23±0.04 MNIST 1000 784 10 0.50±0.01 0.38±0.00 0.55±0.03 0.56±0.01 0.55±0.02 Satimage 4435 36 6 0.57±0.06 0.55±0.00 0.21±0.05 0.51±0.01 0.30±0.00 Segment’n 1000 19 7 0.52±0.03 0.34±0.00 0.23±0.09 0.61±0.05 0.52±0.10 Vehicle 846 18 4 0.10±0.00 0.14±0.00 0.02±0.02 0.14±0.00 0.05±0.00 Vowel 990 10 11 0.42±0.01 0.44±0.00 0.28±0.03 0.39±0.02 0.41±0.02 Wine 178 13 3 0.84±0.01 0.46±0.00 0.56±0.02 0.90±0.02 0.59±0.01 Table 1: Comparison for different methods on NMI scores. K: true number of clusters. stabilises due to the stochastic decrement by u n. We denote the model learned from this heuristic as DPMMGM. In the case where the true number of clusters is unknown, we can still apply this strategy, except that the number of clusters K needs to be first inferred from DPGMM. This method is denoted as DPMMGM∗. Comparison. We measure the quality of clustering results by using the standard normalised mutual information (NMI) criterion [36]. We compare our DPMMGM with the well established KMeans, nCut and DPGMM clustering methods3. All experiments are repeated for five times with random initialisation. The results are shown in Table 1. Clearly DPMMGM significantly outperforms other models, achieving the best NMI scores. DPMMGM∗, which is not informed of the true number of clusters, still obtains reasonably high NMI scores, and outperforms the DPGMM model. 6.2 Max-margin Clustering Topic Model Datasets. We test the MMCTM model on two document datasets: 20NEWS and Reuters-R8 . For the 20NEWS dataset, we combine the training and test datasets used in [16], which ends up with 20 categories/clusters with roughly balanced cluster sizes. It contains 18,772 documents in total with a vocabulary size of 61,188. The Reuters-R8 dataset is a subset of the Reuters-21578 dataset4, with of 8 categories and 7,674 documents in total. The size of different categories is biased, with the lowest number of documents in a category being 51 while the highest being 2,292. Comparison We choose L ∈{5, 10, 15, 20, 25} documents randomly from each category as the landmarks, use 80% documents for training and the rest for testing. We set the number of topics (i.e., T) to 50, and set the Dirichlet prior in Section 5 to ω = 0.1, β = 0.01, α = α0 = α1 = 10, as clustering quality is not sensitive to them. For the other hyperparameters related to the max-margin constraints, e.g., v in the Gaussian prior for η, the balance parameter c, and the cost parameter ℓ, instead of doing cross validation which is computationally expensive and not helpful for our scenario with few labeled data, we simply set v = 0.1, c = 9, ℓ= 0.1. This is found to be a good setting and denoted as MMCTM. To test the robustness of this setting, we vary c over {0.1, 0.2, 0.5, 0.7, 1, 3, 5, 7, 9, 15, 30, 50} and keep v = ℓ= 0.1 (ℓand c play similar roles and so varying one is enough). We choose the best performance out of these parameter settings, denoted as MMCTM∗, which can be roughly deemed as the setting for the optimal performance. We compared MMCTM with state-of-the-art SVM and semi-supervised SVM (S3VM) models. They are efficiently implemented in [37], and the related parameters are chosen by 5-fold cross validation. As in [16], raw word frequencies are used as input features. We also compare MMCTM with a Bayesian baseline–cluster based topic model (CTM) [29], the building block of MMCTM without the max-margin constraints. Note we did not compare with the standard MedLDA [16] because it is supervised. We measure the performance by cluster accuracy, which is the proportion of correctly clustered documents. To accelerate MMCTM, we simply initialise it with CTM, and find it converges surprisingly fast in term of accuracy, e.g., usually within 30 iterations (refer to Appendix 3We additionally show some comparison with some existing max-margin clustering models in Appendix D.2 on two-cluster data because their code only deals with the case of two clusters. Our method performs best. 4Downloaded from csmining.org/index.php/r52-and-r8-of-reuters-21578.html. 7 L CTM SVM S3VM MMCTM MMCTM∗ 20NEWS 5 17.22± 4.2 37.13± 2.9 39.36± 3.2 56.70± 1.9 57.86± 0.9 10 24.50± 4.5 46.99± 2.4 47.91± 2.8 54.92± 1.6 56.56± 1.3 15 22.76± 4.2 52.80± 1.2 52.49± 1.4 55.06± 2.7 57.80± 2.2 20 26.07± 7.2 56.10± 1.5 54.44± 2.1 56.62± 2.2 59.70± 1.4 25 27.20± 1.5 59.15± 1.4 57.45± 1.7 55.70± 2.4 61.92± 3.0 Reuters-R8 5 41.27± 16.7 78.12± 1.1 78.51± 2.3 79.18± 4.1 80.86± 2.9 10 42.63± 7.4 80.69± 1.2 79.15± 1.2 80.04± 5.3 83.48± 1.0 15 39.67± 9.9 83.25± 1.7 81.87± 0.8 85.48± 2.1 86.86± 2.5 20 58.24± 8.3 85.66± 1.0 73.95± 2.0 82.92± 1.7 83.82± 1.6 25 51.93± 5.9 84.95± 0.1 82.39± 1.8 86.56± 2.5 88.12± 0.5 Table 2: Clustering acc. (in %). Bold means significantly different. 10 20 30 50 70 100 0 20 40 60 Number of topics (#topic) Accuracy (%) training test (a) 20NEWS dataset 10 20 30 50 70 100 0 20 40 60 80 Number of topics Accuracy (%) (b) Reuters-R8 dataset Figure 4: Accuracy vs. #topic aaaaaaaaaaaaaaaa −50 −40 −30 −20 −10 0 10 20 30 40 50 −60 −40 −20 0 20 40 60 −50 −40 −30 −20 −10 0 10 20 30 40 50 −60 −40 −20 0 20 40 60 Figure 5: 2-D tSNE embedding on 20NEWS for MMCTM (left) and CTM (right). Best viewed in color. See Appendix D.3 for the results on Reuters-R8 datasets. D.5). The accuracies are shown in Table 2, and we can see that MMCTM outperforms other models (also see Appendix D.4), except for SVM when L = 20 on the Reuters-R8 dataset. In addition, MMCTM performs almost as well as using the optimal parameter setting (MMCTM∗). Sensitivity to the number of topics (i.e., T). Note the above experiments simply set T = 50. To validate the affect of T, we varied T from 10 to 100, and the corresponding accuracies are plotted In Fig. 4 for the two datasets. In both cases, T = 50 seems to be a good parameter value. Cluster embedding. We finally plot the clustering results by embedding them into the 2dimensional plane using tSNE [38]. In Fig. 5, it can be observed that compared to CTM, MMCTM generates well separated clusters with much larger margin between clusters. 7 Conclusions We propose a robust Bayesian max-margin clustering framework to bridge the gap between maxmargin learning and Bayesian clustering, allowing many Bayesian clustering algorithms to be directly equipped with the max-margin criterion. Posterior inference is done via two data augmentation techniques. Two models from the framework are proposed for Bayesian nonparametric maxmargin clustering and topic model based document clustering. Experimental results show our models significantly outperform existing methods with competitive clustering accuracy. Acknowledgments This work was supported by an Australia China Science and Research Fund grant (ACSRF-06283) from the Department of Industry, Innovation, Climate Change, Science, Research and Tertiary Education of the Australian Government, the National Key Project for Basic Research of China (No. 2013CB329403), and NSF of China (Nos. 61322308, 61332007). NICTA is funded by the Australian Government as represented by the Department of Broadband, Communications and the Digital Economy and the Australian Research Council through the ICT Centre of Excellence program. 8 References [1] J. MacQueen. Some methods of classification and analysis of multivariate observations. In Proc. 5th Berkeley Symposium on Math., Stat., and Prob., page 281, 1967. [2] J. Shi and J. Malik. Normalized cuts and image segmentation. TPAMI, 22(8):705–767, 2000. [3] A. Ben-Hur, D. Horn, H. Siegelmann, and V. Vapnik. Support vector clustering. JMLR, 2:125–137, 2001. [4] A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with Bregman divergences. JMLR, 6: 1705–1749, 2005. [5] H. Cheng, X. Zhang, and D. Schuurmans. Convex relaxations of Bregman divergence clustering. In UAI, 2013. [6] L. Xu, J. Neufeld, B. Larson, and D. Schuurmans. Max-margin clustering. In NIPS, 2005. [7] B. Zhao, F. Wang, and C. Zhang. Efficient multiclass maximum margin clustering. In ICML, 2008. [8] Y. F. Li, I. W. Tsang, J. T. Kwok, and Z. H. Zhou. Tighter and convex maximum margin clustering. In AISTATS, 2009. [9] G. T. Zhou, T. Lan, A. Vahdat, and G. Mori. Latent maximum margin clustering. In NIPS, 2013. [10] C. E. Rasmussen. The infinite Gaussian mixture model. In NIPS, 2000. [11] K. A. Heller and Z. Ghahramani. Bayesian hierarchical clustering. In ICML, 2005. [12] Y. W. Teh, H. Dau´me III, and D. Roy. Bayesian agglomerative clustering with coalescents. In NIPS, 2008. [13] Y. Hu, J. Boyd-Graber, H. Dau´me, and Z. I. Ying. Binary to bushy: Bayesian hierarchical clustering with the Beta coalescent. In NIPS, 2013. [14] P. Wang, K. B. Laskey, C. Domeniconi, and M. I. Jordan. Nonparametric Bayesian co-clustering ensembles. In SDM, 2011. [15] J. Zhu, N. Chen, and E. P. Xing. Bayesian inference with posterior regularization and applications to infinite latent SVMs. JMLR, 2014. [16] J. Zhu, A. Ahmed, and E. P. Xing. MedLDA: Maximum margin supervised topic models. JMLR, 13(8): 2237–2278, 2012. [17] J. Zhu, N. Chen, H. Perkins, and B. Zhang. Gibbs max-margin topic models with fast sampling algorithms. In ICML, 2013. [18] J. Zhu. Max-margin nonparametric latent feature models for link prediction. In ICML, 2012. [19] M. Xu, J. Zhu, and B. Zhang. Fast max-margin matrix factorization with data augmentation. In ICML, 2013. [20] L. Wang, X. Li, Z. Tu, and J. Jia. Discriminative cllustering via generative feature mapping. In AAAI, 2012. [21] R. Gomes, A. Krause, and P. Perona. Discriminative clustering by regularized information maximization. In NIPS, 2010. [22] K.‘Ganchev, J. Graa, J. Gillenwater, and B. Taskar. Posterior regularization for structured latent variable models. JMLR, 11:2001–2049, 2010. [23] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, 2:265–292, 2001. [24] C. Fox. An introduction to the calculus of variations. Courier Dover Publications, 1987. [25] B. Jorgensen. Statistical properties of the generalized inverse Gaussian distribution. Lecture Notes in Statistics, 1982. [26] K. P. Murphy. Conjugate Bayesian analysis of the Gaussian distribution. Technical report, UCB, 2007. [27] S. Favaro and Y. W. Teh. MCMC for normalized random measure mixture models. Stat. Sci., 2013. [28] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 3:993–1022, 2003. [29] H. M. Wallach. Structured topic models for language. PhD thesis, University of Cambridge, 2008. [30] A. Jain and M. Law. Data clustering: A user’s dilemma. Lecture Notes in Comp. Sci., 3776:1–10, 2005. [31] Y.W. Teh, M.I. Jordan, M.J. Beal, and D.M. Blei. Hierarchical Dirichlet processes. J. Amer. Statist. Assoc., 101(476):1566–1581, 2006. [32] M. Davy and J. Y. Tourneret. Generative supervised classification using Dirichlet process priors. TPAMI, 32(10):1781–1794, 2010. [33] P. Franti and O. Virmajoki. Iterative shrinking method for clustering problems. PR, 39(5):761–765, 2006. [34] K. Bache and M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics. uci.edu/ml. [35] A. Shah and Z. Ghahramani. Determinantal clustering process – a nonparametric bayesian approach to kernel based semi-supervised clustering. In UAI, 2013. [36] N. X. Vinh, J. Epps, and J. Bailey. Information theoretic measures for clusterings comparison: variants, properties, normalization and correction for chance. JMLR, (11):2837–2854, 2010. [37] V. Sindhwani, P. Niyogi, and M. Belkin. SVMlin: Fast linear SVM solvers for supervised and semisupervised learning. In NIPS Workshop on Machine Learning Open Source Software, 2006. http: //vikas.sindhwani.org/svmlin.html. [38] L.J.P. van der Maaten and G.E. Hinton. Visualizing high-dimensional data using t-SNE. JMLR, 9(11): 2579–2605, 2008. 9
2014
232
5,328
Approximating Hierarchical MV-sets for Hierarchical Clustering Assaf Glazer Omer Weissbrod Michael Lindenbaum Shaul Markovitch Department of Computer Science, Technion - Israel Institute of Technology {assafgr,omerw,mic,shaulm}@cs.technion.ac.il Abstract The goal of hierarchical clustering is to construct a cluster tree, which can be viewed as the modal structure of a density. For this purpose, we use a convex optimization program that can efficiently estimate a family of hierarchical dense sets in high-dimensional distributions. We further extend existing graph-based methods to approximate the cluster tree of a distribution. By avoiding direct density estimation, our method is able to handle high-dimensional data more efficiently than existing density-based approaches. We present empirical results that demonstrate the superiority of our method over existing ones. 1 Introduction Data clustering is a classic unsupervised learning technique, whose goal is dividing input data into disjoint sets. Standard clustering methods attempt to divide input data into discrete partitions. In Hierarchical clustering, the goal is to find nested partitions of the data. The nested partitions reveal the modal structure of the data density, where clusters are associated with dense regions, separated by relatively sparse ones [27, 13]. Under the nonparametric assumption that the data is sampled i.i.d. from a continuous distribution F with Lebesgue density f in Rd, Hartigan observed that f has a hierarchical structure, called its cluster tree. Denote Lf(c) = {x : f(x) ≥c} as the level set of f at level c. Then, the connected components in Lf(c) are the high-density clusters at level c, and the collection of all high-density clusters for c ≥0 has a hierarchical structure, where for any two clusters A and B, either A ⊆B, B ⊆A, or A T B = ∅.   0.11 fL c    0.23 fL c  66.7% 33.3% 66.7% 33.3% 0.67 F  0.5 F  Figure 1: A univariate, tri-modal density function and its corresponding cluster tree are illustrated. Figure 1 shows a plot of a univariate, tri-modal density function. The cluster tree of the density function is shown on top of the density function. The high-density clusters are nodes in the cluster tree. Leaves are associated with modes in the density function. 1 Given the density f, the cluster tree can be constructured in a straightforward manner via a recursive algorithm [23]. We start by setting the root node with a single cluster containing the entire space, corresponding to c = 0. We then recursively increase c until the number of connected components increases, at which point we define a new level of the tree. The process is repeated as long as the number of connected components increases. In Figure 1, for example, the root node has two daughter nodes, which were found at level c = 0.11. The next two descendants of the left node were found at level c = 0.23. A common approach for hierarchical clustering is to first use a density estimation method to obtain f [18, 5, 23], and then estimate the cluster tree using the recursive method described above. However, one major drawback in this approach is that a reliable density estimation is hard to obtain, especially in high-dimensional data. An alternative approach is to estimate the level sets directly, without a separate density estimation step. To do so, we define the minimum volume set (MV-set) at level α as the subset of the input space with the smallest volume and probability mass of at least α. MV-sets of a distribution, which are also level sets of the density f (under sufficient regularity conditions), are hierarchical by definition. The well-known One-Class SVM (OCSVM) [20] can efficiently find the MV-set at a specified level α. A naive approach for finding a hierarchy of MV-sets is to train distinct OCSVMs, one for each MV-set, and enforce hierarchy by intersection operations on the output. However, this solution is not well suited for finding a set of hierarchical MV-sets, because the natural hierarchy of MV-sets is not exploited, leading to a suboptimal solution. In this study we propose a novel method for constructing cluster trees by directly estimating MV-sets, while guaranteeing convergence to a globally optimum solution. Our method utilizes the q-OneClass SVM (q-OCSVM) method [11], which can be regarded as a natural extension of the OCSVM, to jointly find the MV-sets at a set of levels {αi}. By avoiding direct density estimation, our method is able to handle high-dimensional data more efficiently than existing density-based approaches. By jointly considering the entire spectrum of desired levels, a globally optimum solution can be found. We combine this approach with a graph-based heuristic, found to be successful in high-dimensional data [2, 23], for finding high density clusters in the approximated MV-sets. Briefly, we construct a fully connected graph whose nodes correspond to feature vectors, and remove edges between nodes connected by low-density regions. The connected components in the resulting graph correspond to high density clusters. The advantage of our method is demonstrated empirically on synthetic and real data, including a reconstruction of an evolutionary tree of human populations using the high-dimensional 1000 genomes dataset. 2 Background Our novel method for hierarchical clustering belongs to a family of non-parametric clustering methods. Unlike parametric methods, which assume that each group i is associated with a density fi belonging to some family of parametric densities, non-parametric methods assume that each group is associated with modes of a density f [27]. Non-parametric methods aim to reveal the modal structure of f [13, 28, 14]. Hierarchical clustering methods can be divided into agglomerative (bottom up) and divisive (top down) methods. Agglomerative methods (e.g. single-linkage) start with n singleton clusters, one for each training feature vector, and work by iteratively linking two closest clusters. Divisive methods, on the other hand, start with all feature vectors in a single cluster and recursively divide clusters into smaller sub-clusters. While single-linkage was found, in theory, to have better stability and convergence properties in comparison to average-linkage and complete-linkage [4], it is frequently criticized by practitioners due to the chaining effect. Single-linkage ignores the density of feature vectors in clusters, and thus may erroneously connect two modes (clusters) with a few feature vectors connecting them, that is, a ‘chain” of feature vectors. Wishart [27] suggested overcoming this effect by conducting a one-level analysis of the data. The idea is to estimate a specific level set of the data density (Lf(c)), and to remove noisy features 2 outside this level that could otherwise lead to the chaining effect. The connected components left in Lf(c) are the clusters; expansions of this idea can be found in [9, 26, 6, 3]. Indeed, this analysis is more resistant to the chaining effect. However, one of its major drawbacks is that no single level set can reveal all the modes of the density. Therefore, various studies have proposed estimating the entire hierarchical structure of the data (the cluster tree) using density estimates [13, 1, 22, 18, 5, 23, 17, 19]. These methods are considered as divisive hierarchical clustering methods, as they start by associating all feature vectors to the root node, which is then recursively divided to sub-clusters by incrementally exploring level sets of denser regions. Our proposed method belongs to this group of divisive methods. Stuetzle [22] used the nearest neighbor density estimate to construct the cluster tree and pointed out its connection to single-linkage clustering. Kernel density estimates were used in other studies [23, 19]. The bisecting K-means (BiKMean) method is another divisive method that was found to work effectively in cluster analysis [16], although it provides no theoretical guarantee for finding the correct cluster tree of the underlying density. Hierarchical clustering methods can be used as an exploration tool for data understanding [16]. The nonparametric assumption, by which density modes correspond to homogenous feature vectors with respect to their class labels, can be used to infer the hierarchical class structure of the data [15]. An implicit assumption is that the closer two feature vectors are, the less likely they will be to have different class labels. Interestingly, this assumption, which does not necessarily hold for all distributions, is being discussed lately in the context of hierarchical sampling methods for active learning [8, 7, 25], where the correctness of such a hierarchical modeling approach is said to depend on the “Probabilistic Lipschitzness” assumption about the data distribution. 3 Approximating MV-sets for Hierarchical Clustering Our proposed method consists of (a) estimating MV-sets using the q-OCSVM method; (b) using a graph-based method for finding a hierarchy of high density regions in the MV-sets, and (c) constructing a cluster tree using these regions. These stages are described in detail below. 3.1 Estimating MV-Sets We begin by briefly describing the One-Class SVM (OCSVM) method. Let X = {x1, . . . , xn} be a set of feature vectors sampled i.i.d. with respect to F. The function fC returned by the OCSVM algorithm is specified by the solution of this quadratic program: min w∈F,ξ∈Rn,ρ∈R 1 2||w||2 −ρ + 1 νn X i ξi, s.t. (w · Φ (xi)) ≥ρ −ξi, ξi ≥0, (1) where ξ is a vector of the slack variables. Recall that all training examples xi for which (w · Φ(x))− ρ ≤0 are called support vectors (SVs). Outliers are referred to as examples that strictly satisfy (w · Φ(x)) −ρ < 0. By solving the program for ν = 1 −α, we can use the OCSVM to approximate the MV-set C(α). Let 0 < α1 < α2, . . . , < αq < 1 be a sequence of q quantiles. The q-OCSVM method generalizes the OCSVM algorithm for approximating a set of MV-sets {C1, . . . , Cq} such that a hierarchy constraint Ci ⊆Cj is satisfied for i < j. Given X, the q-OCSVM algorithm solves this primal program: min w,ξj,ρj q 2||w||2 − q X j=1 ρj + q X j=1 1 νjn X i ξj,i s.t. (w · Φ (xi)) ≥ρj −ξj,i, ξj,i ≥0, j ∈[q], i ∈[n], (2) where νj = 1 −αj. This program generalizes Equation (1) to the case of finding multiple, parallel half-space decision functions by searching for a global minimum over their sum of objective functions: the coupling between q half-spaces is done by summing q OCSVM programs, while forcing these programs to share the same w. As a result, the q half-spaces in the solution of Equation (2) differ only by their bias terms, and are thus parallel to each other. This program is convex, and thus a global minimum can be found in polynomial time. 3 Glazer et al. [11] proves that the q-OCSVM algorithm can be used to approximate the MV-sets of a distribution. 3.1.1 Generalizing q-OCSVM for Finding an Infinite Number of Approximated MV-sets The q-OCSVM finds a finite number of q approximated MV-sets, which capture the overall structure of the cluster tree. However, in order to better resolve differences in density levels between data points, we would like the solution to be extended for defining an infinite number of hierarchical sets. Our approach for doing so relies on the parallelism property of the approximated MV-sets in the q-OCSVM solution. An infinite number of approximated MV-sets are associated with separating hyperplanes in F that are parallel to the q hyperplanes in the q-OCSVM solution. Note that every projected feature vector Φ(x) lies on a unique separating hyperplane that is parallel to the q hyperplanes defined by the solution, and the distance dis(x) = (w · Φ(x)) −ρ is sufficient to determine whether x is located inside each of the approximated MV-sets. We would like to know the probability mass associated with each of the infinite hyperplanes. For this purpose, we could similarly estimate the expected probability mass of the approximated MVset defined for any x ∈Rd. When Φ(x) lies strictly on one of the i ∈[q] hyperplanes, then x is considered as lying on the boundary of the set approximating C(αi). When Φ(x) does not satisfy this condition, we use a linear interpolation to define α for its corresponding approximated MV-set: Let ρi, ρi+1 be the bias terms associated with the i and i + 1 approximated MV-sets that satisfy ρi > (w · Φ(x)) > ρi+1. Then we linearly interpolate (w · Φ(x)) along the [ρi+1, ρi] interval for an intermediate α ∈(αi, αi+1). For the completion of the definition, we set ρ0 = maxx∈X (w · Φ(x)) and ρq+1 = minx∈X (w · Φ(x)). 3.2 Finding a Hierarchy of High-Density Regions To find a hierarchy of high density regions, we adopt a graph-based approach. We construct a fully-connected graph whose nodes correspond to feature vectors, and remove edges between nodes separated by low-density regions. The connected components in the resulting graph correspond to high density regions. The method proceeds as follows. Let α(x) be the expected probability mass of the approximated MV-set defined by x. Let αi,s be the maximal value of α(x) over the line segment connecting the feature vectors xi and xs in X: αi,s = max t∈[0,1] α(txi + (1 −t)xs). (3) Let G be a complete graph between pairs of feature vectors in X with edges equal to αi,s 1. High density clusters at level α are defined as the connected components in the graph G(α) induced by removing edges from G with αi,s > α. This method guarantees that two feature vectors in the same cluster of the approximated MV-set at level α would surely lie in the same connected component in G(α). However, the opposite would not necessary hold — when αi,s > α and a curve connecting xi and xs exists in the cluster, xi and xs might erroneously be found in different connected components. Nevertheless, it was empirically shown that erroneous splits of clusters are rare if the density function is smooth [23]. One way to implement this method for finding high density clusters is to iteratively find connected components in G(α), when at each iteration α is incrementally increased (starting from α = 0), until all the clusters are found. However, [23] observed that we can simplify this method by working only on the graph G and its minimal spanning tree T. Consequently, we can compute a hierarchy of high-density regions in two steps: First, construct G and its minimal spanning tree T. Then, remove edges from T in descending order of their weights such that the connected components left after removing an edge with weight α correspond to a high density cluster at level α. Connected components with a single feature vector are treated as outliers and removed. 1We calculated αi,s in G by checking the α(x) values for 20 points sampled from the line segment between xi and xs. The same approach was also used by [2] and [23]. 4 3.3 Constructing a Cluster Tree The hierarchy resulting from the procedure described above does not form a full partition of the data, as in each edge removal step a fraction of the data is left outside the newly formed high density clusters. To construct a full partition, feature vectors left outside at each step are assigned to their nearest cluster. Additionally, when a cluster is split into sub-clusters, all its assigned feature vectors are assigned to one of the new sub-clusters. The choice of kernel width has a strong effect on the resulting cluster tree. On the one hand, a large bandwidth may lead to the inner products induced by the kernel function being constant; that is, many examples in the train data are projected to the same point in F. Hence, the approximated MV-sets could eventually be equal, resulting in a cluster tree with a single node. On the other hand, a small bandwidth may lead to the inner products becoming closer to zero; that is, points in F tend to lie on orthogonal axes, resulting in a cluster tree with many branches and leaves. We believe that the best approach for choosing the correct bandwidth is based on the number of modes that we expect to find for the density function. By using a grid search over possible γ values, we can choose the bandwidth that results in a cluster tree in which the expected number of modes is the same as the number we expect. 4 Empirical Analysis We evaluate our hierarchical clustering method on synthetic and real data. While the quality of an estimated cluster tree for the synthetic data can be evaluated by comparing the resulting tree with the true modal structure of the density, alternative quality measures are required to estimate the efficiency of hierarchical clustering methods on high-dimensional data when the density is unknown. In the following section we introduce our proposed measure. 4.1 The Quality Measure One prominent measure is the F-measure, which was extended by [16] to evaluate the quality of estimated cluster trees. Recall that classes refer to the true (unobserved) class assignment of the observed vectors, whereas clusters refer to their tree-assigned partition. For a cluster j and class i, define ni,j as the number of feature vectors of class i in cluster j, and ni, nj as the number of feature vectors associated with class i and with cluster j, respectively. The F-measure for cluster j and class i is given by Fi,j = 2∗Recalli,j∗P recisioni,j Recalli,j+P recisioni,j , where Recalli,j = ni,j ni and Precisioni,j = ni,j nj . The F-measure for the cluster tree is F = X i ni n max j {Fi,j}. (4) The F-measure was found to be a useful tool for the evaluation of hierarchical clustering methods [21], as it quantifies how well we could extract k clusters, one for each class, that are relatively “pure” and large enough with respect to their associated class. However, we found it difficult to use this measure directly in our analysis, because it appears to prefer overfitted trees, with a large number of spurious clusters. We suggest correcting this bias via cross-validation. We split the data X into two equal-sized train and test sets, and construct a tree using the train set. Test examples are recursively assigned to clusters in the tree in a top-down manner, and the F-measure is calculated according to the resulting tree. When analytical boundaries of clusters in the tree are not available (such as in our method), we recursively assign each test example in a cluster to the sub-cluster containing its nearest neighbor in the train set, using Euclidean distance. 4.2 Reference Methods We compare our method with methods for density estimation, that can also be used to construct a graph G. For this purpose, since f(x) is used instead of α(x), we had to adjust the way we construct 5 G and T 2. A kernel density estimator (KDE) and nearest neighbor density estimator (NNE), similar to the one used by [23], are used as competing methods. In addition, we compare our method with the bisecting K-means (BiKMean) method [21] for hierarchical clustering. 4.3 Experiments with Synthetic Data We run our hierarchical clustering method on data sampled from a synthetic, two-dimensional, trimodal distribution. This distribution is defined by a 3-Gaussian mixture distribution. 20 i.i.d. points were sampled for training our q-OCSVM method, with α1 = 0.25, α2 = 0.5, α3 = 0.75 (3-quantiles), and with a bandwidth γ, which results in a cluster tree with 3 modes. The left side of Figure 2 shows the data sampled, and the 3 approximated hierarchical MV-sets. The resulting 3-modes cluster tree is shown in the right side of Figure 2. −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 Q=3,N=20,γ=15 −0.5 0 0.5 1 1.5 2 Branch 4: {1 2}, P=0.68 Branch 5: {1 2 3}, P=0.85 Leaf 1: {1} Leaf 2: {2} Leaf 3: {3} Figure 2: Left: Data sampled for training our q-OCSVM method and the 3 approximated MV-sets; Right: The cluster tree estimated from the synthetic data. The most frequent label in each mode, denoted in curly brackets next to each leaf, defines the label of the mode. Branches are labeled with the probability mass associated with their level set. .We used our proposed and reference method on the data to obtain cluster trees with different numbers of modes (leaves). The number of modes can be tweaked by changing the value of γ for the qOCSVM and KDE methods, and by pruning nodes of small size for the NNE and BiKMean methods. 20 test examples were i.i.d. sampled from the same distribution to estimate the resulting F-measures. The left side of Figure 3 shows the F-measure for each method in terms of changes in the number of modes in the resulting tree. For all methods, the F-measure is bounded by 0.8 as long as the number of modes is greater than 3, correctly suggesting the presence of 3 modes for the data. 4.4 The olive oil dataset The olive oil dataset [10] consists of 572 olive oil examples, with 8 features each, from 3 regions in Italy (R1, R2, R3), each one further divided into 3 sub-areas. The right side of Figure 3 shows the F-measure for each method in terms of changes in the number of modes in the tree. The q-OCSVM method dominates the other three methods when the number of modes is higher than 5, with an average F = 0.62, while its best competitor (KDE) has an average F = 0.55. It can be seen that the variability of the F-measure plots is higher for the q-OCSVM and KDE methods than for the BiKMeans and NNE methods. This is a consequence of the fact that the structure of unpruned nodes remains the same for the BiKMeans and NNE methods, whereas different γ values may lead to different tree structures for the q-OCSVM and KDE methods. The cluster trees estimated using the q-OCSVM and KDE methods are shown in Figure 4. For each method, we chose to show the cluster tree with the smallest number of modes with leaves corresponding to all 8 labels. The q-OCSVM method groups leaves associated with the 8 areas into 3 clusters, which perfectly corresponds to the hierarchical structure of the labels. In contrast, modes estimated using the KDE method cannot be grouped into 3 homogeneous clusters. 2When a density estimator f is used, pi,s = mint∈[0,1] p(tf(xi) + (1 −t)f(xs)) are set to be the edge weights, G(c) is induced by removing edges from G with pi,s < c, and T is defined as the maximal spanning tree of G (instead of the minimal). 6 1 2 3 4 5 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 CC vs. F Number of modes F−Measure qOCSVM KDE BiKMeans NNE 0 2 4 6 8 10 12 14 16 18 20 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 CC vs. F Number of modes F−Measure qOCSVM KDE BiKMeans NNE Figure 3: Left: The F-measures of each method are plotted in terms of the number of modes in the estimated cluster trees. The F-measures are calculated using the synthetic test data; Right: Fmeasure for the olive oil dataset, calculated using 286 test examples, is shown in terms of the number of modes in the cluster tree. q-OCSVM Cluster Tree KDE Cluster Tree R1 R2 R3 R2 R1 R3 R1 R3 R1 R1 q-OCSVM Cluster Tree KDE Cluster Tree R1 R2 R3 R2 R1 R3 R1 R3 R1 R1 Figure 4: Left: Cluster tree for the olive oil data estimated with q-OCSVM; Right: Cluster tree for the olive oil data estimated with KDE. One prominent advantage of our method is that we can use the estimated probability mass of branches in the tree to better understand the modal structure of the data. For instance, we can learn from Figure 4 that the R2 cluster is found in a relatively sparse MV-set at level 0.89, while its two nodes are found in a much denser MV-set at level 0.12. Probability masses for high density clusters can also be estimated using the KDE method, but unlike our method, theoretical guarantees are not provided. 4.5 The 1000 genomes dataset We have also evaluated our method on the 1000 genomes dataset [24]. Hierarchical clustering approaches naturally arise in genetic population studies, as they can reconstruct trees that describe evolutionary history and are often the first step in evolutionary studies [12]. The reconstruction of population structure is also crucial for genetic mapping studies, which search for genetic factors underlying genetic diseases. In this experiment we evaluated our method’s capability to reconstruct the evolutionary history of populations represented in the 1000 genomes dataset, which consists of whole genome sequences of 1, 092 human individuals from 14 distinct populations. We used a trinary representation wherein each individual is represented as a vector of features corresponding to 0,1 or 2. Every feature represents a known genetic variation (with respect to the standard human reference genome 3), where the number indicates the number of varied genome copies. We used data processed by the 1000 Genomes Consortium, which initially contained 2.25 million variations. To reduce dimensionality, we used the 1, 000 features that had the highest information gain with respect to the populations. We excluded from the analysis highly genetically admixed populations (Colombian, Mexican and Puerto 3http://genomereference.org 7 Rican ancestry), because the evolutionary history of admixed populations cannot be represented by a tree. After exclusion, 911 individuals remained in the analysis. 5 10 15 20 25 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 CC vs. F Number of modes F−Measure qOCSVM BiKMeans SL q-OCSVM Cluster Tree KDE Cluster Tree R1 R2 R3 R2 R1 R3 R1 R3 R1 R1 East Asian African European Figure 5: Left: F-measure for the 1000 genomes dataset, calculated using 455 test examples; Right: Cluster tree for the 1000 genomes data estimated with q-OCSVM. The labels are GBR (British in England and Scotland), TSI (Toscani in Italia), CEU (Utah Residents with Northern and Western European ancestry), FIN (Finnish in Finland), CHB (Han Chinese in Bejing, China), CHS (Southern Han Chinese), ASW (Americans of African Ancestry in SW USA), YRI (Yoruba in Ibadan, Nigera), and LWK (Luhya in Webuye, Kenya). The left side of Figure 5 shows that q-OCSVM dominates the other methods for every number of modes tested, demonstrating its superiority in high dimensional settings. Namely, it achieves an F-measure of 0.4 for >2 modes, whereas competing methods obtain an F-measure of 0.35. KDE was not evaluated as it is not applicable due to the high data dimensionality. To obtain a meaningful tree, we increased the number of modes until leaves corresponding to all three major human population groups (African, East Asian and European) represented in the dataset appeared. The tree obtained by using 28 modes is shown in the right side of Figure 5, indicating that q-OCSVM clustering successfully distinguishes between these three population groups. Additionally, it corresponds with the well-established theory that a divergence of a single ancestral population into African and Eurasian populations took place in the distant past, and that Eurasians diverged into East Asian and European populations at a later time [12]. The larger number of leaves representing European populations may result from the larger number of European individuals and populations in the 1000 genomes dataset. 5 Discussion In this research we use the q-OCSVM method as a plug-in method for hierarchical clustering in highdimensional distributions. The q-OCSVM method estimates the level sets (MV-sets) directly without a density estimation step. Therefore, we expect to achieve more accurate results than approaches based on density estimation. Furthermore, since we know α for each approximated MV-set, we believe our solution would be more interpretable and informative than a solution provided by a density estimation-based method. References [1] Mihael Ankerst, Markus M Breunig, Hans-Peter Kriegel, and J¨org Sander. Optics: ordering points to identify the clustering structure. ACM SIGMOD Record, 28(2):49–60, 1999. [2] Asa Ben-Hur, David Horn, Hava T Siegelmann, and Vladimir Vapnik. Support vector clustering. The Journal of Machine Learning Research, 2:125–137, 2002. [3] G´erard Biau, Benoˆıt Cadre, and Bruno Pelletier. A graph-based estimator of the number of clusters. ESAIM: Probability and Statistics, 11(1):272–280, 2007. 8 [4] Gunnar Carlsson and Facundo M´emoli. Characterization, stability and convergence of hierarchical clustering methods. The Journal of Machine Learning Research, 99:1425–1470, 2010. [5] Gunnar Carlsson and Facundo M´emoli. Multiparameter hierarchical clustering methods. In Classification as a Tool for Research, pages 63–70. Springer, 2010. [6] Antonio Cuevas, Manuel Febrero, and Ricardo Fraiman. Cluster analysis: a further approach based on density estimation. Computational Statistics & Data Analysis, 36(4):441–459, 2001. [7] Sanjoy Dasgupta. Two faces of active learning. Theoretical Computer Science, 412(19):1767– 1781, 2011. [8] Sanjoy Dasgupta and Daniel Hsu. Hierarchical sampling for active learning. In ICML, pages 208–215. ACM, 2008. [9] Martin Ester, Hans-Peter Kriegel, J¨org Sander, and Xiaowei Xu. A density-based algorithm for discovering clusters in large spatial databases with noise. In KDD, volume 96, pages 226–231, 1996. [10] M Forina, C Armanino, S Lanteri, and E Tiscornia. Classification of olive oils from their fatty acid composition. Food Research and Data Analysis, pages 189–214, 1983. [11] Assaf Glazer, Michael Lindenbaoum, and Shaul Markovitch. q-ocsvm: A q-quantile estimator for high-dimensional distributions. In Advances in Neural Information Processing Systems, pages 503–511, 2013. [12] I. Gronau, M. J. Hubisz, et al. Bayesian inference of ancient human demography from individual genome sequences. Nature Genetics, 43(10):1031–1034, Oct 2011. [13] John A Hartigan. Clustering Algorithms. John Wiley & Sons, Inc., New York, 1975. [14] Anil K Jain. Data clustering: 50 years beyond k-means. Pattern Recognition Letters, 31(8): 651–666, 2010. [15] Daphne Koller and Mehran Sahami. Hierarchically classifying documents using very few words. In ICML, pages 170–178. Morgan Kaufmann Publishers Inc., 1997. [16] Bjornar Larsen and Chinatsu Aone. Fast and effective text mining using linear-time document clustering. In SIGKDD, ACM, pages 16–22, 1999. [17] ´Alvaro Mart´ınez-P´erez. A density-sensitive hierarchical clustering method. arXiv preprint arXiv:1210.6292, 2012. [18] Philippe Rigollet and R´egis Vert. Optimal rates for plug-in estimators of density level sets. Bernoulli, 15(4):1154–1178, 2009. [19] Alessandro Rinaldo, Aarti Singh, Rebecca Nugent, and Larry Wasserman. Stability of densitybased clustering. Journal of Machine Learning Research, 13:905–948, 2012. [20] Bernhard Sch¨olkopf, John C. Platt, John C. Shawe-Taylor, Alex J. Smola, and Robert C. Williamson. Estimating the support of a high-dimensional distribution. Neural Computation, 13(7):1443–1471, 2001. [21] Michael Steinbach, George Karypis, and Vipin Kumar. A comparison of document clustering techniques. In KDD Workshop on Text Mining, 2000. [22] Werner Stuetzle. Estimating the cluster tree of a density by analyzing the minimal spanning tree of a sample. Journal of Classification, 20(1):025–047, 2003. [23] Werner Stuetzle and Rebecca Nugent. A generalized single linkage method for estimating the cluster tree of a density. Journal of Computational and Graphical Statistics, 19(2), 2010. [24] The 1000 Genomes Project Consortium. An integrated map of genetic variation from 1,092 human genomes. Nature, 491:1, 2012. [25] Ruth Urner, Sharon Wulff, and Shai Ben-David. Plal: Cluster-based active learning. In COLT, pages 1–22, 2013. [26] G. Walther. Granulometric smoothing. The Annals of Statistics, pages 2273–2299, 1997. [27] David Wishart. Mode analysis: A generalization of nearest neighbor which reduces chaining effects. Numerical Taxonomy, 76:282–311, 1969. [28] Rui Xu, Donald Wunsch, et al. Survey of clustering algorithms. IEEE Transactions on Neural Networks, 16(3):645–678, 2005. 9
2014
233
5,329
Diverse Randomized Agents Vote to Win Albert Xin Jiang Trinity University xjiang@trinity.edu Leandro Soriano Marcolino USC sorianom@usc.edu Ariel D. Procaccia CMU arielpro@cs.cmu.edu Tuomas Sandholm CMU sandholm@cs.cmu.edu Nisarg Shah CMU nkshah@cs.cmu.edu Milind Tambe USC tambe@usc.edu Abstract We investigate the power of voting among diverse, randomized software agents. With teams of computer Go agents in mind, we develop a novel theoretical model of two-stage noisy voting that builds on recent work in machine learning. This model allows us to reason about a collection of agents with different biases (determined by the first-stage noise models), which, furthermore, apply randomized algorithms to evaluate alternatives and produce votes (captured by the secondstage noise models). We analytically demonstrate that a uniform team, consisting of multiple instances of any single agent, must make a significant number of mistakes, whereas a diverse team converges to perfection as the number of agents grows. Our experiments, which pit teams of computer Go agents against strong agents, provide evidence for the effectiveness of voting when agents are diverse. 1 Introduction Recent years have seen a surge of work at the intersection of social choice and machine learning. In particular, significant attention has been given to the learnability and applications of noisy preference models [16, 2, 1, 3, 24]. These models enhance our understanding of voters’ behavior in elections, and provide a theoretical basis for reasoning about crowdsourcing systems that employ voting to aggregate opinions [24, 8]. In contrast, this paper presents an application of noisy preference models to the design of systems of software agents, emphasizing the importance of voting and diversity. Our starting point is two very recent papers by Marcolino et al. [19, 20], which provide a new perspective on voting among multiple software agents. Their empirical results focus on Computer Go programs (see, e.g., [10]), which often use Monte Carlo tree search algorithms [7]. Taking the team formation point of view, Marcolino et al. establish that a team consisting of multiple (four to six) different computer Go programs that use plurality voting — each agent giving one point to a favorite alternative — to decide on each move outperforms a team consisting of multiple copies of the strongest program (which is better than a single copy because the copies are initialized with different random seeds). The insight is that even strong agents are likely to make poor choices in some states, which is why diversity beats strength. And while the benefits of diversity in problem solving are well studied [12, 13, 6, 14], the setting of Marcolino et al. combines several ingredients. First, performance is measured across multiple states; as they point out, this is also relevant when making economic decisions (such as stock purchases) across multiple scenarios, or selecting item recommendations for multiple users. Second, agents’ votes are based on randomized algorithms; this is also a widely applicable assumption, and in fact even Monte Carlo tree search specifically is used for problems ranging from traveling salesman to classical (deterministic) planning, not to mention that randomization is often used in many other AI applications. 1 Focusing on the computer Go application, we find it exciting because it provides an ideal example of voting among teams of software agents: It is difficult to compare quality scores assigned by heterogeneous agents to different moves, so optimization approaches that rely on cardinal utilities fall short while voting provides a natural aggregation method. More generally the setting’s new ingredients call for a novel model of social choice, which should be rich enough to explain the empirical finding that diversity beats strength. However, the model suggested by Marcolino et al. [19] is rather rudimentary: they prove that a diverse team would outperform copies of the strongest agent only if one of the weaker agents outperforms the strongest agent in at least one state; their model cannot quantify the advantage of diversity. Marcolino et al. [20] present a similar model, but study the effect of increasing the size of the action space (i.e., the board size in the Go domain). More importantly, Marcolino et al. [19, 20] — and other related work [6] — assume that each agent votes for a single alternative. In contrast, it is potentially possible to design agents that generate a ranking of multiple alternatives, calling for a principled way to harness this additional information. 1.1 Our Approach and Results We introduce the following novel, abstract model of voting, and instantiate it using Computer Go. In each state, which corresponds to a board position in Go, there is a ground truth, which captures the true quality of different alternatives — feasible moves in Go. Heuristic agents have a noisy perception of the quality of alternatives. We model this using a noise model for each agent, which randomly maps the ground truth to a ranking of the alternatives, representing the agent’s biased view of their qualities. But if a single agent is presented with the same state twice, the agent may choose two different alternatives. This is because agents are assumed to be randomized. For example, as mentioned above, most computer Go programs, such as Fuego [10], rely on Monte Carlo Tree Search to randomly decide between different moves. We model this additional source of noise via a second noise model, which takes the biased ranking as input, and outputs the agent’s vote (another ranking of the alternatives). A voting rule is employed to select a single alternative (possibly randomly) by aggregating the agents’ votes. Our main theoretical result is the following theorem, which is, in a sense, an extension of the classic Condorcet Jury Theorem [9]. Theorem 2 (simplified and informal). (i) Under extremely mild assumptions on the noise models and voting rule, a uniform team composed of copies of any single agent (even the “strongest” one with the most accurate noise models), for any number of agents and copies, is likely to vote for suboptimal alternatives in a significant fraction of states; (ii) Under mild assumptions on the noise models and voting rule, a diverse team composed of a large number of different agents is likely to vote for optimal alternatives in almost every state. We show that the assumptions in both parts of the theorem are indeed mild by proving that three wellknown noise models — the Mallows-φ model [18], The Thurstone-Mosteller model [26, 21], and the Plackett-Luce model [17, 23] — satisfy the assumptions in both parts of the theorem. Moreover, the assumptions on the voting rule are satisfied by almost all prominent voting rules. We also present experimental results in the Computer Go domain. As stated before, our key methodological contributions are a procedure for automatically generating diverse teams by using different parameterizations of a Go program, and a novel procedure for extracting rankings of moves from algorithms that are designed to output only a single good move. We show that the diverse team significantly outperforms the uniform team under the plurality rule. We also show that it is possible to achieve better performance by extracting rankings from agents using our novel methodology, and aggregating them via ranked voting rules. 2 Background We use [k] as shorthand for {1, . . . , k}. A vote is a total order (ranking) over the alternatives, usually denoted by σ. The set of rankings over a set of alternatives A is denoted by L(A). For a ranking σ, we use σ(i) to denote the alternative in position i in σ, so, e.g., σ(1) is the most preferred alternative in σ. We also use σ([k]) to denote {σ(1), . . . , σ(k)}. A collection of votes is called a profile, denoted by π. A deterministic voting rule outputs a winning alternative on each profile. For a randomized voting rule f (or simply a voting rule), the output f(π) is a distribution over the alternatives. A 2 voting rule is neutral if relabeling the alternatives relabels the output accordingly; in other words, the output of the voting rule is independent of the labels of the alternatives. All prominent voting rules, when coupled with uniformly random tie breaking, are neutral. Families of voting rules. Next, we define two families of voting rules. These families are quite wide, disjoint, and together they cover almost all prominent voting rules. • Condorcet consistency. An alternative is called the Condorcet winner in a profile if it is preferred to every other alternative in a majority of the votes. Note that there can be at most one Condorcet winner. A voting rule is called Condorcet consistent if it outputs the Condorcet winner (with probability 1) whenever it exists. Many famous voting rules such as Kemeny’s rule, Copeland’s rule, Dodgson’s rule, the ranked pairs method, the maximin rule, and Schulze’s method are Condorcet consistent. • PD-c Rules [8]. This family is a generalization of positional scoring rules that include prominent voting rules such as plurality and Borda count. While the definition of Caragiannis et al. [8] outputs rankings, we naturally modify it to output winning alternatives. Let Tπ(k, a) denote the number of times alternative a appears among first k positions in profile π. Alternative a is said to position-dominate alternative b in π if Tπ(k, a) > Tπ(k, b) for all k ∈[m −1], where m is the number of alternatives in π. An alternative is called the position-dominating winner if it position-dominates every other alternative in a profile. It is easy to check that there can be at most one position-dominating winner. A voting rule is called position-dominance consistent (PD-c) if it outputs the position-dominating winner (with probability 1) whenever it exists. Caragiannis et al. [8] show that all positional scoring rules (including plurality and Borda count) and Bucklin’s rule are PD-c (as rules that output rankings). We show that this holds even when the rules output winning alternatives. This is presented as Proposition 1 in the online appendix (specifically, Appendix A). Caragiannis et al. [8] showed that PD-c rules are disjoint from Condorcet consistent rules (actually, for rules that output rankings, they use a natural generalization of Condorcet consistent rules that they call PM-c rules). Their proof also establishes the disjointness of the two families for rules that output winning alternatives. 2.1 Noise Models One view of computational social choice models the votes as noisy estimates of an unknown true order of the alternatives. These votes come from a distribution that is parametrized by some underlying ground truth. The ground truth can itself be the true order of alternatives, in which case we say that the noise model is of the rank-to-rank type. The ground truth can also be an objective true quality level for each alternative, which is more fine-grained than a true ranking of alternatives. In this case, we say that the noise model is of the quality-to-rank type. See [15] for examples of quality-to-rank models and how they are learned. Note that the output votes are rankings over alternatives in both cases. We denote the ground truth by θ. It defines a true ranking of the alternatives (even when the ground truth is a quality level for each alternative), which we denote by σ∗. Formally, a noise model P is a set of distributions over rankings — the distribution corresponding to the ground truth θ is denoted by P(θ). The probability of sampling a ranking σ from P(θ) is denoted by PrP [σ; θ]. Similarly to voting rules, a noise model is called neutral if relabeling the alternatives permutes the probabilities of various rankings accordingly. Formally, a noise model P is called neutral if PrP [σ; θ] = PrP [τσ; τθ], for every permutation τ of the alternatives, every ranking σ, and every ground truth θ. Here, τσ and τθ denote the result of applying τ on σ and θ, respectively. Classic noise models. Below, we define three classical noise models: • The Mallows-φ model [18]. This is a rank-to-rank noise model, where the probability of a ranking decreases exponentially in its distance from the true ranking. Formally, the Mallows-φ model for m alternatives is defined as follows. For all rankings σ and σ∗, Pr[σ; σ∗] = φdKT (σ,σ∗) Zm φ , (1) 3 where dKT is the Kendall-Tau distance that measures total pairwise disagreement between two rankings, and the normalization constant Zm φ = Qm k=1 Pk−1 j=0 φj is independent of σ∗. • The Thurstone-Mosteller (TM) [26, 21] and the Plackett-Luce (PL) [17, 23] models. Both models are of the quality-to-rank type, and are special cases of a more general random utility model (see [2] for its use in social choice). In a random utility model, each alternative a has an associated true quality parameter θa and a distribution µa parametrized by θa. In each sample from the model, a noisy quality estimate Xa ∼µa(θa) is obtained, and the ranking where the alternatives are sorted by their noisy qualities is returned. For the Thurstone-Mosteller model, µa(θa) is taken to be the normal distribution N(θa, ν2) with mean θa, and variance ν2. Its PDF is f(x) = 1 √ 2πν2 e−(x−θa)2 2ν2 . For the Plackett-Luce model, µa(θa) is taken to be the Gumbel distribution G(θa). Its PDF follows f(x) = e−(x−θa)−e−(x−θa). The CDF of the Gumbel distribution G(θa) is given by F(x) = e−e−(x−θa). Note that we do not include a variance parameter because this subset of Gumbel distributions is sufficient for our purposes. The Plackett-Luce model has an alternative, more intuitive, formulation. Taking λa = eθa, the probability of obtaining a ranking is the probability of sequentially choosing its alternatives from the pool of remaining alternatives. Each time, an alternative is chosen among a pool proportional to its λ value. Hence, Pr[σ; {λa}] = Qm i=1 λσ(i) Pm j=i λσ(j) , where m is the number of alternatives. 3 Theoretical Results In this section, we present our theoretical results. But, first, we develop a novel model that will provide the backdrop for these results. Let N = {1, . . . , n} be a set of agents. Let S be the set of states of the world, and let |S| = t. These states represent different scenarios in which the agents need to make decisions; in Go, these are board positions. Let µ denote a probability distribution over states in S, which represents how likely it is to encounter each state. Each state s ∈S has a set of alternatives As, which is the set of possible actions the agents can choose in state s. Let |As| = ms for each s ∈S. We assume that the set of alternatives is fixed in each state. We will later see how our model and results can be adjusted for varying sets of alternatives. The ground truth in state s ∈S is denoted by θs, and the true ranking in state s is denoted by σ∗ s. Votes of agents. The agents are presented with states sampled from µ. Their goal is to choose the true best alternative, σ∗ s(1), in each state s ∈S (although we discuss why our results also hold when the goal is to maximize expected quality). The inability of the agents to do so arises from two different sources: the suboptimal heuristics encoded within the agents, and their inability to fully optimize according to their own heuristics — these are respectively modeled by two noise models P 1 i and P 2 i associated with each agent i. The agents inevitably employ heuristics (in domains like Go) and therefore can only obtain a noisy evaluation of the quality of different alternatives, which is modeled by the noise model P 1 i of agent i. The biased view of agent i for the true order of the alternatives in As, denoted σis, is modeled as a sample from the distribution P 1 i (σ∗ s). Moreover, we assume that the agents’ decision making is randomized. For example, top computer Go programs use Monte Carlo tree search algorithms [7]. We therefore assume that each agent i has another associated noise model P 2 i such that the final ranking that the agent returns is a sample from P 2 i (σis). To summarize, agent i’s vote is obtained by first sampling its biased truth from P 1 i , and then sampling its vote from P 2 i . It is clear that the composition P 2 i ◦P 1 i plays a crucial role in this process. Agent teams. Since the agents make errors in estimating the best alternative, it is natural to form a team of agents and aggregate their votes. We consider two team formation methods: a uniform team comprising of multiple copies of a single agent that share the same biased truths but have different final votes due to randomness; and a diverse team comprising of a single copy of each agent with different biased truths and different votes. We show that the diverse team outperforms the uniform team irrespective of the choice of the agent that is copied in the uniform team. 4 3.1 Restrictions on Noise Models No team can perform well if the noise models P 1 i and P 2 i lose all useful information. Hence, we impose intuitive restrictions on the noise models; our restrictions are mild, as we demonstrate (Theorem 1) that the three classical noise models presented in Section 2.1 satisfy all our assumptions. PM-α Noise Model For α > 0, a neutral noise model P is called pairwise majority preserving with strength α (or PM-α) if for every ground truth θ (and the corresponding true ranking σ∗) and every i < j, we have Prσ∼P (θ)[σ∗(i) ≻σ σ∗(j)] ≥Prσ∼P (θ)[σ∗(j) ≻σ σ∗(i)] + α, (2) where ≻σ is the preference relation of a ranking σ sampled from P(θ). Note that this definition applies to both quality-to-rank and rank-to-rank noise models. In other words, in PM-α noise models every pairwise comparison in the true ranking is preserved in a sample with probability at least α more than the probability of it not being preserved. PD-α Noise Model For α > 0, a neutral noise model is called position-dominance preserving with strength α (or PD-α) if for every ground truth θ (and the corresponding true ranking σ∗), every i < j, and every k ∈[m −1] (where m is the number of alternatives), Prσ∼P (θ)[σ∗(i) ∈σ([k])] ≥Prσ∼P (θ)[σ∗(j) ∈σ([k])] + α. (3) That is, for every k ∈[m −1], an alternative higher in the true ranking has probability higher by at least α of appearing among the first k positions in a vote than an alternative at a lower position in the true ranking. Compositions of noise models with restrictions. As mentioned above, compositions of noise models play an important role in our work. The next lemma shows that our restrictions on noise models are preserved, in a sense, under composition; its proof appears in Appendix B. Lemma 1. For α1, α2 > 0, the composition of a PD-α1 noise model with a PD-α2 noise model is a PD-(α1 · α2) noise model. Unfortunately, a similar result does not hold for PM-α noise models; the composition of a PM-α1 noise model and a PM-α2 noise model may yield a noise model that is not PM-α for any α > 0. In Appendix C, we give such an example. While this is slightly disappointing, we show that a stronger assumption on the first noise model in the composition suffices. PPM-α Noise Model For α > 0, a neutral noise model P is called positional pairwise majority preserving (or PPM-α) if for every ground truth θ (and the corresponding true ranking σ∗) and every i < j, the quantity Prσ∼P (θ)[σ(i′) = σ∗(i) ∧σ(j′) = σ∗(j)] −Prσ∼P (θ)[σ(j′) = σ∗(i) ∧σ(i′) = σ∗(j)] (4) is non-negative for every i′ < j′, and at least α for some i′ < j′. That is, for i′ < j′, the probability that σ∗(i) and σ∗(j) go to positions i′ and j′ respectively in a vote should be at least as high as the probability of them going to positions j′ and i′ respectively (and at least α greater for some i′ and j′). Summing Equation (4) over all i′ < j′ shows that every PPM-α noise model is also PM-α. Lemma 2. For α1, α2 > 0, if noise models P 1 and P 2 are PPM-α1 and PM-α2, respectively, then their composition P 2 ◦P 1 is PM-(α1 · α2). The lemma’s proof is relegated to Appendix D. 3.2 Team Formation and the Main Theoretical Result Let us explain the process of generating votes for the uniform team and for the diverse team. Consider a state s ∈S. For the uniform team consisting of k copies of agent i, the biased truth σis is drawn from P 1 i (θs), and is common to all the copies. Each copy j then individually draws a vote πj is from P 2 i (σis); we denote the collection of these votes by πk is = (π1 is, . . . , πk is). Under a voting rule f, let Xk is = I[f(πk is) = σ∗ s(1)] be the indicator random variable denoting whether the uniform 5 team selects the best alternative, namely σ∗ s(1). Finally, agent i is chosen to maximize the overall accuracy E[Xk is], where the expectation is over the state s and the draws from P 1 i and P 2 i . The diverse team consists of one copy of each agent i ∈N. Importantly, although we can take multiple copies of each agent and a total of k copies, we show that taking even a single copy of each agent outperforms the uniform team. Each agent i has its own biased truth σis drawn from P 1 i (θs), and it draws its vote ψis from P 2 i (σis). This results in the profile ψn s = (ψ1s, . . . , ψns). Let Y n s = I[f(ψn s ) = σ∗ s(1)] be the indicator random variable denoting whether the diverse team selects the best alternative, namely σ∗ s(1). Below we put forward a number of assumptions on noise models; different subsets of assumptions are required for different results. We remark that each agent i ∈N has two noise models for each possible number of alternatives m. However, for the sake of notational convenience, we refer to these noise models as P 1 i and P 2 i irrespective of m. This is natural, as the classic noise models defined in Section 2.1 describe a noise model for each m. A1 For each agent i ∈N, the associated noise models P 1 i and P 2 i are neutral. A2 There exists a universal constant η > 0 such that for each agent i ∈N, every possible ground truth θ (and the corresponding true ranking σ∗), and every k ∈[m] (where m is the number of alternatives), Prσ∼P 1 i (θ)[σ∗(1) = σ(k)] ≤1 −η. In words, assumption A2 requires that the true best alternative appear in any particular position with probability at most a constant which is less than 1. This ensures that the noise model indeed introduces a non-zero constant amount of noise in the position of the true best alternative. A3 There exists a universal constant α > 0 such that for each agent i ∈N, the noise models P 1 i and P 2 i are PD-α. A4 There exists a universal constant α > 0 such that for each agent i ∈N, the noise models P 1 i and P 2 i are PPM-α and PM-α, respectively. We show that the preceding assumptions are indeed very mild in that classical noise models introduced in Section 2.1 satisfy all four assumptions. The proof of the following result appears in Appendix E. Theorem 1. With a fixed set of alternatives (such that the true qualities of every two alternatives are distinct in the case where the ground truth is the set of true qualities), the Mallows-φ model with φ ∈[ρ, 1 −ρ], the Thurstone-Mosteller model with variance parameter σ2 ∈[L, U], and the Plackett-Luce model all satisfy assumption A1, A2, A3, and A4, given that ρ ∈(0, 1/2), L > 0, and U > L are constants. We are now ready to present our main result; its proof appears in Appendix F. Theorem 2. Let µ be a distribution over the state space S. Let the set of alternatives in all states {As}s∈S be fixed. 1. Under the assumptions A1 and A2, and for any neutral voting rule f, there exists a universal constant c > 0 such that for every k and every N = {1, . . . , n}, it holds that maxi∈N E[Xk is] ≤1 −c, where the expectation is over the state s ∼µ, the ground truths σis ∼P 1 i (θs) for all s ∈S, and the votes πj is ∼P 2 i (σis) for all j ∈[k]. 2. Under each of the following two conditions, for a voting rule f, it holds that limn→∞E[Y n s ] = 1, where the expectation is over the state s ∼µ, the biased truths σis ∼P 1 i (θs) for all i ∈N and s ∈S, and the votes ψis ∼P 2 i (σis) for all i ∈N and s ∈S: (i) assumptions A1 and A3 hold, and f is PD-c; (ii) assumptions A1 and A4 hold, and f is Condorcet consistent. 4 Experimental Results We now present our experimental results in the Computer Go domain. We use a novel methodology for generating large teams, which we view as one of our main contributions. It is fundamentally 6 2 5 10 15 20 25 Number of Agents 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 Winning Rate Diverse Uniform (a) Plurality voting rule 2 5 10 15 Number of Agents 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Winning Rate Plurality Borda Harmonic Maximin Copeland (b) All voting rules Figure 1: Winning rates for Diverse (continuous line) and Uniform (dashed line), for a variety of team sizes and voting rules. different from that of Marcolino et al. [19, 20], who created a diverse team by combining four different, independently developed Go programs. Here we automatically create arbitrarily many diverse agents by parameterizing one Go program. Specifically, we use different parametrizations of Fuego 1.1 [10]. Fuego is a state-of-the-art, open source, publicly available Go program; it won first place in 19×19 Go in the Fourth Computer Go UEC Cup, 2010, and also won first place in 9×9 Go in the 14th Computer Olympiad, 2009. We sample random values for a set of parameters for each generated agent, in order to change its behavior. In Appendix G we list the sampled parameters, and the range of sampled values. The original Fuego is the strongest agent, as we show in Appendix H. All results were obtained by simulating 1000 9×9 Go games, in an HP dl165 with dual dodeca core, 2.33GHz processors and 48GB of RAM. We compare the winning rates of games played against a fixed opponent. In all games the system under evaluation plays as white, against the original Fuego playing as black. We evaluate two types of teams: Diverse is composed of different agents, and Uniform is composed of copies of a specific agent (with different random seeds). In order to study the performance of the uniform team, for each sample (which is an entire Go game) we construct a team consisting of copies of a randomly chosen agent from the diverse team. Hence, the results presented for Uniform are approximately the mean behavior of all possible uniform teams, given the set of agents in the diverse team. In all graphs, the error bars show 99% confidence intervals. Fuego (and, in general, all programs using Monte Carlo tree search algorithms) is not originally designed to output a ranking over all possible moves (alternatives), but rather to output a single move — the best one according to its search tree (of course, there is no guarantee that the selected move is in fact the best one). In this paper, however, we wish to compare plurality (which only requires each agent’s top choice) with voting rules that require an entire ranking from each agent. Hence, we modified Fuego to make it output a ranking over moves, by using the data available in its search tree (we rank by the number of simulations per alternative). We ran games under 5 different voting rules: plurality, Borda count, the harmonic rule, maximin, and Copeland. Plurality, Borda count (which we limit to the top 6 positions in the rankings), and the harmonic rule (see Appendix A) are PD-c rules, while maximin and Copeland are Condorcet-consistent rules (see, e.g., [24]). We first discuss Figure 1(a), which shows the winning rates of Diverse and Uniform for a varying number of agents using the plurality voting rule. The winning rates of both teams increase as the number of agents increases. Diverse and Uniform start with similar winning rates, around 35% with 2 agents and 40% with 5 agents, but with 25 agents Diverse reaches 57%, while Uniform only reaches 45.9%. The improvement of Diverse over Uniform is not statistically significant with 5 agents (p = 0.5836), but is highly statistically significant with 25 agents (p = 8.592 × 10−7). We perform linear regression on the winning rates of the two teams to compare their rates of improvement in performance as the number of agents increases. Linear regression (shown as the dotted lines in Figure 1(a)) gives the function y = 0.0094x + 0.3656 for Diverse (R2 = 0.9206, p = 0.0024) and y = 0.0050x + 0.3542 for Uniform (R2 = 0.8712, p = 0.0065). In particular, the linear approximation for the winning rate of Diverse increases roughly twice as fast as the one for Uniform as the number of agents increases. 7 Despite the strong performance of Diverse (it beats the original Fuego more than 50% of the time), it seems surprising that its winning rate converges to a constant that is significantly smaller than 1, in light of Theorem 2. There are (at least) two reasons for this apparent discrepancy. First, Theorem 2 deals with the probability of making good moves in individual board positions (states), whereas the figure shows winning rates. Even if the former probability is very high, a bad decision in a single state of a game can cost Diverse the entire game. Second, our diverse team is formed by randomly sampling different parametrizations of Fuego. Hence, there might still exist a subset of world states where all agents would play badly, regardless of the parametrization. In other words, the parametrization procedure may not be generating the idealized diverse team (see Appendix H). Figure 1(b) compares the results across different voting rules. As mentioned above, to generate ranked votes, we use the internal data in the search tree of an agent’s run (in particular, we rank using the number of simulations per alternative). We can see that increasing the number of agents has a positive impact for all voting rules under consideration. Moving from 5 to 15 agents for Diverse, plurality has a 14% increase in the winning rate, whereas other voting rules have a mean increase of only 6.85% (std = 2.25%), close to half the improvement of plurality. For Uniform, the impact of increasing the number of agents is much smaller: Moving from 5 to 15 agents, the increase for plurality is 5.3%, while the mean increase for other voting rules is 5.70%(std = 1.45%). Plurality surprisingly seems to be the best voting rule in these experiments, even though it uses less information from the submitted rankings. This suggests that the ranking method used does not typically place good alternatives in high positions other than the very top. Plurality Non-sampled Plurality Sampled Borda Harmonic Maximin Copeland 0.0 0.1 0.2 0.3 0.4 0.5 0.6 Winning Rate Figure 2: All voting rules, for Diverse with 5 agents, using the new ranking methodology. Hence, we introduce a novel procedure to generate rankings, which we view as another major methodological contribution. To generate a ranked vote from an agent on a given board state, we run the agent on the board state 10 times (each run is independent of other runs), and rank the moves by the number of times they are played by the agent. We use these votes to compare plurality with the four other voting rules, for Diverse with 5 agents. Figure 2 shows the results. All voting rules outperform plurality; Borda and maximin are statistically significantly better (p < 0.007 and p = 0.06, respectively). All ranked voting rules are also statistically significantly better than the non-sampled (single run) version of plurality. 5 Discussion While we have focused on computer Go for motivation, we have argued in Section 1 that our theoretical model is more widely applicable. At the very least, it is relevant to modeling game-playing agents in the context of other games. For example, random sampling techniques play a key role in the design of computer poker programs [25]. A complication in some poker games is that the space of possible moves, in some stages of the game, is infinite, but this issue can likely be circumvented via an appropriate discretization. Our theoretical model does have (at least) one major shortcoming when applied to multistage games like Go or poker: it assumes that the state space is “flat”. So, for example, making an excellent move in one state is useless if the agent makes a horrible move in a subsequent state. Moreover, rather than having a fixed probability distribution µ over states, the agents’ strategies actually determine which states are more likely to be reached. To the best of our knowledge, existing models of voting do not capture sequential decision making — possibly with a few exceptions that are not relevant to our setting, such as the work of Parkes and Procaccia [22]. From a theoretical and conceptual viewpoint, the main open challenge is to extend our model to explicitly deal with sequentiality. Acknowledgments: Procaccia and Shah were partially supported by the NSF under grants IIS1350598 and CCF-1215883, and Marcolino by MURI grant W911NF-11-1-0332. 8 References [1] H. Azari Soufiani, W. Z. Chen, D. C. Parkes, and L. Xia. Generalized method-of-moments for rank aggregation. In Proc. of 27th NIPS, pages 2706–2714, 2013. [2] H. Azari Soufiani, D. C. Parkes, and L. Xia. Random utility theory for social choice. In Proc. of 26th NIPS, pages 126–134, 2012. [3] H. Azari Soufiani, D. C. Parkes, and L. Xia. Computing parametric ranking models via rank-breaking. In Proc. of 31st ICML, 2014. Forthcoming. [4] P. Baudi˘s and J. l. Gailly. PACHI: State of the art open source go program. In Proc. of 13th ACG, pages 24–38, 2011. [5] C. Boutilier, I. Caragiannis, S. Haber, T. Lu, A. D. Procaccia, and O. Sheffet. Optimal social choice functions: A utilitarian view. In Proc. of 13th EC, pages 197–214, 2012. [6] Y. Braouezec. Committee, expert advice, and the weighted majority algorithm: An application to the pricing decision of a monopolist. Computational Economics, 35(3):245–267, 2010. [7] C. Browne, E. J. Powley, D. Whitehouse, S. M. Lucas, P. I. Cowling, P. Rohlfshagen, S. Tavener, D. Perez, S. Samothrakis, and S. Colton. A survey of Monte Carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in Games, 4(1):1–43, 2012. [8] I. Caragiannis, A. D. Procaccia, and N. Shah. When do noisy votes reveal the truth? In Proc. of 14th EC, pages 143–160, 2013. [9] M. de Condorcet. Essai sur l’application de l’analyse `a la probabilit´e de d´ecisions rendues `a la pluralit´e de voix. Imprimerie Royal, 1785. Facsimile published in 1972 by Chelsea Publishing Company, New York. [10] M. Enzenberger, M. M¨uller, B. Arneson, and R. Segal. Fuego — an open-source framework for board games and Go engine based on Monte Carlo tree search. IEEE Transactions on Computational Intelligence and AI in Games, 2(4):259–270, 2010. [11] E. Hellinger. Neue begr¨undung der theorie quadratischer formen von unendlichvielen ver¨anderlichen. Journal f¨ur die reine und angewandte Mathematik, 136:210–271, 1909. In German. [12] L. Hong and S. E. Page. Groups of diverse problem solvers can outperform groups of high ability problem solvers. Proceedings of the National Academy of Sciences of the United States of America, 101(46):16385–16389, 2004. [13] L. Hong and S. E. Page. Some microfoundations of collective wisdom. In H. Landemore and J. Elster, editors, Collective Wisdom, pages 56–71. Cambridge University Press, 2009. [14] M. LiCalzi and O. Surucu. The power of diversity over large solution spaces. Management Science, 58(7):1408–1421, 2012. [15] T.-Y. Liu. Learning to Rank for Information Retrieval. Springer, 2011. [16] T. Lu and C. Boutilier. Learning Mallows models with pairwise preferences. In Proc. of 28th ICML, pages 145–152, 2011. [17] R. D. Luce. Individual choice behavior: A theoretical analysis. Wiley, 1959. [18] C. L. Mallows. Non-null ranking models. Biometrika, 44:114–130, 1957. [19] L. S. Marcolino, A. X. Jiang, and M. Tambe. Multi-agent team formation — diversity beats strength? In Proc. of 23rd IJCAI, pages 279–285, 2013. [20] L. S. Marcolino, H. Xu, A. X. Jiang, M. Tambe, and E. Bowring. Give a hard problem to a diverse team: Exploring large action spaces. In Proc. of 28th AAAI, 2014. [21] F. Mosteller. Remarks on the method of paired comparisons: I. the least squares solution assuming equal standard deviations and equal correlations. Psychometrika, 16(1):3–9, 1951. [22] D. C. Parkes and A. D. Procaccia. Dynamic social choice with evolving preferences. In Proc. of 27th AAAI, pages 767–773, 2013. [23] R. Plackett. The analysis of permutations. Applied Statistics, 24:193–202, 1975. [24] A. D. Procaccia, S. J. Reddi, and N. Shah. A maximum likelihood approach for selecting sets of alternatives. In Proc. of 28th UAI, pages 695–704, 2012. [25] T. Sandholm. The state of solving large incomplete-information games, and application to Poker. AI Magazine, 31(4):13–32, 2010. [26] L. L. Thurstone. A law of comparative judgement. Psychological Review, 34:273–286, 1927. 9
2014
234
5,330
Consistency of Spectral Partitioning of Uniform Hypergraphs under Planted Partition Model Debarghya Ghoshdastidar Ambedkar Dukkipati Department of Computer Science & Automation Indian Institute of Science Bangalore – 560012, India {debarghya.g,ad}@csa.iisc.ernet.in Abstract Spectral graph partitioning methods have received significant attention from both practitioners and theorists in computer science. Some notable studies have been carried out regarding the behavior of these methods for infinitely large sample size (von Luxburg et al., 2008; Rohe et al., 2011), which provide sufficient confidence to practitioners about the effectiveness of these methods. On the other hand, recent developments in computer vision have led to a plethora of applications, where the model deals with multi-way affinity relations and can be posed as uniform hypergraphs. In this paper, we view these models as random m-uniform hypergraphs and establish the consistency of spectral algorithm in this general setting. We develop a planted partition model or stochastic blockmodel for such problems using higher order tensors, present a spectral technique suited for the purpose and study its large sample behavior. The analysis reveals that the algorithm is consistent for m-uniform hypergraphs for larger values of m, and also the rate of convergence improves for increasing m. Our result provides the first theoretical evidence that establishes the importance of m-way affinities. 1 Introduction The central theme in approaches like kernel machines [1] and spectral clustering [2, 3] is the use of symmetric matrices that encode certain similarity relations between pairs of data instances. This allows one to use the tools of matrix theory to design efficient algorithms and provide theoretical analysis for the same. Spectral graph theory [4] provides classic examples of this methodology, where various hard combinatorial problems pertaining to graphs are relaxed to problems of matrix theory. In this work, we focus on spectral partitioning, where the aim is to group the nodes of a graph into disjoint sets using the eigenvectors of the adjacency matrix or the Laplacian operator. A statistical framework for this partitioning problem is the planted partition or stochastic blockmodel [5]. Here, one assumes the existence of an unknown map that partitions the nodes of a random graph, and the probability of occurrence of any edge follows the partition rule. In a recent work, Rohe et al. [6] studied normalized spectral clustering under the stochastic blockmodel and proved that, for this method, the fractional number of misclustered nodes goes to zero as the sample size grows. However, recent developments in signal processing, computer vision and statistical modeling have posed numerous problems, where one is interested in computing multi-way similarity functions that compute similarity among more than two data points. A few applications are listed below. Example 1. In geometric grouping, one is required to cluster points sampled from a number of geometric objects or manifolds [7]. Usually, these objects are highly overlapping, and one cannot use standard distance based pairwise affinities to retrieve the desired clusters. Hence, one needs to construct multi-point similarities based on the geometric structure. A special case is the subspace clustering problem encountered in motion segmentation [7], face clustering [8] etc. 1 Example 2. The problem of point-set matching [9] underlies several problems in computer vision including image registration, object recognition, feature tracking etc. The problem is often formulated as finding a strongly connected component in a uniform hypergraph [9, 10], where the strongly connected component represents the correct matching. This formulation has the flavor of the standard problem of detecting cliques in random graphs. Both of the above problems are variants of the classic hypergraph partitioning problem, that arose in the VLSI community [11] in 1980s, and has been an active area of research till date [12]. Spectral approaches for hypergraph partitioning also exist in the literature [13, 14, 15], and various definitions of the hypergraph Laplacian matrix has been proposed based on different criteria. Recent studies [16] suggest an alternative representation of uniform hypergraphs in terms of the “affinity tensor”. Tensors have been popular in machine learning and signal processing for a considerable time (see [17]), and have even found use in graph partitioning and detecting planted partitions [17, 18]. But their role in hypergraph partitioning have been mostly overlooked in the literature. Recently, techniques have emerged in computer vision that use such affinity tensors in hypergraph partitioning [8, 9]. This paper provides the first consistency result on uniform hypergraph partitioning by analyzing the spectral decomposition of the affinity tensor. The main contributions of this work are the following. (1) We propose a planted partition model for random uniform hypergraphs similar to that of graphs [5]. We show that the above examples are special cases of the proposed partition model. (2) We present a spectral technique to extract the underlying partitions of the model. This method relies on a spectral decomposition of tensors [19] that can be computed in polynomial time, and hence, it is computationally efficient than the tensorial approaches in [10, 8]. (3) We analyze the proposed approach and provide almost sure bounds on the number of misclustered nodes. Our analysis reveals that the presented method is consistent almost surely in the grouping problem and for detection of a strongly connected component, whenever one uses m-way affinities for any m ≥3 and m ≥4, respectively. The derived rate of convergence also shows that the use of higher order affinities lead to a faster decay in the number of misclustered nodes. (4) We numerically demonstrate the performance of the approach on benchmark datasets. 2 Planted partitions in random uniform hypergraphs We describe the planted partition model for an undirected unweighted graph. Let ψ : {1, . . . , n} → {1, . . . , k} be an (unknown) partition of n nodes into k disjoint groups, i.e., ψi = ψ(i) denotes the partition in which node-i belongs. We also define an assignment matrix Zn ∈{0, 1}n×k such that (Zn)ij = 1 if j = ψi, and 0 otherwise. For some unknown symmetric matrix B ∈[0, 1]k×k, the random graph on the n nodes contains the edge (i, j) with probability Bψiψj. Let the symmetric matrix An ∈{0, 1}n×n be a realization of the affinity matrix of the random graph on n nodes. The aim is to identify Zn given the matrix An. In some cases, one also needs to estimate the entries in B. One can hope to achieve this goal for the following reason: If An ∈Rn×n contains the expected values of the entries in An conditioned on B and ψ, then one can write An as An = ZnBZT n [6]. Thus, if one can find An, then this relation can be used to find Zn. We generalize the partition model to uniform hypergraphs. A hypergraph is a structure on n nodes with multi-way connections or hyperedges. Formally, each hyperedge in an undirected unweighted hypergraph is a collection of an arbitrary number of vertices. A special case is that of m-uniform hypergraph, where each hyperedge contains exactly m nodes. One can note that a graph is a 2uniform hypergraph. An often cited example of uniform hypergraph is as follows [10]. Let the nodes be representative of points in an Euclidean space, where a hyperedge exists if the points are collinear. For m = 2, we obtain a complete graph that does not convey enough information about the nodes. However, for m = 3, the constructed hypergraph is a union of several connected components, each component representing a set of collinear points. The affinity relations of an muniform hypergraph can be represented in the form of an mth-order tensor An ∈{0, 1}n×n×...×n, which we call an affinity tensor. The entry (An)i1...im = 1 if there exists a hyperedge on nodes i1, . . . , im. One can observe that the tensor is symmetric, i.e., invariant under any permutation of indices. In some works [16], the tensor is scaled by a factor of 1/(m −1)! for certain reasons. Let ψ and Zn be as defined above, and B ∈[0, 1]k×...×k be an mth-order k-dimensional symmetric tensor. The random m-uniform hypergraph on the n nodes is constructed such that a hyperedge occurs on nodes i1, . . . , im with probability Bψi1...ψim . If An is a random affinity tensor of the 2 hypergraph, our aim is to find Zn or ψ from An. Notice that if An ∈Rn×...×n contains the expected values of the entries in An, then one can write the entries in An as (An)i1...im = Bψi1...ψim = k X j1,...,jm=1 Bj1...jm(Zn)i1j1 . . . (Zn)imjm. (1) The subscript n in the above terms emphasizes their dependence on the number of nodes. We now describe how two standard applications in computer vision can be formulated as the problem of detecting planted partitions in uniform hypergraphs. 2.1 Subspace clustering problem In motion segmentation [7, 20] or illumination invariant face clustering [8], the data belong to a high dimensional space. However, the instances belonging to each cluster approximately span a low-dimensional subspace (usually, of dimension 3 or 4). Here, one needs to check whether m points approximate such a subspace, where this information is useful only when m is larger than the dimension of the underlying subspace of interest. The model can be represented as an m-uniform hypergraph, where a hyperedge occurs on m nodes whenever they approximately span a subspace. The partition model for this problem is similar to the standard four parameter blockmodel [6]. The number of partitions is k, and each partition contains s nodes, i.e., n = ks. There exists probabilities p ∈(0, 1] and q ∈[0, p) such that any set of m vectors span a subspace with probability p if all m vectors belong to the same group, and with probability q if they come from different groups. Thus, the tensor B has the form Bi...i = p for all i = 1, . . . , k, and Bi1...im = q for all the other entries. 2.2 Point set matching problem We consider a simplified version of the matching problem [10], where one is given two sets of points of interest, each of size s. In practice, these points may come from two different images of the same object or scene, and the goal is to match the corresponding points. One can see that there are s2 candidate matches. However, if one considers m correct matches then certain properties are preserved. For instance, let i1, . . . , im be some points from the first image, and i′ 1, . . . , i′ m be the corresponding points in the second image, then the angles or ratio of areas of triangles formed among these points are more or less preserved [9]. Thus, the set of matches (i1, i′ 1), . . . , (im, i′ m) have a certain connection, which is usually not present if the matches are not exact. The above model is an m-uniform hypergraph on n = s2 nodes, each node representing a candidate match, and a hyperedge is formed if properties (like preservation of angles) is satisfied by m candidate matches. Here, one can see that there are only s = √n correct matches, which have a large number of hyperedges among them, whereas very few hyperedges may be present for other combinations. Thus, the partition model has two groups of size √n and (n −√n), respectively. For p, q ∈[0, 1], p ≫q, p denotes the probability of a hyperedge among m correct matches and for any other m candidates, there is a hyperedge with probability q. Thus, if the first partition is the strongly connected component, then we have B ∈[0, 1]2×...×2 with B1...1 = p and Bi1...im = q otherwise. 3 Spectral partitioning algorithm and its consistency Before presenting the algorithm, we provide some background on spectral decomposition of tensors. In the related literature, one can find a number of significantly different characterizations of the spectral properties of tensors. While the work in [16] builds on a variational characterization, De Lathauwer et al. [19] provide an explicit decomposition of a tensor in the spirit of the singular value decomposition of matrices. The second line of study is more appropriate for our work since our analysis significantly relies on the use of Davis-Kahan perturbation theorem [21] that uses an explicit decomposition, and has been often used to analyze spectral clustering [2, 6]. The work in [19] provides a way of expressing any mth-order n-dimensional symmetric tensor, An, as a mode-k product [19] of a certain core tensor with m orthonormal matrices, where each orthonormal matrix is formed from the orthonormal left singular vectors of bAn ∈{0, 1}n×nm−1, 3 whose entries, for all i = 1, . . . , n and j = 1, . . . , nm−1, are defined as ( bAn)ij = (An)i1i2...im , if i = i1 and j = 1 + m X l=2 (il −1)nl−2 . (2) The above matrix bAn, often called the mode-1 flattened matrix, forms a key component of the partitioning algorithm. Later, we show that the leading k left singular vectors of bAn contain information about the true partitions in the hypergraph. It is easier to work with the symmetric matrix Wn = bAn bAT n ∈Rn×n, whose eigenvectors correspond to the left singular vectors of bAn. The spectral partitioning algorithm is presented in Algorithm 1, which is quite similar to the normalized spectral clustering [2]. Such a tensor based approach was first studied in [7] for geometric grouping. Subsequent improvements of the algorithm were proposed in [22, 20]. However, we deviate from these methods as we do not normalize the rows of the eigenvector matrix. The method in [9] also uses the largest eigenvector of the flattened matrix for the point set matching problem. This is computed via tensor power iterations. To keep the analysis simple, we do not use such iterations. The complexity of Algorithm 1 is O(nm+1), which can be significantly improved using sampling techniques as in [7, 9, 20]. The matrix Dn is used for normalization as in spectral clustering. Algorithm 1 Spectral partitioning of m-uniform hypergraph 1. From the mth-order affinity tensor An, construct bAn using (2). 2. Let Wn = bAn bAT n, and Dn ∈Rn×n be diagonal with (Dn)ii = Pn j=1(Wn)ij. 3. Set Ln = D−1/2 n WnD−1/2 n . 4. Compute leading k orthonormal eigenvectors of Ln, denoted by matrix Xn ∈Rn×k. 5. Cluster the rows of Xn into k clusters using k-means clustering. 6. Assign node-i of hypergraph to jth partition if ith row of Xn is grouped in jth cluster. An alternative technique of using eigenvectors of Laplacian matrix is often preferred in graph partitioning [3], and has been extended to hypergraphs [13, 15]. Unlike the flattened matrix, bAn, in Algorithm 1, such Laplacians do not preserve the spectral properties of a higher-order structure such as the affinity tensor that accurately represents the affinities of the hypergraph. Hence, we avoid the use of hypergraph Laplacian. 3.1 Consistency of above algorithm We now comment on the error incurred by Algorithm 1. For this, let Mn be the set of nodes that are incorrectly clustered by Algorithm 1. It is tricky to formalize the definition of Mn in clustering problems. We follow the definition of Mn given in [6] that requires some details of the analysis and hence, a formal definition is postponed till Section 4. In addition, we need the following terms. The analysis depends on the tensor B ∈[0, 1]k×...×k of the underlying random model. Let bB ∈ [0, 1]k×km−1 be the flattening of tensor B using (2). We also define a matrix Cn ∈Rk×k as Cn = (ZT n Zn)1/2 bB(ZT n Zn)⊗(m−1) bBT (ZT n Zn)1/2, (3) where (ZT n Zn)⊗(m−1) is the (m −1)-times Kronecker product of ZT n Zn with itself. Use of such Kronecker product is quite common in tensor decompositions (see [19]). Observe that the positive semi-definite matrix Cn contains information regarding the connectivity of clusters (stored in B) and the cluster sizes (diagonal entries of ZT n Zn). Let λk(Cn) be the smallest eigenvalue of Cn, which is non-negative. In addition, define Dn ∈Rn×n as the expectation of the diagonal matrix Dn. One can see that (Dn)ii ≤nm for all i = 1, . . . , n. Let Dn and Dn be the smallest and largest values in Dn. Also, let Sn and Sn be the sizes of the smallest and largest partitions, respectively. We have the following bound on the number of misclustered nodes. Theorem 1. If there exists N such that for all n > N, δn := λk(Cn) Dn −2nm−1 Dn  > 0 and Dn ≥nm(m −1)! r 2 log n, 4 and if (log n)3/2 = o  δnn m−1 2  , then the number of misclustered nodes |Mn| = O Sn(log n)2nm+1 δ2nD2 n  almost surely. The above result is too general to provide conclusive remarks about consistency of the algorithm. Hence, we focus on two examples, precisely the ones described in Sections 2.1 and 2.2. However, without loss of generality, we assume here that q > 0 since otherwise, the problem of detecting the partitions is trivial (at least for reasonably large n) as we can construct the partitions only based on the presence of hyperedges. The following results are proved in the appendix. The proofs mainly depend on computation of λk(Cn), which can be derived for the first example, while for the second, it is enough to work with a lower bound of λk(Cn). Further, in the first example, we make the result general by allowing the number of clusters, k, to grow with n under certain conditions. Corollary 2. Consider the setting of subspace clustering described in Section 2.1. If the number of clusters k satisfy k = O  n 1 2m (log n)−1 , then the conditions in Theorem 1 are satisfied and |Mn| = O k2m−1(log n)2 nm−2  = O (log n)3−2m nm−3+ 1 2m  almost surely. Hence, for m > 2, |Mn| →0 a.s. as n →∞, i.e., the algorithm is consistent. For m = 2, we can only conclude |Mn| n →0 a.s. From the above result, it is evident that the rate of convergence improves as m increases, indicating that, ignoring practical considerations, one should prefer the use of higher order affinities. However, the condition of number of clusters becomes more strict in such cases. We note here that our result and conditions are quite similar to those given in [6] for the case of four-parameter blockmodel. Thus, Algorithm 1 is comparable to spectral clustering [6]. Next, we consider the setting of Section 2.2. Corollary 3. For the problem of point set matching described in Section 2.2, the conditions in Theorem 1 are satisfied for m ≥3 and |Mn| = O (log n)2 nm−3  a.s. Hence, for m > 3, |Mn| →0 a.s. as n →∞, i.e., the algorithm is consistent. For m = 3, we can only conclude |Mn| n →0 a.s. The above result shows, theoretically, why higher order matching provides high accuracy in practice [9]. It also suggests that increase in the order of tensor will lead to a better convergence rate. We note that the following result does not hold for graphs (m = 2). In Corollary 3, we used the fact that the smaller partition is of size s = √n. The result can be made more general in terms of s, i.e., for m > 4, if s ≥3p q3 eventually, then Algorithm 1 is consistent. Before providing the detailed analysis (proof of Theorem 1), we briefly comment on the model considered here. In Section 2, we have followed the lines of [6] to define the model with An = ZnBZT n . However, this would mean that the diagonal entries in An are non-negative, and hence, there is a non-zero probability of formation of self loops that is not common in practice. The same issue exists for hypergraphs. To avoid this, one can add a correction term to An so that the entries with repeated indices become zero. Under this correction, conditions in Theorem 1 should not change significantly. This is easy to verify for graphs, but it is not straightforward for hypergraphs. 4 Analysis of partitioning algorithm In this section, we prove Theorem 1. The result follows from a series of lemmas. The proof requires defining certain terms. Let c An be the flattening of the tensor An defined in (1). Then we can write c An = Zn bB(ZT n )⊗(m−1), where (ZT n )⊗(m−1) is (m −1)-times Kronecker product of ZT n with itself. Along with the definitions in Section 3, let Wn ∈Rn×n be the expectation of Wn, and Ln = D−1/2 n WnD−1/2 n . One can see that Wn can be written as Wn = c An c An T + Pn, where Pn is a diagonal matrix defined in terms of the entries in c An. The proof contains the following steps: (1) For any fixed n, we show that if δn > 0 (stated in Theorem 1), the leading k orthonormal 5 eigenvectors of Ln has k distinct rows, where each row is a representative of a partition. (2) Since, Ln is not the expectation of Ln, we derive a bound on the Frobenius norm of their difference. The bound holds almost surely for all n if eventually Dn ≥nm(m −1)! q 2 log n. (3) We use a version of Davis-Kahan sin-Θ theorem given in [6] that almost surely bounds the difference in the leading eigenvectors of Ln and Ln if (log n)3/2 = o  δnn m−1 2  . (4) Finally, we rely on [6, Lemma 3.2], which holds in our case, to define the set of misclustered nodes Mn, and its size is bounded almost surely using the previously derived bounds. We now present the statements for the above results. The proofs can be found in the appendix. Lemma 4. Fix n and let δn be as defined in Theorem 1. If δn > 0, then there exists µn ∈Rk×k such that the columns of Znµn are the leading k orthonormal eigenvectors of Ln. Moreover, for nodes i and j, ψi = ψj if and only if the ith and jth rows of Znµn are identical. Thus, clustering the rows of Znµn into k clusters will provide the true partitions, and the cluster centers will precisely be these rows. The condition δn > 0 is required to ensure that the eigenvalues corresponding to the columns of Znµn are strictly greater than other eigenvalues. The requirement of a positive eigen-gap is essential for analysis of any spectral partitioning method [2, 23]. Next, we focus on deriving the upper bound for ∥Ln −Ln∥F . Lemma 5. If there exists N such that Dn ≥nm(m −1)! q 2 log n for all n > N, then ∥Ln −Ln∥F ≤4n m+1 2 log n Dn , almost surely. (4) The condition in the above result implies that each vertex is reasonably connected to other vertices of the hypergraph, i.e., there are no outliers. It is easy to satisfy this condition in the stated examples as Dn ≥q2nm and hence, it holds for all q > 0. Under the condition, one can also see that the bound in (4) is O  (log n)3/2 n m−1 2  and hence goes to zero as n increases. Note that in Lemma 4, δn > 0 need not hold for all n, but if it holds eventually, then we can choose N such that the conditions in Lemmas 4 and 5 both hold for all n > N. Under such a case, we use the Davis-Kahan perturbation theorem [21] as stated in [6, Theorem 2.1] to claim the following. Lemma 6. Let Xn ∈Rn×k contain the leading k orthonormal eigenvectors of Ln. If (log n)3/2 = o  δnn m−1 2  and there exists N such that δn > 0 and Dn ≥nm(m −1)! q 2 log n for all n > N, then there exists an orthonormal (rotation) matrix On ∈Rk×k such that ∥Xn −ZnµnOn∥F ≤16n m+1 2 log n δnDn , almost surely. (5) The condition (log n)3/2 = o  δnn m−1 2  is crucial as it ensures that the difference in eigenvalues of Ln and Ln decays much faster than the eigen-gap in Ln. This condition requires the eigen-gap (lower bounded by δn) to decay at a relatively slow rate, and is necessary for using [6, Theorem 2.1]. The bound (5) only says that rows of Xn converges to some rotation of the rows of Znµn. However, this is not an issue since the k-means algorithm is expected to perform well as long as the rows of Xn corresponding to each partition are tightly clustered, and the k clusters are well-separated. Now, let z1, . . . , zn be the rows of Zn, and let ci be the center of the cluster in which ith row of Xn is grouped for each i ∈{1, . . . , n}. We use a key result from [6] that is applicable in our setting. Lemma 7. [6, Lemma 3.2] For the matrix On from Lemma 6, if ∥ci −ziµnOn∥2 < 1 √ 2Sn , then ∥ci −ziµnOn∥2 < ∥ci −zjµnOn∥2 for all zj ̸= zi. This result hints that one may use the definition of correct clustering as follows. Node-i is correctly clustered if its center ci is closer to ziµnOn than the rows corresponding to other partitions. A sufficient condition to satisfy this definition is ∥ci −ziµnOn∥2 < 1 √ 2Sn . Hence, the set of misclustered nodes is defined as [6] Mn = ( i ∈{1, . . . , n} : ∥ci −ziµnOn∥2 ≥ 1 p 2Sn ) . (6) 6 It is easy to see that if Mn is empty, i.e., all nodes satisfy the condition ∥ci −ziµnOn∥2 < 1 √ 2Sn , then the clustering leads to true partitions, and does not incur any error. Hence, for statements, where |Mn| is small (at least compared to n), one can always use such a definition for misclustered nodes. The next result provides a simple bound on |Mn|, that immediately leads to Theorem 1. Lemma 8. If the k-means algorithm achieves its global optimum, then the set Mn satisfies |Mn| ≤8Sn∥Xn −ZnµnOn∥2 F . (7) In practice, k-means algorithm tries to find a local minimum, and hence, one should run this step with multiple initializations to achieve a global minimum. However, empirically we found that good performance is achieved even if we use a single run of k-means. From above lemma, it is straightforward to arrive at Theorem 1 by using the bound in Lemma 6. 5 Experiments 5.1 Validation of Corollaries 2 and 3 We demonstrate the claims of Corollaries 2 and 3, where we stated that for higher order tensors, the number of misclustered nodes decays to zero at a faster rate. We run Algorithm 1 on both the models of subspace clustering and point-set matching, varying the number of nodes n, the results for each n being averaged over 10 trials. For the clustering model (Section 2.1), we choose p = 0.6, q = 0.4, and consider two cases of k = 2 and 3 cluster problems. Figure 1 (top row) shows that in this model, the number of errors eventually decreases for all m, even m = 2. This observation is similar to the one in [6]. However, the decrease is much faster for m = 3, where accurate partitioning is often observed for n ≥100. We also observe that error rises for larger k, thus validating the dependence of the bound on k. A similar inference can be drawn from Figure 1 (second row) for the matching problem (Section 2.2), where we use p = 0.9, q = 0.1 and the number of correct matches as √n. 5.2 Motion Segmentation on Hopkins 155 dataset We now turn to practical applications, and test the performance of Algorithm 1 in motion segmentation. We perform the experiments on the Hopkins 155 dataset [24], which contains 120 videos with 2 independent affine motions. Figure 1 (third row) shows two cases, where Algorithm 1 correctly clusters the trajectories into their true groups. We used 4th-order tensors in the approach, where the large dimensionality of bAn is tackled by using only 500 uniformly sampled columns of bAn for computing Wn. We also compare the performance of Algorithm 1, averaged over 20 runs, with some standard approaches. The results for other methods have been taken from [20]. We observe that Algorithm 1 performs reasonably well, while the best performance is obtained using Sparse Grassmann Clustering (SGC) [20], which is expected as SGC is an iterative improvement of Algorithm 1. 5.3 Matching point sets from the Mpeg-7 shape database We now consider a matching problem using points sampled from images in Mpeg-7 database [25]. This problem has been considered in [10]. We use 70 random images, one from each shape class. Ten points were sampled from the boundary of each shape, which formed one point set. The other set of points was generated by adding Gaussian noise of variance σ2 to the original points and then using a random affine transformation on the points. In Figure 1 (last row), we compare performance of Algorithm 1 with the methods in [9, 10], which have been shown to outperform other methods. We use 4-way similarities based on ratio of areas of two triangles. We show the variation in the number of correctly detected matches and the F1-score for all methods as σ increases from 0 to 0.2. The results show that Algorithm 1 is quite robust compared to [10] in detecting true matches. However, Algorithm 1 does not use additional post-processing as in [9], and hence, allows high number of false positives that reduces F1-score, whereas [9, 10] show similar trends in both plots. 6 Concluding remarks In this paper, we presented a planted partition model for unweighted undirected uniform hypergraphs. We devised a spectral approach (Algorithm 1) for detecting the partitions from the affinity 7 The plots show variation in the number (left) and fraction (right) of misclustered nodes as n increases in k = 2 and 3 cluster problems for 2 and 3-uniform hypergraphs. Black lines are for m = 2 and red for m = 3. Solid lines for k = 2, and dashed lines for k = 3. The plots show variation in number (left) and fraction (right) of incorrect matches as n increases in matching problem for 2 and 3-uniform hypergraphs. Black lines are for m = 2 and red for m = 3. Percentage error in clustering LSA 4.23 % SCC 2.89 % LRR-H 2.13 % LRSC 3.69 % SSC 1.52 % SGC 1.03 % Algorithm 1 1.83 % Figure 1: First row: Number of misclustered nodes in clustering problem as n increases. Second row: Number of misclustered nodes in matching problem as n increases. Third row: Grouping two affine motions with Algorithm 1 (left), and performance comparison of Algorithm 1 with other methods (right). Fourth row: Variation in number of correct matches detected (left) and F1-score (middle) as noise level, σ increases. (right) A pair of images where Algorithm 1 correctly matches all sampled points. tensor of the corresponding random hypergraph. The above model is appropriate for a number of problems in computer vision including motion segmentation, illumination-invariant face clustering, point-set matching, feature tracking etc. We analyzed the approach to provide an almost sure upper bound on the number of misclustered nodes (c.f. Theorem 1). Using this bound, we conclude that for the problems of subspace clustering and point-set matching, Algorithm 1 is consistent for m ≥3 and m ≥4, respectively. To the best of our knowledge, this is the first theoretical study of the above problems in a probabilistic setting, and also the first theoretical evidence that shows importance of m-way affinities. Acknowledgement D. Ghoshdastidar is supported by Google Ph.D. Fellowship in Statistical Learning Theory. 8 References [1] B. Scholk¨opf and A. J. Smola. Learning with Kernels. MIT Press, 2002. [2] A. Ng, M. Jordan, and Y. Weiss. On spectral clustering: analysis and an algorithm. In Advances in Neural Information Processing Systems, pages 849–856, 2002. [3] U. von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007. [4] F. R. K. Chung. Spectral graph theory, volume 92. American Mathematical Soc., 1997. [5] F. McSherry. Spectral partitioning of random graphs. In IEEE Symposium on Foundations of Computer Science, pages 529–537, 2001. [6] K. Rohe, S. Chatterjee, and B. Yu. Spectral clustering and the high-dimensional stochastic blockmodel. Annals of Statistics, 39(4):1878–1915, 2011. [7] V. M. Govindu. A tensor decomposition for geometric grouping and segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1150–1157, 2005. [8] S. Rota Bulo and M. Pelillo. A game-theoretic approach to hypergraph clustering. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(6):1312–1327, 2013. [9] M. Chertok and Y. Keller. Efficient high order matching. IEEE Trans. on Pattern Analysis and Machine Intelligence, 32(12):2205–2215, 2010. [10] H. Liu, L. J. Latecki, and S. Yan. Robust clustering as ensembles of affinity relations. In Advances in Neural Information Processing Systems, pages 1414–1422, 2010. [11] G. Schweikert and B. W. Kernighan. A proper model for the partitioning of electrical circuits. In Proceedings of 9th Design Automation Workshop, pages 57–62, Dallas, 1979. [12] N. Selvakkumaran and G. Karypis. Multi-objective hypergraph partitioning algorithms for cut and maximum subdomain degree minimization. IEEE Trans. on CAD, 25(3):504–517, 2006. [13] M. Bolla. Spectra, euclidean representations and clusterings of hypergraphs. Discrete Mathematics, 117(1):19–39, 1993. [14] S. Agarwal, K. Branson, and S. Belongie. Higher order learning with graphs. In Proceedings of the International Conference on Machine Learning, pages 17–24, 2006. [15] J. A. Rodriguez. Laplacian eigenvalues and partition problems in hypergraphs. Applied Mathematics Letters, 22(6):916–921, 2009. [16] J. Cooper and A. Dutle. Spectra of uniform hypergraphs. Linear Algebra and its Applications, 436(9):3268–3292, 2012. [17] A. Anandkumar, R. Ge, D. Hsu, and S.M. Kakade. A tensor spectral approach to learning mixed membership community models. In Conference on Learning Theory (Expanded version at arXiv:1210.7559v3), 2013. [18] A. Frieze and R. Kannan. A new approach to the planted clique problem. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, volume 2, pages 187–198, 2008. [19] L. De Lathauwer, B. De Moor, and J. Vandewalle. A multilinear singular value decomposition. SIAM Journal on Matrix Analysis and Appl., 21(4):1253–1278, 2000. [20] S. Jain and V. M. Govindu. Efficient higher-order clustering on the grassmann manifold. In IEEE International Conference on Computer Vision, 2013. [21] G. W. Stewart and J. Sun. Matrix Perturbation Theory. Academic Press, 1990. [22] G. Chen and G. Lerman. Foundations of a multi-way spectral clustering framework for hybrid linear modeling. Foundations of Computational Mathematics, 9:517–558, 2009. [23] U. von Luxburg, M. Belkin, and O. Bousquet. Consistency of spectral clustering. Annals of Statistics, 36(2):555–586, 2008. [24] R. Tron and R. Vidal. A benchmark for the comparison of 3-D motion segmentation algorithms. In IEEE Conference on Computer Vision and Pattern Recognition, 2007. [25] L. J. Latecki, R. Lakamper, and T. Eckhardt. Shape descriptors for non-rigid shapes with a single closed contour. In IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pages 424–429, 2000. 9
2014
235
5,331
An Accelerated Proximal Coordinate Gradient Method Qihang Lin University of Iowa Iowa City, IA, USA qihang-lin@uiowa.edu Zhaosong Lu Simon Fraser University Burnaby, BC, Canada zhaosong@sfu.ca Lin Xiao Microsoft Research Redmond, WA, USA lin.xiao@microsoft.com Abstract We develop an accelerated randomized proximal coordinate gradient (APCG) method, for solving a broad class of composite convex optimization problems. In particular, our method achieves faster linear convergence rates for minimizing strongly convex functions than existing randomized proximal coordinate gradient methods. We show how to apply the APCG method to solve the dual of the regularized empirical risk minimization (ERM) problem, and devise efficient implementations that avoid full-dimensional vector operations. For ill-conditioned ERM problems, our method obtains improved convergence rates than the state-ofthe-art stochastic dual coordinate ascent (SDCA) method. 1 Introduction Coordinate descent methods have received extensive attention in recent years due to their potential for solving large-scale optimization problems arising from machine learning and other applications. In this paper, we develop an accelerated proximal coordinate gradient (APCG) method for solving convex optimization problems with the following form: minimize x∈RN  F(x) def = f(x) + Ψ(x) , (1) where f is differentiable on dom (Ψ), and Ψ has a block separable structure. More specifically, Ψ(x) = n X i=1 Ψi(xi), (2) where each xi denotes a sub-vector of x with cardinality Ni, and each Ψi : RNi →R ∪{+∞} is a closed convex function. We assume the collection {xi : i = 1, . . . , n} form a partition of the components of x ∈RN. In addition to the capability of modeling nonsmooth regularization terms such as Ψ(x) = λ∥x∥1, this model also includes optimization problems with block separable constraints. More precisely, each block constraint xi ∈Ci, where Ci is a closed convex set, can be modeled by an indicator function defined as Ψi(xi) = 0 if xi ∈Ci and ∞otherwise. At each iteration, coordinate descent methods choose one block of coordinates xi to sufficiently reduce the objective value while keeping other blocks fixed. One common and simple approach for choosing such a block is the cyclic scheme. The global and local convergence properties of the cyclic coordinate descent method have been studied in, for example, [21, 11, 16, 2, 5]. Recently, randomized strategies for choosing the block to update became more popular. In addition to its theoretical benefits [13, 14, 19], numerous experiments have demonstrated that randomized coordinate descent methods are very powerful for solving large-scale machine learning problems [3, 6, 18, 19]. Inspired by the success of accelerated full gradient methods (e.g., [12, 1, 22]), several recent work applied Nesterov’s acceleration schemes to speed up randomized coordinate descent methods. In particular, Nesterov [13] developed an accelerated randomized coordinate gradient method for minimizing unconstrained smooth convex functions, which corresponds to the case of Ψ(x) ≡0 in (1). 1 Lu and Xiao [10] gave a sharper convergence analysis of Nesterov’s method, and Lee and Sidford [8] developed extensions with weighted random sampling schemes. More recently, Fercoq and Richt´arik [4] proposed an APPROX (Accelerated, Parallel and PROXimal) coordinate descent method for solving the more general problem (1) and obtained accelerated sublinear convergence rates, but their method cannot exploit the strong convexity to obtain accelerated linear rates. In this paper, we develop a general APCG method that achieves accelerated linear convergence rates when the objective function is strongly convex. Without the strong convexity assumption, our method recovers the APPROX method [4]. Moreover, we show how to apply the APCG method to solve the dual of the regularized empirical risk minimization (ERM) problem, and devise efficient implementations that avoid full-dimensional vector operations. For ill-conditioned ERM problems, our method obtains faster convergence rates than the state-of-the-art stochastic dual coordinate ascent (SDCA) method [19], and the improved iteration complexity matches the accelerated SDCA method [20]. We present numerical experiments to illustrate the advantage of our method. 1.1 Notations and assumptions For any partition of x ∈RN into {xi ∈RNi : i = 1, . . . , n}, there is an N × N permutation matrix U partitioned as U = [U1 · · · Un], where Ui ∈RN×Ni, such that x = n X i=1 Uixi, and xi = U T i x, i = 1, . . . , n. For any x ∈RN, the partial gradient of f with respect to xi is defined as ∇if(x) = U T i ∇f(x), i = 1, . . . , n. We associate each subspace RNi, for i = 1, . . . , n, with the standard Euclidean norm, denoted by ∥· ∥. We make the following assumptions which are standard in the literature on coordinate descent methods (e.g., [13, 14]). Assumption 1. The gradient of function f is block-wise Lipschitz continuous with constants Li, i.e., ∥∇if(x + Uihi) −∇if(x)∥≤Li∥hi∥, ∀hi ∈RNi, i = 1, . . . , n, x ∈RN. For convenience, we define the following norm in the whole space RN: ∥x∥L =  n X i=1 Li∥xi∥2 1/2 , ∀x ∈RN. (3) Assumption 2. There exists µ ≥0 such that for all y ∈RN and x ∈dom (Ψ), f(y) ≥f(x) + ⟨∇f(x), y −x⟩+ µ 2 ∥y −x∥2 L. The convexity parameter of f with respect to the norm ∥· ∥L is the largest µ such that the above inequality holds. Every convex function satisfies Assumption 2 with µ = 0. If µ > 0, the function f is called strongly convex. We note that an immediate consequence of Assumption 1 is f(x + Uihi) ≤f(x) + ⟨∇if(x), hi⟩+ Li 2 ∥hi∥2, ∀hi ∈RNi, i = 1, . . . , n, x ∈RN. (4) This together with Assumption 2 implies µ ≤1. 2 The APCG method In this section we describe the general APCG method, and several variants that are more suitable for implementation under different assumptions. These algorithms extend Nesterov’s accelerated gradient methods [12, Section 2.2] to the composite and coordinate descent setting. We first explain the notations used in our algorithms. The algorithms proceed in iterations, with k being the iteration counter. Lower case letters x, y, z represent vectors in the full space RN, and x(k), y(k) and z(k) are their values at the kth iteration. Each block coordinate is indicated with a subscript, for example, x(k) i represents the value of the ith block of the vector x(k). The Greek letters α, β, γ are scalars, and αk, βk and γk represent their values at iteration k. 2 Algorithm 1: the APCG method Input: x(0) ∈dom (Ψ) and convexity parameter µ ≥0. Initialize: set z(0) = x(0) and choose 0 < γ0 ∈[µ, 1]. Iterate: repeat for k = 0, 1, 2, . . . 1. Compute αk ∈(0, 1 n] from the equation n2α2 k = (1 −αk) γk + αkµ, (5) and set γk+1 = (1 −αk)γk + αkµ, βk = αkµ γk+1 . (6) 2. Compute y(k) as y(k) = 1 αkγk + γk+1  αkγkz(k) + γk+1x(k) . (7) 3. Choose ik ∈{1, . . . , n} uniformly at random and compute z(k+1) = arg min x∈RN nnαk 2 x−(1−βk)z(k)−βky(k) 2 L+⟨∇ikf(y(k)), xik⟩+Ψik(xik) o . 4. Set x(k+1) = y(k) + nαk(z(k+1) −z(k)) + µ n(z(k) −y(k)). (8) The general APCG method is given as Algorithm 1. At each iteration k, it chooses a random coordinate ik ∈{1, . . . , n} and generates y(k), x(k+1) and z(k+1). One can observe that x(k+1) and z(k+1) depend on the realization of the random variable ξk = {i0, i1, . . . , ik}, while y(k) is independent of ik and only depends on ξk−1. To better understand this method, we make the following observations. For convenience, we define ˜z(k+1) = arg min x∈RN nnαk 2 x −(1 −βk)z(k) −βky(k) 2 L + ⟨∇f(y(k)), x −y(k)⟩+ Ψ(x) o , (9) which is a full-dimensional update version of Step 3. One can observe that z(k+1) is updated as z(k+1) i = ( ˜z(k+1) i if i = ik, (1 −βk)z(k) i + βky(k) i if i ̸= ik. (10) Notice that from (5), (6), (7) and (8) we have x(k+1) = y(k) + nαk  z(k+1) −(1 −βk)z(k) −βky(k) , which together with (10) yields x(k+1) i =    y(k) i + nαk  z(k+1) i −z(k) i  + µ n  z(k) i −y(k) i  if i = ik, y(k) i if i ̸= ik. (11) That is, in Step 4, we only need to update the block coordinates x(k+1) ik and set the rest to be y(k) i . We now state a theorem concerning the expected rate of convergence of the APCG method, whose proof can be found in the full report [9]. Theorem 1. Suppose Assumptions 1 and 2 hold. Let F ⋆be the optimal value of problem (1), and {x(k)} be the sequence generated by the APCG method. Then, for any k ≥0, there holds: Eξk−1[F(x(k))] −F ⋆≤min ( 1 − √µ n k ,  2n 2n + k√γ0 2)  F(x(0)) −F ⋆+ γ0 2 R2 0  , where R0 def = min x⋆∈X⋆∥x(0) −x⋆∥L, (12) and X⋆is the set of optimal solutions of problem (1). 3 Our result in Theorem 1 improves upon the convergence rates of the proximal coordinate gradient methods in [14, 10], which have convergence rates on the order of O  min n1 −µ n k , n n+k o . For n = 1, our result matches exactly that of the accelerated full gradient method in [12, Section 2.2]. 2.1 Two special cases Here we give two simplified versions of the APCG method, for the special cases of µ = 0 and µ > 0, respectively. Algorithm 2 shows the simplified version for µ = 0, which can be applied to problems without strong convexity, or if the convexity parameter µ is unknown. Algorithm 2: APCG with µ = 0 Input: x(0) ∈dom (Ψ). Initialize: set z(0) = x(0) and choose α0 ∈(0, 1 n]. Iterate: repeat for k = 0, 1, 2, . . . 1. Compute y(k) = (1 −αk)x(k) + αkz(k). 2. Choose ik ∈{1, . . . , n} uniformly at random and compute z(k+1) ik = arg minx∈RN n nαkLik 2 x −z(k) ik 2 + ⟨∇ikf(y(k)), x −y(k) ik ⟩+ Ψik(x) o . and set z(k+1) i = z(k) i for all i ̸= ik. 3. Set x(k+1) = y(k) + nαk(z(k+1) −z(k)). 4. Compute αk+1 = 1 2 p α4 k + 4α2 k −α2 k  . According to Theorem 1, Algorithm 2 has an accelerated sublinear convergence rate, that is Eξk−1[F(x(k))] −F ⋆≤  2n 2n + knα0 2  F(x(0)) −F ⋆+ 1 2R2 0  . With the choice of α0 = 1/n, Algorithm 2 reduces to the APPROX method [4] with single block update at each iteration (i.e., τ = 1 in their Algorithm 1). For the strongly convex case with µ > 0, we can initialize Algorithm 1 with the parameter γ0 = µ, which implies γk = µ and αk = βk = √µ/n for all k ≥0. This results in Algorithm 3. Algorithm 3: APCG with γ0 = µ > 0 Input: x(0) ∈dom (Ψ) and convexity parameter µ > 0. Initialize: set z(0) = x(0) and and α = √µ n . Iterate: repeat for k = 0, 1, 2, . . . 1. Compute y(k) = x(k)+αz(k) 1+α . 2. Choose ik ∈{1, . . . , n} uniformly at random and compute z(k+1) = arg min x∈RN n nα 2 x−(1−α)z(k)−αy(k) 2 L+⟨∇ikf(y(k)), xik−y(k) ik ⟩+Ψik(xik) o . 3. Set x(k+1) = y(k) + nα(z(k+1) −z(k)) + nα2(z(k) −y(k)). As a direct corollary of Theorem 1, Algorithm 3 enjoys an accelerated linear convergence rate: Eξk−1[F(x(k))] −F ⋆≤  1 − √µ n k  F(x(0)) −F ⋆+ µ 2 R2 0  . To the best of our knowledge, this is the first time such an accelerated rate is obtained for solving the general problem (1) (with strong convexity) using coordinate descent type of methods. 4 2.2 Efficient implementation The APCG methods we presented so far all need to perform full-dimensional vector operations at each iteration. For example, y(k) is updated as a convex combination of x(k) and z(k), and this can be very costly since in general they can be dense vectors. Moreover, for the strongly convex case (Algorithms 1 and 3), all blocks of z(k+1) need to be updated at each iteration, although only the ik-th block needs to compute the partial gradient and perform a proximal mapping. These full-dimensional vector updates cost O(N) operations per iteration and may cause the overall computational cost of APCG to be even higher than the full gradient methods (see discussions in [13]). In order to avoid full-dimensional vector operations, Lee and Sidford [8] proposed a change of variables scheme for accelerated coordinated descent methods for unconstrained smooth minimization. Fercoq and Richt´arik [4] devised a similar scheme for efficient implementation in the µ = 0 case for composite minimization. Here we show that such a scheme can also be developed for the case of µ > 0 in the composite optimization setting. For simplicity, we only present an equivalent implementation of the simplified APCG method described in Algorithm 3. Algorithm 4: Efficient implementation of APCG with γ0 = µ > 0 Input: x(0) ∈dom (Ψ) and convexity parameter µ > 0. Initialize: set α = √µ n and ρ = 1−α 1+α, and initialize u(0) = 0 and v(0) = x(0). Iterate: repeat for k = 0, 1, 2, . . . 1. Choose ik ∈{1, . . . , n} uniformly at random and compute ∆(k) ik = arg min ∆∈R Nik n nαLik 2 ∥∆∥2+ ⟨∇ikf(ρk+1u(k)+v(k)), ∆⟩+ Ψik(−ρk+1u(k) ik +v(k) ik +∆) o . 2. Let u(k+1) = u(k) and v(k+1) = v(k), and update u(k+1) ik = u(k) ik −1−nα 2ρk+1 ∆(k) ik , v(k+1) ik = v(k) ik + 1+nα 2 ∆(k) ik . (13) Output: x(k+1) = ρk+1u(k+1) + v(k+1) The following Proposition is proved in the full report [9]. Proposition 1. The iterates of Algorithm 3 and Algorithm 4 satisfy the following relationships: x(k) = ρku(k) + v(k), y(k) = ρk+1u(k) + v(k), z(k) = −ρku(k) + v(k). (14) We note that in Algorithm 4, only a single block coordinate of the vectors u(k) and v(k) are updated at each iteration, which cost O(Ni). However, computing the partial gradient ∇ikf(ρk+1u(k)+v(k)) may still cost O(N) in general. In the next section, we show how to further exploit structure in many ERM problems to completely avoid full-dimensional vector operations. 3 Application to regularized empirical risk minimization (ERM) Let A1, . . . , An be vectors in Rd, φ1, . . . , φn be a sequence of convex functions defined on R, and g be a convex function on Rd. Regularized ERM aims to solve the following problem: minimize w∈Rd P(w), with P(w) = 1 n n X i=1 φi(AT i w) + λg(w), where λ > 0 is a regularization parameter. For example, given a label bi ∈{±1} for each vector Ai, for i = 1, . . . , n, we obtain the linear SVM problem by setting φi(z) = max{0, 1−biz} and g(w) = (1/2)∥w∥2 2. Regularized logistic regression is obtained by setting φi(z) = log(1+exp(−biz)). This formulation also includes regression problems. For example, ridge regression is obtained by setting (1/2)φi(z) = (z −bi)2 and g(w) = (1/2)∥w∥2 2, and we get Lasso if g(w) = ∥w∥1. 5 Let φ∗ i be the convex conjugate of φi, that is, φ∗ i (u) = maxz∈R(zu −φi(z)). The dual of the regularized ERM problem is (see, e.g., [19]) maximize x∈Rn D(x), with D(x) = 1 n n X i=1 −φ∗ i (−xi) −λg∗  1 λnAx  , where A = [A1, . . . , An]. This is equivalent to minimize F(x) def = −D(x), that is, minimize x∈Rn F(x) def = 1 n n X i=1 φ∗ i (−xi) + λg∗  1 λnAx  . The structure of F(x) above matches the formulation in (1) and (2) with f(x) = λg∗ 1 λnAx  and Ψi(xi) = 1 nφ∗ i (−xi), and we can apply the APCG method to minimize F(x). In order to exploit the fast linear convergence rate, we make the following assumption. Assumption 3. Each function φi is 1/γ smooth, and the function g has unit convexity parameter 1. Here we slightly abuse the notation by overloading γ, which also appeared in Algorithm 1. But in this section it solely represents the (inverse) smoothness parameter of φi. Assumption 3 implies that each φ∗ i has strong convexity parameter γ (with respect to the local Euclidean norm) and g∗ is differentiable and ∇g∗has Lipschitz constant 1. In the following, we split the function F(x) = f(x) + Ψ(x) by relocating the strong convexity term as follows: f(x) = λg∗  1 λnAx  + γ 2n∥x∥2, Ψ(x) = 1 n n X i=1  φ∗(−xi) −γ 2 ∥xi∥2 . (15) As a result, the function f is strongly convex and each Ψi is still convex. Now we can apply the APCG method to minimize F(x) = −D(x), and obtain the following guarantee. Theorem 2. Suppose Assumption 3 holds and ∥Ai∥≤R for all i = 1, . . . , n. In order to obtain an expected dual optimality gap E[D⋆−D(x(k))] ≤ǫ by using the APCG method, it suffices to have k ≥  n + q nR2 λγ  log(C/ǫ). (16) where D⋆= maxx∈Rn D(x) and the constant C = D⋆−D(x(0)) + (γ/(2n))∥x(0) −x⋆∥2. Proof. The function f(x) in (15) has coordinate Lipschitz constants Li = ∥Ai∥2 λn2 + γ n ≤R2+λγn λn2 and convexity parameter γ n with respect to the unweighted Euclidean norm. The strong convexity parameter of f(x) with respect to the norm ∥· ∥L defined in(3) is µ = γ n . R2+λγn λn2 = λγn R2+λγn. According to Theorem 1, we have E[D⋆−D(x(0))] ≤  1 − √µ n k C ≤exp  − √µ n k  C. Therefore it suffices to have the number of iterations k to be larger than n √µ log(C/ǫ) = n q R2+λγn λγn log(C/ǫ) = q n2 + nR2 λγ log(C/ǫ) ≤  n + q nR2 λγ  log(C/ǫ). This finishes the proof. Several state-of-the-art algorithms for ERM, including SDCA [19], SAG [15, 17] and SVRG [7, 23] obtain the iteration complexity O  n + R2 λγ  log(1/ǫ)  . (17) We note that our result in (16) can be much better for ill-conditioned problems, i.e., when the condition number R2 λγ is larger than n. This is also confirmed by our numerical experiments in Section 4. The complexity bound in (17) for the aforementioned work is for minimizing the primal objective P(x) or the duality gap P(x) −D(x), but our result in Theorem 2 is in terms of the dual optimality. In the full report [9], we show that the same guarantee on accelerated primal-dual convergence can be obtained by our method with an extra primal gradient step, without affecting the overall complexity. The experiments in Section 4 illustrate superior performance of our algorithm on reducing the primal objective value, even without performing the extra step. 6 We note that Shalev-Shwartz and Zhang [20] recently developed an accelerated SDCA method which achieves the same complexity O  n + q n λγ  log(1/ǫ)  as our method. Their method calls the SDCA method in a full-dimensional accelerated gradient method in an inner-outer iteration procedure. In contrast, our APCG method is a straightforward single loop coordinate gradient method. 3.1 Implementation details Here we show how to exploit the structure of the regularized ERM problem to efficiently compute the coordinate gradient ∇ikf(y(k)), and totally avoid full-dimensional updates in Algorithm 4. We focus on the special case g(w) = 1 2∥w∥2 and show how to compute ∇ikf(y(k)). According to (15), ∇ikf(y(k)) = 1 λn2 AT i (Ay(k)) + γ ny(k) ik . Since we do not form y(k) in Algorithm 4, we update Ay(k) by storing and updating two vectors in Rd: p(k) = Au(k) and q(k) = Av(k). The resulting method is detailed in Algorithm 5. Algorithm 5: APCG for solving dual ERM Input: x(0) ∈dom (Ψ) and convexity parameter µ > 0. Initialize: set α = √µ n and ρ = 1−α 1+α, and let u(0) = 0, v(0) = x(0), p(0) = 0 and q(0) = Ax(0). Iterate: repeat for k = 0, 1, 2, . . . 1. Choose ik ∈{1, . . . , n} uniformly at random, compute the coordinate gradient ∇(k) ik = 1 λn2 ρk+1AT ikp(k) + AT ikq(k) + γ n  ρk+1u(k) ik + v(k) ik  . 2. Compute coordinate increment ∆(k) ik = arg min ∆∈R Nik n α(∥Aik ∥2+λγn) 2λn ∥∆∥2 + ⟨∇(k) ik , ∆⟩+ 1 nφ∗ ik(ρk+1u(k) ik −v(k) ik −∆) o . 3. Let u(k+1) = u(k) and v(k+1) = v(k), and update u(k+1) ik = u(k) ik −1−nα 2ρk+1 ∆(k) ik , v(k+1) ik = v(k) ik + 1+nα 2 ∆(k) ik , p(k+1) = p(k) −1−nα 2ρk+1 Aik∆(k) ik , q(k+1) = q(k) + 1+nα 2 Aik∆(k) ik . (18) Output: approximate primal and dual solutions w(k+1) = 1 λn ρk+2p(k+1) + q(k+1) , x(k+1) = ρk+1u(k+1) + v(k+1). Each iteration of Algorithm 5 only involves the two inner products AT ikp(k), AT ikq(k) in computing ∇(k) ik and the two vector additions in (18). They all cost O(d) rather than O(n). When the Ai’s are sparse (the case of most large-scale problems), these operations can be carried out very efficiently. Basically, each iteration of Algorithm 5 only costs twice as much as that of SDCA [6, 19]. 4 Experiments In our experiments, we solve ERM problems with smoothed hinge loss for binary classification. That is, we pre-multiply each feature vector Ai by its label bi ∈{±1} and use the loss function φ(a) =    0 if a ≥1, 1 −a −γ 2 if a ≤1 −γ, 1 2γ (1 −a)2 otherwise. The conjugate function of φ is φ∗(b) = b + γ 2 b2 if b ∈[−1, 0] and ∞otherwise. Therefore we have Ψi(xi) = 1 n  φ∗(−xi) −γ 2 ∥xi∥2 =  −xi n if xi ∈[0, 1] ∞ otherwise. The dataset used in our experiments are summarized in Table 1. 7 λ rcv1 covertype news20 10−5 0 20 40 60 80 100 10−15 10−12 10−9 10−6 10−3 100 AFG SDCA APCG 0 20 40 60 80 100 10−15 10−12 10−9 10−6 10−3 100 AFG SDCA APCG 0 20 40 60 80 100 10−15 10−12 10−9 10−6 10−3 100 AFG SDCA APCG 10−6 0 20 40 60 80 100 10−9 10−6 10−3 100 0 20 40 60 80 100 10−9 10−6 10−3 100 0 20 40 60 80 100 10−9 10−6 10−3 100 10−7 0 20 40 60 80 100 10−6 10−5 10−4 10−3 10−2 10−1 100 0 20 40 60 80 100 10−6 10−5 10−4 10−3 10−2 10−1 100 0 20 40 60 80 100 10−6 10−5 10−4 10−3 10−2 10−1 100 10−8 0 20 40 60 80 100 10−4 10−3 10−2 10−1 100 AFG SDCA APCG 0 20 40 60 80 100 10−4 10−3 10−2 10−1 100 0 20 40 60 80 100 10−5 10−4 10−3 10−2 10−1 100 Figure 1: Comparing the APCG method with SDCA and the accelerated full gradient method (AFG) with adaptive line search. In each plot, the vertical axis is the primal objective gap P(w(k))−P ⋆, and the horizontal axis is the number of passes through the entire dataset. The three columns correspond to the three datasets, and each row corresponds to a particular value of the regularization parameter λ. In our experiments, we compare the APCG method with SDCA and the accelerated full gradient method (AFG) [12] with an additional line search procedure to improve efficiency. When the regularization parameter λ is not too small (around 10−4), then APCG performs similarly as SDCA as predicted by our complexity results, and they both outperform AFG by a substantial margin. Figure 1 shows the results in the ill-conditioned setting, with λ varying form 10−5 to 10−8. Here we see that APCG has superior performance in reducing the primal objective value compared with SDCA and AFG, even though our theory only gives complexity for solving the dual ERM problem. AFG eventually catches up for cases with very large condition number (see the plots for λ = 10−8). datasets number of samples n number of features d sparsity rcv1 20,242 47,236 0.16% covtype 581,012 54 22% news20 19,996 1,355,191 0.04% Table 1: Characteristics of three binary classification datasets (available from the LIBSVM web page: http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets). 8 References [1] A. Beck and M. Teboulle. A fast iterative shrinkage-threshold algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [2] A. Beck and L. Tetruashvili. On the convergence of block coordinate descent type methods. SIAM Journal on Optimization, 13(4):2037–2060, 2013. [3] K.-W. Chang, C.-J. Hsieh, and C.-J. Lin. Coordinate descent method for large-scale l2-loss linear support vector machines. Journal of Machine Learning Research, 9:1369–1398, 2008. [4] O. Fercoq and P. Richt´arik. Accelerated, parallel and proximal coordinate descent. Manuscript, arXiv:1312.5799, 2013. [5] M. Hong, X. Wang, M. Razaviyayn, and Z. Q. Luo. Iteration complexity analysis of block coordinate descent methods. Manuscript, arXiv:1310.6957, 2013. [6] C.-J. Hsieh, K.-W. Chang, C.-J. Lin, S.-S. Keerthi, and S. Sundararajan. A dual coordinate descent method for large-scale linear svm. In Proceedings of the 25th International Conference on Machine Learning (ICML), pages 408–415, 2008. [7] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems 26, pages 315–323. 2013. [8] Y. T. Lee and A. Sidford. Efficient accelerated coordinate descent methods and faster algorithms for solving linear systems. arXiv:1305.1922. [9] Q. Lin, Z. Lu, and L. Xiao. An accelerated proximal coordinate gradient method and its application to regularized empirical risk minimization. Technical Report MSR-TR-2014-94, Microsoft Research, 2014. (arXiv:1407.1296). [10] Z. Lu and L. Xiao. On the complexity analysis of randomized block-coordinate descent methods. Accepted by Mathematical Programming, Series A, 2014. (arXiv:1305.4723). [11] Z. Q. Luo and P. Tseng. On the convergence of the coordinate descent method for convex differentiable minimization. Journal of Optimization Theory & Applications, 72(1):7–35, 2002. [12] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Kluwer, Boston, 2004. [13] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [14] P. Richt´arik and M. Tak´aˇc. Iteration complexity of randomized block-coordinate descent methods for minimizing a composite function. Mathematical Programming, 144(1):1–38, 2014. [15] N. Le Roux, M. Schmidt, and F. Bach. A stochastic gradient method with an exponential convergence rate for finite training sets. In Advances in Neural Information Processing Systems 25, pages 2672–2680. 2012. [16] A. Saha and A. Tewari. On the non-asymptotic convergence of cyclic coordinate descent methods. SIAM Jorunal on Optimization, 23:576–601, 2013. [17] M. Schmidt, N. Le Roux, and F. Bach. Minimizing finite sums with the stochastic average gradient. Technical Report HAL 00860051, INRIA, Paris, France, 2013. [18] S. Shalev-Shwartz and A. Tewari. Stochastic methods for ℓ1 regularized loss minimization. In Proceedings of the 26th International Conference on Machine Learning (ICML), pages 929– 936, Montreal, Canada, 2009. [19] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. Journal of Machine Learning Research, 14:567–599, 2013. [20] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. Proceedings of the 31st International Conference on Machine Learning (ICML), JMLR W&CP, 32(1):64–72, 2014. [21] P. Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 140:513–535, 2001. [22] P. Tseng. On accelerated proximal gradient methods for convex-concave optimization. Unpublished manuscript, 2008. [23] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. Technical Report MSR-TR-2014-38, Microsoft Research, 2014. (arXiv:1403.4699). 9
2014
236
5,332
Scalable Nonlinear Learning with Adaptive Polynomial Expansions Alekh Agarwal Microsoft Research alekha@microsoft.com Alina Beygelzimer Yahoo! Labs beygel@yahoo-inc.com Daniel Hsu Columbia University djhsu@cs.columbia.edu John Langford Microsoft Research jcl@microsoft.com Matus Telgarsky∗ Rutgers University mtelgars@cs.ucsd.edu Abstract Can we effectively learn a nonlinear representation in time comparable to linear learning? We describe a new algorithm that explicitly and adaptively expands higher-order interaction features over base linear representations. The algorithm is designed for extreme computational efficiency, and an extensive experimental study shows that its computation/prediction tradeoff ability compares very favorably against strong baselines. 1 Introduction When faced with large datasets, it is commonly observed that using all the data with a simpler algorithm is superior to using a small fraction of the data with a more computationally intense but possibly more effective algorithm. The question becomes: What is the most sophisticated algorithm that can be executed given a computational constraint? At the largest scales, Naïve Bayes approaches offer a simple, easily distributed single-pass algorithm. A more computationally difficult, but commonly better-performing approach is large scale linear regression, which has been effectively parallelized in several ways on real-world large scale datasets [1, 2]. Is there a modestly more computationally difficult approach that allows us to commonly achieve superior statistical performance? The approach developed here starts with a fast parallelized online learning algorithm for linear models, and explicitly and adaptively adds higher-order interaction features over the course of training, using the learned weights as a guide. The resulting space of polynomial functions increases the approximation power over the base linear representation at a modest increase in computational cost. Several natural folklore baselines exist. For example, it is common to enrich feature spaces with ngrams or low-order interactions. These approaches are naturally computationally appealing, because these nonlinear features can be computed on-the-fly avoiding I/O bottlenecks. With I/O bottlenecked datasets, this can sometimes even be done so efficiently that the additional computational complexity is negligible, so improving over this baseline is quite challenging. The design of our algorithm is heavily influenced by considerations for computational efficiency, as discussed further in Section 2. Several alternative designs are plausible but fail to provide adequate computation/prediction tradeoffs or even outperform the aforementioned folklore baselines. An extensive experimental study in Section 3 compares efficient implementations of these baselines with ∗This work was performed while MT was visiting Microsoft Research, NYC. 1 100 101 102 relative time −0.2 0.0 0.2 0.4 0.6 0.8 1.0 relative error Relative error vs time tradeoff linear quadratic cubic apple(0.125) apple(0.25) apple(0.5) apple(0.75) apple(1.0) Figure 1: Computation/prediction tradeoff points using non-adaptive polynomial expansions and adaptive polynomial expansions (apple). The markers are positioned at the coordinate-wise median of (relative error, relative time) over 30 datasets, with bars extending to 25th and 75th percentiles. See Section 3 for definition of relative error and relative time used here. the proposed mechanism and gives strong evidence of the latter’s dominant computation/prediction tradeoff ability (see Figure 1 for an illustrative summary). Although it is notoriously difficult to analyze nonlinear algorithms, it turns out that two aspects of this algorithm are amenable to analysis. First, we prove a regret bound showing that we can effectively compete with a growing feature set. Second, we exhibit simple problems where this algorithm is effective, and discuss a worst-case consistent variant. We point the reader to the full version [3] for more details. Related work. This work considers methods for enabling nonlinear learning directly in a highlyscalable learning algorithm. Starting with a fast algorithm is desirable because it more naturally allows one to improve statistical power by spending more computational resources until a computational budget is exhausted. In contrast, many existing techniques start with a (comparably) slow method (e.g., kernel SVM [4], batch PCA [5], batch least-squares regression [5]), and speed it up by sacrificing statistical power, often just to allow the algorithm to run at all on massive data sets. A standard alternative to explicit polynomial expansions is to employ polynomial kernels with the kernel trick [6]. While kernel methods generally have computation scaling at least quadratically with the number of training examples, a number of approximations schemes have been developed to enable a better tradeoff. The Nyström method (and related techniques) can be used to approximate the kernel matrix while permitting faster training [4]. However, these methods still suffer from the drawback that the model size after n examples is typically O(n). As a result, even single pass online implementations [7] typically suffer from O(n2) training and O(n) testing time complexity. Another class of approximation schemes for kernel methods involves random embeddings into a high (but finite) dimensional Euclidean space such that the standard inner product there approximates the kernel function [8–11]. Recently, such schemes have been developed for polynomial kernels [9–11] with computational scaling roughly linear in the polynomial degree. However, for many sparse, high-dimensional datasets (such as text data), the embedding of [10] creates dense, high dimensional examples, which leads to a substantial increase in computational complexity. Moreover, neither of the embeddings from [9, 10] exhibits good statistical performance unless combined with dense linear dimension reduction [11], which again results in dense vector computations. Such feature construction schemes are also typically unsupervised, while the method proposed here makes use of label information. Among methods proposed for efficiently learning polynomial functions [12–16], all but [13] are batch algorithms. The method of [13] uses online optimization together with an adaptive rule for creating interaction features. A variant of this is discussed in Section 2 and is used in the experimental study in Section 3 as a baseline. 2 Algorithm 1 Adaptive Polynomial Expansion (apple) input Initial features S1 = {x1, . . . , xd}, expansion sizes (sk), epoch schedule (τk), stepsizes (ηt). 1: Initial weights w1 := 0, initial epoch k := 1, parent set P1 := ∅. 2: for t = 1, 2, . . . : do 3: Receive stochastic gradient gt. 4: Update weights: wt+1 := wt −ηt[gt]Sk, where [·]Sk denotes restriction to monomials in the feature set Sk. 5: if t = τk then 6: Let Mk ⊆Sk be the top sk monomials m(x) ∈Sk such that m(x) /∈Pk, ordered from highest-to-lowest by the weight magnitude in wt+1. 7: Expand feature set: Sk+1 := Sk ∪{xi · m(x) : i ∈[d], m(x) ∈Mk}, and Pk+1 := Pk ∪{m(x) : m(x) ∈Mk}. 8: k := k + 1. 9: end if 10: end for 2 Adaptive polynomial expansions This section describes our new learning algorithm, apple. 2.1 Algorithm description The pseudocode is given in Algorithm 1. The algorithm proceeds as stochastic gradient descent over the current feature set to update a weight vector. At specified times τk, the feature set Sk is expanded to Sk+1 by taking the top monomials in the current feature set, ordered by weight magnitude in the current weight vector, and creating interaction features between these monomials and x. Care is exercised to not repeatedly pick the same monomial for creating higher order monomial by tracking a parent set Pk, the set of all monomials for which higher degree terms have been expanded. We provide more intuition for our choice of this feature growing heuristic in Section 2.3. There are two benefits to this staged process. Computationally, the stages allow us to amortize the cost of the adding of monomials—which is implemented as an expensive dense operation—over several other (possibly sparse) operations. Statistically, using stages guarantees that the monomials added in the previous stage have an opportunity to have their corresponding parameters converge. We have found it empirically effective to set sk := average ∥[gt]S1∥0, and to update the feature set at a constant number of equally-spaced times over the entire course of learning. In this case, the number of updates (plus one) bounds the maximum degree of any monomial in the final feature set. 2.2 Shifting comparators and a regret bound for regularized objectives Standard regret bounds compare the cumulative loss of an online learner to the cumulative loss of a single predictor (comparator) from a fixed comparison class. Shifting regret is a more general notion of regret, where the learner is compared to a sequence of comparators u1, u2, . . . , uT . Existing shifting regret bounds can be used to loosely justify the use of online gradient descent methods over expanding feature spaces [17]. These bounds are roughly of the form PT t=1 ft(wt) − ft(ut) ≲ p T P t<T ∥ut −ut+1∥, where ut is allowed to use the same features available to wt, and ft is the convex cost function in step t. This suggests a relatively high cost for a substantial total change in the comparator, and thus in the feature space. Given a budget, one could either do a liberal expansion a small number of times, or opt for including a small number of carefully chosen monomials more frequently. We have found that the computational cost of carefully picking a small number of high quality monomials is often quite high. With computational considerations at the forefront, we will prefer a more liberal but infrequent expansion. This also effectively exposes the learning algorithm to a large number of nonlinearities quickly, allowing their parameters to jointly converge between the stages. It is natural to ask if better guarantees are possible under some structure on the learning problem. Here, we consider the stochastic setting (rather than the harsher adversarial setting of [17]), and 3 further assume that our objective takes the form f(w) := E[ℓ(⟨w, xy⟩)] + λ∥w∥2/2, (1) where the expectation is under the (unknown) data generating distribution D over (x, y) ∈S × R, and ℓis some convex loss function on which suitable restrictions will be placed. Here S is such that S1 ⊆S2 ⊆. . . ⊆S, based on the largest degree monomials we intend to expand. We assume that in round t, we observe a stochastic gradient of the objective f, which is typically done by first sampling (xt, yt) ∼D and then evaluating the gradient of the regularized objective on this sample. This setting has some interesting structural implications over the general setting of online learning with shifting comparators. First, the fixed objective f gives us a more direct way of tracking the change in comparator through f(ut) −f(ut+1), which might often be milder than ∥ut −ut+1∥. In particular, if ut = arg minu∈Sk f(u) in epoch k, for a nested subspace sequence Sk, then we immediately obtain f(ut+1) ≤f(ut). Second, the strong convexity of the regularized objective enables the possibility of faster O(1/T) rates than prior work [17]. Indeed, in this setting, we obtain the following stronger result. We use the shorthand Et[·] to denote the conditional expectation at time t, conditioning over the data from rounds 1, . . . , t −1. Theorem 1. Let a distribution over (x, y), twice differentiable convex loss ℓwith ℓ≥0 and max{ℓ′, ℓ′′} ≤1, and a regularization parameter λ > 0 be given. Recall the definition (1) of the objective f. Let (wt, gt)t≥1 be as specified by apple with step size ηt := 1/(λ(t + 1)), where Et([gt]S(t)) = [∇f(wt)]S(t) and S(t) is the support set corresponding to epoch kt at time t in apple. Then for any comparator sequence (ut)∞ t=1 satisfying ut ∈S(t), for any fixed T ≥1, E f(wT +1) − PT t=1(t + 2)f(ut) PT t=1(t + 2) ! ≤ 1 T + 1 (X2 + λ)(X + λD)2 2λ2  , where X ≥maxt ∥xtyt∥and D ≥maxt max{∥wt∥, ∥ut∥}. Quite remarkably, the result exhibits no dependence on the cumulative shifting of the comparators unlike existing bounds [17]. This is the first result of this sort amongst shifting bounds to the best of our knowledge, and the only one that yields 1/T rates of convergence even with strong convexity. Of course, we limit ourselves to the stochastic setting, and prove expected regret guarantees on the final predictor wT as opposed to a bound on PT t=1 f(wt)/T. A curious distinction is our comparator, which is a weighted average of f(ut) as opposed to the more standard uniform average. Recalling that f(ut+1) ≤f(ut) in our setting, this is a strictly harder benchmark than an unweighted average and overemphasizes the later comparator terms which are based on larger support sets. Indeed, this is a nice compromise between competing against uT , which is the hardest yardstick, and u1, which is what a standard non-shifting analysis compares to. Indeed our improvement can be partially attributed to the stability of the averaged f values as opposed to just f(uT ) (more details in [3]). Overall, this result demonstrates that in our setting, while there is generally a cost to be paid for shifting the comparator too much, it can still be effectively controlled in favorable cases. One problem for future work is to establish these fast 1/T rates also with high probability. Note that the regret bound offers no guidance on how or when to select new monomials to add. 2.3 Feature expansion heuristics Previous work on learning sparse polynomials [13] suggests that it is possible to anticipate the utility of interaction features before even evaluating them. For instance, one of the algorithms from [13] orders monomials m(x) by an estimate of E[r(x)2m(x)2]/E[m(x)2], where r(x) = E[y|x]−ˆf(x) is the residual of the current predictor ˆf (for least-squares prediction of the label y). Such an index is shown to be related to the potential error reduction by polynomials with m(x) as a factor. We call this the SSM heuristic (after the authors of [13], though it differs from their original algorithm). Another plausible heuristic, which we use in Algorithm 1, simply orders the monomials in Sk by their weight magnitude in the current weight vector. We can justify this weight heuristic in the following simple example. Suppose a target function E[y|x] is just a single monomial in x, say, m(x) := Q i∈M xi for some M ⊆[d], and that x has a product distribution over {0, 1}d with 0 < E[xi] =: p ≤1/2 for all i ∈[d]. Suppose we repeatedly perform 1-sparse regression with the current 4 feature set Sk, and pick the top weight magnitude monomial for inclusion in the parent set Pk+1. It is easy to show that the weight on a degree ℓsub-monomial of m(x) in this regression is p|M|−ℓ, and the weight is strictly smaller for any term which is not a proper sub-monomial of m(x). Thus we repeatedly pick the largest available sub-monomial of m(x) and expand it, eventually discovering m(x). After k stages of the algorithm, we have at most kd features in our regression here, and hence we find m(x) with a total of d|M| variables in our regression, as opposed to d|M| which typical feature selection approaches would need. This intuition can be extended more generally to scenarios where we do not necessarily do a sparse regression and beyond product distributions, but we find that even this simplest example illustrates the basic motivations underlying our choice—we want to parsimoniously expand on top of a base feature set, while still making progress towards a good polynomial for our data. 2.4 Fall-back risk-consistency Neither the SSM heuristic nor the weight heuristic is rigorously analyzed (in any generality). Despite this, the basic algorithm apple can be easily modified to guarantee a form of risk consistency, regardless of which feature expansion heuristic is used. Consider the following variant of the support update rule in the algorithm apple. Given the current feature budget sk, we add sk −1 monomials ordered by weight magnitudes as in Step 7. We also pick a monomial m(x) of the smallest degree such that m(x) /∈Pk. Intuitively, this ensures that all degree 1 terms are in Pk after d stages, all degree 2 terms are in Pk after k = O(d2) stages and so on. In general, it is easily seen that k = O(dℓ−1) ensures that all degree ℓ−1 monomials are in Pk and hence all degree ℓmonomials are in Sk. For ease of exposition, let us assume that sk is set to be a constant s independent of k. Then the total number of monomials in Pk when k = O(dℓ−1) is O(sdℓ−1), which means the total number of features in Sk is O(sdℓ). Suppose we were interested in competing with all γ-sparse polynomials of degree ℓ. The most direct approach would be to consider the explicit enumeration of all monomials of degree up to ℓ, and then perform ℓ1-regularized regression [18] or a greedy variable selection method such as OMP [19] as means of enforcing sparsity. This ensures consistent estimation with n = O(γ log dℓ) = O(γℓlog d) examples. In contrast, we might need n = O(γ(ℓlog d + log s)) examples in the worst case using this fall back rule, a minor overhead at best. However, in favorable cases, we stand to gain a lot when the heuristic succeeds in finding good monomials rapidly. Since this is really an empirical question, we will address it with our empirical evaluation. 3 Experimental study We now describe of our empirical evaluation of apple. 3.1 Implementation, experimental setup, and performance metrics In order to assess the effectiveness of our algorithm, it is critical to build on top of an efficient learning framework that can handle large, high-dimensional datasets. To this end, we implemented apple in the Vowpal Wabbit (henceforth VW) open source machine learning software1. VW is a good framework for us, since it also natively supports quadratic and cubic expansions on top of the base features. These expansions are done dynamically at run-time, rather than being stored and read from disk in the expanded form for computational considerations. To deal with these dynamically enumerated features, VW uses hashing to associate features with indices, mapping each feature to a b-bit index, where b is a parameter. The core learning algorithm is an online algorithm as assumed in apple, but uses refinements of the basic stochastic gradient descent update (e.g., [20–23]). We implemented apple such that the total number of epochs was always 6 (meaning 5 rounds of adding new features). At the end of each epoch, the non-parent monomials with largest magnitude weights were marked as parents. Recall that the number of parents is modulated at sα for some α > 0, with s being the average number of non-zero features per example in the dataset so far. We will present experimental results with different choices of α, and we found α = 1 to be a reliable 1Please see https://github.com/JohnLangford/vowpal_wabbit and the associated git repository, where -stage_poly and related command line options execute apple. 5 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 relative error 0 5 10 15 20 25 30 number of datasets (cumulative) linear quadratic cubic apple apple-best ssm ssm-best 1 10 100 relative time 0 5 10 15 20 25 30 number of datasets (cumulative) linear quadratic cubic apple apple-best ssm ssm-best (a) (b) Figure 2: Dataset CDFs across all 30 datasets: (a) relative test error, (b) relative training time (log scale). {apple, ssm} refer to the α = 1 default; {apple, ssm}-best picks best α per dataset. default. Upon seeing an example, the features are enumerated on-the-fly by recursively expanding the marked parents, taking products with base monomials. These operations are done in a way to respect the sparsity (in terms of base features) of examples which many of our datasets exhibit. Since the benefits of nonlinear learning over linear learning themselves are very dataset dependent, and furthermore can vary greatly for different heuristics based on the problem at hand, we found it important to experiment with a large testbed consisting of a diverse collection of medium and largescale datasets. To this end, we compiled a collection of 30 publicly available datasets, across a number of KDDCup challenges, UCI repository and other common resources (detailed in the appendix). For all the datasets, we tuned the learning rate for each learning algorithm based on the progressive validation error (which is typically a reliable bound on test error) [24]. The number of bits in hashing was set to 18 for all algorithms, apart from cubic polynomials, where using 24 bits for hashing was found to be important for good statistical performance. For each dataset, we performed a random split with 80% of the data used for training and the remainder for testing. For all datasets, we used squared-loss to train, and 0-1/squared-loss for evaluation in classification/regression problems. We also experimented with ℓ1 and ℓ2 regularization, but these did not help much. The remaining settings were left to their VW defaults. For aggregating performance across 30 diverse datasets, it was important to use error and running time measures on a scale independent of the dataset. Let ℓ, q and c refer to the test errors of linear, quadratic and cubic baselines respectively (with lin, quad, and cubic used to denote the baseline algorithms themselves). For an algorithm alg, we compute the relative (test) error: rel err(alg) = err(alg) −min(ℓ, q, c) max(ℓ, q, c) −min(ℓ, q, c), (2) where min(ℓ, q, c) is the smallest error among the three baselines on the dataset, and max(ℓ, q, c) is similarly defined. We also define the relative (training) time as the ratio to running time of lin: rel time(alg) = time(alg)/time(lin). With these definitions, the aggregated plots of relative errors and relative times for the various baselines and our methods are shown in Figure 2. For each method, the plots show a cumulative distribution function (CDF) across datasets: an entry (a, b) on the left plot indicates that the relative error for b datasets was at most a. The plots include the baselines lin, quad, cubic, as well as a variant of apple (called ssm) that replaces the weight heuristic with the SSM heuristic, as described in Section 2.3. For apple and ssm, the plot shows the results with the fixed setting of α = 1, as well as the best setting chosen per dataset from α ∈{0.125, 0.25, 0.5, 0.75, 1} (referred to as apple-best and ssm-best). 3.2 Results In this section, we present some aggregate results. Detailed results with full plots and tables are presented in the appendix. In the Figure 2(a), the relative error for all of lin, quad and cubic is 6 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 relative error 0 2 4 6 8 10 12 number of datasets (cumulative) linear quadratic cubic apple apple-best 1 10 100 relative time 0 2 4 6 8 10 12 number of datasets (cumulative) linear quadratic cubic apple apple-best (a) (b) Figure 3: Dataset CDFs across 13 datasets where time(quad) ≥2time(lin): (a) relative test error, (b) relative training time (log scale). always to the right of 0 (due to the definition of rel err). In this plot, a curve enclosing a larger area indicates, in some sense, that one method uniformly dominates another. Since apple uniformly dominates ssm statistically (with only slightly longer running times), we restrict the remainder of our study to comparing apple to the baselines lin, quad and cubic. We found that on 12 of the 30 datasets, the relative error was negative, meaning that apple beats all the baselines. A relative error of 0.5 indicates that we cover at least half the gap between min(ℓ, q, c) and max(ℓ, q, c). We find that we are below 0.5 on 27 out of 30 datasets for apple-best, and 26 out of the 30 datasets for the setting α = 1. This is particularly striking since the error min(ℓ, q, c) is attained by cubic on a majority of the datasets (17 out of 30), where the relative error of cubic is 0. Hence, statistically apple often outperforms even cubic, while typically using a much smaller number of features. To support this claim, we include in the appendix a plot of the average number of features per example generated by each method, for all datasets. Overall, we find the statistical performance of apple from Figure 2 to be quite encouraging across this large collection of diverse datasets. The running time performance of apple is also extremely good. Figure 2(b) shows that the running time of apple is within a factor of 10 of lin for almost all datasets, which is quite impressive considering that we generate a potentially much larger number of features. The gap between lin and apple is particularly small for several large datasets, where the examples are sparse and highdimensional. In these cases, all algorithms are typically I/O-bottlenecked, which is the same for all algorithms due to the dynamic feature expansions used. It is easily seen that the statistically efficient baseline of cubic is typically computationally infeasible, with the relative time often being as large as 102 and 105 on the biggest dataset. Overall, the statistical performance of apple is competitive with and often better than min(ℓ, q, c), and offers a nice intermediate in computational complexity. A surprise in Figure 2(b) is that quad appears to computationally outperform apple for a relatively large number of datasets, at least in aggregate. This is due to the extremely efficient implementation of quad in VW: on 17 of 30 datasets, the running time of quad is less than twice that of lin. While we often statistically outperform quad on many of these smaller datasets, we are primarily interested in the larger datasets where the relative cost of nonlinear expansions (as in quad) is high. In Figure 3, we restrict attention to the 13 datasets where time(quad)/time(lin) ≥2. On these larger datasets, our statistical performance seems to dominate all the baselines (at least in terms of the CDFs, more on individual datasets will be said later). In terms of computational time, we see that we are often much better than quad, and cubic is essentially infeasible on most of these datasets. This demonstrates our key intuition that such adaptively chosen monomials are key to effective nonlinear learning in large, high-dimensional datasets. We also experimented with picky algorithms of the sort mentioned in Section 2.2. We tried the original algorithm from [13], which tests a candidate monomial before adding it to the feature set Sk, rather than just testing candidate parent monomials for inclusion in Pk; and also a picky algorithm based on our weight heuristic. Both algorithms were extremely computationally expensive, even when implemented using VW as a base: the explicit testing for inclusion in Sk (on a per-example 7 rcv1 nomao year 20news slice cup98 0 1 2 3 4 5 Relative error, ordered by average nonzero features per example linear quadratic cubic apple(0.125) apple(0.25) apple(0.5) apple(0.75) apple(1.0) rcv1 nomao year 20news slice cup98 100 101 102 103 Relative time, ordered by average nonzero features per example (a) (b) Figure 4: Comparison of different methods on the top 6 datasets by non-zero features per example: (a) relative test errors, (b) relative training times. lin lin + apple bigram bigram + apple Test AUC 0.81664 0.81712 0.81757 0.81796 Training time (in s) 1282 2727 2755 7378 Table 1: Test error and training times for different methods in a large-scale distributed setting. For {lin, bigram} + apple, we used α = 0.25. basis) caused too much overhead. We ruled out other baselines such as polynomial kernels for similar computational reasons. To provide more intuition, we also show individual results for the top 6 datasets with the highest average number of non-zero features per example—a key factor determining the computational cost of all approaches. In Figure 4, we show the performance of the lin, quad, cubic baselines, as well as apple with 5 different parameter settings in terms of relative error (Figure 4(a)) and relative time (Figure 4(b)). The results are overall quite positive. We see that on 3 of the datasets, we improve upon all the baselines statistically, and even on other 3 the performance is quite close to the best of the baselines with the exception of the cup98 dataset. In terms of running time, we find cubic to be extremely expensive in all the cases. We are typically faster than quad, and in the few cases where we take longer, we also obtain a statistical improvement for the slight increase in computational cost. In conclusion, on larger datasets, the performance of our method is quite desirable. Finally, we also implemented a parallel version of our algorithm, building on the repeated averaging approach [2, 25], using the built-in AllReduce communication mechanism of VW, and ran an experiment using an internal advertising dataset consisting of approximately 690M training examples, with roughly 318 non-zero features per example. The task is the prediction of click/no-click events. The data was stored in a large Hadoop cluster, split over 100 partitions. We implemented the lin baseline, using 5 passes of online learning with repeated averaging on this dataset, but could not run full quad or cubic baselines due to the prohibitive computational cost. As an intermediate, we generated bigram features, which only doubles the number of non-zero features per example. We parallelized apple as follows. In the first pass over the data, each one of the 100 nodes locally selects the promising features over 6 epochs, as in our single-machine setting. We then take the union of all the parents locally found across all nodes, and freeze that to be the parent set for the rest of training. The remaining 4 passes are now done with this fixed feature set, repeatedly averaging local weights. We then ran apple, on top of both lin as well as bigram as the base features to obtain maximally expressive features. The test error was measured in terms of the area under ROC curve (AUC), since this is a highly imbalanced dataset. The error and time results, reported in Table 1, show that using nonlinear features does lead to non-trivial improvements in AUC, albeit at an increased computational cost. Once again, this should be put in perspective with the full quad baseline, which did not finish in over a day on this dataset. Acknowledgements: We thank Leon Bottou, Rob Schapire and Dean Foster for helpful discussions. 8 References [1] I. Mukherjee, K. Canini, R. Frongillo, and Y. Singer. Parallel boosting with momentum. In Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2013. [2] A. Agarwal, O. Chapelle, M. Dudík, and J. Langford. A reliable effective terascale linear learning system. Journal of Machine Learning Research, 15(Mar):1111–1133, 2014. [3] A. Agarwal, A. Beygelzimer, D. Hsu, J. Langford, and M. Telgarsky. Scalable nonlinear learning with adaptive polynomial expansions. 2014. arXiv:1410.0440 [cs.LG]. [4] C. Williams and M. Seeger. Using the Nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems 13, 2001. [5] M. W. Mahoney. Randomized algorithms for matrices and data. Foundations and Trends in Machine Learning, 3(2):123–224, 2011. [6] B. Schölkopf and A. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [7] A. Bordes, S. Ertekin, J. Weston, and L. Bottou. Fast kernel classifiers with online and active learning. Journal of Machine Learning Research, 6:1579–1619, 2005. [8] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems 20, 2008. [9] P. Kar and H. Karnick. Random feature maps for dot product kernels. In AISTATS, 2012. [10] N. Pham and R. Pagh. Fast and scalable polynomial kernels via explicit feature maps. In Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2013. [11] R. Hamid, A. Gittens, Y. Xiao, and D. Decoste. Compact random feature maps. In ICML, 2014. [12] A. G. Ivakhnenko. Polynomial theory of complex systems. Systems, Man and Cybernetics, IEEE Transactions on, SMC-1(4):364–378, 1971. [13] T. D. Sanger, R. S. Sutton, and C. J. Matheus. Iterative construction of sparse polynomial approximations. In Advances in Neural Information Processing Systems 4, 1992. [14] A. T. Kalai, A. Samorodnitsky, and S.-H. Teng. Learning and smoothed analysis. In FOCS, 2009. [15] A. Andoni, R. Panigrahy, G. Valiant, and L. Zhang. Learning sparse polynomial functions. In SODA, 2014. [16] A. G. Dimakis, A. Klivans, M. Kocaoglu, and K. Shanmugam. A smoothed analysis for learning sparse polynomials. CoRR, abs/1402.3902, 2014. [17] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, 2003. [18] R. Tibshirani. Regression shrinkage and selection via the lasso. J. Royal. Statist. Soc B., 58(1):267–288, 1996. [19] J. A. Tropp and A. C. Gilbert. Signal recovery from random measurements via orthogonal matching pursuit. IEEE Transactions on Information Theory, 53(12):4655–4666, December 2007. [20] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [21] H. B. McMahan and M. J. Streeter. Adaptive bound optimization for online convex optimization. In COLT, pages 244–256, 2010. [22] N. Karampatziakis and J. Langford. Online importance weight aware updates. In UAI, pages 392–399, 2011. [23] S. Ross, P. Mineiro, and J. Langford. Normalized online learning. In UAI, 2013. [24] A. Blum, A. Kalai, and J. Langford. Beating the hold-out: Bounds for k-fold and progressive crossvalidation. In COLT, 1999. [25] K. Hall, S. Gilpin, and G. Mann. Mapreduce/bigtable for distributed optimization. In Workshop on Learning on Cores, Clusters, and Clouds, 2010. [26] S. Bubeck. Theory of convex optimization for machine learning. 2014. arXiv:1405.4980 [math.OC]. [27] O. Shamir and T. Zhang. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In ICML, 2013. 9
2014
237
5,333
Multi-Step Stochastic ADMM in High Dimensions: Applications to Sparse Optimization and Matrix Decomposition Hanie Sedghi Univ. of Southern California Los Angeles, CA 90089 hsedghi@usc.edu Anima Anandkumar University of California Irvine, CA 92697 a.anandkumar@uci.edu Edmond Jonckheere Univ. of Southern California Los Angeles, CA 90089 jonckhee@usc.edu Abstract In this paper, we consider a multi-step version of the stochastic ADMM method with efficient guarantees for high-dimensional problems. We first analyze the simple setting, where the optimization problem consists of a loss function and a single regularizer (e.g. sparse optimization), and then extend to the multi-block setting with multiple regularizers and multiple variables (e.g. matrix decomposition into sparse and low rank components). For the sparse optimization problem, our method achieves the minimax rate of O(s log d/T) for s-sparse problems in d dimensions in T steps, and is thus, unimprovable by any method up to constant factors. For the matrix decomposition problem with a general loss function, we analyze the multi-step ADMM with multiple blocks. We establish O(1/T) rate and efficient scaling as the size of matrix grows. For natural noise models (e.g. independent noise), our convergence rate is minimax-optimal. Thus, we establish tight convergence guarantees for multi-block ADMM in high dimensions. Experiments show that for both sparse optimization and matrix decomposition problems, our algorithm outperforms the state-of-the-art methods. 1 Introduction Stochastic optimization techniques have been extensively employed for online machine learning on data which is uncertain, noisy or missing. Typically it involves performing a large number of inexpensive iterative updates, making it scalable for large-scale learning. In contrast, traditional batch-based techniques involve far more expensive operations for each update step. Stochastic optimization has been analyzed in a number of recent works. The alternating direction method of multipliers (ADMM) is a popular method for online and distributed optimization on a large scale [1], and is employed in many applications. It can be viewed as a decomposition procedure where solutions to sub-problems are found locally, and coordinated via constraints to find the global solution. Specifically, it is a form of augmented Lagrangian method which applies partial updates to the dual variables. ADMM is often applied to solve regularized problems, where the function optimization and regularization can be carried out locally, and then coordinated globally via constraints. Regularized optimization problems are especially relevant in the high dimensional regime since regularization is a natural mechanism to overcome ill-posedness and to encourage parsimony in the optimal solution, e.g., sparsity and low rank. Due to the efficiency of ADMM in solving regularized problems, we employ it in this paper. We consider a simple modification to the (inexact) stochastic ADMM method [2] by incorporating multiple steps or epochs, which can be viewed as a form of annealing. We establish that this simple modification has huge implications in achieving tight bounds on convergence rate as the dimensions 1 of the problem instances scale. In each iteration, we employ projections on to certain norm balls of appropriate radii, and we decrease the radii in epochs over time. For instance, for the sparse optimization problem, we constrain the optimal solution at each step to be within an ℓ1-norm ball of the initial estimate, obtained at the beginning of each epoch. At the end of the epoch, an average is computed and passed on to the next epoch as its initial estimate. Note that the ℓ1 projection can be solved efficiently in linear time, and can also be parallelized easily [3]. For matrix decomposition with a general loss function, the ADMM method requires multiple blocks for updating the low rank and sparse components. We apply the same principle and project the sparse and low rank estimates on to ℓ1 and nuclear norm balls, and these projections can be computed efficiently. Theoretical implications: The above simple modifications to ADMM have huge implications for high-dimensional problems. For sparse optimization, our convergence rate is O( s log d T ), for s-sparse problems in d dimensions in T steps. Our bound has the best of both worlds: efficient high-dimensional scaling (as log d) and efficient convergence rate (as 1 T ). This also matches the minimax rate for the linear model and square loss function [4], which implies that our guarantee is unimprovable by any (batch or online) algorithm (up to constant factors). For matrix decomposition, our convergence rate is O((s + r)β2(p) log p/T)) + O(max{s + r, p}/p2) for a p × p input matrix in T steps, where the sparse part has s non-zero entries and low rank part has rank r. For many natural noise models (e.g. independent noise, linear Bayesian networks), β2(p) = p, and the resulting convergence rate is minimax-optimal. Note that our bound is not only on the reconstruction error, but also on the error in recovering the sparse and low rank components. These are the first convergence guarantees for online matrix decomposition in high dimensions. Moreover, our convergence rate holds with high probability when noisy samples are input, in contrast to expected convergence rate, typically analyzed in the literature. See Table 1, 2 for comparison of this work with related frameworks. Proof of all results and implementation details can be found in the longer version [5]. Practical implications: The proposed algorithms provide significantly faster convergence in high dimension and better robustness to noise. For sparse optimization, our method has significantly better accuracy compared to the stochastic ADMM method and better performance than RADAR, based on multi-step dual averaging [6]. For matrix decomposition, we compare our method with the state-of-art inexact ALM [7] method. While both methods have similar reconstruction performance, our method has significantly better accuracy in recovering the sparse and low rank components. Related Work: ADMM: Existing online ADMM-based methods lack high-dimensional guarantees. They scale poorly with the data dimension (as O(d2)), and also have slow convergence for general problems (as O( 1 √ T )). Under strong convexity, the convergence rate can be improved to O( 1 T ) but only in expectation: such analyses ignore the per sample error and consider only the expected convergence rate(see Table 1). In contrast, our bounds hold with high probability. Some stochastic ADMM methods, Goldstein et al. [8], Deng [9] and Luo [10] provide faster rates for stochastic ADMM, than the rate noted in Table 1. However, they require strong conditions which are not satisfied for the optimization problems considered here, e.g., Goldstein et al. [8] require both the loss function and the regularizer to be strongly convex. Related Work: Sparse Optimization: For the sparse optimization problem, ℓ1 regularization is employed and the underlying true parameter is assumed to be sparse. This is a well-studied problem in a number of works (for details, refer to [6]). Agarwal et al. [6] propose an efficient online method based on dual averaging, which achieves the same optimal rates as the ones derived in this paper. The main difference is that our ADMM method is capable of solving the problem for multiple random variables and multiple conditions while their method cannot incorporate these extensions. Related Work: Matrix Decomposition: To the best of our knowledge, online guarantees for highdimensional matrix decomposition have not been provided before. Wang et al. [12] propose a multiblock ADMM method for the matrix decomposition problem but only provide convergence rate analysis in expectation and it has poor high dimensional scaling (as O(p4) for a p × p matrix) without further modifications. Note that they only provide convergence rate on difference between loss function and optimal loss, whereas we provide the convergence rate on individual errors of the sparse and low rank components ∥¯S(T) −S∗∥2 F, ∥¯L(T) −L∗∥2 F. See Table 2 for comparison of guarantees for matrix decomposition problem. Notation In the sequel, we use lower case letter for vectors and upper case letter for matrices. Moreover, X ∈Rp×p. ∥x∥1, ∥x∥2 refer to ℓ1, ℓ2 vector norms respectively. The term ∥X∥∗stands 2 Method Assumptions Convergence rate ST-ADMM [2] L, convexity O(d2/ √ T) ST-ADMM [2] SC, E O(d2 log T/T) BADMM [11] convexity, E O(d2/ √ T) RADAR [6] LSC, LL O(s log d/T) REASON 1 (this paper) LSC, LL O(s log d/T) Minimax bound [4] Eigenvalue conditions O(s log d/T) Table 1: Comparison of online sparse optimization methods under s sparsity level for the optimal paramter, d dimensional space, and T number of iterations. SC = Strong Convexity, LSC = Local Strong Convexity, LL = Local Lipschitz, L = Lipschitz property, E=in Expectation. The last row provides the minimax-optimal rate for any method. The results hold with high probability. Method Assumptions Convergence rate Multi-block-ADMM[12] L, SC, E O(p4/T) Batch method[13] LL, LSC, DF O((s log p + rp)/T)+O(s/p2) REASON 2 (this paper) LSC, LL, DF O((s + r)β2(p) log p/T))+O(max{s + r, p}/p2) Minimax bound[13] ℓ2, IN, DF O((s log p + rp)/T)+O(s/p2) Table 2: Comparison of optimization methods for sparse+low rank matrix decomposition for a p×p matrix under s sparsity level and r rank matrices and T is the number of samples. Abbreviations are as in Table 1, IN = Independent noise model, DF = diffuse low rank matrix under the optimal parameter. β(p) = Ω(√p), O(p) and its value depends the model. The last row provides the minimax-optimal rate for any method under the independent noise model. The results hold with high probability unless otherwise mentioned. For Multi-block-ADMM [12] the convergence rate is on the difference of loss function from optimal loss, for the rest of works in the table, the convergence rate is on the individual estimates of the sparse and low rank components: ∥¯S(T)−S∗∥2 F +∥¯L(T)−L∗∥2 F. for nuclear norm of X. In addition, ∥X∥2, ∥X∥F denote spectral and Frobenius norms respectively. We use vectorized ℓ1, ℓ∞norm for matrices, i.e., ∥X∥1 = P i,j |Xij|, ∥X∥∞= max i,j |Xij|. 2 ℓ1 Regularized Stochastic Optimization We consider the optimization problem θ∗∈arg min E[f(θ, x)], θ ∈Ωwhere θ∗is a sparse vector. The loss function f(θ, xk) is a function of a parameter θ ∈Rd and samples xi. In stochastic setting, we do not have access to E[f(θ, x)] nor to its subgradients. In each iteration we have access to one noisy sample. In order to impose sparsity we use regularization. Thus, we solve a sequence θk ∈arg min θ∈Ω′ f(θ, xk) + λ∥θ∥1, Ω′ ⊂Ω, (1) where the regularization parameter λ > 0 and the constraint sets Ω′ change from epoch to epoch. 2.1 Epoch-based Stochastic ADMM Algorithm We now describe the modified inexact ADMM algorithm for the sparse optimization problem in (1), and refer to it as REASON 1, see Algorithm 1. We consider an epoch length T0, and in each epoch i, we project the optimal solution on to an ℓ1 ball with radius Ri centered around ˜θi, which is the initial estimate of θ∗at the start of the epoch. The θ-update is given by θk+1 = arg min ∥θ−˜θi∥2 1≤R2 i {⟨∇f(θk), θ −θk⟩−⟨zk, θ −yk⟩+ ρ 2∥θ −yk∥2 2 + ρx 2 ∥θ −θk∥2 2}. (2) Note that this is an inexact update since we employ the gradient ∇f(·) rather than optimize directly on the loss function f(·) which is expensive. The above program can be solved efficiently since it is a projection on to the ℓ1 ball, whose complexity is linear in the sparsity level of the gradient, when performed serially, and O(log d) when performed in parallel using d processors [3]. For the regularizer, we introduce the variable y, and the y-update is yk+1 = arg min{λi∥yk∥1 −⟨zk, θk+1 − 3 Algorithm 1: Regularized Epoch-based Admm for Stochastic Opt. in high-dimensioN 1 (REASON 1) Input ρ, ρx, epoch length T0 , initial prox center ˜θ1, initial radius R1, regularization parameter {λi}kT i=1. Define Shrinkκ(a) = (a −κ)+ −(−a −κ)+. for Each epoch i = 1, 2, ..., kT do Initialize θ0 = y0 = ˜θi for Each iteration k = 0, 1, ..., T0 −1 do θk+1 = arg min ∥θ−˜θi∥1≤Ri {⟨∇f(θk), θ −θk⟩−⟨zk, θ −yk⟩+ ρ 2∥θ −yk∥2 2 + ρx 2 ∥θ −θk∥2 2} yk+1 = Shrinkλi/ρ(θk+1 −zk ρ ), zk+1 = zk −τ(θk+1 −yk+1) Return : θ(Ti) := 1 T PT0−1 k=0 θk for epoch i and ˜θi+1 = θ(Ti). Update : R2 i+1 = R2 i /2. y⟩+ ρ 2∥θk+1−y∥2 2}. This update can be simplified to the form given in REASON 1, where Shrinkκ(·) is the soft-thresholding or shrinkage function [1]. Thus, each step in the update is extremely simple to implement. When an epoch is complete, we carry over the average θ(Ti) as the next epoch center and reset the other variables. 2.2 High-dimensional Guarantees We now provide convergence guarantees for the proposed method under the following assumptions. Assumption A1: Local strong convexity (LSC): The function f : S →R satisfies an R-local form of strong convexity (LSC) if there is a non-negative constant γ = γ(R) such that for any θ1, θ2 ∈S with ∥θ1∥1 ≤R and ∥θ2∥1 ≤R, f(θ1) ≥f(θ2) + ⟨∇f(θ2), θ1 −θ2⟩+ γ 2 ∥θ2 −θ1∥2 2. Note that the notion of strong convexity leads to faster convergence rates in general. Intuitively, strong convexity is a measure of curvature of the loss function, which relates the reduction in the loss function to closeness in the variable domain. Assuming that the function f is twice continuously differentiable, it is strongly convex, if and only if its Hessian is positive semi-definite, for all feasible θ. However, in the high-dimensional regime, where there are fewer samples than data dimension, the Hessian matrix is often singular and we do not have global strong convexity. A solution is to impose local strong convexity which allows us to provide guarantees for high dimensional problems. This notion has been exploited before in a number of works on high dimensional analysis, e.g., [14, 13, 6]. It holds for various loss functions such as square loss. Assumption A2: Sub-Gaussian stochastic gradients: Let ek(θ) := ∇f(θ, xk) −E[∇f(θ, xk)]. There is a constant σ = σ(R) such that for all k > 0, E[exp(∥ek(θ)∥2 ∞)/σ2] ≤exp(1), for all θ such that ∥θ −θ∗∥1 ≤R. Remark: The bound holds with σ = O(√log d) whenever each component of the error vector has sub-Gaussian tails [6]. Assumption A3: Local Lipschitz condition: For each R > 0, there is a constant G = G(R) such that, |f(θ1)−f(θ2)| ≤G∥θ1−θ2∥1, for all θ1, θ2 ∈S such that ∥θ−θ∗∥1 ≤R and ∥θ1−θ∗∥1 ≤R. The design parameters are as below where λi is the regularization for ℓ1 term in epoch i, ρ and ρx are penalties in θ-update as in (2) and τ is the step size for the dual update. λ2 i = γRi s√T0 s log d + G2(ρ + ρx)2 T 2 0 + σ2 i log( 3 δi ), ρ ∝ √T0 log d Ri , ρx > 0, τ ∝ √T0 Ri . (3) Theorem 1. Under Assumptions A1 −A3, λi as in (3) , with fixed epoch lengths T0 = T log d/kT , where T is the total number of iterations and kT = log2 γ2R2 1T s2(log d + γ s G + 12σ2 log( 6 δ )), 4 and T0 satisfies T0 = O(log d), for any θ∗with sparsity s, with probability at least 1 −δ we have ∥¯θT −θ∗∥2 2 = O  s log d + γ s G + (log(1/δ) + log(kT /log d))σ2 T log d kT  , where ¯θT is the average for the last epoch for a total of T iterations. Improvement of log d factor : The above theorem covers the practical case where the epoch length T0 is fixed. We can improve the above results using varying epoch length (which depend on the problem parameters) such that ∥¯θT −θ∗∥2 2 = O(s log d/T). The details can be found in the longer version [5].This convergence rate of O(s log d/T) matches the minimax lower bounds for sparse estimation [4]. This implies that our guarantees are unimprovable up to constant factors. 3 Extension to Doubly Regularized Stochastic Optimization We consider the optimization problem M ∗∈arg min E[f(M, X)], where we want to decompose M into a sparse matrix S ∈Rp×p and a low rank matrix L ∈Rp×p. f(M, Xk) is a function of a parameter M and samples Xk. Xk can be a matrix (e.g. independent noise model) or a vector (e.g. Gaussian graphical model). In stochastic setting, we do not have access to E[f(M, X)] nor to its subgradients. In each iteration, we have access to one noisy sample and update our estimate based on that. We impose the desired properties with regularization. Thus, we solve a sequence c Mk := arg min{ bf(M, Xk) + λn∥S∥1 + µn∥L∥∗} s.t. M = S + L, ∥L∥∞≤α p . (4) We propose an online program based on multi-block ADMM algorithm. In addition to tailoring projection ideas employed for sparse case, we impose an ℓ∞constraint of α/p on each entry of L. This constraint is also imposed for the batch version of the problem (4) in [13], and we assume that the true matrix L∗satisfies this constraint. Intuitively, the ℓ∞constraint controls the “spikiness” of L∗. If α ≈1, then the entries of L are O(1/p), i.e. they are “diffuse” or “non-spiky”, and no entry is too large. When the low rank matrix L∗has diffuse entries, it cannot be a sparse matrix, and thus, can be separated from the sparse S∗efficiently. In fact, the ℓ∞constraint is a weaker form of the incoherence-type assumptions needed to guarantee identifiability [15] for sparse+low rank decomposition. For more discussions, see Section 3.2. 3.1 Epoch-based Multi-Block ADMM Algorithm We now extend the ADMM method proposed in REASON 1 to multi-block ADMM. The details are in Algorithm 2, and we refer to it as REASON 2. Recall that the matrix decomposition setting assumes that the true matrix M ∗= S∗+ L∗is a combination of a sparse matrix S∗and a low rank matrix L∗. In REASON 2, the updates for matrices M, S, L are done independently at each step. The updates follow definition of ADMM and ideas presented in Section 2. We consider epochs of lengths T0. We do not need to project the update of matrix M. The update rules for S, L are result of doing an inexact proximal update by considering them as a single block, which can then be decoupled. We impose an ℓ1-norm projection for the sparse estimate S around the epoch initialization ˜Si. For the low rank estimate L, we impose a nuclear norm projection around the epoch initialization ˜Li. Intuitively, the nuclear norm projection, which is an ℓ1 projection on the singular values, encourages sparsity in the spectral domain leading to low rank estimates. We also require an ℓ∞constraint on L. Thus, the update rule for L has two projections, i.e. infinity and nuclear norm projections. We decouple it into ADMM updates L, Y with dual variable U corresponding to this decomposition. 3.2 High-dimensional Guarantees We now prove that REASON 2 recovers both the sparse and low rank estimates in high dimensions efficiently. We need the following assumptions, in addition to Assumptions A2, A3. Assumption A4: Spectral Bound on the Gradient Error Let Ek(M, Xk) := ∇f(M, Xk) − E[∇f(M, Xk)], ∥Ek∥2 ≤β(p)σ, where σ := ∥Ek∥∞. 5 Recall from Assumption A2 that σ = O(log p), under sub-Gaussianity. Here, we require spectral bounds in addition to ∥· ∥∞bound in A2. Assumption A5: Bound on spikiness of low-rank matrix ∥L∗∥∞≤α p , as discussed before. Assumption A6: Local strong convexity (LSC) The function f : Rd1×d2 →Rn1×n2 satisfies an R-local form of strong convexity (LSC) if there is a non-negative constant γ = γ(R) such that f(B1) ≥f(B2) + Tr(∇f(B2)(B1 −B2)) + γ 2 ∥B2 −B1∥F, for any ∥B1∥≤R and ∥B2∥≤R, which is essentially the matrix version of Assumption A1. We choose algorithm parameters as below where λi, µi are the regularization for ℓ1 and nuclear norm respectively, ρ, ρx correspond to penalty terms in M-update and τ is dual update step size. λ2 i = γ q (R2 i + ˜R2 i ) (s + r)√T0 s log p+ G2(ρ + ρx)2 T 2 0 +β2(p)σ2 i log( 3 δi )+ α2 p2 + β2(p)σ2 T0  log p+log 1 δ  (5) µ2 i = cµλ2 i , ρ ∝ s T0 log p R2 i + ˜R2 i , ρx > 0, τ ∝ s T0 R2 i + ˜R2 i Theorem 2. Under Assumptions A2 −A6, parameter settings (5), let T denote total number of iterations and T0 = T log p/kT , where kT ≃−log (s + r)2 γ2R2 1T  log p + G s + r + β2(p)σ2 [(1 + G)(log(6/δ) + log kT ) + log p]  , and T0 satisfies T0 = O(log p), with probability at least 1 −δ we have ∥¯S(T) −S∗∥2 F + ∥¯L(T) −L∗∥2 F = O  (s + r) log p + G + β2(p)σ2 h (1 + G)(log 6 δ + log kT log p) + log p i T log p kT  +  1 + s + r γ2p α2 p . Improvement of log p factor : The above result can be improved by a log p factor by considering varying epoch lengths (which depend on problem parameters). The resulting convergence rate is O((s + r)p log p/T + α2/p). The details can be found in the longer version [5]. Scaling of β(p): We have the following bounds Θ(√p) ≤β(p)Θ(p). This implies that the convergence rate (with varying epoch lengths) is O((s + r)p log p/T + α2/p), when β(p) = Θ(√p) and when β(p) = Θ(p), it is O((s + r)p2 log p/T + α2/p). The upper bound on β(p) arises trivially by converting the max-norm ∥Ek∥∞≤σ to the bound on the spectral norm ∥Ek∥2. In many interesting scenarios, the lower bound on β(p) is achieved, as outlined below in Section 3.2.1. Comparison with the batch result: Agarwal et al. [13] consider the batch version of the same problem (4), and provide a convergence rate of O((s log p + rp)/T + sα2/p2). This is also the minimax lower bound under the independent noise model. With respect to the convergence rate, we match their results with respect to the scaling of s and r, and also obtain a 1/T rate. We match the scaling with respect to p (up to a log factor), when β(p) = Θ(√p) attains the lower bound, and we discuss a few such instances below. Otherwise, we are worse by a factor of p compared to the batch version. Intuitively, this is because we require different bounds on error terms Ek in the online and the batch settings. The batch setting considers an empirical estimate, hence operates on the averaged error. Whereas in the online setting we suffer from the per sample error. Efficient concentration bounds exist for the batch case [16], while for the online case, no such bounds exist in general. Hence, we conjecture that our bounds in Theorem 2 are unimprovable in the online setting. Approximation Error: Note that the optimal decomposition M ∗= S∗+ L∗is not identifiable in general without the incoherence-style conditions [15, 17]. In this paper, we provide efficient guarantees without assuming such strong incoherence constraints. This implies that there is an approximation error which is incurred even in the noiseless setting due to model non-identifiability. 6 Algorithm 2: Regularized Epoch-based Admm for Stochastic Opt. in high-dimensioN 2 (REASON 2) Input ρ, ρx, epoch length T0 , regularization parameters {λi, µi}kT i=1, initial prox centers ˜S1, ˜L1, initial radii R1, ˜R1. Define Shrinkκ(a) shrinkage operator as in REASON 1, GMk = Mk+1 −Sk −Lk −1 ρZk. for each epoch i = 1, 2, ..., kT do Initialize S0 = ˜Si, L0 = ˜Li, M0 = S0 + L0. for each iteration k = 0, 1, ..., T0 −1 do Mk+1 = −∇f(Mk) + Zk + ρ(Sk + Lk) + ρxMk ρ + ρx Sk+1 = min ∥S−˜Si∥1≤Ri λi∥S∥1 + ρ 2τk ∥S −(Sk + τkGMk)∥2 F Lk+1 = min ∥L−˜Li∥∗≤˜ Ri µi∥L∥∗+ ρ 2∥L −Yk −Uk/ρ∥2 F Yk+1 = min ∥Y ∥∞≤α/p ρ 2τk ∥Y −(Lk + τkGMk)∥2 F + ρ 2∥Lk+1 −Y −Uk/ρ∥2 F Zk+1 = Zk −τ(Mk+1 −(Sk+1 + Lk+1)) Uk+1 = Uk −τ(Lk+1 −Yk+1). Set: ˜Si+1 = 1 T0 PT0−1 k=0 Sk and ˜Li+1 := 1 T0 PT0−1 k=0 Lk if R2 i > 2(s + r + (s+r)2 pγ2 ) α2 p then Update R2 i+1 = R2 i /2, ˜R2 i+1 = ˜Ri 2/2; else STOP; Dimension Run Time (s) Method error at 0.02T error at 0.2T error at T ST-ADMM 1.022 1.002 0.996 d=20000 T=50 RADAR 0.116 2.10e-03 6.26e-05 REASON 1.5e-03 2.20e-04 1.07e-08 ST-ADMM 0.794 0.380 0.348 d=2000 T=5 RADAR 0.103 4.80e-03 1.53e-04 REASON 0.001 2.26e-04 1.58e-08 ST-ADMM 0.212 0.092 0.033 d=20 T=0.2 RADAR 0.531 4.70e-03 4.91e-04 REASON 0.100 2.02e-04 1.09e-08 Table 3: Least square regression problem, epoch size Ti = 2000, Error= ∥θ−θ∗∥2 ∥θ∗∥2 . Agarwal et al. [13] achieve an approximation error of sα2/p2 for their batch algorithm. Our online algorithm has an approximation error of max{s + r, p}α2/p2, which is decaying with p. It is not clear if this bound can be improved by any other online algorithm. 3.2.1 Optimal Guarantees for Various Statistical Models We now list some statistical models under which we achieve the batch-optimal rate for sparse+low rank decomposition. 1) Independent Noise Model: Assume we sample i.i.d. matrices Xk = S∗+ L∗+ Nk, where the noise Nk has independent bounded sub-Gaussian entries with maxi,j Var(Nk(i, j)) = σ2. We consider the square loss function, ∥Xk −S −L∥2 F. Hence Ek = Xk −S∗−L∗= Nk. From [Thm. 1.1][18], we have w.h.p. ∥Nk∥= O(σ√p). We match the batch bound in [13] in this setting. Moreover, Agarwal et al. [13] provide a minimax lower bound for this model, and we match it as well. Thus, we achieve the optimal convergence rate for online matrix decomposition for this model. 2) Linear Bayesian Network: Consider a p-dimensional vector y = Ah + n, where h ∈Rr with r ≤p, and n ∈Rp. The variable h is hidden, and y is the observed variable. We assume that the vectors h and n are each zero-mean sub-Gaussian vectors with i.i.d entries, and are independent of 7 Run Time T = 50 sec T = 150 sec Error ∥M ∗−S−L∥F ∥M ∗∥F ∥S−S∗∥F ∥S∗∥F ∥L∗−L∥F ∥L∗∥F ∥M ∗−S−L∥F ∥M ∗∥F ∥S−S∗∥F ∥S∗∥F ∥L∗−L∥F ∥L∗∥F REASON 2 IALM 2.20e-03 5.11e-05 0.004 0.12 0.01 0.27 5.55e-05 8.76e-09 1.50e-04 0.12 3.25e-04 0.27 Table 4: REASON 2 and inexact ALM, matrix decomposition problem. p = 2000, η2 = 0.01 one another. Let σ2 h and σ2 n be the variances for the entries of h and n respectively. Without loss of generality, we assume that the columns of A are normalized, as we can always rescale A and σh appropriately to obtain the same model. Let Σ∗ y,y be the true covariance matrix of y. From the independence assumptions, we have Σ∗ y,y = S∗+ L∗, where S∗= σ2 nI is a diagonal matrix and L∗= σ2 hAA⊤has rank at most r. In each step k, we obtain a sample yk from the Bayesian network. For the square loss function f, we have the error Ek = yky⊤ k −Σ∗ y,y. Applying [Cor. 5.50][19], we have, with w.h.p. ∥nkn⊤ k − σ2 nI∥2 = O(√pσ2 n), ∥hkh⊤ k −σ2 hI∥2 = O(√pσ2 h). We thus have with probability 1 −Te−cp, ∥Ek∥2 ≤O √p(∥A∥2σ2 h + σ2 n)  , ∀k ≤T. When ∥A∥2 is bounded, we obtain the optimal bound in Theorem 2, which matches the batch bound. If the entries of A are generically drawn (e.g., from a Gaussian distribution), we have ∥A∥2 = O(1 + p r/p). Moreover, such generic matrices A are also “diffuse”, and thus, the low rank matrix L∗satisfies Assumption A5, with α ∼polylog(p). Intuitively, when A is generically drawn, there are diffuse connections from hidden to observed variables, and we have efficient guarantees under this setting. 4 Experiments REASON 1: For sparse optimization problem, we compare REASON 1 with RADAR and ST-ADMM under the least-squares regression setting. Samples (xt, yt) are generated such that xt ∈Unif[−B, B] and yt = ⟨θ∗, x⟩+ nt. θ∗is s-sparse with s = ⌈log d⌉. nt ∼N(0, η2). With η2 = 0.5 in all cases. We consider d = 20, 2000, 20000 and s = 1, 3, 5 respectively. 500 1000 1500 2000 0 0.2 0.4 0.6 0.8 1 x 10 −4 tttt t2 500 1000 1500 2000 0 5 10 15 20 25 30 rr tttt t3 500 1000 1500 2000 0 1 2 3 4 rr tttt t4 500 1000 1500 2000 0 2 4 6 8 10 tttt t1 Figure 1: Least square regression, Error= ∥θ−θ∗∥2 ∥θ∗∥2 vs. iteration number, d1 = 20 and d2 = 20000. The experiments are performed on a 2.5 GHz Intel Core i5 laptop with 8 GB RAM. See Table 3 for experiment results. It should be noted that RADAR is provided with information of θ∗for epoch design and recentering. In addition, both RADAR and REASON 1 have the same initial radius. Nevertheless, REASON 1 reaches better accuracy within the same run time even for small time frames. In addition, we compare relative error ∥θ −θ∗∥2/∥θ∗∥2 in REASON 1 and ST-ADMM in the first epoch. We observe that in higher dimension error fluctuations for ADMM increases noticeably (see Figure 1). Therefore, projections of REASON 1 play an important role in denoising and obtaining good accuracy. REASON 2: We compare REASON 2 with state-of-the-art inexact ALM method for matrix decomposition problem (ALM codes are downloaded from [20]). Table 4 shows that with equal time, inexact ALM reaches smaller ∥M ∗−S−L∥F ∥M ∗∥F error while in fact this does not provide a good decomposition. Further, REASON 2 reaches useful individual errors. Experiments with η2 ∈[0.01, 1] show similar results. Similar experiments on exact ALM shows worse performance than inexact ALM. Acknowledgment We acknowledge detailed discussions with Majid Janzamin and thank him for valuable comments on sparse and low rank recovery. The authors thank Alekh Agarwal for detailed discussions of his work and the minimax bounds. A. Anandkumar is supported in part by Microsoft Faculty Fellowship, NSF Career award CCF-1254106, NSF Award CCF-1219234, and ARO YIP Award W911NF-13-1-0084. 8 References [1] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends R⃝in Machine Learning, 3(1):1–122, 2011. [2] H. Ouyang, N. He, L. Tran, and A. G Gray. Stochastic alternating direction method of multipliers. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 80–88, 2013. [3] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the ℓ1ball for learning in high dimensions. In Proceedings of the 25th international conference on Machine learning, pages 272–279. ACM, 2008. [4] G. Raskutti, M. J. Wainwright, and B. Yu. Minimax rates of estimation for high-dimensional linear regression over ℓq-balls. IEEE Trans. Information Theory, 57(10):6976—6994, October 2011. [5] Hanie Sedghi, Anima Anandkumar, and Edmond Jonckheere. Guarantees for multi-step stochastic ADMM in high dimensions. arXiv preprint arXiv:1402.5131, 2014. [6] A. Agarwal, S. Negahban, and M. J. Wainwright. Stochastic optimization and sparse statistical recovery: Optimal algorithms for high dimensions. In NIPS, pages 1547–1555, 2012. [7] Z. Lin, M. Chen, and Y. Ma. The augmented lagrange multiplier method for exact recovery of corrupted low-rank matrices. arXiv preprint arXiv:1009.5055, 2010. [8] T Goldstein, B. ODonoghue, and S. Setzer. Fast alternating direction optimization methods. CAM report, pages 12–35, 2012. [9] W. Deng, W.and Yin. On the global and linear convergence of the generalized alternating direction method of multipliers. Technical report, DTIC Document, 2012. [10] Zhi-Quan Luo. On the linear convergence of the alternating direction method of multipliers. arXiv preprint arXiv:1208.3922, 2012. [11] H. Wang and A. Banerjee. Bregman alternating direction method of multipliers. arXiv preprint arXiv:1306.3203, 2013. [12] X. Wang, M. Hong, S. Ma, and Z. Luo. Solving multiple-block separable convex minimization problems using two-block alternating direction method of multipliers. arXiv preprint arXiv:1308.5294, 2013. [13] A. Agarwal, S. Negahban, and M. Wainwright. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. The Annals of Statistics, 40(2):1171–1197, 2012. [14] S. Negahban, P. Ravikumar, M. Wainwright, and B. Yu. A unified framework for highdimensional analysis of M-estimators with decomposable regularizers. Statistical Science, 27(4):538–557, 2012. [15] V. Chandrasekaran, S. Sanghavi, Pablo A Parrilo, and A. S Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM Journal on Optimization, 21(2):572–596, 2011. [16] J. Tropp. User-friendly tail bounds for sums of random matrices. Foundations of Computational Mathematics, 12(4):389–434, 2012. [17] Daniel Hsu, Sham M Kakade, and Tong Zhang. Robust matrix decomposition with sparse corruptions. Information Theory, IEEE Transactions on, 57(11):7221–7234, 2011. [18] Van H Vu. Spectral norm of random matrices. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing, pages 423–430. ACM, 2005. [19] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [20] Low-rank matrix recovery and completion via convex optimization. http:// perception.csl.illinois.edu/matrix-rank/home.html. Accessed: 201405-02. 9
2014
238
5,334
Stochastic Multi-Armed-Bandit Problem with Non-stationary Rewards Omar Besbes Columbia University New York, NY ob2105@columbia.edu Yonatan Gur Stanford University Stanford, CA ygur@stanford.edu Assaf Zeevi Columbia University New York, NY assaf@gsb.columbia.edu Abstract In a multi-armed bandit (MAB) problem a gambler needs to choose at each round of play one of K arms, each characterized by an unknown reward distribution. Reward realizations are only observed when an arm is selected, and the gambler’s objective is to maximize his cumulative expected earnings over some given horizon of play T. To do this, the gambler needs to acquire information about arms (exploration) while simultaneously optimizing immediate rewards (exploitation); the price paid due to this trade off is often referred to as the regret, and the main question is how small can this price be as a function of the horizon length T. This problem has been studied extensively when the reward distributions do not change over time; an assumption that supports a sharp characterization of the regret, yet is often violated in practical settings. In this paper, we focus on a MAB formulation which allows for a broad range of temporal uncertainties in the rewards, while still maintaining mathematical tractability. We fully characterize the (regret) complexity of this class of MAB problems by establishing a direct link between the extent of allowable reward “variation” and the minimal achievable regret, and by establishing a connection between the adversarial and the stochastic MAB frameworks. 1 Introduction Background and motivation. In the presence of uncertainty and partial feedback on rewards, an agent that faces a sequence of decisions needs to judiciously use information collected from past observations when trying to optimize future actions. A widely studied paradigm that captures this tension between the acquisition cost of new information (exploration) and the generation of instantaneous rewards based on the existing information (exploitation), is that of multi armed bandits (MAB), originally proposed in the context of drug testing by [1], and placed in a general setting by [2]. The original setting has a gambler choosing among K slot machines at each round of play, and upon that selection observing a reward realization. In this classical formulation the rewards are assumed to be independent and identically distributed according to an unknown distribution that characterizes each machine. The objective is to maximize the expected sum of (possibly discounted) rewards received over a given (possibly infinite) time horizon. Since their inception, MAB problems with various modifications have been studied extensively in Statistics, Economics, Operations Research, and Computer Science, and are used to model a plethora of dynamic optimization problems under uncertainty; examples include clinical trials ([3]), strategic pricing ([4]), investment in innovation ([5]), packet routing ([6]), on-line auctions ([7]), assortment selection ([8]), and on1 line advertising ([9]), to name but a few. For overviews and further references cf. the monographs by [10], [11] for Bayesian / dynamic programming formulations, and [12] that covers the machine learning literature and the so-called adversarial setting. Since the set of MAB instances in which one can identify the optimal policy is extremely limited, a typical yardstick to measure performance of a candidate policy is to compare it to a benchmark: an oracle that at each time instant selects the arm that maximizes expected reward. The difference between the performance of the policy and that of the oracle is called the regret. When the growth of the regret as a function of the horizon T is sublinear, the policy is long-run average optimal: its long run average performance converges to that of the oracle. Hence the first order objective is to develop policies with this characteristic. The precise rate of growth of the regret as a function of T provides a refined measure of policy performance. [13] is the first paper that provides a sharp characterization of the regret growth rate in the context of the traditional (stationary random rewards) setting, often referred to as the stochastic MAB problem. Most of the literature has followed this path with the objective of designing policies that exhibit the “slowest possible” rate of growth in the regret (often referred to as rate optimal policies). In many application domains, several of which were noted above, temporal changes in the reward distribution structure are an intrinsic characteristic of the problem. These are ignored in the traditional stochastic MAB formulation, but there have been several attempts to extend that framework. The origin of this line of work can be traced back to [14] who considered a case where only the state of the chosen arm can change, giving rise to a rich line of work (see, e.g., [15], and [16]). In particular, [17] introduced the term restless bandits; a model in which the states (associated with reward distributions) of arms change in each step according to an arbitrary, yet known, stochastic process. Considered a hard class of problems (cf. [18]), this line of work has led to various approximations (see, e.g., [19]), relaxations (see, e.g., [20]), and considerations of more detailed processes (see, e.g., [21] for irreducible Markov process, and [22] for a class of history-dependent rewards). Departure from the stationarity assumption that has dominated much of the MAB literature raises fundamental questions as to how one should model temporal uncertainty in rewards, and how to benchmark performance of candidate policies. One view, is to allow the reward realizations to be selected at any point in time by an adversary. These ideas have their origins in game theory with the work of [23] and [24], and have since seen significant development; [25] and [12] provide reviews of this line of research. Within this so called adversarial formulation, the efficacy of a policy over a given time horizon T is often measured relative to a benchmark defined by the single best action one could have taken in hindsight (after seeing all reward realizations). The single best action benchmark represents a static oracle, as it is constrained to a single (static) action. This static oracle can perform quite poorly relative to a dynamic oracle that follows the optimal dynamic sequence of actions, as the latter optimizes the (expected) reward at each time instant over all possible actions.1 Thus, a potential limitation of the adversarial framework is that even if a policy has a “small” regret relative to a static oracle, there is no guarantee with regard to its performance relative to the dynamic oracle. Main contributions. The main contribution of this paper lies in fully characterizing the (regret) complexity of a broad class of MAB problems with non-stationary reward structure by establishing a direct link between the extent of reward “variation” and the minimal achievable regret. More specifically, the paper’s contributions are along four dimensions. On the modeling side we formulate a class of non-stationary reward structure that is quite general, and hence can be used to realistically capture a variety of real-world type phenomena, yet is mathematically tractable. The main constraint that we impose on the evolution of the mean rewards is that their variation over the relevant time horizon is bounded by a variation budget VT ; a concept that was recently introduced in [26] in the context of non-stationary stochastic approximation. This limits the power of nature compared to the adversarial setup discussed above where rewards can be picked to maximally affect the policy’s performance at each instance within {1, . . . , T}. Nevertheless, this constraint allows for a rich class of temporal changes, extending most of the treatment in the non-stationary stochastic MAB literature, which mainly focuses on a finite number of changes in the mean rewards, see, e.g., [27] and references therein. We further discuss connections with studied non-stationary instances in §6. The second dimension of contribution lies in the analysis domain. For a general class of non-stationary reward distributions we establish lower bounds on the performance of any nonanticipating policy relative to the dynamic oracle, and show that these bounds can be achieved, 1Under non-stationary rewards it is immediate that the single best action may be sub-optimal in many decision epochs, and the performance gap between the static and the dynamic oracles can grow linearly with T. 2 uniformly over the class of admissible reward distributions, by a suitable policy construction. The term “achieved” is meant in the sense of the order of the regret as a function of the time horizon T, the variation budget VT , and the number of arms K. Our policies are shown to be minimax optimal up to a term that is logarithmic in the number of arms, and the regret is sublinear and is of order (KVT )1/3 T 2/3. Our analysis complements studied non-stationary instances by treating a broad and flexible class of temporal changes in the reward distributions, yet still establishing optimality results and showing that sublinear regret is achievable. Our results provide a spectrum of orders of the minimax regret ranging between order T 2/3 (when VT is a constant independent of T) and order T (when VT grows linearly with T), mapping allowed variation to best achievable performance. With the analysis described above we shed light on the exploration-exploitation trade off that characterizes the non-stationary reward setting, and the change in this trade off compared to the stationary setting. In particular, our results highlight the tension that exists between the need to “remember” and “forget.” This is characteristic of several algorithms that have been developed in the adversarial MAB literature, e.g., the family of exponential weight methods such as EXP3, EXP3.S and the like; see, e.g., [28], and [12]. In a nutshell, the fewer past observations one retains, the larger the stochastic error associated with one’s estimates of the mean rewards, while at the same time using more past observations increases the risk of these being biased. One interesting observation drawn in this paper connects between the adversarial MAB setting, and the non-stationary environment studied here. In particular, as in [26], it is seen that an optimal policy in the adversarial setting may be suitably calibrated to perform near-optimally in the non-stationary stochastic setting. This will be further discussed after the main results are established. 2 Problem Formulation Let K = {1, . . . , K} be a set of arms. Let T = {1, 2, . . . , T} denote a sequence of decision epochs faced by a decision maker. At any epoch t ∈T , the decision-maker pulls one of the K arms. When pulling arm k ∈K at epoch t ∈T , a reward Xk t ∈ [0, 1] is obtained, where Xk t is a random variable with expectation µk t = E  Xk t  . We denote the best possible expected reward at decision epoch t by µ∗ t , i.e., µ∗ t = maxk∈K  µk t . Changes in the expected rewards of the arms. We assume the expected reward of each arm µk t may change at any decision epoch. We denote by µk the sequence of expected rewards of arm k: µk =  µk t T t=1. In addition, we denote by µ the sequence of vectors of all K expected rewards: µ =  µk K k=1. We assume that the expected reward of each arm can change an arbitrary number of times, but bound the total variation of the expected rewards: T −1 X t=1 sup k∈K µk t −µk t+1 . (1) Let {Vt : t = 1, 2, . . .} be a non-decreasing sequence of positive real numbers such that V1 = 0, KVt ≤t for all t, and for normalization purposes set V2 = 2 · K−1. We refer to VT as the variation budget over T . We define the corresponding temporal uncertainty set, as the set of reward vector sequences that are subject to the variation budget VT over the set of decision epochs {1, . . . , T}: V = ( µ ∈[0, 1]K×T : T −1 X t=1 sup k∈K µk t −µk t+1 ≤VT ) . The variation budget captures the constraint imposed on the non-stationary environment faced by the decision-maker. While limiting the possible evolution in the environment, it allows for numerous forms in which the expected rewards may change: continuously, in discrete shocks, and of a changing rate (Figure 1 depicts two different variation patterns that correspond to the same variation budget). In general, the variation budget VT is designed to depend on the number of pulls T. Admissible policies, performance, and regret. Let U be a random variable defined over a probability space (U, U, Pu). Let π1 : U →K and πt : [0, 1]t−1 × U →K for t = 2, 3, . . . be measurable functions. With some abuse of notation we denote by πt ∈K the action at time t, that is given by πt =  π1 (U) t = 1, πt Xπ t−1, . . . , Xπ 1 , U  t = 2, 3, . . . , 3 Figure 1: Two instances of variation in the mean rewards: (Left) A fixed variation budget (that equals 3) is “spent” over the whole horizon. (Right) The same budget is “spent” in the first third of the horizon. The mappings {πt : t = 1, . . . , T} together with the distribution Pu define the class of admissible policies. We denote this class by P. We further denote by {Ht, t = 1, . . . , T} the filtration associated with a policy π ∈P, such that H1 = σ (U) and Ht = σ  Xπ j t−1 j=1 , U  for all t ∈{2, 3, . . .}. Note that policies in P are non-anticipating, i.e., depend only on the past history of actions and observations, and allow for randomized strategies via their dependence on U. We define the regret under policy π ∈P compared to a dynamic oracle as the worst-case difference between the expected performance of pulling at each epoch t the arm which has the highest expected reward at epoch t (the dynamic oracle performance) and the expected performance under policy π: Rπ(V, T) = sup µ∈V ( T X t=1 µ∗ t −Eπ " T X t=1 µπ t #) , where the expectation Eπ [·] is taken with respect to the noisy rewards, as well as to the policy’s actions. In addition, we denote by R∗(V, T) the minimal worst-case regret that can be guaranteed by an admissible policy π ∈P, that is, R∗(V, T) = infπ∈P Rπ(V, T). Then, R∗(V, T) is the best achievable performance. In the following sections we study the magnitude of R∗(V, T). We analyze the magnitude of this quantity by establishing upper and lower bounds; in these bounds we refer to a constant C as absolute if it is independent of K, VT , and T. 3 Lower bound on the best achievable performance We next provide a lower bound on the the best achievable performance. Theorem 1 Assume that rewards have a Bernoulli distribution. Then, there is some absolute constant C > 0 such that for any policy π ∈P and for any T ≥1, K ≥2 and VT ∈  K−1, K−1T  , Rπ(V, T) ≥C (KVT )1/3 T 2/3. We note that when reward distributions are stationary, there are known policies such as UCB1 ([29]) that achieve regret of order √ T in the stochastic setup. When the reward structure is non-stationary and defined by the class V, then no policy may achieve such a performance and the best performance must incur a regret of at least order T 2/3. This additional complexity embedded in the non-stationary stochastic MAB problem compared to the stationary one will be further discussed in §6. We note that Theorem 1 also holds when VT is increasing with T. In particular, when the variation budget is linear in T, the regret grows linearly and long run average optimality is not achievable. The driver of the change in the best achievable performance relative to the one established in a stationary environment, is a second tradeoff (over the tension between exploring different arms and capitalizing on the information already collected) introduced by the non-stationary environment, between “remembering” and “forgetting”: estimating the expected rewards is done based on past observations of rewards. While keeping track of more observations may decrease the variance of mean rewards estimates, the non-stationary environment implies that “old” information is potentially less relevant due to possible changes in the underlying rewards. The changing rewards give incentive to dismiss old information, which in turn encourages enhanced exploration. The proof of Theorem 1 emphasizes the impact of these tradeoffs on the achievable performance. 4 Key ideas in the proof. At a high level the proof of Theorem 1 builds on ideas of identifying a worst-case “strategy” of nature (e.g., [28], proof of Theorem 5.1) adapting them to our setting. While the proof is deferred to the online companion (as supporting material), we next describe the key ideas when VT = 1.2 We define a subset of vector sequences V′ ⊂V and show that when µ is drawn randomly from V′, any admissible policy must incur regret of order (KVT )1/3 T 2/3. We define a partition of the decision horizon T into batches T1, . . . , Tm of size ˜∆T each (except, possibly the last batch): Tj = n t : (j −1) ˜∆T + 1 ≤t ≤min n j ˜∆T , T oo , for all j = 1, . . . , m, (2) where m = ⌈T/ ˜∆T ⌉is the number of batches. In V′, in every batch there is exactly one “good” arm with expected reward 1/2 + ε for some 0 < ε ≤1/4, and all the other arms have expected reward 1/2. The “good” arm is drawn independently in the beginning of each batch according to a discrete uniform distribution over {1, . . . , K}. Thus, the identity of the “good” arm can change only between batches. By selecting ε such that εT/ ˜∆T ≤VT , any µ ∈V′ is composed of expected reward sequences with a variation of at most VT , and therefore V′ ⊂V. Given the draws under which expected reward sequences are generated, nature prevents any accumulation of information from one batch to another, since at the beginning of each batch a new “good” arm is drawn independently of the history. The proof of Theorem 1 establishes that when ε ≈1/ p ˜∆T no admissible policy can identify the “good” arm with high probability within a batch. Since there are ˜∆T epochs in each batch, the regret that any policy must incur along a batch is of order ˜∆T · ε ≈ p ˜∆T , which yields a regret of order p ˜∆T · T/ ˜∆T ≈T/ p ˜∆T throughout the whole horizon. Selecting the smallest feasible ˜∆T such that the variation budget constraint is satisfied leads to ˜∆T ≈T 2/3, yielding a regret of order T 2/3 throughout the horizon. 4 A near-optimal policy We apply the ideas underlying the lower bound in Theorem 1 to develop a rate optimal policy for the non-stationary stochastic MAB problem with a variation budget. Consider the following policy: Rexp3. Inputs: a positive number γ, and a batch size ∆T . 1. Set batch index j = 1 2. Repeat while j ≤⌈T/∆T ⌉: (a) Set τ = (j −1) ∆T (b) Initialization: for any k ∈K set wk t = 1 (c) Repeat for t = τ + 1, . . . , min {T, τ + ∆T }: • For each k ∈K, set pk t = (1 −γ) wk t PK k′=1 wk′ t + γ K • Draw an arm k′ from K according to the distribution  pk t K k=1 • Receive a reward Xk′ t • For k′ set ˆXk′ t = Xk′ t /pk′ t , and for any k ̸= k′ set ˆXk t = 0. For all k ∈K update: wk t+1 = wk t exp ( γ ˆXk t K ) (d) Set j = j + 1, and return to the beginning of step 2 Clearly π ∈P. The Rexp3 policy uses Exp3, a policy introduced by [30] for solving a worst-case sequential allocation problem, as a subroutine, restarting it every ∆T epochs. 2For the sake of simplicity, the discussion in this paragraph assumes a variation budget that is fixed and independent of T; the proof of Theorem 3 details a general treatment for a budget that depends on T. 5 Theorem 2 Let π be the Rexp3 policy with a batch size ∆T = l (K log K)1/3 (T/VT )2/3m and with γ = min n 1 , q K log K (e−1)∆T o . Then, there is some absolute constant ¯C such that for every T ≥1, K ≥2, and VT ∈  K−1, K−1T  : Rπ(V, T) ≤¯C (K log K · VT )1/3 T 2/3. Theorem 2 is obtained by establishing a connection between the regret relative to the single best action in the adversarial setting, and the regret with respect to the dynamic oracle in non-stationary stochastic setting with variation budget. Several classes of policies, such as exponential-weight (including Exp3) and polynomial-weight policies, have been shown to achieve regret of order √ T with respect to the single best action in the adversarial setting (see chapter 6 of [12] for a review). While in general these policies tend to perform well numerically, there is no guarantee for their performance relative to the dynamic oracle studied in this paper, since the single best action itself may incur linear regret relative to the dynamic oracle; see also [31] for a study of the empirical performance of one class of algorithms. The proof of Theorem 2 shows that any policy that achieves regret of order √ T with respect to the single best action in the adversarial setting, can be used as a subroutine to obtain near-optimal performance with respect to the dynamic oracle in our setting. Rexp3 emphasizes the two tradeoffs discussed in the previous section. The first tradeoff, information acquisition versus capitalizing on existing information, is captured by the subroutine policy Exp3. In fact, any policy that achieves a good performance compared to a single best action benchmark in the adversarial setting must balance exploration and exploitation. The second tradeoff, “remembering” versus “forgetting,” is captured by restarting Exp3 and forgetting any acquired information every ∆T pulls. Thus, old information that may slow down the adaptation to the changing environment is being discarded. Theorem 1 and Theorem 2 together characterize the minimax regret (up to a multiplicative factor, logarithmic in the number of arms) in a full spectrum of variations VT : R∗(V, T) ≍(KVT )1/3 T 2/3. Hence, we have quantified the impact of the extent of change in the environment on the best achievable performance in this broad class of problems. For example, for the case in which VT = C · T β, for some absolute constant C and 0 ≤β < 1 the best achievable regret is of order T (2+β)/3. We finally note that restarting is only one way of adapting policies from the adversarial MAB setting to achieve near optimality in the non-stationary stochastic setting; a way that articulates well the principles leading to near optimality. In the online companion we demonstrate that near optimality can be achieved by other adaptation methods, showing that the Exp3.S policy (given in [28]) can be tuned by α = 1 T and γ ≈(KVT /T)1/3 to achieve near optimality in our setting, without restarting. 5 Proof of Theorem 2 The structure of the proof is as follows. First, we break the horizon to a sequence of batches of size ∆T each, and analyze the performance gap between the single best action and the dynamic oracle in each batch. Then, we plug in a known performance guarantee for Exp3 relative to the single best action, and sum over batches to establish the regret of Rexp3 relative to the dynamic oracle. Step 1 (Preliminaries). Fix T ≥1, K ≥2, and VT ∈  K−1, K−1T  . Let π be the Rexp3 policy, tuned by γ = min n 1 , q K log K (e−1)∆T o and ∆T ∈{1, . . . , T} (to be specified later on). We break the horizon T into a sequence of batches T1, . . . , Tm of size ∆T each (except, possibly Tm) according to (2). Let µ ∈V, and fix j ∈{1, . . . , m}. We decomposition the regret in batch j: Eπ  X t∈Tj (µ∗ t −µπ t )  = X t∈Tj µ∗ t −E  max k∈K    X t∈Tj Xk t      | {z } J1,j + E  max k∈K    X t∈Tj Xk t     −Eπ  X t∈Tj µπ t   | {z } J2,j . (3) The first component, J1,j, is the expected loss associated with using a single action over batch j. The second component, J2,j, is the expected regret relative to the best static action in batch j. 6 Step 2 (Analysis of J1,j and J2,j). Defining µk T +1 = µk T for all k ∈K, we denote the variation in expected rewards along batch Tj by Vj = P t∈Tj maxk∈K µk t+1 −µk t . We note that: m X j=1 Vj = m X j=1 X t∈Tj max k∈K µk t+1 −µk t ≤VT . (4) Let k0 be an arm with best expected performance over Tj: k0 ∈arg maxk∈K nP t∈Tj µk t o . Then, max k∈K    X t∈Tj µk t   = X t∈Tj µk0 t = E  X t∈Tj Xk0 t  ≤E  max k∈K    X t∈Tj Xk t     , (5) and therefore, one has: J1,j = X t∈Tj µ∗ t −E  max k∈K    X t∈Tj Xk t      (a) ≤ X t∈Tj  µ∗ t −µk0 t  ≤ ∆T max t∈Tj n µ∗ t −µk0 t o (b) ≤2Vj∆T , (6) for any µ ∈V and j ∈{1, . . . , m}, where (a) holds by (5) and (b) holds by the following argument: otherwise there is an epoch t0 ∈Tj for which µ∗ t0 −µk0 t0 > 2Vj. Indeed, let k1 = arg maxk∈K µk t0. In such case, for all t ∈Tj one has µk1 t ≥µk1 t0 −Vj > µk0 t0 + Vj ≥µk0 t , since Vj is the maximal variation in batch Tj. This however, contradicts the optimality of k0 at epoch t, and thus (6) holds. In addition, Corollary 3.2 in [28] points out that the regret incurred by Exp3 (tuned by γ = min n 1 , q K log K (e−1)∆T o ) along ∆T batches, relative to the single best action, is bounded by 2√e −1√∆T K log K. Therefore, for each j ∈{1, . . . , m} one has J2,j = E  max k∈K    X t∈Tj Xk t   −Eπ  X t∈Tj µπ t     (a) ≤2 √ e −1 p ∆T K log K, (7) for any µ ∈V, where (a) holds since within each batch arms are pulled according to Exp3(γ). Step 3 (Regret throughout the horizon). Summing over m = ⌈T/∆T ⌉batches we have: Rπ(V, T) = sup µ∈V ( T X t=1 µ∗ t −Eπ " T X t=1 µπ t #) (a) ≤ m X j=1  2 √ e −1 p ∆T K log K + 2Vj∆T  (b) ≤  T ∆T + 1  · 2 √ e −1 p ∆T K log K + 2∆T VT . = 2√e −1√K log K · T √∆T + 2 √ e −1 p ∆T K log K + 2∆T VT , (8) where: (a) holds by (3), (6), and (7); and (b) follows from (4). Finally, selecting ∆T = l (K log K)1/3 (T/VT )2/3m , we establish: Rπ(V, T) ≤ 2 √ e −1 (K log K · VT )1/3 T 2/3 +2 √ e −1 r (K log K)1/3 (T/VT )2/3 + 1  K log K +2  (K log K)1/3 (T/VT )2/3 + 1  VT (a) ≤  2 + 2 √ 2  √ e −1 + 4  (K log K · VT )1/3 T 2/3, where (a) follows from T ≥K ≥2, and VT ∈  K−1, K−1T  . This concludes the proof. 7 6 Discussion Unknown variation budget. The Rexp3 policy relies on prior knowledge of VT , but predictions of VT may be inaccurate (such estimation can be maintained from historical data if actions are occasionally randomized, for example, by fitting VT = T α). Denoting the “true” variation budget by VT and the estimate that is used by the agent when tuning Rexp3 by ˆVT , one may observe that the analysis in the proof of Theorem 2 holds until equation (8), but then ∆T will be tuned using ˆVT . This implies that when VT and ˆVT are “close,” Rexp3 still guarantees long-run average optimality. For example, suppose that Rexp3 is tuned by ˆVT = T α, but the variation is VT = T α+δ. Then sublinear regret (of order T 2/3+α/3+δ) is guaranteed as long as δ < (1 −α)/3; e.g., if α = 0 and δ = 1/4, Rexp3 guarantees regret of order T 11/12 (accurate tuning would have guaranteed order T 3/4). Since there are no restrictions on the rate at which the variation budget can be spent, an interesting and potentially challenging open problem is to delineate to what extent it is possible to design adaptive policies that do not use prior knowledge of VT , yet guarantee “good” performance. Contrasting with traditional (stationary) MAB problems. The characterized minimax regret in the stationary stochastic setting is of order √ T when expected rewards can be arbitrarily close to each other, and of order log T when rewards are “well separated” (see [13] and [29]). Contrasting the minimax regret (of order V 1/3 T T 2/3) we have established in the stochastic non-stationary MAB problem with those established in stationary settings allows one to quantify the “price of nonstationarity,” which mathematically captures the added complexity embedded in changing rewards versus stationary ones (as a function of the allowed variation). Clearly, additional complexity is introduced even when the allowed variation is fixed and independent of the horizon length. Contrasting with other non-stationary MAB instances. The class of MAB problems with nonstationary rewards that is formulated in the current chapter extends other MAB formulations that allow rewards to change in a more structured manner. For example, [32] consider a setting where rewards evolve according to a Brownian motion and regret is linear in T; our results (when VT is linear in T) are consistent with theirs. Two other representative studies are those of [27], that study a stochastic MAB problems in which expected rewards may change a finite number of times, and [28] that formulate an adversarial MAB problem in which the identity of the best arm may change a finite number of times. Both studies suggest policies that, utilizing the prior knowledge that the number of changes must be finite, achieve regret of order √ T relative to the best sequence of actions. However, the performance of these policies can deteriorate to regret that is linear in T when the number of changes is allowed to depend on T. When there is a finite variation (VT is fixed and independent of T) but not necessarily a finite number of changes, we establish that the best achievable performance deteriorate to regret of order T 2/3. In that respect, it is not surprising that the “hard case” used to establish the lower bound in Theorem 1 describes a nature’s strategy that allocates variation over a large (as a function of T) number of changes in the expected rewards. Low variation rates. While our formulation focuses on “significant” variation in the mean rewards, our established bounds also hold for “smaller” variation scales; when VT decreases from O(1) to O(T −1/2) the minimax regret rate decreases from T 2/3 to √ T. Indeed, when the variation scale is O(T −1/2) or smaller, the rate of regret coincides with that of the classical stochastic MAB setting. References [1] W. R. Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25:285–294, 1933. [2] H. Robbins. Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 55:527–535, 1952. [3] M. Zelen. Play the winner rule and the controlled clinical trials. Journal of the American Statistical Association, 64:131–146, 1969. [4] D. Bergemann and J. Valimaki. Learning and strategic pricing. Econometrica, 64:1125–1149, 1996. [5] D. Bergemann and U. Hege. The financing of innovation: Learning and stopping. RAND Journal of Economics, 36 (4):719–752, 2005. 8 [6] B. Awerbuch and R. D. Kleinberg. Addaptive routing with end-to-end feedback: distributed learning and geometric approaches. In Proceedings of the 36th ACM Symposiuim on Theory of Computing (STOC), pages 45–53, 2004. [7] R. D. Kleinberg and T. Leighton. The value of knowing a demand curve: Bounds on regret for online posted-price auctions. In Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 594–605, 2003. [8] F. Caro and G. Gallien. Dynamic assortment with demand learning for seasonal consumer goods. Management Science, 53:276–292, 2007. [9] S. Pandey, D. Agarwal, D. Charkrabarti, and V. Josifovski. Bandits for taxonomies: A model-based approach. In SIAM International Conference on Data Mining, 2007. [10] D. A. Berry and B. Fristedt. Bandit problems: sequential allocation of experiments. Chapman and Hall, 1985. [11] J. C. Gittins. Multi-Armed Bandit Allocation Indices. John Wiley and Sons, 1989. [12] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, Cambridge, UK, 2006. [13] T. L. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6:4–22, 1985. [14] J. C. Gittins and D. M. Jones. A dynamic allocation index for the sequential design of experiments. North-Holland, 1974. [15] J. C. Gittins. Bandit processes and dynamic allocation indices (with discussion). Journal of the Royal Statistical Society, Series B, 41:148–177, 1979. [16] P. Whittle. Arm acquiring bandits. The Annals of Probability, 9:284–292, 1981. [17] P. Whittle. Restless bandits: Activity allocation in a changing world. Journal of Applied Probability, 25A:287–298, 1988. [18] C. H. Papadimitriou and J. N. Tsitsiklis. The complexity of optimal queueing network control. In Structure in Complexity Theory Conference, pages 318–322, 1994. [19] D. Bertsimas and J. Nino-Mora. Restless bandits, linear programming relaxations, and primal dual index heuristic. Operations Research, 48(1):80–90, 2000. [20] S. Guha and K. Munagala. Approximation algorithms for partial-information based stochastic control with markovian rewards. In 48th Annual IEEE Symposium on Fundations of Computer Science (FOCS), pages 483–493, 2007. [21] R. Ortner, D. Ryabko, P. Auer, and R. Munos. Regret bounds for restless markov bandits. In Algorithmic Learning Theory, pages 214–228. Springer Berlin Heidelberg, 2012. [22] M. G. Azar, A. Lazaric, and E. Brunskill. Stochastic optimization of a locally smooth function under correlated bandit feedback. arXiv preprint arXiv:1402.0562, 2014. [23] D. Blackwell. An analog of the minimax theorem for vector payoffs. Pacific Journal of Mathematics, 6:1–8, 1956. [24] J. Hannan. Approximation to bayes risk in repeated plays, Contributions to the Theory of Games, Volume 3. Princeton University Press, Cambridge, UK, 1957. [25] D. P. Foster and R. V. Vohra. Regret in the on-line decision problem. Games and Economic Behaviour, 29:7–35, 1999. [26] O. Besbes, Y. Gur, and A. Zeevi. Non-stationary stochastic optimization. Working paper, 2014. [27] A. Garivier and E. Moulines. On upper-confidence bound policies for switching bandit problems. In Algorithmic Learning Theory, pages 174–188. Springer Berlin Heidelberg, 2011. [28] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The non-stochastic multi-armed bandit problem. SIAM journal of computing, 32:48–77, 2002. [29] P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47:235–246, 2002. [30] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. J. Comput. System Sci., 55:119–139, 1997. [31] C. Hartland, S. Gelly, N. Baskiotis, O. Teytaud, and M. Sebag. Multi-armed bandit, dynamic environments and meta-bandits. NIPS-2006 workshop, Online trading between exploration and exploitation, Whistler, Canada, 2006. [32] A. Slivkins and E. Upfal. Adapting to a changing environment: The brownian restless bandits. In Proceedings of the 21st Annual Conference on Learning Theory (COLT), pages 343–354, 2008. 9
2014
239
5,335
Model-based Reinforcement Learning and the Eluder Dimension Ian Osband Stanford University iosband@stanford.edu Benjamin Van Roy Stanford University bvr@stanford.edu Abstract We consider the problem of learning to optimize an unknown Markov decision process (MDP). We show that, if the MDP can be parameterized within some known function class, we can obtain regret bounds that scale with the dimensionality, rather than cardinality, of the system. We characterize this dependence explicitly as ˜O(ÔdKdET) where T is time elapsed, dK is the Kolmogorov dimension and dE is the eluder dimension. These represent the first unified regret bounds for model-based reinforcement learning and provide state of the art guarantees in several important settings. Moreover, we present a simple and computationally efficient algorithm posterior sampling for reinforcement learning (PSRL) that satisfies these bounds. 1 Introduction We consider the reinforcement learning (RL) problem of optimizing rewards in an unknown Markov decision process (MDP) [1]. In this setting an agent makes sequential decisions within its enironment to maximize its cumulative rewards through time. We model the environment as an MDP, however, unlike the standard MDP planning problem the agent is unsure of the underlying reward and transition functions. Through exploring poorlyunderstood policies, an agent may improve its understanding of its environment but it may improve its short term rewards by exploiting its existing knowledge [2, 3]. The focus of the literature in this area has been to develop algorithms whose performance will be close to optimal in some sense. There are numerous criteria for statistical and computational efficiency that might be considered. Some of the most common include PAC (Probably Approximately Correct) [4], MB (Mistake Bound) [5], KWIK (Knows What It Knows) [6] and regret [7]. We will focus our attention upon regret, or the shortfall in the agent’s expected rewards compared to that of the optimal policy. We believe this is a natural criteria for performance during learning, although these concepts are closely linked. A good overview of various efficiency guarantees is given in section 3 of Li et al. [6]. Broadly, algorithms for RL can be separated as either model-based, which build a generative model of the environment, or model-free which do not. Algorithms of both type have been developed to provide PAC-MDP bounds polynomial in the number of states S and actions A [8, 9, 10]. However, model-free approaches can struggle to plan efficient exploration. The only near-optimal regret bounds to time T of ˜O(S Ô AT) have only been attained by modelbased algorithms [7, 11]. But even these bounds grow with the cardinality of the state and action spaces, which may be extremely large or even infinite. Worse still, there is a lower bound Ω( Ô SAT) for the expected regret in an arbitrary MDP [7]. In special cases, where the reward or transition function is known to belong to a certain functional family, existing algorithms can exploit the structure to move beyond this “‘tabula rasa” (where nothing is assumed beyond S and A) lower bound. The most widely-studied 1 parameterization is the degenerate MDP with no transitions, the mutli-armed bandit [12, 13, 14]. Another common assumption is that the transition function is linear in states and actions. Papers here establigh regret bounds ˜O( Ô T) for linear quadratic control [16], but with constants that grow exponentially with dimension. Later works remove this exponential dependence, but only under significant sparsity assumptions [17]. The most general previous analysis considers rewards and transitions that are –-H¨older in a d-dimensional space to establish regret bounds ˜O(T (2d+–)/(2d+2–)) [18]. However, the proposed algorithm UCCRL is not computationally tractable and the bounds approach linearity in many settings. In this paper we analyse the simple and intuitive algorithm posterior sampling for reinforcement learning (PSRL) [20, 21, 11]. PSRL was initially introduced as a heuristic method [21], but has since been shown to satisfy state of the art regret bounds in finite MDPs [11] and also exploit the structure of factored MDPs [15]. We show that this same algorithm satisfies general regret bounds that depends upon the dimensionality, rather than the cardinality, of the underlying reward and transition function classes. To characterize the complexity of this learning problem we extend the definition of the eluder dimension, previously introduced for bandits [19], to capture the complexity of the reinforcement learning problem. Our results provide a unified analysis of model-based reinforcement learning in general and provide new state of the art bounds in several important problem settings. 2 Problem formulation We consider the problem of learning to optimize a random finite horizon MDP M = (S, A, RM, P M, ·, fl) in repeated finite episodes of interaction. S is the state space, A is the action space, RM(s, a) is the reward distribution over R and P M(·|s, a) is the transition distribution over S when selecting action a in state s, · is the time horizon, and flthe initial state distribution. All random variables we will consider are on a probability space (Ω, F, P). A policy µ is a function mapping each state s œ S and i = 1, . . . , · to an action a œ A. For each MDP M and policy µ, we define a value function V : V M µ,i(s) := EM,µ # · ÿ j=i rM(sj, aj) ---si = s $ (1) where rM(s, a) := E[r|r ≥RM(s, a)] and the subscripts of the expectation operator indicate that aj = µ(sj, j), and sj+1 ≥P M(·|sj, aj) for j = i, . . . , ·. A policy µ is said to be optimal for MDP M if V M µ,i(s) = maxµÕ V M µÕ,i(s) for all s œ S and i = 1, . . . , ·. We will associate with each MDP M a policy µM that is optimal for M. We require that the state space S is a subset of Rd for some finite d with a Î · Î2-norm induced by an inner product. These result actually extend to general Hilbert spaces, but we will not deal with that in this paper. This allows us to decompose the transition function as a mean value in S plus additive noise sÕ ≥P M(·|s, a) =∆ sÕ = pM(s, a) + ‘P . At first this may seem to exclude discrete MDPs with S states from our analysis. However, we can represent the discrete state as a probability vector st œ S = [0, 1]S µ RS with a single active component equal to 1 and 0 otherwise. In fact, the notational convention that S ™Rd should not impose a great restriction for most practical settings. For any distribution Φ over S, we define the one step future value function U to be the expected value of the optimal policy with the next state distributed according to Φ. U M i (Φ) := EM,µM # V M µM,i+1(s) --s ≥Φ $ . (2) One natural regularity condition for learning is that the future values of similar distributions should be similar. We examine this idea through the Lipschitz constant on the means of these state distributions. We write E(Φ) := E[s|s ≥Φ] œ S for the mean of a distribution Φ and express the Lipschitz continuity for U M i with respect to the Î · Î2-norm of the mean: |U M i (Φ) ≠U M i (˜Φ)| Æ KM i (D)ÎE(Φ) ≠E(˜Φ)Î2 for all Φ, ˜Φ œ D (3) We define KM(D) := maxi KM i (D) to be a global Lipschitz contant for the future value function with state distributions from D. Where appropriate, we will condense our notation 2 to write KM := KM(D(M)) where D(M) := {P M(·|s, a)|s œ S, a œ A} is the set of all possible one-step state distributions under the MDP M. The reinforcement learning agent interacts with the MDP over episodes that begin at times tk = (k ≠1)· + 1, k = 1, 2, . . .. Let Ht = (s1, a1, r1, . . . , st≠1, at≠1, rt≠1) denote the history of observations made prior to time t. A reinforcement learning algorithm is a deterministic sequence {fik|k = 1, 2, . . .} of functions, each mapping Htk to a probability distribution fik(Htk) over policies which the agent will employ during the kth episode. We define the regret incurred by a reinforcement learning algorithm fiup to time T to be Regret(T, fi, M ú) := ÁT/·Ë ÿ k=1 ∆k, where ∆k denotes regret over the kth episode, defined with respect to the MDP M ú by ∆k := ⁄ sœS fl(s) 1 V M ú µú,1 ≠V M ú µk,1 2 (s) with µú = µM ú and µk ≥fik(Htk). Note that regret is not deterministic since it can depend on the random MDP M ú, the algorithm’s internal random sampling and, through the history Htk, on previous random transitions and random rewards. We will assess and compare algorithm performance in terms of regret and its expectation. 3 Main results We now review the algorithm PSRL, an adaptation of Thompson sampling [20] to reinforcement learning. PSRL was first proposed by Strens [21] and later was shown to satisfy efficient regret bounds in finite MDPs [11]. The algorithm begins with a prior distribution over MDPs. At the start of episode k, PSRL samples an MDP Mk from the posterior. PSRL then follows the policy µk = µMk which is optimal for this sampled MDP during episode k. Algorithm 1 Posterior Sampling for Reinforcement Learning (PSRL) 1: Input: Prior distribution „ for M ú, t=1 2: for episodes k = 1, 2, .. do 3: sample Mk ≥„(·|Ht) 4: compute µk = µMk 5: for timesteps j = 1, .., · do 6: apply at ≥µk(st, j) 7: observe rt and st+1 8: advance t = t + 1 9: end for 10: end for To state our results we first introduce some notation. For any set X and Y ™Rd for d finite let PC,‡ X,Y be the family the distributions from X to Y with mean ηÎ2-bounded in [0, C] and additive ‡-sub-Gaussian noise. We let N(F, –, Î · Î2) be the –-covering number of F with respect to the Î · Î2-norm and write nF = log(8N(F, 1/T 2, Î · Î2)T) for brevity. Finally we write dE(F) = dimE(F, T ≠1) for the eluder dimension of F at precision T ≠1, a notion of dimension specialized to sequential measurements described in Section 4. Our main result, Theorem 1, bounds the expected regret of PSRL at any time T. Theorem 1 (Expected regret for PSRL in parameterized MDPs). Fix a state space S, action space A, function families R ™PCR,‡R S◊A,R and P ™PCP,‡P S◊A,S for any CR, CP, ‡R, ‡P > 0. Let M ú be an MDP with state space S, action space A, rewards Rú œ R and transitions P ú œ P. If „ is the distribution of M ú and Kú = KM ú is a global Lipschitz constant for the future value function as per (3) then: E[Regret(T, fiP S, M ú)] Æ # CR + CP $ + ˜D(R) + +E[Kú] 3 1 + 1 T ≠1 4 ˜D(P) (4) 3 Where for F equal to either R or P we will use the shorthand: ˜D(F) := 1 + ·CFdE(F) + 8 Ò dE(F)(4CF +  2‡2 F log(32T 3)) + 8  2‡2 FnFdE(F)T. Theorem 1 is a general result that applies to almost all RL settings of interest. In particular, we note that any bounded function is sub-Gaussian. To clarify the assymptotics if this bound we use another classical measure of dimensionality. Definition 1. The Kolmogorov dimension of a function class F is given by: dimK(F) := lim sup –¿0 log(N(F, –, Î · Î2)) log(1/–) . Using Definition 1 in Theorem 1 we can obtain our Corollary. Corollary 1 (Assymptotic regret bounds for PSRL in parameterized MDPs). Under the assumptions of Theorem 1 and writing dK(F) := dimK(F): E[Regret(T, fiP S, M ú)] = ˜O 1 ‡R  dK(R)dE(R)T + E[Kú]‡P  dK(P)dE(P)T 2 (5) Where ˜O(·) ignores terms logarithmic in T. In Section 4 we provide bounds on the eluder dimension of several function classes. These lead to explicit regret bounds in a number of important domains such as discrete MDPs, linear-quadratic control and even generalized linear systems. In all of these cases the eluder dimension scales comparably with more traditional notions of dimensionality. For clarity, we present bounds in the case of linear-quadratic control. Corollary 2 (Assymptotic regret bounds for PSRL in bounded linear quadratic systems). Let M ú be an n-dimensional linear-quadratic system with ‡-sub-Gaussian noise. If the state is Î · Î2-bounded by C and „ is the distribution of M ú, then: E[Regret(T, fiP S, M ú)] = ˜O 1 ‡C⁄1n2Ô T 2 . (6) Here ⁄1 is the largest eigenvalue of the matrix Q given as the solution of the Ricatti equations for the unconstrained optimal value function V (s) = ≠sT Qs [22]. Proof. We simply apply the results of for eluder dimension in Section 4 to Corollary 1 and upper bound the Lipschitz constant of the constrained LQR by 2C⁄1, see Appendix D. Algorithms based upon posterior sampling are intimately linked to those based upon optimism [14]. In Appendix E we outline an optimistic variant that would attain similar regret bounds but with high probility in a frequentist sense. Unfortunately this algorithm remains computationally intractable even when presented with an approximate MDP planner. Further, we believe that PSRL will generally be more statistically efficient than an optimistic variant with similar regret bounds since the algorithm is not affected by loose analysis [11]. 4 Eluder dimension To quantify the complexity of learning in a potentially infinite MDP, we extend the existing notion of eluder dimension for real-valued functions [19] to vector-valued functions. For any G ™PC,‡ X,Y we define the set of mean functions F = E[G] := {f|f = E[G] for G œ G}. If we consider sequential observations yi ≥Gú(xi) we can equivalently write them as yi = f ú(xi)+‘i for some f ú(xi) = E[y|y ≥Gú(xi)] and ‘i zero mean noise. Intuitively, the eluder dimension of F is the length d of the longest possible sequence x1, .., xd such that for all i, knowing the function values of f(x1), .., f(xi) will not reveal f(xi+1). Definition 2 ((F, ‘) ≠dependence). We will say that x œ X is (F, ‘)-dependent on {x1, ..., xn} ™X ≈∆’f, ˜f œ F, n ÿ i=1 Îf(xi) ≠˜f(xi)Î2 2 Æ ‘2 =∆Îf(x) ≠˜f(x)Î2 Æ ‘. x œ X is (‘, F)-independent of {x1, .., xn} iffit does not satisfy the definition for dependence. 4 Definition 3 (Eluder Dimension). The eluder dimension dimE(F, ‘) is the length of the longest possible sequence of elements in X such that for some ‘Õ Ø ‘ every element is (F, ‘Õ)-independent of its predecessors. Traditional notions from supervised learning, such as the VC dimension, are not sufficient to characterize the complexity of reinforcement learning. In fact, a family learnable in constant time for supervised learning may require arbitrarily long to learn to control well [19]. The eluder dimension mirrors the linear dimension for vector spaces, which is the length of the longest sequence such that each element is linearly independent of its predecessors, but allows for nonlinear and approximate dependencies. We overload our notation for G ™PC,‡ X,Y and write dimE(G, ‘) := dimE(E[G], ‘), which should be clear from the context. 4.1 Eluder dimension for specific function classes Theorem 1 gives regret bounds in terms of the eluder dimension, which is well-defined for any F, ‘. However, for any given F, ‘ actually calculating the eluder dimension may take some additional analysis. We now provide bounds on the eluder dimension for some common function classes in a similar approach to earlier work for real-valued functions [14]. These proofs are available in Appendix C. Proposition 1 (Eluder dimension for finite X). A counting argument shows that for |X| = X finite, any ‘ > 0 and any function class F: dimE(F, ‘) Æ X This bound is tight in the case of independent measurements. Proposition 2 (Eluder dimension for linear functions). Let F = {f |f(x) = ◊„(x) for ◊œ Rn◊p, „ œ Rp, Î◊Î2 Æ C◊, ΄Î2 Æ C„} then ’X: dimE(F, ‘) Æ p(4n ≠1) e e ≠1 log CA 1 + 32C„C◊ ‘ 42B (4n ≠1) D + 1 = ˜O(np) Proposition 3 (Eluder dimension for quadratic functions). Let F = {f |f(x) = „(x)T ◊„(x) for ◊œ Rp◊p, „ œ Rp, Î◊Î2 Æ C◊, ΄Î2 Æ C„} then ’X: dimE(F, ‘) Æ p(4p ≠1) e e ≠1 log S U Q a1 + A 2pC2 „C◊ ‘ B2R b (4p ≠1) T V + 1 = ˜O(p2). Proposition 4 (Eluder dimension for generalized linear functions). Let g(·) be a component-wise independent function on Rn with derivative in each component bounded œ [h, h] with h > 0. Define r = h h > 1 to be the condition number. If F = {f |f(x) = g(◊„(x)) for ◊œ Rn◊p, „ œ Rp, Î◊Î2 Æ C◊, ΄Î2 Æ C„} then for any X: dimE(F, ‘) Æ p ! r2(4n ≠2) + 1" e e ≠1 3 log 5! r2(4n ≠2) + 1" 3 1 + 12C◊C„ ‘ 22464 +1 = ˜O(r2np) 5 Confidence sets We now follow the standard argument that relates the regret of an optimistic or posterior sampling algorithm to the construction of confidence sets [7, 11]. We will use the eluder dimension build confidence sets for the reward and transition which contain the true functions with high probability and then bound the regret of our algorithm by the maximum deviation within the confidence sets. For observations from f ú œ F we will center the sets around the least squares estimate ˆf LS t œ arg minfœF L2,t(f) where L2,t(f) := qt≠1 i=1 Îf(xt) ≠ytÎ2 2 is the cumulative squared prediciton error. The confidence sets are defined Ft = Ft(—t) := {f œ F|Îf ≠ˆf LS t Î2,Et Æ Ô—t} where —t controls the growth of the confidence set and the empirical 2-norm is defined ÎgÎ2 2,Et := qt≠1 i=1 Îg(xi)Î2 2. 5 For F ™PC,‡ X,Y, we define the distinguished control parameter: —ú t (F, ”, –) := 8‡2 log(N(F, –, Î · Î2)/”) + 2–t 1 8C +  8‡2 log(4t2/”)) 2 (7) This leads to confidence sets which contain the true function with high probability. Proposition 5 (Confidence sets with high probability). For all ” > 0 and – > 0 and the confidence sets Ft = Ft(—ú t (F, ”, –)) for all t œ N then: P A f ú œ Œ ‹ t=1 Ft B Ø 1 ≠2” Proof. We combine standard martingale concentrations with a discretization scheme. The argument is essentially the same as Proposition 6 in [14], but extends statements about R to vector-valued functions. A full derivation is available in the Appendix A. 5.1 Bounding the sum of set widths We now bound the deviation from f ú by the maximum deviation within the confidence set. Definition 4 (Set widths). For any set of functions F we define the width of the set at x to be the maximum L2 deviation between any two members of F evaluated at x. wF(x) := sup f,fœF Îf(x) ≠f(x)Î2 We can bound for the number of large widths in terms of the eluder dimension. Lemma 1 (Bounding the number of large widths). If {—t > 0 --t œ N} is a nondecreasing sequence with Ft = Ft(—t) then m ÿ k=1 · ÿ i=1 1{wFtk (xtk+i) > ‘} Æ 34—T ‘2 + · 4 dimE(F, ‘) Proof. This result follows from proposition 8 in [14] but with a small adjustment to account for episodes. A full proof is given in Appendix B. We now use Lemma 1 to control the cumulative deviation through time. Proposition 6 (Bounding the sum of widths). If {—t > 0 --t œ N} is nondecreasing with Ft = Ft(—t) and ÎfÎ2 Æ C for all f œ F then: m ÿ k=1 · ÿ i=1 wFtk (xtk+i) Æ 1 + ·CdimE(F, T ≠1) + 4  —T dimE(F, T ≠1)T (8) Proof. Once again we follow the analysis of Russo [14] and strealine notation by letting wt = wFtk (xtk+i) abd d = dimE(F, T ≠1). Reordering the sequence (w1, .., wT ) æ (wi1, .., wiT ) such that wi1 Ø .. Ø wiT we have that: m ÿ k=1 · ÿ i=1 wFtk (xtk+i) = T ÿ t=1 wit Æ 1 + T ÿ i=1 wit1{wit Ø T ≠1} . By the reordering we know that wit > ‘ means that qm k=1 q· i=1 1{wFtk (xtk+i) > ‘} Ø t. From Lemma 1, ‘ Æ Ò 4—T d t≠·d. So that if wit > T ≠1 then wit Æ min{C, Ò 4—T d t≠·d}. Therefore, T ÿ i=1 wit1{wit Ø T ≠1} Æ ·Cd+ T ÿ t=·d+1 Ú 4—T d t ≠·d Æ ·Cd+2  —T ⁄ T 0 Ú d t dt Æ ·Cd+4  —T dT 6 6 Analysis We will now show reproduce the decomposition of expected regret in terms of the Bellman error [11]. From here, we will apply the confidence set results from Section 5 to obtain our regret bounds. We streamline our discussion of P M, RM, V M µ,i, U M i and T M µ by simply writing ú in place of M ú or µú and k in place of Mk or µk where appropriate; for example V ú k,i := V M ú ˜µk,i. The first step in our ananlysis breaks down the regret by adding and subtracting the imagined optimal reward of µk under the MDP Mk. ∆k = ! V ú ú,1 ≠V ú k,1 " (s0) = ! V ú ú,1 ≠V k k,1 " (s0) + ! V k k,1 ≠V ú k,1 " (s0) (9) Here s0 is a distinguished initial state, but moving to general fl(s) poses no real challenge. Algorithms based upon optimism bound (V ú ú,1 ≠V k k,1) Æ 0 with high probability. For PSRL we use Lemma 2 and the tower property to see that this is zero in expectation. Lemma 2 (Posterior sampling). If „ is the distribution of M ú then, for any ‡(Htk)-measurable function g, E[g(M ú)|Htk] = E[g(Mk)|Htk] (10) We introduce the Bellman operator T M µ , which for any MDP M = (S, A, RM, P M, ·, fl), stationary policy µ : S æ A and value function V : S æ R, is defined by T M µ V (s) := rM(s, µ(s)) + ⁄ sÕœS P M(sÕ|s, µ(s))V (sÕ). This returns the expected value of state s where we follow the policy µ under the laws of M, for one time step. The following lemma gives a concise form for the dynamic programming paradigm in terms of the Bellman operator. Lemma 3 (Dynamic programming equation). For any MDP M = (S, A, RM, P M, ·, fl) and policy µ : S ◊{1, . . . , ·} æ A, the value functions V M µ satisfy V M µ,i = T M µ(·,i)V M µ,i+1 (11) for i = 1 . . . ·, with V M µ,·+1 := 0. Through repeated application of the dynamic programming operator and taking expectation of martingale differences we can mirror earlier analysis [11] to equate expected regret with the cumulative Bellman error: E[∆k] = · ÿ i=1 (T k k,i ≠T ú k,i)V k k,i+1(stk+i) (12) 6.1 Lipschitz continuity Efficient regret bounds for MDPs with an infinite number of states and actions require some regularity assumption. One natural notion is that nearby states might have similar optimal values, or that the optimal value function function might be Lipschitz. Unfortunately, any discontinuous reward function will usually lead to discontious values functions so that this assumption is violated in many settings of interest. However, we only require that the future value is Lipschitz in the sense of equation (3). This will will be satisfied whenever the underlying value function is Lipschitz, but is a strictly weaker requirement since the system noise helps to smooth future values. Since P has ‡P -sub-Gaussian noise we write st+1 = pM(st, at) + ‘P t in the natural way. We now use equation (12) to reduce regret to a sum of set widths. To reduce clutter and more closely follow the notation of Section 4 we will write xk,i = (stk+i, atk+i). E[∆k] Æ E C · ÿ i=1 ) rk(xk,i) ≠rú(xk,i) + U k i (P k(xk,i)) ≠U k i (P ú(xk,i)) * D Æ E C · ÿ i=1 ) |rk(xk,i) ≠rú(xk,i)| + KkÎpk(xk,i) ≠pú(xk,i)Î2 * D (13) 7 Where Kk is a global Lipschitz constant for the future value function of Mk as per (3). We now use the results from Sections 4 and 5 to form the corresponding confidence sets Rk := Rtk(—ú(R, ”, –)) and Pk := Ptk(—ú(P, ”, –)) for the reward and transition functions respectively. Let A = {Rú, Rk œ Rk ’k} and B = {P ú, Pk œ Pk ’k} and condition upon these events to give: E[Regret(T, fiP S, M ú)] Æ E C m ÿ k=1 · ÿ i=1 ) |rk(xk,i) ≠rú(xk,i)| + KkÎpk(xk,i) ≠pú(xk,i)Î2 * D Æ m ÿ k=1 · ÿ i=1 ) wRk(xk,i) + E[Kk|A, B]wPk(xk,i) + 8”(CR + CP) * (14) The posterior sampling lemma ensures that E[Kk] = E[Kú] so that E[Kk|A, B] Æ E[Kú] P(A,B) Æ E[Kú] 1≠8” by a union bound on {Ac fiBc}. We fix ” = 1/8T to see that: E[Regret(T, fiP S, M ú)] Æ (CR + CP) + m ÿ k=1 · ÿ i=1 wRk(xk,i) + E[Kú] 1 1 + 1 T ≠1 2 m ÿ k=1 · ÿ i=1 wPt(xk,i) We now use equation (7) together with Proposition 6 to obtain our regret bounds. For ease of notation we will write dE(R) = dimE(R, T ≠1) and dE(P) = dimE(P, T ≠1). E[Regret(T, fiP S, M ú)] Æ 2 + (CR + CP) + ·(CRdE(R) + CPdE(P)) + 4 Ò —ú T (R, 1/8T, –)dE(R)T + 4 Ò —ú T (P, 1/8T, –)dE(P)T(15) We let – = 1/T 2 and write nF = log(8N(F, 1/T 2, Î · Î2)T) for R and P to complete our proof of Theorem 1: E[Regret(T, fiP S, M ú)] Æ # CR + CP $ + ˜D(R) + E[Kú] 3 1 + 1 T ≠1 4 ˜D(P) (16) Where ˜D(F) is shorthand for 1 + ·CFdE(F) + 8 Ò dE(F)(4CF +  2‡2 F log(32T 3)) + 8  2‡2 FnFdE(F)T. The first term [CR + CP] bounds the contribution from missed confidence sets. The cost of learning the reward function Rú is bounded by ˜D(R). In most problems the remaining contribution bounding transitions and lost future value will be dominant. Corollary 1 follows from the Definition 1 together with nR and nP. 7 Conclusion We present a new analysis of posterior sampling for reinforcement learning that leads to a general regret bound in terms of the dimensionality, rather than the cardinality, of the underlying MDP. These are the first regret bounds for reinforcement learning in such a general setting and provide new state of the art guarantees when specialized to several important problem settings. That said, there are a few clear shortcomings which we do not address in the paper. First, we assume that it is possible to draw samples from the posterior distribution exactly and in some cases this may require extensive computational effort. Second, we wonder whether it is possible to extend our analysis to learning in MDPs without episodic resets. Finally, there is a fundamental hurdle to model-based reinforcement learning that planning for the optimal policy even in a known MDP may be intractable. We assume access to an approximate MDP planner, but this will generally require lengthy computations. We would like to examine whether similar bounds are attainable in model-free learning [23], which may obviate complicated MDP planning, and examine the computational and statistical efficiency tradeoffs between these methods. Acknowledgments Osband is supported by Stanford Graduate Fellowships courtesy of PACCAR inc. This work was supported in part by Award CMMI-0968707 from the National Science Foundation. 8 References [1] Apostolos Burnetas and Michael Katehakis. Optimal adaptive policies for Markov decision processes. Mathematics of Operations Research, 22(1):222–255, 1997. [2] Tze Leung Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in applied mathematics, 6(1):4–22, 1985. [3] Leslie Pack Kaelbling, Michael L Littman, and Andrew W Moore. Reinforcement learning: A survey. arXiv preprint cs/9605103, 1996. [4] Leslie G Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [5] Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine learning, 2(4):285–318, 1988. [6] Lihong Li, Michael L Littman, Thomas J Walsh, and Alexander L Strehl. Knows what it knows: a framework for self-aware learning. Machine learning, 82(3):399–443, 2011. [7] Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. The Journal of Machine Learning Research, 99:1563–1600, 2010. [8] Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Machine Learning, 49(2-3):209–232, 2002. [9] Ronen Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for near-optimal reinforcement learning. The Journal of Machine Learning Research, 3:213–231, 2003. [10] Alexander Strehl, Lihong Li, Eric Wiewiora, John Langford, and Michael Littman. Pac modelfree reinforcement learning. In Proceedings of the 23rd international conference on Machine learning, pages 881–888. ACM, 2006. [11] Ian Osband, Daniel Russo, and Benjamin Van Roy. (More) Efficient Reinforcement Learning via Posterior Sampling. Advances in Neural Information Processing Systems, 2013. [12] Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. The Journal of Machine Learning Research, 3:397–422, 2003. [13] S´ebastien Bubeck, R´emi Munos, Gilles Stoltz, and Csaba Szepesv´ari. X-armed bandits. Journal of Machine Learning Research, 12:1587âĂŞ1627, 2011. [14] Daniel Russo and Benjamin Van Roy. Learning to optimize via posterior sampling. CoRR, abs/1301.2609, 2013. [15] Ian Osband and Benjamin Van Roy. Near-optimal regret bounds for reinforcement learning in factored MDPs. arXiv preprint arXiv:1403.3741, 2014. [16] Yassin Abbasi-Yadkori, D´avid P´al, and Csaba Szepesv´ari. Improved algorithms for linear stochastic bandits. Advances in Neural Information Processing Systems, 24, 2011. [17] Morteza Ibrahimi, Adel Javanmard, and Benjamin Van Roy. Efficient reinforcement learning for high dimensional linear quadratic systems. In NIPS, pages 2645–2653, 2012. [18] Ronald Ortner, Daniil Ryabko, et al. Online regret bounds for undiscounted continuous reinforcement learning. In NIPS, pages 1772–1780, 2012. [19] Daniel Russo and Benjamin Van Roy. Eluder dimension and the sample complexity of optimistic exploration. In Advances in Neural Information Processing Systems, pages 2256–2264, 2013. [20] William Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):285–294, 1933. [21] Malcom Strens. A Bayesian framework for reinforcement learning. In Proceedings of the 17th International Conference on Machine Learning, pages 943–950, 2000. [22] Dimitri Bertsekas. Dynamic programming and optimal control, volume 1. Athena Scientific Belmont, MA, 1995. [23] Benjamin Van Roy and Zheng Wen. Generalization and exploration via randomized value functions. arXiv preprint arXiv:1402.0635, 2014. 9
2014
24
5,336
Efficient Structured Matrix Rank Minimization Adams Wei Yu†, Wanli Ma†, Yaoliang Yu†, Jaime G. Carbonell†, Suvrit Sra‡ School of Computer Science, Carnegie Mellon University† Max Planck Institute for Intelligent Systems‡ {weiyu, mawanli, yaoliang, jgc}@cs.cmu.edu, suvrit@tuebingen.mpg.de Abstract We study the problem of finding structured low-rank matrices using nuclear norm regularization where the structure is encoded by a linear map. In contrast to most known approaches for linearly structured rank minimization, we do not (a) use the full SVD; nor (b) resort to augmented Lagrangian techniques; nor (c) solve linear systems per iteration. Instead, we formulate the problem differently so that it is amenable to a generalized conditional gradient method, which results in a practical improvement with low per iteration computational cost. Numerical results show that our approach significantly outperforms state-of-the-art competitors in terms of running time, while effectively recovering low rank solutions in stochastic system realization and spectral compressed sensing problems. 1 Introduction Many practical tasks involve finding models that are both simple and capable of explaining noisy observations. The model complexity is sometimes encoded by the rank of a parameter matrix, whereas physical and system level constraints could be encoded by a specific matrix structure. Thus, rank minimization subject to structural constraints has become important to many applications in machine learning, control theory, and signal processing [10, 22]. Applications include collaborative filtering [23], system identification and realization [19, 21], multi-task learning [28], among others. The focus of this paper is on problems where in addition to being low-rank, the parameter matrix must satisfy additional linear structure. Typically, this structure involves Hankel, Toeplitz, Sylvester, Hessenberg or circulant matrices [4, 11, 19]. The linear structure describes interdependencies between the entries of the estimated matrix and helps substantially reduce the degrees of freedom. As a concrete example consider a linear time-invariant (LTI) system where we are estimating the parameters of an autoregressive moving-average (ARMA) model. The order of this LTI system, i.e., the dimension of the latent state space, is equal to the rank of a Hankel matrix constructed by the process covariance [20]. A system of lower order, which is easier to design and analyze, is usually more desirable. The problem of minimum order system approximation is essentially a structured matrix rank minimization problem. There are several other applications where such linear structure is of great importance—see e.g., [11] and references therein. Furthermore, since (enhanced) structured matrix completion also falls into the category of rank minimization problems, the results in our paper can as well be applied to specific problems in spectral compressed sensing [6], natural language processing [1], computer vision [8] and medical imaging [24]. Formally, we study the following (block) structured rank minimization problem: miny 1 2kA(y) −bk2 F + µ · rank(Qm,n,j,k(y)). (1) Here, y = (y1, ..., yj+k−1) is an m ⇥n(j + k −1) matrix with yt 2 Rm⇥n for t = 1, ..., j + k −1, A : Rm⇥n(j+k−1) ! Rp is a linear map, b 2 Rp, Qm,n,j,k(y) 2 Rmj⇥nk is a structured matrix whose elements are linear functions of yt’s, and µ > 0 controls the regularization. Throughout this paper, we will use M = mj and N = nk to denote the number of rows and columns of Qm,n,j,k(y). 1 Problem (1) is in general NP-hard [21] due to the presence of the rank function. A popular approach to address this issue is to use the nuclear norm k · k⇤, i.e., the sum of singular values, as a convex surrogate for matrix rank [22]. Doing so turns (1) into a convex optimization problem: miny 1 2kA(y) −bk2 F + µ · kQm,n,j,k(y)k⇤. (2) Such a relaxation has been combined with various convex optimization procedures in previous work, e.g., interior-point approaches [17, 18] and first-order alternating direction method of multipliers (ADMM) approaches [11]. However, such algorithms are computationally expensive. The cost per iteration of an interior-point method is no less than O(M 2N 2), and that of typical proximal and ADMM style first-order methods in [11] is O(min(N 2M, NM 2)); this high cost arises from each iteration requiring a full Singular Value Decomposition (SVD). The heavy computational cost of these methods prevents them from scaling to large problems. Contributions. In view of the efficiency and scalability limitations of current algorithms, the key contributions of our paper are as follows. • We formulate the structured rank minimization problem differently, so that we still find lowrank solutions consistent with the observations, but substantially more scalably. • We customize the generalized conditional gradient (GCG) approach of Zhang et al. [27] to our new formulation. Compared with previous first-order methods, the cost per iteration is O(MN) (linear in the data size), which is substantially lower than methods that require full SVDs. • Our approach maintains a convergence rate of O ! 1 ✏ " and thus achieves an overall complexity of O ! MN ✏ " , which is by far the lowest in terms of the dependence of M or N for general structured rank minimization problems. It also empirically proves to be a state-of-the-art method for (but clearly not limited to) stochastic system realization and spectral compressed sensing. We note that following a GCG scheme has another practical benefit: the rank of the intermediate solutions starts from a small value and then gradually increases, while the starting solutions obtained from existing first-order methods are always of high rank. Therefore, GCG is likely to find a lowrank solution faster, especially for large size problems. Related work. Liu and Vandenberghe [17] adopt an interior-point method on a reformulation of (2), where the nuclear norm is represented via a semidefinite program. The cost of each iteration in [17] is no less than O(M 2N 2). Ishteva et al. [15] propose a local optimization method to solve the weighted structured rank minimization problem, which still has complexity as high as O(N 3Mr2) per iteration, where r is the rank. This high computational cost prevents [17] and [15] from handling large-scale problems. In another recent work, Fazel et al. [11] propose a framework to solve (2). They derive several primal and dual reformulations for the problem, and propose corresponding first-order methods such as ADMM, proximal-point, and accelerated projected gradient. However, each iteration of these algorithms involves a full SVD of complexity O(min(M 2N, N 2M)), making it hard to scale them to large problems. Signoretto et al. [25] reformulate the problem to avoid full SVDs by solving an equivalent nonconvex optimization problem via ADMM. However, their method requires subroutines to solve linear equations per iteration, which can be time-consuming for large problems. Besides, there is no guarantee that their method will converge to the global optimum. The conditional gradient (CG) (a.k.a. Frank-Wolfe) method was proposed by Frank and Wolfe [12] to solve constrained problems. At each iteration, it first solves a subproblem that minimizes a linearized objective over a compact constraint set and then moves toward the minimizer of the cost function. CG is efficient as long as the linearized subproblem is easy to solve. Due to its simplicity and scalability, CG has recently witnessed a great surge of interest in the machine learning and optimization community [16]. In another recent strand of work, CG was extended to certain regularized (non-smooth) problems as well [3, 13, 27]. In the following, we will show how a generalized CG method can be adapted to solve the structured matrix rank minimization problem. 2 Problem Formulation and Approach In this section we reformulate the structured rank minimization problem in a way that enables us to apply the generalized conditional gradient method, which we subsequently show to be much more efficient than existing approaches, both theoretically and experimentally. Our starting point is that in most applications, we are interested in finding a “simple” model that is consistent with 2 the observations, but the problem formulation itself, such as (2), is only an intermediate means, hence it need not be fixed. In fact, when formulating our problem we can and we should take the computational concerns into account. We will demonstrate this point first. 2.1 Problem Reformulation The major computational difficulty in problem (2) comes from the linear transformation Qm,n,j,k(·) inside the trace norm regularizer. To begin with, we introduce a new matrix variable X 2 Rmj⇥nk and remove the linear transformation by introducing the following linear constraint Qm,n,j,k(y) = X. (3) For later use, we partition the matrix X into the block form X := 2 664 x11 x12 · · · x1k x21 x22 · · · x2k ... ... ... xj1 xj2 · · · xjk 3 775 with xil 2 Rm⇥n for i = 1, ..., j, l = 1, ..., k. (4) We denote by x := vec(X) 2 Rmjk⇥n the vector obtained by stacking the columns of X blockwise, and by X := mat(x) 2 Rmj⇥nk the reverse operation. Since x and X are merely different reorderings of the same object, we will use them interchangeably to refer to the same object. We observe that any linear (or slightly more generally, affine) structure encoded by the linear transformation Qm,n,j,k(·) translates to linear constraints on the elements of X (such as the sub-blocks in (4) satisfying say x12 = x21), which can be represented as linear equations Bx = 0, with an appropriate matrix B that encodes the structure of Q. Similarly, the linear constraint in (3) that relates y and X, or equivalently x, can also be written as the linear constraint y = Cx for a suitable recovery matrix C. Details on constructing matrix B and C can be found in the appendix. Thus, we reformulate (2) into min x2Rmjk⇥n 1 2kA(Cx) −bk2 F + µkXk⇤ (5) s.t. Bx = 0. (6) The new formulation (5) is still computationally inconvenient due to the linear constraint (6). We resolve this difficulty by applying the penalty method, i.e., by placing the linear constraint into the objective function after composing with a penalty function such as the squared Frobenius norm: min x2Rmjk⇥n 1 2kA(Cx) −bk2 F + λ 2 kBxk2 F + µkXk⇤. (7) Here λ > 0 is a penalty parameter that controls the inexactness of the linear constraint. In essence, we turn (5) into an unconstrained problem by giving up on satisfying the linear constraint exactly. We argue that this is a worthwhile trade-off for (i) By letting λ " 1 and following a homotopy scheme the constraint can be satisfied asymptotically; (ii) If exactness of the linear constraint is truly desired, we could always post-process each iterate by projecting to the constraint manifold using Cproj (see appendix); (iii) As we will show shortly, the potential computational gains can be significant, enabling us to solve problems at a scale which is not achievable previously. Therefore, in the sequel we will focus on solving (7). After getting a solution for x, we recover the original variable y through the linear relation y = Cx. As shown in our empirical studies (see Section 3), the resulting solution Qm,n,j,k(y) indeed enjoys the desirable low-rank property even with a moderate penalty parameter λ. We next present an efficient algorithm for solving (7). 2.2 The Generalized Conditional Gradient Algorithm Observing that the first two terms in (7) are both continuously differentiable, we absorb them into a common term f and rewrite (7) in the more familiar compact form: min X2Rmj⇥nk φ(X) := f(X) + µkXk⇤, (8) which readily fits into the framework of the generalized conditional gradient (GCG) [3, 13, 27]. In short, at each iteration GCG successively linearizes the smooth function f, finds a descent direction by solving the (convex) subproblem Zk 2 arg min kZk⇤1hZ, rf(Xk−1)i, (9) 3 Algorithm 1 Generalized Conditional Gradient for Structured Matrix Rank Minimization 1: Initialize U0, V0; 2: for k = 1, 2, ... do 3: (uk, vk) top singular vector pair of −rf(Uk−1Vk−1); 4: set ⌘k 2/(k + 1), and ✓k by (13); 5: Uinit (p1 −⌘kUk−1, p✓kuk); Vinit (p1 −⌘kVk−1, p✓kvk); 6: (Uk, Vk) arg min (U, V ) using initializer (Uinit, Vinit); 7: end for and then takes the convex combination Xk = (1−⌘k)Xk−1 +⌘k(↵kZk) with a suitable step size ⌘k and scaling factor ↵k. Clearly, the efficiency of GCG heavily hinges on the efficacy of solving the subproblem (9). In our case, the minimal objective is simply the matrix spectral norm of −rf(Xk) and the minimizer can be chosen as the outer product of the top singular vector pair. Both can be computed essentially in linear time O(MN) using the Lanczos algorithm [7]. To further accelerate the algorithm, we adopt the local search idea in [27], which is based on the variational form of the trace norm [26]: kXk⇤= 1 2 min{kUk2 F + kV k2 F : X = UV }. (10) The crucial observation is that (10) is separable and smooth in the factor matrices U and V , although not jointly convex. We alternate between the GCG algorithm and the following nonconvex auxiliary problem, trying to get the best of both ends: min U,V (U, V ), where (U, V ) = f(UV ) + µ 2 (kUk2 F + kV k2 F). (11) Since our smooth function f is quadratic, it is easy to carry out a line search strategy for finding an appropriate ↵k in the convex combination Xk+1 = (1−⌘k)Xk +⌘k(↵kZk) =: (1−⌘k)Xk +✓kZk, where ✓k = arg min ✓≥0 hk(✓) (12) is the minimizer of the function (on ✓≥0) hk(✓) := f((1 −⌘k)Xk + ✓Zk) + µ(1 −⌘k)kXkk⇤+ µ✓. (13) In fact, hk(✓) upper bounds the objective function φ at (1 −⌘k)Xk + ✓Zk. Indeed, using convexity, φ((1 −⌘k)Xk + ✓Zk) = f((1 −⌘k)Xk + ✓Zk) + µk(1 −⌘k)Xk + ✓Zkk⇤ f((1 −⌘k)Xk + ✓Zk) + µ(1 −⌘k)kXkk⇤+ µ✓kZkk⇤ f((1 −⌘k)Xk + ✓Zk) + µ(1 −⌘k)kXkk⇤+ µ✓(as kZkk⇤1) = hk(✓). The reason to use the upper bound hk(✓), instead of the true objective φ((1 −⌘k)Xk + ✓Zk), is to avoid evaluating the trace norm, which can be quite expensive. More generally, if f is not quadratic, we can use the quadratic upper bound suggested by the Taylor expansion. It is clear that ✓k in (12) can be computed in closed-form. We summarize our procedure in Algorithm 1. Importantly, we note that the algorithm explicitly maintains a low-rank factorization X = UV throughout the iteration. In fact, we never need the product X, which is a crucial step in reducing the memory footage for large applications. The maintained low-rank factorization also allows us to more efficiently evaluate the gradient and its spectral norm, by carefully arranging the multiplication order. Finally, we remark that we need not wait until the auxiliary problem (11) is fully solved; we can abort this local procedure whenever the gained improvement does not match the devoted computation. For the convergence guarantee we establish in Theorem 1 below, only the descent property (UkVk)  (Uk−1Vk−1) is needed. This requirement can be easily achieved by evaluating , which, unlike the original objective φ, is computationally cheap. 2.3 Convergence analysis Having presented the generalized conditional gradient algorithm for our structured rank minimization problem, we now analyze its convergence property. We need the following standard assumption. 4 Assumption 1 There exists some norm k · k and some constant L > 0, such that for all A, B 2 RN⇥M and ⌘2 (0, 1), we have f((1 −⌘)A + ⌘B) f(A) + ⌘hB −A, rf(A)i + L⌘2 2 kB −Ak2. Most standard loss functions, such as the quadratic loss we use in this paper, satisfy Assumption 1. We are ready to state the convergence property of Algorithm 1 in the following theorem. To make the paper self-contained, we also reproduce the proof in the appendix. Theorem 1 Let Assumption 1 hold, X be arbitrary, and Xk be the k-th iterate of Algorithm 1 applied on the problem (7), then we have φ(Xk) −φ(X)  2C k + 1, (14) where C is some problem dependent absolute constant. Thus for any given accuracy ✏> 0, Algorithm 1 will output an ✏-approximate (in the sense of function value) solution in at most O(1/✏) steps. 2.4 Comparison with existing approaches We briefly compare the efficiency of Algorithm 1 with the state-of-the-art approaches; more thorough experimental comparisons will be conducted in Section 3 below. The per-step complexity of our algorithm is dominated by the subproblem (9) which requires only the leading singular vector pair of the gradient. Using the Lanczos algorithm this costs O(MN) arithmetic operations [16], which is significantly cheaper than the O(min(M 2N, N 2M)) complexity of [11] (due to their need of full SVD). Other approaches such as [25] and [17] are even more costly. 3 Experiments In this section, we present empirical results using our algorithms. Without loss of generality, we focus on two concrete structured rank minimization problems: (i) stochastic system realization (SSR); and (ii) 2-D spectral compressed sensing (SCS). Both problems involve minimizing the rank of two different structured matrices. For SSR, we compare different first-order methods to show the speedups offered by our algorithm. In the SCS problem, we show that our formulation can be generalized to more complicated linear structures and effectively recover unobserved signals. 3.1 Stochastic System Realization Model. The SSR problem aims to find a minimal order autoregressive moving-average (ARMA) model, given the observation of noisy system output [11]. As a discrete linear time-invariant (LTI) system, an AMRA process can be represented by the following state-space model st+1 = Dst + Eut, zt = Fst + ut, t = 1, 2, ..., T, (15) where st 2 Rr is the hidden state variable, ut 2 Rn is driving white noise with covariance matrix G, and zt 2 Rn is the system output that is observable at time t. It has been shown in [20] that the system order r equals the rank of the block-Hankel matrix (see appendix for definition) constructed by the exact process covariance yi = E(ztzT t+i), provided that the number of blocks per column, j, is larger than the actual system order. Determining the rank r is the key to the whole problem, after which, the parameters D, E, F, G can be computed easily [17, 20]. Therefore, finding a low order system is equivalent to minimizing the rank of the Hankel matrix above, while remaining consistent with the observations. Setup. The meaning of the following parameters can be seen in the text after E.q. (1). We follow the experimental setup of [11]. Here, m = n, p = n ⇥n(j + k −1), while v = (v1, v2, ..., vj+k−1) denotes the empirical process covariance calculated as vi = 1 T PT −i t=1 zt+izT t , for 1 i k and 0 otherwise. Let w = (w1, w2, ..., wj+k−1) be the observation matrix, where the wi are all 1’s for 1 i k, indicating the whole block of vi is observed, and all 0’s otherwise (for unobserved 5 blocks). Finally, A(y) = vec(w ◦y), b = vec(w ◦v), Q(y) = Hn,n,j,k(y), where ◦is the elementwise product and is Hn,n,j,k(·) the Hankel matrix (see Appendix for the corresponding B and C). Data generation. Each entry of the matrices D 2 Rr⇥r, E 2 Rr⇥n, F 2 Rn⇥r is sampled from a Gaussian distribution N(0, 1). Then they are normalized to have unit nuclear norm. The initial state vector s0 is drawn from N(0, Ir) and the input white noise ut from N(0, In). The measurement noise is modeled by adding an σ⇠term to the output zt, so the actual observation is zt = zt + σ⇠, where each entry of ⇠2 Rn is a standard Gaussian noise, and σ is the noise level. Throughout this experiment, we set T = 1000, σ = 0.05, the maximum iteration limit as 100, and the stopping criterion as kxk+1 −xkkF < 10−3 or |φk+1−φk| | min(φk+1,φk)| < 10−3. The initial iterate is a matrix of all ones. Algorithms. We compare our approach with the state-of-the-art competitors, i.e., the first-order methods proposed in [11]. Other methods, such as those in [15, 17, 25] suffer heavier computation cost per iteration, and are thus omitted from comparison. Fazel et al. [11] aim to solve either the primal or dual form of problem (2), using primal ADMM (PADMM), a variant of primal ADMM (PADMM2), a variant of dual ADMM (DADMM2), and a dual proximal point algorithm (DPPA). As for solving (7), we implemented generalized conditional gradient (GCG) and its local search variant (GCGLS). We also implemented the accelerated projected gradient with singular value thresholding (APG-SVT) to solve (8) by adopting the FISTA [2] scheme. To fairly compare both lines of methods for different formulations, in each iteration we track their objective values, the squared loss 1 2kA(Cx) −bk2 F (or 1 2kA(y) −bk2 F), and the rank of the Hankel matrix Hm,n,j,k(y). Since square loss measures how well the model fits the observations, and the Hankel matrix rank approximates the system order, comparison of these quantities obtained by different methods is meaningful. Result 1: Efficiency and Scalability. We compare the performance of different methods on two sizes of problems, and the result is shown in Figure 2. The most important observation is, our approach GCGLS/GCG significantly outperform the remaining competitors in term of running time. It is easy to see from Figure 2(a) and 2(b) that both the objective value and square loss by GCGLS/GCG drop drastically within a few seconds and is at least one order of magnitude faster than the runner-up competitor (DPPA) to reach a stable stage. The rest of baseline methods cannot even approach the minimum values achieved by GCGLS/GCG within the iteration limit. Figure 2(d) and 2(e) show that such advantage is amplified as size increases, which is consistent with the theoretical finding. Then, not surprisingly, we observe that the competitors become even slower if the problem size continues growing. Hence, we only test the scalability of our approach on larger sized problems, with the running time reported in Figure 1. We can see that the running time of GCGLS grows linearly w.r.t. the size MN, again consistent with previous analysis. 0 1 2 3 x 10 8 0 1000 2000 3000 4000 5000 Matrix Size (MN) Run Time GCGLS GCG (2050, 10000) (6150, 30000) (4100, 20000) (8200, 40000) Figure 1: Scalability of GCGLS and GCG. The size (M, N) is labeled out. Result 2: Rank of solution. We also report the rank of Hn,n,j,k(y) versus the running time in Figure 2(c) and 2(f), where y = Cx if we solve (2) or y directly comes from the solution of (7). The rank is computed as the number of singular values larger than 10−3. For the GCGLS/GCG, the iterate starts from a low rank estimation and then gradually approaches the true one. However, for other competitors, the iterate first jumps to a full rank matrix and the rank of later iterate drops gradually. Given that the solution is intrinsically of low rank, GCGLS/GCG will probably find the desired one more efficiently. In view of this, the working memory of GCGLS is usually much smaller than the competitors, as it uses two low rank matrices U, V to represent but never materialize the solution until necessary. 3.2 Spectral Compressed Sensing In this part we apply our formulation and algorithm to another application, spectral compressed sensing (SCS), a technique that has by now been widely used in digital signal processing applications [6, 9, 29]. We show in particular that our reformulation (7) can effectively and rapidly recover partially observed signals. 6 10 −2 10 0 10 2 10 1 10 2 10 3 10 4 10 5 Run Time (seconds) Objective Value GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (a) Obj v.s. Time 10 −2 10 0 10 2 10 1 10 2 10 3 10 4 10 5 Run Time (seconds) Square Loss GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (b) Sqr loss v.s. Time 10 −1 10 0 10 1 10 2 10 0 10 1 10 2 10 3 Run Time (seconds) Rank of Hankel(y) GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (c) Rank(y) v.s. Time 10 −2 10 0 10 2 10 1 10 2 10 3 10 4 10 5 Run Time (seconds) Objective Value GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (d) Obj v.s. Time 10 −2 10 0 10 2 10 1 10 2 10 3 10 4 10 5 Run Time (seconds) Square Loss GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (e) Sqr loss v.s. Time 10 −2 10 0 10 2 10 0 10 1 10 2 10 3 Run Time (seconds) Rank of Hankel(y) GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT (f) Rank(y) v.s. Time Figure 2: Stochastic System Realization problem with j = 21, k = 100, r = 10, µ = 1.5 for formulation (2) and µ = 0.1 for (7). The first row corresponds to the case M = 420, N = 2000, n = m = 20, . The second row corresponds to the case M = 840, N = 4000, n = m = 40. Model. The problem of spectral compressed sensing aims to recover a frequency-sparse signal from a small number of observations. The 2-D signal Y (k, l), 0 < k n1, 0 < l n2 is supposed to be the superposition of r 2-D sinusoids of arbitrary frequencies, i.e. (in the DFT form) Y (k, l) = r X i=1 diej2⇡(kf1i+lf2i) = r X i=1 di(ej2⇡f1i)k(ej2⇡f2i)l (16) where di is the amplitudes of the i-th sinusoid and (fxi, fyi) is its frequency. Inspired by the conventional matrix pencil method [14] for estimating the frequencies of sinusoidal signals or complex sinusoidal (damped) signals, the authors in [6] propose to arrange the observed data into a 2-fold Hankel matrix whose rank is bounded above by r, and formulate the 2-D spectral compressed sensing problem into a rank minimization problem with respect to the 2-fold Hankel structure. This 2-fold structure is a also linear structure, as we explain in the appendix. Given limited observations, this problem can be viewed as a matrix completion problem that recovers a low-rank matrix from partially observed entries while preserving the pre-defined linear structure. The trace norm heuristic for rank (·) is again used here, as it is proved by [5] to be an exact method for matrix completion provided that the number of observed entries satisfies the corresponding information theoretic bound. Setup. Given a partial observed signal Y with ⌦as the observation index set, we adopt the formulation (7) and thus aim to solve the following problem: min X2RM⇥N 1 2kP⌦(mat(Cx)) −P⌦(Y )k2 F + λ 2 kBxk2 F + µkXk⇤ (17) where x = vec(X), mat(·) is the inverse of the vectorization operator on Y . In this context, as before, A = P⌦, b = P⌦(Y ), where P⌦(Y ) only keeps the entries of Y in the index set ⌦and vanishes the others, Q(Y ) = H(2) k1,k2(Y ) is the two-fold Hankel matrix, and corresponding B and C can be found in the appendix to encode H(2) k1,k2(Y ) = X . Further, the size of matrix here is M = k1k2, N = (n1 −k1 + 1)(n2 −k2 + 1). Algorithm. We apply our generalized conditional gradient method with local search (GCGLS) to solve the spectral compressed sensing problem, using the reformulation discussed above. Following 7 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 (a) True 2-D Sinosuidal Signal 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 (b) Observed Entries 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 −4 −3 −2 −1 0 1 2 3 (c) Recovered Signal 10 20 30 40 50 60 70 80 90 100 −4 −3 −2 −1 0 1 2 3 4 5 True Signal Observations (d) Observed Signal on Column 1 10 20 30 40 50 60 70 80 90 100 −4 −3 −2 −1 0 1 2 3 4 5 True Signal Recovered (e) Recovered Signal on Column 1 Figure 3: Spectral Compressed Sensing problem with parameters n1 = n2 = 101, r = 6, solved with our GCGLS algorithm using k1 = k2 = 8, µ = 0.1. The 2-D signals in the first row are colored by the jet colormap. The second row shows the 1-D signal extracted from the first column of the data matrix. the experiment setup in [6], we generate a ground truth data matrix Y 2 R101⇥101 through a superposition of r = 6 2-D sinusoids, randomly reveal 20% of the entries, and add i.i.d Gaussian noise with amplitude signal-to-noise ratio 10. Result. The results on the SCS problem are shown in Figure 3. The generated true 2-D signal Y is shown in Figure 3(a) using the jet colormap. The 20% observed entries of Y are shown in Figure 3(b), where the white entries are unobserved. The signal recovered by our GCGLS algorithm is shown in Figure 3(c). Comparing with the true signal in Figure 3(a), we can see that the result of our CGCLS algorithm is pretty close to the truth. To demonstrate the result more clearly, we extract a single column as a 1-D signals for further inspection. Figure 3(d) plots the original signal (blue line) as well as the observed ones (red dot), both from the first column of the 2-D signals. In 3(e), the recovered signal is represented by the red dashed dashed curve. It matches the original signal with significantly large portion, showing the success of our method in recovering partially observed 2-D signals from noise. Since the 2-fold structure used in this experiment is more complicated than that in the previous SSR task, this experiment further validates our algorithm on more complicated problems. 4 Conclusion In this paper, we address the structured matrix rank minimization problem. We first formulate the problem differently, so that it is amenable to adapt the Generalized Conditional Gradient Method. By doing so, we are able to achieve the complexity O(MN) per iteration with a convergence rate O ! 1 ✏ " . Then the overall complexity is by far the lowest compared to state-of-the-art methods for the structured matrix rank minimization problem. Our empirical studies on stochastic system realization and spectral compressed sensing further confirm the efficiency of the algorithm and the effectiveness of our reformulation. 8 References [1] B. Balle and M. Mohri. Spectral learning of general weighted automata via constrained matrix completion. In NIPS, pages 2168–2176, 2012. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sciences, 2(1):183–202, 2009. [3] K. Bredies, D. A. Lorenz, and P. Maass. A generalized conditional gradient method and its connection to an iterative shrinkage method. Computational Optimization and Applications, 42(2):173–193, 2009. [4] J. A. Cadzow. Signal enhancement: A composite property mapping algorithm. IEEE Transactions on Acoustics, Speech and Signal Processing, pages 39–62, 1988. [5] E. J. Cand`es and T. Tao. The power of convex relaxation: near-optimal matrix completion. IEEE Transactions on Information Theory, 56(5):2053–2080, 2010. [6] Y. Chen and Y. Chi. Spectral compressed sensing via structured matrix completion. In ICML, pages 414–422, 2013. [7] J. K. Cullum and R. A. Willoughby. Lanczos Algorithms for Large Symmetric Eigenvalue Computations, Vol. 1. Elsevier, 2002. [8] T. Ding, M. Sznaier, and O. I. Camps. A rank minimization approach to video inpainting. In ICCV, pages 1–8, 2007. [9] M. F. Duarte and R. G. Baraniuk. Spectral compressive sensing. Applied and Computational Harmonic Analysis, 35(1):111–129, 2013. [10] M. Fazel. Matrix rank minimization with applications. PhD thesis, Stanford University, 2002. [11] M. Fazel, T. K. Pong, D. Sun, and P. Tseng. Hankel matrix rank minimization with applications to system identification and realization. SIAM J. Matrix Analysis Applications, 34(3):946–977, 2013. [12] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3:95–110, 1956. [13] Z. Harchaoui, A. Juditsky, and A. Nemirovski. Conditional gradient algorithms for machine learning. In NIPS Workshop on Optimization for ML., 2012. [14] Y. Hua. Estimating two-dimensional frequencies by matrix enhancement and matrix pencil. IEEE Transactions on Signal Processing, 40(9):2267–2280, 1992. [15] M. Ishteva, K. Usevich, and I. Markovsky. Factorization approach to structured low-rank approximation with applications. SIAM J. Matrix Analysis Applcations, 35(3):1180–1204, 2014. [16] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, pages 427–435, 2013. [17] Z. Liu and L. Vandenberghe. Semidefinite programming methods for system realization and identification. In CDC, pages 4676–4681, 2009. [18] Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM J. Matrix Analysis Applications, 31(3):1235–1256, 2009. [19] Z. Liu, A. Hansson, and L. Vandenberghe. Nuclear norm system identification with missing inputs and outputs. Systems & Control Letters, 62(8):605–612, 2013. [20] J. Mari, P. Stoica, and T. McKelvey. Vector ARMA estimation: a reliable subspace approach. IEEE Transactions on Signal Processing, 48(7):2092–2104, 2000. [21] I. Markovsky. Structured low-rank approximation and its applications. Automatica, 44(4):891–909, 2008. [22] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Review, 52(3):471–501, 2010. [23] J. D. M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In ICML, pages 713–719, 2005. [24] P. J. Shin, P. E. Larson, M. A. Ohliger, M. Elad, J. M. Pauly, D. B. Vigneron, and M. Lustig. Calibrationless parallel imaging reconstruction based on structured low-rank matrix completion. Magnetic Resonance in Medicine, 2013. [25] M. Signoretto, V. Cevher, and J. A. Suykens. An SVD-free approach to a class of structured low rank matrix optimization problems with application to system identification. Technical report, K.U.Leuven, 2013. 13-44, ESTA-SISTA. [26] N. Srebro, J. D. M. Rennie, and T. Jaakkola. Maximum-margin matrix factorization. In NIPS, 2004. [27] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In NIPS, pages 2915–2923, 2012. [28] J. Zhou, J. Chen, and J. Ye. Multi-task learning: theory, algorithms, and applications. SIAM Data Mining Tutorial, 2012. [29] X. Zhu and M. Rabbat. Graph spectral compressed sensing. Technical report, McGill University, Tech. Rep, 2011. 9
2014
240
5,337
Beyond Disagreement-based Agnostic Active Learning Chicheng Zhang University of California, San Diego 9500 Gilman Drive, La Jolla, CA 92093 chichengzhang@ucsd.edu Kamalika Chaudhuri University of California, San Diego 9500 Gilman Drive, La Jolla, CA 92093 kamalika@cs.ucsd.edu Abstract We study agnostic active learning, where the goal is to learn a classifier in a prespecified hypothesis class interactively with as few label queries as possible, while making no assumptions on the true function generating the labels. The main algorithm for this problem is disagreement-based active learning, which has a high label requirement. Thus a major challenge is to find an algorithm which achieves better label complexity, is consistent in an agnostic setting, and applies to general classification problems. In this paper, we provide such an algorithm. Our solution is based on two novel contributions; first, a reduction from consistent active learning to confidence-rated prediction with guaranteed error, and second, a novel confidence-rated predictor. 1 Introduction In this paper, we study active learning of classifiers in an agnostic setting, where no assumptions are made on the true function that generates the labels. The learner has access to a large pool of unlabelled examples, and can interactively request labels for a small subset of these; the goal is to learn an accurate classifier in a pre-specified class with as few label queries as possible. Specifically, we are given a hypothesis class H and a target , and our aim is to find a binary classifier in H whose error is at most  more than that of the best classifier in H, while minimizing the number of requested labels. There has been a large body of previous work on active learning; see the surveys by [10, 28] for overviews. The main challenge in active learning is ensuring consistency in the agnostic setting while still maintaining low label complexity. In particular, a very natural approach to active learning is to view it as a generalization of binary search [17, 9, 27]. While this strategy has been extended to several different noise models [23, 27, 26], it is generally inconsistent in the agnostic case [11]. The primary algorithm for agnostic active learning is called disagreement-based active learning. The main idea is as follows. A set Vk of possible risk minimizers is maintained with time, and the label of an example x is queried if there exist two hypotheses h1 and h2 in Vk such that h1(x) = h2(x). This algorithm is consistent in the agnostic setting [7, 2, 12, 18, 5, 19, 6, 24]; however, due to the conservative label query policy, its label requirement is high. A line of work due to [3, 4, 1] have provided algorithms that achieve better label complexity for linear classification on the uniform distribution over the unit sphere as well as log-concave distributions; however, their algorithms are limited to these specific cases, and it is unclear how to apply them more generally. Thus, a major challenge in the agnostic active learning literature has been to find a general active learning strategy that applies to any hypothesis class and data distribution, is consistent in the agnostic case, and has a better label requirement than disagreement based active learning. This has been mentioned as an open problem by several works, such as [2, 10, 4]. 1 In this paper, we provide such an algorithm. Our solution is based on two key contributions, which may be of independent interest. The first is a general connection between confidence-rated predictors and active learning. A confidence-rated predictor is one that is allowed to abstain from prediction on occasion, and as a result, can guarantee a target prediction error. Given a confidencerated predictor with guaranteed error, we show how to to construct an active label query algorithm consistent in the agnostic setting. Our second key contribution is a novel confidence-rated predictor with guaranteed error that applies to any general classification problem. We show that our predictor is optimal in the realizable case, in the sense that it has the lowest abstention rate out of all predictors guaranteeing a certain error. Moreover, we show how to extend our predictor to the agnostic setting. Combining the label query algorithm with our novel confidence-rated predictor, we get a general active learning algorithm consistent in the agnostic setting. We provide a characterization of the label complexity of our algorithm, and show that this is better than the bounds known for disagreementbased active learning in general. Finally, we show that for linear classification with respect to the uniform distribution and log-concave distributions, our bounds reduce to those of [3, 4]. 2 Algorithm 2.1 The Setting We study active learning for binary classification. Examples belong to an instance space X, and their labels lie in a label space Y = {−1, 1}; labelled examples are drawn from an underlying data distribution D on X × Y. We use DX to denote the marginal on D on X, and DY |X to denote the conditional distribution on Y |X = x induced by D. Our algorithm has access to examples through two oracles – an example oracle U which returns an unlabelled example x ∈X drawn from DX and a labelling oracle O which returns the label y of an input x ∈X drawn from DY |X. Given a hypothesis class H of VC dimension d, the error of any h ∈H with respect to a data distribution Π over X × Y is defined as errΠ(h) = P(x,y)∼Π(h(x) = y). We define: h∗(Π) = argminh∈HerrΠ(h), ν∗(Π) = errΠ(h∗(Π)). For a set S, we abuse notation and use S to also denote the uniform distribution over the elements of S. We define PΠ(·) := P(x,y)∼Π(·), EΠ(·) := E(x,y)∼Π(·). Given access to examples from a data distribution D through an example oracle U and a labeling oracle O, we aim to provide a classifier ˆh ∈H such that with probability ≥1 −δ, errD(ˆh) ≤ ν∗(D) + , for some target values of  and δ; this is achieved in an adaptive manner by making as few queries to the labelling oracle O as possible. When ν∗(D) = 0, we are said to be in the realizable case; in the more general agnostic case, we make no assumptions on the labels, and thus ν∗(D) can be positive. Previous approaches to agnostic active learning have frequently used the notion of disagreements. The disagreement between two hypotheses h1 and h2 with respect to a data distribution Π is the fraction of examples according to Π to which h1 and h2 assign different labels; formally: ρΠ(h1, h2) = P(x,y)∼Π(h1(x) = h2(x)). Observe that a data distribution Π induces a pseudometric ρΠ on the elements of H; this is called the disagreement metric. For any r and any h ∈H, define BΠ(h, r) to be the disagreement ball of radius r around h with respect to the data distribution Π. Formally: BΠ(h, r) = {h ∈H : ρΠ(h, h) ≤r}. For notational simplicity, we assume that the hypothesis space is “dense” with repsect to the data distribution D, in the sense that ∀r > 0, suph∈BD(h∗(D),r) ρD(h, h∗(D)) = r. Our analysis will still apply without the denseness assumption, but will be significantly more messy. Finally, given a set of hypotheses V ⊆H, the disagreement region of V is the set of all examples x such that there exist two hypotheses h1, h2 ∈V for which h1(x) = h2(x). This paper establishes a connection between active learning and confidence-rated predictors with guaranteed error. A confidence-rated predictor is a prediction algorithm that is occasionally allowed to abstain from classification. We will consider such predictors in the transductive setting. Given a set V of candidate hypotheses, an error guarantee η, and a set U of unlabelled examples, a confidence-rated predictor P either assigns a label or abstains from prediction on each unlabelled 2 x ∈U. The labels are assigned with the guarantee that the expected disagreement1 between the label assigned by P and any h ∈V is ≤η. Specifically, for all h ∈V, Px∼U(h(x) = P(x), P(x) = 0) ≤η (1) This ensures that if some h∗∈V is the true risk minimizer, then, the labels predicted by P on U do not differ very much from those predicted by h∗. The performance of a confidence-rated predictor which has a guarantee such as in Equation (1) is measured by its coverage, or the probability of non-abstention Px∼U(P(x) = 0); higher coverage implies better performance. 2.2 Main Algorithm Our active learning algorithm proceeds in epochs, where the goal of epoch k is to achieve excess generalization error k = 2k0−k+1, by querying a fresh batch of labels. The algorithm maintains a candidate set Vk that is guaranteed to contain the true risk minimizer. The critical decision at each epoch is how to select a subset of unlabelled examples whose labels should be queried. We make this decision using a confidence-rated predictor P. At epoch k, we run P with candidate hypothesis set V = Vk and error guarantee η = k/64. Whenever P abstains, we query the label of the example. The number of labels mk queried is adjusted so that it is enough to achieve excess generalization error k+1. An outline is described in Algorithm 1; we next discuss each individual component in detail. Algorithm 1 Active Learning Algorithm: Outline 1: Inputs: Example oracle U, Labelling oracle O, hypothesis class H of VC dimension d, confidence-rated predictor P, target excess error  and target confidence δ. 2: Set k0 = log 1/ . Initialize candidate set V1 = H. 3: for k = 1, 2, ..k0 do 4: Set k = 2k0−k+1, δk = δ 2(k0−k+1)2 . 5: Call U to generate a fresh unlabelled sample Uk = {zk,1, ..., zk,nk} of size nk = 192( 512 k )2(d ln 192( 512 k )2 + ln 288 δk ). 6: Run confidence-rated predictor P with inpuy V = Vk, U = Uk and error guarantee η = k/64 to get abstention probabilities γk,1, . . . , γk,nk on the examples in Uk. These probabilities induce a distribution Γk on Uk. Let φk = Px∼Uk(P(x) = 0) = 1 nk nk i=1 γk,i. 7: if in the Realizable Case then 8: Let mk = 1536φk k (d ln 1536φk k + ln 48 δk ). Draw mk i.i.d examples from Γk and query O for labels of these examples to get a labelled data set Sk. Update Vk+1 using Sk: Vk+1 := {h ∈Vk : h(x) = y, for all (x, y) ∈Sk}. 9: else 10: In the non-realizable case, use Algorithm 2 with inputs hypothesis set Vk, distribution Γk, target excess error k 8φk , target confidence δk 2 , and the labeling oracle O to get a new hypothesis set Vk+1. 11: return an arbitrary ˆh ∈Vk0+1. Candidate Sets. At epoch k, we maintain a set Vk of candidate hypotheses guaranteed to contain the true risk minimizer h∗(D) (w.h.p). In the realizable case, we use a version space as our candidate set. The version space with respect to a set S of labelled examples is the set of all h ∈H such that h(xi) = yi for all (xi, yi) ∈S. Lemma 1. Suppose we run Algorithm 1 in the realizable case with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P, target excess error  and target confidence δ. Then, with probability 1, h∗(D) ∈Vk, for all k = 1, 2, . . . , k0 + 1. In the non-realizable case, the version space is usually empty; we use instead a (1 −α)-confidence set for the true risk minimizer. Given a set S of n labelled examples, let C(S) ⊆H be a function of 1where the expectation is with respect to the random choices made by P 3 S; C(S) is said to be a (1 −α)-confidence set for the true risk minimizer if for all data distributions Δ over X × Y, PS∼Δn[h∗(Δ) ∈C(S)] ≥1 −α, Recall that h∗(Δ) = argminh∈HerrΔ(h). In the non-realizable case, our candidate sets are (1 −α)confidence sets for h∗(D), for α = δ. The precise setting of Vk is explained in Algorithm 2. Lemma 2. Suppose we run Algorithm 1 in the non-realizable case with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P, target excess error  and target confidence δ. Then with probability 1 −δ, h∗(D) ∈Vk, for all k = 1, 2, . . . , k0 + 1. Label Query. We next discuss our label query procedure – which examples should we query labels for, and how many labels should we query at each epoch? Which Labels to Query? Our goal is to query the labels of the most informative examples. To choose these examples while still maintaining consistency, we use a confidence-rated predictor P with guaranteed error. The inputs to the predictor are our candidate hypothesis set Vk which contains (w.h.p) the true risk minimizer, a fresh set Uk of unlabelled examples, and an error guarantee η = k/64. For notation simplicity, assume the elements in Uk are distinct. The output is a sequence of abstention probabilities {γk,1, γk,2, . . . , γk,nk}, for each example in Uk. It induces a distribution Γk over Uk, from which we independently draw examples for label queries. How Many Labels to Query? The goal of epoch k is to achieve excess generalization error k. To achieve this, passive learning requires ˜O(d/k) labelled examples2 in the realizable case, and ˜O(d(ν∗(D) + k)/2 k) examples in the agnostic case. A key observation in this paper is that in order to achieve excess generalization error k on D, it suffices to achieve a much larger excess generalization error O(k/φk) on the data distribution induced by Γk and DY |X, where φk is the fraction of examples on which the confidence-rated predictor abstains. In the realizable case, we achieve this by sampling mk = 1536φk k (d ln 1536φk k +ln 48 δk ) i.i.d examples from Γk, and querying their labels to get a labelled dataset Sk. Observe that as φk is the abstention probability of P with guaranteed error ≤k/64, it is generally smaller than the measure of the disagreement region of the version space; this key fact results in improved label complexity over disagreement-based active learning. This sampling procedure has the following property: Lemma 3. Suppose we run Algorithm 1 in the realizable case with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P, target excess error  and target confidence δ. Then with probability 1 −δ, for all k = 1, 2, . . . , k0 + 1, and for all h ∈Vk, errD(h) ≤k. In particular, the ˆh returned at the end of the algorithm satisfies errD(ˆh) ≤. The agnostic case has an added complication – in practice, the value of ν∗is not known ahead of time. Inspired by [24], we use a doubling procedure(stated in Algorithm 2) which adaptively finds the number mk of labelled examples to be queried and queries them. The following two lemmas illustrate its properties – that it is consistent, and that it does not use too many label queries. Lemma 4. Suppose we run Algorithm 2 with inputs hypothesis set V , example distribution Δ, labelling oracle O, target excess error ˜ and target confidence ˜δ. Let ˜Δ be the joint distribution on X × Y induced by Δ and DY |X. Then there exists an event ˜E, P( ˜E) ≥1 −˜δ, such that on ˜E, (1) Algorithm 2 halts and (2) the set Vj0 has the following properties: (2.1) If for h ∈H, err ˜Δ(h) −err ˜Δ(h∗( ˜Δ)) ≤˜/2, then h ∈Vj0. (2.2) On the other hand, if h ∈Vj0, then err ˜Δ(h) −err ˜Δ(h∗( ˜Δ)) ≤˜. When event ˜E happens, we say Algorithm 2 succeeds. Lemma 5. Suppose we run Algorithm 2 with inputs hypothesis set V , example distribution Δ, labelling oracle O, target excess error ˜ and target confidence ˜δ. There exists some absolute constant c1 > 0, such that on the event that Algorithm 2 succeeds, nj0 ≤c1((d ln 1 ˜ + ln 1 ˜δ ) ν∗( ˜Δ)+˜ ˜2 ). Thus the total number of labels queried is j0 j=1 nj ≤2nj0 ≤2c1((d ln 1 ˜ + ln 1 ˜δ ) ν∗( ˜Δ)+˜ ˜2 ). 2 ˜O(·) hides logarithmic factors 4 A naive approach (see Algorithm 4 in the Appendix) which uses an additive VC bound gives a sample complexity of O((d ln(1/˜) + ln(1/˜δ))˜−2); Algorithm 2 gives a better sample complexity. The following lemma is a consequence of our label query procedure in the non-realizable case. Lemma 6. Suppose we run Algorithm 1 in the non-realizable case with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P, target excess error  and target confidence δ. Then with probability 1 −δ, for all k = 1, 2, . . . , k0 + 1, and for all h ∈Vk, errD(h) ≤errD(h∗(D)) + k. In particular, the ˆh returned at the end of the algorithm satisfies errD(ˆh) ≤errD(h∗(D)) + . Algorithm 2 An Adaptive Algorithm for Label Query Given Target Excess Error 1: Inputs: Hypothesis set V of VC dimension d, Example distribution Δ, Labeling oracle O, target excess error ˜, target confidence ˜δ. 2: for j = 1, 2, . . . do 3: Draw nj = 2j i.i.d examples from Δ; query their labels from O to get a labelled dataset Sj. Denote ˜δj := ˜δ/(j(j + 1)). 4: Train an ERM classifier ˆhj ∈V over Sj. 5: Define the set Vj as follows: Vj =  h ∈V : errSj(h) ≤errSj(ˆhj) + ˜ 2 + σ(nj, ˜δj) +  σ(nj, ˜δj)ρSj(h, ˆhj)  Where σ(n, δ) := 16 n (2d ln 2en d + ln 24 δ ). 6: if suph∈Vj(σ(nj, ˜δj) +  σ(nj, ˜δj)ρSj(h, ˆhj)) ≤˜ 6 then 7: j0 = j, break 8: return Vj0. 2.3 Confidence-Rated Predictor Our active learning algorithm uses a confidence-rated predictor with guaranteed error to make its label query decisions. In this section, we provide a novel confidence-rated predictor with guaranteed error. This predictor has optimal coverage in the realizable case, and may be of independent interest. The predictor P receives as input a set V ⊆H of hypotheses (which is likely to contain the true risk minimizer), an error guarantee η, and a set of U of unlabelled examples. We consider a soft prediction algorithm; so, for each example in U, the predictor P outputs three probabilities that add up to 1 – the probability of predicting 1, −1 and 0. This output is subject to the constraint that the expected disagreement3 between the ±1 labels assigned by P and those assigned by any h ∈V is at most η, and the goal is to maximize the coverage, or the expected fraction of non-abstentions. Our key insight is that this problem can be written as a linear program, which is described in Algorithm 3. There are three variables, ξi, ζi and γi, for each unlabelled zi ∈U; there are the probabilities with which we predict 1, −1 and 0 on zi respectively. Constraint (2) ensures that the expected disagreement between the label predicted and any h ∈V is no more than η, while the LP objective maximizes the coverage under these constraints. Observe that the LP is always feasible. Although the LP has infinitely many constraints, the number of constraints in Equation (2) distinguishable by Uk is at most (em/d)d, where d is the VC dimension of the hypothesis class H. The performance of a confidence-rated predictor is measured by its error and coverage. The error of a confidence-rated predictor is the probability with which it predicts the wrong label on an example, while the coverage is its probability of non-abstention. We can show the following guarantee on the performance of the predictor in Algorithm 3. Theorem 1. In the realizable case, if the hypothesis set V is the version space with respect to a training set, then Px∼U(P(x) = h∗(x), P(x) = 0) ≤η. In the non-realizable case, if the hypothesis set V is an (1 −α)-confidence set for the true risk minimizer h∗, then, w.p ≥1 −α, Px∼U(P(x) = y, P(x) = 0) ≤Px∼U(h∗(x) = y) + η. 3where the expectation is taken over the random choices made by P 5 Algorithm 3 Confidence-rated Predictor 1: Inputs: hypothesis set V , unlabelled data U = {z1, . . . , zm}, error bound η. 2: Solve the linear program: min m  i=1 γi subject to: ∀i, ξi + ζi + γi = 1 ∀h ∈V,  i:h(zi)=1 ζi +  i:h(zi)=−1 ξi ≤ηm (2) ∀i, ξi, ζi, γi ≥0 3: For each zi ∈U, output probabilities for predicting 1, −1 and 0: ξi, ζi, and γi. In the realizable case, we can also show that our confidence rated predictor has optimal coverage. Observe that we cannot directly show optimality in the non-realizable case, as the performance depends on the exact choice of the (1 −α)-confidence set. Theorem 2. In the realizable case, suppose that the hypothesis set V is the version space with respect to a training set. If P  is any confidence rated predictor with error guarantee η, and if P is the predictor in Algorithm 3, then, the coverage of P is at least much as the coverage of P . 3 Performance Guarantees An essential property of any active learning algorithm is consistency – that it converges to the true risk minimizer given enough labelled examples. We observe that our algorithm is consistent provided we use any confidence-rated predictor P with guaranteed error as a subroutine. The consistency of our algorithm is a consequence of Lemmas 3 and 6 and is shown in Theorem 3. Theorem 3 (Consistency). Suppose we run Algorithm 1 with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P, target excess error  and target confidence δ. Then with probability 1 −δ, the classifier ˆh returned by Algorithm 1 satisfies errD(ˆh) −errD(h∗(D)) ≤. We now establish a label complexity bound for our algorithm; however, this label complexity bound applies only if we use the predictor described in Algorithm 3 as a subroutine. For any hypothesis set V , data distribution D, and η, define ΦD(V, η) to be the minimum abstention probability of a confidence-rated predictor which guarantees that the disagreement between its predicted labels and any h ∈V under DX is at most η. Formally, ΦD(V, η) = min{EDγ(x) : ED[I(h(x) = +1)ζ(x) + I(h(x) = −1)ξ(x)] ≤ η for all h ∈ V, γ(x) + ξ(x) + ζ(x) ≡ 1, γ(x), ξ(x), ζ(x) ≥ 0}. Define φ(r, η) := ΦD(BD(h∗, r), η). The label complexity of our active learning algorithm can be stated as follows. Theorem 4 (Label Complexity). Suppose we run Algorithm 1 with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P of Algorithm 3, target excess error  and target confidence δ. Then there exist constants c3, c4 > 0 such that with probability 1 −δ: (1) In the realizable case, the total number of labels queried by Algorithm 1 is at most: c3 log 1    k=1 (d ln φ(k, k/256) k + ln(log(1/) −k + 1 δ ))φ(k, k/256) k (2) In the agnostic case, the total number of labels queried by Algorithm 1 is at most: c4 log 1    k=1 (d ln φ(2ν∗(D) + k, k/256) k +ln(log(1/) −k + 1 δ ))φ(2ν∗(D) + k, k/256) k (1+ν∗(D) k ) 6 Comparison. The label complexity of disagreement-based active learning is characterized in terms of the disagreement coefficient. Given a radius r, the disagreement coefficent θ(r) is defined as: θ(r) = sup r≥r P(DIS(BD(h∗, r))) r , where for any V ⊆H, DIS(V ) is the disagreement region of V . As P(DIS(BD(h∗, r))) = φ(r, 0) [13], in our notation, θ(r) = supr≥r φ(r,0) r . In the realizable case, the best known bound for label complexity of disagreement-based active learning is ˜O(θ() · ln(1/) · (d ln θ() + ln ln(1/))) [20]4. Our label complexity bound may be simplified to: ˜O  ln 1  · sup k≤log(1/) φ(k, k/256) k ·  d ln  sup k≤log(1/) φ(k, k/256) k  + ln ln 1   , which is essentially the bound of [20] with θ() replaced by supk≤log(1/) φ(k,k/256) k . As enforcing a lower error guarantee requires more abstention, φ(r, η) is a decreasing function of η; as a result, sup k≤log(1/) φ(k, k/256) k ≤θ(), and our label complexity bound is better. In the agnostic case, [12] provides a label complexity bound of ˜O(θ(2ν∗(D)+)·(d ν∗(D)2 2 ln(1/)+ d ln2(1/))) for disagreement-based active-learning. In contrast, by Proposition 1 our label complexity is at most: ˜O  sup k≤log(1/) φ(2ν∗(D) + k, k/256) 2ν∗(D) + k ·  dν∗(D)2 2 ln(1/) + d ln2(1/)  Again, this is essentially the bound of [12] with θ(2ν∗(D) + ) replaced by the smaller quantity sup k≤log(1/) φ(2ν∗(D) + k, k/256) 2ν∗(D) + k , [20] has provided a more refined analysis of disagreement-based active learning that gives a label complexity of ˜O(θ(ν∗(D) + )( ν∗(D)2 2 + ln 1  )(d ln θ(ν∗(D) + ) + ln ln 1  )); observe that their dependence is still on θ(ν∗(D) + ). We leave a more refined label complexity analysis of our algorithm for future work. An important sub-case of learning from noisy data is learning under the Tsybakov noise conditions [30]. We defer the discussion into the Appendix. 3.1 Case Study: Linear Classification under the Log-concave Distribution We now consider learning linear classifiers with respect to log-concave data distribution on Rd. In this case, for any r, the disagreement coefficient θ(r) ≤O( √ d ln(1/r)) [4]; however, for any η > 0, φ(r,η) r ≤O(ln(r/η)) (see Lemma 14 in the Appendix), which is much smaller so long as η/r is not too small. This leads to the following label complexity bounds. Corollary 1. Suppose DX is isotropic and log-concave on Rd, and H is the set of homogeneous linear classifiers on Rd. Then Algorithm 1 with inputs example oracle U, labelling oracle O, hypothesis class H, confidence-rated predictor P of Algorithm 3, target excess error  and target confidence δ satisfies the following properties. With probability 1 −δ: (1) In the realizable case, there exists some absolute constant c8 > 0 such that the total number of labels queried is at most c8 ln 1  (d + ln ln 1  + ln 1 δ ). 4Here the ˜O(·) notation hides factors logarithmic in 1/δ 7 (2) In the agnostic case, there exists some absolute constant c9 > 0 such that the total number of labels queried is at most c9( ν∗(D)2 2 + ln 1  ) ln +ν∗(D)  (d ln +ν∗(D)  + ln 1 δ ) + ln 1  ln +ν∗(D)  ln ln 1  . (3) If (C0, κ)-Tsybakov Noise condition holds for D with respect to H, then there exists some constant c10 > 0 (that depends on C0, κ) such that the total number of labels queried is at most c10 2 κ −2 ln 1  (d ln 1  + ln 1 δ ). In the realizable case, our bound matches [4]. For disagreement-based algorithms, the bound is ˜O(d 3 2 ln2 1  (ln d + ln ln 1  )), which is worse by a factor of O( √ d ln(1/)). [4] does not address the fully agnostic case directly; however, if ν∗(D) is known a-priori, then their algorithm can achieve roughly the same label complexity as ours. For the Tsybakov Noise Condition with κ > 1, [3, 4] provides a label complexity bound for ˜O( 2 κ −2 ln2 1  (d + ln ln 1  )) with an algorithm that has a-priori knowledge of C0 and κ. We get a slightly better bound. On the other hand, a disagreement based algorithm [20] gives a label complexity of ˜O(d 3 2 ln2 1   2 κ −2(ln d + ln ln 1  )). Again our bound is better by factor of Ω( √ d) over disagreement-based algorithms. For κ = 1, we can tighten our label complexity to get a ˜O(ln 1  (d + ln ln 1  + ln 1 δ )) bound, which again matches [4], and is better than the ones provided by disagreement-based algorithm – ˜O(d 3 2 ln2 1  (ln d + ln ln 1  )) [20]. 4 Related Work Active learning has seen a lot of progress over the past two decades, motivated by vast amounts of unlabelled data and the high cost of annotation [28, 10, 20]. According to [10], the two main threads of research are exploitation of cluster structure [31, 11], and efficient search in hypothesis space, which is the setting of our work. We are given a hypothesis class H, and the goal is to find an h ∈H that achieves a target excess generalization error, while minimizing the number of label queries. Three main approaches have been studied in this setting. The first and most natural one is generalized binary search [17, 8, 9, 27], which was analyzed in the realizable case by [9] and in various limited noise settings by [23, 27, 26]. While this approach has the advantage of low label complexity, it is generally inconsistent in the fully agnostic setting [11]. The second approach, disagreement-based active learning, is consistent in the agnostic PAC model. [7] provides the first disagreement-based algorithm for the realizable case. [2] provides an agnostic disagreement-based algorithm, which is analyzed in [18] using the notion of disagreement coefficient. [12] reduces disagreement-based active learning to passive learning; [5] and [6] further extend this work to provide practical and efficient implementations. [19, 24] give algorithms that are adaptive to the Tsybakov Noise condition. The third line of work [3, 4, 1], achieves a better label complexity than disagreement-based active learning for linear classifiers on the uniform distribution over unit sphere and logconcave distributions. However, a limitation is that their algorithm applies only to these specific settings, and it is not apparent how to apply it generally. Research on confidence-rated prediction has been mostly focused on empirical work, with relatively less theoretical development. Theoretical work on this topic includes KWIK learning [25], conformal prediction [29] and the weighted majority algorithm of [16]. The closest to our work is the recent learning-theoretic treatment by [13, 14]. [13] addresses confidence-rated prediction with guaranteed error in the realizable case, and provides a predictor that abstains in the disagreement region of the version space. This predictor achieves zero error, and coverage equal to the measure of the agreement region. [14] shows how to extend this algorithm to the non-realizable case and obtain zero error with respect to the best hypothesis in H. Note that the predictors in [13, 14] generally achieve less coverage than ours for the same error guarantee; in fact, if we plug them into our Algorithm 1, then we recover the label complexity bounds of disagreement-based algorithms [12, 19, 24]. A formal connection between disagreement-based active learning in realizable case and perfect confidence-rated prediction (with a zero error guarantee) was established by [15]. Our work can be seen as a step towards bridging these two areas, by demonstrating that active learning can be further reduced to imperfect confidence-rated prediction, with potentially higher label savings. Acknowledgements. We thank NSF under IIS-1162581 for research support. We thank Sanjoy Dasgupta and Yoav Freund for helpful discussions. CZ would like to thank Liwei Wang for introducing the problem of selective classification to him. 8 References [1] P. Awasthi, M-F. Balcan, and P. M. Long. The power of localization for efficiently learning linear separators with noise. In STOC, 2014. [2] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. J. Comput. Syst. Sci., 75(1):78–89, 2009. [3] M.-F. Balcan, A. Z. Broder, and T. Zhang. Margin based active learning. In COLT, 2007. [4] M.-F. Balcan and P. M. Long. Active and passive learning of linear separators under logconcave distributions. In COLT, 2013. [5] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance weighted active learning. In ICML, 2009. [6] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [7] D. A. Cohn, L. E. Atlas, and R. E. Ladner. Improving generalization with active learning. Machine Learning, 15(2), 1994. [8] S. Dasgupta. Analysis of a greedy active learning strategy. In NIPS, 2004. [9] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, 2005. [10] S. Dasgupta. Two faces of active learning. Theor. Comput. Sci., 412(19), 2011. [11] S. Dasgupta and D. Hsu. Hierarchical sampling for active learning. In ICML, 2008. [12] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. In NIPS, 2007. [13] R. El-Yaniv and Y. Wiener. On the foundations of noise-free selective classification. JMLR, 2010. [14] R. El-Yaniv and Y. Wiener. Agnostic selective classification. In NIPS, 2011. [15] R. El-Yaniv and Y. Wiener. Active learning via perfect selective classification. JMLR, 2012. [16] Y. Freund, Y. Mansour, and R. E. Schapire. Generalization bounds for averaged classifiers. The Ann. of Stat., 32, 2004. [17] Y. Freund, H. S. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28(2-3):133–168, 1997. [18] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [19] S. Hanneke. Adaptive rates of convergence in active learning. In COLT, 2009. [20] S. Hanneke. A statistical theory of active learning. Manuscript, 2013. [21] S. Hanneke and L. Yang. Surrogate losses in passive and active learning. CoRR, abs/1207.3772, 2012. [22] D. Hsu. Algorithms for Active Learning. PhD thesis, UC San Diego, 2010. [23] M. K¨a¨ari¨ainen. Active learning in the non-realizable case. In ALT, 2006. [24] V. Koltchinskii. Rademacher complexities and bounding the excess risk in active learning. JMLR, 2010. [25] L. Li, M. L. Littman, and T. J. Walsh. Knows what it knows: a framework for self-aware learning. In ICML, 2008. [26] M. Naghshvar, T. Javidi, and K. Chaudhuri. Noisy bayesian active learning. In Allerton, 2013. [27] R. D. Nowak. The geometry of generalized binary search. IEEE Transactions on Information Theory, 57(12):7893–7906, 2011. [28] B. Settles. Active learning literature survey. Technical report, University of WisconsinMadison, 2010. [29] G. Shafer and V. Vovk. A tutorial on conformal prediction. JMLR, 2008. [30] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, 32:135–166, 2004. [31] R. Urner, S. Wulff, and S. Ben-David. Plal: Cluster-based active learning. In COLT, 2013. 9
2014
241
5,338
Optimal Neural Codes for Control and Estimation Alex Susemihl1, Manfred Opper Methods of Artificial Intelligence Technische Universit¨at Berlin 1 Current affiliation: Google Ron Meir Department of Electrical Engineering Technion - Haifa Abstract Agents acting in the natural world aim at selecting appropriate actions based on noisy and partial sensory observations. Many behaviors leading to decision making and action selection in a closed loop setting are naturally phrased within a control theoretic framework. Within the framework of optimal Control Theory, one is usually given a cost function which is minimized by selecting a control law based on the observations. While in standard control settings the sensors are assumed fixed, biological systems often gain from the extra flexibility of optimizing the sensors themselves. However, this sensory adaptation is geared towards control rather than perception, as is often assumed. In this work we show that sensory adaptation for control differs from sensory adaptation for perception, even for simple control setups. This implies, consistently with recent experimental results, that when studying sensory adaptation, it is essential to account for the task being performed. 1 Introduction Biological systems face the difficult task of devising effective control strategies based on partial information communicated between sensors and actuators across multiple distributed networks. While the theory of Optimal Control (OC) has become widely used as a framework for studying motor control, the standard framework of OC neglects many essential attributes of biological control [1, 2, 3]. The classic formulation of closed loop OC considers a dynamical system (plant) observed through sensors which transmit their output to a controller, which in turn selects a control law that drives actuators to steer the plant. This standard view, however, ignores the fact that sensors, controllers and actuators are often distributed across multiple sub-systems, and disregards the communication channels between these sub-systems. While the importance of jointly considering control and communication within a unified framework was already clear to the pioneers of the field of Cybernetics (e.g., Wiener and Ashby), it is only in recent years that increasing effort is being devoted to the formulation of a rigorous systems-theoretic framework for control and communication (e.g., [4]). Since the ultimate objective of an agent is to select appropriate actions, it is clear that sensation and communication must subserve effective control, and should be gauged by their contribution to action selection. In fact, given the communication constraints that plague biological systems (and many current distributed systems, e.g., cellular networks, sensor arrays, power grids, etc.), a major concern of a control design is the optimization of sensory information gathering and communication (consistently with theories of active perception). For example, recent theoretical work demonstrated a sharp communication bandwidth threshold below which control (or even stabilization) cannot be achieved (for a summary of such results see [4]). Moreover, when informational constraints exists within a control setting, even simple (linear and Gaussian) problems become nonlinear and intractable, as exemplified in the famous Witsenhausen counter-example [5]. The inter-dependence between sensation, communication and control is often overlooked both in control theory and in computational neuroscience, where one assumes that the overall solution to the control problem consists of first estimating the state of the controlled system (without reference 1 to the control task), followed by constructing a controller based on the estimated state. This idea, referred to as the separation principle in Control Theory, while optimal in certain restricted settings (e.g., Linear Quadratic Gaussian (LQG) control) is, in general, sub-optimal [6]. Unfortunately, it is in general very difficult to provide optimal solutions in cases where separation fails. A special case of the separation principle, referred to as Certainty Equivalence (CE), occurs when the controller treats the estimated state as the true state, and forms a controller assuming full state information. It is generally overlooked, however, that although the optimal control policy does not depend directly on the observation model at hand, the expected future costs do depend on the specifics of that model [7]. In this sense, even when CE holds, costs still arise from uncertain estimates of the state and one can optimise the sensory observation model to minimise these costs, leading to sensory adaptation. At first glance, it might seem that the observation model that will minimise the expected future cost will be the observation model that minimises the estimation error. We will show, however, that this is not generally the case. A great deal of the work in computational neuroscience has dealt independently with the problem of sensory adaptation and control, while, as stated above, these two issues are part and parcel of the same problem. In fact, it is becoming increasingly clear that biological sensory adaptation is task-dependent [8, 9]. For example, [9] demonstrates that task-dependent sensory adaptation takes place in purely motor tasks, explaining after-effect phenomena seen in experiments. In [10], the authors show that specific changes occur in sensory regions, implying sensory plasticity in motor learning. In this work we consider a simple setting for control based on spike time sensory coding, and study the optimal coding of sensory information required in order to perform a well-defined motor task. We show that even if CE holds, the optimal encoder strategy, minimising the control cost, differs from the optimal encoder required for state estimation. This result demonstrates, consistently with experiments, that neural encoding must be tailored to the task at hand. In other words, when analyzing sensory neural data, one must pay careful care to the task being performed. Interestingly, work within the distributed control community dealing with optimal assignment and selection of sensors, leads to similar conclusions and to specific schemes for sensory adaptation. The interplay between information theory and optimal control is a central pillar of modern control theory, and we believe it must be accounted for in the computational neuroscience community. Though statistical estimation theory has become central in neural coding issues, often through the Cram´er-Rao bound, there have been few studies bridging the gap between partially observed control and neural coding. We hope to narrow this gap by presenting a simple example where control and estimation yield different conclusions. The remainder of the paper is organised as follows: In section 1.1 we introduce the notation and concepts; In section 2 we derive expressions for the cost-to-go of a linear-quadratic control system observed through spikes from a dense populations of neurons; in section 3 we present the results and compare optimal codes for control and estimation with point-process filtering, Kalman filtering and LQG control; in section 4 we discuss the results and their implications. 1.1 Optimal Codes for Estimation and Control We will deal throughout this paper with a dynamic system with state Xt, observed through noisy sensory observations Zt, whose conditional distribution can be parametrised by a set of parameters ϕ, e.g., the widths and locations of the tuning curves of a population of neurons or the noise properties of the observation process. The conditional distribution is then given by Pϕ(Zt|Xt = x). Zt could stand for a diffusion process dependent on Xt (denoted Yt) or a set of doubly-stochastic Poisson processes dependent on Xt (denoted N m t ). In that sense, the optimal Bayesian encoder for an estimation problem, based on the Mean Squared Error (MSE) criterion, can be written as ϕ∗ e = argmin ϕ Ez  EXt  Xt −ˆ Xt(Zt) 2 Zt = z  , where ˆXt(Zt) = E [Xt|Zt] is the posterior mean, computable, in the linear Gaussian case, by the Kalman filter. We will throughout this paper consider the MMSE in the equilibrium, that is, the error in estimating Xt from long sequences of observations Z[0,t]. Similarly, considering a control problem with a cost given by C(X0, U 0) = Z T 0 c(Xs, Us, s)ds + cT (XT ), 2 where Xt = {Xs|s ∈[t, T]}, U t = {Us|s ∈[t, T]}, and so forth. We can define ϕ∗ c = argmin ϕ Ez min U t [EXt [C(X0, U 0)|Zt = z]] . The certainty equivalence principle states that given a control policy γ∗: X →U which minimises the cost C, γ∗= argmin γ C(X0, γ(X0)), the optimal control policy for the partially observed problem given by noisy observations Z0 of X0 is given by γCE(Zt) = γ∗(E [X0|Zt]) . Note that we have used the notation γ(X0) = {γ(Xs), s ∈[0, T]}. 2 Stochastic Optimal Control In stochastic optimal control we seek to minimize the expected future cost incurred by a system with respect to a control variable applied to that system. We will consider linear stochastic systems governed by the SDE dXt = (AXt + BUt) dt + D1/2dWt, (1a) with a cost given by C(Xt, U t, t) = Z T t X⊤ s QXs + U ⊤ s RUs  ds + X⊤ T QT XT . (1b) From Bellman’s optimality principle or variational analysis [11], it is well known that the optimal control is given by U ∗ t = −R−1B⊤StXt, where St is the solution of the Riccati equation −˙St = Q + ASt + StA⊤−StB⊤R−1BSt, (2) with boundary condition ST = QT . The expected future cost at time t and state x under the optimal control is then given by J(x, t) = min U t E [C(Xt, U t, t)|Xt = x] = 1 2x⊤Stx + Z T t Tr (DSs) ds. This is usually called the optimal cost-to-go. However, the system’s state is not always directly accessible and we are often left with noisy observations of it. For a class of systems e.g. LQG control, CE holds and the optimal control policy for the indirectly observed control problem is simply the optimal control policy for the original control problem applied to the Bayesian estimate of the system’s state. In that sense, if the CE were to hold for the system above observed through noisy observations Yt of the state at time t, the optimal control would be given simply by the observationdependent control U ∗ t = −R−1B⊤StE [Xt|Yt] [7]. Though CE, when applicable, gives us a simple way to determine the optimal control, when considering neural systems we are often interested in finding the optimal encoder, or the optimal observation model for a given system. That is equivalent to finding the optimal tuning function for a given neuron model. Since CE neatly separates the estimation and control steps, it would be tempting to assume the optimal codes obtained for an estimation problem would also be optimal for an associated control problem. We will show here that this is not the case. As an illustration, let us consider the case of LQG with incomplete state information. One could, for example, take the observations to be a secondary process Yt, which itself is a solution to dYt = FXtdt + G1/2dVt, the optimal cost-to-go would then be given by [11] J(y, t) = min U t E  C(Xt, U t, t) Y[0,t] = y  (3) =ν⊤ t Stνt + Tr (KtSt) + Z T t Tr (DSs) ds + Z T t Tr SsBR−1B⊤SsKs  ds, 3 where we have defined Y[0,t] = {Ys, s ∈[0, t]}, νt = E[Xt|Y[0,t]] and Kt = cov[Xt|Y[0,t]]. We give a demonstration of these results in the SI, but for a thorough review see [11]. Note that through the last term in equation (3) the cost-to-go now depends on the parameters of the Yt process. More precisely, the variance of the distribution of Xs given Yt, for s > t obeys the ODE ˙Kt = AKt + KtA⊤+ D −KtF ⊤G−1FKt. (4) One could then choose the matrices F and G in such a way as to minimise the contribution of the rightmost term in equation (3). Note that in the LQG case this is not particularly interesting, as the conclusion is simply that we should strive to make Kt as small as possible, by making the term F ⊤G−1F as large as possible. This translates to choosing an observation process with very strong steering from the unobserved process (large F) and a very small noise (small G). One case that provides some more interesting situations is if we consider a two-dimensional system, where we are restricted to a noise covariance with constant determinant. That means the hypervolume spanned by the eigenvectors of the covariance matrix is constant. We will compare this case with the Poisson-coded case below. 2.1 LQG Control with Dense Gauss-Poisson Codes Let us now consider the case of the system given by equation (1a), but instead of observing the system directly we observe a set of doubly-stochastic Poisson processes {N m t } with rates given by λm(x) = φ exp  −1 2 (x −θm)⊤P † (x −θm)  . (5) To clarify, the process N m t is a counting process which counts how many spikes the neuron m has fired up to time t. In that sense, the differential of the counting process dN m t will give the spike train process, a sum of Dirac delta functions placed at the times of spikes fired by neuron m. Here P † denotes the pseudo-inverse of P, which is used to allow for tuning functions that do not depend on certain coordinates of the stimulus x. Furthermore, we will assume that the tuning centre θm are such that the probability of observing a spike of any neuron at a given time ˆλ = P m λm(x) is independent of the specific value of the world state x. This can be a consequence of either a dense packing of the tuning centres θm along a given dimension of x, or of an absolute insensitivity to that aspect of x through a null element in the diagonal of P †. This is often called the dense coding hypothesis [12]. It can be readily be shown that the filtering distribution is given by P(Xt|{N[0,t)}) = N(µt, Σt), where the mean and covariance are solutions to the stochastic differential equations (see [13]) dµt = (Aµt + BUt) dt + X m Σt I + P †Σt −1 P † (θm −µt) dN m t , (6a) dΣt = AΣt + ΣtA⊤+ D  dt −ΣtP †Σt I + P †Σt −1 dNt, (6b) where we have defined µt = E[Xt|{N m [0,t]}] and Σt = cov[Xt|{N m [0,t]}]. Note that we have also defined N m [0,t] = {N m s |s ∈[0, t]}, the history of the process N m s up to time t, and Nt = P m N m t . Using Lemma 7.1 from [11] provides a simple connection between the cost function and the solution of the associated Ricatti equation for a stochastic process. We have C(Xt, U t, t) = X⊤ T QT XT + Z T t  X⊤ s QXs + U ⊤ s RUs  ds =X⊤ t StXt + Z T t (Us + R−1B⊤SsXs)⊤R(Us + R−1B⊤SsXs)ds + Z T t Tr(DSs)ds + Z T t dW ⊤ s D⊤/2SsXsds + Z T t X⊤ s SsD1/2dWs. We can average over P(Xt, N t|{N[0,t)}) to obtain the expected future cost. That gives us µ⊤ t Stµt+Tr(ΣtSt)+E "Z T t (Us + R−1B⊤SsXs)⊤R(Us + R−1B⊤SsXs)ds {N[0,t)} # + Z T t Tr(DSs)ds 4 We can evaluate the average over P(Xt, {N m t }|{N m [0,t)}) in two steps, by first averaging over the Gaussian densities P(Xs|{N m [0,s]}) and then over P({N[0,s]}|{N[0,t)}). The average gives E Z T t (Us + R−1B⊤Ssµs)⊤R(Us + R−1B⊤Ssµs) + Tr h SsBR−1B⊤SsΣs({N[0,s]}) i ds {N[0,t)}  , where µs and Σs are the mean and variance associated with the distribution P(Xs|{N[0,s)}). Note that choosing Us = −R−1B⊤Ssµs will minimise the expression above, consistently with CE. The optimal cost-to-go is therefore given by J({N[0,t)}, t) =µ⊤ t Stµt + Tr(ΣtSt) + Z T t Tr (DSs) ds + Z T t Tr SsBR−1B⊤SsE  Σs({N[0,s]})|{N[0,t)}  ds (7) Note that the only term in the cost-to-go function that depends on the parameters of the encoders is the rightmost term and it depends on it only through the average over future paths of the filtering variance Σs. The average of the future covariance matrix is precisely the MMSE for the filtering problem conditioned on the belief state at time t [13]. We can therefore analyse the quality of an encoder for a control task by looking at the values of the term on the right for different encoding parameters. Furthermore, since the dynamics of Σt given by equation (6b) is Markovian, we can write the average E  Σs|{N[0,t)}  as E [Σs|Σt]. We will define then the function f(Σ, t) which gives us the uncertainty-related expected future cost for the control problem as f(Σ, t) = Z T t Tr SsBR−1B⊤SsE [Σs|Σt = Σ]  ds. (8) 2.2 Mutual Information Many results in information theory are formulated in terms of the mutual information of the communication channel Pϕ(Y |X). For example, the maximum cost reduction achievable with R bits of information about an unobserved variable X has been shown to be a function of the rate-distortion function with the cost as the distortion function [14]. More recently there has also been a lot of interest in the so-called I-MMSE relations, which provide connections between the mutual information of a channel and the minimal mean squared error of the Bayes estimator derived from the same channel [15, 16]. The mutual information for the cases we are considering is not particularly complex, as all distributions are Gaussians. Let us denote by Σ0 t the covariance of of the unobserved process Xt conditioned on some initial Gaussian distribution P0 = N(µ0, Σ0) at time 0. We can then consider the Mutual Information between the stimulus at time t, Xt, and the observations up to time t, Y[0,t] or N[0,t]. For the LQG/Kalman case we have simply I(Xt; Y[0,t]|P0) = Z dx dyP(x, y) [log P(x|y) −log P(x)] = log |Σ0 t| −log |Σt|, where Σt is a solution of equation (4). For the Dense Gauss-Poisson code, we can also write I(Xt; Nt|P0) = Z dx dn P(x, n) [log P(x|n) −log P(x)] = log |Σ0 t| −EN[0,t]  log |Σt(N[0,t])|  , where Σt(N[0,t]) is a solution to the stochastic differential equation (6b) for the given value of N[0,t]. 3 Optimal Neural Codes for Estimation and Control What could be the reasons for an optimal code for an estimation problem to be sub-optimal for a control problem? We present examples that show two possible reasons for different optimal coding strategies in estimation and control. First, one should note that control problems are often defined over a finite time horizon. One set of classical experiments involves reaching for a target under time constraints [3]. If we take the maximal firing rate of the neurons (φ) to be constant while varying the width of the tuning functions, this will lead the number of observed spikes to be inversely proportional to the precision of those spikes, forcing a trade-off between the number of observations 5 and their quality. This trade-off can be tilted to either side in the case of control depending on the information available at the start of the problem. If we are given complete information on the system state at the initial time 0, the encoder needs fewer spikes to reliably estimate the system’s state throughout the duration of the control experiment, and the optimal encoder will be tilted towards a lower number of spikes with higher precision. Conversely, if at the beginning of the experiment we have very little information about the system’s state, reflected in a very broad distribution, the encoder will be forced towards lower precision spikes with higher frequency. These results are discussed in section 3.1. Secondly, one should note that the optimal encoder for estimation does not take into account the differential weighting of different dimensions of the system’s state. When considering a multidimensional estimation problem, the optimal encoder will generally allocate all its resources equally between the dimensions of the system’s state. In the framework presented we can think of the dimensions as the singular vectors of the tuning matrix P and the resources allocated to it are the singular values. In this sense, we will consider a set of coding strategies defined by matrices P of constant determinant in section 3.2. This constrains the overall firing rate of the population of neurons to be constant, and we can then consider how the population will best allocate its observations between these dimensions. Clearly, if we have an anisotropic control problem, which places a higher importance in controlling one dimension, the optimal encoder for the control problem will be expected to allocate more resources to that dimension. This is indeed shown to be the case for the Poisson codes considered, as well as for a simple LQG problem when we constrain the noise covariance to have the same structure. We do not mean our analysis to be exhaustive as to the factors leading to different optimal codes in estimation and control settings, as the general problem is intractable, and indeed, is not even separable. We intend this to be a proof of concept showing two cases in which the analogy between control and estimation breaks down. 3.1 The Trade-off Between Precision and Frequency of Observations In this section we consider populations of neurons with tuning functions as given by equation (5) with tuning centers θm distributed along a one- dimensional line. In the case of the OrnsteinUhlenbeck process these will be simply one-dimensional values θm whereas in the case of the stochastic oscillator, we will consider tuning centres of the form θm = (ηm, 0)⊤, filling only the first dimension of the stimulus space. Note that in both cases the (dense) population firing rate ˆλ = P m λm(x) will be given by ˆλ = √ 2πpφ/|∆θ|, where ∆θ is the separation between neighbouring tuning centres θm. The Ornstein-Uhlenbeck (OU) process controlled by a process Ut is given by the SDE dXt = (bUt −γXt)dt + D1/2dWt. Equation (7) can then be solved by simulating the dynamics of Σs. This has been considered extensively in [13] and we refer to the results therein. Specifically, it has been found that the dynamics of the average can be approximated in a mean-field approach yielding surprisingly good results. The evolution of the average posterior variance is given by the average of equation (6b), which involves nonlinear averages over the covariances. These are intractable, but a simple mean-field approach yields the approximate equation for the evolution of the average ⟨Σs⟩= E [Σs|Σ0] d ⟨Σs⟩ ds = A ⟨Σs⟩+ ⟨Σs⟩⊤A⊤+ D −ˆλ ⟨Σs⟩P † ⟨Σs⟩ I + P † ⟨Σs⟩ −1 . The alternative is to simulate the stochastic dynamics of Σt for a large number of samples and compute numerical averages. These results can be directly employed to evaluate the optimal costto-go in the control problem f(Σ, t). Alternatively, we can look at a system with more complex dynamics, and we take as an example the stochastic damped harmonic oscillator given by the system of equations ˙Xt = Vt, dVt = bUt −γVt −ω2Xt  dt + η1/2dWt. (9) Furthermore, we assume that the tuning functions only depend on the position of the oscillator, therefore not giving us any information about the velocity. The controller in turn seeks to keep the 6 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 MMSE 0 1 2 3 4 5 0.000 0.001 0.002 0.003 0.004 0.005 0.006 0.007 f( 0,0) 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 MMSE b) 0.0 0.2 0.4 0.6 0.8 1.0 1.2 p 0.95 1.00 1.05 1.10 1.15 1.20 1.25 1.30 1.35 f( 0,t0) Figure 1: The trade-off between the precision and the frequency of spikes is illustrated for the OU process (a) and the stochastic oscillator (b). In both figures, the initial condition has a very uncertain estimate of the system’s state, biasing the optimal tuning width towards higher values. This forces the encoder to amass the maximum number of observations within the duration of the control experiment. Parameters for figure (a) were: T = 2, γ = 1.0, η = 0.6, b = 0.2, φ = 0.1, ∆θ = 0.05, Q = 0.1, QT = 0.001, R = 0.1. Parameters for figure (b) were T = 5, γ = 0.4, ω = 0.8, η = 0.4, r = 0.4, q = 0.4, QT = 0, φ = 0.5, ∆θ = 0.1. oscillator close to the origin while steering only the velocity. This can be achieved by the choice of matrices A = (0, 1; −ω2, −γ), B = (0, 0; 0, b), D = (0, 0; 0, η2), R = (0, 0; 0, r), Q = (q, 0; 0, 0) and P = (p2, 0; 0, 0). In figure 1 we provide the uncertainty-dependent costs for LQG control, for the Poisson observed control, as well as the MMSE for the Poisson filtering problem and for a Kalman-Bucy filter with the same noise covariance matrix P. This illustrates nicely the difference between Kalman filtering and the Gauss-Poisson filtering considered here. The Kalman filter MSE has a simple, monotonically increasing dependence on the noise covariance, and one should simply strive to design sensors with the highest possible precision (p = 0) to minimise the MMSE and control costs. The Poisson case leads to optimal performance at a non-zero value of p. Importantly the optimal values of p for estimation and control differ. Furthermore, in view of section 2.2, we also plotted the mutual information between the process Xt and the observation process Nt, to illustrate that informationbased arguments would lead to the same optimal encoder as MMSE-based arguments. 3.2 Allocating Observation Resources in Anisotropic Control Problems A second factor that could lead to different optimal encoders in estimation and control is the structure of the cost function C. Specifically, if the cost functions depends more strongly on a certain coordinate of the system’s state, uncertainty in that particular coordinate will have a higher impact on expected future costs than uncertainty in other coordinates. We will here consider two simple linear control systems observed by a population of neurons restricted to a certain firing rate. This can be thought of as a metabolic constraint, since the regeneration of membrane potential necessary for action potential generation is one of the most significant metabolic expenditures for neurons [17]. This will lead to a trade-off, where an increase in precision in one coordinate will result in a decrease in precision in the other coordinate. We consider a population of neurons whose tuning functions cover a two-dimensional space. Taking a two-dimensional isotropic OU system with state Xt = (X1,t, X2,t)⊤where both dimensions are uncoupled, we can consider a population with tuning centres θm = (ηm 1 , ηm 2 )⊤densely covering the stimulus space. To consider a smoother class of stochastic systems we will also consider a two-dimensional stochastic oscillator with state Xt = (X1,t, V1,t, X2,t, V2,t)⊤, where again, both dimensions are uncoupled, and the tuning centres of the form θm = (ηm 1 , 0, ηm 2 , 0)⊤, covering densely the position space, but not the velocity space. Since we are interested in the case of limited resources, we will restrict ourselves to populations with a tuning matrix P yielding a constant population firing rate. We can parametrise these simply as POU(ζ) = p2 Diag(tan(ζ), cotan(ζ)), for the OU case and POsc(ζ) = 7 0.60 0.65 0.70 0.75 0.80 0.85 0.90 MMSE 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 θ 0.255 0.260 0.265 0.270 0.275 0.280 0.285 0.290 0.295 0.300 f(Σ0, t0) estimation kalman filter mean field stochastic LQG control 0.2 0.4 0.6 0.8 1.0 1.2 1.4 MMSE b) 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 ζ 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13 0.14 0.15 f(Σ0, t0) Poisson MMSE Kalman MMSE Mean Field f Stochastic f LQG f Figure 2: The differential allocation of resources in control and estimation for the OU process (left) and the stochastic oscillator (right). Even though the estimation MMSE leads to a symmetric optimal encoder both in the Poisson and in the Kalman filtering problem, the optimal encoders for the control problem are asymmetric, allocating more resources to the first coordinate of the stimulus. p2 Diag(tan(ζ), 0, cotan(ζ), 0) for the stochastic oscillator, where ζ ∈(0, π/2). Note that this will yield the firing rate ˆλ = 2πpφ/(∆θ)2, independent of the specifics of the matrix P. We can then compare the performance of all observers with the same firing rate in both control and estimation tasks. As mentioned, we are interested in control problems where the cost functions are anisotropic, that is, one dimension of the system’s state vector contributes more heavily to the cost function. To study this case we consider cost functions of the type c(Xt, Ut) = Q1X2 1,t + Q2X2 2,t + R1U 2 1,t + R2U 2 2,t. This again, can be readily cast into the formalism introduced above, with a suitable choice of matrices Q and R for both the OU process as for the stochastic oscillator. We will also consider the case where the first dimension of Xt contributes more strongly to the state costs (i.e., Q1 > Q2). The filtering error can be obtained from the formalism developed in [13] in the case of Poisson observations and directly from the Kalman-Bucy equations in the case of Kalman filtering [18]. For LQG control, one can simply solve the control problem for the system mentioned using the standard methods (see e.g. [11]). The Poisson-coded version of the control problem can be solved using either direct simulation of the dynamics of Σs or by a mean-field approach which has been shown to yield excellent results for the system at hand. These results are summarised in figure 2, with similar notation to that in figure 1. Note the extreme example of the stochastic oscillator, where the optimal encoder is concentrating all the resources in one dimension, essentially ignoring the second dimension. 4 Conclusion and Discussion We have here shown that the optimal encoding strategies for a partially observed control problem is not the same as the optimal encoding strategy for the associated state estimation problem. Note that this is a natural consequence of considering noise covariances with a constant determinant in the case of Kalman filtering and LQG control, but it is by no means trivial in the case of Poisson-coded processes. For a class of stochastic processes for which the certainty equivalence principle holds we have provided an exact expression for the optimal cost-to-go and have shown that minimising this cost provides us with an encoder that in fact minimises the incurred cost in the control problem. Optimality arguments are central to many parts of computational neuroscience, but it seems that partial observability and the importance of combining adaptive state estimation and control have rarely been considered in this literature, although supported by recent experiments. We believe the present work, while treating only a small subset of the formalisms used in neuroscience, provides a first insight into the differences between estimation and control. Much emphasis has been placed on tracing the parallels between the two (see [19, 20], for example), but one must not forget to take into account the differences as well. 8 References [1] Jun Izawa and Reza Shadmehr. On-line processing of uncertain information in visuomotor control. The Journal of neuroscience : the official journal of the Society for Neuroscience, 28(44):11360–8, October 2008. [2] Emanuel Todorov and Michael I Jordan. Optimal feedback control as a theory of motor coordination. Nature neuroscience, 5(11):1226–35, November 2002. [3] Peter W Battaglia and Paul R Schrater. Humans trade off viewing time and movement duration to improve visuomotor accuracy in a fast reaching task. The Journal of neuroscience : the official journal of the Society for Neuroscience, 27(26):6984–94, June 2007. [4] Boris Rostislavovich Andrievsky, Aleksei Serafimovich Matveev, and Aleksandr L’vovich Fradkov. Control and estimation under information constraints: Toward a unified theory of control, computation and communications. Automation and Remote Control, 71(4):572–633, 2010. [5] Hans S Witsenhausen. A counterexample in stochastic optimum control. SIAM Journal on Control, 6(1):131–147, 1968. [6] Edison Tse and Yaakov Bar-Shalom. An actively adaptive control for linear systems with random parameters via the dual control approach. Automatic Control, IEEE Transactions on, 18(2):109–117, 1973. [7] Yaakov Bar-Shalom and Edison Tse. Dual Effect, Certainty Equivalence, and Separation in Stochastic Control. IEEE Transactions on Automatic Control, (5), 1974. [8] D. Huber, D. A. Gutnisky, S. Peron, D. H. O’Connor, J. S. Wiegert, L. Tian, T. G. Oertner, L. L. Looger, and K. Svoboda. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature, 484(7395):473–478, Apr 2012. n2123 (unprinted). [9] AA Mattar, Mohammad Darainy, David J Ostry, et al. Motor learning and its sensory effects: time course of perceptual change and its presence with gradual introduction of load. J Neurophysiol, 109(3):782–791, 2013. [10] S. Vahdat, M. Darainy, T.E. Milner, and D.J. Ostry. Functionally specific changes in restingstate sensorimotor networks after motor learning. J Neurosci, 31(47):16907–16915, 2011. [11] Karl J. ˚Astr¨om. Introdution to Stochastic Control Theory. Courier Dover Publications, Mineola, NY, 1st edition, 2006. [12] Steve Yaeli and Ron Meir. Error-based analysis of optimal tuning functions explains phenomena observed in sensory neurons. Frontiers in computational neuroscience, 4(October):16, 2010. [13] Alex Susemihl, Ron Meir, and Manfred Opper. Dynamic state estimation based on Poisson spike trains - towards a theory of optimal encoding. Journal of Statistical Mechanics: Theory and Experiment, 2013(03):P03009, March 2013. [14] Fumio Kanaya and Kenji Nakagawa. On the practical implication of mutual information for statistical decisionmaking. IEEE transactions on information theory, 37(4):1151–1156, 1991. [15] N Merhav. Optimum estimation via gradients of partition functions and information measures: a statistical-mechanical perspective. Information Theory, IEEE Transactions on, 57(6):3887– 3898, 2011. [16] Dongning Guo, Shlomo Shamai, and Sergio Verd´u. Mutual information and minimum meansquare error in gaussian channels. Information Theory, IEEE Transactions on, 51(4):1261– 1282, 2005. [17] David Attwell and Simon B Laughlin. An energy budget for signaling in the grey matter of the brain. Journal of Cerebral Blood Flow & Metabolism, 21(10):1133–1145, 2001. [18] R. S. Bucy. Nonlinear filtering theory. Automatic Control, IEEE Transactions, 10(2):198, 1965. [19] Rudolph Emil Kalman. A new approach to linear filtering and prediction problems. Journal of basic Engineering, 82(1):35–45, 1960. [20] Emanuel Todorov. General duality between optimal control and estimation. 2008 47th IEEE Conference on Decision and Control, (5):4286–4292, 2008. 9
2014
242
5,339
New Rules for Domain Independent Lifted MAP Inference Happy Mittal, Prasoon Goyal Dept. of Comp. Sci. & Engg. I.I.T. Delhi, Hauz Khas New Delhi, 110016, India happy.mittal@cse.iitd.ac.in prasoongoyal13@gmail.com Vibhav Gogate Dept. of Comp. Sci. Univ. of Texas Dallas Richardson, TX 75080, USA vgogate@hlt.utdallas.edu Parag Singla Dept. of Comp. Sci. & Engg. I.I.T. Delhi, Hauz Khas New Delhi, 110016, India parags@cse.iitd.ac.in Abstract Lifted inference algorithms for probabilistic first-order logic frameworks such as Markov logic networks (MLNs) have received significant attention in recent years. These algorithms use so called lifting rules to identify symmetries in the first-order representation and reduce the inference problem over a large probabilistic model to an inference problem over a much smaller model. In this paper, we present two new lifting rules, which enable fast MAP inference in a large class of MLNs. Our first rule uses the concept of single occurrence equivalence class of logical variables, which we define in the paper. The rule states that the MAP assignment over an MLN can be recovered from a much smaller MLN, in which each logical variable in each single occurrence equivalence class is replaced by a constant (i.e., an object in the domain of the variable). Our second rule states that we can safely remove a subset of formulas from the MLN if all equivalence classes of variables in the remaining MLN are single occurrence and all formulas in the subset are tautology (i.e., evaluate to true) at extremes (i.e., assignments with identical truth value for groundings of a predicate). We prove that our two new rules are sound and demonstrate via a detailed experimental evaluation that our approach is superior in terms of scalability and MAP solution quality to the state of the art approaches. 1 Introduction Markov logic [4] uses weighted first order formulas to compactly encode uncertainty in large, relational domains such as those occurring in natural language understanding and computer vision. At a high level, a Markov logic network (MLN) can be seen as a template for generating ground Markov networks. Therefore, a natural way to answer inference queries over MLNs is to construct a ground Markov network and then use standard inference techniques (e.g., Loopy Belief Propagation) for Markov networks. Unfortunately, this approach is not practical because the ground Markov networks can be quite large, having millions of random variables and features. Lifted inference approaches [17] avoid grounding the whole Markov logic theory by exploiting symmetries in the first-order representation. Existing lifted inference algorithms can be roughly divided into two types: algorithms that lift exact solvers [2, 3, 6, 17], and algorithms that lift approximate inference techniques such as belief propagation [12, 20] and sampling based methods [7, 21]. Another line of work [1, 5, 9, 15] attempts to characterize the complexity of lifted inference independent of the specific solver being used. Despite the presence of large literature on lifting, there has been limited focus on exploiting the specific structure of the MAP problem. Some recent work [14, 16] has looked at exploiting symmetries in the context of LP formulations for MAP inference. Sarkhel et. al [19] show that the MAP problem can be propositionalized in the limited setting of non-shared MLNs. But largely, the question is still open as to whether there can be a greater exploitation of the structure for lifting MAP inference. 1 In this paper, we propose two new rules for lifted inference specifically tailored for MAP queries. We identify equivalence classes of variables which are single occurrence i.e., they have at most a single variable from the class appearing in any given formula. Our first rule for lifting states that MAP inference over the original theory can be equivalently formulated over a reduced theory where every single occurrence class has been reduced to a unary sized domain. This leads to a general framework for transforming the original theory into a (MAP) equivalent reduced theory. Any existing (propositional or lifted) MAP solver can be applied over this reduced theory. When every equivalence class is single occurrence, our approach is domain independent, i.e., the complexity of MAP inference does not depend on the number of constants in the domain. Existing lifting constructs such as the decomposer [6] and the non-shared MLNs [19] are special cases of our single occurrence rule. When the MLN theory is single occurrence, one of the MAP solutions lies at extreme, namely all groundings of any given predicate have identical values (true/false) in the MAP assignment. Our second rule for lifting states that formulas which become tautology (i.e., evaluate to true) at extreme assignments can be ignored for the purpose of MAP inference when the remaining theory is single occurrence. Many difficult to lift formulas such as symmetry and transitivity are easy to handle in our framework because of this rule. Experiments on three benchmark MLNs clearly demonstrate that our approach is more accurate and scalable than the state of the art approaches for MAP inference. 2 Background A first order logic [18] theory is constructed using the constant, variable, function and predicate symbols. Predicates are defined over terms as arguments where each term is either a constant, or a variable or a function applied to a term. A formula is constructed by combining predicates using operators such as ¬, ∧and ∨. Variables in a first-order theory are often referred to as Logical Variables. Variables in a formula can be universally or existentially quantified. A Knowledge Base (KB) is a set of formulas. A theory is in Conjunctive Normal Form (CNF) if it is expressed as a conjunction of disjunctive formulas. The process of (partial) grounding corresponds to replacing (some) all of the free variables in a predicate or a formula with constants in the theory. In this paper, we assume function-free first order logic theory with Herbrand interpretations [18], and that variables in the theory are implicitly universally quantified. Markov Logic [4] is defined as a set of pairs (fi, wi), where fi is a formula in first-order logic and wi is its weight. The weight wi signifies the strength of the constraint represented by the formula fi. Given a set of constants, an MLN can be seen as a template for constructing ground Markov networks. There is a node in the network for every ground atom and a feature for every ground formula. The probability distribution specified by an MLN is: P(X = x) = 1 Z exp  X i:fi∈F wini(x)   (1) where X = x specifies an assignment to the ground atoms, the sum in the exponent is taken over the indices of the first order formulas (denoted by F) in the theory, wi is the weight of the ith formula, ni(x) denotes the number of true groundings of the ith formula under the assignment x, and Z is the normalization constant. A formula f in MLN with weight w can be equivalently replaced by negation of the formula i.e., ¬f with weight −w. Hence, without loss of generality, we will assume that all the formulas in our MLN theory have non-negative weights. Also for convenience, we will assume that each formula is either a conjunction or a disjunction of literals. The MAP inference task is defined as the task of finding an assignment (there could be multiple such assignments) having the maximum probability. Since Z is a constant and exp is a monotonically increasing function, the MAP problem for MLNs can be written as: arg max x P(X = x) = arg max x X i:fi∈F wini(x) (2) One of the ways to find the MAP solution in MLNs is to ground the whole theory and then reformulate the problem as a MaxSAT problem [4]. Given a set of weighted clauses (constraints), the goal in MaxSAT is to find an assignment which maximizes the sum of the weights of the satisfied clauses. Any standard solver such as MaxWalkSAT [10] can be used over the ground theory to find the MAP solution. This can be wasteful when there is rich structure present in the network and lifted inference techniques can exploit this structure [11]. In this paper, we assume an MLN theory for the ease of 2 exposition. But our ideas are easily generalizable to other similar representations such as weighted parfactors [2], probabilistic knowledge bases [6] and WFOMC [5]. 3 Basic Framework 3.1 Motivation Most existing work on lifted MAP inference adapts the techniques for lifting marginal inference. One of the key ideas used in lifting is to exploit the presence of a decomposer [2, 6, 9]. A decomposer splits the theory into identical but independent sub-theories and therefore only one of them needs to be solved. A counting argument can be used when a decomposer is not present [2, 6, 9]. For theories containing upto two logical variables in each clause, there exists a polynomial time lifted inference procedure [5]. Specifically exploiting the structure of MAP inference, Sarkhel et. al [19] show that MAP inference in non-shared MLNs (with no self joins) can be reduced to a propositional problem. Despite all these lifting techniques, there is a larger class of MLN formulas where it is still not clear whether there exists an efficient lifting algorithm for MAP inference. For instance, consider the single rule MLN theory: w1 Parent(X, Y ) ∧Friend(Y, Z) ⇒Knows(X, Z) This rule is hard to lift for any of the existing algorithms since neither the decomposer nor the counting argument is directly applicable. The counting argument can be applied after (partially) grounding X and as a result lifted inference on this theory will be more efficient than ground inference. However, consider adding transitivity to the above theory: w2 Friend(X, Y ) ∧Friend(Y, Z) ⇒Friend(X, Z) This makes the problem even harder because in order to process the new MLN formula via lifted inference, one has to at least ground both the arguments of Friend. In this work, we exploit specific properties of MAP inference and develop two new lifting rules, which are able to lift the above theory. In fact, as we will show, MAP inference for MLN containing (exactly) the two formulas given above is domain independent, namely, it does not depend on the domain size of the variables. 3.2 Notation and Preliminaries We will use the upper case letters X, Y, Z etc. to denote the variables. We will use the lower case letters a, b, c etc. to denote the constants. Let ∆X denote the domain of a variable X. We will assume that the variables in the MLN are standardized apart, namely, no two formulas contain the same variable symbol. Further, we will assume that the input MLN is in normal form [9]. An MLN is said to be in normal form if a) If X and Y are two variables appearing at the same argument position in a predicate P in the MLN theory, then ∆X = ∆Y . b) There are no constants in any formula. Any given MLN can be converted into the normal form by a series of mechanical operations in time that is polynomial in the size of the MLN theory and the evidence. We will require normal forms for simplicity of exposition. For lack of space, proofs of all the theorems and lemmas marked by (*) are presented in the extended version of the paper (see the supplementary material). Following Jha et. al [9] and Broeck [5], we define a symmetric and transitive relation over the variables in the theory as follows. X and Y are related if either a) they appear in the same position of a predicate P, or b) ∃a variable Z such that X, Z and Y, Z are related. We refer to the relation above as binding relation [5]. Being symmetric and transitive, binding relation splits the variables into a set of equivalence classes. We say that X and Y bind to each other if they belong to the same equivalence class under the binding relation. We denote this by writing X ∼Y . We will use the notation ¯X to refer to the equivalence class to which variable X belongs. As an example, the MLN theory consisting of two rules: 1) P(X) ∨Q(X, Y ) 2) P(Z) ∨Q(U, V ) has two variable equivalence classes given by {X, Z, U} and {Y, V }. Broeck [5] introduce the notion of domain lifted inference. An inference procedure is domain lifted if it is polynomial in the size of the variable domains. Note that the notion of domain lifted does not impose any condition on how the complexity depends on the size of the MLN theory. On the similar lines, we introduce the notion of domain independent inference. Definition 3.1. An inference procedure is domain independent if its time complexity is independent of the domain size of the variables. As in the case of domain lifted inference, the complexity can still depend arbitrarily on the size of the MLN theory. 3 4 Exploiting Single Occurrence We show that the domains of equivalence classes satisfying certain desired properties can be reduced to unary sized domains for the MAP inference task. This forms the basis of our first inference rule. Definition 4.1. Given an MLN theory M, a variable equivalence class ¯X is said to be single occurrence with respect to M if for any two variables X, Y ∈¯X, X and Y do not appear together in any formula in the MLN. In other words, every formula in the MLN has at most a single occurrence of variables from ¯X. A predicate is said to be single occurrence if each of the equivalence classes of its argument variables is single occurrence. An MLN is said to be single occurrence if each of its variable equivalence classes is single occurrence. Consider the MLN theory with two formulas as earlier: 1) P(X) ∨Q(X, Y ) 2) P(Z) ∨Q(U, V ). Here, {Y, V } is a single occurrence equivalence class while {X, Z, U} is not. Next, we show that the MAP tuple of an MLN can be recovered from a much smaller MLN in which the domain size of each variable in each single occurrence equivalence class is reduced to one. 4.1 First Rule for Lifting MAP Theorem 4.1. Let M be an MLN theory represented by the set of pairs {(fi, wi)}m i=1. Let ¯X be a single occurrence equivalence class with domain ∆¯ X. Then, MAP inference problem in M can be reduced to the MAP inference problem over a simpler MLN M r ¯ X represented by a set of pairs {(fi, w′ i)}m i=1 where the domain of ¯X has been reduced to a single constant. Proof. We will prove the above theorem by constructing the desired theory M r ¯ X. Note that M r ¯ X has the same set of formulas as M with a set of modified weights. Let F ¯ X be the set of formulas in M which contain a variable from the equivalence class ¯X. Let F−¯ X be the set of formulas in M which do not contain a variable from the equivalence class ¯X. Let {a1, a2, . . . , ar} be the domain of ¯X. We will split the theory M into r equivalent theories {M1, M2, . . . , Mr} such that for each Mj: 1 1. For every formula fi ∈F ¯ X with weight wi, Mj contains fi with weight wi. 2. For every formula fi ∈F−¯ X with weight wi, Mj contains fi with weight wi/r. 3. Domain of ¯X in Mj is reduced to a single constant {aj}. 4. All other equivalence classes have domains identical to that in M. This divides the set of weighted constraints in M across the r sub-theories. Formally: Lemma 4.1.* The set of weighted constraints in M is a union of the set of weighted constraints in the sub-theories {Mj}r j=1. Corollary 4.1. Let x be an assignment to the ground atoms in M. Let the function WM(x) denote the weight of satisfied ground formulas in M under the assignment x in theory M. Further, let xj denote the assignment x restricted to the ground atoms in theory Mj. Then: WM(x) = Pr j=1 WMj(xj). It is easy to see that Mj’s are identical to each other upto the renaming of the constants aj’s. Hence, exploiting symmetry, there is a one to one correspondence between the assignments across the sub-theories. In particular, there is one to one correspondence between MAP assignments across the sub-theories {Mj}r j=1. Lemma 4.2. If xMAP j is a MAP assignment to the theory Mj, then there exists a MAP assignment xMAP l to Ml such that xMAP l is identical to xMAP j with the difference that occurrence of constant aj (in ground atoms of Mj) is replaced by constant al (in ground atoms of Ml). Proof of this lemma follows from the construction of the sub-theories M1, M2, . . . Mr. Next, we will show that MAP solution for the theory M can be read off from the MAP solution for any of theories {Mj}r j=1. Without loss of generality, let us consider the theory M1. Let xMAP 1 be some MAP assignment for M1. Using lemma 4.2 there are MAP assignments xMAP 2 , xMAP 3 , . . . , xMAP r for M2, M3, . . . Mr which are identical to xMAP 1 upto renaming of the constant a1. We construct an assignment xMAP for the original theory M as follows. 1Supplement presents an example of splitting an MLN theory based on the following procedure. 4 1. For each predicate P which does not contain any occurrence of the variables from the equivalence class ¯X, read off the assignment to its groundings in xMAP from xMAP 1 . Note that assignments of groundings of P are identical in each of xMAP j because of Lemma 4.2. 2. The (partial) groundings of each predicate P whose arguments contain a variable X ∈¯X are split across the sub-theories {Mj}1≤j≤r corresponding to the substitutions {X = aj}1≤j≤r, respectively. We assign the groundings of P in xMAP the values from the assignments xMAP 1 , xMAP 2 , . . . xMAP r for the respective partial groundings. Because of Lemma 4.2, these partial groundings have identical values across the sub-theories upto renaming of the constant aj and hence, can be read off from either of the sub-theory assignments, and more specifically, xMAP 1 . By construction, assignment xMAP restricted to the ground atoms in sub-theory Mj corresponds to the assignment xMAP j for each j, 1 ≤j ≤r. The only thing remaining to show is that xMAP is indeed a MAP assignment for M. Suppose it is not, then there is another assignment xalt such that WM(xalt) > WM(xMAP). Using Corollary 4.1, WM(xalt) > WM(xMAP) ⇒Pr j=1 WMj(xalt j ) > Pr j=1 WMj(xMAP j ). This means that ∃j, such that WMj(xalt j ) > WMj(xMAP j ). But this would imply that xMAP j is not a MAP assignment for Mj which is a contradiction. Hence, xMAP is indeed a MAP assignment for M. Definition 4.2. Application of Theorem 4.1 to transform the MAP problem over an MLN theory M into the MAP over a reduced theory M r ¯ X is referred to as Single Occurrence Rule for lifted MAP. Decomposer [6] is a very powerful construct for lifted inference. The next theorem states that a decomposer is a single occurrence equivalence class (and therefore, the single occurrence rule includes the decomposer rule as a special case). Theorem 4.2.* Let M be an MLN theory and let ¯X be an equivalence class of variables. If ¯X is a decomposer for M, then ¯X is single occurrence in M. 4.2 Domain Independent Lifted MAP A simple procedure for lifted MAP inference which utilizes the property of MLN reduction for single occurrence equivalence classes is given in Algorithm 1. Here, the MLN theory is successively reduced with respect to each of the single occurrence equivalence classes. Algorithm 1 Reducing all the single occurrence equivalence classes in an MLN reduce(MLN M) M r ←M for all Equivalence-Class ¯ X do if (isSingleOccurrence( ¯ X)) then M r ←reduceEQ(M r, ¯ X) end if end for return M r reduceEQ(MLN M, class ¯ X) M r ¯ X ←{}; size ←|∆¯ X|; ∆¯ X ←{a ¯ X 1 } for all Formulas fi ∈F ¯ X do Add (fi, wi) to M r ¯ X end for for all Formulas fi ∈F−¯ X do Add (fi, wi/size) to M r ¯ X end for; return M r ¯ X Theorem 4.3.* MAP inference in a single occurrence MLN is domain independent. If an MLN theory contains a combination of both single occurrence and non-single occurrence equivalence classes, we can first reduce all the single occurrence classes to unary domains using Algorithm 1. Any existing (lifted or propositional) solver can be applied on this reduced theory to obtain the MAP solution. Revisiting the single rule example from Section 3.1: Parent(X, Y ) ∧ Friend(Y, Z) ⇒Knows(X, Z), we have 3 equivalence classes {X}, {Y }, and {Z}, all of which are single occurrence. Hence, MAP inference for this MLN theory is domain independent. 5 Exploiting Extremes Even when a theory does not contain single occurrence variables, we can reduce it effectively if a) there is a subset of formulas all of whose groundings are satisfied at extremes i.e. the assignments with identical truth value for all the groundings of a predicate, and b) the remaining theory with these formulas removed is single occurrence. This is the key idea behind our second rule for lifted MAP. We will first formalize the notion of an extreme assignment followed by the description of our second lifting rule. 5 5.1 Extreme Assignments Definition 5.1. Let M be an MLN theory. Given an assignment x to the ground atoms in M, we say that predicate P is at extreme in x if all the groundings of P take the same value (either true or false) in x. We say that x is at extreme if all the predicates in M are at extreme in x. Theorem 5.1.* Given an MLN theory M, let PS be the set of predicates which are single occurrence in M. Then there is a MAP assignment xMAP such that ∀P ∈PS, P is at extreme in xMAP. Corollary 5.1. A single occurrence MLN admits a MAP solution which is at extreme. Sarkhel et. al [19] show that non-shared MLNs (with no self-joins) have a MAP solution at the extreme. This turns out to be a special case of single occurrence MLNs. Theorem 5.2.* If an MLN theory is non-shared and has no-self joins, then M is single occurrence. 5.2 Second Rule for Lifting MAP Consider the MLN theory with a single formula as in Section 3.1: w1 Parent(X, Y ) ∧ Friend(Y, Z) ⇒Knows(X, Z). This is a single occurrence MLN and hence by Corollary 5.1, MAP solution lies at extreme. Consider adding the transitivity constraint to the theory: w2 Friend(X, Y ) ∧Friend(Y, Z) ⇒Friend(X, Z). All the groundings of the second formula are satisfied at any extreme assignment of the Friends predicate groundings. Since, the MAP solution to the original theory with single formula is at extreme, it satisfies all the groundings of the second formula. Hence, it is a MAP for the new theory as well. We introduce the notion of tautology at extremes: Definition 5.2. An MLN formula f is said to be a tautology at extremes if all of its groundings are satisfied at any of the extreme assignments of its predicates. If an MLN theory becomes single occurrence after removing all the tautologies at extremes in it, then MAP inference in such a theory is domain independent. Theorem 5.3.* Let M be an MLN theory with the set of formulas denoted by F. Let Fte denote a set of formulas in M which are tautologies at extremes. Let M ′ be a new theory with formulas F −Fte and formula weights as in M. Let the variable domains in M ′ be same as in M. If M ′ is single occurrence then the MAP inference for the original theory M can be reduced to the MAP inference problem over the new theory M ′. Corollary 5.2. Let M be an MLN theory. Let M ′ be a single occurrence theory (with variable domains identical to M) obtained after removing a subset of formulas in M which are tautologies at extremes. Then, MAP inference in M is domain independent. Definition 5.3. Application of Theorem 5.3 to transform the MAP problem over an MLN theory M into the MAP problem over the remaining theory M ′ after removing (a subset of) tautologies at extremes is referred to as Tautology at Extremes Rule for lifted MAP. Clearly, Corollary 5.2 applies to the two rule MLN theory considered above (and in the Section 3.1) and hence, MAP inference for the theory is domain independent. A necessary and sufficient condition for a clausal formula to be a tautology at extremes is to have both positive and negative occurrences of the same predicate symbol. Many difficult to lift but important formulas such as symmetry and transitivity are tautologies at extremes and hence, can be handled by our approach. 5.3 A Procedure for Identifying Tautologies In general, we only need the equivalence classes of variables appearing in Fte to be single occurrence in the remaining theory for Theorem 5.3 to hold. 2 Algorithm 2 describes a procedure to identify the largest set of tautologies at extremes such that all the variables in them are single occurrence with respect to the remainder of the theory. The algorithm first identifies all the tautologies at extremes. It then successively removes those from the set all of whose variables are not single occurrence in the remainder of the theory. The process stops when all the tautologies have only single occurrence variables appearing in them. We can then apply the procedure in Section 4 to find the MAP solution for the remainder of the theory. This is also the MAP for the whole theory by Theorem 5.3. 2Theorem 5.3g in the supplement gives a more general version of Theorem 5.3. 6 Algorithm 2 Finding Tautologies at Extremes with Single Occurrence Variables getSingleOccurTautology(MLN M) Fte ←getAllTautologyAtExtremes(M); F ′ = F −Fte; fixpoint=False; while (fixpoint==False) do EQVars ←getSingleOccurVars(F ′) fixpoint=True for all formulas f ∈Fte do if (!(Vars(f) ⊆EQVars)) then F ′ ←F ′ ∪{f}; fixpoint = False end if end for end while; return F −F ′ getAllTautologyAtExtremes(MLN M) //Iterate over all the formulas in M and return the //subset of formulas which are tautologies at extremes //Pseudocode omitted due to lack of space isTautologyAtExtreme(Formula f) f ′ = Clone(f) PU ←set of unique predicates in f ′ for all P ∈PU do ReplaceByNewPropositionalPred(P,f ′) end for // f ′ is a propositional formula at this point return isTautology(f ′) 6 Experiments We compared the performance of our algorithm against Sarkhel et. al [19]’s non shared MLN approach and the purely grounded version on three benchmark MLNs. For both the lifted approaches, we used them as pre-processing algorithms to reduce the MLN domains. We applied the ILP based solver Gurobi [8] as the base solver on the reduced theory to find the MAP assignment. In principle, any MAP solver could be used as the base solver 3. For the ground version, we directly applied Gurobi on the grounded theory. We will refer to the grounded version as GRB. We will refer to our and Sarkhel et. al [19]’s approaches as SOLGRB (Single Occurrence Lifted GRB) and NSLGRB (Non-shared Lifted GRB), respectively. 6.1 Datasets and Methodology We used the following benchmark MLNs for our experiments. (Results on the Student network [19] are presented in the supplement.): 1) Information Extraction (IE): This theory is available from the Alchemy [13] website. We preprocessed the theory using the pure literal elimination rule described by Sarkhel et. al [19]. Resulting MLN had 7 formulas, 5 predicates and 4 variable equivalence classes. 2) Friends & Smokers (FS): This is a standard MLN used earlier in the literature [20]. The MLN has 2 formulas, 3 predicates and 1 variable equivalence class. We also introduced singletons for each predicate. For each algorithm, we report: 1) Time: Time to reach the optimal as the domain size is varied from 25 to 1000. 4,5 2) Cost: Cost of the unsatisfied clauses as the running time is varied for a fixed domain size (500). 3) Theory Size: Ground theory size as the domain size is varied. All the experiments were run on an Intel four core i3 processor with 4 GB of RAM. 6.2 Results Figures 1a-1c plot the results for the IE domain. Figure 1a shows the time taken to reach the optimal. 6 This theory has a mix of single occurrence and non-single occurrence variables. Hence, every algorithm needs to ground some or all of the variables. SOLGRB only grounds the variables whose domain size was kept constant. Hence, varying domain size has no effect on SOLGRB and it reaches optimal instantaneously for all the domain sizes. NSLGRB partially grounds this theory and its time to optimal gradually increases with increasing domain size. GRB performs significantly worse due to grounding of the whole theory. Figure 1b (log scale) plots the total cost of unsatisfied formulae with varying time at domain size of 500. SOLGRB reaches optimal right in the beginning because of a very small ground theory. NSLGRB takes about 15 seconds. GRB runs out of memory. Figure 1c (log scale) shows the size of the ground theory with varying domain size. As expected, SOLGRB stays constant whereas the 3Using MaxWalkSAT [10] as the base solver resulted in sub-optimal results. 4For IE, two of the variable domains of were varied and other two were kept constant at 10 as done in [19]. 5Reported results are averaged over 5 runs. 6 NSLGRB and GRB ran out of memory at domain sizes 800 and 100, respectively. 7 ground theory size increases polynomially for both NSLGRB and GRB with differing degrees (due to the different number of variables grounded). Figure 2 shows the results for FS. This theory is not single occurrence but the tautology at extremes rule applies and our theory does not need to ground any variable. NSLGRB is identical to the grounded version in this case. Results are qualitatively similar to IE domain. Time taken to reach the optimal is much higher in FS for NSLGRB and GRB for larger domain sizes. These results clearly demonstrate the scalability as well as the superior performance of our approach compared to the existing algorithms. 0 50 100 150 200 250 0 200 400 600 800 1000 Time in seconds Domain size GRB NSLGRB SOLGRB (a) Time Taken Vs Domain Size 10000 100000 1e+06 1e+07 1e+08 0 10 20 30 40 50 60 70 80 90 100 Cost of unsat. formulas Time in seconds NSLGRB SOLGRB (b) Cost at Domain Size 500 1 100 10000 1e+06 1e+08 1e+10 0 50 100 150 200 250 300 350 400 450 500 Ground theory size Domain size GRB NSLGRB SOLGRB (c) # of Gndings Vs Domain Size Figure 1: IE 0 50 100 150 200 250 0 200 400 600 800 1000 Time in seconds Domain size GRB NSLGRB SOLGRB (a) Time Taken Vs Domain Size 100 1000 10000 100000 1e+06 0 10 20 30 40 50 60 70 80 90 100 Cost of unsat. formulas Time in seconds GRB NSLGRB SOLGRB (b) Cost at Domain Size 500 1 100 10000 1e+06 1e+08 1e+10 0 50 100 150 200 250 300 350 400 450 500 Ground theory size Domain size GRB NSLGRB SOLGRB (c) # of Gndings Vs Domain Size Figure 2: Friends & Smokers 7 Conclusion and Future Work We have presented two new rules for lifting MAP inference which are applicable to a wide variety of MLN theories and result in highly scalable solutions. The MAP inference problem becomes domain independent when every equivalence class is single occurrence. In the current framework, our rules have been used as a pre-processing step generating a reduced theory over which any existing MAP solver can be applied. This leaves open the question of effectively combining our rules with existing lifting rules in the literature. Consider the theory with two rules: S(X) ∨R(X) and S(Y ) ∨R(Z) ∨T(U). Here, the equivalence class {X, Y, Z} is not single occurrence, and our algorithm will only be able to reduce the domain of equivalence class {U}. But if we apply Binomial rule [9] on S, we get a new theory where {X, Z} becomes a single occurrence equivalence class and we can resort to domain independent inference. 7 Therefore, application of Binomial rule before single occurrence would lead to larger savings. In general, there could be arbitrary orderings for applying lifted inference rules leading to different inference complexities. Exploring the properties of these orderings and coming up with an optimal one (or heuristics for the same) is a direction for future work. 8 Acknowledgements Happy Mittal was supported by TCS Research Scholar Program. Vibhav Gogate was partially supported by the DARPA Probabilistic Programming for Advanced Machine Learning Program under AFRL prime contract number FA8750-14-C-0005. We are grateful to Somdeb Sarkhel and Deepak Venugopal for sharing their code and also for helpful discussions. 7A decomposer does not apply even after conditioning on S. 8 References [1] H. Bui, T. Huynh, and S. Riedel. Automorphism groups of graphical models and lifted variational inference. In Proc. of UAI-13, pages 132–141, 2013. [2] R. de Salvo Braz, E. Amir, and D. Roth. Lifted first-order probabilistic inference. In Proc. of IJCAI-05, pages 1319–1325, 2005. [3] R. de Salvo Braz, E. Amir, and D. Roth. MPE and partial inversion in lifted probabilistic variable elimination. In Proc. of AAAI-06, pages 1123–1130, 2006. [4] Pedro Domingos and Daniel Lowd. Markov Logic: An Interface Layer for Artificial Intelligence. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2009. [5] G. Van den Broeck. On the completeness of first-order knowledge compilation for lifted probabilistic inference. In Proc. of NIPS-11, pages 1386–1394, 2011. [6] V. Gogate and P. Domingos. Probabilisitic theorem proving. In Proc. of UAI-11, pages 256–265, 2011. [7] V. Gogate, A. Jha, and D. Venugopal. Advances in lifted importance sampling. In Proc. of AAAI-12, pages 1910–1916, 2012. [8] Gurobi Optimization Inc. Gurobi Optimizer Reference Manual, 2013. http://gurobi.com. [9] Abhay Kumar Jha, Vibhav Gogate, Alexandra Meliou, and Dan Suciu. Lifted inference seen from the other side : The tractable features. In Proc. of NIPS-10, pages 973–981, 2010. [10] H. Kautz, B. Selman, and M. Shah. ReferralWeb: Combining social networks and collaborative filtering. Communications of the ACM, 40(3):63–66, 1997. [11] K. Kersting. Lifted probabilistic inference. In Proceedings of the Twentieth European Conference on Artificial Intelligence, pages 33–38, 2012. [12] K. Kersting, B. Ahmadi, and S. Natarajan. Counting belief propagation. In Proc. of UAI-09, pages 277–284, 2009. [13] S. Kok, M. Sumner, M. Richardson, P. Singla, H. Poon, D. Lowd, J. Wang, and P. Domingos. The Alchemy system for statistical relational AI. Technical report, University of Washington, 2008. http://alchemy.cs.washington.edu. [14] K. Kersting M. Mladenov and A. Globerson. Efficient lifting of map lp relaxations using k-locality. In Proc. of AISTATS-14, pages 623–632, 2014. [15] Mathias Niepert and Guy Van den Broeck. Tractability through exchangeability: A new perspective on efficient probabilistic inference. In Proc. of AAAI-14, pages 2467–2475, 2014. [16] J. Noessner, M. Niepert, and H. Stuckenschmidt. RockIt: Exploiting parallelism and symmetry for MAP inference in statistical relational models. In Proc. of AAAI-13, pages 739–745, 2013. [17] D. Poole. First-order probabilistic inference. In Proc. of IJCAI-03, pages 985–991, 2003. [18] Stuart J. Russell and Peter Norvig. Artificial Intelligence - A Modern Approach (3rd edition). Pearson Education, 2010. [19] S. Sarkhel, D. Venugopal, P. Singla, and V. Gogate. Lifted MAP inference for Markov logic networks. In Proc. of AISTATS-14, pages 895–903, 2014. [20] P. Singla and P. Domingos. Lifted first-order belief propagation. In Proc. of AAAI-08, pages 1094–1099, 2008. [21] D. Venugopal and V. Gogate. On lifting the Gibbs sampling algorithm. In Proc. of NIPS-12, pages 1664–1672, 2012. 9
2014
243
5,340
Sparse Multi-Task Reinforcement Learning Daniele Calandriello ∗ Alessandro Lazaric∗ Team SequeL INRIA Lille – Nord Europe, France Marcello Restelli† DEIB Politecnico di Milano, Italy Abstract In multi-task reinforcement learning (MTRL), the objective is to simultaneously learn multiple tasks and exploit their similarity to improve the performance w.r.t. single-task learning. In this paper we investigate the case when all the tasks can be accurately represented in a linear approximation space using the same small subset of the original (large) set of features. This is equivalent to assuming that the weight vectors of the task value functions are jointly sparse, i.e., the set of their non-zero components is small and it is shared across tasks. Building on existing results in multi-task regression, we develop two multi-task extensions of the fitted Q-iteration algorithm. While the first algorithm assumes that the tasks are jointly sparse in the given representation, the second one learns a transformation of the features in the attempt of finding a more sparse representation. For both algorithms we provide a sample complexity analysis and numerical simulations. 1 Introduction Reinforcement learning (RL) and approximate dynamic programming (ADP) [24, 2] are effective approaches to solve the problem of decision-making under uncertainty. Nonetheless, they may fail in domains where a relatively small amount of samples can be collected (e.g., in robotics where samples are expensive or in applications where human interaction is required, such as in automated rehabilitation). Fortunately, the lack of samples can be compensated by leveraging on the presence of multiple related tasks (e.g., different users). In this scenario, usually referred to as multi-task reinforcement learning (MTRL), the objective is to simultaneously solve multiple tasks and exploit their similarity to improve the performance w.r.t. single-task learning (we refer to [26] and [15] for a comprehensive review of the more general setting of transfer RL). In this setting, many approaches have been proposed, which mostly differ for the notion of similarity leveraged in the multi-task learning process. In [28] the transition and reward kernels of all the tasks are assumed to be generated from a common distribution and samples from different tasks are used to estimate the generative distribution and, thus, improving the inference on each task. A similar model, but for value functions, is proposed in [16], where the parameters of all the different value functions are assumed to be drawn from a common distribution. In [23] different shaping function approaches for Q-table initialization are considered and empirically evaluated, while a model-based approach that estimates statistical information on the distribution of the Q-values is proposed in [25]. Similarity at the level of the MDPs is also exploited in [17], where samples are transferred from source to target tasks. Multi-task reinforcement learning approaches have been also applied in partially observable environments [18]. In this paper we investigate the case when all the tasks can be accurately represented in a linear approximation space using the same small subset of the original (large) set of features. This is equivalent to assuming that the weight vectors of the task value functions are jointly sparse, i.e., the set of their non-zero components is small and it is shared across tasks. Let us illustrate the concept of shared sparsity using the blackjack card game. The player can rely on a very large number of features such as: value and color of the cards in the player’s hand, value and color of the cards on ∗{daniele.calandriello,alessandro.lazaric}@inria.fr †{marcello.restelli}@polimi.it 1 the table and/or already discarded, different scoring functions for the player’s hand (e.g., sum of the values of the cards) and so on. The more the features, the more likely it is that the corresponding feature space could accurately represent the optimal value function. Nonetheless, depending on the rules of the game (i.e., the reward and dynamics), a very limited subset of features actually contribute to the value of a state and we expect the optimal value function to display a high level of sparsity. Furthermore, if we consider multiple tasks differing for the behavior of the dealer (e.g., the value at which she stays) or slightly different rule sets, we may expect such sparsity to be shared across tasks. For instance, if the game uses an infinite number of decks, features based on the history of the cards played in previous hands have no impact on the optimal policy for any task and the corresponding value functions are all jointly sparse in this representation. Building on this intuition, in this paper we first introduce the notion of sparse MDPs in Section 3. Then we rely on existing results in multi-task regression [19, 1] to develop two multi-task extensions of the fitted Q-iteration algorithm (Sections 4 and Section 5) and we study their theoretical and empirical performance (Section 6). An extended description of the results, as well as the full proofs of the statements, are reported in [5]. 2 Preliminaries Multi-Task Reinforcement Learning (MTRL). A Markov decision process (MDP) is a tuple M = (X, A, R, P, γ), where the state space X is a bounded subset of the Euclidean space, the action space A is finite (i.e., |A| < ∞), R : X × A →[0, 1] is the reward of a state-action pair, P : X × A →P(X) is the transition distribution over the states achieved by taking an action in a given state, and γ ∈(0, 1) is a discount factor. A deterministic policy π : X →A is a mapping from states to actions. We denote by B(X × A; b) the set of measurable bounded state-action functions f : X ×A →[−b; b]. Solving an MDP corresponds to computing the optimal action–value function Q∗∈B(X ×A; Qmax = 1/(1−γ)), defined as the fixed point of the optimal Bellman operator T defined as T Q(x, a) = R(x, a) + γ P y P(y|x, a) maxa′ Q(y, a′). The optimal policy is obtained as the greedy policy w.r.t. the optimal value function as π∗(x) = arg maxa∈A Q∗(x, a). In this paper we study the multi-task reinforcement learning (MTRL) setting where the objective is to solve T tasks, defined as Mt = (X, A, Pt, Rt, γ) with t ∈[T] = {1, . . . , T}, with the same state-action space, but different dynamics and rewards. The objective of MTRL is to exploit similarities between tasks to improve the performance w.r.t. single-task learning. In particular, we choose linear fitted Q-iteration as the single-task baseline and we propose multi-task extensions tailored to exploit the sparsity in the structure of the tasks. input: Input sets  St = {xi}nx i=1 T t=1, tol, K Initialize W 0 ←0 , k = 0 do k ←k + 1 for a ←1, . . . , |A| do for t ←1, . . . , T, i ←1, . . . , nx do Sample rk i,a,t = Rt(xi,t, a) and yk i,a,t ∼Pt(·|xi,t, a) Compute zk i,a,t = rk i,a,t + γ maxa′ eQk t (yk i,a,t, a′) end for Build datasets Dk a,t = {(xi,t, a), zk i,a,t}nx i=1 Compute c W k a on {Dk a,t}T t=1 (see Eqs. 2,5, or 8) end for while max a W k a −W k−1 a 2 ≥tol  and k < K Figure 1: Linear FQI with fixed design and fresh samples at each iteration in a multi-task setting. Linear Fitted Q-iteration. Whenever X and A are large or continuous, we need to resort to approximation schemes to learn a near-optimal policy. One of the most popular ADP methods is the fitted-Q iteration (FQI) algorithm [7], which extends value iteration to approximate action-value functions. While exact value iteration proceeds by iterative applications of the Bellman operator (i.e., Qk = T Qk−1), at each iteration FQI approximates T Qk−1 by solving a regression problem. Among possible instances, here we focus on a specific implementation of FQI in the fixed design setting with linear approximation and we assume access to a generative model of the MDP. Since the action space A is finite, we represent action-value functions as a collection of |A| independent state-value functions. We introduce a dx-dimensional state-feature vector φ(·) = [ϕ1(·), . . . , ϕdx(·)]T with φi : X →R such that supx ||φ(x)||2 ≤L. From φ we obtain a linear approximation space for action-value functions as F = {fw(x, a) = φ(x)Twa, x ∈X, a ∈A, wa ∈Rdx}. FQI receives as input a fixed set of states S = {xi}nx i=1 (fixed design setting) and the space F. Starting from w0 = 0, at each iteration k, FQI first draws a (fresh) set of samples (rk i,a, yk i,a)nx i=1 from the generative model of the MDP for each action a on each of the states {xi}nx i=1 (i.e., rk i,a = R(xi, a) and yk i,a ∼P(·|xi, a)) and builds |A| independent training sets Dk a = {(xi, a), zk i,a}nx i=1, where zk i,a = rk i,a + γ maxa′ bQk−1(yk i,a, a′) is an unbiased sample of T bQk−1 and bQk−1(yk i,a, a′) is com2 puted using the weight vector learned at the previous iteration as ψ(yk i,a, a′)Twk−1. Then FQI solves |A| linear regression problems, each fitting the training set Dk a and it returns vectors bwk a, which lead to the new action value function f b wk with bwk = [ bwk 1, . . . , bwk |A|]. At each iteration the total number of samples is n = |A| × nx. The process is repeated up to K iterations or until no significant change in the weight vector is observed. Since in principle bQk−1 could be unbounded (due to numerical issues in the regression step), in computing the samples zk i,a we use a function eQk−1 obtained by truncating bQk−1 in [−Qmax; Qmax]. The convergence and the performance of FQI are studied in detail in [20] in the case of bounded approximation space, while linear FQI is studied in [17, Thm. 5] and [22, Lemma 5]. When moving to the multi-task setting, we consider different state sets {St}T t=1 and we denote by c W k a ∈Rdx×T the matrix with vector bwk a,t ∈Rdx as the t–th column. The general structure of FQI in a multi-task setting is reported in Fig. 1. Finally, we introduce the following matrix notation. For any matrix W ∈Rd×T , [W]t ∈Rd is the t–th column and [W]i ∈RT the i–th row of the matrix, Vec(W) is the RdT vector obtained by stacking the columns of the matrix, Col(W) is its column-space and Row(W) is its row-space. Beside the ℓ2, ℓ1-norm for vectors, we use the trace (or nuclear) norm ∥W∥∗= trace((WW T)1/2), the Frobenius norm ∥W∥F = (P i,j[W]2 i,j)1/2 and the ℓ2,1-norm ∥W∥2,1 = Pd i=1 ∥[W]i∥2. We denote by Od the set of orthonormal matrices and for any pair of matrices V and W, V ⊥Row(W) denotes the orthogonality between the spaces spanned by the two matrices. 3 Fitted Q–Iteration in Sparse MDPs Depending on the regression algorithm employed at each iteration, FQI can be designed to take advantage of different characteristics of the functions at hand, such as smoothness (ℓ2–regularization) and sparsity (ℓ1–regularization). In this section we consider the high–dimensional regression scenario and we study the performance of FQI under sparsity assumptions. Let πw(x) = arg maxa fw(x, a) be the greedy policy w.r.t. fw. We start with the following assumption.1 Assumption 1. For any function fw ∈F, the Bellman operator T can be expressed as T fw(x, a) = R(x, a) + γ E x′∼P (·|x,a) [fw(x′, πw(x′))] = ψ(x, a)TwR + γψ(x, a)TP πw ψ w (1) This assumption implies that F is closed w.r.t. the Bellman operator, since for any fw, its image T fw can be computed as the product between features ψ(·, ·) and a vector of weights wR and P πw ψ w. As a result, the optimal value function Q∗itself belongs to F and it can be computed as ψ(x, a)Tw∗. This assumption encodes the intuition that in the high–dimensional feature space F induced by ψ, the transition kernel P, and therefore the system dynamics, can be expressed as a linear combination of the features using the matrix P πw ψ , which depends on both function fw and features ψ. This condition is usually satisfied whenever the space F is spanned by a very large set of features that allows it to approximate a wide range of different functions, including the reward and transition kernel. Under this assumption, at each iteration k of FQI, there exists a weight vector wk such that T bQk−1 = fwk and an approximation of the target function fwk can be obtained by solving an ordinary least-squares problem on the samples in Dk a. Unfortunately, it is well known that OLS fails whenever the number of samples is not sufficient w.r.t. the number of features (i.e., d > n). For this reason, Asm. 1 is often joined together with a sparsity assumption. Let J(w) = {i = 1, . . . , d : wi ̸= 0} be the set of s non-zero components of vector w (i.e., s = |J(w)|) and Jc(w) be the complementary set. In supervised learning, the LASSO [11, 4] is effective in exploiting the sparsity assumption that s ≪d and dramatically reduces the sample complexity. In RL the idea of sparsity has been successfully integrated into policy evaluation [14, 21, 8, 12] but rarely in the full policy iteration. In value iteration, it can be easily integrated in FQI by approximating the target weight vector wk a as bwk a = arg min w∈Rdx 1 nx nx X i=1  φ(xi)Tw −zk i,a 2 + λ||w||1. (2) While this integration is technically simple, the conditions on the MDP structure that imply sparsity in the value functions are not fully understood. In fact, one may simply assume that Q∗is sparse in F, with s non-zero weights, thus implying that d −s features captures aspects of states and actions that do not have any impact on the actual optimal value function. Nonetheless, this would provide 1A similar assumption has been previously used in [9] where the transition P is embedded in a RKHS. 3 no guarantee about the actual level of sparsity encountered by FQI through iterations, where the target functions fwk may not be sparse at all. For this reason we need stronger conditions on the structure of the MDP. We state the following assumption (see [10, 6] for similar conditions). Assumption 2 (Sparse MDPs). There exists a set J (the set of useful features) for MDP M, with |J| = s ≪d, such that for any i /∈J, and any policy π the rows [P π ψ ]i are equal to 0, and there exists a function fwR = R such that J(wR) ⊆J. This assumption implies that not only the reward function is sparse, but also that the features that are useless for the reward have no impact on the dynamics of the system. Since P π ψ can be seen as a linear representation of the transition kernel embedded in the high-dimensional space F, this assumption corresponds to imposing that the matrix P π ψ has all its rows corresponding to features outside of J set to 0. This in turn means that the future state-action vector E[ψ(x′, a′)T] = ψ(x, a)TP π ψ depends only on the features in J. In the blackjack scenario illustrated in the introduction, this assumption is verified by features related to the history of the cards played so far. In fact, if we consider an infinite number of decks, the feature indicating whether an ace has already been played is not used in the definition of the reward function and it is completely unrelated to the other features and, thus it does not contribute to the optimal value function. An important consideration on this assumption can be derived by a closer look to the sparsity pattern of the matrix P π ψ . Since the sparsity is required at the level of the rows, this does not mean that the features that do not belong to J have to be equal to 0 after each transition. Instead, their value will be governed simply by the interaction with the features in J. This means that the features outside of J can vary from completely unnecessary features with no dynamics, to features that are redundant to those in J in describing the evolution of the system. Additional discussion on this assumption is available in [5]. Assumption 2, together with Asm. 1, leads to the following lemma. Lemma 1. Under Assumptions 1 and 2, the application of the Bellman operator T to any function fw ∈F, produces a function fw′ = T fw ∈F such that J(w′) ⊆J. This lemma guarantees that at any iteration k of FQI, the target function fwk = T bQk−1 has a level of sparsity J(wk) ≤s. We are now ready to study the performance of LASSO-FQI over iterations. In order to simplify the comparison to the multi-task results in sections 4 and 5, we analyze the average performance over multiple tasks. We consider that the previous assumptions extend to all the MDPs {Mt}T t=1, each with a set of useful features Jt and sparsity st. The action–value function learned after K iterations is evaluated by comparing the performance of the corresponding greedy policy πK t (x) = arg maxa QK t (x, a) to the optimal policy. The performance loss is measured w.r.t. a target distribution µ ∈P(X ×A). We introduce the following standard assumption for LASSO [3]. Assumption 3 (Restricted Eigenvalues (RE)). Define n as the number of samples, and Jc as the complement of the set of indices J. For any s ∈[d], there exists κ(s) ∈R+ such that: min  ∥Φ∆∥2 √n ∥∆J∥2 : |J| ≤s, ∆∈Rd\{0}, ∥∆Jc∥1 ≤3 ∥∆J∥1  ≥κ(s), (3) Theorem 1 (LASSO-FQI). Let the tasks {Mt}T t=1 and the function space F satisfy assumptions 1, 2 and 3 with average sparsity ¯s = P t st/T, κmin(s) = mint κ(st) and features bounded supx ||φ(x)||2 ≤L. If LASSO-FQI (Alg. 1 with Eq. 2) is run independently on all T tasks for K iterations with a regularizer λ = δQmax p log(d)/n, for any numerical constant δ > 8, then with probability at least (1 −2d1−δ/8)KT , the performance loss is bounded as 1 T T X t=1 Q∗ t −QπK t t 2 2,µ ≤O  1 (1 −γ)4 Q2 maxL2 κ4 min(s) s log d n + γKQ2 max  . (4) Remark 1 (assumptions). Asm. 3 is a relatively weak constraint on the representation capability of the data. The RE assumption is common in regression, and it is extensively analyzed in [27]. Asm. 1 and 2 are specific to our setting and may pose significant constraints on the set of MDPs of interest. Asm. 1 is introduced to give a more explicit interpretation for the notion of sparse MDPs. Without Asm. 1, the bound in Eq. 4 would have an additional approximation error term similar to standard approximate value iteration results (see e.g., [20]). Asm. 2 is a potentially very loose sufficient condition to guarantee that the target functions encountered over the iterations of LASSO–FQI have 4 a minimum level of sparsity. Thm. 1 requires that for any k ≤K, the target function fwk+1 t = T fwk t has weights wk+1 t that are sparse, i.e., maxt,k sk t ≤s with sk t = |J(wk+1 t )|. In other words, all target functions encountered must be sparse, or LASSO–FQI could suffer a huge loss at an intermediate step. Such condition could be obtained under much less restrictive assumptions than Asm. 2, that leaves up to the MDPs dynamics to resparsify the target function at each step, at the expenses of interpretability. It could be sufficient to prove that the MDP dynamics do not enforce sparsity, but simply do not reduce it across iterations, and use guarantees for LASSO reconstruction to maintain sparsity across iterations. Finally, we point out that even if “useless” features do not satisfy Asm. 2 and are weakly correlated with the dynamics and the reward function, their weights are discounted by γ at each step. As a result, the target functions could become “approximately” as sparse as Q∗ over iterations, and provide enough guarantees to be used for a variation of Thm. 1. We leave for future work a more thorough investigation of these possible relaxations. 4 Group-LASSO Fitted Q–Iteration After introducing the concept of sparse MDP in Sect. 3, we move to the multi-task scenario and we study the setting where there exists a suitable representation (i.e., set of features) under which all the tasks can be solved using roughly the same set of features, the so-called shared sparsity assumption. Given the set of useful features Jt for task t, we denote by J = ∪T t=1Jt the union of all the non-zero coefficients across all the tasks. Similar to Asm. 2 and Lemma 1, we first assume that the set of features “useful” for at least one of the tasks is relatively small compared to d and then show how this propagates through iterations. Assumption 4. We assume that the joint useful features over all the tasks are such that |J| = ˜s ≪d. Lemma 2. Under Asm. 2 and 4, at any iteration k, the target weight matrix W k has J(W k) ≤˜s. The Algorithm. In order to exploit the similarity across tasks stated in Asm. 4, we resort to the Group LASSO (GL) algorithm [11, 19], which defines a joint optimization problem over all the tasks. GL is based on the intuition that given the weight matrix W ∈Rd×T , the norm ∥W∥2,1 measures the level of shared-sparsity across tasks. In fact, in ∥W∥2,1 the ℓ2-norm measures the “relevance” of feature i across tasks, while the ℓ1-norm “counts” the total number of relevant features, which we expect to be small in agreement with Asm. 4. Building on this intuition, we define the GL–FQI algorithm in which at each iteration for each action a ∈A we compute (details about the implementation of GL–FQI are reported in [5, Appendix A]) c W k a = arg min Wa T X t=1 Zk a,t −Φtwa,t 2 2 + λ ∥Wa∥2,1 . (5) Theoretical Analysis. The regularization of GL–FQI is designed to take advantage of the sharedsparsity assumption at each iteration and in this section we show that this may lead to reduce the sample complexity w.r.t. using LASSO in FQI for each task separately. Before reporting the analysis of GL–FQI, we need to introduce a technical assumption defined in [19] for GL. Assumption 5 (Multi-Task Restricted Eigenvalues). Define Φ as the block diagonal matrix composed by the T sample matrices Φt. For any s ∈[d], there exists κ(s) ∈R+ s.t. min ( ∥Φ Vec(∆)∥2 √ nT ∥Vec(∆J)∥2 : |J| ≤s, ∆∈Rd×T \{0}, ∥∆Jc∥2,1 ≤3 ∥∆J∥2,1 ) ≥κ(s), (6) Similar to Theorem 1 we evaluate the performance of GL–FQI as the performance loss of the returned policy w.r.t. the optimal policy and we obtain the following performance guarantee. Theorem 2 (GL–FQI). Let the tasks {Mt}T t=1 and the function space F satisfy assumptions 1, 2, 4, and 5 with joint sparsity ˜s and features bounded supx ||φ(x)||2 ≤L. If GL–FQI (Alg. 1 with Eq. 5) is run jointly on all T tasks for K iterations with a regularizer λ = LQmax √ nT 1 + (log d) 3 2 +δ √ T  1 2 , for any numerical constant δ > 0, then with probability at least (1 −log(d)−δ)K, the performance loss is bounded as 1 T T X t=1 Q∗ t −QπK t t 2 2,µ ≤O  1 (1 −γ)4 L2Q2 max κ4(2˜s) ˜s n  1 + (log d)3/2+δ √ T  + γKQ2 max  . (7) 5 Remark 2 (comparison with LASSO-FQI). Ignoring all the terms in common with the two methods, constants, and logarithmic factors, we can summarize their bounds of LASSO-FQI and GL– FQI as e O(¯s log(d)/n) and e O ˜s/n(1 + log(d)/ √ T)  . The first interesting aspect of the bound of GL–FQI is the role played by the number of tasks T. In LASSO–FQI the “cost” of discovering the st useful features is a factor log d, while GL–FQI has a factor 1 + log(d)/ √ T, which decreases with the number of tasks. This illustrates the advantage of the multi–task learning dimension of GL–FQI, where all the samples of all tasks actually contribute to discovering useful features, so that the more the number of features, the smaller the cost. In the limit, we notice that when T →∞, the bound for GL–FQI does not depend on the dimensionality of the problem anymore. The other critical aspect of the bounds is the difference between ¯s and ˜s. In fact, maxt st ≤˜s ≤d and if the shared-sparsity assumption does not hold, we can construct cases where the number of non-zero features st is very small for each task, but the union J = ∪tJt is still a full set, so that ˜s ≈d. In this case, GL–FQI cannot leverage on the shared sparsity across tasks and it may perform significantly worse than LASSO–FQI. This is the well–known negative transfer effect that happens whenever the wrong assumption over tasks is enforced thus worsening the single-task learning performance. 5 Feature Learning Fitted Q–Iteration Unlike other properties such as smoothness, the sparsity of a function is intrinsically related to the specific representation used to approximate it (i.e., the function space F). While Asm. 2 guarantees that F induces sparsity for each task separately, Asm. 4 requires that all the tasks share the same useful features in the given representation. As discussed in Rem. 2, whenever this is not the case, GL–FQI may perform worse than LASSO–FQI. In this section we investigate an alternative notion of sparsity in MDPs and we introduce the Feature Learning fitted Q-iteration (FL–FQI) algorithm. Low Rank approximation. Since the poor performance of GL–FQI is due to the chosen representation (i.e., features), it is natural to ask the question whether there exists an alternative representation (i.e., different features) inducing a higher level of shared sparsity. Let us assume that there exists a space F∗defined by features φ∗such that the weight matrix of the optimal Q-functions A∗∈Rd×T is such that J(A∗) = s∗≪d. As shown in Lemma 2, together with Asm. 2 and 4, this guarantees that at any iteration J(Ak) ≤s∗. Given the set of states {St}T t=1, let Φ and Φ∗the feature matrices obtained by evaluating φ and φ∗on the states. We assume that there exists a linear transformation of the features of F∗to the features of F such that Φ = Φ∗U with U ∈Rdx×dx. In this setting the samples used to define the regression problem can be formulated as noisy observations of Φ∗Ak a for any action a. Together with the transformation U, this implies that there exists a weight matrix W k a such that Φ∗Ak a = Φ∗UU −1Ak a = ΦW k a with W k a = U −1Ak a. Although Ak a is indeed sparse, any attempt to learn W k a using GL would fail, since W k a may have a very low level of sparsity. On the other hand, an algorithm able to learn a suitable transformation U, it may be able to recover the representation Φ∗(and the corresponding space F∗) and exploit the high level of sparsity of Ak a. While this additional step of representation or feature learning introduces additional complexity, it allows to relax the strict assumption on the joint sparsity ˜s and may improve the performance of GL–FQI. Our assumption is formulated as follows. Assumption 6. There exists an orthogonal matrix U ∈Od (block diagonal matrix having matrices {Ua ∈Odx} on the diagonal) such that the weight matrix A∗obtained as A∗= U −1W ∗is jointly sparse, i.e., has a set of “useful” features J(A∗) = ∪T t=1J([A∗]t) with |J(A∗)| = s∗≪d. Coherently with this assumption, we adapt the multi-task feature learning (MTFL) algorithm defined in [1] and at each iteration k for any action a we solve the optimization problem (bU k a , bAk a) = arg min Ua∈Od min Aa∈Rd×T T X t=1 ||Zk a,t −ΦtUa[Aa]t||2 + λ ∥A∥2,1 . (8) In order to better characterize the solution to this optimization problem, we study more in detail the relationship between A∗and W ∗and analyze the two directions of the equality A∗= U −1W ∗. When A∗has s∗non-zero rows, then any orthonormal transformation W ∗will have at most rank r∗= s∗. This suggests that instead of solving the joint optimization problem in Eq. 8 and explicitly recover the transformation U, we may directly try to solve for low-rank weight matrices W. Then we need to show that a low-rank W ∗does indeed imply the existence of a transformation to a jointlysparse matrix A∗. Assume W ∗has low rank r∗. It is then possible to perform a standard singular 6 value decomposition W ∗= UΣV = UA∗. Because Σ is diagonal with r∗non-zero entries, A∗will have r∗non-zero rows, thus being jointly sparse. It is possible to derive the following equivalence. Proposition 1 ([5, Appendix A]). Given A, W ∈Rd×T , U ∈Od, the following equality holds, with the relationship between the optimal solutions being W ∗= UA∗, min A,U T X t=1 ||Zk a,t −ΦtUa[Aa]t||2 + λ ∥A∥2,1 = min W T X t=1 ||Zk a,t −Φt[Wa]t||2 + λ∥W∥1. (9) The previous proposition states the equivalence between solving a feature learning version of GL and solving a nuclear norm (or trace norm) regularized problem. This penalty is equivalent to an ℓ1-norm penalty on the singular values of the W matrix, thus forcing W to have low rank. Notice that assuming that W ∗has low rank can be also interpreted as the fact that either the task weights [W ∗]t or the features weights [W ∗]i are linearly correlated. In the first case, it means that there is a dictionary of core tasks that is able to reproduce all the other tasks as a linear combination. As a result, Assumption 6 can be reformulated as Rank(W ∗) = s∗. Building on this intuition we define the FL–FQI algorithm where the regression is carried out according to Eq. 9. Theoretical Analysis. Our aim is to obtain a bound similar to Theorem 2 for the new FL-FQI Algorithm. We begin by introducing a slightly different assumption on the data available for regression. Assumption 7 (Restricted Strong Convexity). Under Assumption 6, let W ∗= UDV T be a singular value decomposition of the optimal matrix W ∗of rank r, and U r, V r the submatrices associated with the top r singular values. Define B = {∆∈Rd×T : Row(∆)⊥U r and Col(∆)⊥V r}, and the projection operator onto this set ΠB. There exists a positive constant κ such that min  ∥Φ Vec(∆)∥2 2 2nT∥Vec(∆)∥2 2 : ∆∈Rd×T , ∥ΠB(∆)∥1 ≤3∥∆−ΠB(∆)∥1  ≥κ (10) Theorem 3 (FL–FQI). Let the tasks {Mt}T t=1 and the function space F satisfy assumptions 1, 2, 6, and 7 with rank s∗, features bounded supx ||φ(x)||2 ≤L and T > Ω(log n). If FL–FQI (Alg. 1 with Eq. 8) is run jointly on all T tasks for K iterations with a regularizer λ ≥2LQmax p (d + T)/n, then with probability at least Ω((1 −exp{−(d + T)})K), the performance loss is bounded as 1 T T X t=1 Q∗ t −QπK t t 2 2,ρ ≤O  1 (1 −γ)4 Q2 maxL4 κ2 s∗ n  1 + d T  + γKQ2 max  . Remark 3 (comparison with GL-FQI). Unlike GL–FQI, the performance FL–FQI does not depend on the shared sparsity ˜s of W ∗but on its rank, that is the value s∗of the most jointly-sparse representation that can be obtained through an orthogonal transformation U of the features. Whenever tasks are somehow linearly dependent, even if the weight matrix W ∗is dense and ˜s ≈d, the rank s∗can be small, thus guaranteeing a dramatic improvement over GL–FQI. On the other hand, learning a new representation comes at the cost of a worse dependency on d. In fact, the term log(d)/ √ T in GL–FQI, becomes d/T, implying that many more tasks are needed for FL–FQI to construct a suitable representation. This is not surprising since we introduced a d × d matrix U in the optimization problem and a larger number of parameters needs to be learned. As a result, although significantly reduced by the use of trace-norm instead of ℓ2,1-regularization, the negative transfer is not completely removed. In particular, the introduction of new tasks, that are not linear combinations of the previous tasks, may again increase the rank s∗, corresponding to the fact that no jointly-sparse representation can be constructed. 6 Experiments We investigate the empirical performance of GL–FQI, and FL–FQI and compare their results to single-task LASSO–FQI in two variants of the blackjack game. In the first variant (reduced variant) the player can choose to hit to obtain a new card or stay to end the episode, while in the second one (reduced variant) she can also choose to double the bet on the first turn. Different tasks can be defined depending on several parameters of the game, such as the number of decks, the threshold at which the dealer stays and whether she hits when the threshold is research exactly with a soft hand. Full variant experiment. The tasks are generated by selecting 2, 4, 6, 8 decks, by setting the stay threshold at {16, 17} and whether the dealer hits on soft, for a total of 16 tasks. We define a very 7 1000.0 2000.0 3000.0 4000.0 5000.0 -0.1 -0.08 -0.06 -0.04 n HE GL-FQI FL-FQI Lasso-FQI 100.0 300.0 500.0 700.0 900.0 1100.0 -0.16 -0.14 -0.12 -0.1 -0.08 n HE GL-FQI FL-FQI Lasso-FQI Figure 2: Comparison of FL–FQI, GL–FQI and LASSO–FQI on full (left) and reduced (right) variants. The y axis is the average house edge (HE) computed across tasks. rich description of the state space with the objective of satisfying Asm. 1. At the same time this is likely to come with a large number of useless features, which makes it suitable for sparsification. In particular, we include the player hand value, indicator functions for each possible player hand value and dealer hand value, and a large description of the cards not dealt yet (corresponding to the history of the game), under the form of indicator functions for various ranges. In total, the representation contains d = 212 features. We notice that although none of the features is completely useless (according to the definition in Asm. 2), the features related with the history of the game are unlikely to be very useful for most of the tasks defined in this experiment. We collect samples from up to 5000 episodes, although they may not be representative enough given the large state space of all possible histories that the player can encounter and the high stochasticity of the game. The evaluation is performed by simulating the learned policy for 2,000,000 episodes and computing the average House Edge (HE) across tasks. For each algorithm we report the performance for the best regularization parameter λ in the range {2, 5, 10, 20, 50}. Results are reported in Fig. 2-(left). Although the set of features is quite large, we notice that all the algorithms succeed in learning a good policy even with relatively few samples, showing that all of them can take advantage of the sparsity of the representation. In particular, GL–FQI exploits the fact that all 16 tasks share the same useless features (although the set of useful feature may not overlap entirely) and its performance is the best. FL–FQI suffers from the increased complexity of representation learning, which in this case does not lead to any benefit since the initial representation is sparse, but it performs as LASSO–FQI. Reduced variant experiment. We consider a representation for which we expect the weight matrix to be dense. In particular, we only consider the value of the player’s hand and of the dealer’s hand and we generate features as the Cartesian product of these two discrete variables plus a feature indicating whether the hand is soft, for a total of 280 features. Similar to the previous setting, the tasks are generated with 2, 4, 6, 8 decks, whether the dealer hits on soft, and a larger number of stay thresholds in {15, 16, 17, 18}, for a total of 32 tasks. We used regularizers in the range {0.1, 1, 2, 5, 10}. Since the history is not included, the different number of decks influences only the probability distribution of the totals. Moreover, limiting the actions to either hit or stay further increases the similarity among tasks. Therefore, we expect to be able to find a dense, low-rank solution. Results in Fig. 2(right) confirms this guess, with FL–FQI performing significantly better than the other methods. In addition, GL–FQI and LASSO–FQI perform similarly, since the dense representation penalizes both single-task and shared sparsity; in fact, both methods favor low values of λ, meaning that the sparse-inducing penalties are not effective. 7 Conclusions We studied the multi-task reinforcement learning problem under shared sparsity assumptions across the tasks. GL–FQI extends the FQI algorithm by introducing a Group-LASSO step at each iteration and it leverages over the fact that all the tasks are expected to share the same small set of useful features to improve the performance of single-task learning. Whenever the assumption is not valid, GL–FQI may perform worse than LASSO–FQI. With FL–FQI we take a step further and we learn a transformation of the given representation that could guarantee a higher level of shared sparsity. Future work will be focused on considering a relaxation of the theoretical assumptions and on studying alternative multi-task regularization formulations such as in [29] and [13]. Acknowledgments This work was supported by the French Ministry of Higher Education and Research, the European Community’s Seventh Framework Programme under grant agreement 270327 (project CompLACS), and the French National Research Agency (ANR) under project ExTra-Learn n.ANR-14-CE24-0010-01. 8 References [1] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [2] D. Bertsekas and J. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996. [3] Peter J Bickel, Ya’acov Ritov, and Alexandre B Tsybakov. Simultaneous analysis of lasso and dantzig selector. The Annals of Statistics, pages 1705–1732, 2009. [4] Peter B¨uhlmann and Sara van de Geer. Statistics for High-Dimensional Data: Methods, Theory and Applications. Springer, 1st edition, 2011. [5] Daniele Calandriello, Alessandro Lazaric, and Marcello Restelli. Sparse Multi-task Reinforcement Learning. In https://hal.inria.fr/hal-01073513, 2014. [6] A Castelletti, S Galelli, M Restelli, and R Soncini-Sessa. Tree-based feature selection for dimensionality reduction of large-scale control systems. In IEEE ADPRL, 2011. [7] Damien Ernst, Pierre Geurts, Louis Wehenkel, and Michael L Littman. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(4), 2005. [8] Mohammad Ghavamzadeh, Alessandro Lazaric, R´emi Munos, Matt Hoffman, et al. Finite-sample analysis of lasso-td. In ICML, 2011. [9] Steffen Grunewalder, Guy Lever, Luca Baldassarre, Massimiliano Pontil, and Arthur Gretton. Modelling transition dynamics in mdps with rkhs embeddings. In ICML, 2012. [10] H. Hachiya and M. Sugiyama. Feature selection for reinforcement learning: Evaluating implicit statereward dependency via conditional mutual information. In ECML PKDD. 2010. [11] T. Hastie, R. Tibshirani, and J. Friedman. The elements of statistical learning. Springer, 2009. [12] M. Hoffman, A. Lazaric, M. Ghavamzadeh, and R. Munos. Regularized least squares temporal difference learning with nested ℓ2 and ℓ1 penalization. In EWRL, pages 102–114. 2012. [13] Laurent Jacob, Guillaume Obozinski, and Jean-Philippe Vert. Group lasso with overlap and graph lasso. In ICML, pages 433–440. ACM, 2009. [14] J Zico Kolter and Andrew Y Ng. Regularization and feature selection in least-squares temporal difference learning. In ICML, 2009. [15] A. Lazaric. Transfer in reinforcement learning: a framework and a survey. In M. Wiering and M. van Otterlo, editors, Reinforcement Learning: State of the Art. Springer, 2011. [16] Alessandro Lazaric and Mohmammad Ghavamzadeh. Bayesian multi-task reinforcement learning. In ICML, 2010. [17] Alessandro Lazaric and Marcello Restelli. Transfer from multiple MDPs. In NIPS, 2011. [18] Hui Li, Xuejun Liao, and Lawrence Carin. Multi-task reinforcement learning in partially observable stochastic environments. Journal of Machine Learning Research, 10:1131–1186, 2009. [19] Karim Lounici, Massimiliano Pontil, Sara Van De Geer, Alexandre B Tsybakov, et al. Oracle inequalities and optimal inference under group sparsity. The Annals of Statistics, 39(4):2164–2204, 2011. [20] R´emi Munos and Csaba Szepesv´ari. Finite-time bounds for fitted value iteration. The Journal of Machine Learning Research, 9:815–857, 2008. [21] C. Painter-Wakefield and R. Parr. Greedy algorithms for sparse reinforcement learning. In ICML, 2012. [22] Bruno Scherrer, Victor Gabillon, Mohammad Ghavamzadeh, and Matthieu Geist. Approximate modified policy iteration. In ICML, 2012. [23] Matthijs Snel and Shimon Whiteson. Multi-task reinforcement learning: Shaping and feature selection. In EWRL, September 2011. [24] Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning. MIT Press, 1998. [25] F. Tanaka and M. Yamamura. Multitask reinforcement learning on the distribution of mdps. In CIRA 2003, pages 1108–1113, 2003. [26] Matthew E. Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(1):1633–1685, 2009. [27] Sara A Van De Geer, Peter B¨uhlmann, et al. On the conditions used to prove oracle results for the lasso. Electronic Journal of Statistics, 3:1360–1392, 2009. [28] A. Wilson, A. Fern, S. Ray, and P. Tadepalli. Multi-task reinforcement learning: A hierarchical Bayesian approach. In ICML, pages 1015–1022, 2007. [29] Yi Zhang and Jeff G Schneider. Learning multiple tasks with a sparse matrix-normal penalty. In NIPS, pages 2550–2558, 2010. 9
2014
244
5,341
The limits of squared Euclidean distance regularization∗ Michał Derezi´nski Computer Science Department University of California, Santa Cruz CA 95064, U.S.A. mderezin@soe.ucsc.edu Manfred K. Warmuth Computer Science Department University of California, Santa Cruz CA 95064, U.S.A. manfred@cse.ucsc.edu Abstract Some of the simplest loss functions considered in Machine Learning are the square loss, the logistic loss and the hinge loss. The most common family of algorithms, including Gradient Descent (GD) with and without Weight Decay, always predict with a linear combination of the past instances. We give a random construction for sets of examples where the target linear weight vector is trivial to learn but any algorithm from the above family is drastically sub-optimal. Our lower bound on the latter algorithms holds even if the algorithms are enhanced with an arbitrary kernel function. This type of result was known for the square loss. However, we develop new techniques that let us prove such hardness results for any loss function satisfying some minimal requirements on the loss function (including the three listed above). We also show that algorithms that regularize with the squared Euclidean distance are easily confused by random features. Finally, we conclude by discussing related open problems regarding feed forward neural networks. We conjecture that our hardness results hold for any training algorithm that is based on the squared Euclidean distance regularization (i.e. Back-propagation with the Weight Decay heuristic). 1 Introduction We define a set of simple linear learning problems described by an n dimensional square matrix M with ±1 entries. The rows xi of M are n instances, the columns correspond to the n possible targets, and Mij is the label given by target j to the instance xi (See Figure 1). Note, that Mij = xi · ej, where ej is the j-th unit vector. That is, the j-th target is a linear function that picks the j-th column out of M. It is important to understand that the matrix M, which we call the problem matrix, specifies n learning problems: In the jth problem each of the n instances (rows) are labeled by the jth target (column). The rationale for defining a set of problems instead of a single problem follows from the fact that learning a single problem is easy and we need to average the pre→ −1 +1 −1 +1 instances → −1 +1 +1 −1 → +1 −1 −1 +1 → +1 +1 −1 +1 ↑ ↑ ↑ ↑ targets Figure 1: A random ±1 matrix M: the instances are the rows and the targets the columns of the matrix. When the j-th column is the target, then we have a linear learning problem where the j-th unit vector is the target weight vector. diction loss over the n problems to obtain a hardness result. ∗This research was supported by the NSF grant IIS-1118028. 1 The protocol of learning is simple: The algorithm is given k training instances labeled by one of the targets. It then produces a linear weight vector w that aims to incur small average loss on all n instances labeled by the same target.1 Any loss function satisfying some minimal assumptions can be used, including the square, the logistic and the hinge loss. We will show that when M is random, then this type of problems are hard to learn by any algorithm from a certain class of algorithms.2 By hard to learn we mean that the loss is high when we average over instances and targets. The class of algorithms for which we prove our hardness results is any algorithm whose prediction on a new instance vector x is a function of w · x where the weight vector w is a linear combination of training examples. This includes any algorithm motivated by regularizing with || w ||2 2 (i.e. algorithms motivated by the Representer Theorem [KW71, SHS01]) or alternatively any algorithm that exhibits certain rotation invariance properties [WV05, Ng04, WKZ14]. Note that any version of Gradient Descent or Weight Decay on the three loss functions listed above belongs to this class of algorithms, i.e. it predicts with a linear combination of the instances seen so far. This class of simple algorithms has many advantages (such as the fact that it can be kernelized). However, we show that this class is very slow at learning the simple learning problems described above. More precisely, our lower bounds for a randomly chosen M have the following form: For some constants A ∈(0, 1] and B ≥1 that depend on the loss function, any algorithm that predicts with linear combinations of k instances has average loss at least A −B k n with high probability, where the average is over instances and targets. This means that after seeing a fraction of A 2B of all n instances, the average loss is still at least the constant A 2 (see the red solid curve in Figure 2 for a typical plot of the average loss of GD). Note, that there are trivial algorithms that learn our learning problem much faster. These algorithms clearly do not predict with a linear combination of the given instances. For example, one simple algorithm keeps track of the set of targets that are consistent with the k examples seen so far (the version space) and chooses one target in the version space at random. This algorithm has the following properties: After seeing k instances, the expected size of the version space is min(n/2k, 1), so after O(log2 n) examples, with high probability there is only one unit vector ej left in the version space that labels all the examples correctly. Figure 2: The average logistic loss of the Gradient Descent (with and without 1-norm regularization) and the Exponentiated Gradient algorithms for the problem of learning the first column of a 100 dimensional square ±1 matrix. The x-axis is the number of examples k in the training set. Note that the average logistic loss for Gradient Descent decreases roughly linearly. One way to closely approximate the above version space algorithm is to run the Exponentiated Gradient (EG) algorithm [KW97b] with a large learning rate. The EG algorithm maintains a weight vector which is a probability vector. It updates the weights by multiplying them by non-negative factors and then re-normalizes them to a probability vector. The factors are the exponentiated negative scaled derivatives of the loss. See dot-dashed green curve of Figure 2 for a typical plot of the average loss of EG. It converges ”exponentially faster” than GD for the problem given in Figure 1. General regret bounds for the EG algorithm are known (see e.g. [KW97b, HKW99]) that grow logarithmically with the dimension n of the problem. Curiously enough, for the EG family of algorithms, the componentwise logarithm of the weight vector is a linear combination of the instances.3 If we add a 1-norm regularization to the loss, then GD behaves more like the EG algorithm (see dashed blue curve of Figure 2). In Figure 3 we plot the weights of the EG and GD algorithms (with optimized learning rates) when the target is the first column of a 100 dimensional random matrix. 1Since the sample space is so small it is cleaner to require small average loss on all n instances than just the n −k test instances. See [WV05] for a discussion. 2Our setup is the same as the one used in [WV05], where such hardness results were proved for the square loss only. The generalization to the more general losses is non-trivial. 3This is a simplification because it ignores the normalization. 2 Figure 3: In the learning problem the rows of a 100-dimensional random ±1 matrix are labeled by the first column. The x-axis is the number of instances k ∈1..100 seen by the algorithm. We plot all 100 weights of the GD algorithm (left), GD with 1-norm regularization (center) and the EG algorithm (right) as a function of k. The GD algorithms keeps lots of small weights around and the first weight grows only linearly. The EG algorithm wipes out the irrelevant weights much faster and brings up the good weight exponentially fast. GD with 1-norm regularization behaves like GD for small k and like EG for large k. The GD algorithm keeps all the small weight around and the weight of the first component only grows linearly. In contrast, the EG algorithm grows the target weight much faster. This is because in a GD algorithm the squared 2-norm regularization does not punish small weight enough (because w2 i ≈0 when wi is small). If we add a 1-norm regularization to the loss then the irrelevant weights of GD disappear more quickly and the algorithm behaves more like EG. Kernelization We clearly have a simple linear learning problem in Figure 1. So, can we help the class of algorithms that predicts with linear combinations of the instances by “expanding” the instances with a feature map? In other words, we could replace the instance x by φ(x), where φ is any mapping from Rn to Rm, and m might be much larger than n (and can even be infinite dimensional). The weight vector is now a linear combination of the expanded instances and computing the dot product of this weight vector with a new expanded instance requires the computation of dot products between expanded instances.4 Even though the class of algorithms that predicts with a linear combination of instances is good at incorporating such an expansion (also referred to as an embedding into a feature space), we can show that our hardness results still hold even if any such expansion is used. In other words it does not help if the instances (rows) are represented by any other set of vectors in Rm. Note that the learner knows that it will receive examples from one of the n problems specified by the problem matrix M. The expansion is allowed to depend on M, but it has to be chosen before any examples are seen by the learner. Related work There is a long history for proving hardness results for the class of algorithms that predict with linear combinations of instances [KW97a, KWA97]. In particular, in [WV05] it was shown for the Hadamard matrix and the square loss, that the average loss is at least 1 −k n even if an arbitrary expansion is used. This means, that if the algorithm is given half of all n instances, its average square loss is still half. The underlying model is a simple linear neuron. It was left as an open problem what happens for example for a sigmoided linear neuron and the logistic loss. Can the hardness result be circumvented by choosing different neuron and loss function? In this paper, we are able to show that this type of hardness results for algorithms that predict with a linear combination of the instances are robust to learning with a rather general class of linear neurons and more general loss functions. The hardness result of [WV05] for the square loss followed from a basic property of the Singular Value Decomposition. However, our hardness results require more complicated counting 4This can often be done efficiently via a kernel function. Our result only requires that the dot products between the expanded instances are finite and the φ map can be defined implicitly via a kernel function. 3 techniques. For the more general class of loss functions we consider, the Hadamard matrix actually leads to a weaker bound and we had to use random matrices instead. Moreover, it was shown experimentally in [WV05] (and to some extent theoretically in [Ng04]) that the generalization bounds of 1-norm regularized linear regression grows logarithmically with the dimension n of the problem. Also, a linear lower bound for any algorithm that predicts with linear combinations of instances was given in Theorem 4.3 of [Ng04]. However, the given lower bound is based on the fact that the Vapnik Chervonienkis (VC) dimension of n-dimensional halfspaces is n + 1 and the resulting linear lower bound holds for any algorithm. No particular problem is given that is easy to learn by say multiplicative updates and hard to learn by GD. In contrast, we give a random problem in Figure 1 that is trivial to learn by some algorithms, but hard to learn by the natural and most commonly used class of algorithms which predicts with linear combinations of instances. Note, that the number of target concepts we are trying to learn is n, and therefore the VC dimension of our problem is at most log2 n. There is also a large body of work that shows that certain problems cannot be embedded with a large 2-norm margin (see [FS02, BDES02] and the more recent work on similarity functions [BBS08]). An embedding with large margins allows for good generalization bounds. This means that if a problem cannot be embedded with a large margin, then the generalization bounds based on the margin argument are weak. However we don’t know of any hardness results for the family of algorithms that predict with linear combinations in terms of a margin argument, i.e. lower bounds of generalization for this class of algorithms that is based on non-embeddability with large 2-norm margins. Random features The purpose of this type of research is to delineate which types of problems can or cannot be efficiently learned by certain classes of algorithms. We give a problem for which the sample complexity of the trivial algorithm is logarithmic in n, whereas it is linear in n for the natural class of algorithms that predicts with the linear combination of instances. However, why should we consider learning problems that pick columns out of a random matrix? Natural data is never random. However, the problem with this class of algorithms is much more fundamental. We will argue in Section 4 that those algorithms get confused by random irrelevant features. This is a problem if datasets are based on some physical phenomena and that contain at least some random or noisy features. It seems that because of the weak regularization of small weights (i.e. w2 i ≈0 when wi is small), the algorithms are given the freedom to fit noisy features. Outline After giving some notation in the next section and defining the class of loss functions we consider, we prove our main hardness result in Section 3. We then argue that the family of algorithms that predicts with linear combination of instances gets confused by random features (Section 4). Finally, we conclude by discussing related open problems regarding feed forward neural nets in Section 5: We conjecture that going from single neurons to neural nets does not help as long as the training algorithm is Gradient Descent with a squared Euclidean distance regularization. 2 Notations We will now describe our learning problem and some notations for representing algorithms that predict with a linear combination of instances. Let M be a ±1 valued problem matrix. For the sake of simplicity we assume M is square (n × n). The i-th row of M (denoted as xi) is the i-th instance vector, while the j-th column of M is the labeling of the instances by the j-th target. We allow the learner to map the instances to an m-dimensional feature space, that is, xi is replaced by φ(xi), where φ : Rn →Rm is an arbitrary mapping. We let Z ∈Rn×m denote the new instance matrix with its i-th row being φ(xi).5 5The number of features m can even be infinite as long as the n2 dot products Z Z⊤between the expanded instances are all finite. On the other hand, m can also be less than n. 4 The algorithm is given the first k rows of Z labeled by one of the n targets. We use bZ to denote the first k rows of Z. After seeing the rows of bZ labeled by target i, the algorithm produces a linear combination wi of the k rows. Thus the weight vector wi takes the form wi = bZ ⊤ai, where ai is the vector of the k linear coefficients. We aggregate the n weight vectors and coefficients into the m × n and k × n matrices, respectively: W := [w1, . . . , wn] and A = [a1, . . . , an]. Clearly, W = bZ ⊤A. By applying the weight matrix to the instance matrix Z we can obtain the n × n prediction matrix of the algorithm: P = Z W = Z bZ ⊤A. Note that Pij = φ(xi) · wj is the linear activation of the algorithm produced for the i-th instance after receiving the first k rows of Z labeled with the j-th target. We are now interested to compare the prediction matrix with the problem matrix using a nonnegative loss function L : R × {−1, 1} →R≥0. We define the average loss of the algorithm as 1 n2 X i,j L(Pi,j, Mi,j). Note that the loss is between linear activations and binary labels and we average it over instances and targets. Definition 1 We will call a loss function L : R × {−1, 1} →R≥0 to be C-regular where C > 0, if L(a, y) ≥C whenever a · y ≤0, i.e. a and y have different signs. The loss function guarantees that if the algorithm produces a linear activation of a different sign, then a loss of at least C is incurred. Three commonly used 1-regular losses are the: • Square Loss, L(a, y) = (a −y)2, used in Linear Regression. • Logistic Loss, L(a, y) = −y+1 2 log2(σ(a))−y−1 2 log2(1−σ(a)), used in Logistic Regression. Here σ(a) denotes the sigmoid function 1 1+exp(−a). • Hinge Loss, L(a, y) = max(0, 1 −ay), used in Support Vector Machines. [WV05] obtained a linear lower bound for the square: Theorem 2 If the problem matrix M is the n dimensional Hadamard matrix, then for any algorithm that predicts with linear combinations of expanded training instances, the average square loss after observing k instances is at least 1 −k n. The key observation used in the proof of this theorem is that the prediction matrix P = Z bZ ⊤A has rank at most k, because bZ has only k rows. Using an elementary property of the singular value decomposition, the total squared loss ∥P −M ∥2 2 can be bounded by the sum of the squares of the last n −k singular values of the problem matrix M. The bound now follows from the fact that Hadamard matrices have a flat spectrum. Random matrices have a “flat enough” spectrum and the same technique gives an expected linear lower bound for random problem matrices. Unfortunately the singular value argument only applies to the square loss. For example, for the logistic loss the problem is much different. In that case it would be natural to define the n × n prediction matrix as σ(Z W) = σ(Z bZ ⊤A). However the rank of σ(Z W) jumps to n even for small values of k. Instead we keep the prediction matrix P as the n2 linear activations Z bZ ⊤A produced by the algorithm, and define the loss between linear activations and labels. This matrix still has rank at most k. In the next section, we will use this fact in a counting argument involving the possible sign patterns produced by low rank matrices. If the algorithms are allowed to start with a non-zero initial weight vector, then the hardness results essentially hold for the class of algorithms that predict with linear combinations of this weight vector and the k expanded training instances. The only difference is that the rank of the prediction matrix is now at most k+1 instead of k and therefore the lower bound of the above theorem becomes 1−k+1 n instead of 1 −k n. Our main result also relies on the rank of the prediction matrix and therefore it allows for a similar adjustment of the bound when an initial weight vector is used. 5 3 Main Result In this section we present a new technique for proving lower bounds on the average loss for the sparse learning problem discussed in this paper. The lower bound applies to any regular loss and is based on counting the number of sign-patterns that can be generated by a low-rank matrix. Bounds on the number of such sign patterns were first introduced in [AFR85]. As a corollary of our method, we also obtain a lower bound for the “rigidity” of random matrices. Theorem 3 Let L be a C-regular loss function. A random n×n problem matrix M almost certainly has the property that for any algorithm that predicts with linear combinations of expanded training instances, the average square loss L after observing k instances is at least 4C ( 1 20 −k n). Proof C-regular losses are at least C if the sign of the linear activation for an example does not match the label. So, we can focus on counting the number of linear activations that have wrong signs. Let P be the n×n prediction matrix after receiving k instances. Furthermore let sign(P) ∈{−1, 1}n×n denote the sign-pattern of P. For the sake of simplicity, we define sign(0) as 1. This simplification underestimates the number of disagreements. However we still have the property that for any Cregular loss: L(a, y) ≥C| sign(a) −y|/2. We now count the number of entries on which sign(P) disagrees with M. We use the fact that P has rank at most k. The number of sign patterns of n × m rank ≤k matrices is bounded as follows (This was essentially shown6 in [AFR85], the exact bound we use below is a refinement given in [Sre04]): f(n, m, k) ≤ 8e · 2 · nm k(n + m) k(n+m) . Setting n = m = a · k, we get f(n, n, n/a) ≤2(6+2 log2(e·a))·n2/a. Now, suppose that we allow additional up to r = αn2 signs of sign(P) to be flipped. In other words, we consider the set Sk n(r) of sign-patterns having Hamming distance at most r from any sign-pattern produced from a matrix of rank at most k. For a fixed sign-pattern, the number g(n, α) of matrices obtained by flipping at most r entries is the number of subsets of size r or less that can be flipped: g(n, α) = αn2 X i=0 n2 i  ≤2H(α)n2. Here, H denotes the binary entropy. The above bound holds for any α ≤1 2. Combining the two bounds described above, we can finally estimate the size of Sk n(r): |Sk n(r)| ≤f(n, n, n/a) · g(n, α) ≤2(6+2 log2(e·a))·n2/a · 2H(α)n2 = 2  6+2 log2(e·a) a +H(α)  n2 . Notice, that if the problem matrix M does not belong to Sk n(r), then our prediction matrix P will make more than r sign errors. We assumed that M is selected randomly from the set {−1, 1}n×n which contains 2n2 elements. From simple asymptotic analysis, we can conclude that for large enough n, the set Sk n(r) will be much smaller than {−1, 1}n×n, if the following condition holds: 6 + 2 log2(e · a) a + H(α) ≤1 −δ < 1. (1) In that case, the probability of a random problem matrix belonging to Sk n(r) is at most 2(1−δ)n2 2n2 = 2−δn2 −→0. We can numerically solve Inequality (1) for α by comparing the left-hand side expression to 1. Figure 4 shows the plot of α against the value of k n = a−1. From this, we can obtain the simple 6Note that they count {−1, 0, 1} sign patterns. However by mapping 0’s to 1’s we do not increase the number of sign patterns. 6 Figure 4: Lower bound for average error. The solid line is obtained by solving inequality (1). The dashed line is a simple linear bound. Figure 5: We plot the distance of the unit vector to a subspace formed by k randomly chosen instances. linear bound of 4( 1 20 −k n) = 1 5 −4 k n, because it satisfies the strict inequality for δ = 0.005. It is easy to estimate, that this bound will hold for n = 40 with probability approximately 0.996, and for larger n that probability converges to 1 even faster than exponentially. It remains to observe that each sign error incurs at least loss C, which gives us the desired bound for the average loss of the algorithm. 2 The technique used in our proof also gives an interesting insight into the rigidity of random matrices. Typically, the rigidity RM(r) of a matrix M is defined as the minimum number of entries that need to be changed to reduce the rank of M to r. In [FS06], a different rigidity measure, eRM(r), is considered, which only counts the sign-non-preserving changes. The bounds shown there depend on the SVD spectrum of a matrix. However, if we consider a random matrix, then a much stronger lower bound can be obtained with high probability: Corollary 4 For a random matrix M ∈{−1, 1}n×n and 0 < r < n, almost certainly the minimum number of sign-non-preserving changes to a matrix in Rn×n that is needed to reduce the rank of the matrix to r is at least eRM(r) ≥n2 5 −4rn. Note that the rigidity bound given in [FS06] also applies to our problem, if we use the Hadamard matrix as the problem matrix. In this case, the lower bound is much weaker and no longer linear. Notably, it implies that at least √n instances are needed to get the average loss down to zero (and this is conjectured to be tight for Hadamard matrices). In contrast our lower bound for random matrices assures that Ω(n) instances are required to get the average loss down to zero. 4 Random features In this section, we argue that the family of algorithms whose weight vector is a linear combination of the instances gets confused by random features. Assume we have n instances that are labeled by a single ±1 feature. We represent this feature as a single column. Now, we add random additional features. For the sake of concreteness, we add n −1 of them. So our learning problem is again described by an n dimensional square matrix: The n rows are the instances and the target is the unit vector e1. In Figure 5, we plot the average distance of the vector e1 to the subspace formed by a subset of k instances. This is the closest a linear combination of the k instances can get to the target. We show experimentally, that this distance is q 1 −k n on average. This means, that the target e1 cannot be expressed by linear combinations of instances until essentially all instances are seen (i.e. k is close to n). 7 It is also very important to understand that expanding the instances using a feature map can be costly because a few random features may be expanded into many “weakly random” features that are still random enough to confuse the family of algorithms that predict with linear combination of instances. For example, using a polynomial kernel, n random features may be expanded to nd features and now the sample complexity grows with nd instead of n. 5 Open problems regarding neural networks We believe that our hardness results for picking single features out of random vectors carry over to feed forward neural nets provided that they are trained with Gradient Descent (Backpropatation) regularized with the squared Euclidean distance (Weight Decay). More precisely, we conjecture that if we restrict ourself to Gradient Descent with squared Euclidean distance regularization, then additional layers cannot improve the average loss on the problem described in Figure 1 and the bounds from Theorem 3 still hold. On the other hand if 1-norm regularization is used, then Gradient Descent behaves more like the Exponentiated Gradient algorithm and the hardness result can be avoided. One can view the feature vectors arriving at the output node as an expansion of the input instances. Our lower bounds already hold for fixed expansions (i.e. the same expansion must be used for all targets). In the neural net setting the expansion arriving at the output node is adjusted during training and our techniques for proving hardness results fail in this case. However, we conjecture that the features learned from the k training examples cannot help to improve its average performance, provided its training algorithm is based on the Gradient Descent or Weight Decay heuristic. Note that our conjecture is not fully specified: what initialization is used, which transfer functions, are there bias terms, etc. We believe that the conjecture is robust to many of those details. We have tested our conjecture on neural nets with various numbers of layers and standard transfer functions (including the rectifier function). Also in our experiments, the dropout heuristic [HSK+12] did not improve the average loss. However at this point we have only experimental evidence which will always be insufficient to prove such a conjecture. It is also an interesting question to study whether random features can confuse a feed forward neural net that is trained with Gradient Descent. Additional layers may hurt such training algorithms when some random features are in the input. We conjecture that any such algorithm requires at least O(1) additional examples per random redundant feature to achieve the same average accuracy. References [AFR85] N. Alon, P. Frankl, and V. R¨odel. Geometrical realization of set systems and probabilistic commnunication complexity. In Proceedings of the 26th Annual Symposium on the Foundations of Computer Science (FOCS), pages 277–280, Portland, OR, USA, 1985. IEEE Computer Society. [BBS08] Maria-Florina Balcan, Avrim Blum, and Nathan Srebro. Improved Guarantees for Learning via Similarity Functions. In Rocco A. Servedio and Tong Zhang, editors, COLT, pages 287–298. Omnipress, 2008. [BDES02] S. Ben-David, N. Eiron, and H. U. Simon. Limitations of learning via embeddings in Euclidean half-spaces. Journal of Machine Learning Research, 3:441–461, November 2002. [FS02] J. Forster and H. U. Simon. On the smallest possible dimension and the largest possible margin of linear arrangements representing given concept classes. In Proceedings of the 13th International Conference on Algorithmic Learning Theory, number 2533 in Lecture Notes in Computer Science, pages 128–138, London, UK, 2002. Springer-Verlag. [FS06] J. Forster and H. U. Simon. On the smallest possible dimension and the largest possible margin of linear arrangements representing given concept classes. Theor. Comput. Sci., pages 40–48, 2006. [HKW99] D. P. Helmbold, J. Kivinen, and M. K. Warmuth. Relative loss bounds for single neurons. IEEE Transactions on Neural Networks, 10(6):1291–1304, November 1999. 8 [HSK+12] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. CoRR, abs/1207.0580, 2012. [KW71] G. S. Kimeldorf and G. Wahba. Some results on Tchebycheffian Spline Functions. J. Math. Anal. Applic., 33:82–95, 1971. [KW97a] J. Kivinen and M. K. Warmuth. Additive versus Exponentiated Gradient updates for linear prediction. Information and Computation, 132(1):1–64, January 1997. [KW97b] J. Kivinen and M. K. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–64, January 1997. [KWA97] J. Kivinen, M. K. Warmuth, and P. Auer. The perceptron algorithm vs. winnow: linear vs. logarithmic mistake bounds when few input variables are relevant. Artificial Intelligence, 97:325–343, December 1997. [Ng04] A. Y. Ng. Feature selection, L1 vs. L2 regularization, and rotational invariance. In Proceedings of Twentyfirst International Conference in Machine Learning, pages 615– 622, Banff, Alberta, Canada, 2004. ACM Press. [SHS01] B. Sch¨olkopf, R. Herbrich, and A. J. Smola. A generalized Representer Theorem. In D. P. Helmbold and B. Williamson, editors, Proceedings of the 14th Annual Conference on Computational Learning Theory, number 2111 in Lecture Notes in Computer Science, pages 416–426, London, UK, 2001. Springer-Verlag. [Sre04] N. Srebro. Learning with Matrix Factorizations. PhD thesis, Massachusetts Institute of Technology, 2004. [WKZ14] M. K. Warmuth, W. Kotłowski, and S. Zhou. Kernelization of matrix updates. Journal of Theoretical Computer Science, 2014. Special issue for the 23nd International Conference on Algorithmic Learning Theory (ALT 12), to appear. [WV05] M. K. Warmuth and S.V.N. Vishwanathan. Leaving the span. In Proceedings of the 18th Annual Conference on Learning Theory (COLT ’05), Bertinoro, Italy, June 2005. Springer-Verlag. 9
2014
245
5,342
Finding a sparse vector in a subspace: Linear sparsity using alternating directions Qing Qu, Ju Sun, and John Wright {qq2105, js4038, jw2966}@columbia.edu Dept. of Electrical Engineering, Columbia University, New York City, NY, USA, 10027 Abstract We consider the problem of recovering the sparsest vector in a subspace S ∈Rp with dim (S) = n. This problem can be considered a homogeneous variant of the sparse recovery problem, and finds applications in sparse dictionary learning, sparse PCA, and other problems in signal processing and machine learning. Simple convex heuristics for this problem provably break down when the fraction of nonzero entries in the target sparse vector substantially exceeds 1/√n. In contrast, we exhibit a relatively simple nonconvex approach based on alternating directions, which provably succeeds even when the fraction of nonzero entries is Ω(1). To our knowledge, this is the first practical algorithm to achieve this linear scaling. This result assumes a planted sparse model, in which the target sparse vector is embedded in an otherwise random subspace. Empirically, our proposed algorithm also succeeds in more challenging data models arising, e.g., from sparse dictionary learning. 1 Introduction Suppose we are given a linear subspace S of a high-dimensional space Rp, which contains a sparse vector x0 ̸= 0. Given arbitrary basis of S, can we efficiently recover x0? Equivalently, provided a matrix A ∈R(p−n)×p, can we efficiently find a nonzero sparse vector x such that Ax = 0? In the language of sparse approximation, can we solve min x ∥x∥0 s.t. Ax = 0, x ̸= 0 ? (1) Variants of this problem have been studied in the context of applications to numerical linear algebra [15], graphical model learning [27], nonrigid structure from motion [16], spectral estimation and Prony’s problem [11], sparse PCA [29], blind source separation [28], dictionary learning [24], graphical model learning [3], and sparse coding on manifolds [21]. However, in contrast to the standard sparse regression problem (Ax = b, b ̸= 0), for which convex relaxations perform nearly optimally for broad classes of designs A [14, 18], the computational properties of problem (1) are not nearly as well understood. It has been known for several decades that the basic formulation min x ∥x∥0 , s.t. x ∈S \ {0}, (2) is NP-hard [15]. However, it is only recently that efficient computational surrogates with nontrivial recovery guarantees have been discovered. In the context of sparse dictionary learning, Spielman et al. [24] introduced a relaxation which replaces the nonconvex problem (2) with a sequence of linear programs: min x ∥x∥1 , s.t. xi = 1, x ∈S, 1 ≤i ≤p, (3) and proved that when S is generated as a span of n random sparse vectors, with high probability the relaxation recovers these vectors, provided the probability of an entry being nonzero is at most θ ∈O (1/√n). 1 In a planted sparse model, in which S consists of a single sparse vector x0 embedded in a “generic” subspace, Hand et al. proved that (3) also correctly recovers x0, provided the fraction of nonzeros in x0 scales as θ ∈O (1/√n) [19]. Unfortunately, the results of [24, 19] are essentially sharp: when θ substantially exceeds 1/√n, in both models the relaxation (3) provably breaks down. Moreover, the most natural semidefinite programming relaxation of (1), min X ∥X∥1 , s.t. A⊤A, X = 0, trace[X] = 1, X ⪰0. (4) also breaks down at exactly the same threshold of θ ∼1/√n.1 One might naturally conjecture that this 1/√n threshold is simply an intrinsic price we must pay for having an efficient algorithm, even in these random models. Some evidence towards this conjecture might be borrowed from the surface similarity of (2)-(4) and sparse PCA [29]. In sparse PCA, there is a substantial gap between what can be achieved with efficient algorithms and the information theoretic optimum [10]. Is this also the case for recovering a sparse vector in a subspace? Is θ ∈O (1/√n) simply the best we can do with efficient, guaranteed algorithms? Remarkably, this is not the case. Recently, Barak et al. introduced a new rounding technique for sum-of-squares relaxations, and showed that the sparse vector x0 in the planted sparse model can be recovered when p ≥Ω n2 and θ ≥Ω(1) [8]. It is perhaps surprising that this is possible at all with a polynomial time algorithm. Unfortunately, the runtime of this approach is a high-degree polynomial in p, and so for machine learning problems in which p is either a feature dimension or sample size, this algorithm is of theoretical interest only. However, it raises an interesting algorithmic question: Is there a practical algorithm that provably recovers a sparse vector with θ ≫1/√n nonzeros from a generic subspace S? In this paper, we address this problem, under the following hypotheses: we assume the planted sparse model, in which a target sparse vector x0 is embedded in an otherwise random n-dimensional subspace of Rp. We allow x0 to have up to θ0p nonzero entries, where θ0 is a constant. We provide a relatively simple algorithm which, with very high probability, exactly recovers x0, provided that p ≥Ω n4 log2 n  . Our algorithm is based on alternating directions, with two special twists. First, we introduce a special data driven initialization, which seems to be important for achieving θ = Ω(1). Second, our theoretical results require a second, linear programming based rounding phase, which is similar to [24]. Our core algorithm has very simple iterations, of linear complexity in the size of the data, and hence should be scalable to moderate-to-large scale problems. In addition to enjoying theoretical guarantees in a regime (θ = Ω(1)) that is out of the reach of previous practical algorithms, it performs well in simulations – succeeding empirically with p ≥Ω(n log n). It also performs well empirically on more challenging data models, such as the dictionary learning model, in which the subspace of interest contains not one, but n target sparse vectors. Breaking the O(1/√n) sparsity barrier with a practical algorithm is an important open problem in the nascent literature on algorithmic guarantees for dictionary learning [5, 4, 2, 1]. We are optimistic that the techniques introduced here will be applicable in this direction. 2 Problem Formulation and Global Optimality We study the problem of recovering a sparse vector x0 ̸= 0 (up to scale), which is an element of a known subspace S ⊂Rp of dimension n, provided an arbitrary orthonormal basis Y ∈Rp×n for S. Our starting point is the nonconvex formulation (2). Both the objective and constraint are nonconvex, and hence not easy to optimize over. We relax (2) by replacing the ℓ0 norm with the ℓ1 norm. For the constraint x ̸= 0, which is necessary to avoid a trivial solution, we force x to live on the unit sphere ∥x∥2 = 1, giving min x ∥x∥1 , s.t. x ∈S, ∥x∥2 = 1. (5) 1This breakdown behavior is again in sharp contrast to the standard sparse approximation problem (with b ̸= 0), in which it is possible to handle very large fractions of nonzeros (say, θ = Ω(1/ log n), or even θ = Ω(1)) using a very simple ℓ1 relaxation [14, 18] 2 This formulation is still nonconvex, and so we should not expect to obtain an efficient algorithm that can solve it globally for general inputs S. Nevertheless, the geometry of the sphere is benign enough that for well-structured inputs it actually will be possible to give algorithms that find the global optimum of this problem. The formulation (5) can be contrasted with (3), in which we optimize the ℓ1 norm subject to the constraint ∥x∥∞= 1. Because ∥·∥∞is polyhedral, that formulation immediately yields a sequence of linear programs. This is very convenient for computation and analysis, but suffers from the aforementioned breakdown behavior around ∥x0∥0 ∼p/√n. In contrast, the sphere ∥x∥2 = 1 is a more complicated geometric constraint, but will allow much larger numbers of nonzeros in x0. For example, if we consider the global optimizer of a variant of (5): min q∈Rn ∥Yq∥1 , s.t. ∥q∥2 = 1, (6) under the planted sparse model (detailed below), e1 is the unique to (6) with very high probability: Theorem 2.1 (ℓ1/ℓ2 recovery, planted sparse model). There exists a constant θ0 ∈(1/√n, 1/2) such that if the subspace S follows the planted sparse model S = span (x0, g1, . . . , gn−1) ⊂Rp, (7) with gi ∼i.i.d. N(0, 1/p), and x0 ∼i.i.d. 1 √θpBer(θ), with x0, g1, . . . , gn−1 mutually independent and 1/√n < θ < θ0, then ±e0 are the only global minimizers to (6) if Y = [x0, g1, . . . , gn−1], provided p ≥Ω(n log n). Hence, if we could find the global optimizer of (6), we would be able to recover x0 whose number of nonzero entries is quite large – even linear in the dimension p (θ = Ω(1)). On the other hand, it is not obvious that this should be possible: (6) is nonconvex. In the next section, we will describe a simple heuristic algorithm for (a near approximation of) the ℓ1/ℓ2 problem (6), which guarantees to find a stationary point. More surprisingly, we will then prove that for a class of random problem instances, this algorithm, plus an auxiliary rounding technique, actually recovers the global optimum – the target sparse vector x0. The proof requires a detailed probabilistic analysis, which is sketched in Section 4.2. Before continuing, it is worth noting that the formulation (5) is in no way novel – see, e.g., the work of [28] in blind source separation for precedent. However, the novelty originates from our algorithms and subsequent analysis. 3 Algorithm based on Alternating Direction Method (ADM) To develop an algorithm for solving (6), we work with the orthonormal basis Y ∈Rp×n for S. For numerical purposes, and also for coping with noise in practical application, it is useful to consider a slight relaxation of (6), in which we introduce an auxiliary variable x ≈Yq: min q,x 1 2 ∥Yq −x∥2 2 + λ ∥x∥1 , s.t. ∥q∥2 = 1, (8) Here, λ > 0 is a penalty parameter. It is not difficult to see that this problem is equivalent to minimizing the Huber m-estimator over Yq. This relaxation makes it possible to apply alternating direction method to this problem, which, starting from some initial point q(0), alternates between optimizing with respect to x and optimizing with respect to q: x(k+1) = arg min x 1 2 Yq(k) −x 2 2 + λ ∥x∥1 , (9) q(k+1) = arg min q 1 2 Yq −x(k+1) 2 2 s.t. ∥q∥2 = 1. (10) Both (9) and (10) have simple closed form solutions: x(k+1) = Sλ[Yq(k)], q(k+1) = Y⊤x(k+1) Y⊤x(k+1) 2 , (11) 3 Algorithm 1 Nonconvex ADM Input: A matrix Y ∈Rp×n with Y⊤Y = I, initialization q(0), threshold λ > 0. Output: The recovered sparse vector ˆx0 = Yq(k) 1: Set k = 0, 2: while not converged do 3: x(k+1) = Sλ[Yq(k)], 4: q(k+1) = Y⊤x(k+1) ∥Y⊤x(k+1)∥2 , 5: Set k = k + 1. 6: end while where Sλ [x] = sign(x) max {|x| −λ, 0} is the soft-thresholding operator. The proposed ADM algorithm is summarized in Algorithm 1. For general input Y and initialization q(0), Algorithm 1 is guaranteed to produce a stationary point of problem (8). This is a consequence of recent general analyses of alternating direction methods for nonsmooth and nonconvex problems – see [6, 7]. However, if our goal is to recover the sparsest vector x0, some additional tricks are needed. Initialization. Because the problem (6) is nonconvex, an arbitrary or random initialization is unlikely to produce a global minimizer.2 Therefore, good initializations are critical for the proposed ADM algorithm to succeed. For this purpose, we suggest to use every normalized row of Y as initializations for q, and solve a sequence of p nonconvex programs (6) by the ADM algorithm. To get an intuition of why our initialization works, recall the planted sparse model: S = span(x0, g1, . . . , gn−1). Write Z = [x0 | g1 | · · · | gn−1] ∈Rp×n. Suppose we take a row zi of Z, in which x0(i) is nonzero, then x0(i) = Θ 1/√θp  . Meanwhile, the entries of g1(i), . . . gn−1(i) are all N(0, 1/p), and so have size about 1/√p. Hence, when θ is not too large, x0(i) will be somewhat bigger than most of the other entries in zi. Put another way, zi is biased towards the first standard basis vector e1. Now, under our probabilistic assumptions, Z is very well conditioned: Z⊤Z ≈I.3 Using, e.g., Gram-Schmidt, we can find a basis ¯Y for S of the form ¯Y = ZR, (12) where R is upper triangular, and R is itself well-conditioned: R ≈I. Since the i-th row of Z is biased in the direction of e1 and R is well-conditioned, the i-th row ¯yi is also biased in the direction of e1. We know that the global optimizer q⋆should satisfy ¯Yq⋆= x0. Since Ze1 = x0, we have q⋆= R−1e1 ≈e1. Here, the approximation comes from R ≈I. Hence, for this particular choice of Y, described in (12), the i-th row is biased in the direction of the global optimizer. This is what makes the rows of Y a particularly effective choice for initialization. What if we are handed some other basis Y = ¯YU, where U is an orthogonal matrix? Suppose q⋆is a global optimizer to (6) with input matrix ¯Y, then it is easy to check that, with input matrix Y, U⊤q⋆is also a global optimizer to (6), which implies that our initialization is invariant to any rotation of the basis. Hence, even if we are handed an arbitrary basis for S, the i-th row is still biased in the direction of the global optimizer. Rounding. Let ¯q denote the output of Algorithm 1. We will prove that with our particular initialization and an appropriate choice of λ, the solution of our ADM algorithm falls within a certain radius of the globally optimal solution q⋆to (6). To recover q⋆, or equivalently to recover the sparse vector x0 = Yq⋆, we solve the linear program min q ∥Yq∥1 s.t. ⟨r, q⟩= 1, (13) 2More precisely, in our models, random initialization does work, but only when the subspace dimension n is extremely low compared to the ambient dimension p. 3This is the common heuristic that “tall random matrices are well conditioned” [25]. 4 with r = ¯q. We will prove that if r is close enough to q⋆, then this relaxation exactly recovers q⋆, and hence x0. 4 Analysis 4.1 Main Results In this section, we describe our main theoretical result, which shows that with high probability, the algorithm described in the previous section succeeds. Theorem 4.1. Suppose that S satisfies the planted sparse model, and let Y be an arbitrary basis for S. Let y1 . . . yp ∈Rn denote the (transposes of) the rows of Y. Apply Algorithm 1 with λ = 1/√p, using initializations q(0) = y1, . . . , yp, to produce outputs ¯q1, . . . , ¯qp. Solve the linear program (13) with r = ¯q1, . . . , ¯qp, to produce ˆq1, . . . , ˆqp. Set i⋆∈arg mini ∥Yˆqi∥0. Then Yˆqi⋆= γx0, (14) for some γ ̸= 0, with overwhelming probability, provided p > Cn4 log2 n, and 1 4√n ≤θ ≤θ0. (15) Here, C and θ0 > 0 are universal constants. We can see that the result in Theorem 4.1 is suboptimal compared to the global optimality condition and Barak et al.’s result in the sense of the sampling complexity that we require p ≥Cn4 log2 n. While for the global optimality condition, we only need p > Cn to guarantee a global optimal solution exists with high probability. For Barak et al.’s result, we need p > Cn2. Nonetheless, compared to Barak et al., we believe this is the first practical and efficient method that is guaranteed to achieve θ ∼O(1) rate. The lower bound on θ in Theorem 4.1 is mostly for convenience in the proof; in fact, the LP rounding stage of our algorithm already succeeds with high probability when θ ∈O (1/√n). 4.2 A Sketch of Analysis The proof of our main result requires rather detailed technical analysis of the iteration-by-iteration properties of Algorithm 1. In this subsection, we briefly sketch the main ideas. For detailed proofs, please see the technical supplement to this paper. As noted in Section 3, the ADM algorithm is invariant to change of basis. So, we can assume without loss of generality that we are working with the particular basis ¯Y = ZR defined in that section. In order to further streamline the presentation, we are going to sketch the proof under the assumption that Y = [x0 | g1 | · · · | gn−1], (16) rather than the orthogonalized version ¯Y. This may seem plausible, but when p is large Y is already nearly orthogonal, and hence Y is very close to ¯Y. In fact, in our proof, we simply carry through the argument for Y, and then note that Y and ¯Y are close enough that all steps of the proof still hold with Y replaced by ¯Y. With that noted, let y1, . . . , yp ∈Rn denote the transposes of the rows of Y, and note that these are independent random vectors. From (11), we can see one step of the ADM algorithm takes the form: q(k+1) = 1 p Pp i=1 yiSλ[ yi⊤q(k)] 1 p Pp i=1 yiSλ[(yi)⊤q(k)] 2 . (17) This is a very favorable form for analysis: if q is viewed as fixed, the term in the numerator is a sum of p independent random vectors. To this end, we define a vector valued random process Q(q) on q ∈Sn−1, via Q(q) = 1 p p X i=1 yiSλ[ yi⊤q]. (18) 5 We study the behavior of the iteration (17) through the random process Q(q). We wish to show that w.h.p. in our choice of Y, q(k) converges to (±e1), so that the algorithm successfully retrieves the sparse vector x0 = Ye1. Thus, we hope that in general, Q(q) is more concentrated on the first coordinate than q. Let us partition the vector q as q =  q1 q2  , with q1 ∈R and q2 ∈Rn−1, and correspondingly partition Q(q) =  Q1(q) Q2(q)  , where Q1(q) = 1 p p X i=1 x0iSλ hyi⊤q i and Q2(q) = 1 p p X i=1 giSλ hyi⊤q i . (19) The inner product of Q(q)/ ∥Q(q)∥2 and e1 is strictly larger than the inner product of q and e1 if and only if |Q1(q)| |q1| > ∥Q2(q)∥2 ∥q2∥2 . (20) In the appendix, we show that with high probability, this inequality holds uniformly over a significant portion of the sphere, so the algorithm moves in the correct direction. To complete the proof of Theorem 4.1, we combine the following observations: 1. Algorithm 1 converges. 2. Rounding succeeds when |r1| > 2 √ θ. With high probability, the linear programming based rounding (13) will produce ±x0, up to scale, whenever it is provided with an input r whose first coordinate has magnitude at least 2 √ θ. 3. No jumps away from the caps. With high probability, for all q such that |q|1 > C⋆ √ θ, |Q1(q)| q |Q1(q)2| + ∥Q2(q)∥2 2 ≥2 √ θ. (21) 4. Uniform progress away from the equator. With high probability, for every q such that 1 2 √ θn ≤ |q1| ≤C⋆ √ θ, the bound |Q1(q)| |q1| −∥Q2(q)∥2 ∥q∥2 > c np (22) holds. This implies that if at any iteration k of the algorithm, |q(k) 1 | > 1 2 √ θn, the algorithm will eventually obtain a point q(k′), k′ > k, for which |q(k′) 1 | > C⋆ √ θ.4 5. Location of stationary points. Steps 1, 3 and 4 above imply that if Algorithm 1 ever obtains a point q(k) with |q(k) 1 | > 1 2 √ θn, it will converge to a point ¯q with ¯q1 > C⋆ √ θ, provided 1 2 √ θn < 2 √ θ (i.e., θ > 1 4√n). 6. Good initializers. With high probability, at least one of the initializers q(0) satisfies |q(0) 1 | > 1 2 √ θn. Taken together, these claims imply that from at least one of the initializers q(0), the ADM algorithm will produce an output ¯q which is accurate enough for LP rounding to exactly return x0, up to scale. As x0 is the sparsest nonzero vector in the subspace S with overwhelming probability, it will be selected as Yqi⋆, and hence produced by the algorithm. 5 Experimental Results In this section, we show the performance of the proposed ADM algorithm on both synthetic and real datasets. On the synthetic dataset, we show the phase transition of our algorithm on both the planted sparse vector and dictionary learning models; for the real dataset, we demonstrate how seeking sparse vectors can help discover interesting patterns. 4In fact, the rate of progress guaranteed in (22) can be used to bound the complexity of the algorithm; we do not dwell on this here. 6 5.1 Phase Transition on Synthetic Data For the planted sparse model, for each pair of (k, p), we generate the n dimensional subspace S ∈Rp by a k sparse vector x0 with nonzero entries equal to 1 and a random Gaussian matrix G ∈Rp×(n−1) with Gij i.i.d. ∼N(0, 1/p), so that the basis Yof the subspace S can be constructed by Y = GS ([x0, G]) U, where GS (·) denotes the Gram-Schmidt orthonormalization operator and U ∈Rn×n is an arbitrary orthogonal matrix. We fix the relationship between n and p as p = 5n log n, and set the regularization parameter in (8) as λ = 1/√p. We use all the normalized rows of Y as initializations of q for the proposed ADM algorithm, and run every program for 5000 iterations. We assume the proposed method to be success whenever x0 ∥x0∥2 −Yq 2 ≤ϵ for at least one of the p programs, for some error tolerance ϵ = 10−3. For each pair of (k, p), we repeat the simulation for 5 times. Figure 1: Phase transition for the planted sparse model (left) and dictionary learning (right) using the ADM algorithm, with fixed relationship between p and n: p = 5n log n. White indicates success and black indicates failure. Second, we consider the same dictionary learning model as in [24]. Specifically, the observation is assumed to be Y = A0X0where A0 is a square, invertible matrix, and X0 a n × p sparse matrix. Since A0 is invertible, the row space of Y is the same as that of X0. For each pair of (k, n), we generate X0 = [x1, · · · , xn]⊤, where each vector xi ∈Rp is k-sparse with every nonzero entry following i.i.d. Gaussian distribution, and construct the observation by Y⊤= GS X⊤ 0  U⊤. We repeat the same experiment as for the planted sparse model presented above. The only difference is that we assume the proposed method to be success as long as one sparse row of X0 is recovered by those p programs. Fig. 1 shows the phase transition between the sparsity level k = θp and p for both models. It seems clear for both problems our algorithm can work well into (beyond) the linear regime in sparsity level. Hence for the planted sparse model, to close the gap between our algorithm and practice is one future direction. Also, how to extend our analysis for dictionary learning is another interesting direction. 5.2 Exploratory Experiments on Faces It is well known in computer vision convex objects only subject to illumination changes produce image collection that can be well approximated by low-dimensional space in raw-pixel space [9]. We will play with face subspaces here. First, we extract face images of one person (65 images) under different illumination conditions. Then we apply robust principal component analysis [12] to the data and get a low dimensional subspace of dimension 10, i.e., the basis Y ∈R32256×10. We apply the ADM algorithm to find the sparsest element in such a subspace, by randomly selecting 10% rows as initializations for q. We judge the sparsity in a ℓ1/ℓ2 sense, that is, the sparsest vector ˆx0 = Yq∗should produce the smallest ∥Yq∥1 / ∥Yq∥2 among all results. Once some sparse vectors are found, we project the subspace onto orthogonal complement of the sparse vectors already found, and continue the seeking process in the projected subspace. Fig. 2 shows the first four sparse vectors we get from the data. We can see they correspond well to different extreme illumination conditions. Second, we manually select ten different persons’ faces under the normal lighting condition. Again, the dimension of the subspace is 10 and Y ∈R32256×10. We repeat the same experiment as stated above. Fig. 3 shows four sparse vectors we get from the data. Interestingly, the sparse vectors roughly 7 Figure 2: Four sparse vectors extracted by the ADM algorithm for one person in the Yale B database under different illuminations. correspond to differences of face images concentrated around facial parts that different people tend to differ from each other. Figure 3: Four sparse vectors extracted by the ADM algorithm for 10 persons in the Yale B database under normal illuminations. In sum, our algorithm seems to find useful sparse vectors for potential applications, like peculiar discovery in first setting, and locating differences in second setting. Netherless, the main goal of this experiment is to invite readers to think about similar pattern discovery problems that might be cast as searching for a sparse vector in a subspace. The experiment also demonstrates in a concrete way the practicality of our algorithm, both in handling data sets of realistic size and in producing attractive results even outside of the (idealized) planted sparse model that we adopt for analysis. 6 Discussion The random models we assume for the subspace can be easily extended to other random models, particularly for dictionary learning. Moreover we believe the algorithm paradigm works far beyond the idealized models, as our preliminary experiments on face data have clearly shown. For the particular planted sparse model, the performance gap in terms of (p, n, θ) between the empirical simulation and our result is likely due to analysis itself. Advanced techniques to bound the empirical process, such as decoupling [17] techniques, can be deployed in place of our crude union bound to cover all iterates. Our algorithmic paradigm as a whole sits well in the recent surge of research endeavors in provable and practical nonconvex approaches towards many problems of interest, often in large-scale setting [13, 22, 20, 23, 26]. We believe this line of research will become increasingly important in theory and practice. On the application side, the potential of seeking sparse/structured element in a subspace seems largely unexplored, despite the cases we mentioned at the start. We hope this work can invite more application ideas. References [1] AGARWAL, A., ANANDKUMAR, A., JAIN, P., NETRAPALLI, P., AND TANDON, R. Learning sparsely used overcomplete dictionaries via alternating minimization. arXiv preprint arXiv:1310.7991 (2013). [2] AGARWAL, A., ANANDKUMAR, A., AND NETRAPALLI, P. Exact recovery of sparsely used overcomplete dictionaries. arXiv preprint arXiv:1309.1952 (2013). [3] ANANDKUMAR, A., HSU, D., JANZAMIN, M., AND KAKADE, S. M. When are overcomplete topic models identifiable? uniqueness of tensor tucker decompositions with structured sparsity. In Advances in Neural Information Processing Systems (2013), pp. 1986–1994. 8 [4] ARORA, S., BHASKARA, A., GE, R., AND MA, T. More algorithms for provable dictionary learning. arXiv preprint arXiv:1401.0579 (2014). [5] ARORA, S., GE, R., AND MOITRA, A. New algorithms for learning incoherent and overcomplete dictionaries. arXiv preprint arXiv:1308.6273 (2013). [6] ATTOUCH, H., BOLTE, J., REDONT, P., AND SOUBEYRAN, A. Proximal alternating minimization and projection methods for nonconvex problems: An approach based on the kurdyka-lojasiewicz inequality. Mathematics of Operations Research 35, 2 (2010), 438–457. [7] ATTOUCH, H., BOLTE, J., AND SVAITER, B. F. Convergence of descent methods for semi-algebraic and tame problems: proximal algorithms, forward–backward splitting, and regularized gauss–seidel methods. Mathematical Programming 137, 1-2 (2013), 91–129. [8] BARAK, B., KELNER, J., AND STEURER, D. Rounding sum-of-squares relaxations. arXiv preprint arXiv:1312.6652 (2013). [9] BASRI, R., AND JACOBS, D. W. Lambertian reflectance and linear subspaces. Pattern Analysis and Machine Intelligence, IEEE Transactions on 25, 2 (2003), 218–233. [10] BERTHET, Q., AND RIGOLLET, P. Complexity theoretic lower bounds for sparse principal component detection. In Conference on Learning Theory (2013), pp. 1046–1066. [11] BEYLKIN, G., AND MONZ ´ON, L. On approximation of functions by exponential sums. Applied and Computational Harmonic Analysis 19, 1 (2005), 17–48. [12] CAND`ES, E., LI, X., MA, Y., AND WRIGHT, J. Robust principal component analysis? Journal of the ACM 58, 3 (May 2011). [13] CAND`ES, E. J., LI, X., AND SOLTANOLKOTABI, M. Phase retrieval via wirtinger flow: Theory and algorithms. arXiv preprint arXiv:1407.1065 (2014). [14] CANDES, E. J., AND TAO, T. Decoding by linear programming. Information Theory, IEEE Transactions on 51, 12 (2005), 4203–4215. [15] COLEMAN, T. F., AND POTHEN, A. The null space problem i. complexity. SIAM Journal on Algebraic Discrete Methods 7, 4 (1986), 527–537. [16] DAI, Y., LI, H., AND HE, M. A simple prior-free method for non-rigid structure-from-motion factorization. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on (2012), IEEE, pp. 2018– 2025. [17] DE LA PENA, V., AND GIN´E, E. Decoupling: from dependence to independence. Springer, 1999. [18] DONOHO, D. L. For most large underdetermined systems of linear equations the minimal ℓ1-norm solution is also the sparsest solution. Communications on pure and applied mathematics 59, 6 (2006), 797–829. [19] HAND, P., AND DEMANET, L. Recovering the sparsest element in a subspace. arXiv preprint arXiv:1310.1654 (2013). [20] HARDT, M. On the provable convergence of alternating minimization for matrix completion. arXiv preprint arXiv:1312.0925 (2013). [21] HO, J., XIE, Y., AND VEMURI, B. On a nonlinear generalization of sparse coding and dictionary learning. In Proceedings of The 30th International Conference on Machine Learning (2013), pp. 1480–1488. [22] JAIN, P., NETRAPALLI, P., AND SANGHAVI, S. Low-rank matrix completion using alternating minimization. In Proceedings of the 45th annual ACM symposium on Symposium on theory of computing (2013), ACM, pp. 665–674. [23] NETRAPALLI, P., JAIN, P., AND SANGHAVI, S. Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems (2013), pp. 2796–2804. [24] SPIELMAN, D. A., WANG, H., AND WRIGHT, J. Exact recovery of sparsely-used dictionaries. In Proceedings of the 25th Annual Conference on Learning Theory (2012). [25] VERSHYNIN, R. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027 (2010). [26] YI, X., CARAMANIS, C., AND SANGHAVI, S. Alternating minimization for mixed linear regression. arXiv preprint arXiv:1310.3745 (2013). [27] ZHAO, Y.-B., AND FUKUSHIMA, M. Rank-one solutions for homogeneous linear matrix equations over the positive semidefinite cone. Applied Mathematics and Computation 219, 10 (2013), 5569–5583. [28] ZIBULEVSKY, M., AND PEARLMUTTER, B. A. Blind source separation by sparse decomposition in a signal dictionary. Neural computation 13, 4 (2001), 863–882. [29] ZOU, H., HASTIE, T., AND TIBSHIRANI, R. Sparse principal component analysis. Journal of computational and graphical statistics 15, 2 (2006), 265–286. 9
2014
246
5,343
Scalable Kernel Methods via Doubly Stochastic Gradients Bo Dai1, Bo Xie1, Niao He1, Yingyu Liang2, Anant Raj1, Maria-Florina Balcan3, Le Song1 1Georgia Institute of Technology {bodai, bxie33, nhe6, araj34}@gatech.edu, lsong@cc.gatech.edu 2Princeton University 3Carnegie Mellon University yingyul@cs.princeton.edu ninamf@cs.cmu.edu Abstract The general perception is that kernel methods are not scalable, so neural nets become the choice for large-scale nonlinear learning problems. Have we tried hard enough for kernel methods? In this paper, we propose an approach that scales up kernel methods using a novel concept called “doubly stochastic functional gradients”. Based on the fact that many kernel methods can be expressed as convex optimization problems, our approach solves the optimization problems by making two unbiased stochastic approximations to the functional gradient—one using random training points and another using random features associated with the kernel—and performing descent steps with this noisy functional gradient. Our algorithm is simple, need no commit to a preset number of random features, and allows the flexibility of the function class to grow as we see more incoming data in the streaming setting. We demonstrate that a function learned by this procedure after t iterations converges to the optimal function in the reproducing kernel Hilbert space in rate O(1/t), and achieves a generalization bound of O(1/ √ t). Our approach can readily scale kernel methods up to the regimes which are dominated by neural nets. We show competitive performances of our approach as compared to neural nets in datasets such as 2.3 million energy materials from MolecularSpace, 8 million handwritten digits from MNIST, and 1 million photos from ImageNet using convolution features. 1 Introduction The general perception is that kernel methods are not scalable. When it comes to large-scale nonlinear learning problems, the methods of choice so far are neural nets although theoretical understanding remains incomplete. Are kernel methods really not scalable? Or is it simply because we have not tried hard enough, while neural nets have exploited sophisticated design of feature architectures, virtual example generation for dealing with invariance, stochastic gradient descent for efficient training, and GPUs for further speedup? A bottleneck in scaling up kernel methods comes from the storage and computation cost of the dense kernel matrix, K. Storing the matrix requires O(n2) space, and computing it takes O(n2d) operations, where n is the number of data points and d is the dimension. There have been many great attempts to scale up kernel methods, including efforts in perspectives of numerical linear algebra, functional analysis, and numerical optimization. A common numerical linear algebra approach is to approximate the kernel matrix using low-rank factorizations, K ≈A⊤A, with A ∈Rr×n and rank r ⩽n. This low-rank approximation allows subsequent kernel algorithms to directly operate on A, but computing the approximation requires O(nr2 + nrd) operations. Many work followed this strategy, including Greedy basis selection techniques [1], Nystr¨om approximation [2] and incomplete Cholesky decomposition [3]. In practice, one observes that kernel methods with approximated kernel matrices often result in a few percentage of losses in performance. In fact, without further assumption on the regularity of the 1 kernel matrix, the generalization ability after using low-rank approximation is typically of order O(1/√r + 1/√n) [4, 5], which implies that the rank needs to be nearly linear in the number of data points! Thus, in order for kernel methods to achieve the best generalization ability, low-rank approximation based approaches immediately become impractical for big datasets because of their O(n3 + n2d) preprocessing time and O(n2) storage. Random feature approximation is another popular approach for scaling up kernel methods [6, 7]. The method directly approximates the kernel function instead of the kernel matrix using explicit feature maps. The advantage of this approach is that the random feature matrix for n data points can be computed in time O(nrd) using O(nr) storage, where r is the number of random features. Subsequent algorithms then only need to operate on an O(nr) matrix. Similar to low-rank kernel matrix approximation approach, the generalization ability of this approach is of the order O(1/√r+ 1/√n) [8, 9], which implies that the number of random features also needs to be O(n). Another common drawback of these two approaches is that adapting the solution from a small r to a large r′ is not easy if one wants to increase the rank of the approximated kernel matrix or the number of random features for better generalization ability. Special procedures need to be designed to reuse the solution obtained from a small r, which is not straightforward. Another approach that addresses the scalability issue rises from the optimization perspective. One general strategy is to solve the dual forms of kernel methods using the block-coordinate descent (e.g., [10, 11, 12]). Each iteration of this algorithm only incurs O(nrd) computation and O(nr) storage, where r is the block size. A second strategy is to perform functional gradient descent based on a batch of data points at each epoch (e.g., [13, 14]). Thus, the computation and storage in each iteration required are also O(nrd) and O(nr), respectively, where r is the batch size. These approaches can straightforwardly adapt to a different r without restarting the optimization procedure and exhibit no generalization loss since they do not approximate the kernel matrix or function. However, a serious drawback of these approaches is that, without further approximation, all support vectors need to be stored for testing, which can be as big as the entire training set! (e.g., kernel ridge regression and non-separable nonlinear classification problems.) In summary, there exists a delicate trade-off between computation, storage and statistics when scaling up kernel methods. Inspired by various previous efforts, we propose a simple yet general strategy that scales up many kernel methods using a novel concept called “doubly stochastic functional gradients”. Our method relies on the fact that most kernel methods can be expressed as convex optimization problems over functions in the reproducing kernel Hilbert spaces (RKHS) and solved via functional gradient descent. Our algorithm proceeds by making two unbiased stochastic approximations to the functional gradient, one using random training points and another using random functions associated with the kernel, and then descending using this noisy functional gradient. The key intuitions behind our algorithm originate from (i) the property of stochastic gradient descent algorithm that as long as the stochastic gradient is unbiased, the convergence of the algorithm is guaranteed [15]; and (ii) the property of pseudo-random number generators that the random samples can in fact be completely determined by an initial value (a seed). We exploit these properties and enable kernel methods to achieve better balances between computation, storage, and statistics. Our method interestingly integrates kernel methods, functional analysis, stochastic optimization, and algorithmic tricks, and it possesses a number of desiderata: Generality and simplicity. Our approach applies to many kernel methods such as kernel version of ridge regression, support vector machines, logistic regression and two-sample test as well as many different types of kernels such as shift-invariant, polynomial, and general inner product kernels. The algorithm can be summarized in just a few lines of code (Algorithm 1 and 2). For a different problem and kernel, we just need to replace the loss function and the random feature generator. Flexibility. While previous approaches based on random features typically require a prefix number of features, our approach allows the number of random features, and hence the flexibility of the function class to grow with the number of data points. Therefore, unlike previous random feature approach, our approach applies to the data streaming setting and achieves full potentials of nonparametric methods. Efficient computation. The key computation of our method comes from evaluating the doubly stochastic functional gradient, which involves the generation of the random features given specific seeds and also the evaluation of these features on a small batch of data points. At iteration t, the computational complexity is O(td). 2 Small memory. While most approaches require saving all the support vectors, the algorithm allows us to avoid keeping the support vectors since it only requires a small program to regenerate the random features and sample historical features according to some specific random seeds. At iteration t, the memory needed is O(t), independent of the dimension of the data. Theoretical guarantees. We provide novel and nontrivial analysis involving Hilbert space martingales and a newly proved recurrence relation, and demonstrate that the estimator produced by our algorithm, which might be outside of the RKHS, converges to the optimal RKHS function. More specifically, both in expectation and with high probability, our algorithm estimates the optimal function in the RKHS in the rate of O(1/t) and achieves a generalization bound of O(1/ √ t), which are indeed optimal [15]. The variance of the random features introduced in our second approximation to the functional gradient, only contributes additively to the constant in the convergence rate. These results are the first of the kind in literature, which could be of independent interest. Strong empirical performance. Our algorithm can readily scale kernel methods up to the regimes which are previously dominated by neural nets. We show that our method compares favorably to other scalable kernel methods in medium scale datasets, and to neural nets in big datasets with millions of data. In the remainder, we will first introduce preliminaries on kernel methods and functional gradients. We will then describe our algorithm and provide both theoretical and empirical supports. 2 Duality between Kernels and Random Processes Kernel methods owe their name to the use of kernel functions, k(x, x′) : X × X 7→R, which are symmetric positive definite (PD), meaning that for all n > 1, and x1, . . . , xn ∈X, and c1, . . . , cn ∈ R, we have Pn i,j=1 cicjk(xi, xj) ⩾0. There is an intriguing duality between kernels and stochastic processes which will play a crucial role in our algorithm design later. More specifically, Theorem 1 (e.g., Devinatz [16]; Hein & Bousquet [17]) If k(x, x′) is a PD kernel, then there exists a set Ω, a measure P on Ω, and random function φω(x) : X 7→R from L2(Ω, P), such that k(x, x′) = R Ωφω(x) φω(x′) dP(ω). Essentially, the above integral representation relates the kernel function to a random process ω with measure P(ω). Note that the integral representation may not be unique. For instance, the random process can be a Gaussian process on X with the sample function φω(x), and k(x, x′) is simply the covariance function between two point x and x′. If the kernel is also continuous and shift invariant, i.e., k(x, x′) = k(x −x′) for x ∈Rd, then the integral representation specializes into a form characterized by inverse Fourier transformation (e.g., [18, Theorem 6.6]), Theorem 2 (Bochner) A continuous, real-valued, symmetric and shift-invariant function k(x −x′) on Rd is a PD kernel if and only if there is a finite non-negative measure P(ω) on Rd, such that k(x −x′) = R Rd eiω⊤(x−x′) dP(ω) = R Rd×[0,2π] 2 cos(ω⊤x + b) cos(ω⊤x′ + b) d (P(ω) × P(b)) , where P(b) is a uniform distribution on [0, 2π], and φω(x) = √ 2 cos(ω⊤x + b). For Gaussian RBF kernel, k(x −x′) = exp(−∥x −x′∥2/2σ2), this yields a Gaussian distribution P(ω) with density proportional to exp(−σ2∥ω∥2/2); for the Laplace kernel, this yields a Cauchy distribution; and for the Martern kernel, this yields the convolutions of the unit ball [19]. Similar representations where the explicit form of φω(x) and P(ω) are known can also be derived for rotation invariant kernel, k(x, x′) = k(⟨x, x′⟩), using Fourier transformation on sphere [19]. For polynomial kernels, k(x, x′) = (⟨x, x′⟩+ c)p, a random tensor sketching approach can also be used [20]. Instead of finding the random processes P(ω) and functions φω(x) given kernels, one can go the reverse direction and construct kernels from random processes and functions (e.g., Wendland [18]). Theorem 3 If k(x, x′) = R Ωφω(x)φω(x′) dP(ω) for a nonnegative measure P(ω) on Ωand φω(x) : X 7→R from L2(Ω, P), then k(x, x′) is a PD kernel. For instance, φω(x) := cos(ω⊤ψθ(x)+b), where ψθ(x) can be a random convolution of the input x parametrized by θ. Another important concept is the reproducing kernel Hilbert space (RKHS). An RKHS H on X is a Hilbert space of functions from X to R. H is an RKHS if and only if there exists a k(x, x′) : X × X 7→R such that ∀x ∈X, k(x, ·) ∈H, and ∀f ∈H, ⟨f(·), k(x, ·)⟩H = f(x). If such a k(x, x′) exists, it is unique and it is a PD kernel. A function f ∈H if and only if ∥f∥2 H := ⟨f, f⟩H < ∞, and its L2 norm is dominated by RKHS norm, ∥f∥L2 ⩽∥f∥H . 3 3 Doubly Stochastic Functional Gradients Many kernel methods can be written as convex optimization problems over functions in the RKHS and solved using the functional gradient methods [13, 14]. Inspired by these previous work, we will introduce a novel concept called “doubly stochastic functional gradients” to address the scalability issue. Let l(u, y) be a scalar loss function convex of u ∈R. Let the subgradient of l(u, y) with respect to u be l′(u, y). Given a PD kernel k(x, x′) and the associated RKHS H, many kernel methods try to find a function f∗∈H which solves the optimization problem argmin f∈H R(f) := E(x,y)[l(f(x), y)] + ν 2 ∥f∥2 H ⇐⇒ argmin ∥f∥H⩽B(ν) E(x,y)[l(f(x), y)] (1) where ν > 0 is a regularization parameter, B(ν) is a non-increasing function of ν, and the data (x, y) follow a distribution P(x, y). The functional gradient ∇R(f) is defined as the linear term in the change of the objective after we perturb f by ϵ in the direction of g, i.e., R(f + ϵg) = R(f) + ϵ ⟨∇R(f), g⟩H + O(ϵ2). (2) For instance, applying the above definition, we have ∇f(x) = ∇⟨f, k(x, ·)⟩H = k(x, ·), and ∇∥f∥2 H = ∇⟨f, f⟩H = 2f. Stochastic functional gradient. Given a data point (x, y) ∼P(x, y) and f ∈H, the stochastic functional gradient of E(x,y)[l(f(x), y)] with respect to f ∈H is ξ(·) := l′(f(x), y)k(x, ·), (3) which is essentially a single data point approximation to the true functional gradient. Furthermore, for any g ∈H, we have ⟨ξ(·), g⟩H = l′(f(x), y)g(x). Inspired by the duality between kernel functions and random processes, we can make an additional approximation to the stochastic functional gradient using a random function φω(x) sampled according to P(ω). More specifically, Doubly stochastic functional gradient. Let ω ∼P(ω), then the doubly stochastic gradient of E(x,y)[l(f(x), y)] with respect to f ∈H is ζ(·) := l′(f(x), y)φω(x)φω(·). (4) Note that the stochastic functional gradient ξ(·) is in RKHS H but ζ(·) may be outside H, since φω(·) may be outside the RKHS. For instance, for the Gaussian RBF kernel, the random function φω(x) = √ 2 cos(ω⊤x + b) is outside the RKHS associated with the kernel function. However, these functional gradients are related by ξ(·) = Eω [ζ(·)], which lead to unbiased estimators of the original functional gradient, i.e., ∇R(f) = E(x,y) [ξ(·)] + vf(·), and ∇R(f) = E(x,y)Eω [ζ(·)] + vf(·). (5) We emphasize that the source of randomness associated with the random function is not present in the data, but artificially introduced by us. This is crucial for the development of our scalable algorithm in the next section. Meanwhile, it also creates additional challenges in the analysis of the algorithm which we will deal with carefully. 4 Doubly Stochastic Kernel Machines Algorithm 1: {αi}t i=1 = Train(P(x, y)) Require: P(ω), φω(x), l(f(x), y), ν. 1: for i = 1, . . . , t do 2: Sample (xi, yi) ∼P(x, y). 3: Sample ωi ∼P(ω) with seed i. 4: f(xi) = Predict(xi, {αj}i−1 j=1). 5: αi = −γil′(f(xi), yi)φωi(xi). 6: αj = (1 −γiν)αj for j = 1, . . . , i −1. 7: end for Algorithm 2: f(x) = Predict(x, {αi}t i=1) Require: P(ω), φω(x). 1: Set f(x) = 0. 2: for i = 1, . . . , t do 3: Sample ωi ∼P(ω) with seed i. 4: f(x) = f(x) + αiφωi(x). 5: end for The first key intuition behind our algorithm originates from the property of stochastic gradient descent algorithm that as long as the stochastic gradient is bounded and unbiased, the convergence of the algorithm is guaranteed [15]. In our algorithm, we will exploit this property and introduce two sources of randomness, one from data and another artificial, to scale up kernel methods. 4 The second key intuition behind our algorithm is that the random functions used in the doubly stochastic functional gradients will be sampled according to pseudo-random number generators, where the sequences of apparently random samples can in fact be completely determined by an initial value (a seed). Although these random samples are not the “true” random sample in the purest sense of the word, they suffice for our task in practice. To be more specific, our algorithm proceeds by making two stochastic approximation to the functional gradient in each iteration, and then descending using this noisy functional gradient. The overall algorithms for training and prediction are summarized in Algorithm 1 and 2. The training algorithm essentially just performs samplings of random functions and evaluations of doubly stochastic gradients and maintains a collection of real numbers {αi}, which is computationally efficient and memory friendly. A crucial step in the algorithm is to sample the random functions with “seed i”. The seeds have to be aligned between training and prediction, and with the corresponding αi obtained from each iteration. The learning rate γt in the algorithm needs to be chosen as O(1/t), as shown by our later analysis to achieve the best rate of convergence. For now, we assume that we have access to the data generating distribution P(x, y). This can be modified to sample uniformly randomly from a fixed dataset, without affecting the algorithm and the later convergence analysis. Let the sampled data and random function parameters be Dt := {(xi, yi)}t i=1 and ωt := {ωi}t i=1, respectively after t iteration. The function obtained by Algorithm 1 is a simple additive form of the doubly stochastic functional gradients ft+1(·) = ft(·) −γt(ζt(·) + νft(·)) = Xt i=1 ai tζi(·), ∀t > 1, and f1(·) = 0, (6) where ai t = −γi Qt j=i+1(1 −γjν) are deterministic values depending on the step sizes γj(i ⩽j ⩽ t) and regularization parameter ν. This simple form makes it easy for us to analyze its convergence. We note that our algorithm can also take a mini-batch of points and random functions at each step, and estimate an empirical covariance for preconditioning to achieve potentially better performance. 5 Theoretical Guarantees In this section, we will show that, both in expectation and with high probability, our algorithm can estimate the optimal function in the RKHS with rate O(1/t) and achieve a generalization bound of O(1/ √ t). The analysis for our algorithm has a new twist compared to previous analysis of stochastic gradient descent algorithms, since the random function approximation results in an estimator which is outside the RKHS. Besides the analysis for stochastic functional gradient descent, we need to use martingales and the corresponding concentration inequalities to prove that the sequence of estimators, ft+1, outside the RKHS converge to the optimal function, f∗, in the RKHS. We make the following standard assumptions ahead for later references: A. There exists an optimal solution, denoted as f∗, to the problem of our interest (1). B. Loss function ℓ(u, y) : R × R →R and its first-order derivative is L-Lipschitz continous in terms of the first argument. C. For any data {(xi, yi)}t i=1 and any trajectory {fi(·)}t i=1, there exists M > 0, such that |ℓ′(fi(xi), yi)| ⩽M. Note in our situation M exists and M < ∞since we assume bounded domain and the functions ft we generate are always bounded as well. D. There exists κ > 0 and φ > 0, such that k(x, x′) ⩽κ, |φω(x)φω(x′)| ⩽φ, ∀x, x′ ∈ X, ω ∈Ω. For example, when k(·, ·) is the Gaussian RBF kernel, we have κ = 1, φ = 2. We now present our main theorems as below. Due to the space restrictions, we will only provide a short sketch of proofs here. The full proofs for the these theorems are given in the appendix. Theorem 4 (Convergence in expectation) When γt = θ t with θ > 0 such that θν ∈(1, 2) ∪Z+, EDt,ωt  |ft+1(x) −f∗(x)|2 ⩽2C2 + 2κQ2 1 t , for any x ∈X where Q1 = max n ∥f∗∥H , (Q0 + p Q2 0 + (2θν −1)(1 + θν)2θ2κM 2)/(2νθ −1) o , with Q0 = 2 √ 2κ1/2(κ + φ)LMθ2, and C2 = 4(κ + φ)2M 2θ2. Theorem 5 (Convergence with high probability) When γt = θ t with θ > 0 such that θν ∈Z+, for any x ∈X, we have with probability at least 1 −3δ over (Dt, ωt), |ft+1(x) −f∗(x)|2 ⩽C2 ln(2/δ) t + 2κQ2 2 ln(2t/δ) ln2(t) t , 5 where C is as above and Q2 = max n ∥f∗∥H , Q0 + p Q2 0 + κM 2(1 + θν)2(θ2 + 16θ/ν) o , with Q0 = 4 √ 2κ1/2Mθ(8 + (κ + φ)θL). Proof sketch: We focus on the convergence in expectation; the high probability bound can be established in a similar fashion. The main technical difficulty is that ft+1 may not be in the RKHS H. The key of the proof is then to construct an intermediate function ht+1, such that the difference between ft+1 and ht+1 and the difference between ht+1 and f∗can be bounded. More specifically, ht+1(·) = ht(·) −γt(ξt(·) + νht(·)) = Xt i=1 ai tξi(·), ∀t > 1, and h1(·) = 0, (7) where ξt(·) = Eωt[ζt(·)]. Then for any x, the error can be decomposed as two terms |ft+1(x) −f∗(x)|2 ⩽2 |ft+1(x) −ht+1(x)|2 | {z } error due to random functions + 2κ ∥ht+1 −f∗∥2 H | {z } error due to random data For the error term due to random functions, ht+1 is constructed such that ft+1 −ht+1 is a martingale, and the stepsizes are chosen such that |ai t| ⩽θ t , which allows us to bound the martingale. In other words, the choices of the stepsizes keep ft+1 close to the RKHS. For the error term due to random data, since ht+1 ∈H, we can now apply the standard arguments for stochastic approximation in the RKHS. Due to the additional randomness, the recursion is slightly more complicated, et+1 ⩽ 1 −2νθ t  et + β1 t p et t + β2 t2 , where et+1 = EDt,ωt[∥ht+1 −f∗∥2 H], and β1 and β2 depends on the related parameters. Solving this recursion then leads to a bound for the second error term. Theorem 6 (Generalization bound) Let the true risk be Rtrue(f) = E(x,y) [l(f(x), y)]. Then with probability at least 1 −3δ over (Dt, ωt), and C and Q2 defined as previously Rtrue(ft+1) −Rtrue(f∗) ⩽(C p ln(8√et/δ) + √ 2κQ2 p ln(2t/δ) ln(t))L √ t . Proof By the Lipschitz continuity of l(·, y) and Jensen’s Inequality, we have Rtrue(ft+1)−Rtrue(f∗) ⩽LEx|ft+1(x)−f∗(x)| ⩽L p Ex|ft+1(x) −f∗(x)|2 = L∥ft+1 −f∗∥2. Again, ∥ft+1 −f∗∥2 can be decomposed as two terms O ∥ft+1 −ht+1∥2 2  and O(∥ht+1 −f∗∥2 H), which can be bounded similarly as in Theorem 5 (see Corollary 12 in the appendix). Remarks. The overall rate of convergence in expectation, which is O(1/t), is indeed optimal. Classical complexity theory (see, e.g. reference in [15]) shows that to obtain ϵ-accuracy solution, the number of iterations needed for the stochastic approximation is Ω(1/ϵ) for strongly convex case and Ω(1/ϵ2) for general convex case. Different from the classical setting of stochastic approximation, our case imposes not one but two sources of randomness/stochasticity in the gradient, which intuitively speaking, might require higher order number of iterations for general convex case. However, our method is still able to achieve the same rate as in the classical setting. The rate of the generalization bound is also nearly optimal up to log factors. However, these bounds may be further refined with more sophisticated techniques and analysis. For example, mini-batch and preconditioning can be used to reduce the constant factors in the bound significantly, the analysis of which is left for future study. Theorem 4 also reveals bounds in L∞and L2 sense as in Section A.2 in the appendix. The choices of stepsizes γt and the tuning parameters given in these bounds are only for sufficient conditions and simple analysis; other choices can also lead to bounds in the same order. 6 Computation, Storage and Statistics Trade-off To investigate computation, storage and statistics trade-off, we will fix the desired L2 error in the function estimation to ϵ, i.e., ∥f −f∗∥2 2 ⩽ϵ, and work out the dependency of other quantities on ϵ. These other quantities include the preprocessing time, the number of samples and random features (or rank), the number of iterations of each algorithm, and the computational cost and storage requirement for learning and prediction. We assume that the number of samples, n, needed to achieve the prescribed error ϵ is of the order O(1/ϵ), the same for all methods. Furthermore, we make no other regularity assumption about margin properties or the kernel matrix such as fast spectrum decay. Thus the required number of random feature (or ranks) r will be of the order O(n) = O(1/ϵ) [4, 5, 8, 9]. 6 We will pick a few representative algorithms for comparison, namely, (i) NORMA [13]: kernel methods trained with stochastic functional gradients; (ii) k-SDCA [12]: kernelized version of stochastic dual coordinate ascend; (iii) r-SDCA: first approximate the kernel function with random features, and then run stochastic dual coordinate ascend; (iv) n-SDCA: first approximate the kernel matrix using Nystr¨om’s method, and then run stochastic dual coordinate ascend; similarly we will combine Pegasos algorithm [21] with random features and Nystr¨om’s method, and obtain (v) r-Pegasos, and (vi) n-Pegasos. The comparisons are summarized below. From the table, one can see that our method, r-SDCA and r-Pegasos achieve the best dependency on the dimension d of the data. However, often one is interested in increasing the number of random features as more data points are observed to obtain a better generalization ability. Then special procedures need to be designed for updating the r-SDCA and r-Pegasos solution, which we are not clear how to implement easily and efficiently. Algorithms Preprocessing Total Computation Cost Total Storage Cost Computation Training Prediction Training Prediction Doubly SGD O(1) O(d/ϵ2) O(d/ϵ) O(1/ϵ) O(1/ϵ) NORMA/k-SDCA O(1) O(d/ϵ2) O(d/ϵ) O(d/ϵ) O(d/ϵ) r-Pegasos/r-SDCA O(1) O(d/ϵ2) O(d/ϵ) O(1/ϵ) O(1/ϵ) n-Pegasos/n-SDCA O(1/ϵ3) O(d/ϵ2) O(d/ϵ) O(1/ϵ) O(1/ϵ) 7 Experiments We show that our method compares favorably to other kernel methods in medium scale datasets and neural nets in large scale datasets. We examined both regression and classification problems with smooth and almost smooth loss functions. Below is a summary of the datasets used1, and more detailed description of these datasets and experimental settings can be found in the appendix. Name Model # of samples Input dim Output range Virtual (1) Adult K-SVM 32K 123 {−1, 1} no (2) MNIST 8M 8 vs. 6 [25] K-SVM 1.6M 784 {−1, 1} yes (3) Forest K-SVM 0.5M 54 {−1, 1} no (4) MNIST 8M [25] K-logistic 8M 1568 {0, . . . , 9} yes (5) CIFAR 10 [26] K-logistic 60K 2304 {0, . . . , 9} yes (6) ImageNet [27] K-logistic 1.3M 9216 {0, . . . , 999} yes (7) QuantumMachine [28] K-ridge 6K 276 [−800, −2000] yes (8) MolecularSpace [28] K-ridge 2.3M 2850 [0, 13] no Experiment settings. For datasets (1) – (3), we compare the algorithms discussed in Section 6. For algorithms based on low rank kernel matrix approximation and random features, i.e., pegasos and SDCA, we set the rank and number of random features to be 28. We use same batch size for both our algorithm and the competitors. We stop algorithms when they pass through the entire dataset once. This stopping criterion (SC1) is designed for justifying our conjecture that the bottleneck of the performances of the vanilla methods with explicit feature comes from the accuracy of kernel approximation. To this end, we investigate the performances of these algorithms under different levels of random feature approximations but within the same number of training samples. To further investigate the computational efficiency of the proposed algorithm, we also conduct experiments where we stop all algorithms within the same time budget (SC2). Due to space limitation, the comparison on regression synthetic dataset under SC1 and on (1) – (3) under SC2 are illustrated in Appendix B.2. We do not count the preprocessing time of Nystr¨om’s method for n-Pegasos and n-SDCA. The algorithms are executed on the machine with AMD 16 2.4GHz Opteron CPUs and 200G memory. Note that this allows NORMA and k-SDCA to save all the data in the memory. We report our numerical results in Figure 1(1)-(8) with explanations stated as below . For full details of our experimental setups, please refer to section B.1 in Appendix. Adult. The result is illustrated in Figure 1(1). NORMA and k-SDCA achieve the best error rate, 15%, while our algorithm achieves a comparable rate, 15.3%. 1 A “yes” for the last column means that virtual examples are generated from for training. K-ridge stands for kernel ridge regression; K-SVM stands for kernel SVM; K-logistic stands for kernel logistic regression. 7 10 −2 10 0 15 20 25 30 35 40 Training Time (sec) Test Error (%) k−SDCA NORMA 28 r−pegasos 28 r−SDCA 28 n−pegasos 28 n−SDCA doubly SGD 10 0 10 2 10 4 0 0.5 1 1.5 2 2.5 3 Training Time (sec) Test Error (%) 10 0 10 2 10 4 5 10 15 20 25 30 35 Training Time (sec) Test Error (%) (1) Adult (2) MNIST 8M 8 vs. 6 (3) Forest 10 5 10 6 10 7 0.5 1 1.5 2 Number of training samples Test error (%) jointly−trained neural net fixed neural net doubly SGD 10 5 10 6 10 7 10 20 30 40 50 Number of training samples Test error (%) jointly−trained neural net fixed neural net doubly SGD 10 6 10 8 40 50 60 70 80 90 100 Number of training samples Test error (%) jointly−trained neural net fixed neural net doubly SGD (4) MNIST 8M (5) CIFAR 10 (6) ImageNet 10 5 10 6 5 10 15 20 Number of training samples MAE (Kcal/mole) neural net doubly SGD 10 5 10 6 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 Number of training samples PCE (%) neural net doubly SGD (7) QuantumMachine (8) MolecularSpace. Figure 1: Experimental results for dataset (1) – (8). MNIST 8M 8 vs. 6. The result is shown in Figure 1(2). Our algorithm achieves the best test error 0.26%. Comparing to the methods with full kernel, the methods using random/Nystr¨om features achieve better test errors probably because of the underlying low-rank structure of the dataset. Forest. The result is shown in Figure 1(3). Our algorithm achieves test error about 15%, much better than the n/r-pegasos and n/r-SDCA. Our method is preferable for this scenario, i.e., huge datasets with sophisticated decision boundary considering the trade-off between cost and accuracy. MNIST 8M. The result is shown in Figure 1(4). Better than the 0.6% error provided by fixed and jointly-trained neural nets, our method reaches an error of 0.5% very quickly. CIFAR 10 The result is shown in Figure 1(5). We compare our algorithm to a neural net with two convolution layers (after contrast normalization and max-pooling layers) and two local layers achieving 11% test error. The specification is at https://code.google.com/p/cuda-convnet/. Our method achieves comparable performance but much faster. ImageNet The result is shown in Figure 1(6). Our method achieves test error 44.5% by further max-voting of 10 transformations of the test set while the jointly-trained neural net arrives at 42% (without variations in color and illumination), and the fixed neural net only achieves 46% with maxvoting. QuantumMachine/MolecularSpace The results are shown in Figure 1(7) &(8). On dataset (7), our method achieves Mean Absolute Error of 2.97 kcal/mole, outperforming neural nets, 3.51 kcal/mole, which is close to the 1 kcal/mole required for chemical accuracy. Moreover, the comparison on dataset (8) is the first in the literature, and our method is still comparable with neural net. Acknowledgement M.B. is suppoerted in part by NSF CCF-0953192, CCF-1451177, CCF-1101283, and CCF-1422910, ONR N00014-09-1-0751, and AFOSR FA9550-09-1-0538. L.S. is supported in part by NSF IIS-1116886, NSF/NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983, and a Raytheon Faculty Fellowship. 8 References [1] A. J. Smola and B. Sch¨olkopf. Sparse greedy matrix approximation for machine learning. In ICML, 2000. [2] C. K. I. Williams and M. Seeger. Using the Nystrom method to speed up kernel machines. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, NIPS, 2000. [3] S. Fine and K. Scheinberg. Efficient SVM training using low-rank kernel representations. Journal of Machine Learning Research, 2:243–264, 2001. [4] P. Drineas and M. Mahoney. On the nystr om method for approximating a gram matrix for improved kernel-based learning. JMLR, 6:2153–2175, 2005. [5] C. Cortes, M. Mohri, and A. Talwalkar. On the impact of kernel approximation on learning accuracy. In AISTATS, 2010. [6] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2008. [7] Q.V. Le, T. Sarlos, and A. J. Smola. Fastfood — computing hilbert space expansions in loglinear time. In ICML, 2013. [8] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In NIPS, 2009. [9] D. Lopez-Paz, S. Sra, A. Smola, Z. Ghahramani, and B. Schlkopf. Randomized nonlinear component analysis. In ICML, 2014. [10] J. C. Platt. Sequential minimal optimization: A fast algorithm for training support vector machines. Technical Report MSR-TR-98-14, Microsoft Research, 1998. [11] T. Joachims. Making large-scale SVM learning practical. In B. Sch¨olkopf, C. J. C. Burges, and A. J. Smola, editors, Advances in Kernel Methods — Support Vector Learning, pages 169–184, Cambridge, MA, 1999. MIT Press. [12] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss. Journal of Machine Learning Research, 14(1):567–599, 2013. [13] J. Kivinen, A. J. Smola, and R. C. Williamson. Online learning with kernels. IEEE Transactions on Signal Processing, 52(8), Aug 2004. [14] N. Ratliff and J. Bagnell. Kernel conjugate gradient for fast kernel machines. In IJCAI, 2007. [15] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM J. on Optimization, 19(4):1574–1609, January 2009. [16] A. Devinatz. Integral representation of pd functions. Trans. AMS, 74(1):56–77, 1953. [17] M. Hein and O. Bousquet. Kernels, associated structures, and generalizations. Technical Report 127, Max Planck Institute for Biological Cybernetics, 2004. [18] H. Wendland. Scattered Data Approximation. Cambridge University Press, Cambridge, UK, 2005. [19] Bernhard Sch¨olkopf and A. J. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002. [20] N. Pham and R. Pagh. Fast and scalable polynomial kernels via explicit feature maps. In KDD, 2013. [21] Shai Shalev-Shwartz, Yoram Singer, and Nathan Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In ICML, 2007. [22] Cong D. Dang and Guanghui Lan. Stochastic block mirror descent methods for nonsmooth and stochastic optimization. Technical report, University of Florida, 2013. [23] Yurii Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [24] A. Cotter, S. Shalev-Shwartz, and N. Srebro. Learning optimally sparse support vector machines. In ICML, 2013. [25] G. Loosli, S. Canu, and L. Bottou. Training invariant support vector machines with selective sampling. InLarge Scale Kernel Machines, pages 301–320. MIT Press, 2007. [26] A. Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. [27] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [28] G. Montavon, K. Hansen, S. Fazli, M. Rupp, F. Biegler, A. Ziehe, A. Tkatchenko, A. Lilienfeld, and K. M¨uller. Learning invariant representations of molecules for atomization energy prediction. In NIPS, 2012. [29] Alexander Rakhlin, Ohad Shamir, and Karthik Sridharan. Making gradient descent optimal for strongly convex stochastic optimization. In ICML, pages 449–456, 2012. [30] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, November 1998. 9
2014
247
5,344
Learning Mixtures of Ranking Models∗ Pranjal Awasthi Princeton University pawashti@cs.princeton.edu Avrim Blum Carnegie Mellon University avrim@cs.cmu.edu Or Sheffet Harvard University osheffet@seas.harvard.edu Aravindan Vijayaraghavan New York University vijayara@cims.nyu.edu Abstract This work concerns learning probabilistic models for ranking data in a heterogeneous population. The specific problem we study is learning the parameters of a Mallows Mixture Model. Despite being widely studied, current heuristics for this problem do not have theoretical guarantees and can get stuck in bad local optima. We present the first polynomial time algorithm which provably learns the parameters of a mixture of two Mallows models. A key component of our algorithm is a novel use of tensor decomposition techniques to learn the top-k prefix in both the rankings. Before this work, even the question of identifiability in the case of a mixture of two Mallows models was unresolved. 1 Introduction Probabilistic modeling of ranking data is an extensively studied problem with a rich body of past work [1, 2, 3, 4, 5, 6, 7, 8, 9]. Ranking using such models has applications in a variety of areas ranging from understanding user preferences in electoral systems and social choice theory, to more modern learning tasks in online web search, crowd-sourcing and recommendation systems. Traditionally, models for generating ranking data consider a homogeneous group of users with a central ranking (permutation) π∗over a set of n elements or alternatives. (For instance, π∗might correspond to a “ground-truth ranking” over a set of movies.) Each individual user generates her own ranking as a noisy version of this one central ranking and independently from other users. The most popular ranking model of choice is the Mallows model [1], where in addition to π∗there is also a scaling parameter φ ∈(0, 1). Each user picks her ranking π w.p. proportional to φdkt(π,π∗) where dkt(·) denotes the Kendall-Tau distance between permutations (see Section 2).1 We denote such a model as Mn(φ, π∗). The Mallows model and its generalizations have received much attention from the statistics, political science and machine learning communities, relating this probabilistic model to the long-studied work about voting and social choice [10, 11]. From a machine learning perspective, the problem is to find the parameters of the model — the central permutation π∗and the scaling parameter φ, using independent samples from the distribution. There is a large body of work [4, 6, 5, 7, 12] providing efficient algorithms for learning the parameters of a Mallows model. ∗This work was supported in part by NSF grants CCF-1101215, CCF-1116892, the Simons Institute, and a Simons Foundation Postdoctoral fellowhsip. Part of this work was performed while the 3rd author was at the Simons Institute for the Theory of Computing at the University of California, Berkeley and the 4th author was at CMU. 1In fact, it was shown [1] that this model is the result of the following simple (inefficient) algorithm: rank every pair of elements randomly and independently s.t. with probability 1 1+φ they agree with π∗and with probability φ 1+φ they don’t; if all n 2  pairs agree on a single ranking – output this ranking, otherwise resample. 1 In many scenarios, however, the population is heterogeneous with multiple groups of people, each with their own central ranking [2]. For instance, when ranking movies, the population may be divided into two groups corresponding to men and women; with men ranking movies with one underlying central permutation, and women ranking movies with another underlying central permutation. This naturally motivates the problem of learning a mixture of multiple Mallows models for rankings, a problem that has received significant attention [8, 13, 3, 4]. Heuristics like the EM algorithm have been applied to learn the model parameters of a mixture of Mallows models [8]. The problem has also been studied under distributional assumptions over the parameters, e.g. weights derived from a Dirichlet distribution [13]. However, unlike the case of a single Mallows model, algorithms with provable guarantees have remained elusive for this problem. In this work we give the first polynomial time algorithm that provably learns a mixture of two Mallows models. The input to our algorithm consists of i.i.d random rankings (samples), with each ranking drawn with probability w1 from a Mallows model Mn(φ1, π1), and with probability w2(= 1 −w1) from a different model Mn(φ2, π2). Informal Theorem. Given sufficiently many i.i.d samples drawn from a mixture of two Mallows models, we can learn the central permutations π1, π2 exactly and parameters φ1, φ2, w1, w2 up to ϵ-accuracy in time poly(n, (min{w1, w2})−1, 1 φ1(1−φ1), 1 φ2(1−φ2), ϵ−1). It is worth mentioning that, to the best of our knowledge, prior to this work even the question of identifiability was unresolved for a mixture of two Mallows models; given infinitely many i.i.d. samples generated from a mixture of two distinct Mallow models with parameters {w1, φ1, π1, w2, φ2, π2} (with π1 ̸= π2 or φ1 ̸= φ2), could there be a different set of parameters {w′ 1, φ′ 1, π′ 1, w′ 2, φ′ 2, π′ 2} which explains the data just as well. Our result shows that this is not the case and the mixture is uniquely identifiable given polynomially many samples. Intuition and a Na¨ıve First Attempt. It is evident that having access to sufficiently many random samples allows one to learn a single Mallows model. Let the elements in the permutations be denoted as {e1, e2, . . . , en}. In a single Mallows model, the probability of element ei going to position j (for j ∈[n]) drops off exponentially as one goes farther from the true position of ei [12]. So by assigning each ei the most frequent position in our sample, we can find the central ranking π∗. The above mentioned intuition suggests the following clustering based approach to learn a mixture of two Mallows models — look at the distribution of the positions where element ei appears. If the distribution has 2 clearly separated “peaks” then they will correspond to the positions of ei in the central permutations. Now, dividing the samples according to ei being ranked in a high or a low position is likely to give us two pure (or almost pure) subsamples, each one coming from a single Mallows model. We can then learn the individual models separately. More generally, this strategy works when the two underlying permutations π1 and π2 are far apart which can be formulated as a separation condition.2 Indeed, the above-mentioned intuition works only under strong separator conditions: otherwise, the observation regarding the distribution of positions of element ei is no longer true 3. For example, if π1 ranks ei in position k and π2 ranks ei in position k + 2, it is likely that the most frequent position of ei is k +1, which differs from ei’s position in either permutations! Handling arbitrary permutations. Learning mixture models under no separation requirements is a challenging task. To the best of our knowledge, the only polynomial time algorithm known is for the case of a mixture of a constant number of Gaussians [17, 18]. Other works, like the recent developments that use tensor based methods for learning mixture models without distance-based separation condition [19, 20, 21] still require non-degeneracy conditions and/or work for specific sub cases (e.g. spherical Gaussians). These sophisticated tensor methods form a key component in our algorithm for learning a mixture of two Mallows models. This is non-trivial as learning over rankings poses challenges which are not present in other widely studied problems such as mixture of Gaussians. For the case of Gaussians, spectral techniques have been extremely successful [22, 16, 19, 21]. Such techniques rely on estimating the covariances and higher order moments in terms of the model parameters to detect structure and dependencies. On the other hand, in the mixture of Mallows models problem there is 2Identifying a permutation π over n elements with a n-dimensional vector (π(i))i, this separation condition can be roughly stated as ∥π1 −π2∥∞= ˜Ω (min{w1, w2})−1 · (min{log(1/φ1), log(1/φ2)}))−1 . 3Much like how other mixture models are solvable under separation conditions, see [14, 15, 16]. 2 no “natural” notion of a second/third moment. A key contribution of our work is defining analogous notions of moments which can be represented succinctly in terms of the model parameters. As we later show, this allows us to use tensor based techniques to get a good starting solution. Overview of Techniques. One key difficulty in arguing about the Mallows model is the lack of closed form expressions for basic propositions like “the probability that the i-th element of π∗is ranked in position j.” Our first observation is that the distribution of a given element appearing at the top, i.e. the first position, behaves nicely. Given an element e whose rank in the central ranking π∗is i, the probability that a ranking sampled from a Mallows model ranks e as the first element is ∝φi−1. A length n vector consisting of these probabilities is what we define as the first moment vector of the Mallows model. Clearly by sorting the coordinate of the first moment vector, one can recover the underlying central permutation and estimate φ. Going a step further, consider any two elements which are in positions i, j respectively in π∗. We show that the probability that a ranking sampled from a Mallows model ranks {i, j} in (any of the 2! possible ordering of) the first two positions is ∝f(φ)φi+j−2. We call the n × n matrix of these probabilities as the second moment matrix of the model (analogous to the covariance matrix). Similarly, we define the 3rd moment tensor as the probability that any 3 elements appear in positions {1, 2, 3}. We show in the next section that in the case of a mixture of two Mallows models, the 3rd moment tensor defined this way has a rank-2 decomposition, with each rank-1 term corresponds to the first moment vector of each of two Mallows models. This motivates us to use tensor-based techniques to estimate the first moment vectors of the two Mallows models, thus learning the models’ parameters. The above mentioned strategy would work if one had access to infinitely many samples from the mixture model. But notice that the probabilities in the first-moment vectors decay exponentially, so by using polynomially many samples we can only recover a prefix of length ∼log1/φ n from both rankings. This forms the first part of our algorithm which outputs good estimates of the mixture weights, scaling parameters φ1, φ2 and prefixes of a certain size from both the rankings. Armed with w1, w2 and these two prefixes we next proceed to recover the full permutations π1 and π2. In order to do this, we take two new fresh batches of samples. On the first batch, we estimate the probability that element e appears in position j for all e and j. On the second batch, which is noticeably larger than the first, we estimate the probability that e appears in position j conditioned on a carefully chosen element e∗appearing as the first element. We show that this conditioning is almost equivalent to sampling from the same mixture model but with rescaled weights w′ 1 and w′ 2. The two estimations allow us to set a system of two linear equations in two variables: f (1) (e →j) – the probability of element e appearing in position j in π1, and f (2) (e →j) — the same probability for π2. Solving this linear system we find the position of e in each permutation. The above description contains most of the core ideas involved in the algorithm. We need two additional components. First, notice that the 3rd moment tensor is not well defined for triplets (i, j, k), when i, j, k are not all distinct and hence cannot be estimated from sampled data. To get around this barrier we consider a random partition of our element-set into 3 disjoint subsets. The actual tensor we work with consists only of triplets (i, j, k) where the indices belong to different partitions. Secondly, we have to handle the case where tensor based-technique fails, i.e. when the 3rd moment tensor isn’t full-rank. This is a degenerate case. Typically, tensor based approaches for other problems cannot handle such degenerate cases. However, in the case of the Mallows mixture model, we show that such a degenerate case provides a lot of useful information about the problem. In particular, it must hold that φ1 ≃φ2, and π1 and π2 are fairly close — one is almost a cyclic shift of the other. To show this we use a characterization of the when the tensor decomposition is unique (for tensors of rank 2), and we handle such degenerate cases separately. Altogether, we find the mixture model’s parameters with no non-degeneracy conditions. Lower bound under the pairwise access model. Given that a single Mallows model can be learned using only pairwise comparisons, a very restricted access to each sample, it is natural to ask, “Is it possible to learn a mixture of Mallows models from pairwise queries?”. This next example shows that we cannot hope to do this even for a mixture of two Mallows models. Fix some φ and π and assume our sample is taken using mixing weights of w1 = w2 = 1 2 from the two Mallows models Mn(φ, π) and Mn(φ, rev(π)), where rev(π) indicates the reverse permutation (the first element of π is the last of rev(π), the second is the next-to-last, etc.) . Consider two elements, e and e′. Using only pairwise comparisons, we have that it is just as likely to rank e > e′ as it is to rank e′ > e and so this case cannot be learned regardless of the sample size. 3 3-wise queries. We would also like to stress that our algorithm does not need full access to the sampled rankings and instead will work with access to certain 3-wise queries. Observe that the first part of our algorithm, where we recover the top elements in each of the two central permutations, only uses access to the top 3 elements in each sample. In that sense, we replace the pairwise query “do you prefer e to e′?” with a 3-wise query: “what are your top 3 choices?” Furthermore, the second part of the algorithm (where we solve a set of 2 linear equations) can be altered to support 3-wise queries of the (admittedly, somewhat unnatural) form “if e∗is your top choice, do you prefer e to e′?” For ease of exposition, we will assume full-access to the sampled rankings. Future Directions. Several interesting directions come out of this work. A natural next step is to generalize our results to learn a mixture of k Mallows models for k > 2. We believe that most of these techniques can be extended to design algorithms that take poly(n, 1/ϵ)k time. It would also be interesting to get algorithms for learning a mixture of k Mallows models which run in time poly(k, n), perhaps in an appropriate smoothed analysis setting [23] or under other non-degeneracy assumptions. Perhaps, more importantly, our result indicates that tensor based methods which have been very popular for learning problems, might also be a powerful tool for tackling ranking-related problems in the fields of machine learning, voting and social choice. Organization. In Section 2 we give the formal definition of the Mallow model and of the problem statement, as well as some useful facts about the Mallow model. Our algorithm and its numerous subroutines are detailed in Section 3. In Section 4 we experimentally compare our algorithm with a popular EM based approach for the problem. The complete details of our algorithms and proofs are included in the supplementary material. 2 Notations and Properties of the Mallows Model Let Un = {e1, e2, . . . , en} be a set of n distinct elements. We represent permutations over the elements in Un through their indices [n]. (E.g., π = (n, n −1, . . . , 1) represents the permutation (en, en−1, . . . , e1).) Let posπ(ei) = π−1(i) refer to the position of ei in the permutation π. We omit the subscript π when the permutation π is clear from context. For any two permutations π, π′ we denote dkt(π, π′) as the Kendall-Tau distance [24] between them (number of pairwise inversions between π, π′). Given some φ ∈(0, 1) we denote Zi(φ) = 1−φi 1−φ , and partition function Z[n](φ) = P π φdkt(π,π0) = Qn i=1 Zi(φ) (see Section 6 in the supplementary material). Definition 2.1. [Mallows model (Mn(φ, π0)).] Given a permutation π0 on [n] and a parameter φ ∈(0, 1),4, a Mallows model is a permutation generation process that returns permutation π w.p. Pr (π) = φdkt(π,π0)/Z[n](φ) In Section 6 we show many useful properties of the Mallows model which we use repeatedly throughout this work. We believe that they provide an insight to Mallows model, and we advise the reader to go through them. We proceed with the main definition. Definition 2.2. [Mallows Mixture model w1Mn(φ1, π1) ⊕w2Mn(φ2, π2).] Given parameters w1, w2 ∈(0, 1) s.t. w1 + w2 = 1, parameters φ1, φ2 ∈(0, 1) and two permutations π1, π2, we call a mixture of two Mallows models to be the process that with probability w1 generates a permutation from M (φ1, π1) and with probability w2 generates a permutation from M (φ2, π2). Our next definition is crucial for our application of tensor decomposition techniques. Definition 2.3. [Representative vectors.] The representative vector of a Mallows model is a vector where for every i ∈[n], the ith-coordinate is φposπ(ei)−1/Zn. The expression φposπ(ei)−1/Zn is precisely the probability that a permutation generated by a model Mn(φ, π) ranks element ei at the first position (proof deferred to the supplementary material). Given that our focus is on learning a mixture of two Mallows models Mn(φ1, π1) and Mn(φ2, π2), we denote x as the representative vector of the first model, and y as the representative vector of the latter. Note that retrieving the vectors x and y exactly implies that we can learn the permutations π1 and π2 and the values of φ1, φ2. 4It is also common to parameterize using β ∈R+ where φ = e−β. For small β we have (1 −φ) ≈β. 4 Finally, let f (i →j) be the probability that element ei goes to position j according to mixture model. Similarly f (1) (i →j) be the corresponding probabilities according to Mallows model M1 and M2 respectively. Hence, f (i →j) = w1f (1) (i →j) + w2f (2) (i →j). Tensors: Given two vectors u ∈Rn1, v ∈Rn2, we define u⊗v ∈Rn1×n2 as the matrix uvT . Given also z ∈Rn3 then u⊗v ⊗z denotes the 3-tensor (of rank- 1) whose (i, j, k)-th coordinate is uivjzk. A tensor T ∈Rn1×n2×n3 has a rank-r decomposition if T can be expressed as P i∈[r] ui ⊗vi ⊗zi where ui ∈Rn1, vi ∈Rn2, zi ∈Rn3. Given two vectors u, v ∈Rn, we use (u; v) to denote the n × 2 matrix that is obtained with u and v as columns. We now define first, second and third order statistics (frequencies) that serve as our proxies for the first, second and third order moments. Definition 2.4. [Moments] Given a Mallows mixture model, we denote for every i, j, k ∈[n] • Pi = Pr (pos (ei) = 1) is the probability that element ei is ranked at the first position • Pij = Pr (pos ({ei, ej}) = {1, 2}), is the probability that ei, ej are ranked at the first two positions (in any order) • Pijk = Pr (pos ({ei, ej, ek}) = {1, 2, 3}) is the probability that ei, ej, ek are ranked at the first three positions (in any order). For convenience, let P represent the set of quantities (Pi, Pij, Pijk)1≤i<j<k≤n. These can be estimated up to any inverse polynomial accuracy using only polynomial samples. The following simple, yet crucial lemma relates P to the vectors x and y, and demonstrates why these statistics and representative vectors are ideal for tensor decomposition. Lemma 2.5. Given a mixture w1M (φ1, π1) ⊕w2M (φ2, π2) let x, y and P be as defined above. 1. For any i it holds that Pi = w1xi + w2yi. 2. Denote c2(φ) = Zn(φ) Zn−1(φ) 1+φ φ . Then for any i ̸= j it holds that Pij = w1c2(φ1)xixj + w2c2(φ2)yiyj. 3. Denote c3(φ) = Z2 n(φ) Zn−1(φ)Zn−2(φ) 1+2φ+2φ2+φ3 φ3 . Then for any distinct i, j, k it holds that Pijk = w1c3(φ1)xixjxk + w2c3(φ2)yiyjyk. Clearly, if i = j then Pij = 0, and if i, j, k are not all distinct then Pijk = 0. In addition, in Lemma 13.2 in the supplementary material we prove the bounds c2(φ) = O(1/φ) and c3(φ) = O(φ−3). Partitioning Indices: Given a partition of [n] into Sa, Sb, Sc, let x(a), y(a) be the representative vectors x, y restricted to the indices (rows) in Sa (similarly for Sb, Sc). Then the 3-tensor T (abc) ≡(Pijk)i∈Sa,j∈Sb,k∈Sc = w1c3(φ1)x(a) ⊗x(b) ⊗x(c) + w2c3(φ2)y(a) ⊗y(b) ⊗y(c). This tensor has a rank-2 decomposition, with one rank-1 term for each Mallows model. Finally for convenience we define the matrix M = (x; y), and similarly define the matrices Ma = (x(a); y(a)), Mb = (x(b); y(b)), Mc = (x(c); y(c)). Error Dependency and Error Polynomials. Our algorithm gives an estimate of the parameters w, φ that we learn in the first stage, and we use these estimates to figure out the entire central rankings in the second stage. The following lemma essentially allows us to assume instead of estimations, we have access to the true values of w and φ. Lemma 2.6. For every δ > 0 there exists a function f(n, φ, δ) s.t. for every n, φ and ˆφ satisfying |φ−ˆφ| < δ f(n,φ,δ) we have that the total-variation distance satisfies ∥M (φ, π)−M  ˆφ, π  ∥TV ≤δ. For the ease of presentation, we do not optimize constants or polynomial factors in all parameters. In our analysis, we show how our algorithm is robust (in a polynomial sense) to errors in various statistics, to prove that we can learn with polynomial samples. However, the simplification when there are no errors (infinite samples) still carries many of the main ideas in the algorithm — this in fact shows the identifiability of the model, which was not known previously. 5 3 Algorithm Overview Algorithm 1 LEARN MIXTURES OF TWO MALLOWS MODELS, Input: a set S of N samples from w1M (φ1, π1) ⊕w2M (φ2, π2), Accuracy parameters ϵ, ϵ2. 1. Let bP be the empirical estimate of P on samples in S. 2. Repeat O(log n) times: (a) Partition [n] randomly into Sa, Sb and Sc. Let T (abc) = bPijk  i∈Sa,j∈Sb,k∈Sc. (b) Run TENSOR-DECOMP from [25, 26, 23] to get a decomposition of T (abc) = u(a) ⊗u(b) ⊗ u(c) + v(a) ⊗v(b) ⊗v(c). (c) If min{σ2(u(a); v(a)), σ2(u(b); v(b)), σ2(u(c); v(c))} > ϵ2 (In the non-degenerate case these matrices are far from being rank-1 matrices in the sense that their least singular value is bounded away from 0.) i. Obtain parameter estimates ( bw1, bw2, bφ1, bφ2 and prefixes of the central rankings π1 ′, π2 ′) from INFER-TOP-K( bP , M ′ a, M ′ b, M ′ c), with M ′ i = (u(i); v(i)) for i ∈{a, b, c}. ii. Use RECOVER-REST to find the full central rankings bπ1, bπ2. Return SUCCESS and output ( bw1, bw2, bφ1, bφ2, bπ1, bπ2). 3. Run HANDLE DEGENERATE CASES ( bP ). Our algorithm (Algorithm 1) has two main components. First we invoke a decomposition algorithm [25, 26, 23] over the tensor T (abc), and retrieve approximations of the two Mallows models’ representative vectors which in turn allow us to approximate the weight parameters w1, w2, scale parameters φ1, φ2, and the top few elements in each central ranking. We then use the inferred parameters to recover the entire rankings π1 and π2. Should the tensor-decomposition fail, we invoke a special procedure to handle such degenerate cases. Our algorithm has the following guarantee. Theorem 3.1. Let w1M (φ1, π1) ⊕w2M (φ2, π2) be a mixture of two Mallows models and let wmin = min{w1, w2} and φmax = max{φ1, φ2} and similarly φmin = min{φ1, φ2}. Denote ϵ0 = w2 min(1−φmax)10 16n22φ2max . Then, given any 0 < ϵ < ϵ0, suitably small ϵ2 = poly( 1 n, ϵ, φmin, wmin) and N = poly  n, 1 min{ϵ,ϵ0}, 1 φ1(1−φ1), 1 φ2(1−φ2), 1 w1 , 1 w2  i.i.d samples from the mixture model, Algorithm 1 recovers, in poly-time and with probability ≥1 −n−3, the model’s parameters with w1, w2, φ1, φ2 recovered up to ϵ-accuracy. Next we detail the various subroutines of the algorithm, and give an overview of the analysis for each subroutine. The full analysis is given in the supplementary material. The TENSOR-DECOMP Procedure. This procedure is a straight-forward invocation of the algorithm detailed in [25, 26, 23]. This algorithm uses spectral methods to retrieve the two vectors generating the rank-2 tensor T (abc). This technique works when all factor matrices Ma = (x(a); y(a)), Mb = (x(b); y(b)), Mc = (x(c); y(c)) are well-conditioned. We note that any algorithm that decomposes non-symmetric tensors which have well-conditioned factor matrices, can be used as a black box. Lemma 3.2 (Full rank case). In the conditions of Theorem 3.1, suppose our algorithm picks some partition Sa, Sb, Sc such that the matrices Ma, Mb, Mc are all well-conditioned — i.e. have σ2(Ma), σ2(Mb), σ2(Mc) ≥ϵ′ 2 ≥poly( 1 n, ϵ, ϵ2, w1, w2) then with high probability, Algorithm TENSORDECOMP of [25] finds M ′ a = (u(a); v(a)), M ′ b = (u(b); v(b)), M ′ c = (u(c); v(c)) such that for any τ ∈{a, b, c}, we have u(τ) = ατx(τ) + z(τ) 1 and v(τ) = βτy(τ) + z(τ) 2 ; with ∥z(τ) 1 ∥, ∥z(τ) 2 ∥≤poly( 1 n, ϵ, ϵ2, wmin) and, σ2(M ′ τ) > ϵ2 for τ ∈{a, b, c}. The INFER-TOP-K procedure. This procedure uses the output of the tensor-decomposition to retrieve the weights, φ’s and the representative vectors. In order to convert u(a), u(b), u(c) into an approximation of x(a), x(b), x(c) (and similarly with v(a), v(b), v(c) and y(a), y(b), y(c)), we need to find a good approximation of the scalars αa, αb, αc. This is done by solving a certain linear system. This also allows us to estimate bw1, bw2. Given our approximation of x, it is easy to find φ1 and the top first elements of π1 — we sort the coordinates of x, setting π′ 1 to be the first elements in the sorted 6 vector, and φ1 as the ratio between any two adjacent entries in the sorted vector. We refer the reader to Section 8 in the supplementary material for full details. The RECOVER-REST procedure. The algorithm for recovering the remaining entries of the central permutations (Algorithm 2) is more involved. Algorithm 2 RECOVER-REST, Input: a set S of N samples from w1M (φ1, π1)⊕w2M (φ2, π2), parameters ˆ w1, ˆ w2, ˆφ1, ˆφ2 and initial permutations ˆπ1, ˆπ2, and accuracy parameter ϵ. 1. For elements in ˆπ1 and ˆπ2, compute representative vectors ˆx and ˆy using estimates ˆφ1 and ˆφ2. 2. Let | ˆπ1| = r1, | ˆπ2| = r2 and wlog r1 ≥r2. If there exists an element ei such that posˆπ1(ei) > r1 and posˆπ2(ei) < r2/2 (or in the symmetric case), then: Let S1 be the subsample with ei ranked in the first position. (a) Learn a single Mallows model on S1 to find ˆπ1. Given ˆπ1 use dynamic programming to find ˆπ2 3. Let ei∗be the first element in ˆπ1 having its probabilities of appearing in first place in π1 and π2 differ by at least ϵ. Define ˆw′ 1 =  1 + ˆ w2 ˆ w1 ˆy(ei∗) ˆx(ei∗) −1 and ˆw′ 2 = 1 −ˆw′ 1. Let S1 be the subsample with ei∗ ranked at the first position. 4. For each ei that doesn’t appear in either ˆπ1 or ˆπ2 and any possible position j it might belong to (a) Use S to estimate ˆfi,j = Pr (ei goes to position j), and S1 to estimate ˆf (i →j|ei∗→1) = Pr (ei goes to position j|ei∗7→1). (b) Solve the system ˆf (i →j) = ˆ w1f (1) (i →j) + ˆ w2f (2) (i →j) (1) ˆf (i →j|ei∗→1) = ˆw′ 1f (1) (i →j) + ˆw′ 2f (2) (i →j) (2) 5. To complete ˆπ1 assign each ei to position arg maxj{f (1) (i →j)}. Similarly complete ˆπ2 using f (2) (i →j). Return the two permutations. Algorithm 2 first attempts to find a pivot — an element ei which appears at a fairly high rank in one permutation, yet does not appear in the other prefix ˆπ2. Let Eei be the event that a permutation ranks ei at the first position. As ei is a pivot, then PrM1 (Eei) is noticeable whereas PrM2 (Eei) is negligible. Hence, conditioning on ei appearing at the first position leaves us with a subsample in which all sampled rankings are generated from the first model. This subsample allows us to easily retrieve the rest of π1. Given π1, the rest of π2 can be recovered using a dynamic programming procedure. Refer to the supplementary material for details. The more interesting case is when no such pivot exists, i.e., when the two prefixes of π1 and π2 contain almost the same elements. Yet, since we invoke RECOVER-REST after successfully calling TENSOR-DECOMP , it must hold that the distance between the obtained representative vectors ˆx and ˆy is noticeably large. Hence some element ei∗satisfies |ˆx(ei∗) −ˆy(ei∗)| > ϵ, and we proceed by setting up a linear system. To find the complete rankings, we measure appropriate statistics to set up a system of linear equations to calculate f (1) (i →j) and f (2) (i →j) up to inverse polynomial accuracy. The largest of these values  f (1) (i →j) corresponds to the position of ei in the central ranking of M1. To compute the values  f (r) (i →j) r=1,2 we consider f (1) (i →j|ei∗→1) – the probability that ei is ranked at the jth position conditioned on the element ei∗ranking first according to M1 (and resp. for M2). Using w′ 1 and w′ 2 as in Algorithm 2, it holds that Pr (ei →j|ei∗→1) = w′ 1f (1) (i →j|ei∗→1) + w′ 2f (2) (i →j|ei∗→1) . We need to relate f (r) (i →j|ei∗→1) to f (r) (i →j). Indeed Lemma 10.1 shows that Pr (ei →j|ei∗→1) is an almost linear equations in the two unknowns. We show that if ei∗is ranked above ei in the central permutation, then for some small δ it holds that Pr (ei →j|ei∗→1) = w′ 1f (1) (i →j) + w′ 2f (2) (i →j) ± δ We refer the reader to Section 10 in the supplementary material for full details. 7 The HANDLE-DEGENERATE-CASES procedure. We call a mixture model w1M (φ1, π1) ⊕ w2M (φ2, π2) degenerate if the parameters of the two Mallows models are equal, and the edit distance between the prefixes of the two central rankings is at most two i.e., by changing the positions of at most two elements in π1 we retrieve π2. We show that unless w1M (φ1, π1)⊕w2M (φ2, π2) is degenerate, a random partition (Sa, Sb, Sc) is likely to satisfy the requirements of Lemma 3.2 (and TENSOR-DECOMP will be successful). Hence, if TENSOR-DECOMP repeatedly fail, we deduce our model is indeed degenerate. To show this, we characterize the uniqueness of decompositions of rank 2, along with some very useful properties of random partitions. In such degenerate cases, we find the two prefixes and then remove the elements in the prefixes from U, and recurse on the remaining elements. We refer the reader to Section 9 in the supplementary material for full details. 4 Experiments Goal. The main contribution of our paper is devising an algorithm that provably learns any mixture of two Mallows models. But could it be the case that the previously existing heuristics, even though they are unproven, still perform well in practice? We compare our algorithm to existing techniques, to see if, and under what settings our algorithm outperforms them. Baseline. We compare our algorithm to the popular EM based algorithm of [5], seeing as EM based heuristics are the most popular way to learn a mixture of Mallows models. The EM algorithm starts with a random guess for the two central permutations. At iteration t, EM maintains a guess as to the two Mallows models that generated the sample. First (expectation step) the algorithm assigns a weight to each ranking in our sample, where the weight of a ranking reflects the probability that it was generated from the first or the second of the current Mallows models. Then (the maximization step) the algorithm updates its guess of the models’ parameters based on a local search – minimizing the average distance to the weighted rankings in our sample. We comment that we implemented only the version of our algorithm that handles non-degenerate cases (more interesting case). In our experiment the two Mallows models had parameters φ1 ̸= φ2, so our setting was never degenerate. Setting. We ran both the algorithms on synthetic data comprising of rankings of size n = 10. The weights were sampled u.a.r from [0, 1], and the φ-parameters were sampled by sampling ln(1/φ) u.a.r from [0, 5]. For d ranging from 0 to n 2  we generated the two central rankings π1 and π2 to be within distance d in the following manner. π1 was always fixed as (1, 2, 3, . . . , 10). To describe π2, observe that it suffices to note the number of inversion between 1 and elements 2, 3, ..., 10; the number of inversions between 2 and 3, 4, ..., 10 and so on. So we picked u.a.r a non-negative integral solution to x1 + . . . + xn = d which yields a feasible permutation and let π2 be the permutation that it details. Using these models’ parameters, we generated N = 5 · 106 random samples. Evaluation Metric and Results. For each value of d, we ran both algorithms 20 times and counted the fraction of times on which they returned the true rankings that generated the sample. The results of the experiment for rankings of size n = 10 are in Table 1. Clearly, the closer the two centrals rankings are to one another, the worst EM performs. On the other hand, our algorithm is able to recover the true rankings even at very close distances. As the rankings get slightly farther, our algorithm recovers the true rankings all the time. We comment that similar performance was observed for other values of n as well. We also comment that our algorithm’s runtime was reasonable (less than 10 minutes on a 8-cores Intel x86 64 computer). Surprisingly, our implementation of the EM algorithm typically took much longer to run — due to the fact that it simply did not converge. distance between rankings success rate of EM success rate of our algorithm 0 0% 10% 2 0% 10% 4 0% 40% 8 10% 70% 16 30% 60 % 24 30% 100% 30 60% 100% 35 60% 100% 40 80% 100% 45 60% 100% Table 1: Results of our experiment. 8 References [1] C. L. Mallows. Non-null ranking models i. Biometrika, 44(1-2), 1957. [2] John I. Marden. Analyzing and Modeling Rank Data. Chapman & Hall, 1995. [3] Guy Lebanon and John Lafferty. Cranking: Combining rankings using conditional probability models on permutations. In ICML, 2002. [4] Thomas Brendan Murphy and Donal Martin. Mixtures of distance-based models for ranking data. Computational Statistics and Data Analysis, 41, 2003. [5] Marina Meila, Kapil Phadnis, Arthur Patterson, and Jeff Bilmes. Consensus ranking under the exponential model. Technical report, UAI, 2007. [6] Ludwig M. Busse, Peter Orbanz, and Joachim M. Buhmann. Cluster analysis of heterogeneous rank data. In ICML, ICML ’07, 2007. [7] Bhushan Mandhani and Marina Meila. Tractable search for learning exponential models of rankings. Journal of Machine Learning Research - Proceedings Track, 5, 2009. [8] Tyler Lu and Craig Boutilier. Learning mallows models with pairwise preferences. In ICML, 2011. [9] Joel Oren, Yuval Filmus, and Craig Boutilier. Efficient vote elicitation under candidate uncertainty. JCAI, 2013. [10] H Peyton Young. Condorcet’s theory of voting. The American Political Science Review, 1988. [11] Persi Diaconis. Group representations in probability and statistics. Institute of Mathematical Statistics, 1988. [12] Mark Braverman and Elchanan Mossel. Sorting from noisy information. CoRR, abs/0910.1191, 2009. [13] Marina Meila and Harr Chen. Dirichlet process mixtures of generalized mallows models. In UAI, 2010. [14] Sanjoy Dasgupta. Learning mixtures of gaussians. In FOCS, 1999. [15] Sanjeev Arora and Ravi Kannan. Learning mixtures of arbitrary gaussians. In STOC, 2001. [16] Dimitris Achlioptas and Frank McSherry. On spectral learning of mixtures of distributions. In COLT, 2005. [17] Adam Tauman Kalai, Ankur Moitra, and Gregory Valiant. Efficiently learning mixtures of two gaussians. In STOC, STOC ’10, 2010. [18] A. Moitra and G. Valiant. Settling the polynomial learnability of mixtures of gaussians. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, 2010. [19] Anima Anandkumar, Rong Ge, Daniel Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. CoRR, abs/1210.7559, 2012. [20] Animashree Anandkumar, Daniel Hsu, and Sham M. Kakade. A method of moments for mixture models and hidden markov models. In COLT, 2012. [21] Daniel Hsu and Sham M. Kakade. Learning mixtures of spherical gaussians: moment methods and spectral decompositions. In ITCS, ITCS ’13, 2013. [22] Santosh Vempala and Grant Wang. A spectral algorithm for learning mixture models. J. Comput. Syst. Sci., 68(4), 2004. [23] Aditya Bhaskara, Moses Charikar, Ankur Moitra, and Aravindan Vijayaraghavan. Smoothed analysis of tensor decompositions. In Symposium on the Theory of Computing (STOC), 2014. [24] M. G. Kendall. Biometrika, 30(1/2), 1938. [25] Aditya Bhaskara, Moses Charikar, and Aravindan Vijayaraghavan. Uniqueness of tensor decompositions with applications to polynomial identifiability. CoRR, abs/1304.8087, 2013. [26] Naveen Goyal, Santosh Vempala, and Ying Xiao. Fourier pca. In Symposium on the Theory of Computing (STOC), 2014. [27] R.P. Stanley. Enumerative Combinatorics. Number v. 1 in Cambridge studies in advanced mathematics. Cambridge University Press, 2002. 9
2014
248
5,345
Using Convolutional Neural Networks to Recognize Rhythm Stimuli from Electroencephalography Recordings Sebastian Stober, Daniel J. Cameron and Jessica A. Grahn Brain and Mind Institute, Department of Psychology, Western University London, Ontario, Canada, N6A 5B7 {sstober,dcamer25,jgrahn}@uwo.ca Abstract Electroencephalography (EEG) recordings of rhythm perception might contain enough information to distinguish different rhythm types/genres or even identify the rhythms themselves. We apply convolutional neural networks (CNNs) to analyze and classify EEG data recorded within a rhythm perception study in Kigali, Rwanda which comprises 12 East African and 12 Western rhythmic stimuli – each presented in a loop for 32 seconds to 13 participants. We investigate the impact of the data representation and the pre-processing steps for this classification tasks and compare different network structures. Using CNNs, we are able to recognize individual rhythms from the EEG with a mean classification accuracy of 24.4% (chance level 4.17%) over all subjects by looking at less than three seconds from a single channel. Aggregating predictions for multiple channels, a mean accuracy of up to 50% can be achieved for individual subjects. 1 Introduction Musical rhythm occurs in all human societies and is related to many phenomena, such as the perception of a regular emphasis (i.e., beat), and the impulse to move one’s body. It is a universal human phenomenon, but differs between human cultures. The influence of culture on the processing of rhythm in the brain as well as the brain mechanisms underlying musical rhythm are still not fully understood. In order to study these, we recruited participants in East Africa and North America to test their ability to perceive and produce rhythms derived from East African and Western music. Besides several behavioral tasks, which have already been discussed in [1], the East African participants also underwent electroencephalography (EEG) recording while listening to East African and Western musical rhythms thus enabling us to study the neural mechanisms underlying rhythm perception. Using two popular deep learning techniques – stacked denoising autoencoders (SDAs) [2] and convolutional neural networks (CNNs) [3] – we already obtained encouraging early results for distinguishing East African and Western stimuli in a binary classification task based on the recorded EEG [4]. In this paper, we address the much harder classification problem of recognizing the 24 individual rhythms. In the following, we will review related work in Section 2, describe the data acquisition and pre-processing in Section 3, present our experimental findings in Section 4, and discuss further steps in Section 5. 2 Related work How the brain responses to auditory rhythms has already been investigated in several studies using EEG and magnoencephalography (MEG): Oscillatory neural activity in the gamma (20-60 Hz) frequency band is sensitive to accented tones in a rhythmic sequence and anticipates isochronous tones [5]. Oscillations in the beta (20-30 Hz) band increase in anticipation of strong tones in a non-isochronous sequence [6, 7, 8]. 1 Another approach has measured the magnitude of steady state evoked potentials (SSEPs) (reflecting neural oscillations entrained to the stimulus) while listening to rhythmic sequences [9, 10]. Here, enhancement of SSEPs was found for frequencies related to the metrical structure of the rhythm (e.g., the frequency of the beat). In contrast to these studies investigating the oscillatory activity in the brain, other studies have used EEG to investigate event-related potentials (ERPs) in responses to tones occurring in rhythmic sequences. This approach has been used to show distinct sensitivity to perturbations of the rhythmic pattern vs. the metrical structure in rhythmic sequences [11], and to suggest that similar responses persist even when attention is diverted away from the rhythmic stimulus [12]. Further, Will and Berg [13] observed a significant increase in brain wave synchronization after periodic auditory stimulation with drum sounds and clicks with repetition rates of 1–8Hz. Vlek et al. [14] already showed that imagined auditory accents can be recognized from EEG. They asked ten subjects to listen to and later imagine three simple metric patterns of two, three and four beats on top of a steady metronome click. Using logistic regression to classify accented versus unaccented beats, they obtained an average single-trial accuracy of 70% for perception and 61% for imagery. These results are very encouraging to further investigate the possibilities for retrieving information about the perceived rhythm from EEG recordings. Very recently, the potential of deep learning techniques for neuroimaging has been demonstrated for functional and structural magnetic resonance imaging (MRI) data [15]. However, applications of deep learning techniques within neuroscience and specifically for processing EEG recordings have been very limited so far. Wulsin et al. [16] used deep belief nets (DBNs) to detect anomalies related to epilepsy in EEG recordings of 11 subjects by classifying individual “channel-seconds”, i.e., one-second chunks from a single EEG channel without further information from other channels or about prior values. Their classifier was first pre-trained layer by layer as an autoencoder on unlabelled data, followed by a supervised fine-tuning with backpropagation on a much smaller labeled data set. They found that working on raw, unprocessed data (sampled at 256Hz) led to a classification accuracy comparable to hand-crafted features. Langkvist et al. [17] similarly employed DBNs combined with hidden Markov models (HMMs) to classify different sleep stages. Their data for 25 subjects comprised EEG as well as recordings of eye movements and skeletal muscle activity. Again, the data was segmented into one-second chunks. Here, a DBN on raw data showed a classification accuracy close to one using 28 selected features. 3 Data acquisition & pre-processing 3.1 Stimuli The African rhythm stimuli were derived from recordings of traditional East African music [18]. The author (DC) composed the Western rhythmic stimuli. Rhythms were presented as sequences of sine tones that were 100ms in duration with intensity ramped up/down over the first/final 50ms and a pitch of either 375 or 500 Hz. All rhythms had a temporal structure of 12 equal units, in which each unit could contain a sound or not. For each rhythmic stimulus, two individual rhythmic sequences were overlaid whereby one sequence was played at the high pitch and the other at the low pitch. There were two groups of three individual rhythmic sequences for each cultural type of rhythm as shown in Table 1. With three combinations within each group and two possible pitch assignments, this resulted in six rhythmic stimuli for each group, 12 per rhythm type and 24 in total.1 Finally, rhythmic stimuli could be played back at one of two tempi, having a minimum inter-onset interval of either 180 or 240ms. Furthermore, we also formed groups based on how these stimuli were created. These allowed a more coarse classification with fewer classes. Ignoring the pitch assignments and thus considering the pairs [a,b] and [b,a] as equivalent, 12 groups were formed. At the next level, the stimuli derived from the same of the four groups of three sequences were grouped resulting in four groups of six stimuli. Finally, distinguishing East African from Western stimuli resulted in the binary classification problem that we addressed in our earlier work. 3.2 Study description Sixteen East African participants were recruited in Kigali, Rwanda (3 female, mean age: 23 years, mean musical training: 3.4 years, mean dance training: 2.5 years). The participants first completed three behavioral tasks: a rhythm discrimination task, a rhythm reproduction task, and a beat tapping task. Afterward, thirteen subjects also participated in the EEG portion of the study. All participants were over 1The 24 rhythm stimuli are available at http://dx.doi.org/10.6084/m9.figshare.1213903 2 Table 1: Rhythmic sequences in groups of three that pairings were based on. All ‘x’s denote onsets. Larger, bold ‘X’s denote the beginning of a 12 unit cycle (downbeat). Western Rhythms East African Rhythms 1 X x x x x x x x X x x x x x x x 1 X x x x x x x x x x X x x x x x x x x x 2 X x x x x x X x x x x x 2 X x x x x x X x x x 3 X x x x x x x x x X x x x x x x x x 3 X x x x X x x x 4 X x x x x x x X x x x x x x 4 X x x x x x x x x X x x x x x x x x 5 X x x x x x x X x x x x x x 5 X x x x x x x x X x x x x x x x 6 X x x x x x x x x X x x x x x x x x 6 X x x x x x x X x x x x x x the age of 18, had normal hearing, and had spent the majority of their lives in East Africa. They all gave informed consent prior to participating and were compensated for their participation, as per approval by the ethics boards at the Centre Hospitalier Universitaire de Kigali and the University of Western Ontario. The participants were instructed to sit with eyes closed and without moving for the duration of the EEG recording, and to maintain their attention on the auditory stimuli. All rhythms were repeated for 32 seconds, presented in counterbalanced blocks (all East African rhythms then all Western rhythms, or vice versa), and with randomized order within blocks. 12 rhythms of each type were presented – all at the same tempo, and each rhythm was preceded by 4 seconds of silence. EEG was recorded via a portable Grass EEG system using 14 channels at a sampling rate of 400Hz and impedances were kept below 10kΩ. 3.3 Data pre-processing EEG recordings are usually very noisy. They contain artifacts caused by muscle activity such as eye blinking as well as possible drifts in the impedance of the individual electrodes over the course of a recording. Furthermore, the recording equipment is very sensitive and easily picks up interferences from the surroundings. For instance, in this experiment, the power supply dominated the frequency band around 50Hz. All these issues have led to the common practice to invest a lot of effort into pre-processing EEG data, often even manually rejecting single frames or channels. In contrast to this, we decided to put only little manual work into cleaning the data and just removed obviously bad channels, thus leaving the main work to the deep learning techniques. After bad channel removal, 12 channels remained for subjects 1–5 and 13 for subjects 6–13. We followed the common practice in machine learning to partition the data into training, validation (or model selection) and test sets. To this end, we split each 32s-long trial recording into three non-overlapping pieces. The first T seconds after an optional offset were used for the validation set. The rationale behind this was that we expected that the participants would need a few seconds in the beginning of each trial to get used to the new rhythm. Thus, the data would be less suited for training but might still be good enough to estimate the model accuracy on unseen data. The main part of each recording was used for training and the remaining T seconds for testing. The time length T was tempo-dependent and corresponded to the length of a single bar in the stimuli. Naturally, one would prefer segments that are as long as the 2-bar stimuli. However, this would have reduced the amount of data left for training significantly and since only the East African rhythm sequences 2 and 3 had differences between the first and second bar (cf.Table 1), we only used 1 bar. With the optional offset, the data sets were aligned to start at the same position within a bar.2 The specific values for the two tempi are listed in Table 2. Furthermore, we decided to process and classify each EEG channel individually. Combining all 12 or 13 EEG channels in the analysis might allow to detect spatial patterns and most likely lead to an increase of the classification performance. However, this would increase the model complexity (number of parameters) by a factor of more than ten while at the same time reducing the number of training and test examples by the same factor. Under these conditions, the amount of data would not be sufficient to effectively train the CNN and lead to severe overfitting. The data was finally converted into the input format required by the CNN to be learned.3 If the network just took the raw EEG data, each waveform was normalized to a maximum amplitude of 1 and then split into equally sized frames of length T matching the size of the network’s input layer. No windowing 2With offset, the validation and test set would correspond to the same section of the stimuli for the fast tempo whereas for the fast tempo, it would differ by 1 bar because of the odd number of bars in between. 3Most of the processing was implemented through the librosa library available at https://github.com/ bmcfee/librosa/. 3 Table 2: Differences between slow and fast stimuli. tempo participants beat length bar length T bars optional offset training segment length fast 1–3, 7–9 180ms 2160ms 14.815 1760ms 27680ms - offset slow 4–6, 10–13 240ms 2880ms 11.111 320ms 26240ms - offset function was applied and the hop size (controlling the overlap of consecutive windows) was either 24, which corresponded to 60ms at the sampling rate of 400Hz, or the equivalent of T in samples. If the network was designed to process the frequency spectrum, the processing involved: 1. computing the short-time Fourier transform (STFT) with given window length of 96 samples and a hop size of 24 (This resulted in a new frequency spectrum vector every 60ms.), 2. computing the log amplitude, 3. scaling linearly to a maximum of 1 (per sequence), 4. (optionally) cutting of all frequency bins above the number requested by the network, 5. splitting the data into frames of length T (matching the network’s input dimensionality) with a given hop size of 1 (60ms) or the equivalent of T. Hops of 60ms were chosen as this equals to one fourth or one third of the beat length in the slow and fast rhythms respectively. With this choice, we hoped to be able to pick up beat-related effects but also to have a window size big enough for a sufficient frequency resolution in the spectrum. Including the zero-frequency band, this resulted in 49 frequency bins up to 200Hz with a resolution of 4.17Hz. Using the log amplitude in combination with the normalization had turned out to be the best approach in our previous experiments trying to distinguish East African from Western stimuli [4]. 4 Experiments CNNs, as for instance described in [3], have a variety of structural parameters which need to be chosen carefully. In general, CNNs are artificial neural networks (ANNs) with one or more convolutional layers. In such layers, linear convolution operations are applied for local segments of the input followed by a nonlinear transformation and a pooling operation over neighboring segments. If the EEG data is represented as waveform, the input has only one dimension (width) which corresponds to the time. If it is represented as frequency spectrum, it has a second dimension (height) which corresponds to the frequency. The kernel for each convolution operation is described by a weight matrix of a certain shape. Here, we only considered the kernel width as free parameter and kept the height maximal. Multiple kernels can be applied in parallel within the same layer whereby each corresponds to a different output channel of the layer. The stride parameter controls how much the kernels should advance on the input data between successive applications. Here, we fixed this parameter at 1 resulting in a maximal overlap of consecutive input segments. Finally, the pooling parameter controls how many values of neighboring segments are aggregated using the max operation. Like in our previous work, we used a DLSVM output layer as proposed in [19].4 This special kind of output layer for classification uses the hinge loss as cost function and replaces the commonly applied softmax. The convolutional layers applied the rectifier non-linearity f(x) = max(0,x) which does not saturate like sigmoid functions and thus facilitates faster learning as proposed in [20]. The input length in the time dimension was adapted to match the bar length T. All models were trained for 50 epochs using stochastic gradient descent (SGD) (on mini-batches of size 100) with exponential decay of the learning rate after each epoch and momentum. The best model was selected based on the accuracy on the validation set. Furthermore, we applied dropout regularization [21]. In total, this resulted in four learning parameters with value ranges derived from earlier experiments: • the initial learning rate (between 0.001 and 0.01), • the exponential learning rate decay per epoch (between 1.0 and 1.1), • the initial momentum (between 0.0 and 0.5), and • and the final momentum in the last epoch (between 0.0 and 0.99) and three structural parameters for each convolutional layer • the kernel width (between 1 and the input width for the layer), • the number of channels (between 1 and 30), and 4We used the experimental implementation for pylearn2 provided by Kyle Kastner at https: //github.com/kastnerkyle/pylearn2/blob/svm_layer/pylearn2/models/mlp.py 4 • the pooling width (between 1 and 10). In our previous work, we successfully applied CNNs with two convolutional layers to classify the perceived rhythms into types (East African vs.Western) as well as to identify individual rhythms in a pilot experiment [4]. However, we were only able to test a small number of manually tuned structural configurations, leaving a considerable potential for further improvement. Here, we took a systematic approach for finding good structural and learning parameters for the CNNs. To this end, we applied a Bayesian optimization technique for hyper-parameter selection in machine learning algorithms, which has recently been described by Snoek et al. [22] and has been implemented in Spearmint library.5 The basic idea is to treat the learning algorithm’s generalization performance as a sample from a Gaussian process and select the next parameter configuration to test based on the expected improvement. The authors showed that this way, the number of experiment runs to minimize a given objective can be significantly reduced while surpassing the performance of parameters chosen by human experts. We implemented6 our experiments using Theano [23] and pylearn2 [24]. The computations were run on a dedicated 12-core workstation with two Nvidia graphics cards – a Tesla C2075 and a Quadro 2000. We followed the common practice to optimize the performance on the validation set. Because the 24 classes we would like to predict were perfectly balanced, we chose the accuracy, i.e., the percentage of correctly classified instances, as primary evaluation measure.7 Furthermore, ranking the 24 classes by their corresponding network output values, we also computed the precision at rank 3 (prec.@3) and the mean reciprocal rank (MRR) – two commonly used information retrieval measures. The former corresponds to accuracy considering the top three classes in the ranking instead of just the first one. The latter is computed as: MRR= 1 |D| |D| X i=1 1 ranki (1) where D is the set of test instances and ranki is the rank of the correct class for instance i. The value range is (0,1] where the best value, 1, is obtained if the correct class is always ranked first. 4.1 Impact of pre-processing (subject 4) At first, we analyzed the impact of the pre-processing on the performance of a model with a single convolutional layer. For this, we only considered the recordings from subject 4 who were easiest to classify in our earlier experiments. The exponential learning rate decay was fixed at 1.08 leaving three structural and three learning parameters for the Bayesian optimization. Results are shown in Figure 1 (left). Generally, CNNs using the frequency spectrum representation were faster. A possible reason could be that the graphics cards performed better using two-dimensional kernels instead of long one-dimensional ones. Furthermore, the search for good parameters was much harder for the waveform representation because the value range for the kernel width was much wider ([1,1152] instead of [1,45]). Thus, the search took much longer. For instance, using the large hop size, an accuracy of more than 20% was only achieved after 208 runs for CNNs using waveform input with offset and after 47 runs without offset. Comparable values were already obtained after 1 and 2 runs respectively for the CNNs with frequency spectrum input and the values shown in Figure 1 (left) were obtained after 45 and 105 runs respectively. Consequently, the frequency spectrum appeared to be the clearly preferable choice for the input representation. With the small hop size of 60ms, a lot more training instances were generated because of the high overlap. This slowed down learning by a factor of more than 10. Hence, fewer configurations could be tested within the same time. Overall, the large hop size corresponding to 1 bar was favorable because of the significant speed-up without an impact on accuracy. By using the offset in combination with the hop size of 1 bar, all instances for training, validation and testing were aligned to the same position within a bar. This could explain the increase in accuracy for this parameter combination together with the spectrum representation. In combination with the waveform input, the inverse effect was observed. However, as it was generally harder to find good solutions in this setting, it could be that testing more configurations eventually would lead to the same result as for the spectrum. 5https://github.com/JasperSnoek/spearmint 6The code to run the experiments is available as supplementary material at http://dx.doi.org/10.6084/ m9.figshare.1213903 7As the Bayesian optimization aims to minimize an objective, we let our learner report the misclassification rate instead which is one minus the accuracy. 5 hop size offset waveform freq. spectrum CNN 60ms no 33.3% 233.7s 33.7% 22.3s (60 runs) yes 34.8% 119.5s 33.0% 16.4s 1 bar no 33.0% 12.7s 33.3% 0.4s (300 runs) yes 24.7% 5.3s 35.8% 0.3s SVM 60ms no training did not finish yes within 48 hours 1 bar no 11.1% 22.2% yes 12.2% 24.3% 0 10 20 30 40 50 number of frequency bins (4.167 Hz per bin) 0 5 10 15 20 25 30 35 40 accuracy (%) Figure 1: Impact of pre-processing. Left: Classification accuracy and average epoch processing time for different combinations of the pre-processing parameters. CNN structural and learning parameters were obtained through Bayesian optimization for 300 runs for hop size 1 bar and 60 runs for hop size 60ms. Processing times for CNNs were measured separately as single process using the Tesla C2075 graphics card and averaged over 50 epochs. For comparison, SVM classification accuracies were obtained using LIBSVM with polynomial kernel (degree 1–5). (Only the best values are shown.) Right: Impact of the optional frequency bin cutoff on the accuracy. For a comparison, we also trained support vector machine (SVM) classifiers using LIBSVM [25] on the same pre-processed data. Here, training did not finish within 48 hours for the small hop size because of the amount of training data. For waveform data, a polynomial kernel with degree 2 worked best, whereas for the frequency spectrum, it was a polynomial kernel with degree 4. All values were significantly (more than 10% absolute) below those obtained with a CNN. This shows using CNNs leads to a substantial improvement. Next, we analyzed the impact of the optional frequency bin cutoff. To this end, we used the best pre-processing parameter combination from the above comparison. This time, we fixed the momentum parameters to an initial value of 0.5 and a final value of 0.99 as these clearly dominated within the best configurations found so far. Instead, we did not fix the exponential learning rate decay. This resulted in 5 parameters to be optimized. We sampled the number of frequency bins from the range of [1,49] with higher density for lower values and let the Bayesian optimization run 300 experiments for each value. Results are shown in Figure 1 (right). A very significant accuracy increase can be observed between 12 and 15 bins which corresponds to a frequency band of 45.8–62.5Hz in the high gamma range which has been associated with beat perception, e.g., in [5]. The accuracy increase between 28 and 36 bins (116–145Hz) is hard to explain as EEG frequency ranges beyond 100 Hz have barely been studied so far. Here, a further investigation of the learned patterns (reflected in the CNN kernels) could lead to more insight. This analysis is still subject of ongoing research. The effect on the processing time was negligible. Based on these findings, we chose the following pre-processing parameters for the remaining experiments: The EEG data was represented as frequency spectrum using 49 bins. Input frames were obtained with a hop size corresponding to the length of 1 bar, T, and with a offset to align all instances to the same position within a bar. 4.2 One vs. two convolutional layers (all subjects) Having determined the optimal pre-processing parameters for subject 4 and CNNs with a single convolutional layer, we also used these settings to train individual models with one and two convolutional layers for all subjects. This time, we allowed 500 runs of the Bayesian optimization to find the best parameters in each setting. Additionally, we considered three groups of subjects. The ’fast’ and ’slow’ group contained all subjects with the respective stimulus tempo (cf.Table 2) whereas the ’all’ group contained all 13 subjects. For the groups, we stopped the Bayesian optimization after 100 runs as there was no more improvement and the processing time was much longer due to the bigger size of the combined data sets. Results are shown in Table 3. Apart from the performance values for classifying individual instances that correspond a segment from an EEG channel, we also aggregated all predictions from the 12 or 13 different channels of the same trial into one prediction by a simple majority vote. The obtained accuracies are listed in Table 3 (right). Additionally, we computed the accuracies for the more coarse variants of the classification problem with fewer classes (cf.Section 3.1). 6 Table 3: Structural parameters and performance values of the best CNNs with one or two convolutional layers after Bayesian parameter optimization for each subject (500 runs) and the three subject groups (100 runs). Layer structure is written as [kernel shape] / pooling width x number of channels. (A more detailed table can be found in the supplementary material.) network structure channel mean (24 classes) aggregated trial accuracy subject input 1st layer 2nd layer accuracy prec.@3 MRR 24 classes 12 classes 4 classes 2 classes 1 33x49 [5x49]/3x16 [16x1]/5x12 19.1% 36.1% 0.34 25.0% 29.2% 58.3% 79.2% 2 33x49 [10x49]/1x22 27.1% 46.5% 0.42 37.5% 37.5% 50.0% 87.5% 3 33x49 [17x49]/1x30 21.9% 38.2% 0.36 20.8% 25.0% 45.8% 66.7% 4 45x49 [35x49]/1x30 36.1% 63.5% 0.55 50.0% 62.5% 75.0% 83.3% 5 45x49 [40x49]/2x30 18.1% 34.7% 0.33 16.7% 25.0% 41.7% 70.8% 6 45x49 [26x49]/5x30 [1x1]/10x30 29.5% 48.1% 0.45 37.5% 41.7% 54.2% 75.0% 7 33x49 [15x49]/1x13 23.1% 43.9% 0.40 33.3% 45.8% 54.2% 66.7% 8 33x49 [5x49]/2x21 [2x1]/2x24 24.0% 44.2% 0.41 41.7% 41.7% 58.3% 91.7% 9 33x49 [13x49]/2x21 [6x1]/4x30 21.8% 33.7% 0.36 25.0% 29.2% 58.3% 91.7% 10 45x49 [7x49]/1x30 26.6% 51.0% 0.44 33.3% 33.3% 45.8% 66.7% 11 45x49 [27x49]/1x30 26.6% 55.1% 0.45 33.3% 37.5% 41.7% 75.0% 12 45x49 [5x49]/5x30 [5x1]/10x30 32.1% 60.9% 0.51 29.2% 33.3% 54.2% 83.3% 13 45x49 [18x49]/10x21 [1x1]/6x30 20.2% 37.2% 0.36 25.0% 29.2% 50.0% 70.8% mean (1 convolutional layer) 24.4% 46.4% 0.41 30.8% 36.5% 51.6% 74.7% mean (2 convolutional layers) 24.4% 44.2% 0.40 29.5% 34.0% 52.2% 77.2% fast 33x49 [8x49]/1x22 9.7% 22.1% 0.23 10.4% 16.7% 35.4% 66.7% 33x49 [1x49]/1x30 [17x1]/1x30 9.5% 21.6% 0.23 11.8% 19.4% 38.9% 67.4% slow 45x49 [31x49]/1x30 9.9% 22.9% 0.24 10.7% 13.7% 32.7% 56.5% 45x49 [1x49]/10x23 [12x1]/5x27 9.1% 24.3% 0.24 10.1% 13.1% 31.5% 58.9% all 33x49 [1x49]/1x30 7.3% 19.0% 0.21 7.7% 12.2% 29.2% 57.1% 33x49 [3x49]/9x22 [5x1]/5x18 7.2% 18.4% 0.20 8.7% 12.5% 31.4% 55.4% As expected, models learned for groups of participants did not perform very well. Furthermore, the classification accuracy varied a lot between subjects with the best accuracy (36.1% for subject 4) twice as high as the worst (18.1% for subject 5). This was most likely due to strong individual differences in the rhythm perception. But it might at least have been partly caused by the varying quality of the EEG recordings. For instance, the signal was much noisier than usual for subject 5. For most subjects, the aggregation per trial significantly increased the classification accuracy. Only in cases where the accuracy for individual channels was low, such as for subject 5, the aggregation did not yield an improvement. Overall, the performance of the simpler models with a single convolutional layer was on par with the more complex ones – and often even better. One possible reason for this could be that the models with two convolutional layers had twice as many structural parameters and thus it was potentially harder to find good configurations. Furthermore, with more weights to be learned and thus more degrees of freedom to adapt, they were more prone to overfitting on this rather small data set. Figure 2 (left) visualizes the confusion between the different rhythms for subject 4 where the best overall accuracy was achieved.8 Remarkably, only few of the East African rhythms were misclassified as Western (upper right quadrant) and vice versa (lower left). For the East African music, confusion was mostly amongst neighbors (i.e., similar rhythms; upper left quadrant) – especially rhythms based on sequences 2 and 3 that were the only ones that cannot be captured correctly in a window of 1 bar – whereas for the Western rhythms, there were patterns indicating a strong perceived similarity between rhythm sequences 1 and 4. The accuracies obtained for the classification tasks with fewer classes (cf.Table 3, right) paint a similar picture indicating strong stimulus similarity as the main reason for confusion. In the mean confusion matrix, this effect is far less pronounced. However, it can be observed in most of the confusion matrices for the individual subjects. The results reported here still need to be taken with a grain of salt. Because of the study design, there is only one trial session (of 32 seconds) per stimulus for each subject. Thus, there is the chance that the neural networks learned to identify the individual trials and not the stimuli based on artifacts in the recordings that only occurred sporadically throughout the experiment. Or there could have been brain processes unrelated 8The respective confusion matrices for the models with two convolutional layers look very similar. They can be found in the supplementary material together with the matrices for the other participants. 7 [1, 2, 'a'] [1, 3, 'a'] [2, 1, 'a'] [2, 3, 'a'] [3, 1, 'a'] [3, 2, 'a'] [4, 5, 'a'] [4, 6, 'a'] [5, 4, 'a'] [5, 6, 'a'] [6, 4, 'a'] [6, 5, 'a'] [1, 2, 'w'] [1, 3, 'w'] [2, 1, 'w'] [2, 3, 'w'] [3, 1, 'w'] [3, 2, 'w'] [4, 5, 'w'] [4, 6, 'w'] [5, 4, 'w'] [5, 6, 'w'] [6, 4, 'w'] [6, 5, 'w'] Predicted label [1, 2, 'a'] [1, 3, 'a'] [2, 1, 'a'] [2, 3, 'a'] [3, 1, 'a'] [3, 2, 'a'] [4, 5, 'a'] [4, 6, 'a'] [5, 4, 'a'] [5, 6, 'a'] [6, 4, 'a'] [6, 5, 'a'] [1, 2, 'w'] [1, 3, 'w'] [2, 1, 'w'] [2, 3, 'w'] [3, 1, 'w'] [3, 2, 'w'] [4, 5, 'w'] [4, 6, 'w'] [5, 4, 'w'] [5, 6, 'w'] [6, 4, 'w'] [6, 5, 'w'] True label subject 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 [5, 4, 'a'] [6, 4, 'a'] [6, 5, 'a'] [2, 1, 'a'] [3, 2, 'a'] [3, 1, 'a'] [5, 6, 'a'] [2, 3, 'a'] [1, 2, 'a'] [1, 3, 'a'] [4, 5, 'a'] [4, 6, 'a'] [6, 4, 'w'] [2, 1, 'w'] [5, 4, 'w'] [2, 3, 'w'] [5, 6, 'w'] [3, 1, 'w'] [3, 2, 'w'] [4, 6, 'w'] [1, 3, 'w'] [1, 2, 'w'] [4, 5, 'w'] [6, 5, 'w'] Predicted label [5, 4, 'a'] [6, 4, 'a'] [6, 5, 'a'] [2, 1, 'a'] [3, 2, 'a'] [3, 1, 'a'] [5, 6, 'a'] [2, 3, 'a'] [1, 2, 'a'] [1, 3, 'a'] [4, 5, 'a'] [4, 6, 'a'] [6, 4, 'w'] [2, 1, 'w'] [5, 4, 'w'] [2, 3, 'w'] [5, 6, 'w'] [3, 1, 'w'] [3, 2, 'w'] [4, 6, 'w'] [1, 3, 'w'] [1, 2, 'w'] [4, 5, 'w'] [6, 5, 'w'] True label subject 4 (labels in trial order) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Figure 2: Confusion matrices for the CNN with a single convolutional layer for subject 4. Labels contain the ids of the high-pitched and low-pitch rhythm sequence (c.f.Table 1) and the rhythm type (’a’ for African, ’w’ for Western). Left: Labels arranged such that most similar rhythms are close together. Right: Labels in the order of the trials for this subject. More plots are provided in the supplementary material. to rhythm perception that were only present during some of the trials. Re-arranging the labels within the confusion matrix such that they correspond to the order of the stimuli presentation (Figure 2, right) shows some confusion between successive trials (blocks along the diagonal) which supports this hypothesis. Repeating the experiment with multiple trials per stimulus for each subject should give more insights into this matter. 5 Conclusions Distinguishing the rhythm stimuli used in this study is not easy as a listener. They are all presented in the same tempo and comprise two 12/8 bars. Consequently, none of the participants scored more than 83% in the behavioral rhythm discrimination test. Considering this and the rather sub-par data quality of the EEG recordings, the accuracies obtained for some of the participants are remarkable. They demonstrate that perceived rhythms may be identified from EEG recorded during their auditory presentation using convolutional neural networks that look only at a short segment of the signal from a single EEG channel (corresponding to the length of a single bar of a two-bar stimulus). We hope that our finding will encourage the application of deep learning techniques for EEG analysis and stimulate more research in this direction. As a next step, we want to analyze the learned models as they might provide some insight into the important underlying patterns within the EEG signals and their corresponding neural processes. However, this is largely still an open problem. (As a first attempt, visualizations of the kernel weight matrices and of input patterns producing the highest activations can be found in the supplementary material.) We are also looking to correlate the classification performance values with the subjects’ scores in the behavioral part of the study. The study is currently being repeated with North America participants and we are curious to see whether we can replicate our findings. In particular, we hope to further improve the classification accuracy through higher data quality of the new EEG recordings. Furthermore, we want to conduct a behavioral study to obtain information about the perceived similarity between the stimuli. Finally, encouraged by our results, we want to extend our focus by also considering more complex and richer stimuli such as audio recordings of rhythms with realistic instrumentation instead of artificial sine tones. Acknowledgments This work was supported by a fellowship within the Postdoc-Program of the German Academic Exchange Service (DAAD), by the Natural Sciences and Engineering Research Council of Canada (NSERC), through the Western International Research Award R4911A07, and by an AUCC Students for Development Award. 8 References [1] D.J. Cameron, J. Bentley, and J.A. Grahn. Cross-cultural influences on rhythm processing: Reproduction, discrimination, and beat tapping. Frontiers in Human Neuroscience, to appear. [2] P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio, and P.-A. Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research, 11:3371–3408, 2010. [3] A. Krizhevsky, I. Sutskever, and G.E. Hinton. Imagenet classification with deep convolutional neural networks. In Neural Information Processing Systems (NIPS’12), pages 1097–1105, 2012. [4] S. Stober, D.J. Cameron, and J.A. Grahn. Classifying EEG recordings of rhythm perception. In 15th International Society for Music Information Retrieval Conference (ISMIR’14), pages 649–654, 2014. [5] J.S. Snyder and E.W. Large. Gamma-band activity reflects the metric structure of rhythmic tone sequences. Cognitive Brain Research, 24(1):117–126, 2005. [6] J.R. Iversen, B.H. Repp, and A.D. Patel. Top-down control of rhythm perception modulates early auditory responses. Annals of the New York Academy of Sciences, 1169(1):58–73, 2009. [7] T. Fujioka, L.J. Trainor, E.W. Large, and B. Ross. Beta and gamma rhythms in human auditory cortex during musical beat processing. Annals of the New York Academy of Sciences, 1169(1):89–92, 2009. [8] T. Fujioka, L.J. Trainor, E.W. Large, and B. Ross. Internalized timing of isochronous sounds is represented in neuromagnetic beta oscillations. The Journal of Neuroscience, 32(5):1791–1802, 2012. [9] S. Nozaradan, I. Peretz, M. Missal, and A. Mouraux. Tagging the neuronal entrainment to beat and meter. The Journal of Neuroscience, 31(28):10234–10240, 2011. [10] S. Nozaradan, I. Peretz, and A. Mouraux. Selective neuronal entrainment to the beat and meter embedded in a musical rhythm. The Journal of Neuroscience, 32(49):17572–17581, 2012. [11] E. Geiser, E. Ziegler, L. Jancke, and M. Meyer. Early electrophysiological correlates of meter and rhythm processing in music perception. Cortex, 45(1):93–102, 2009. [12] O. Ladinig, H. Honing, G. H´aden, and I. Winkler. Probing attentive and preattentive emergent meter in adult listeners without extensive music training. Music Perception, 26(4):377–386, 2009. [13] U. Will and E. Berg. Brain wave synchronization and entrainment to periodic acoustic stimuli. Neuroscience Letters, 424(1):55–60, 2007. [14] R.J. Vlek, R.S. Schaefer, C.C.A.M. Gielen, J.D.R. Farquhar, and P. Desain. Shared mechanisms in perception and imagery of auditory accents. Clinical neurophysiology : official journal of the International Federation of Clinical Neurophysiology, 122(8):1526–1532, 2011. [15] S.M. Plis, D.R. Hjelm, R.Salakhutdinov, and V.D. Calhoun. Deep learning for neuroimaging: a validation study. arXiv preprint arXiv:1312.5847, 2013. [16] D.F. Wulsin, J.R. Gupta, R. Mani, J.A. Blanco, and B. Litt. Modeling electroencephalography waveforms with semi-supervised deep belief nets: fast classification and anomaly measurement. Journal of Neural Engineering, 8(3):036015, 2011. [17] M. L¨angkvist, L. Karlsson, and M. Loutfi. Sleep stage classification using unsupervised feature learning. Advances in Artificial Neural Systems, 2012:5:5–5:5, 2012. [18] G.F. Barz. Music in East Africa: experiencing music, expressing culture. Oxford University Press, 2004. [19] Y. Tang. Deep Learning using Linear Support Vector Machines. arXiv preprint arXiv:1306.0239, 2013. [20] X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier networks. In NIPS 2010 Workshop on Deep Learning and Unsupervised Feature Learning, 2010. [21] G.E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R.R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012. [22] J. Snoek, H. Larochelle, and R.P. Adams. Practical bayesian optimization of machine learning algorithms. In F. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, Neural Information Processing Systems (NIPS’12), pages 2951–2959. Curran Associates, Inc., 2012. [23] 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), 2010. [24] I.J. Goodfellow, D. Warde-Farley, P. Lamblin, V. Dumoulin, M. Mirza, R. Pascanu, J. Bergstra, F. Bastien, and Y. Bengio. Pylearn2: a machine learning research library. arXiv preprint arXiv:1308.4214, 2013. [25] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: A Library for Support Vector Machines. ACM Transactions on Intelligent Systems and Technology, 2(3):27:1–27:27, 2011. 9
2014
249
5,346
A Wild Bootstrap for Degenerate Kernel Tests Kacper Chwialkowski Department of Computer Science University College London London, Gower Street, WC1E 6BT kacper.chwialkowski@gmail.com Dino Sejdinovic Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR dino.sejdinovic@gmail.com Arthur Gretton Gatsby Computational Neuroscience Unit, UCL 17 Queen Square, London WC1N 3AR arthur.gretton@gmail.com Abstract A wild bootstrap method for nonparametric hypothesis tests based on kernel distribution embeddings is proposed. This bootstrap method is used to construct provably consistent tests that apply to random processes, for which the naive permutation-based bootstrap fails. It applies to a large group of kernel tests based on V-statistics, which are degenerate under the null hypothesis, and nondegenerate elsewhere. To illustrate this approach, we construct a two-sample test, an instantaneous independence test and a multiple lag independence test for time series. In experiments, the wild bootstrap gives strong performance on synthetic examples, on audio data, and in performance benchmarking for the Gibbs sampler. The code is available at https://github.com/kacperChwialkowski/ wildBootstrap. 1 Introduction Statistical tests based on distribution embeddings into reproducing kernel Hilbert spaces have been applied in many contexts, including two sample testing [18, 15, 32], tests of independence [17, 33, 4], tests of conditional independence [14, 33], and tests for higher order (Lancaster) interactions [24]. For these tests, consistency is guaranteed if and only if the observations are independent and identically distributed. Much real-world data fails to satisfy the i.i.d. assumption: audio signals, EEG recordings, text documents, financial time series, and samples obtained when running Markov Chain Monte Carlo, all show significant temporal dependence patterns. The asymptotic behaviour of kernel test statistics becomes quite different when temporal dependencies exist within the samples. In recent work on independence testing using the Hilbert-Schmidt Independence Criterion (HSIC) [8], the asymptotic distribution of the statistic under the null hypothesis is obtained for a pair of independent time series, which satisfy an absolute regularity or a φ-mixing assumption. In this case, the null distribution is shown to be an infinite weighted sum of dependent χ2-variables, as opposed to the sum of independent χ2-variables obtained in the i.i.d. setting [17]. The difference in the asymptotic null distributions has important implications in practice: under the i.i.d. assumption, an empirical estimate of the null distribution can be obtained by repeatedly permuting the time indices of one of the signals. This breaks the temporal dependence within the permuted signal, which causes the test to return an elevated number of false positives, when used for testing time series. To address this problem, an alternative estimate of the null distribution is proposed in [8], where the null distribution is simulated by repeatedly shifting one signal relative to the other. This preserves the temporal structure within each signal, while breaking the cross-signal dependence. 1 A serious limitation of the shift procedure in [8] is that it is specific to the problem of independence testing: there is no obvious way to generalise it to other testing contexts. For instance, we might have two time series, with the goal of comparing their marginal distributions - this is a generalization of the two-sample setting to which the shift approach does not apply. We note, however, that many kernel tests have a test statistic with a particular structure: the Maximum Mean Discrepancy (MMD), HSIC, and the Lancaster interaction statistic, each have empirical estimates which can be cast as normalized V -statistics, 1 nm−1 P 1≤i1,...,im≤n h(Zi1, ..., Zim), where Zi1, ..., Zim are samples from a random process at the time points {i1, . . . , im}. We show that a method of external randomization known as the wild bootstrap may be applied [21, 28] to simulate from the null distribution. In brief, the arguments of the above sum are repeatedly multiplied by random, user-defined time series. For a test of level α, the 1 −α quantile of the empirical distribution obtained using these perturbed statistics serves as the test threshold. This approach has the important advantage over [8] that it may be applied to all kernel-based tests for which V -statistics are employed, and not just for independence tests. The main result of this paper is to show that the wild bootstrap procedure yields consistent tests for time series, i.e., tests based on the wild bootstrap have a Type I error rate (of wrongly rejecting the null hypothesis) approaching the design parameter α, and a Type II error (of wrongly accepting the null) approaching zero, as the number of samples increases. We use this result to construct a two-sample test using MMD, and an independence test using HSIC. The latter procedure is applied both to testing for instantaneous independence, and to testing for independence across multiple time lags, for which the earlier shift procedure of [8] cannot be applied. We begin our presentation in Section 2, with a review of the τ-mixing assumption required of the time series, as well as of V -statistics (of which MMD and HSIC are instances). We also introduce the form taken by the wild bootstrap. In Section 3, we establish a general consistency result for the wild bootstrap procedure on V -statistics, which we apply to MMD and to HSIC in Section 4. Finally, in Section 5, we present a number of empirical comparisons: in the two sample case, we test for differences in audio signals with the same underlying pitch, and present a performance diagnostic for the output of a Gibbs sampler (the MCMC M.D.); in the independence case, we test for independence of two time series sharing a common variance (a characteristic of econometric models), and compare against the test of [4] in the case where dependence may occur at multiple, potentially unknown lags. Our tests outperform both the naive approach which neglects the dependence structure within the samples, and the approach of [4], when testing across multiple lags. Detailed proofs are found in the appendices of an accompanying technical report [9], which we reference from the present document as needed. 2 Background The main results of the paper are based around two concepts: τ-mixing [10], which describes the dependence within the time series, and V -statistics [27], which constitute our test statistics. In this section, we review these topics, and introduce the concept of wild bootstrapped V -statistics, which will be the key ingredient in our test construction. τ-mixing. The notion of τ-mixing is used to characterise weak dependence. It is a less restrictive alternative to classical mixing coefficients, and is covered in depth in [10]. Let {Zt, Ft}t∈N be a stationary sequence of integrable random variables, defined on a probability space Ωwith a probability measure P and a natural filtration Ft. The process is called τ-dependent if τ(r) = sup l∈N 1 l sup r≤i1≤...≤il τ(F0, (Zi1, ..., Zil)) r→∞ −→0, where τ(M, X) = E  sup g∈Λ Z g(t)PX|M(dt) − Z g(t)PX(dt)  and Λ is the set of all one-Lipschitz continuous real-valued functions on the domain of X. τ(M, X) can be interpreted as the minimal L1 distance between X and X∗such that X d= X∗and X∗ is independent of M ⊂F. Furthermore, if F is rich enough, this X∗can be constructed (see Proposition 4 in the Appendix). More information is provided in the Appendix B. 2 V -statistics. The test statistics considered in this paper are always V -statistics. Given the observations Z = {Zt}n t=1, a V -statistic of a symmetric function h taking m arguments is given by V (h, Z) = 1 nm X i∈N m h(Zi1, ..., Zim), (1) where N m is a Cartesian power of a set N = {1, ..., n}. For simplicity, we will often drop the second argument and write simply V (h). We will refer to the function h as to the core of the V -statistic V (h). While such functions are usually called kernels in the literature, in this paper we reserve the term kernel for positivedefinite functions taking two arguments. A core h is said to be j-degenerate if for each z1, . . . , zj Eh(z1, . . . , zj, Z∗ j+1, . . . , Z∗ m) = 0, where Z∗ j+1, . . . , Z∗ m are independent copies of Z1. If h is j-degenerate for all j ≤m −1, we will say that it is canonical. For a one-degenerate core h, we define an auxiliary function h2, called the second component of the core, and given by h2(z1, z2) = Eh(z1, z2, Z∗ 3, . . . , Z∗ m). Finally we say that nV (h) is a normalized V -statistic, and that a V -statistic with a one-degenerate core is a degenerate V -statistic. This degeneracy is common to many kernel statistics when the null hypothesis holds [15, 17, 24]. Our main results will rely on the fact that h2 governs the asymptotic behaviour of normalized degenerate V -statistics. Unfortunately, the limiting distribution of such V -statistics is quite complicated - it is an infinite sum of dependent χ2-distributed random variables, with a dependence determined by the temporal dependence structure within the process {Zt} and by the eigenfunctions of a certain integral operator associated with h2 [5, 8]. Therefore, we propose a bootstrapped version of the V -statistics which will allow a consistent approximation of this difficult limiting distribution. Bootstrapped V -statistic. We will study two versions of the bootstrapped V -statistics Vb1(h, Z) = 1 nm X i∈N m Wi1,nWi2,nh(Zi1, ..., Zim), (2) Vb2(h, Z) = 1 nm X i∈N m ˜Wi1,n ˜Wi2,nh(Zi1, ..., Zim), (3) where {Wt,n}1≤t≤n is an auxiliary wild bootstrap process and ˜Wt,n = Wt,n −1 n Pn j=1 Wj,n. This auxiliary process, proposed by [28, 21], satisfies the following assumption: Bootstrap assumption: {Wt,n}1≤t≤n is a row-wise strictly stationary triangular array independent of all Zt such that EWt,n = 0 and supn E|W 2+σ t,n | < ∞for some σ > 0. The autocovariance of the process is given by EWs,nWt,n = ρ(|s −t|/ln) for some function ρ, such that limu→0 ρ(u) = 1 and Pn−1 r=1 ρ(|r|/ln) = O(ln). The sequence {ln} is taken such that ln = o(n) but limn→∞ln = ∞. The variables Wt,n are τ-weakly dependent with coefficients τ(r) ≤Cζ r ln for r = 1, ..., n, ζ ∈(0, 1) and C ∈R. As noted in in [21, Remark 2], a simple realization of a process that satisfies this assumption is Wt,n = e−1/lnWt−1,n + √ 1 −e−2/lnϵt where W0,n and ϵ1, . . . , ϵn are independent standard normal random variables. For simplicity, we will drop the index n and write Wt instead of Wt,n. A process that fulfils the bootstrap assumption will be called bootstrap process. Further discussion of the wild bootstrap is provided in the Appendix A. The versions of the bootstrapped V -statistics in (2) and (3) were previously studied in [21] for the case of canonical cores of degree m = 2. We extend their results to higher degree cores (common within the kernel testing framework), which are not necessarily one-degenerate. When stating a fact that applies to both Vb1 and Vb2, we will simply write Vb, and the argument Z will be dropped when there is no ambiguity. 3 Asymptotics of wild bootstrapped V -statistics In this section, we present main Theorems that describe asymptotic behaviour of V -statistics. In the next section, these results will be used to construct kernel-based statistical tests applicable to dependent observations. Tests are constructed so that the V -statistic is degenerate under the null hypothesis and non-degenerate under the alternative. Theorem 1 guarantees that the bootstrapped V -statistic will converge to the same limiting null distribution as the simple V -statistic. Following [21], we will establish the convergence of the bootstrapped distribution to the desired asymptotic 3 distribution in the Prokhorov metric ϕ [13, Section 11.3]), and ensure that this distance approaches zero in probability as n →∞. This two-part convergence statement is needed due to the additional randomness introduced by the Wj,n. Theorem 1. Assume that the stationary process {Zt} is τ-dependent with τ(r) = O(r−6−ϵ) for some ϵ > 0. If the core h is a Lipschitz continuous, one-degenerate, and bounded function of m arguments and its h2-component is a positive definite kernel, then ϕ(n m 2  Vb(h, Z), nV (h, Z)) →0 in probability as n →∞, where ϕ is Prokhorov metric. Proof. By Lemma 3 and Lemma 2 respectively, ϕ(nVb(h), nVb(h2)) and ϕ(nV (h), n m 2  V (h2)) converge to zero. By [21, Theorem 3.1], nVb(h2) and nV (h2, Z) have the same limiting distribution, i.e., ϕ(nVb(h2), nV (h2, Z)) →0 in probability under certain assumptions. Thus, it suffices to check these assumptions hold: Assumption A2. (i) h2 is one-degenerate and symmetric - this follows from Lemma 1; (ii) h2 is a kernel - is one of the assumptions of this Theorem; (iii) Eh2(Z1, Z1) ≤∞- by Lemma 7, h2 is bounded and therefore has a finite expected value; (iv) h2 is Lipschitz continuous - follows from Lemma 7. Assumption B1. Pn r=1 r2p τ(r) < ∞. Since τ(r) = O(r−6−ϵ) then Pn r=1 r2p τ(r) ≤C Pn r=1 r−1−ϵ/2 ≤∞. Assumption B2. This assumption about the auxiliary process {Wt} is the same as our Bootstrap assumption. On the other hand, if the V -statistic is not degenerate, which is usually true under the alternative, it converges to some non-zero constant. In this setting, Theorem 2 guarantees that the bootstrapped V -statistic will converge to zero in probability. This property is necessary in testing, as it implies that the test thresholds computed using the bootstrapped V -statistics will also converge to zero, and so will the corresponding Type II error. The following theorem is due to Lemmas 4 and 5. Theorem 2. Assume that the process {Zt} is τ-dependent with a coefficient τ(r) = O(r−6−ϵ). If the core h is a Lipschitz continuous, symmetric and bounded function of m arguments, then nVb2(h) converges in distribution to some non-zero random variable with finite variance, and Vb1(h) converges to zero in probability. Although both Vb2 and Vb1 converge to zero, the rate and the type of convergence are not the same: nVb2 converges in law to some random variable while the behaviour of nVb1 is unspecified. As a consequence, tests that utilize Vb2 usually give lower Type II error then the ones that use Vb1. On the other hand, Vb1 seems to better approximate V -statistic distribution under the null hypothesis. This agrees with our experiments in Section 5 as well as with those in [21, Section 5]). 4 Applications to Kernel Tests In this section, we describe how the wild bootstrap for V -statistics can be used to construct kernel tests for independence and the two-sample problem, which are applicable to weakly dependent observations. We start by reviewing the main concepts underpinning the kernel testing framework. For every symmetric, positive definite function, i.e., kernel k : X × X →R, there is an associated reproducing kernel Hilbert space Hk [3, p. 19]. The kernel embedding of a probability measure P on X is an element µk(P) ∈Hk, given by µk(P) = R k(·, x) dP(x) [3, 29]. If a measurable kernel k is bounded, the mean embedding µk(P) exists for all probability measures on X, and for many interesting bounded kernels k, including the Gaussian, Laplacian and inverse multi-quadratics, the kernel embedding P 7→µk(P) is injective. Such kernels are said to be characteristic [31]. The RKHS-distance ∥µk(Px) −µk(Py)∥2 Hk between embeddings of two probability measures Px and Py is termed the Maximum Mean Discrepancy (MMD), and its empirical version serves as a popular statistic for non-parametric two-sample testing [15]. Similarly, given a sample of paired observations {(Xi, Yi)}n i=1 ∼Pxy, and kernels k and l respectively on X and Y domains, the RKHS-distance ∥µκ(Pxy) −µκ(PxPy)∥2 Hκ between embeddings of the joint distribution and of the product of the marginals, measures dependence between X and Y . Here, κ((x, y), (x′, y′)) = k(x, x′)l(y, y′) is the kernel on the product space of X and Y domains. This quantity is called Hilbert-Schmidt Independence Criterion (HSIC) [16, 17]. When characteristic RKHSs are used, the HSIC is zero iff X |= Y : this follows from [22, Lemma 3.8] and [30, Proposition 2]. The empirical statistic is written [ HSICκ = 1 n2 Tr(KHLH) for kernel matrices K and L and the centering matrix H = I −1 n11⊤. 4 4.1 Wild Bootstrap For MMD Denote the observations by {Xi}nx i=1 ∼Px, and {Yj}ny j=1 ∼Py. Our goal is to test the null hypothesis H0 : Px = Py vs. the alternative H1 : Px ̸= Py. In the case where samples have equal sizes, i.e., nx = ny, application of the wild bootstrap to MMD-based tests on dependent samples is straightforward: the empirical MMD can be written as a V -statistic with the core of degree two on pairs zi = (xi, yi) given by h(z1, z2) = k(x1, x2)−k(x1, y2)−k(x2, y1)+k(y1, y2). It is clear that whenever k is Lipschitz continuous and bounded, so is h. Moreover, h is a valid positive definite kernel, since it can be represented as an RKHS inner product ⟨k(·, x1) −k(·, y1), k(·, x2) −k(·, y2)⟩Hk. Under the null hypothesis, h is also one-degenerate, i.e., Eh ((x1, y1), (X2, Y2)) = 0. Therefore, we can use the bootstrapped statistics in (2) and (3) to approximate the null distribution and attain a desired test level. When nx ̸= ny, however, it is no longer possible to write the empirical MMD as a one-sample V -statistic. We will therefore require the following bootstrapped version of MMD \ MMDk,b = 1 n2x nx X i=1 nx X j=1 ˜W (x) i ˜W (x) j k(xi, xj) −1 n2x ny X i=1 ny X j=1 ˜W (y) i ˜W (y) j k(yi, yj) − 2 nxny nx X i=1 ny X j=1 ˜W (x) i ˜W (y) j k(xi, yj), (4) where ˜W (x) t = W (x) t − 1 nx Pnx i=1 W (x) i , ˜W (y) t = W (y) t − 1 ny Pny j=1 W (y) j ; {W (x) t } and {W (y) t } are two auxiliary wild bootstrap processes that are independent of {Xt} and {Yt} and also independent of each other, both satisfying the bootstrap assumption in Section 2. The following Proposition shows that the bootstrapped statistic has the same asymptotic null distribution as the empirical MMD. The proof follows that of [21, Theorem 3.1], and is given in the Appendix. Proposition 1. Let k be bounded and Lipschitz continuous, and let {Xt} and {Yt} both be τ-dependent with coefficients τ(r) = O(r−6−ϵ), but independent of each other. Further, let nx = ρxn and ny = ρyn where n = nx + ny. Then, under the null hypothesis Px = Py, ϕ  ρxρyn\ MMDk, ρxρyn\ MMDk,b  →0 in probability as n →∞, where ϕ is the Prokhorov metric and \ MMDk is the MMD between empirical measures. 4.2 Wild Bootstrap For HSIC Using HSIC in the context of random processes is not new in the machine learning literature. For a 1-approximating functional of an absolutely regular process [6], convergence in probability of the empirical HSIC to its population value was shown in [34]. No asymptotic distributions were obtained, however, nor was a statistical test constructed. The asymptotics of a normalized V -statistic were obtained in [8] for absolutely regular and φ-mixing processes [12]. Due to the intractability of the null distribution for the test statistic, the authors propose a procedure to approximate its null distribution using circular shifts of the observations leading to tests of instantaneous independence, i.e., of Xt |= Yt, ∀t. This was shown to be consistent under the null (i.e., leading to the correct Type I error), however consistency of the shift procedure under the alternative is a challenging open question (see [8, Section A.2] for further discussion). In contrast, as shown below in Propositions 2 and 3 (which are direct consequences of the Theorems 1 and 2), the wild bootstrap guarantees test consistency under both hypotheses: null and alternative, which is a major advantage. In addition, the wild bootstrap can be used in constructing a test for the harder problem of determining independence across multiple lags simultaneously, similar to the one in [4]. Following symmetrisation, it is shown in [17, 8] that the empirical HSIC can be written as a degree four V -statistic with core given by h(z1, z2, z3, z4) = 1 4! X π∈S4 k(xπ(1), xπ(2))[l(yπ(1), yπ(2)) + l(yπ(3), yπ(4)) −2l(yπ(2), yπ(3))], where we denote by Sn the group of permutations over n elements. Thus, we can directly apply the theory developed for higher-order V -statistics in Section 3. We consider two types of tests: instantaneous independence and independence at multiple time lags. 5 Table 1: Rejection rates for two-sample experiments. MCMC: sample size=500; a Gaussian kernel with bandwidth σ = 1.7 is used; every second Gibbs sample is kept (i.e., after a pass through both dimensions). Audio: sample sizes are (nx, ny) = {(300, 200), (600, 400), (900, 600)}; a Gaussian kernel with bandwidth σ = 14 is used. Both: wild bootstrap uses blocksize of ln = 20; averaged over at least 200 trials. The Type II error for all tests was zero experiment \ method permutation \ MMDk,b Vb1 Vb2 MCMC i.i.d. vs i.i.d. (H0) .040 .025 .012 .070 i.i.d. vs Gibbs (H0) .528 .100 .052 .105 Gibbs vs Gibbs (H0) .680 .110 .060 .100 Audio H0 {.970,.965,.995} {.145,.120,.114} H1 {1,1,1} {.600,.898,.995} Test of instantaneous independence Here, the null hypothesis H0 is that Xt and Yt are independent at all times t, and the alternative hypothesis H1 is that they are dependent. Proposition 2. Under the null hypothesis, if the stationary process Zt = (Xt, Yt) is τ-dependent with a coefficient τ(r) = O r−6−ϵ for some ϵ > 0, then ϕ(6nVb(h), nV (h)) →0 in probability, where ϕ is the Prokhorov metric. Proof. Since k and l are bounded and Lipschitz continuous, the core h is bounded and Lipschitz continuous. One-degeneracy under the null hypothesis was stated in [17, Theorem 2], and that h2 is a kernel is shown in [17, section A.2, following eq. (11)]. The result follows from Theorem 1. The following proposition holds by the Theorem 2, since the core h is Lipschitz continuous, symmetric and bounded. Proposition 3. If the stationary process Zt is τ-dependent with a coefficient τ(r) = O r−6−ϵ for some ϵ > 0, then under the alternative hypothesis nVb2(h) converges in distribution to some random variable with a finite variance and Vb1 converges to zero in probability. Lag-HSIC Propositions 2 and 3 also allow us to construct a test of time series independence that is similar to one designed by [4]. Here, we will be testing against a broader null hypothesis: Xt and Yt′ are independent for |t −t′| < M for an arbitrary large but fixed M. In the Appendix, we show how to construct a test when M →∞, although this requires an additional assumption about the uniform convergence of cumulative distribution functions. Since the time series Zt = (Xt, Yt) is stationary, it suffices to check whether there exists a dependency between Xt and Yt+m for −M ≤m ≤M. Since each lag corresponds to an individual hypothesis, we will require a Bonferroni correction to attain a desired test level α. We therefore define q = 1 − α 2M+1. The shifted time series will be denoted Zm t = (Xt, Yt+m). Let Sm,n = nV (h, Zm) denote the value of the normalized HSIC statistic calculated on the shifted process Zm t . Let Fb,n denote the empirical cumulative distribution function obtained by the bootstrap procedure using nVb(h, Z). The test will then reject the null hypothesis if the event An = n max−M≤m≤M Sm,n > F −1 b,n(q) o occurs. By a simple application of the union bound, it is clear that the asymptotic probability of the Type I error will be limn→∞P H0 (An) ≤α. On the other hand, if the alternative holds, there exists some m with |m| ≤M for which V (h, Zm) = n−1Sm,n converges to a non-zero constant. In this case P H1(An) ≥P H1(Sm,n > F −1 b,n(q)) = P H1(n−1Sm,n > n−1F −1 b,n(q)) →1 (5) as long as n−1F −1 b,n(q) →0, which follows from the convergence of Vb to zero in probability shown in Proposition 3. Therefore, the Type II error of the multiple lag test is guaranteed to converge to zero as the sample size increases. Our experiments in the next Section demonstrate that while this procedure is defined over a finite range of lags, it results in tests more powerful than the procedure for an infinite number of lags proposed in [4]. We note that a procedure that works for an infinite number of lags, although possible to construct, does not add much practical value under the present assumptions. Indeed, since the τ-mixing assumption applies to the joint sequence Zt = (Xt, Yt), 6 0.2 0.4 0.6 0.8 −0.05 0 0.05 0.1 0.15 0.2 type I error AR coeffcient 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 type II error Extinction rate Vb1 Vb2 Shift Figure 1: Comparison of Shift-HSIC and tests based on Vb1 and Vb2. The left panel shows the performance under the null hypothesis, where a larger AR coefficient implies a stronger temporal dependence. The right panel show the performance under the alternative hypothesis, where a larger extinction rate implies a greater dependence between processes. 100 150 200 250 300 0 0.2 0.4 0.6 0.8 1 type II error rate sample size 200 250 300 0 0.2 0.4 0.6 0.8 1 sample size KCSD HSIC Figure 2: In both panel Type II error is plotted. The left panel presents the error of the lag-HSIC and KCSD algorithms for a process following dynamics given by the equation (6). The errors for a process with dynamics given by equations (7) and (8) are shown in the right panel. The X axis is indexed by the time series length, i.e., sample size. The Type I error was around 5%. dependence between Xt and Yt+m is bound to disappear at a rate of o(m−6), i.e., the variables both within and across the two series are assumed to become gradually independent at large lags. 5 Experiments The MCMC M.D. We employ MMD in order to diagnose how far an MCMC chain is from its stationary distribution [26, Section 5], by comparing the MCMC sample to a benchmark sample. A hypothesis test of whether the sampler has converged based on the standard permutation-based bootstrap leads to too many rejections of the null hypothesis, due to dependence within the chain. Thus, one would require heavily thinned chains, which is wasteful of samples and computationally burdensome. Our experiments indicate that the wild bootstrap approach allows consistent tests directly on the chains, as it attains a desired number of false positives. To assess performance of the wild bootstrap in determining MCMC convergence, we consider the situation where samples {Xi} and {Yi} are bivariate, and both have the identical marginal distribution given by an elongated normal P = N  [ 0 0 ] ,  15.5 14.5 14.5 15.5  . However, they could have arisen either as independent samples, or as outputs of the Gibbs sampler with stationary distribution P. Table 1 shows the rejection rates under the significance level α = 0.05. It is clear that in the case where at least one of the samples is a Gibbs chain, the permutation-based test has a Type I error much larger than α. The wild bootstrap using Vb1 (without artificial degeneration) yields the correct Type I error control in these cases. Consistent with findings in [21, Section 5], Vb1 mimics the null distribution better than Vb2. The bootstrapped statistic \ MMDk,b in (4) which also relies on the artificially degenerated bootstrap processes, behaves similarly to Vb2. In the alternative scenario where {Yi} was taken from a distribution with the same covariance structure but with the mean set to µ = [ 2.5 0 ], the Type II error for all tests was zero. Pitch-evoking sounds Our second experiment is a two sample test on sounds studied in the field of pitch perception [19]. We synthesise the sounds with the fundamental frequency parameter of treble C, subsampled at 10.46kHz. Each i-th period of length Ωcontains d = 20 audio samples 7 at times 0 = t1 < . . . < td < Ω– we treat this whole vector as a single observation Xi or Yi, i.e., we are comparing distributions on R20. Sounds are generated based on the AR process ai = λai−1+ √ 1 −λ2ϵi, where a0, ϵi ∼N(0, Id), with Xi,r = P j Pd s=1 aj,s exp  −(tr−ts−(j−i)Ω)2 2σ2  . Thus, a given pattern – a smoothed version of a0 – slowly varies, and hence the sound deviates from periodicity, but still evokes a pitch. We take X with σ = 0.1Ωand λ = 0.8, and Y is either an independent copy of X (null scenario), or has σ = 0.05Ω(alternative scenario) (Variation in the smoothness parameter changes the width of the spectral envelope, i.e., the brightness of the sound). nx is taken to be different from ny. Results in Table 1 demonstrate that the approach using the wild bootstrapped statistic in (4) allows control of the Type I error and reduction of the Type II error with increasing sample size, while the permutation test virtually always rejects the null hypothesis. As in [21] and the MCMC example, the artificial degeneration of the wild bootstrap process causes the Type I error to remain above the design parameter of 0.05, although it can be observed to drop with increasing sample size. Instantaneous independence To examine instantaneous independence test performance, we compare it with the Shift-HSIC procedure [8] on the ’Extinct Gaussian’ autoregressive process proposed in the [8, Section 4.1]. Using exactly the same setting we compute type I error as a function of the temporal dependence and type II error as a function of extinction rate. Figure 1 shows that all three tests (Shift-HSIC and tests based on Vb1 and Vb2) perform similarly. Lag-HSIC The KCSD [4] is, to our knowledge, the only test procedure to reject the null hypothesis if there exist t,t′ such that Zt and Zt′ are dependent. In the experiments, we compare lag-HSIC with KCSD on two kinds of processes: one inspired by econometrics and one from [4]. In lag-HSIC, the number of lags under examination was equal to max{10, log n}, where n is the sample size. We used Gaussian kernels with widths estimated by the median heuristic. The cumulative distribution of the V -statistics was approximated by samples from nVb2. To model the tail of this distribution, we have fitted the generalized Pareto distribution to the bootstrapped samples ([23] shows that for a large class of underlying distribution functions such an approximation is valid). The first process is a pair of two time series which share a common variance, Xt = ϵ1,tσ2 t , Yt = ϵ2,tσ2 t , σ2 t = 1 + 0.45(X2 t−1 + Y 2 t−1), ϵi,t i.i.d. ∼N(0, 1), i ∈{1, 2}. (6) The above set of equations is an instance of the VEC dynamics [2] used in econometrics to model market volatility. The left panel of the Figure 2 presents the Type II error rate: for KCSD it remains at 90% while for lag-HSIC it gradually drops to zero. The Type I error, which we calculated by sampling two independent copies (X(1) t , Y (1) t ) and (X(2) t , Y (2) t ) of the process and performing the tests on the pair (X(1) t , Y (2) t ), was around 5% for both of the tests. Our next experiment is a process sampled according to the dynamics proposed by [4], Xt = cos(φt,1), φt,1 = φt−1,1 + 0.1ϵ1,t + 2πf1Ts, ϵ1,t i.i.d. ∼N(0, 1), (7) Yt = [2 + C sin(φt,1)] cos(φt,2), φt,2 = φt−1,2 + 0.1ϵ2,t + 2πf2Ts, ϵ2,t i.i.d. ∼N(0, 1), (8) with parameters C = .4, f1 = 4Hz,f2 = 20Hz, and frequency 1 Ts = 100Hz. We compared performance of the KCSD algorithm, with parameters set to vales recommended in [4], and the lag-HSIC algorithm. The Type II error of lag-HSIC, presented in the right panel of the Figure 2, is substantially lower than that of KCSD. The Type I error (C = 0) is equal or lower than 5% for both procedures. Most oddly, KCSD error seems to converge to zero in steps. This may be due to the method relying on a spectral decomposition of the signals across a fixed set of bands. As the number of samples increases, the quality of the spectrogram will improve, and dependence will become apparent in bands where it was undetectable at shorter signal lengths. References [1] M.A. Arcones. The law of large numbers for U-statistics under absolute regularity. Electron. Comm. Probab, 3:13–19, 1998. [2] L. Bauwens, S. Laurent, and J.V.K. Rombouts. Multivariate GARCH models: a survey. J. Appl. Econ., 21(1):79–109, January 2006. [3] A. Berlinet and C. Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer, 2004. 8 [4] M. Besserve, N.K. Logothetis, and B. Schlkopf. Statistical analysis of coupled time series with kernel cross-spectral density operators. In NIPS, pages 2535–2543. 2013. [5] I.S. Borisov and N.V. Volodko. Orthogonal series and limit theorems for canonical U- and V-statistics of stationary connected observations. Siberian Adv. Math., 18(4):242–257, 2008. [6] S. Borovkova, R. Burton, and H. Dehling. Limit theorems for functionals of mixing processes with applications to U-statistics and dimension estimation. Trans. Amer. Math. Soc., 353(11):4261–4318, 2001. [7] R. Bradley et al. Basic properties of strong mixing conditions. a survey and some open questions. Probability surveys, 2(107-44):37, 2005. [8] K. Chwialkowski and A. Gretton. A kernel independence test for random processes. In ICML, 2014. [9] Kacper Chwialkowski, Dino Sejdinovic, and Arthur Gretton. A wild bootstrap for degenerate kernel tests. tech. report. arXiv preprint arXiv:1408.5404, 2014. [10] J. Dedecker, P. Doukhan, G. Lang, S. Louhichi, and C. Prieur. Weak dependence: with examples and applications, volume 190. Springer, 2007. [11] J´erˆome Dedecker and Cl´ementine Prieur. New dependence coefficients. examples and applications to statistics. Probability Theory and Related Fields, 132(2):203–236, 2005. [12] P. Doukhan. Mixing. Springer, 1994. [13] R.M. Dudley. Real analysis and probability, volume 74. Cambridge University Press, 2002. [14] K. Fukumizu, A. Gretton, X. Sun, and B. Sch¨olkopf. Kernel measures of conditional dependence. In NIPS, volume 20, pages 489–496, 2007. [15] A. Gretton, K.M. Borgwardt, M.J. Rasch, B. Sch¨olkopf, and A. Smola. A kernel two-sample test. J. Mach. Learn. Res., 13:723–773, 2012. [16] A. Gretton, O. Bousquet, A. Smola, and B. Sch¨olkopf. Measuring statistical dependence with HilbertSchmidt norms. In Algorithmic learning theory, pages 63–77. Springer, 2005. [17] A. Gretton, K. Fukumizu, C Teo, L. Song, B. Sch¨olkopf, and A. Smola. A kernel statistical test of independence. In NIPS, volume 20, pages 585–592, 2007. [18] Z. Harchaoui, F. Bach, and E. Moulines. Testing for homogeneity with kernel Fisher discriminant analysis. In NIPS. 2008. [19] P. Hehrmann. Pitch Perception as Probabilistic Inference. PhD thesis, Gatsby Computational Neuroscience Unit, University College London, 2011. [20] A. Leucht. Degenerate U- and V-statistics under weak dependence: Asymptotic theory and bootstrap consistency. Bernoulli, 18(2):552–585, 2012. [21] A. Leucht and M.H. Neumann. Dependent wild bootstrap for degenerate U- and V-statistics. Journal of Multivariate Analysis, 117:257–280, 2013. [22] R. Lyons. Distance covariance in metric spaces. Ann. Probab., 41(5):3051–3696, 2013. [23] J. Pickands III. Statistical inference using extreme order statistics. Ann. Statist., pages 119–131, 1975. [24] D. Sejdinovic, A. Gretton, and W. Bergsma. A kernel test for three-variable interactions. In NIPS, pages 1124–1132, 2013. [25] D. Sejdinovic, B. Sriperumbudur, A. Gretton, and K. Fukumizu. Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Ann. Statist., 41(5):2263–2702, 2013. [26] D. Sejdinovic, H. Strathmann, M. Lomeli Garcia, C. Andrieu, and A. Gretton. Kernel Adaptive Metropolis-Hastings. In ICML, 2014. [27] R. Serfling. Approximation Theorems of Mathematical Statistics. Wiley, New York, 1980. [28] X. Shao. The dependent wild bootstrap. J. Amer. Statist. Assoc., 105(489):218–235, 2010. [29] A. J Smola, A. Gretton, L. Song, and B. Sch¨olkopf. A Hilbert space embedding for distributions. In Algorithmic Learning Theory, volume LNAI4754, pages 13–31, Berlin/Heidelberg, 2007. Springer-Verlag. [30] B. Sriperumbudur, K. Fukumizu, and G. Lanckriet. Universality, characteristic kernels and RKHS embedding of measures. J. Mach. Learn. Res., 12:2389–2410, 2011. [31] B. Sriperumbudur, A. Gretton, K. Fukumizu, G. Lanckriet, and B. Sch¨olkopf. Hilbert space embeddings and metrics on probability measures. J. Mach. Learn. Res., 11:1517–1561, 2010. [32] M. Sugiyama, T. Suzuki, Y. Itoh, T. Kanamori, and M. Kimura. Least-squares two-sample test. Neural Networks, 24(7):735–751, 2011. [33] K. Zhang, J. Peters, D. Janzing, B., and B. Sch¨olkopf. Kernel-based conditional independence test and application in causal discovery. In UAI, pages 804–813, 2011. [34] X. Zhang, L. Song, A. Gretton, and A. Smola. Kernel measures of independence for non-iid data. In NIPS, volume 22, 2008. 9
2014
25
5,347
Content-based recommendations with Poisson factorization Prem Gopalan Department of Computer Science Princeton University Princeton, NJ 08540 pgopalan@cs.princeton.edu Laurent Charlin Department of Computer Science Columbia University New York, NY 10027 lcharlin@cs.columbia.edu David M. Blei Departments of Statistics & Computer Science Columbia University New York, NY 10027 david.blei@columbia.edu Abstract We develop collaborative topic Poisson factorization (CTPF), a generative model of articles and reader preferences. CTPF can be used to build recommender systems by learning from reader histories and content to recommend personalized articles of interest. In detail, CTPF models both reader behavior and article texts with Poisson distributions, connecting the latent topics that represent the texts with the latent preferences that represent the readers. This provides better recommendations than competing methods and gives an interpretable latent space for understanding patterns of readership. Further, we exploit stochastic variational inference to model massive real-world datasets. For example, we can fit CPTF to the full arXiv usage dataset, which contains over 43 million ratings and 42 million word counts, within a day. We demonstrate empirically that our model outperforms several baselines, including the previous state-of-the art approach. 1 Introduction In this paper we develop a probabilistic model of articles and reader behavior data. Our model is called collaborative topic Poisson factorization (CTPF). It identifies the latent topics that underlie the articles, represents readers in terms of their preferences for those topics, and captures how documents about one topic might be interesting to the enthusiasts of another. As a recommendation system, CTPF performs well in the face of massive, sparse, and long-tailed data. Such data is typical because most readers read or rate only a few articles, while a few readers may read thousands of articles. Further, CTPF provides a natural mechanism to solve the “cold start” problem, the problem of recommending previously unread articles to existing readers. Finally, CTPF provides a new exploratory window into the structure of the collection. It organizes the articles according to their topics and identifies important articles both in terms of those important to their topic and those that have transcended disciplinary boundaries. We illustrate the model with an example. Consider the classic paper ”Maximum likelihood from incomplete data via the EM algorithm” [5]. This paper, published in the Journal of the Royal Statistical Society (B) in 1977, introduced the expectation-maximization (EM) algorithm. The EM algorithm is a general method for finding maximum likelihood estimates in models with hidden random variables. As many readers will know, EM has had an enormous impact on many fields, 1 including computer vision, natural language processing, and machine learning. This original paper has been cited over 37,000 times. Figure 1 illustrates the CTPF representation of the EM paper. (This model was fit to the shared libraries of scientists on the Mendeley website; the number of readers is 80,000 and the number of articles is 261,000.) In the figure, the horizontal axes contains topics, latent themes that pervade the collection [2]. Consider the black bars in the left figure. These represent the topics that the EM paper is about. (These were inferred from the abstract of the paper.) Specifically, it is about probabilistic modeling and statistical algorithms. Now consider the red bars on the right, which are summed with the black bars. These represent the preferences of the readers who have the EM paper in their libraries. CTPF has uncovered the interdisciplinary impact of the EM paper. It is popular with readers interested in many fields outside of those the paper discusses, including computer vision and statistical network analysis. The CTPF representation has advantages. For forming recommendations, it naturally interpolates between using the text of the article (the black bars) and the inferred representation from user behavior data (the red bars). On one extreme, it recommends rarely or never read articles based mainly on their text; this is the cold start problem. On the other extreme, it recommends widely-read articles based mainly on their readership. In this setting, it can make good inferences about the red bars. Further, in contrast to traditional matrix factorization algorithms, we combine the space of preferences and articles via interpretable topics. CTPF thus offers reasons for making recommendations, readable descriptions of reader preferences, and an interpretable organization of the collection. For example, CTPF can recognize the EM paper is among the most important statistics papers that has had an interdisciplinary impact. In more detail, CTPF draws on ideas from two existing models: collaborative topic regression [20] and Poisson factorization [9]. Poisson factorization is a form of probabilistic matrix factorization [17] that replaces the usual Gaussian likelihood and real-valued representations with a Poisson likelihood and non-negative representations. Compared to Gaussian factorization, Poisson factorization enjoys more efficient inference and better handling of sparse data. However, PF is a basic recommendation model. It cannot handle the cold start problem or easily give topic-based representations of readers and articles. Collaborative topic regression is a model of text and reader data that is based on the same intuitions as we described above. (Wang and Blei [20] also use the EM paper as an example.) However, in its implementation, collaborative topic regression is a non-conjugate model that is complex to fit, difficult to work with on sparse data, and difficult to scale without stochastic optimization. Further, it is based on a Gaussian likelihood of reader behavior. Collaborative Poisson factorization, because it is based on Poisson and gamma variables, enjoys an easier-to-implement and more efficient inference algorithm and a better fit to sparse real-world data. As we show below, it scales more easily and provides significantly better recommendations than collaborative topic regression. 2 The collaborative topic Poisson factorization model In this section we describe the collaborative topic Poisson factorization model (CTPF), and discuss its statistical properties. We are given data about users (readers) and documents (articles), where each user has read or placed in his library a set of documents. The rating rud equals one if user u consulted document d, can be greater than zero if the user rated the document and is zero otherwise. Most of the values of the matrix y are typically zero, due to sparsity of user behavior data. Background: Poisson factorization. CTPF builds on Poisson matrix factorization [9]. In collaborative filtering, Poisson factorization (PF) is a probabilistic model of users and items. It associates each user with a latent vector of preferences, each item with a latent vector of attributes, and constrains both sets of vectors to be sparse and non-negative. Each cell of the observed matrix is assumed drawn from a Poisson distribution, whose rate is a linear combination of the corresponding user and item attributes. Poisson factorization has also been used as a topic model [3], and developed as an alternative text model to latent Dirichlet allocation (LDA). In both applications Poisson factorization has been shown to outperform competing methods [3, 9]. PF is also more easily applicable to real-life preference datasets than the popular Gaussian matrix factorization [9]. 2 ! ! !!! ! ! ! ! ! ! !! 0 10 20 30 40 Topic probability, prior, bayesian, likelihood, inference, maximum algorithm, efficient, optimal, clustering, optimization, show !!!!!!!!!!! ! !!! ! !!! ! !! ! !!! !! ! ! !!!!!!! ! !!!!!!!!!!!!!! ! !!!!!!!!!! ! !! ! !!!!!!!!!!!!!!!!!!!!!! !! ! !!!!!!!!!!!! ! !! ! !!!!!!!!!!!!!!! ! !!!!!!!!!!!!! ! !!!!!!!!!!!!!!!!!!!! !! !! !! 0 10 20 30 40 Topic image, object, matching, tracking" motion,segmentation network, connected, modules, nodes, links, topology Figure 1: We visualized the inferred topic intensities θ (the black bars) and the topic offsets ϵ (the red bars) of an article in the Mendeley [13] dataset. The plots are for the statistics article titled “Maximum likelihood from incomplete data via the EM algorithm”. The black bars represent the topics that the EM paper is about. These include probabilistic modeling and statistical algorithms. The red bars represent the preferences of the readers who have the EM paper in their libraries. It is popular with readers interested in many fields outside of those the paper discusses, including computer vision and statistical network analysis. Collaborative topic Poisson factorization. CTPF is a latent variable model of user ratings and document content. CTPF uses Poisson factorization to model both types of data. Rather than modeling them as independent factorization problems, we connect the two latent factorizations using a correction term [20] which we’ll describe below. Suppose we have data containing D documents and U users. CTPF assumes a collection of K unormalized topics β1:K. Each topic βk is a collection of word intensities on a vocabulary of size V . Each component βvk of the unnormalized topics is drawn from a Gamma distribution. Given the topics, CTPF assumes that a document d is generated with a vector of K latent topic intensities θd, and represents users with a vector of K latent topic preferences ηu. Additionally, the model associates each document with K latent topic offsets ϵd that capture the document’s deviation from the topic intensities. These deviations occur when the content of a document is insufficient to explain its ratings. For example, these variables can capture that a machine learning article is interesting to a biologist, because other biologists read it. We now define a generative process for the observed word counts in documents and observed user ratings of documents under CTPF: 1. Document model: (a) Draw topics βvk ∼Gamma(a, b) (b) Draw document topic intensities θdk ∼Gamma(c, d) (c) Draw word count wdv ∼Poisson(θT d βv). 2. Recommendation model: (a) Draw user preferences ηuk ∼Gamma(e, f) (b) Draw document topic offsets ϵdk ∼Gamma(g, h) (c) Draw rud ∼Poisson(ηT u (θd + ϵd)). CTPF specifies that the conditional probability that a user u rated document d with rating rud is drawn from a Poisson distribution with rate parameter ηT u (θd + ϵd). The form of the factorization couples the user preferences for the document topic intensities θd and the document topic offsets ϵd. This allows the user preferences to be interpreted as affinity to latent topics. CTPF has two main advantages over previous work (e.g., [20]), both of which contribute to its superior empirical performance (see Section 5). First, CTPF is a conditionally conjugate model when augmented with auxiliary variables. This allows CTPF to conveniently use standard variational inference with closed-form updates (see Section 3). Second, CTPF is built on Poisson factorization; it can take advantage of the natural sparsity of user consumption of documents and can analyze massive real-world data. This follows from the likelihood of the observed data under the model [9]. 3 We analyze user preferences and document content with CTPF via its posterior distribution over latent variables p(β1:K, θ1:D, ϵ1:D, η1:U|w, r). By estimating this distribution over the latent structure, we can characterize user preferences and document readership in many useful ways. Figure 1 gives an example. Recommending old and new documents. Once the posterior is fit, we use CTPF to recommend in-matrix documents and out-matrix or cold-start documents to users. We define in-matrix documents as those that have been rated by at least one user in the recommendation system. All other documents are new to the system. A cold-start recommendation of a new document is based entirely on its content. For predicting both in-matrix and out-matrix documents, we rank each user’s unread documents by their posterior expected Poisson parameters, scoreud = E[ηT u (θd + ϵd)|w, r]. (1) The intuition behind the CTPF posterior is that when there is no reader data, we depend on the topics to make recommendations. When there is both reader data and article content, this gives information about the topic offsets. We emphasize that under CTPF the in-matrix recommendations and cold-start recommendations are not disjoint tasks. There is a continuum between these tasks. For example, the model can provide better predictions for articles with few ratings by leveraging its latent topic intensities θd. 3 Approximate posterior inference Given a set of observed document ratings r and their word counts w, our goal is to infer the topics β1:K, the user preferences η1:U, the document topic intensities θ1:D, the document topic offsets ϵ1:D. With estimates of these quantities, we can recommend in-matrix and out-matrix documents to users. Computing the exact posterior distribution p(β1:K, θ1:D, ϵ1:D, η1:U|w, r) is intractable; we use variational inference [15]. We first develop a coordinate ascent algorithm—a batch algorithm that iterates over only the non-zero document-word counts and the non-zero user-document ratings. We then present a more scalable stochastic variational inference algorithm. In variational inference we first define a parameterized family of distributions over the hidden variables. We then fit the parameters to find a distribution that minimizes the KL divergence to the posterior. The model is conditionally conjugate if the complete conditional of each latent variable is in the exponential family and is in the same family as its prior. (The complete conditional is the conditional distribution of a latent variable given the observations and the other latent variables in the model [8].) For the class of conditionally conjugate models, we can perform this optimization with a coordinate ascent algorithm and closed form updates. Auxiliary variables. To facilitate inference, we first augment CTPF with auxiliary variables. Following Ref. [6] and Ref. [9], we add K latent variables zdv,k ∼Poisson(θdkβvk), which are integers such that wdv = P k zdv,k. Similarly, for each observed rating rud, we add K latent variables ya ud,k ∼Poisson(ηukθdk) and K latent variables yb ud,k ∼Poisson(ηukϵdk) such that rud = P k ya ud,k + yb ud,k. A sum of independent Poisson random variables is itself a Poisson with rate equal to the sum of the rates. Thus, these new latent variables preserve the marginal distribution of the observations, wdv and rud. Further, when the observed counts are 0, these auxiliary variables are not random. Consequently, our inference procedure need only consider the auxiliary variables for non-zero observations. CTPF with the auxiliary variables is conditionally conjugate; its complete conditionals are shown in Table 1. The complete conditionals of the Gamma variables βvk, θdk, ϵdk, and ηuk are Gamma distributions with shape and rate parameters as shown in Table 1. For the auxiliary Poisson variables, observe that zdv is a K-dimensional latent vector of Poisson counts, which when conditioned on their observed sum wdv, is distributed as a multinomial [14, 4]. A similar reasoning underlies the conditional for yud which is a 2K-dimensional latent vector of Poisson counts. With our complete conditionals in place, we now derive the coordinate ascent algorithm for the expanded set of latent variables. 4 Latent Variable Type Complete conditional Variational parameters θdk Gamma c + P v zdv,k + P u ya ud,k, d + P v βvk + P u ηuk ˜θshp dk, ˜θrte dk βvk Gamma a + P d zdv,k, b + P d θdk ˜βshp vk , ˜βrte vk ηuk Gamma e + P d ya ud,k + P d yb ud,k, f + P d(θdk + ϵdk) ˜ηshp uk, ˜ηrte uk ϵdk Gamma g + P u yb ud,k, h + P u ηuk ˜ϵshp dk, ˜ϵrte dk zdv Mult log θdk + log βvk φdv yud Mult ( log ηuk + log θdk if k < K, log ηuk + log ϵdk if K ≤k < 2K ξud Table 1: CTPF: latent variables, complete conditionals and variational parameters. Variational family. We define the mean-field variational family q(β, θ, η, ϵ, z, y) over the latent variables where we consider these variables to be independent and each governed by its own distribution, q(β, θ, ϵ, η, z, y) = Y v,k q(βvk) Y d,k q(θdk)q(ϵdk) Y u,k q(ηuk) Y ud,k q(yud,k) Y dv,k q(zdv,k). (2) The variational factors for topic components βvk, topic intensities θdk, user preferences ηuk are all Gamma distributions—the same as their conditional distributions—with freely set shape and rate variational parameters. For example, the variational distribution for the topic intensities θdk is Gamma(θdk; ˜θshp dk , ˜θrte dk). We denote shape with the superscript “shp” and rate with the superscript “rte”. The variational factor for zdv is a multinomial Mult(wdv, φdv) where the variational parameter φdv is a point on the K-simplex. The variational factor for yud = (ya ud, yb ud) is also a multinomial Mult(rud, ξud) but here ξud is a point in the 2K-simplex. Optimal coordinate updates. In coordinate ascent we iteratively optimize each variational parameter while holding the others fixed. Under the conditionally conjugate augmented CTPF, we can optimize each coordinate in closed form by setting the variational parameter equal to the expected natural parameter (under q) of the complete conditional. For a given random variable, this expected conditional parameter is the expectation of a function of the other random variables and observations. (For details, see [9, 10]). We now describe two of these updates; the other updates are similarly derived. The update for the variational shape and rate parameters of topic intensities θdk is ˜θdk = ⟨c + P v wdvφdv,k + P u rudξud,k, d + P v ˜βshp vk ˜βrte vk + P u ˜ηshp uk ˜ηrte uk ⟩. (3) The Gamma update in Equation 3 derives from the expected natural parameter (under q) of the complete conditional for θdk in Table 1. In the shape parameter for topic intensities for document d, we use that Eq[zdv,k] = wdvφdv,k for the word indexed by v and Eq[ya ud,k] = rudξud,k for the user indexed by u. In the rate parameter, we use that the expectation of a Gamma variable is the shape divided by the rate. The update for the multinomial φdv is φdv ∝ exp{Ψ(˜θshp dk ) −log ˜θrte dk + Ψ(˜βshp vk ) −log ˜βrte vk}, (4) where Ψ(·) is the digamma function (the first derivative of the log Γ function). This update comes from the expectation of the log of a Gamma variable, for example, Eq[log θdk] = Ψ(˜θshp dk ) −log ˜θrte dk. Coordinate ascent algorithm. The CTPF coordinate ascent algorithm is illustrated in Figure 2. Similar to the algorithm of [9], our algorithm is efficient on sparse matrices. In steps 1 and 2, we need to only update variational multinomials for the non-zero word counts wdv and the non-zero ratings rud. In step 3, the sums over the expected zdv,k and the expected yud,k need only to consider non-zero observations. This efficiency comes from the likelihood of the full matrix depending only on the non-zero observations [9]. 5 Initialize the topics β1:K and topic intensities θ1:D using LDA [2] as described in Section 3. Repeat until convergence: 1. For each word count wdv > 0, set φdv to the expected conditional parameter of zdv. 2. For each rating rud > 0, set ξud to the expected conditional parameter of yud. 3. For each document d and each k, update the block of variational topic intensities ˜θdk to their expected conditional parameters using Equation 3. Perform similar block updates for ˜βvk, ˜ηuk and ˜ϵdk, in sequence. Figure 2: The CTPF coordinate ascent algorithm. The expected conditional parameters of the latent variables are computed from Table 1. Stochastic algorithm. The CTPF coordinate ascent algorithm is efficient: it only iterates over the non-zero observations in the observed matrices. The algorithm computes approximate posteriors for datasets with ten million observations within hours (see Section 5). To fit to larger datasets, within hours, we develop an algorithm that subsamples a document and estimates variational parameters using stochastic variational inference [10]. The stochastic algorithm is also useful in settings where new items continually arrive in a stream. The CTPF SVI algorithm is described in the Appendix. Computational efficiency. The SVI algorithm is more efficient than the batch algorithm. The batch algorithm has a per-iteration computational complexity of O((W + R)K) where R and W are the total number of non-zero observations in the document-user and document-word matrices, respectively. For the SVI algorithm, this is O((wd + rd)K) where rd is the number of users rating the sampled document d and wd is the number of unique words in it. (We assume that a single document is sampled in each iteration.) In Figure 2, the sums involving the multinomial parameters can be tracked for efficient memory usage. The bound on memory usage is O((D + V + U)K). Hyperparameters, initialization and stopping criteria: Following [9], we fix each Gamma shape and rate hyperparameter at 0.3. We initialize the variational parameters for ηuk and ϵdk to the prior on the corresponding latent variables and add small uniform noise. We initialize ˜βvk and ˜θdk using estimates of their normalized counterparts from LDA [2] fitted to the document-word matrix w. For the SVI algorithm described in the Appendix, we set learning rate parameters τ0 = 1024, κ = 0.5 and use a mini-batch size of 1024. In both algorithms, we declare convergence when the change in expected predictive likelihood is less than 0.001%. 4 Related work Several research efforts propose joint models of item covariates and user activity. Singh and Gordon [19] present a framework for simultaneously factorizing related matrices, using generalized link functions and coupled latent spaces. Hong et al. [11] propose Co-factorization machines for modeling user activity on twitter with tweet features, including content. They study several design choices for sharing latent spaces. While CTPF is roughly an instance of these frameworks, we focus on the task of recommending articles to readers. Agarwal and Chen [1] propose fLDA, a latent factor model which combines document features through their empirical LDA [2] topic intensities and other covariates, to predict user preferences. The coupling of matrix decomposition and topic modeling through shared latent variables is also considered in [18, 22]. Like fLDA, both papers tie latent spaces without corrective terms. Wang and Blei [20] have shown the importance of using corrective terms through the collaborative topic regression (CTR) model which uses a latent topic offset to adjust a document’s topic proportions. CTR has been shown to outperform a variant of fLDA [20]. Our proposed model CTPF uses the CTR approach to sharing latent spaces. CTR [20] combines topic modeling using LDA [2] with Gaussian matrix factorization for one-class collaborative filtering [12]. Like CTPF, the underlying MF algorithm has a per-iteration complexity that is linear in the number of non-zero observations. Unlike CTPF, CTR is not conditionally 6 mendeley.in mendeley.out arxiv.in arxiv.out 0.5% 1.0% 0.1% 0.2% 0.3% 0.4% 0.5% 1.0% 1.5% 2.0% 0.1% 0.2% 0.3% 0.4% 10 30 50 70 100 10 30 50 70 100 10 30 50 70 100 10 30 50 70 100 Number of recommendations Mean precision CTPF (Section 2) Decoupled PF (Section 5) Content Only Ratings Only [9] Collaborative Topic Regression [20] mendeley.in mendeley.out arxiv.in arxiv.out 2% 4% 6% 1% 2% 3% 4% 5% 0% 1% 2% 3% 4% 0.5% 1.0% 1.5% 2.0% 10 30 50 70 100 10 30 50 70 100 10 30 50 70 100 10 30 50 70 100 Number of recommendations Mean recall CTPF (Section 2) Decoupled PF (Section 5) Content Only Ratings Only [9] Collaborative Topic Regression [20] Figure 3: The CTPF coordinate ascent algorithm outperforms CTR and other competing algorithms on both in-matrix and out-matrix predictions. Each panel shows the in-matrix or out-matrix recommendation task on the Mendeley data set or the 1-year arXiv data set. Note that the Ratings-only model cannot make out-matrix predictions. The mean precision and mean recall are computed from a random sample of 10,000 users. conjugate, and the inference algorithm depends on numerical optimization of topic intensities. Further, CTR requires setting confidence parameters that govern uncertainty around a class of observed ratings. As we show in Section 5, CTPF scales more easily and provides significantly better recommendations than CTR. .5 Empirical results We use the predictive approach to evaluating model fitness [7], comparing the predictive accuracy of the CTPF coordinate ascent algorithm in Figure 2 to collaborative topic regression (CTR) [21]. We also compare to variants of CTPF to demonstrate that coupling the latent spaces using corrective terms is essential for good predictive performance, and that CTPF predicts significantly better than its variants and CTR. Finally, we explore large real-world data sets revealing the interaction patterns between readers and articles. Data sets. We study the CTPF algorithm of Figure 2 on two data sets. The Mendeley data set [13] of scientific articles is a binary matrix of 80,000 users and 260,000 articles with 5 million observations. Each cell corresponds to the presence or absence of an article in a scientist’s online library. The arXiv data set is a matrix of 120,297 users and 825,707 articles, with 43 million observations. Each observation indicates whether or not a user has consulted an article (or its abstract). This data was collected from the access logs of registered users on the http://arXiv.org paper repository. The articles and the usage data spans a timeline of 10 years (2003-2012). In our experiments on predictive performance, we use a subset of the data set, with 64,978 users 636,622 papers and 7.6 million clicks, which spans one year of usage data (2012). We treat the user clicks as implicit feedback and specifically as binary data. For each article in the above data sets, we remove stop words and use tf-idf to choose the top 10,000 distinct words (14,000 for arXiv) as the vocabulary. We implemented the batch and stochastic algorithms for CTPF in 4500 lines of C++ code.1 Competing methods. We study the predictive performance of the following models. With the exception of the Poisson factorization [9], which does not model content, the topics and topic intensities (or proportions) in all CTPF models are initialized using LDA [2], and fit using batch variational inference. We set K = 100 in all of our experiments. • CTPF: CTPF is our proposed model (Section 2) with latent user preferences tied to a single vector ηu, and interpreted as affinity to latent topics β. 1Our source code is available from: https://github.com/premgopalan/collabtm 7 Topic: "Statistical Inference Algorithms" On the ergodicity properties of adaptive MCMC algorithms Particle filtering within adaptive Metropolis Hastings sampling An Adaptive Sequential Monte Carlo Sampler A) Articles about the topic; readers in the field B) Articles outside the topic; readers in the field A comparative review of dimension reduction methods in ABC Computational methods for Bayesian model choice The Proof of Innocence C) Articles about this field; readers outside the field Introduction to Monte Carlo Methods An introduction to Monte Carlo simulation of statistical... The No-U-Turn Sampler: Adaptively setting path lengths... Topic: “Information Retrieval” The anatomy of a large-scale hypertextual Web search engine Authoritative sources in a hyperlinked environment A translation approach to portable ontology specifications A) Articles about the topic; readers in the field B) Articles outside the topic; readers in the field How to choose a good scientific problem. Practical Guide to Support Vector Classification Maximum likelihood from incomplete data via the EM… C) Articles about this field; readers outside the field Data clustering: a review Defrosting the digital library: bibliographic tools… Top 10 algorithms in data mining Figure 4: The top articles by the expected weight θdk from a component discovered by our stochastic variational inference in the arXiv data set (Left) and Mendeley (Right). Using the expected topic proportions θdk and the expected topic offsets ϵdk, we identified subclasses of articles: A) corresponds to the top articles by topic proportions in the field of “Statistical inference algorithms” for arXiv and “Ontologies and applications” for Mendeley; B) corresponds to the top articles with low topic proportions in this field, but a large θdk + ϵdk, demonstrating the outside interests of readers of that field (e.g., very popular papers often appear such as “The Proof of Innocence” which describes a rigorous way to “fight your traffic tickets”). C) corresponds to the top articles with high topic proportions in this field but that also draw significant interest from outside readers. • Decoupled Poisson Factorization: This model is similar to CTPF but decouples the user latent preferences into distinct components pu and qu, each of dimension K. We have, wdv ∼Poisson(θT d βv); rud ∼Poisson(pT u θd + qT u ϵd). (5) The user preference parameters for content and ratings can vary freely. The qu are independent of topics and offer greater modeling flexibility, but they are less interpretable than the ηu in CTPF. Decoupling the factorizations has been proposed by Porteous et al. [16]. • Content Only: We use the CTPF model without the document topic offsets ϵd. This resembles the idea developed in [1] but using Poisson generating distributions. • Ratings Only [9]: We use Poisson factorization to the observed ratings. This model can only make in-matrix predictions. • CTR [20]: A full optimization of this model does not scale to the size of our data sets despite running for several days. Accordingly, we fix the topics and document topic proportions to their LDA values. This procedure is shown to perform almost as well as jointly optimizing the full model in [20]. We follow the authors’ experimental settings. Specifically, for hyperparameter selection we started with the values of hyperparameters suggested by the authors and explored various values of the learning rate as well as the variance of the prior over the correction factor (λv in [20]). Training convergence was assessed using the model’s complete log-likelihood on the training observations. (CTR does not use a validation set.) Evaluation. Prior to training models, we randomly select 20% of ratings and 1% of documents in each data set to be used as a held-out test set. Additionally, we set aside 1% of the training ratings as a validation set (20% for arXiv) and use it to determine convergence. We used the CTPF settings described in Section 3 across both data sets. During testing, we generate the top M recommendations for each user as those items with the highest predictive score under each method. Figure 3 shows the mean precision and mean recall at varying number of recommendations for each method and data set. We see that CTPF outperforms CTR and the Ratings-only model on all data sets. CTPF outperforms the Decoupled PF model and the Content-only model on all data sets except on cold-start predictions on the arXiv data set, where it performs equally well. The Decoupled PF model lacks CTPF’s interpretable latent space. The Content-only model performs poorly on most tasks; it lacks a corrective term on topics to account for user ratings. In Figure 4, we explored the Mendeley and the arXiv data sets using CTPF. We fit the Mendeley data set using the coordinate ascent algorithm, and the full arXiv data set using the stochastic algorithm from Section 3. Using the expected document topic intensities θdk and the expected document topic offsets ϵdk, we identified interpretable topics and subclasses of articles that reveal the interaction patterns between readers and articles. 8 References [1] D. Agarwal and B. Chen. fLDA: Matrix factorization through latent Dirichlet allocation. In Proceedings of the third ACM international conference on web search and data mining, pages 91–100. ACM, 2010. [2] D. Blei, A. Ng, and M. Jordan. latent Dirichlet allocation. Journal of Machine Learning Research, 3: 993–1022, January 2003. [3] J. Canny. GaP: A factor model for discrete data. In Proceedings of the 27th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 2004. [4] A. Cemgil. Bayesian inference for nonnegative matrix factorization models. Computational Intelligence and Neuroscience, 2009. [5] A. Dempster, N. Laird, and D. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B, 39:1–38, 1977. [6] D. B Dunson and A. H. Herring. Bayesian latent variable models for mixed discrete outcomes. Biostatistics, 6(1):11–25, 2005. [7] S. Geisser and W.F. Eddy. A predictive approach to model selection. Journal of the American Statistical Association, pages 153–160, 1979. [8] Z. Ghahramani and M. Beal. Variational inference for Bayesian mixtures of factor analysers. In Neural Information Processing Systems, volume 12, 2000. [9] P. Gopalan, J.M. Hofman, and D. Blei. Scalable recommendation with Poisson factorization. arXiv preprint arXiv:1311.1704, 2013. [10] M. Hoffman, D. Blei, C. Wang, and J. Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14:1303–1347, 2013. [11] L. Hong, A. S. Doumith, and B.D. Davison. Co-factorization machines: Modeling user interests and predicting individual decisions in Twitter. In Proceedings of the sixth ACM international conference on web search and data mining, pages 557–566. ACM, 2013. [12] Y. Hu, Y. Koren, and C. Volinsky. Collaborative filtering for implicit feedback datasets. In Eighth IEEE International Conference on Data Mining., pages 263–272. IEEE, 2008. [13] K. Jack, J. Hammerton, D. Harvey, J. J. Hoyt, J. Reichelt, and V. Henning. Mendeley’s reply to the datatel challenge. Procedia Computer Science, 1(2):1–3, 2010. URL http://www.mendeley.com/ research/sei-whale/. [14] N. Johnson, A. Kemp, and S. Kotz. Univariate Discrete Distributions. John Wiley & Sons, 2005. [15] M. Jordan, Z. Ghahramani, T. Jaakkola, and L. Saul. Introduction to variational methods for graphical models. Machine Learning, 37:183–233, 1999. [16] I. Porteous, A. U. Asuncion, and M. Welling. Bayesian matrix factorization with side information and Dirichlet process mixtures. In Maria Fox and David Poole, editors, In the conference of the Association for the Advancement of Artificial Intelligence. AAAI Press, 2010. [17] R. Salakhutdinov and A. Mnih. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In Proceedings of the 25th international conference on machine learning, pages 880–887, 2008. [18] H. Shan and A. Banerjee. Generalized probabilistic matrix factorizations for collaborative filtering. In Data Mining (ICDM), 2010 IEEE 10th International Conference on, pages 1025–1030. IEEE, 2010. [19] A. P. Singh and G. J. Gordon. Relational learning via collective matrix factorization. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 650–658. ACM, 2008. [20] C. Wang and D. Blei. Collaborative topic modeling for recommending scientific articles. In Knowledge Discovery and Data Mining, 2011. [21] C. Wang, J. Paisley, and D. Blei. Online variational inference for the hierarchical Dirichlet process. In Artificial Intelligence and Statistics, 2011. [22] X. Zhang and L. Carin. Joint modeling of a matrix with associated text via latent binary features. In Advances in Neural Information Processing Systems, pages 1556–1564, 2012. 9
2014
250
5,348
Optimizing Energy Production Using Policy Search and Predictive State Representations Yuri Grinberg Doina Precup School of Computer Science, McGill University Montreal, QC, Canada {ygrinb,dprecup}@cs.mcgill.ca Michel Gendreau∗ ´Ecole Polytechnique de Montr´eal Montreal, QC, Canada michel.gendreau@cirrelt.ca Abstract We consider the challenging practical problem of optimizing the power production of a complex of hydroelectric power plants, which involves control over three continuous action variables, uncertainty in the amount of water inflows and a variety of constraints that need to be satisfied. We propose a policy-search-based approach coupled with predictive modelling to address this problem. This approach has some key advantages compared to other alternatives, such as dynamic programming: the policy representation and search algorithm can conveniently incorporate domain knowledge; the resulting policies are easy to interpret, and the algorithm is naturally parallelizable. Our algorithm obtains a policy which outperforms the solution found by dynamic programming both quantitatively and qualitatively. 1 Introduction The efficient harnessing of renewable energy has become paramount in an era characterized by decreasing natural resources and increasing pollution. While some efforts are aimed towards the development of new technologies for energy production, it is equally important to maximize the efficiency of existing sustainable energy production methods [5], such as hydroelectric power plants. In this paper, we consider an instance of this problem, specifically the optimization of one of a complex of hydroelectric power plants operated by Hydro-Qu´ebec, the largest hydroelectricity producer in Canada [17]. The problem of optimizing hydroelectric power plants, also known as the reservoir management problem, has been extensively studied for several decades and a variety of computational methods have been applied to solve it (see e.g. [3, 4] a for literature review). The most common approach is based on dynamic programming (DP) [13]. However, one of the major obstacles of this approach lies in the difficulty of incorporating different forms of domain knowledge, which are key to obtaining solutions that are practically relevant. For example, the optimization is subject to constraints on water levels which might span several time-steps, making them difficult to integrate into typical DPbased algorithms. Moreover, human decision makers in charge of the power plants are reluctant to rely on black-box closed loop policies that are hard to understand. This has led to continued use in the industry of deterministic optimization methods that provide long-term open loop policies; such policies are then further adjusted by experts [2]. Finally, despite the different measures taken to relieve the curse of dimensionality in DP-style approaches, it remains a big concern for large scale problems. In this paper, we develop and evaluate a variation of simulation–based optimization [16], a special case of policy search [6], which combines some aspects of stochastic gradient descent and block ∗NSERC/Hydro-Qu´ebec Industrial Research Chair on the Stochastic Optimization of Electricity Generation, CIRRELT and D´epartement de Math´ematiques et de G´enie Industriel, ´Ecole Polytechnique de Montr´eal. 1 coordinate descent [14]. We compare our solution to a DP-based solution developed by HydroQu´ebec based on historical inflow data, and show both quantitative and qualitative improvement. We demonstrate how domain knowledge can be naturally incorporated into an easy-to-interpret policy representation, as well as used to guide the policy search algorithm. We use a type of predictive state representations [9, 10] to learn a model for the water inflows. The policy representation further leverages the future inflow predictions obtained from this model. The approach is very easy to parallelize, and therefore easily scalable to larger problems, due to the availability of low-cost computing resources. Although much effort in this paper goes to analyzing and solving one specific problem, the proposed approach is general and could be applied to any sequential optimization problems involving constraints. At the end of the paper, we summarize the utility of this approach from a domain–independent perspective. The paper is organized as follows. Sec. 2 provides information about the hydroelectric power plant complex (needed to implement the simulator used in the policy search procedure) and describes the generative model used by Hydro-Qu´ebec to generate inflow data with similar statistical properties as inflows observed historically. Sec. 3 describes the learning algorithm that produces a predictive model for the inflows, based on recent advances in predictive state representations. In Sec. 4 we present the policy representation and the search algorithm. Sec. 5 presents a quantitative and qualitative analysis of the results, and Sec. 6 concludes the paper. 2 Problem specification We consider a hydroelectric power plant system consisting of four sites, R1, . . . ,R4 operating on the same course of water. Although each site has a group of turbines, we treat this group as a single large turbine whose speed is to be controlled. R4 is the topmost site, and water turbined at reservoir Ri flows to Ri−1 (where it gets added to any other naturally incoming flows). The topmost three sites (R2,R3,R4) have their own reservoirs, in which water accumulates before being pushed through a number of turbines which generate the electricity. However, some amount of water might not be useful for producing electricity because it is spilled (e.g., to prevent reservoir overflow). Typically, policies that manage to reduce spillage produce more power. The amount of water in each reservoir changes as a function of the water turbined/spilled from the upstream site, the water inflow coming from the ground, and the amount of water turbined/spilled at the current site, as follows: V4(t + 1) = V4(t) + I4(t) −X4(t) −Y4(t), Vi(t + 1) = Vi(t) + Xi+1(t) + Yi+1(t) + Ii(t) −Xi(t) −Yi(t), i = 2, 3 where Vi(t) is the volume of water at reservoir Ri at time t, Xi(t) is the amount of water turbined at Ri at time t, Yi(t) is the amount of water spilled at site Ri at time t, and Ii(t) is water inflow to site Ri at time t. Since R1 does not have a reservoir, all the incoming water is used to operate the turbine, and the extra water is spilled. At the other sites, the water spillage mechanism is used only as a means to prevent reservoir overflow. The control problem that needs to be solved is to determine the amount of water to turbine during each period t, in order to maximize power production, while also satisfying constraints on the water level. We are interested in a problem considered of intermediate temporal resolution, in which a control action at each of the 3 topmost sites is chosen weekly, after observing the state of the reservoirs and the inflows of the previous week. Power production model The amount of power produced is a function of the current water level (headwater) at the reservoir and the total speed of the turbines (m3/s). It is not a linear function, but it is well approximated by a piece-wise linear function for a fixed value of the headwater (see Fig. A.1 in the supplementary material) . The following equation is used to obtain the power production curve for other values of the headwater [18]: P(x, h) =  h href 1.5 · Pref  h href −0.5 · x ! , (1) where x is the flow, h is the current headwater level, href is the reference headwater, and Pref is the production curve of the reference headwater. Note that Eq. 1 implies that the maximum total 2 speed of the turbines also changes as the headwater changes; specifically, h h href i−0.5 x should not exceed the maximum total speed of the turbines, given in the appendix figures. For completeness, Figure A.2 (supplementary material) can be used to convert the amount of water in the reservoir to the headwater value. Constraints Several constraints must be satisfied while operating the plant, which are ecological in nature. 1. Minimum turbine speed at R1 (MIN FLOW(w), w ∈{1, ..., 52}): This sufficient flow needs to be maintained to allow for easy passage for the fish living in the river. 2. Stable turbine speed throughout weeks 43-45 (fluctuations of up to BUFFER = 35 m3/s between weeks are acceptable). Nearly constant water flow at this time of the year ensures that the area is favorable for fish spawning. 3. The amount of water in reservoir R2 should not go below MIN V OL = 1360 hm3. Due to the depth of the reservoir, the top and bottom water temperatures differ. Turbining warmer water (at reservoir’s top) is preferrable for the fish, but this constraint is less important than the previous two. Water inflow process The operation of the hydroelectric power plant is almost entirely dependent on the inflows at each site. Historical data suggests that it is safe to assume that the inflows at different sites in the same period t are just scaled values of each other. However, there is relatively little data available to optimize the problem through simulation: there are only 54 years of inflow data, which translates into 2808 values (one value per week - see Fig. 1). Hydro-Quebec use this data to learn a generative model for inflows. It is a periodic autoregressive model of first order, PAR(1), whose structure is well aligned with the hydrological description of the inflows [1]. The model generates data using the following equation: x(t + 1) = αt mod N · x(t) + ξ(t), where ξ(t) ∼N(0, νt mod N) i.i.d., x(0) = ξ(0), and N = 52 in our setting. As the weekly historical data is not necessarily normally distributed, transformations are used to normalize the data before learning the parameters of the PAR(1) model. The transformations used here are either logarithmic, ln(X + a), where a is a parameter, or gamma, based on Wilson Hilferty transformation [15]. Hence, to generate synthetic data, the reverse of these transformations are applied to the output produced by the PAR(1) process1. Figure 1: Historical inflow data. 1The parameters of the PAR(1) process, as well as the transformations and their parameters (in the logarithmic case) are estimated using the SAMS software [11]. 3 3 Predictive modeling of the inflows It is intuitively clear that predicting future inflows well could lead to better control policies. In this section, we describe the model that lets us compute the predictions of future inflows, which are used as an input to policies. We use a recently developed time series modelling framework based on predictive state representations (PSRs) [9, 10], called mixed-observable PSRs (MO-PSR) [8]. Although one could estimate future inflows based on knowledge that the generative process is PAR(1), our objective is to use a general modelling tool that does not rely on this assumption, for two reasons. First, decoupling the generative model from the predictive model allows us to replace the current generative model with more complex alternatives later on, with little effort. Moreover, more complex models do not necessary have a clear way to estimate a sufficient statistic from a given history (see e.g. temporal disaggregation models [12]). Second, we want to test the ability of predictive state representations, which are a fairly recent approach, to produce a model that is useful in a real-world control problem. We now describe the models and learning algorithms used. 3.1 Predictive state representations (Linear) PSRs were introduced as a means to represent a partially observable environment without explicitly modelling latent states, with the goal of developing efficient learning algorithms [9, 10]. A predictive representation is only required to keep some form of sufficient statistic of the past, which is used to predict the probability of future sequences of observations generated by the underlying stochastic process. Let O be a discrete observation space. With probability P(o1, ..., ok), the process outputs a sequence of observations o1, ..., ok ∈O. Then, for some n ∈N, the set of parameters {m∗∈Rn, {Mo ∈Rn×n}o∈O, p0 ∈Rn} defines a n-dimensional linear PSR that represents this process if the following holds: ∀k ∈N, oi ∈O : P(o1, ..., ok) = m⊤ ∗Mok · · · Mo1p0, where p0 is the initial state of the PSR [7]. Let p(h) be the PSR state corresponding to a history h. Then, for any o ∈O, it is possible to track a sufficient statistic of the history, which can be used to make any future predictions, using the equation: p(ho) ≜ Mop(h) m⊤ ∗Mop(h). Because PSRs are very general, learning can be difficult without exploiting some structure of the problem domain. In our problem, knowing the week of the year gives significant information to the predictive model, but the model does not need to learn the dynamics of this variable. This turns out to be a special case of the so-called mixed observable PSR model [8], in which an observation variable can be used to decompose the problem into several, typically much smaller, problems. 3.2 Mixed-observable PSR for inflow process Figure 2: Prediction accuracy of the mean predictor (blue), MO-PSR predictor (black), and the predictions calculated from a true model (red). We define the discrete observation space O by discretizing the space of inflows into 20 bins, then follow [8] to estimate a MO-PSR representation from 3 × 105 trajectories obtained from the generative model. This procedure is a generalization of the spectral learning algorithm developed for PSRs [7], which is a consistent estimator. Specifically, let the set of all observed tuples of sequences of length 3 be denoted by H and T simultaneously. We then split the set H into 52 subsets, each corresponding to a different week of the year, and obtain a collection {Hw}w∈W, where W = {1, ..., 52}. Then, we estimate a collection of the following vectors and matrices from data: 4 • {PHw}w∈W - a set of |Hw|-dimensional vectors with entries equal to P(h ∈Hw|h occured right before week w), • {PT ,Hw}w∈W - a set of |T | × |Hw|-dimensional matrices with entries equal to P(h, t|h ∈Hw, t ∈T , h occured right before week w), • {PT ,o,Hw}w∈W,o∈O - a set of |T | × |Hw|-dimensional matrices with entries equal to P(h, o, t|h ∈Hw, o ∈O, t ∈T , h occured right before week w). Finally, we perform Singular Value Decomposition (SVD) on the estimated matrices {PT ,Hw}w∈W and use their corresponding low rank matrices of left singular vectors {Uw}w∈W to compute the MO-PSR parameters as follows: • ∀o ∈O, w ∈W : Bw o = U⊤ w−1PT ,o,Hw(U⊤ wPT ,Hw)†, • ∀w ∈W : bw 0 = U⊤ wPT ,Hw1, • ∀w ∈W : bw ∗= (P⊤ T ,HwUw)†PHw, where w −1 is the week before w, and † denotes the Moore–Penrose pseudoinverse. The above parameters can be used to estimate probability of any sequence of future observations, given starting week w, as: P(o1, ..., ot) = bw+t⊤ ∗ Bw+t−1 ot · · · Bw o1bw 0 , where w + i represents the i-th week after w. Figure 2 shows the prediction accuracy of the learnt MO-PSR model at different horizons, compared to two baselines: the weekly average, and the true PAR(1) model that knows the hidden state (oracle predictor). 4 Policy search The objective is to maximize the expected return, E(R), over each year, given by the amount of power produced that year minus the penalty for constraint violations. Specifically, R = 52 X w=1 " P(w) − 3 X i=1 αiCi(w) # , where P(w) is the amount of power produced during week w, and Ci(w) is the penalty for violating the i-th constraint, defined as: C1(w) = min{MIN FLOW(w) −R1flow(w), 0}2 C2(w) =  min{|R1flow(w) −meanR1flow| −BUFFER, 0}2 if w ∈{43, 44, 45} 0 otherwise C3(w) = min{MIN V OL −R2vol(w), 0} 3/2 where R1flow(w) is the water flow (turbined + spilled) at R1 during week w, R2vol(w) is the water volume at R2 at the end of week w, and meanR1flow is the average water flow at site R1 during weeks 43-45. There are three variables to control: the speed of turbines R2,R3,R4. As discussed, the speed of the turbine at site R1 is entirely controlled by the amount of incoming water. The approach we take belongs to a general class of policy search methods [6]. This technique is based on the ability to simulate policies, and the algorithm will typically output the policy that has achieved the highest reward during the simulation. The policy for each turbine takes the parametric form of a truncated linear combination of features: min " max k X i=1 xj · θj, MAX SPEEDRi ! , 0 # , where MAX SPEEDRi is the maximum speed of the turbine at Ri, xj are the features and θj are the parameters. For each site, the features include the current amount of water in the reservoir, the total amount of water in downstream reservoirs, and a constant. For the policy that uses the predictive 5 model we include one more feature per site: the expected amount of inflow for the following week. Hence, there are 8 and 11 features for the policies without/with predictions respectively (as there are no downstream reservoirs for R2). Using this policy representation results in reasonable performance, but a closer look at constraint 2 during simulation reveals that the reservoirs should not be too full; otherwise, there is a high chance of spillage, preventing the ability to set a stable flow during the three consecutive weeks critical for fish spawning. To address this concern, we use a different set of parameters during weeks 41-43, to ensure that the desired state of the reservoirs is reached before the constrained period sets in. Note that the policy search framework allows us to make such an adjustment very easily. Finally, we also use the structure of the policy to comply as much as possible with constraint 2, by setting the speed of the turbine at site R2 during weeks 44-45 to be equal to the previous water flow at site R1. For the policy that uses the predictive model, we further refine this by subtracting the expected predicted amount of inflow at site R1. This brings the number of parameters used for the policies to 16 and 22 respectively. As the policies are simply (truncated) linear combinations of features, they are easy to inspect and interpret. Our algorithm is based on a random local search around the current solution, by perturbing different blocks of parameters while keeping others fixed, as in block coordinate descent [14]. Each time a significantly better solution than the current one is found, line search is performed in the direction of improvement. The pseudo-code is shown in Alg. 1. The algorithm itself, like the policy representation, exploits problem structure by also searching the parameters of a single turbine as part of the overall search procedure. Algorithm 1 Policy search algorithm Parameters: N−maximum number of interations θ = {θR2, θR3, θR4} = {θ1, ..., θm} ∈Rm - initial parameter vector n−number of parallel policy evaluations Threshold−significance threshold γ−sampling variance Output: θ 1: repeat 2: Stage 1: ▷searching over entire parameter space 3: θ = SEARCHWITHINBLOCK(θ, all indexes) 4: Stage 2: ▷searching over parameters of each turbine separately 5: for all reservoirs Rj do 6: θ = SEARCHWITHINBLOCK(θ, parameter indexes of turbine Rj) 7: Stage 3: ▷searching over each parameter separately 8: for j ←1, m do 9: θ = SEARCHWITHINBLOCK(θ, index j) 10: until no improvement at any stage 11: 12: procedure SEARCHWITHINBLOCK(θ, I) ▷I, Ic - an index set and its complement 13: repeat 14: Obtain n samples {∆i ∼N(0, γI)}i∈{1,...,n} 15: Evaluate policies defined by parameters {{θIc, θI + ∆i}}i∈{1,...,n} (in parallel) 16: if ˆE(R{θIc,θI+∆i}) > ˆE(Rθ) + Threshold then 17: Find α∗= arg maxα ˆE(R{θIc,θI+α∆i}) using a line search 18: θ ←{θIc, θI + α∗∆i} 19: until no improvement for N consecutive iterations 20: return θ The estimate of the expected reward of a policy is calculated by running the simulator on a single 2000-year-long trajectory obtained from the generative model described in Sec. 2. Since the algo6 (a) (b) (c) (d) (e) (f) Figure 3: Qualitative comparison between DP and PS with pred solutions evaluated on the historical data. Left - DP, right - PS with pred. Plots (a)-(b) show the amount of water turbined at site R4; plots (c)-(d) show the water flow at site R1; plots (e)-(f) show the change in the volume of reservoir R2. Dashed horizontal lines in plots (c)-(f) represent the constraints, dotted vertical lines in plots (c)-(d) mark weeks 43-45. rithm depends on the initialization of the parameter vector, we sample the initial parameter vector uniformly at random and repeat the search 50 times. The best solution is reported. Mean-prod R1 v.% R1 43-45 v.% R1 43-45 v. mean R2 v.% DP 8,251GW 0% 22% 11 0% PS no pred 8,286GW 0% 28% 2.6 1.8% PS with pred 8,290GW 0% 3.7% 0.5 1.8% Table 1: Comparison between solutions found by dynamic programming (DP), policy search without predictive model (PS no pred) and policy search using the predictive model (PS with pred). Mean-prod represents the average annual electricity production; R1 v.% is the percentage of years in which constraint 1 is violated; R2 v.% is the percentage of years in which constraint 3 is violated; R1 43-45 v.% is the percentage of years in which constraint 2 is violated; R1 43-45 v. mean represents the average amount by which constraint 2 is violated. 5 Experimental results We compare the solutions obtained using the proposed policy search with (PS with pred) and without predictive model (PS no pred) to a solution based on dynamic programming (DP), developed by Hydro-Qu´ebec. The state space of DP is defined by: week, water volume at each reservoir, and previous total inflow. All the continuous variables are discretized, and the transition matrix is calculated based on the PAR(1) generative model of the inflow process presented earlier. The discretization was 7 optimized to obtain best results. During the evaluation, the solution provided by DP is adjusted to avoid obviously wrong decisions, like unnecessary water spilling. All solutions are evaluated on the original historical data. The constraints in DP are handled in the same way as in both PS solutions, with penalties for violations taking the same form as shown previously. The only exception is the constraint 2, which requires keeping the flow roughly equal throughout several time steps. Since it is not possible to incorporate this constraint into DP as is, it is handled by enforcing a turbine flow between 265 m3/s (the minimum required by constraint 1) and 290 m3/s. Table 1 shows the quantitative comparison between the solutions obtained by three methods. PS solutions are able to produce more power, with the best value improving by nearly half of a percent - a sizeable improvement in the field of energy production. All solutions ensure that constraint 1 is satisfied (column R1 v.%), but constraint 2 is more difficult. Although PS no pred violates this constraint slightly more often then DP (column R1 43-45 v.%), the amount by which the constraint is violated is significantly smaller (column R1 43-45 v. mean). As expected, PS with pred performs much better, because it explicitly incorporates inflow predictions. Finally, although both PS solutions violate constraint 3 during one out of 54 years (see Fig. 3(f)), such occasional violations are acceptable as long as they help satisfy other constraints. Overall, it is clear that PS with pred is a noticeable improvement over DP based on the quantitative comparison alone. Practitioners are also often interested to assess the applicability of the simulated solution by other criteria that are not always captured in the problem formulation. Fig. 3 provides different plots that allow such a comparison between the DP and PS with pred solutions. Plots (a)-(b) show that the solution provided by PS with pred offers a significantly smoother policy compared to the DP solution (see also Fig. A.3 in supplementary material). This smoothness is due to the policy parametrization, while the DP roughness is the result of the discretization of the input/output spaces. Unless there are significant changes in the amount of inflows within consecutive weeks, major fluctuations in turbine speeds are undesirable, and their presence cannot be easily explained to the operator. The only fluctuations in the solution of PS with pred that are not the result of large inflows are cases in which the reservoir is empty (see e.g. rapid drops around 10-th week at plot (b)), or a significant increase in turbine speed around weeks 41-45 due to the change in policy parameters. This also affects the smoothness of the change in the water volume trajectory, which can be observed at plots (e)-(f) for reservoir R2 for example. The period of weeks 43-45 is a reasonable exception due to the change in policy parameters that require turbining at faster speeds to satisfy constraint 2. 6 Discussion We considered the problem of optimizing energy production of a hydroelectric power plant complex under several constraints. The proposed approach is based on a problem-adapted policy search whose features include predictions obtained from a predictive state representation model. The resulting solution is superior to a well-established alternative, both quantitatively and qualitatively. It is important to point out that the proposed approach is not, in fact, specific to this problem or this domain alone. Often, real-world sequential decision problems have several decision variables, a variety of constraints of different priorities, uncertainty, etc. Incorporating all available domain knowledge into the optimization framework is often the key to obtaining acceptable solutions. This is where the policy search approach is very useful, because it is typically easy to incorporate many types of domain knowledge naturally within this framework. First, the policy space can rely on features that are deemed useful for the problem, have an interpretable structure and adhere to the constraints of the problem. Second, policy search can explore the most likely directions of improvement first, as considered by experts. Third, the policy can be evaluated directly based on its performance (regardless of the complexity of the reward function). Forth, it is usually easy to implement the policy search and parallelize parts of the policy search procedure. Finally, the use of PSRs allows us to produce good features for the policy by providing reliable predictions of future system behavior. For future work, the main objective is to evaluate the proposed approach on other realistic complex problems, in particular in domains where solutions obtained from other advanced techniques are not practically relevant. Acknowledgments We thank Gr´egory Emiel and Laura Fagherazzi of Hydro-Qu´ebec for many helpful discussions and for providing access to the simulator and their DP results, and Kamran Nagiyev for porting an initial version of the simulator to Java. This research was supported by the NSERC/Hydro-Qu´ebec Industrial Research Chair on the Stochastic Optimization of Electricity Generation, and by the NSERC Discovery Program. 8 References [1] Salas, J. D. (1980). Applied modeling of hydrologic time series. Water Resources Publication. [2] Carpentier, P. L., Gendreau, M., Bastin, F. (2013). Long-term management of a hydroelectric multireservoir system under uncertainty using the progressive hedging algorithm. Water Resources Research, 49(5), 2812-2827. [3] Rani, D., Moreira, M.M. (2010). Simulation-optimization modeling: a survey and potential application in reservoir systems operation. Water resources management, 24(6), 1107-1138. [4] Labadie, J.W. (2004). Optimal operation of multireservoir systems: State-of-the-art review. Journal of Water Resources Planning and Management, 130(2), 93-111. [5] Ba˜nos, R., Manzano-Agugliaro, F., Montoya, F. G., Gil, C., Alcayde, A., G´omez, J. (2011). Optimization methods applied to renewable and sustainable energy: A review. Renewable and Sustainable Energy Reviews, 15(4), 1753-1766. [6] Deisenroth, M.P., Neumann, G., Peters, J. (2013). A Survey on Policy Search for Robotics. Foundations and Trends in Robotics, 21, pp.388-403. [7] Boots, B., Siddiqi, S., Gordon, G. (2010). Closing the learning-planning loop with predictive state representations. In Proc. of Robotics: Science and Systems VI. [8] Ong, S., Grinberg, Y., Pineau, J. (2013). Mixed Observability Predictive State Representations. In Proc. of 27th AAAI Conference on Artificial Intelligence. [9] Littman, M., Sutton, R., Singh, S. (2002). Predictive representations of state. Advances in Neural Information Processing Systems (NIPS). [10] Singh, S., James, M., Rudary, M. (2004). Predictive state representations: A new theory for modeling dynamical systems. In Proc. of 20th Conference on Uncertainty in Artificial Intelligence. [11] Sveinsson, O.G.B., Salas, J.D., Lane, W.L., Frevert, D.K. (2007). Stochastic Analisys Modeling and Simulation (SAMS-2007). URL: http://www.sams.colostate.edu. [12] J.B., Marco, R., Harboe, J.D., Salas (Eds.) (1993). Stochastic hydrology and its use in water resources systems simulation and optimization, 237. Springer. [13] Bellman, R. (1954). Dynamic Programming. Princeton University Press. [14] Tseng, P. (2001). Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of optimization theory and applications, 109(3), 475-494. [15] Loucks, D.P., J.R. Stedinger, D.A. Haith (1981). Water Resources Systems Planning and Analysis. Prentice-Hall, Englewood Cliffs, N.J.. [16] Gosavi, A. (2003). Simulation-based optimization: parametric optimization techniques and reinforcement learning, 25. Springer. [17] Fortin, P. (2008). Canadian clean: Clean, renewable hydropower leads electricity generation in Canada. IEEE Power Energy Mag., July/August, 41-46. [18] Breton, M., Hachem, S., Hammadia, A. (2002). A decomposition approach for the solution of the unit loading problem in hydroplants. Automatica, 38(3), 477-485. 9
2014
251
5,349
Time–Data Tradeoffs by Aggressive Smoothing John J. Bruer1,* Joel A. Tropp1 Volkan Cevher2 Stephen R. Becker3 1Dept. of Computing + Mathematical Sciences, California Institute of Technology 2Laboratory for Information and Inference Systems, EPFL 3Dept. of Applied Mathematics, University of Colorado at Boulder *jbruer@cms.caltech.edu Abstract This paper proposes a tradeoffbetween sample complexity and computation time that applies to statistical estimators based on convex optimization. As the amount of data increases, we can smooth optimization problems more and more aggressively to achieve accurate estimates more quickly. This work provides theoretical and experimental evidence of this tradeofffor a class of regularized linear inverse problems. 1 Introduction It once seemed obvious that the running time of an algorithm should increase with the size of the input. But recent work in machine learning has led us to question this dogma. In particular, Shalev-Shwartz and Srebro [1] showed that their algorithm for learning a support vector classifier actually becomes faster when they increase the amount of training data. Other researchers have identified related tradeoffs [2, 3, 4, 5, 6, 7, 8, 9]. Together, these works support an emerging perspective in statistical computation that treats data as a computational resource that we can exploit to improve algorithms for estimation and learning. In this paper, we consider statistical algorithms based on convex optimization. Our primary contribution is the following proposal: As the amount of available data increases, we can smooth statistical optimization problems more and more aggressively. We can solve the smoothed problems significantly faster without any increase in statistical risk. Indeed, many statistical estimation procedures balance the modeling error with the complexity of the model. When we have very little data, complexity regularization is essential to fit an accurate model. When we have a large amount of data, we can relax the regularization without compromising the quality of the model. In other words, excess data offers us an opportunity to accelerate the statistical optimization. We propose to use smoothing methods [10, 11, 12] to implement this tradeoff. We develop this idea in the context of the regularized linear inverse problem (RLIP) with random data. Nevertheless, our ideas apply to a wide range of problems. We pursue a more sophisticated example in a longer version of this work [13]. JJB’s and JAT’s work was supported under ONR award N00014-11-1002, AFOSR award FA9550-09-10643, and a Sloan Research Fellowship. VC’s work was supported in part by the European Commission under Grant MIRG-268398, ERC Future Proof, SNF 200021-132548, SNF 200021-146750 and SNF CRSII2-147633. SRB was previously with IBM Research, Yorktown Heights, NY 10598 during the completion of this work. 1 1.1 The regularized linear inverse problem Let x♮∈Rd be an unknown signal, and let A ∈Rm×d be a known measurement matrix. Assume that we have access to a vector b ∈Rm of m linear samples of that signal given by b := Ax♮. Given the pair (A,b), we wish to recover the original signal x♮. We consider the case where A is fat (m < d), so we cannot recover x♮without additional information about its structure. Let us introduce a proper convex function f : Rd →R ∪{+∞} that assigns small values to highly structured signals. Using the regularizer f , we construct the estimator Dx := arg min x f (x) subject to Ax = b. (1) We declare the estimator successful when Dx = x♮, and we refer to this outcome as exact recovery. While others have studied (1) in the statistical setting, our result is different in character from previous work. Agarwal, Negahban, and Wainwright [14] showed that gradient methods applied to problems like (1) converge in fewer iterations due to increasing restricted strong convexity and restricted smoothness as sample size increases. They did not, however, discuss a time–data tradeoffexplicitly, nor did they recognize that the overall computational cost may rise as the problem sizes grow. Lai and Yin [15], meanwhile, proposed relaxing the regularizer in (1) based solely on some norm of the underlying signal. Our relaxation, however, is based on the sample size as well. Our method results in better performance as sample size increases: a time–data tradeoff. The RLIP (1) provides a good candidate for studying time–data tradeoffs because recent work in convex geometry [16] gives a precise characterization of the number of samples needed for exact recovery. Excess samples allow us to replace the optimization problem (1) with one that we can solve faster. We do this for sparse vector and low-rank matrix recovery problems in Sections 4 and 5. 2 The geometry of the time–data tradeoff In this section, we summarize the relevant results that describe the minimum sample size required to solve the regularized linear inverse problem (1) exactly in a statistical setting. 2.1 The exact recovery condition and statistical dimension We can state the optimality condition for (1) in a geometric form; cf. [17, Prop. 2.1]. Fact 2.1 (Exact recovery condition). The descent cone of a proper convex function f : Rd →R∪{+∞} at the point x is the convex cone D( f ; x) := [ τ>0 ( y ∈Rd : f (x + τy) ≤f (x) ) . The regularized linear inverse problem (1) exactly recovers the unknown signal x♮if and only if D( f ; x♮) ∩null(A) = {0}. (2) We illustrate this condition in Figure 1(a). To determine the number of samples we need to ensure that the exact recovery condition (2) holds, we must quantify the “size” of the descent cones of the regularizer f . Definition 2.2 (Statistical dimension [16, Def. 2.1]). Let C ∈Rd be a convex cone. Its statistical dimension δ(C) is defined as δ(C) := E f ∥ΠC(g)∥2g , where g ∈Rd has independent standard Gaussian entries, and ΠC is the projection operator onto C. When the measurement matrix A is sufficiently random, Amelunxen et al. [16] obtain a precise characterization of the number m of samples required to achieve exact recovery. 2 xÚ nullHAL + xÚ DI f , xÚM + xÚ 9x : f HxL £ f IxÚM= (a) 9x : fŽHxL £ fŽIxÚM= xÚ nullHAL + xÚ (b) Figure 1: The geometric opportunity. Panel (a) illustrates the exact recovery condition (2). Panel (b) shows a relaxed regularizer ˜f with larger sublevel sets. The shaded area indicates the difference between the descent cones of ˜f and f at x♮. When we have excess samples, Fact 2.3 tells us that the exact recovery condition holds with high probability, as in panel (a). A suitable relaxtion will maintain exact recovery, as in panel (b), while allowing us to solve the problem faster. Fact 2.3 (Exact recovery condition for the random RLIP [16, Thm. II]). Assume that the null space of the measurement matrix A ∈Rm×d in the RLIP (1) is oriented uniformly at random. (In particular, a matrix with independent standard Gaussian entries has this property.) Then m ≥δ  D( f ; x♮)  + Cη √ d =⇒exact recovery holds with probability ≥1 −η; m ≤δ  D( f ; x♮)  −Cη √ d =⇒exact recovery holds with probability ≤η, where Cη := p 8 log(4/η). In words, the RLIP undergoes a phase transition when the number m of samples equals δ(D( f ; x♮)). Any additional samples are redundant, so we can try to exploit them to identify x♮more quickly. 2.2 A geometric opportunity Chandrasekaran and Jordan [6] have identified a time–data tradeoffin the setting of denoising problems based on Euclidean projection onto a constraint set. They argue that, when they have a large number of samples, it is possible to enlarge the constraint set without increasing the statistical risk of the estimator. They propose to use a discrete sequence of relaxations based on algebraic hierarchies. We have identified a related opportunity for a time–data tradeoffin the RLIP (1). When we have excess samples, we may replace the regularizer f with a relaxed regularizer ˜f that is easier to optimize. In contrast to [6], we propose to use a continuous sequence of relaxations based on smoothing. Figure 1 illustrates the geometry of our time–data tradeoff. When the number of samples exceeds δ(D( f ; x♮)), Fact 2.3 tells us that the situation shown in Figure 1(a) holds with high probability. This allows us to enlarge the sublevel sets of the regularizer while still satisfying the exact recovery condition, as shown in Figure 1(b). A suitable relaxation allows us to solve the problem faster. Our geometric motivation is similar with [6] although our relaxation method is totally unrelated. 3 A time–data tradeoffvia dual-smoothing This section presents an algorithm that can exploit excess samples to solve the RLIP (1) faster. 3.1 The dual-smoothing procedure The procedure we use applies Nesterov’s primal-smoothing method from [11] to the dual problem; see [12]. Given a regularizer f , we introduce a family { f µ : µ > 0} of strongly convex majorants: f µ(x) := f (x) + µ 2 ∥x∥2 . 3 Algorithm 3.1 Auslender–Teboulle applied to the dual-smoothed RLIP Input: measurement matrix A, observed vector b 1: z0 ←0, ¯z0 ←z0, θ0 ←1 2: for k = 0,1,2,. . . do 3: yk ←(1 −θk)zk + θk ¯zk 4: xk ←arg minx f (x) + µ 2 ∥x∥2 −⟨yk, Ax −b⟩ 5: ¯zk+1 ←¯zk + µ ∥A∥2θ (b −Axk) 6: zk+1 ←(1 −θk)zk + θk ¯zk+1 7: θk+1 ←2/(1 + (1 + 4/θ2 k)1/2) 8: end for In particular, the sublevel sets of f µ grow as µ increases. We then replace f with f µ in the original RLIP (1) to obtain new estimators of the form Dxµ := arg min x f µ(x) subject to Ax = b. (3) The Lagrangian of the convex optimization problem (3) becomes Lµ(x,z) = f (x) + µ 2 ∥x∥2 −⟨z, Ax −b⟩, where the Lagrange multiplier z is a vector in Rm. This gives a family of dual problems: maximize gµ(z) := min x Lµ(x,z) subject to z ∈Rm. (4) Since f µ is strongly convex, the Lagrangian L has a unique minimizer xz for each dual point z: xz := arg min x Lµ(x,z). (5) Strong duality holds for (3) and (4) by Slater’s condition [18, Sec. 5.2.3]. Therefore, if we solve the dual problem (4) to obtain an optimal dual point, (5) returns the unique optimal primal point. The dual function is differentiable with ∇gµ(z) = b −Axz, and the gradient is Lipschitz-continuous with Lipschitz constant Lµ no larger than µ−1 ∥A∥2; see [12, 11]. Note that Lµ is decreasing in µ, and so we call µ the smoothing parameter. 3.2 Solving the smoothed dual problem In order to solve the smoothed dual problem (4), we apply the fast gradient method from Auslender and Teboulle [19]. We present the pseudocode in Algorithm 3.1. The computational cost of the algorithm depends on two things: the number of iterations necessary for convergence and the cost of each iteration. The following result bounds the error of the primal iterates xk with respect to the true signal x♮. The proof is in the supplemental material. Proposition 3.1 (Primal convergence of Algorithm 3.1). Assume that the exact recovery condition holds for the primal problem (3). Algorithm 3.1 applied to the smoothed dual problem (4) converges to an optimal dual point z⋆ µ. Let x⋆ µ be the corresponding optimal primal point given by (5). Then the sequence of primal iterates {xk} satisfies ∥x♮−xk ∥≤2 ∥A∥∥z⋆ µ ∥ µ · k . The chosen regularizer affects the cost of Algorithm 3.1, line 4. Fortunately, this step is inexpensive for many regularizers of interest. Since the matrix–vector product Axk in line 5 dominates the other vector arithmetic, each iteration requires O(md) arithmetic operations. 3.3 The time–data tradeoff Proposition 3.1 suggests that increasing the smoothing parameter µ leads to faster convergence of the primal iterates of the Auslender–Teboulle algorithm. The discussion in Section 2.2 suggests that, when we have excess samples, we can increase the smoothing parameter while maintaining exact recovery. Our main technical proposal combines these two observations: 4 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Normalized sparsity (ρ) Normalized statistical dimension (δ/d) Stat. dim. of the dual-smoothed ℓ1 descent cones µ = 0 µ = 0.1 µ = 1 µ = 10 (a) 0 0.2 0.4 0.6 0.8 1 10−2 10−1 100 101 102 Normalized sample size (m/d) Maximal smoothing parameter (µ(m)) Maximal dual-smoothing of the ℓ1 norm ρ = 0.01 ρ = 0.05 ρ = 0.1 ρ = 0.2 (b) Figure 2: Statistical dimension and maximal smoothing for the dual-smoothed ℓ1 norm. Panel (a) shows upper bounds for the normalized statistical dimension d−1D( f µ; x♮) of the dualsmoothed sparse vector recovery problem for several choices of µ. Panel (b) shows lower bounds for the maximal smoothing parameter µ(m) for several choices of the normalized sparsity ρ := s/d. As the number m of measurements in the RLIP (1) increases, we smooth the dual problem (4) more and more aggressively while maintaining exact recovery. The Auslender–Teboulle algorithm can solve these increasingly smoothed problems faster. In order to balance the inherent tradeoffbetween smoothing and accuracy, we introduce the maximal smoothing parameter µ(m). For a sample size m, µ(m) is the largest number satisfying δ  D( f µ(m); x♮)  ≤m. (6) Choosing a smoothing parameter µ ≤µ(m) ensures that we do not cross the phase transition of our RLIP. In practice, we need to be less aggressive in order to avoid the “transition region”. The following two sections provide examples that use our proposal to achieve a clear time–data tradeoff. 4 Example: Sparse vector recovery In this section, we apply the method outlined in Section 3 to the sparse vector recovery problem. 4.1 The optimization problem Assume that x♮is a sparse vector. The ℓ1 norm serves as a convex proxy for sparsity, so we choose it as the regularizer in the RLIP (1). This problem is known as basis pursuit, and it was proposed by Chen et al. [20]. It has roots in geophysics [21, 22]. We apply the dual-smoothing procedure from Section 3 to obtain the relaxed primal problem, which is equivalent to the elastic net of Zou and Hastie [23]. The smoothed dual is given by (4). To determine the exact recovery condition, Fact 2.3, for the dual-smoothed RLIP (3), we must compute the statistical dimension of the descent cones of f µ. We provide an accurate upper bound. Proposition 4.1 (Statistical dimension bound for the dual-smoothed ℓ1 norm). Let x ∈Rd with s nonzero entries, and define the normalized sparsity ρ := s/d. Then 1 d δ  D( f µ; x)  ≤inf τ ≥0  ρ f 1 + τ2(1 + µ ∥x∥ℓ∞)2g + (1 −ρ) r 2 π Z ∞ τ (u −τ)2e−u2/2 du  . 5 1 1.5 2 2.5 3 3.5 4 ·104 50 100 150 Sample size (m) Average number of iterations Iterations vs. sample size (ℓ1 norm) µ = 0.1 µ = µ(m)/4 (a) 1 1.5 2 2.5 3 3.5 4 ·104 0.4 0.6 0.8 1 ·1011 Sample size (m) Average cost Cost vs. sample size (ℓ1 norm) µ = 0.1 µ = µ(m)/4 (b) Figure 3: Sparse vector recovery experiment. The average number of iterations (a) and the average computational cost (b) of 10 random trials of the dual-smoothed sparse vector recovery problem with ambient dimension d = 40 000 and normalized sparsity ρ = 5% for various sample sizes m. The red curve represents a fixed smoothing parameter µ = 0.1, while the blue curve uses µ = µ(m)/4. The error bars indicate the minimum and maximum observed values. The proof is provided in the supplemental material. Figure 2 shows the statistical dimension and maximal smoothing curves for sparse vectors with ±1 entries. In order to apply this result we only need estimates of the magnitude and sparsity of the signal. To apply Algorithm 3.1 to this problem, we must calculate an approximate primal solution xz from a dual point z (Algorithm 3.1, line 4). This step can be written as xz ←µ(m)−1 · SoftThreshold(ATz,1), where [SoftThreshold(x,t)]i = sgn (xi) · max {|xi| −t,0}. Algorithm 3.1, line 5 dominates the total cost of each iteration. 4.2 The time–data tradeoff We can obtain theoretical support for the existence of a time–data tradeoffin the sparse recovery problem by adapting Proposition 3.1. See the supplemental material for the proof. Proposition 4.2 (Error bound for dual-smoothed sparse vector recovery). Let x♮∈Rd with s nonzero entries, m be the sample size, and µ(m) be the maximal smoothing parameter (6). Given a measurement matrix A ∈Rm×d, assume the exact recovery condition (2) holds for the dual-smoothed sparse vector recovery problem. Then the sequence of primal iterates from Algorithm 3.1 satisfies ∥x♮−xk ∥≤ 2d 1 2 κ(A) f ρ · (1 + µ(m) ∥x♮∥ℓ∞)2 + (1 −ρ) g 1 2 µ(m) · k , where ρ := s/d is the normalized sparsity of x♮, and κ(A) is the condition number of the matrix A. For a fixed number k of iterations, as the number m of samples increases, Proposition 4.2 suggests that the error decreases like 1/µ(m). This observation suggests that we can achieve a time–data tradeoffby smoothing. 4.3 Numerical experiment Figure 3 shows the results of a numerical experiment that compares the performance difference between current numerical practice and our aggressive smoothing approach. Most practitioners use a fixed smoothing parameter µ that depends on the ambient dimension or sparsity but not on the sample size. For the constant smoothing case, we choose µ = 0.1 based on the recommendation in [15]. It is common, however, to see much smaller choices of µ [24, 25]. 6 In contrast, our method exploits excess samples by smoothing the dual problem more aggressively. We set the smoothing parameter µ = µ(m)/4. This heuristic choice is small enough to avoid the phase transition of the RLIP while large enough to reap performance benefits. Our forthcoming work [13] addressing the case of noisy samples provides a more principled way to select this parameter. In the experiment, we fix both the ambient dimension d = 40 000 and the normalized sparsity ρ = 5%. To test each smoothing approach, we generate and solve 10 random sparse vector recovery models for each value of the sample size m = 12 000,14 000,16 000,. . . ,38 000. Each random model comprises a Gaussian measurement matrix A and a random sparse vector x♮whose nonzero entires are ±1 with equal probability. We stop Algorithm 3.1 when the relative error ∥x♮−xk ∥/ ∥x♮∥is less than 10−3. This condition guarantees that both methods maintain the same level of accuracy. In Figure 3(a), we see that for both choices of µ, the average number of iterations decreases as sample size increases. When we plot the total computational cost1 in Figure 3(b), we see that the constant smoothing method cannot overcome the increase in cost per iteration. In fact, in this example, it would be better to throw away excess data when using constant smoothing. Meanwhile, our aggressive smoothing method manages to decrease total cost as sample size increases. The maximal speedup achieved is roughly 2.5×. We note that if the matrix A were orthonormal, the cost of both smoothing methods would decrease as sample sizes increase. In particular, the uptick seen at m = 38 000 in Figure 3 would disappear (but our method would maintain roughly the same relative advantage over constant smoothing). This suggests that the condition number κ(A) indeed plays an important role in determining the computational cost. We believe that using a Gaussian matrix A is warranted here as statistical models often use independent subjects. Let us emphasize that we use the same algorithm to test both smoothing approaches, so the relative comparison between them is meaningful. The observed improvement shows that we have indeed achieved a time–data tradeoffby aggressive smoothing. 5 Example: Low-rank matrix recovery In this section, we apply the method outlined in Section 3 to the low-rank matrix recovery problem. 5.1 The optimization problem Assume that X♮∈Rd1×d2 is low-rank. Consider a known measurement matrix A ∈Rm×d, where d := d1d2. We are given linear measurements of the form b = A · vec(X♮), where vec returns the (column) vector obtained by stacking the columns of the input matrix. Fazel [26] proposed using the Schatten 1-norm ∥·∥S1, the sum of the matrix’s singular values, as a convex proxy for rank. Therefore, we follow Recht et al. [27] and select f = ∥·∥S1 as the regularizer in the RLIP (1). The low-rank matrix recovery problem has roots in control theory [28]. We apply the dual-smoothing procedure to obtain the approximate primal problem and the smoothed dual problem, replacing the squared Euclidean norm in (3) with the squared Frobenius norm. As in the sparse vector case, we must compute the statistical dimension of the descent cones of the strongly convex regularizer f µ. In the case where the matrix X is square, the following is an accurate upper bound for this quantity. (The non-square case is addressed in the supplemental material.) Proposition 5.1 (Statistical dimension bound for the dual-smoothed Schatten 1-norm). Let X ∈ Rd1×d1 have rank r, and define the normalized rank ρ := r/d1. Then 1 d2 1 δ  D( f µ; X)  ≤ inf 0≤τ ≤2 ( ρ + (1 −ρ) " ρ  1 + τ2(1 + µ ∥X∥)2 + (1 −ρ) 12π  24(1 + τ2) cos−1(τ/2) −τ(26 + τ2) p 4 −τ2  #) + o (1) , as d1 →∞while keeping the normalized rank ρ constant. 1We compute total cost as k · md, where k is the number of iterations taken, and md is the dominant cost of each iteration. 7 1 1.5 2 2.5 3 3.5 4 ·104 0 200 400 600 Sample size (m) Average number of iterations Iterations vs. sample size (Schatten 1-norm) µ = 0.1 µ = µ(m)/4 (a) 1 1.5 2 2.5 3 3.5 4 ·104 1 2 3 ·1011 Sample size (m) Average cost Cost vs. sample size (Schatten 1-norm) µ = 0.1 µ = µ(m)/4 (b) Figure 4: Low-rank matrix recovery experiment. The average number of iterations (a) and the average cost (b) of 10 random trials of the dual-smoothed low-rank matrix recovery problem with ambient dimension d = 200 × 200 and normalized rank ρ = 5% for various sample sizes m. The red curve represents a fixed smoothing parameter µ = 0.1, while the blue curve uses µ = µ(m)/4. The error bars indicate the minimum and maximum observed values. The proof is provided in the supplemental material. The plots of the statistical dimension and maximal smoothing curves closely resemble those of the ℓ1 norm and are in the supplemental material as well. In this case, Algorithm 3.1, line 4 becomes [12, Sec. 4.3] Xz ←µ(m)−1 · SoftThresholdSingVal(mat(ATz),1), where mat is the inverse of the vec operator. Given a matrix X with SVD U · diag(σ) · V T, SoftThresholdSingVal(X,t) = U · diag (SoftThreshold(σ,t)) · V T . Algorithm 3.1, line 5 dominates the total cost of each iteration. 5.2 The time–data tradeoff When we adapt the error bound in Proposition 3.1 to this specific problem, the result is nearly same as in the ℓ1 case (Proposition 4.2). For completeness, we include the full statement of the result in the supplementary material, along with its proof. Our experience with the sparse vector recovery problem suggests that a tradeoffshould exist for the low-rank matrix recovery problem as well. 5.3 Numerical experiment Figure 4 shows the results of a substantially similar numerical experiment to the one performed for sparse vectors. Again, current practice dictates using a smoothing parameter that has no dependence on the sample size m [29]. In our tests, we choose the constant parameter µ = 0.1 recommended by [15]. As before, we compare this with our aggressive smoothing method that selects µ = µ(m)/4. In this case, we use the ambient dimension d = 200 × 200 and set the normalized rank ρ = 5%. We test each method with 10 random trials of the low-rank matrix recovery problem for each value of the sample size m = 11 250,13 750,16 250,. . . ,38 750. The measurement matrices are again Gaussian, and the nonzero singular values of the random low-rank matrices X♮are 1. We solve each problem with Algorithm 3.1, stopping when the relative error in the Frobenius norm is smaller than 10−3. In Figure 4, we see that both methods require fewer iterations for convergence as sample size increases. Our aggressive smoothing method additionally achieves a reduction in total computational cost, while the constant method does not. The observed speedup from exploiting the additional samples is 5.4×. The numerical results show that we have indeed identified a time–data tradeoffvia smoothing. While this paper considers only the regularized linear inverse problem, our technique extends to other settings. Our forthcoming work [13] addresses the case of noisy measurements, provides a connection to statistical learning problems, and presents additional examples. 8 References [1] S. Shalev-Shwartz and N. Srebro. SVM optimization: inverse dependence on training set size. In Proceedings of the 25th Annual International Conference on Machine Learning (ICML 2008), pages 928–935, Helsinki, Finland, 2008. ACM. [2] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems 20, pages 161–168, 2008. [3] A. A. Amini and M. J. Wainwright. High-dimensional analysis of semidefinite relaxations for sparse principal components. Ann. Statist., 37(5B):2877–2921, 2009. [4] A. Agarwal, P. L. Bartlett, and J. C. Duchi. Oracle inequalities for computationally adaptive model selection. arXiv, 2012, 1208.0129v1. [5] Q. Berthet and P. Rigollet. Computational Lower Bounds for Sparse PCA. arXiv, 2013, 1304.0828v2. [6] V. Chandrasekaran and M. I. Jordan. Computational and statistical tradeoffs via convex relaxation. Proc. Natl. Acad. Sci. USA, 110(13):E1181–E1190, 2013. [7] A. Daniely, N. Linial, and S. Shalev-Shwartz. More data speeds up training time in learning halfspaces over sparse vectors. In Advances in Neural Information Processing Systems 26, pages 145–153, 2013. [8] M. I. Jordan. On statistics, computation and scalability. Bernoulli, 19(4):1378–1390, 2013. [9] D. Shender and J. Lafferty. Computation-Risk Tradeoffs for Covariance-Thresholded Regression. In Proceedings of the 30th International Conference on Machine Learning (ICML 2013), pages 756–764, 2013. [10] A. S. Nemirovsky and D. B. Yudin. Problem complexity and method efficiency in optimization. A Wiley-Interscience Publication. John Wiley & Sons Inc., New York, 1983. [11] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Program., 103(1):127–152, 2005. [12] S. R. Becker, E. J. Candès, and M. C. Grant. Templates for convex cone problems with applications to sparse signal recovery. Math. Program. Comput., 3(3):165–218, 2011. [13] J. J. Bruer, J. A. Tropp, V. Cevher, and S. R. Becker. Time–Data Tradeoffs by Smoothing. IEEE Journal of Selected Topics in Signal Processing, submitted, 2014. [14] A. Agarwal, S. Negahban, and M. J. Wainwright. Fast Global Convergence of Gradient Methods for High-Dimensional Statistical Recovery. Ann. Statist., 40(5):2452–2482, 2012. [15] M.-J. Lai and W. Yin. Augmented l(1) and Nuclear-Norm Models with a Globally Linearly Convergent Algorithm. SIAM J. Imaging Sci., 6(2):1059–1091, 2013. [16] D. Amelunxen, M. Lotz, M. B. McCoy, and J. A. Tropp. Living on the edge: A geometric theory of phase transitions in convex optimization. Information and Inference, to appear, 2014. [17] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The Convex Geometry of Linear Inverse Problems. Found. Comput. Math., 12(6):805–849, 2012. [18] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge University Press, Cambridge, 2004. [19] A. Auslender and M. Teboulle. Interior gradient and proximal methods for convex and conic optimization. SIAM J. Optim., 16(3):697–725, 2006. [20] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM J. Sci. Comput., 20(1):33–61, 1998. [21] J. F. Claerbout and F. Muir. Robust modeling with erratic data. Geophysics, 38(5):826–844, 1973. [22] F. Santosa and W. W. Symes. Linear Inversion of Band-Limited Reflection Seismograms. SIAM J. Sci. Stat. Comput., 7(4):1307–1330, 1986. [23] H. Zou and T. Hastie. Regularization and variable selection via the elastic net. J. R. Stat. Soc. Ser. B Stat. Methodol., 67:301–320, 2005. [24] J.-F. Cai, S. Osher, and Z. Shen. Linearized Bregman Iterations for Compressed Sensing. Math. Comp., 78(267):1515–1536, 2009. [25] S. Osher, Y. Mao, B. Dong, and W. Yin. Fast linearized Bregman iteration for compressive sensing and sparse denoising. Commun. Math. Sci., 8(1):93–111, 2010. [26] M. Fazel. Matrix rank minimization with applications. PhD thesis, Stanford University, 2002. [27] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed Minimum-Rank Solutions of Linear Matrix Equations via Nuclear Norm Minimization. SIAM Rev., 52(3):471–501, 2010. [28] M. Mesbahi and G. P. Papavassilopoulos. On the rank minimization problem over a positive semidefinite linear matrix inequality. IEEE Trans. Automat. Control, 42(2):239–243, 1997. [29] J.-F. Cai, E. J. Candès, and Z. Shen. A singular value thresholding algorithm for matrix completion. SIAM J. Optim., 20(4):1956–1982, 2010. 9
2014
252
5,350
Shaping Social Activity by Incentivizing Users Mehrdad Farajtabar∗ Nan Du∗ Manuel Gomez-Rodriguez† Isabel Valera‡ Hongyuan Zha∗ Le Song∗ Georgia Institute of Technology∗ MPI for Software Systems† Univ. Carlos III in Madrid‡ {mehrdad,dunan}@gatech.edu manuelgr@mpi-sws.org {zha,lsong}@cc.gatech.edu ivalera@tsc.uc3m.es Abstract Events in an online social network can be categorized roughly into endogenous events, where users just respond to the actions of their neighbors within the network, or exogenous events, where users take actions due to drives external to the network. How much external drive should be provided to each user, such that the network activity can be steered towards a target state? In this paper, we model social events using multivariate Hawkes processes, which can capture both endogenous and exogenous event intensities, and derive a time dependent linear relation between the intensity of exogenous events and the overall network activity. Exploiting this connection, we develop a convex optimization framework for determining the required level of external drive in order for the network to reach a desired activity level. We experimented with event data gathered from Twitter, and show that our method can steer the activity of the network more accurately than alternatives. 1 Introduction Online social platforms routinely track and record a large volume of event data, which may correspond to the usage of a service (e.g., url shortening service, bit.ly). These events can be categorized roughly into endogenous events, where users just respond to the actions of their neighbors within the network, or exogenous events, where users take actions due to drives external to the network. For instance, a user’s tweets may contain links provided by bit.ly, either due to his forwarding of a link from his friends, or due to his own initiative to use the service to create a new link. Can we model and exploit these data to steer the online community to a desired activity level? Specifically, can we drive the overall usage of a service to a certain level (e.g., at least twice per day per user) by incentivizing a small number of users to take more initiatives? What if the goal is to make the usage level of a service more homogeneous across users? What about maximizing the overall service usage for a target group of users? Furthermore, these activity shaping problems need to be addressed by taking into account budget constraints, since incentives are usually provided in the form of monetary or credit rewards. Activity shaping problems are significantly more challenging than traditional influence maximization problems, which aim to identify a set of users, who, when convinced to adopt a product, shall influence others in the network and trigger a large cascade of adoptions [1, 2]. First, in influence maximization, the state of each user is often assumed to be binary, either adopting a product or not [1, 3, 4, 5]. However, such assumption does not capture the recurrent nature of product usage, where the frequency of the usage matters. Second, while influence maximization methods identify a set of users to provide incentives, they do not typically provide a quantitative prescription on how much incentive should be provided to each user. Third, activity shaping concerns a larger variety of target states, such as minimum activity and homogeneity of activity, not just activity maximization. In this paper, we will address the activity shaping problems using multivariate Hawkes processes [6], which can model both endogenous and exogenous recurrent social events, and were shown to be a good fit for such data in a number of recent works (e.g., [7, 8, 9, 10, 11, 12]). More importantly, 1 we will go beyond model fitting, and derive a novel predictive formula for the overall network activity given the intensity of exogenous events in individual users, using a connection between the processes and branching processes [13, 14, 15, 16]. Based on this relation, we propose a convex optimization framework to address a diverse range of activity shaping problems given budget constraints. Compared to previous methods for influence maximization, our framework can provide more fine-grained control of network activity, not only steering the network to a desired steady-state activity level but also do so in a time-sensitive fashion. For example, our framework allows us to answer complex time-sensitive queries, such as, which users should be incentivized, and by how much, to steer a set of users to use a product twice per week after one month? In addition to the novel framework, we also develop an efficient gradient based optimization algorithm, where the matrix exponential needed for gradient computation is approximated using the truncated Taylor series expansion [17]. This algorithm allows us to validate our framework in a variety of activity shaping tasks and scale up to networks with tens of thousands of nodes. We also conducted experiments on a network of 60,000 Twitter users and more than 7,500,000 uses of a popular url shortening services. Using held-out data, we show that our algorithm can shape the network behavior much more accurately than alternatives. 2 Modeling Endogenous-Exogenous Recurrent Social Events We model the events generated by m users in a social network as a m-dimensional counting process N(t) = (N1(t), N2(t), . . . , Nm(t))⊤, where Ni(t) records the total number of events generated by user i up to time t. Furthermore, we represent each event as a tuple (ui, ti), where ui is the user identity and ti is the event timing. Let the history of the process up to time t be Ht := {(ui, ti) | ti ⩽t}, and Ht−be the history until just before time t. Then the increment of the process, dN(t), in an infinitesimal window [t, t + dt] is parametrized by the intensity λ(t) = (λ1(t), . . . , λm(t))⊤⩾0, i.e., E[dN(t)|Ht−] = λ(t) dt. (1) Intuitively, the larger the intensity λ(t), the greater the likelihood of observing an event in the time window [t, t + dt]. For instance, a Poisson process in [0, ∞) can be viewed as a special counting process with a constant intensity function λ, independent of time and history. To model the presence of both endogenous and exogenous events, we will decompose the intensity into two terms λ(t) !"#$ overall event intensity = λ(0)(t) ! "# $ exogenous event intensity + λ∗(t) ! "# $ endogenous event intensity , (2) where the exogenous event intensity models drive outside the network, and the endogenous event intensity models interactions within the network. We assume that hosts of social platforms can potentially drive up or down the exogenous events intensity by providing incentives to users; while endogenous events are generated due to users’ own interests or under the influence of network peers, and the hosts do not interfere with them directly. The key questions in the activity shaping context are how to model the endogenous event intensity which are realistic to recurrent social interactions, and how to link the exogenous event intensity to the endogenous event intensity. We assume that the exogenous event intensity is independent of the history and time, i.e., λ(0)(t) = λ(0). 2.1 Multivariate Hawkes Process Recurrent endogenous events often exhibit the characteristics of self-excitation, where a user tends to repeat what he has been doing recently, and mutual-excitation, where a user simply follows what his neighbors are doing due to peer pressure. These social phenomena have been made analogy to the occurrence of earthquake [18] and the spread of epidemics [19], and can be well-captured by multivariate Hawkes processes [6] as shown in a number of recent works (e.g., [7, 8, 9, 10, 11, 12]). More specifically, a multivariate Hawkes process is a counting process who has a particular form of intensity. We assume that the strength of influence between users is parameterized by a sparse nonnegative influence matrix A = (auu′)u,u′∈[m], where auu′ > 0 means user u′ directly excites user u. We also allow A to have nonnegative diagonals to model self-excitation of a user. Then, the intensity of the u-th dimension is λ∗ u(t) = % i:ti<t auui g(t −ti) = % u′∈[m] auu′ & t 0 g(t −s) dNu′(s), (3) where g(s) is a nonnegative kernel function such that g(s) = 0 for s ≤0 and ' ∞ 0 g(s) ds < ∞; the second equality is obtained by grouping events according to users and use the fact that 2 1 2 4 3 5 6 1 2 1 3 2 1 3 2 4 5 1 5 1 5 3 6 5 1 1 1 3 3 3 2 2 2 5 6 4 t2 t1 t3 t (a) An example social network (b) Branching structure of events Figure 1: In Panel (a), each directed edge indicates that the target node follows, and can be influenced by, the source node. The activity in this network is modeled using Hawkes processes, which result in branching structure of events shown in Panel (b). Each exogenous event is the root node of a branch (e.g., top left most red circle at t1), and it occurs due to a user’s own initiative; and each event can trigger one or more endogenous events (blue square at t2). The new endogenous events can create the next generation of endogenous events (green triangles at t3), and so forth. The social network will constrain the branching structure of events, since an event produced by a user (e.g., user 1) can only trigger endogenous events in the same user or one or more of her followers (e.g., user 2 or 3). ' t 0 g(t −s) dNu′(s) = ( ui=u′,ti<t g(t −ti). Intuitively, λ∗ u(t) models the propagation of peer influence over the network — each event (ui, ti) occurred in the neighbor of a user will boost her intensity by a certain amount which itself decays over time. Thus, the more frequent the events occur in the user’s neighbor, the more likely she will be persuaded to generate a new event. For simplicity, we will focus on an exponential kernel, g(t −ti) = exp(−ω(t −ti)) in the reminder of the paper. However, multivariate Hawkes processes and the branching processed explained in next section is independent of the kernel choice and can be extended to other kernels such as powerlaw, Rayleigh or any other long tailed distribution over nonnegative real domain. Furthermore, we can rewrite equation (3) in vectorial format λ∗(t) = & t 0 G(t −s) dN(s), (4) by defining a m × m time-varying matrix G(t) = (auu′g(t))u,u′∈[m]. Note that, for multivariate Hawkes processes, the intensity, λ(t), itself is a random quantity, which depends on the history Ht. We denote the expectation of the intensity with respect to history as µ(t) := EHt−[λ(t)] (5) 2.2 Connection to Branching Processes A branching process is a Markov process that models a population in which each individual in generation k produces some random number of individuals in generation k + 1, according some distribution [20]. In this section, we will conceptually assign both exogenous events and endogenous events in the multivariate Hawkes process to levels (or generations), and associate these events with a branching structure which records the information on which event triggers which other events (see Figure 1 for an example). Note that this genealogy of events should be interpreted in probabilistic terms and may not be observed in actual data. Such connection has been discussed in Hawkes’ original paper on one dimensional Hawkes processes [21], and it has recently been revisited in the context of multivariate Hawkes processes by [11]. The branching structure will play a crucial role in deriving a novel link between the intensity of the exogenous events and the overall network activity. More specifically, we assign all exogenous events to the zero-th generation, and record the number of such events as N (0)(t). These exogenous events will trigger the first generation of endogenous events whose number will be recorded as N (1)(t). Next these first generation of endogenous events will further trigger a second generation of endogenous events N (2)(t), and so on. Then the total number of events in the network is the sum of the numbers of events from all generations N(t) = N (0)(t) + N (1)(t) + N (2)(t) + . . . (6) Furthermore, denote all events in generation k −1 as H(k−1) t . Then, independently for each event (ui, ti) ∈H(k−1) t in generation k −1, it triggers a Poisson process in its neighbor u independently with intensity auuig(t−ti). Due to the superposition theorem of independent Poisson processes [22], 3 the intensity, λ(k) u (t), of events at node u and generation k is simply the sum of conditional intensities of the Poisson processes triggered by all its neighbors, i.e., λ(k) u (t) = ( (ui,ti)∈H(k−1) t auuig(t − ti) = ( u′∈[m] ' t 0 g(t −s) dN (k−1) u′ (s). Concatenate the intensity for all u ∈[m], and use the time-varying matrix G(t) (4), we have λ(k)(t) = & t 0 G(t −s) dN (k−1)(s), (7) where λ(k)(t) = (λ(k) 1 (t), . . . , λ(k) m (t))⊤is the intensity for counting process N (k)(t) at k-th generation. Again, due to the superposition of independent Poisson processes, we can decompose the intensity of N(t) into a sum of conditional intensities from different generation λ(t) = λ(0)(t) + λ(1)(t) + λ(2)(t) + . . . (8) Next, based on the above decomposition, we will develop a closed form relation between the expected intensity µ(t) = EHt−[λ(t)] and the intensity, λ(0)(t), of the exogenous events. This relation will form the basis of our activity shaping framework. 3 Linking Exogenous Event Intensity to Overall Network Activity Our strategy is to first link the expected intensity µ(k)(t) := EHt−[λ(k)(t)] of events at the k-th generation with λ(0)(t), and then derive a close form for the infinite series sum µ(t) = µ(0)(t) + µ(1)(t) + µ(2)(t) + . . . (9) Define a series of auto-convolution matrices, one for each generation, with G(⋆0)(t) = I and G(⋆k)(t) = & t 0 G(t −s) G(⋆k−1)(s) ds = G(t) ⋆G(⋆k−1)(t) (10) Then the expected intensity of events at the k-th generation is related to exogenous intensity λ(0) by Lemma 1 µ(k)(t) = G(⋆k)(t) λ(0). Next, by summing together all auto-convolution matrices, Ψ(t) := I + G(⋆1)(t) + G(⋆2)(t) + . . . we obtain a linear relation between the expected intensity of the network and the intensity of the exogenous events, i.e., µ(t) = Ψ(t)λ(0). The entries in the matrix Ψ(t) roughly encode the “influence” between pairs of users. More precisely, the entry Ψuv(t) is the expected intensity of events at node u due to a unit level of exogenous intensity at node v. We can also derive several other useful quantities from Ψ(t). For example, Ψ•v(t) := ( u Ψuv(t) can be thought of as the overall influence user v has on all users. Surprisingly, for exponential kernel, the infinite sum of matrices results in a closed form using matrix exponentials. First, let )· denote the Laplace transform of a function, and we have the following intermediate results on the Laplace transform of G(⋆k)(t). Lemma 2 ) G(⋆k)(z) = ' ∞ 0 G(⋆k)(t) dt = 1 z · Ak (z+ω)k With Lemma 2, we are in a position to prove our main theorem below: Theorem 3 µ(t) = Ψ(t)λ(0) = * e(A−ωI)t + ω(A −ωI)−1(e(A−ωI)t −I) + λ(0). Theorem 3 provides us a linear relation between exogenous event intensity and the expected overall intensity at any point in time but not just stationary intensity. The significance of this result is that it allows us later to design a diverse range of convex programs to determine the intensity of the exogenous event in order to achieve a target intensity. In fact, we can recover the previous results in the stationary case as a special case of our general result. More specifically, a multivariate Hawkes process is stationary if the spectral radius Γ := & ∞ 0 G(t) dt = ,& ∞ 0 g(t) dt - . auu′ / u,u′∈[m] = A ω (11) is strictly smaller than 1 [6]. In this case, the expected intensity is µ = (I −Γ)−1λ(0) independent of the time. We can obtain this relation from theorem 3 if we let t →∞. Corollary 4 µ = (I −Γ)−1 λ(0) = limt→∞Ψ(t) λ(0). Refer to Appendix A for all the proofs. 4 4 Convex Activity Shaping Framework Given the linear relation between exogenous event intensity and expected overall event intensity, we now propose a convex optimization framework for a variety of activity shaping tasks. In all tasks discussed below, we will optimize the exogenous event intensity λ(0) such that the expected overall event intensity µ(t) is maximized with respect to some concave utility U(·) in µ(t), i.e., maximizeµ(t),λ(0) U(µ(t)) subject to µ(t) = Ψ(t)λ(0), c⊤λ(0) ⩽C, λ(0) ⩾0 (12) where c = (c1, . . . , cm)⊤⩾0 is the cost per unit event for each user and C is the total budget. Additional regularization can also be added to λ(0) either to restrict the number of incentivized users (with ℓ0 norm ∥λ(0)∥0), or to promote a sparse solution (with ℓ1 norm ∥λ(0)∥1, or to obtain a smooth solution (with ℓ2 regularization ∥λ(0)∥2). We next discuss several instances of the general framework which achieve different goals (their constraints remain the same and hence omitted). Capped Activity Maximization. In real networks, there is an upper bound (or a cap) on the activity each user can generate due to limited attention of a user. For example, a Twitter user typically posts a limited number of shortened urls or retweets a limited number of tweets [23]. Suppose we know the upper bound, αu, on a user’s activity, i.e., how much activity each user is willing to generate. Then we can perform the following capped activity maximization task maximizeµ(t),λ(0) ( u∈[m] min {µu(t), αu} (13) Minimax Activity Shaping. Suppose our goal is instead maintaining the activity of each user in the network above a certain minimum level, or, alternatively make the user with the minimum activity as active as possible. Then, we can perform the following minimax activity shaping task maximizeµ(t),λ(0) minu µu(t) (14) Least-Squares Activity Shaping. Sometimes we want to achieve a pre-specified target activity levels, v, for users. For example, we may like to divide users into groups and desire a different level of activity in each group. Inspired by these examples, we can perform the following least-squares activity shaping task maximizeµ(t),λ(0) −∥Bµ(t) −v∥2 2 (15) where B encodes potentially additional constraints (e.g., group partitions). Besides Euclidean distance, the family of Bregman divergences can be used to measure the difference between Bµ(t) and v here. That is, given a function f(·) : Rm (→R convex in its argument, we can use D(Bµ(t)∥v) := f(Bµ(t)) −f(v) −⟨∇f(v), Bµ(t) −v⟩as our objective function. Activity Homogenization. Many other concave utility functions can be used. For example, we may want to steer users activities to a more homogeneous profile. If we measure homogeneity of activity with Shannon entropy, then we can perform the following activity homogenization task maximizeµ(t),λ(0) −( u∈[m] µu(t) ln µu(t) (16) 5 Scalable Algorithm All the activity shaping problems defined above require an efficient evaluation of the instantaneous average intensity µ(t) at time t, which entails computing matrix exponentials to obtain Ψ(t). In small or medium networks, we can rely on well-known numerical methods to compute matrix exponentials [24]. However, in large networks, the explicit computation of Ψ(t) becomes intractable. Fortunately, we can exploit the following key property of our convex activity shaping framework: the instantaneous average intensity only depends on Ψ(t) through matrix-vector product operations. In particular, we start by using Theorem 3 to rewrite the multiplication of Ψ(t) and a vector v as Ψ(t)v = e(A−ωI)tv + ω(A −ωI)−1 * e(A−ωI)tv −v + . We then get a tractable solution by first computing e(A−ωI)tv efficiently, subtracting v from it, and solving a sparse linear system of equations, (A −ωI)x = * e(A−ωI)tv −v + , efficiently. The steps are illustrated in Algorithm 1. Next, we elaborate on two very efficient algorithms for computing the product of matrix exponential with a vector and for solving a sparse linear system of equations. For the computation of the product of matrix exponential with a vector, we rely on the iterative algorithm by Al-Mohy et al. [17], which combines a scaling and squaring method with a truncated Taylor series approximation to the matrix exponential. For solving the sparse linear system of equa5 Algorithm 1: Average Instantaneous Intensity input : A, ω, t, v output: Ψ(t)v v1 = e(A−ωI)tv v2 = v2 −v; v3 = (A −ωI)−1v2 return v1 + ωv3; Algorithm 2: PGD for Activity Shaping Initialize λ(0); repeat 1- Project λ(0) into λ(0) ⩾0, c⊤λ(0) ⩽C; 2- Evaluate the gradient g(λ(0)) at λ(0); 3- Update λ(0) using the gradient g(λ(0)); until convergence; tion, we use the well-known GMRES method [25], which is an Arnoldi process for constructing an l2-orthogonal basis of Krylov subspaces. The method solves the linear system by iteratively minimizing the norm of the residual vector over a Krylov subspace. Perhaps surprisingly, we will now show that it is possible to compute the gradient of the objective functions of all our activity shaping problems using the algorithm developed above for computing the average instantaneous intensity. We only need to define the vector v appropriately for each problem, as follows: (i) Activity maximization: g(λ(0)) = Ψ(t)⊤v, where v is defined such that vj = 1 if αj > µj, and vj = 0, otherwise. (ii) Minimax activity shaping: g(λ(0)) = Ψ(t)⊤e, where e is defined such that ej = 1 if µj = µmin, and ej = 0, otherwise. (iii) Least-squares activity shaping: g(λ(0)) = 2Ψ(t)⊤B⊤* BΨ(t)λ(0) −v + . (iv) Activity homogenization: g(λ(0)) = Ψ(t)⊤ln (Ψ(t)λ(0)) + Ψ(t)⊤1, where ln(·) on a vector is the element-wise natural logarithm. Since the activity maximization and the minimax activity shaping tasks require only one evaluation of Ψ(t) times a vector, Algorithm 1 can be used directly. However, computing the gradient for least-squares activity shaping and activity homogenization is slightly more involved and it requires to be careful with the order in which we perform the operations (Refer to Appendix B for details). Equipped with an efficient way to compute of gradients, we solve the corresponding convex optimization problem for each activity shaping problem by applying projected gradient descent (PGD) [26] with the appropriate gradient1. Algorithm 2 summarizes the key steps. 6 Experimental Evaluation We evaluate our framework using both simulated and real world held-out data, and show that our approach significantly outperforms several baselines. The appendix contains additional experiments. Dataset description and network inference. We use data gathered from Twitter as reported in [27], which comprises of all public tweets posted by 60,000 users during a 8-month period, from January 2009 to September 2009. For every user, we record the times she uses any of six popular url shortening services (refer to Appendix C for details). We evaluate the performance of our framework on a subset of 2,241 active users, linked by 4,901 edges, which we call 2K dataset, and we evaluate its scalability on the overall 60,000 users, linked by ∼200,000 edges, which we call 60K dataset. The 2K dataset accounts for 691,020 url shortened service uses while the 60K dataset accounts for ∼7.5 million uses. Finally, we treat each service as independent cascades of events. In the experiments, we estimated the nonnegative influence matrix A and the exogenous intensity λ(0) using maximum log-likelihood, as in previous work [8, 9, 12]. We used a temporal resolution of one minute and selected the bandwidth ω = 0.1 by cross validation. Loosely speaking, ω = 0.1 corresponds to loosing 70% of the initial influence after 10 minutes, which may be explained by the rapid rate at which each user’ news feed gets updated. Evaluation schemes. We focus on three tasks: capped activity maximization, minimax activity shaping, and least square activity shaping. We set the total budget to C = 0.5, which corresponds to supporting a total extra activity equal to 0.5 actions per unit time, and assume all users entail the same cost. In the capped activity maximization, we set the upper limit of each user’s intensity, α, by adding a nonnegative random vector to their inferred initial intensity. In the least-squares activity shaping, we set B = I and aim to create three user groups: less-active, moderate, and super-active. We use three different evaluation schemes, with an increasing resemblance to a real world scenario: Theoretical objective: We compute the expected overall (theoretical) intensity by applying Theorem 3 on the optimal exogenous event intensities to each of the three activity shaping tasks, as well as the learned A and ω. We then compute and report the value of the objective functions. 1For nondifferential objectives, subgradient algorithms can be used instead. 6 0 1 2 3 4 5 6 7 8 9 0.6 0.65 0.7 0.75 logarithm of time sum of users’ activity CAM XMU WEI DEG PRK 0 1 2 3 4 5 6 7 8 9 0.6 0.65 0.7 0.75 logarithm of time sum of users’ activity CAM XMU WEI DEG PRK 0 0.5 1 rank correlation CAM XMU WEI DEG PRK * 0 1 2 3 4 5 6 7 8 9 0 2 4 6 x 10 −4 logarithm of time minimum activity MMASH UNI MINMU LP GRD 0 1 2 3 4 5 6 7 8 9 2 3 4 5 6 x 10 −4 logarithm of time minimum activity MMASH UNI MINMU LP GRD 0 0.2 0.4 0.6 rank correlation MMASH UNI MINMU LP GRD * 0 1 2 3 4 5 6 7 8 9 1.2 1.4 1.6 1.8x 10 ï4 logarithm of time Euclidean distance LSASH PROP LSGRD 0 1 2 3 4 5 6 7 8 9 1.2 1.4 1.6 1.8x 10 ï4 logarithm of time Euclidean distance LSASH PROP LSGRD 0 0.2 0.4 0.6 0.8 rank correlation LSASH PROP LSGRD (a) Theoretical objective (b) Simulated objective (c) Held-out data Figure 2: Row 1: Capped activity maximization. Row 2: Minimax activity shaping. Row 3: Leastsquares activity shaping. * means statistical significant at level of 0.01 with paired t-test between our method and the second best Simulated objective: We simulate 50 cascades with Ogata’s thinning algorithm [28], using the optimal exogenous event intensities to each of the three activity shaping tasks, and the learned A and ω. We then estimate empirically the overall event intensity based on the simulated cascades, by computing a running average over non-overlapping time windows, and report the value of the objective functions based on this estimated overall intensity. Appendix D provides a comparison between the simulated and the theoretical objective. Held-out data: The most interesting evaluation scheme would entail carrying out real interventions in a social platform. However, since this is very challenging to do, instead, in this evaluation scheme, we use held-out data to simulate such process, proceeding as follows. We first partition the 8-month data into 50 five-day long contiguous intervals. Then, we use one interval for training and the remaining 49 intervals for testing. Suppose interval 1 is used for training, the procedure is as follows: 1. We estimate A1, ω1 and λ(0) 1 using the events from interval 1. Then, we fix A1 and ω1, and estimate λ(0) i for all other intervals, i = 2, . . . , 49. 2. Given A1 and ω1, we find the optimal exogenous event intensities, λ(0) opt, for each of the three activity shaping task, by solving the associated convex program. We then sort the estimated λ(0) i (i = 2, . . . , 49) according to their similarity to λ(0) opt, using the Euclidean distance ∥λ(0) opt −λ(0) i ∥2. 3. We estimate the overall event intensity for each of the 49 intervals (i = 2, . . . , 49), as in the “simulated objective” evaluation scheme, and sort these intervals according to the value of their corresponding objective function. 4. Last, we compute and report the rank correlation score between the two orderings obtained in step 2 and 3.2 The larger the rank correlation, the better the method. We repeat this procedure 50 times, choosing each different interval for training once, and compute and report the average rank correlations. More details can be found in the appendix. 2rank correlation = number of pairs with consistent ordering / total number of pairs. 7 Capped activity maximization (CAM). We compare to a number of alternatives. XMU: heuristic based on µ(t) without optimization; DEG and WEI: heuristics based on the degree of the user; PRANK: heuristic based on page rank (refer to Appendix C for further details). The first row of Figure 2 summarizes the results for the three different evaluation schemes. We find that our method (CAM) consistently outperforms the alternatives. For the theoretical objective, CAM is 11 % better than the second best, DEG. The difference in overall users’ intensity from DEG is about 0.8 which, roughly speaking, leads to at least an increase of about 0.8 × 60 × 24 × 30 = 34, 560 in the overall number of events in a month. In terms of simulated objective and held-out data, the results are similar and provide empirical evidence that, compared to other heuristics, degree is an appropriate surrogate for influence, while, based on the poor performance of XMU, it seems that high activity does not necessarily entail being influential. To elaborate on the interpretability of the real-world experiment on held-out data, consider for example the difference in rank correlation between CAM and DEG, which is almost 0.1. Then, roughly speaking, this means that incentivizing users based on our approach accommodates with the ordering of real activity patterns in 0.1 × 50×49 2 = 122.5 more pairs of realizations. Minimax activity shaping (MMASH). We compare to a number of alternatives. UNI: heuristic based on equal allocation; MINMU: heuristic based on µ(t) without optimization; LP: linear programming based heuristic; GRD: a greedy approach to leverage the activity (see Appendix C for more details). The second row of Figure 2 summarizes the results for the three different evaluation schemes. We find that our method (MMASH) consistently outperforms the alternatives. For the theoretical objective, it is about 2× better than the second best, LP. Importantly, the difference between MMASH and LP is not trifling and the least active user carries out 2×10−4×60×24×30 = 4.3 more actions in average over a month. As one may have expected, GRD and LP are the best among the heuristics. The poor performance of MINMU, which is directly related to the objective of MMASH, may be because it assigns the budget to a low active user, regardless of their influence. However, our method, by cleverly distributing the budget to the users whom actions trigger many other users’ actions (like those ones with low activity), it benefits from the budget most. In terms of simulated objective and held-out data, the algorithms’ performance become more similar. Least-squares activity shaping (LSASH). We compare to two alternatives. PROP: Assigning the budget proportionally to the desired activity; LSGRD: greedily allocating budget according the difference between current and desired activity (refer to Appendix C for more details). The third row of Figure 2 summarizes the results for the three different evaluation schemes. We find that our method (LSASH) consistently outperforms the alternatives. Perhaps surprisingly, PROP, despite its simplicity, seems to perform slightly better than LSGRD. This is may be due to the way it allocates the budget to users, e.g., it does not aim to strictly fulfill users’ target activity but benefit more users by assigning budget proportionally. Refer to Appendix E for additional experiments. Sparsity and Activity Shaping. In some applications there is a limitation on the number of users we can incentivize. In our proposed framework, we can handle this requirement by including a sparsity constraint on the optimization problem. In order to maintain the convexity of the optimization problem, we consider a l1 regularization term, where a regularization parameter γ provides the trade-off between sparsity and the activity shaping goal. Refer to Appendix F for more details and experimental results for different values of γ. Scalability. The most computationally demanding part of the proposed algorithm is the evaluation of matrix exponentials, which we scale up by utilizing techniques from matrix algebra, such as GMRES and Al-Mohy methods. As a result, we are able to run our methods in a reasonable amount of time on the 60K dataset, specifically, in comparison with a naive implementation of matrix exponential evaluations. Refer to Appendix G for detailed experimental results on scalability. Appendix H discusses the limitations of our framework and future work. Acknowledgement. This project was supported in part by NSF IIS1116886, NSF/NIH BIGDATA 1R01GM108341, NSF CAREER IIS1350983 and Raytheon Faculty Fellowship to Le Song. Isabel Valera acknowledge the support of Plan Regional-Programas I+D of Comunidad de Madrid (AGES-CM S2010/BMD-2422), Ministerio de Ciencia e Innovaci´on of Spain (project DEIPRO TEC2009-14504-C02-00 and program Consolider-Ingenio 2010 CSD2008-00010 COMONSENS). 8 References [1] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In KDD, pages 137–146. ACM, 2003. [2] Matthew Richardson and Pedro Domingos. Mining knowledge-sharing sites for viral marketing. In KDD, pages 61–70. ACM, 2002. [3] Wei Chen, Yajun Wang, and Siyu Yang. Efficient influence maximization in social networks. In KDD, pages 199–208. ACM, 2009. [4] Manuel G. Rodriguez and Bernard Sch¨olkopf. Influence maximization in continuous time diffusion networks. In ICML, 2012. [5] Nan Du, Le Song, Manuel Gomez Rodriguez, and Hongyuan Zha. Scalable influence estimation in continuous-time diffusion networks. In NIPS 26, 2013. [6] Thomas .J. Liniger. Multivariate Hawkes Processes. PhD thesis, SWISS FEDERAL INSTITUTE OF TECHNOLOGY ZURICH, 2009. [7] Charles Blundell, Jeff Beck, and Katherine A Heller. Modelling reciprocating relationships with Hawkes processes. In NIPS, 2012. [8] Ke Zhou, Hongyuan Zha, and Le Song. Learning social infectivity in sparse low-rank networks using multi-dimensional Hawkes processes. In AISTATS, 2013. [9] Ke Zhou, Hongyuan Zha, and Le Song. Learning triggering kernels for multi-dimensional Hawkes processes. In ICML, 2013. [10] Tomoharu Iwata, Amar Shah, and Zoubin Ghahramani. Discovering latent influence in online social activities via shared cascade poisson processes. In KDD, pages 266–274. ACM, 2013. [11] Scott W Linderman and Ryan P Adams. Discovering latent network structure in point process data. arXiv preprint arXiv:1402.0914, 2014. [12] Isabel Valera, Manuel Gomez-Rodriguez, and Krishna Gummadi. Modeling adoption of competing products and conventions in social media. arXiv preprint arXiv:1406.0516, 2014. [13] Ian Dobson, Benjamin A Carreras, and David E Newman. A branching process approximation to cascading load-dependent system failure. In System Sciences, 2004. Proceedings of the 37th Annual Hawaii International Conference on, pages 10–pp. IEEE, 2004. [14] Jakob Gulddahl Rasmussen. Bayesian inference for Hawkes processes. Methodology and Computing in Applied Probability, 15(3):623–642, 2013. [15] Alejandro Veen and Frederic P Schoenberg. Estimation of space–time branching process models in seismology using an em–type algorithm. JASA, 103(482):614–624, 2008. [16] Jiancang Zhuang, Yosihiko Ogata, and David Vere-Jones. Stochastic declustering of space-time earthquake occurrences. JASA, 97(458):369–380, 2002. [17] Awad H Al-Mohy and Nicholas J Higham. Computing the action of the matrix exponential, with an application to exponential integrators. SIAM journal on scientific computing, 33(2):488–511, 2011. [18] David Marsan and Olivier Lengline. Extending earthquakes’ reach through cascading. Science, 319(5866):1076–1079, 2008. [19] Shuang-Hong Yang and Hongyuan Zha. Mixture of mutually exciting processes for viral diffusion. In ICML, pages 1-9, 2013. [20] Theodore E Harris. The theory of branching processes. Courier Dover Publications, 2002. [21] Alan G Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971. [22] John Frank Charles Kingman. Poisson processes, volume 3. Oxford university press, 1992. [23] Manuel Gomez-Rodriguez, Krishna Gummadi, and Bernhard Schoelkopf. Quantifying Information Overload in Social Media and its Impact on Social Contagions. In ICWSM, 2014. [24] Gene H Golub and Charles F Van Loan. Matrix computations, volume 3. JHU Press, 2012. [25] Youcef Saad and Martin H Schultz. Gmres: A generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on scientific and statistical computing, 7(3):856–869, 1986. [26] Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, Cambridge, England, 2004. [27] Meeyoung Cha, Hamed Haddadi, Fabricio Benevenuto, and P Krishna Gummadi. Measuring User Influence in Twitter: The Million Follower Fallacy. In ICWSM, 2010. [28] Yosihiko Ogata. On lewis’ simulation method for point processes. Information Theory, IEEE Transactions on, 27(1):23–31, 1981. 9
2014
253
5,351
Universal Option Models Hengshuai Yao, Csaba Szepesv´ari, Rich Sutton, Joseph Modayil Department of Computing Science University of Alberta Edmonton, AB, Canada, T6H 4M5 hengshua,szepesva,sutton,jmodayil@cs.ualberta.ca Shalabh Bhatnagar Department of Computer Science and Automation Indian Institute of Science Bangalore-560012, India shalabh@csa.iisc.ernet.in Abstract We consider the problem of learning models of options for real-time abstract planning, in the setting where reward functions can be specified at any time and their expected returns must be efficiently computed. We introduce a new model for an option that is independent of any reward function, called the universal option model (UOM). We prove that the UOM of an option can construct a traditional option model given a reward function, and also supports efficient computation of the option-conditional return. We extend the UOM to linear function approximation, and we show the UOM gives the TD solution of option returns and the value function of a policy over options. We provide a stochastic approximation algorithm for incrementally learning UOMs from data and prove its consistency. We demonstrate our method in two domains. The first domain is a real-time strategy game, where the controller must select the best game unit to accomplish a dynamically-specified task. The second domain is article recommendation, where each user query defines a new reward function and an article’s relevance is the expected return from following a policy that follows the citations between articles. Our experiments show that UOMs are substantially more efficient than previously known methods for evaluating option returns and policies over options. 1 Introduction Conventional methods for real-time abstract planning over options in reinforcement learning require a single pre-specified reward function, and these methods are not efficient in settings with multiple reward functions that can be specified at any time. Multiple reward functions arise in several contexts. In inverse reinforcement learning and apprenticeship learning there is a set of reward functions from which a good reward function is extracted [Abbeel et al., 2010, Ng and Russell, 2000, Syed, 2010]. Some system designers iteratively refine their provided reward functions to obtain desired behavior, and will re-plan in each iteration. In real-time strategy games, several units on a team can share the same dynamics but have different time-varying capabilities, so selecting the best unit for a task requires knowledge of the expected performance for many units. Even article recommendation can be viewed as a multiple-reward planning problem, where each user query has an associated reward function and the relevance of an article is given by walking over the links between the articles [Page et al., 1998, Richardson and Domingos, 2002]. We propose to unify the study of such problems within the setting of real-time abstract planning, where a reward function can be speci1 fied at any time and the expected option-conditional return for a reward function must be efficiently computed. Abstract planning, or planning with temporal abstractions, enables one to make abstract decisions that involve sequences of low level actions. Options are often used to specify action abstraction [Precup, 2000, Sorg and Singh, 2010, Sutton et al., 1999]. An option is a course of temporally extended actions, which starts execution at some states, and follows a policy in selecting actions until it terminates. When an option terminates, the agent can start executing another option. The traditional model of an option takes in a state and predicts the sum of the rewards in the course till termination, and the probability of terminating the option at any state. When the reward function is changed, abstract planning with the traditional option model has to start from scratch. We introduce universal option models (UOM) as a solution to this problem. The UOM of an option has two parts. A state prediction part, as in the traditional option model, predicts the states where the option terminates. An accumulation part, new to the UOM, predicts the occupancies of all the states by the option after it starts execution. We also extend UOMs to linear function approximation, which scales to problems with a large state space. We show that the UOM outperforms existing methods in two domains. 2 Background A finite Markov Decision Process (MDP) is defined by a discount factor γ ∈(0,1), the state set, S, the action set, A, the immediate rewards ⟨Ra⟩, and transition probabilities ⟨Pa⟩. We assume that the number of states and actions are both finite. We also assume the states are indexed by integers, i.e., S = {1,2,...,N}, where N is the number of states. The immediate reward function Ra ∶S × S →R for a given action a ∈A and a pair of states (s,s′) ∈S × S gives the mean immediate reward underlying the transition from s to s′ while using a. The transition probability function is a function Pa ∶S × S →[0,1] and for (s,s′) ∈S × S, a ∈A, Pa(s,s′) gives the probability of arriving at state s′ given that action a is executed at state s. A (stationary, Markov) policy π is defined as π ∶S × A →[0,1], where ∑a∈A π(s,a) = 1 for any s ∈S. The value of a state s under a policy π is defined as the expected return given that one starts executing π from s: V π(s) = Es,π{r1 + γr2 + γ2r3 + ⋯}. Here (r1,r2 ...) is a process with the following properties: s0 = s and for k ≥0, sk+1 is sampled from Pak(sk,⋅), where ak is the action selected by policy π and rk+1 is such that its conditional mean, given sk,ak,sk+1 is Rak(sk,sk+1). The definition works also in the case when at any time step t the policy is allowed to take into account the history s0,a1,r1,s1,a2,r2,...,sk in coming up with ak. We will also assume that the conditional variance of rk+1 given sk, ak and sk+1 is bounded. The terminology, ideas and results in this section are based on the work of [Sutton et al., 1999] unless otherwise stated. An option, o ≡o⟨π,β⟩, has two components, a policy π, and a continuation function β ∶S →[0,1]. The latter maps a state into the probability of continuing the option from the state. An option o is executed as follows. At time step k, when visiting state sk, the next action ak is selected according to π(sk,⋅). The environment then transitions to the next state sk+1, and a reward rk+1 is observed.1 The option terminates at the new state sk+1 with probability 1 −β(sk+1). Otherwise it continues, a new action is chosen from the policy of the option, etc. When one option terminates, another option can start. The option model for option o helps with planning. Formally, the model of option o is a pair <Ro,po>, where Ro is the so-called option return and po is the so-called (discounted) terminal distribution of option o. In particular, Ro ∶S →R is a mapping such that for any state s, Ro(s) gives the total expected discounted return until the option terminates: Ro(s) = Es,o[r1 + γr2 + ⋯+ γT −1rT ], where T is the random termination time of the option, assuming that the process (s0,r1,s1,r2,...) starts at time 0 at state s0 = s (initiation), and every time step the policy underlying o is followed to get the reward and the next state until termination. The mapping po ∶S × S →[0,∞) is a function 1Here, sk+1 is sampled from Pak(sk, ⋅) and the mean of rk+1 is Rak(sk, sk+1). 2 that, for any given s,s′ ∈S, gives the discounted probability of terminating at state s′ provided that the option is followed from the initial state s: po(s,s′) = Es,o[γT I{sT =s′} ] = ∞ ∑ k=1 γk Ps,o{sT = s′,T = k}. (1) Here, I{⋅} is the indicator function, and Ps,o{sT = s′,T = k} is the probability of terminating the option at s′ after k steps away from s. A semi-MDP (SMDP) is like an MDP, except that it allows multi-step transitions between states. A MDP with a fixed set of options gives rise to an SMDP, because the execution of options lasts multiple time steps. Given a set of options O, an option policy is then a mapping h ∶S × O →[0,1] such that h(s,o) is the probability of selecting option o at state s (provided the previous option has terminated). We shall also call these policies high-level policies. Note that a high-level policy selects options which in turn select actions. Thus a high-level policy gives rise to a standard MDP policy (albeit one that needs to remember which option was selected the last time, i.e., a history dependent policy). Let flat(h) denote the standard MDP policy of a high-level policy h. The value function underlying h is defined as that of flat(h): V h(s) = V flat(h)(s),s ∈S. The process of constructing flat(h) given h and the options O is the flattening operation. The model of options is constructed in such a way that if we think of the option return as the immediate reward obtained when following the option and if we think of the terminal distribution as transition probabilities, then Bellman’s equations will formally hold for the tuple ⟨γ = 1,S,O,⟨Ro⟩,⟨po⟩⟩. 3 Universal Option Models (UOMs) In this section, we define the UOM for an option, and prove a universality theorem stating that the traditional model of an option can be constructed from the UOM and a reward vector of the option. The goal of UOMs is to make models of options that are independent of the reward function. We use the adjective “universal” because the option model becomes universal with respect to the rewards. In the case of MDPs, it is well known that the value function of a policy π can be obtained from the so-called discounted occupancy function underlying π, e.g., see [Barto and Duff, 1994]. This technique has been used in inverse reinforcement learning to compute a value function with basis reward functions [Ng and Russell, 2000]. The generalization to options is as follows. First we introduce the discounted state occupancy function, uo, of option o⟨π,β⟩: uo(s,s′) = Es,o[ T −1 ∑ k=0 γk I{sk=s′} ]. (2) Then, Ro(s) = ∑ s′∈S rπ(s′)uo(s,s′), where rπ is the expected immediate reward vector under π and ⟨Ra⟩, i.e., for any s ∈S, rπ(s) = Es,π[r1]. For convenience, we shall also treat uo(s,⋅) as a vector and write uo(s) to denote it as a vector. To clarify the independence of uo from the reward function, it is helpful to first note that every MDP can be viewed as the combination of an immediate reward function, ⟨Ra⟩, and a reward-less MDP, M = ⟨γ,S,A,⟨Pa⟩⟩. Definition 1 The UOM of option o in a reward-less MDP is defined by ⟨uo,po⟩, where uo is the option’s discounted state occupancy function, defined by (2), and po is the option’s discounted terminal state distribution, defined by (1). The main result of this section is the following theorem. All the proofs of the theorems in this paper can be found in an extended paper. Theorem 1 Fix an option o = o⟨π,β⟩in a reward-less MDP M, and let uo be the occupancy function underlying o in M. Let ⟨Ra⟩be some immediate reward function. Then, for any state s ∈S, the return of option o with respect to M and ⟨Ra⟩is given by by Ro(s) = (uo(s))⊺rπ. 3 4 UOMs with Linear Function Approximation In this section, we introduce linear universal option models which use linear function approximation to compactly represent reward independent option-models over a potentially large state space. In particular, we build upon previous work where the approximate solution has been obtained by solving the so-called projected Bellman equations. We assume that we are given a function φ ∶S →Rn, which maps any state s ∈S into its n-dimensional feature representation φ(s). Let Vθ ∶S →R be defined by Vθ(s) = θ⊺φ(s), where the vector θ is a so-called weight-vector.2 Fix an initial distribution µ over the states and an option o = o⟨π,β⟩. Given a reward function R = ⟨Ra⟩, the TD(0) approximation Vθ(TD,R) to Ro is defined as the solution to the following projected Bellman equations [Sutton and Barto, 1998]: Eµ,o[ T −1 ∑ k=0 {rk+1 + γVθ(sk+1) −Vθ(sk)} φ(sk)] = 0. (3) Here s0 is sampled from µ, the random variables (r1,s1,r2,s2,...) and T (the termination time) are obtained by following o from this initial state until termination. It is easy to see that if γ = 0 then Vθ(TD,R) becomes the least-squares approximation Vf (LS,R) to the immediate rewards R under o given the features φ. The least-squares approximation to R is given by f (LS,R) = arg minf J(f) = Eµ,o[ ∑T −1 k=0 {rk+1 −f ⊺φ(sk)}2 ]. We restrict our attention to this TD(0) solution in this paper, and refer to f as an (approximate) immediate reward model. The TD(0)-based linear UOM (in short, linear UOM) underlying o (and µ) is a pair of n × n matrices (U o,M o), which generalize the tabular model (uo,po). Given the same sequence as used in defining the approximation to Ro (equation 3), U o is the solution to the following system of linear equations: Eµ,o [ T −1 ∑ k=0 {φ(sk) + γU oφ(sk+1) −U oφ(sk)}φ(sk)⊺] = 0. Let (U o)⊺= [u1,...,un], ui ∈Rn. If we introduce an artificial “reward” function, ˘ri = φi, which is the ith feature, then ui is the weight vector such that Vui is the TD(0)-approximation to the return of o for the artificial reward function. Note that if we use tabular representation, then ui,s = uo(s,i) holds for all s,i ∈S. Therefore our extension to linear function approximation is backward consistent with the UOM definition in the tabular case. However, this alone would not be a satisfactory justification of this choice of linear UOMs. The following theorem shows that just like the UOMs of the previous section, the U o matrix allows the separation of the reward from the option models without losing information. Theorem 2 Fix an option o = o⟨π,β⟩in a reward-less MDP, M = ⟨γ,S,A,⟨Pa⟩⟩, an initial state distribution µ over the states S, and a function φ ∶S →Rn. Let U be the linear UOM of o w.r.t. φ and µ. Pick some reward function R and let Vθ(TD,R) be the TD(0) approximation to the return Ro. Then, for any s ∈S, Vθ(TD,R)(s) = (f (LS,R))⊺(Uφ(s)). The significance of this result is that it shows that to compute the TD approximation of an option return corresponding to a reward function R, it suffices to find f (LS,R) (the least squares approximation of the expected one-step reward under the option and the reward function R), provided one is given the U matrix of the option. We expect that finding a least-squares approximation (solving a regression problem) is easier than solving a TD fixed-point equation. Note that the result also holds for standard policies, but we do not explore this direction in this paper. The definition of M o. The matrix M o serves as a state predictor, and we call M o the transient matrix associated with option o. Given a feature vector φ, M oφ predicts the (discounted) expected feature vector where the option stops. When option o is started from state s and stopped at state sT in T time steps, we update an estimate of M o by M o ←M o + η(γT φ(sT ) −M oφ(s))φ(s)⊺. 2Note that the subscript in V⋅always means the TD weight vector throughout this paper. 4 Formally, M o is the solution to the associated linear system, Eµ,o[γT φ(sT )φ(s)⊺] = M o Eµ,o[φ(s)φ(s)⊺]. (4) Notice that M o is thus just the least-squares solution of the problem when γT φ(sT ) is regressed on φ(s), given that we know that option o is executed. Again, this way we obtain the terminal distribution of option o in the tabular case. A high-level policy h defines a Markov chain over S × O. Assume that this Markov chain has a unique stationary distribution, µh. Let (s,o) ∼µh be a draw from this stationary distribution. Our goal is to find an option model that can be used to compute a TD approximation to the value function of a high-level policy h (flattened) over a set of options O. The following theorem shows that the value function of h can be computed from option returns and transient matrices. Theorem 3 Let Vθ(s) = φ(s)⊺θ. Under the above conditions, if θ solves Eµh[(Ro(s) + (M oφ(s))⊺θ −φ(s)⊺θ)φ(s)] = 0 (5) then Vθ is the TD(0) approximation to the value function of h. Recall that Theorem 2 states that the U matrices can be used to compute the option returns given an arbitrary reward function. Thus given a reward function, the U and M matrices are all that one would need to solve the TD solution of the high-level policy. The merit of U and M is that they are reward independent. Once they are learned, they can be saved and used for different reward functions for different situations at different times. 5 Learning and Planning with UOMs In this section we give incremental, TD-style algorithms for learning and planning with linear UOMs. We start by describing the learning of UOMs while following some high-level policy h, and then describe a Dyna-like algorithm that estimates the value function of h with learned UOMs and an immediate reward model. 5.1 Learning Linear UOMs Assume that we are following a high-level policy h over a set of options O, and that we want to estimate linear UOMs for the options in O. Let the trajectory generated by following this high-level policy be ...,sk,qk,ok,ak,sk+1,qk+1,.... Here, qk = 1 is the indicator for the event that option ok−1 is terminated at state sk and so ok ∼h(sk,⋅). Also, when qk = 0, ok = ok−1. Upon the transition from sk to sk+1,qk+1, the matrix U ok is updated as follows: U ok k+1 = U ok k + ηok k δk+1 φ(sk)⊺, where δk+1 = φ(sk) + γU ok k φ(sk+1)I{qk+1=0} −U ok k φ(sk), and ηok k ≥0 is the learning-rate at time k associated with option ok. Note that when option ok is terminated the temporal difference δk+1 is modified so that the next predicted value is zero. The ⟨M o⟩matrices are updated using the least-mean square algorithm. In particular, matrix M ok is updated when option ok is terminated at time k + 1, i.e., when qk+1 = 1. In the update we need the feature (˜φ⋅) of the state which was visited at the time option ok was selected and also the time elapsed since this time (τ⋅): M ok k+1 = M ok k + ˜ηok k I{qk+1=1} {γτkφ(sk+1) −M ok k ˜φk} ˜φ⊺ k, ˜φk+1 = I{qk+1=0} ˜φk + I{qk+1=1}φ(sk+1), τk+1 = I{qk+1=0}τk + 1. These variables are initialized to τ0 = 0 and ˜φ0 = φ(s0). The following theorem states the convergence of the algorithm. 5 Theorem 4 Assume that the stationary distribution of h is unique, all options in O terminate with probability one and that all options in O are selected at some state with positive probability.3 If the step-sizes of the options are decreased towards zero so that the Robbins-Monro conditions hold for them, i.e., ∑i(k) ηo i(k) = ∞,∑i(k)(ηo i(k))2 < ∞, and ∑j(k) ˜ηo j(k) = ∞,∑j(k)(˜ηo j(k))2 < ∞,4 then for any o ∈O, M o k →M o and U o k →U o with probability one, where (U o,M o) are defined in the previous section. 5.2 Learning Reward Models In conventional settings, a single reward signal will be contained in the trajectory when following the high level policy, ...,sk,qk,ok,ak,rk+1,sk+1,qk+1,.... We can learn for each option an immediate reward model for this reward signal. For example, f ok is updated using least mean squares rule: f ok k+1 = f ok k + ˜ηok k I{qk+1=0} {rk+1 −f ok⊺φ(sk)}φ(sk). In other settings, immediate reward models can be constructed in different ways. For example, more than one reward signal can be of interest, so multiple immediate reward models can be learned in parallel. Moreover, such additional reward signals might be provided at any time. In some settings, an immediate reward model for a reward function can be provided directly from knowledge of the environment and features where the immediate reward model is independent of the option. 5.3 Policy Evaluation with UOMs and Reward Models Consider the process of policy evaluation for a high-level policy over options from a given set of UOMs when learning a reward model. When starting from a state s with feature vector φ(s) and following option o, the return Ro(s) is estimated from the reward model f o and the expected feature occupancy matrix U o by Ro(s) ≈(f o)⊺U oφ(s). The TD(0) approximation to the value function of a high-level policy h can then be estimated online from Theorem 3. Interleaving updates of the reward model learning with these planning steps for h gives a Dyna-like algorithm. 6 Empirical Results In this section, we provide empirical results on choosing game units to execute specific policies in a simplified real-time strategy game and recommending articles in a large academic database with more than one million articles. We compare the UOM method with a method of Sorg and Singh (2010), who introduced the linear-option expectation model (LOEM) that is applicable for evaluating a high-level policy over options. Their method estimates (M o,bo) from experience, where bo is equal to (U o)⊺f o in our formulation. This term bo is the expected return from following the option, and can be computed incrementally from experience once a reward signal or an immediate reward model are available. A simplified Star Craft 2 mission. We examined the use of the UOMs and LOEMs for policy evaluation in a simplified variant of the real-time strategy game Star Craft 2, where the task for the player was to select the best game unit to move to a particular goal location. We assume that the player has access to a black-box game simulator. There are four game units with the same constant dynamics. The internal status of these units dynamically changes during the game and this affects the reward they receive in enemy controlled territory. We evaluated these units, when their rewards are as listed in the table below (the rewards are associated with the previous state and are not action-contingent). A game map is shown in Figure 1 (a). The four actions could move a unit left, right, up, or down. With probability 2/3, the action moved the unit one grid in the intended direction. With probability 1/3, the action failed, and the agent was moved in a random direction chosen uniformly from the other three directions. If an action would move a unit into the boundary, it remained in the original location (with probability one). The discount factor was 0.9. Features were a lookup table over the 11 × 11 grid. For all algorithms, only one step of planning was applied per action selection. The 3Otherwise, we can drop the options in O which are never selected by h. 4 The index i(k) is advanced for ηo i(k) when following option o, and the index j(k) is advanced for ˜ηo j(k) when o is terminated. Note that in the algorithm, we simply wrote as ηo i(k) as ηo k and ˜ηo j(k) as ˜ηo k. 6 1 o G 5 o 2 o 3 o 6 o 7 o 4 o 8 o B 9 o (11, 11) (a) G (b) 0 20 40 60 80 100 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Number of episodes RMSE UOM LOEM (c) Figure 1: (a) A Star Craft local mission map, consisting of four bridged regions, and nine options for the mission. (b) A high-level policy h =< o1,o2,o3,o6 > initiates the options in the regions, with deterministic policies in the regions as given by the arrows: o1 (green), o2 (yellow), o3 (purple), and o6 (white). Outside these regions, the policies select actions uniformly at random. (c) The expected performance of different units can be learned by simulating trajectories (with the standard deviation shown by the bars), and the UOM method reduces the error faster than the LOEM method. planning step-size for each algorithm was chosen from 0.001,0.01,0.1,1.0. Only the best one was reported for an algorithm. All data reported were averaged over 30 runs. Game Units Enemy Locations Battlecruiser Reapers Thor SCV fortress (yellow) 0.3 -1.0 1.0 -1.0 ground forces (green) 1.0 0.3 1.0 -1.0 viking (red) -1.0 -1.0 1.0 -1.0 cobra (pink) 1.0 0.5 -1.0 -1.0 minerals (blue) 0 0 0 1.0 We defined a set of nine options and their corresponding policies, shown in Figure 1 (a), (b). These options are specified by the locations where they terminate, and the policies. The termination location is the square pointed to by each option’s arrows. Four of these are “bridges” between regions, and one is the position labeled “B” (which is the player’s base at position (1,1)). Each of the options could be initiated from anywhere in the region in which the policy was defined. The policies for these options were defined by a shortest path traversal from the initial location to the terminal location, as shown in the figure. These policies were not optimized for the reward functions of the game units or the enemy locations. To choose among units for a mission in real time, a player must be able to efficiently evaluate many options for many units, compute the value functions of the various high-level policies, and select the best unit for a particular high-level goal. A high-level policy for dispatching the game units is defined by initiating different options from different states. For example, a policy for moving units from the base “B” to position “G” can be, h =< o1,o2,o3 >. Another high-level policy could move another unit from upper left terrain to “G” by a different route with h′ =< o8,o5,o6 >. We evaluated policy h for the Reaper unit above using UOMs and LOEMs. We first pre-learned the U o and M o models using the experience from 3000 trajectories. Using a reward function that is described in the above table, we then learned f o for the UOM and and bo for the LEOM over 100 simulated trajectories, and concurrently learned θ. As shown in Figure 1(c), the UOM model learns a more accurate estimate of the value function from fewer episodes, when the best performance is taken across the planning step size. Learning f o is easier than learning bo because the stochastic dynamics of the environment is factored out through the pre-learned U o. These constructed value functions can be used to select the best game unit for the task of moving to the goal location. This approach is computationally efficient for multiple units. We compared the computation time of LOEMs and UOMs with linear Dyna on a modern PC with an Intel 1.7GHz processor and 8GB RAM in a MATLAB implementation. Learning U o took 81 seconds. We used a recursive leastsquares update to learn M o, which took 9.1 seconds. Thus, learning an LOEM model is faster than learning a UOM for a single fixed reward function, but the UOM can produce an accurate option return quickly for each new reward function. Learning the value function incrementally from the 100 7 trajectories took 0.44 seconds for the UOM and 0.61 seconds for the LOEM. The UOM is slightly more efficient as f o is more sparse than bo, but it is substantially more accurate, as shown in Figure 1(c). We evaluated all the units and the results are similar. Article recommendation. Recommending relevant articles for a given user query can be thought of as predicting an expected return of an option for a dynamically specified reward model. Ranking an article as a function of the links between articles in the database has proven to be a successful approach to article recommendation, with PageRank and other link analysis algorithms using a random surfer model [Page et al., 1998]. We build on this idea, by mapping a user query to a reward model and pre-specified option for how a reader might transition between articles. The ranking of an article is then the expected return from following references in articles according to the option. Consider the policy of performing a random-walk between articles in a database by following a reference from an article that is selected uniformly at random. An article receives a positive reward if it matches a user query (and is otherwise zero), and the value of the article is the expected discounted return from following the random-walk policy over articles. More focused reader policies can be specified as following references from an article with a common author or keyword. We experimented with a collection from DBLP that has about 1.5 million articles, 1 million authors, and 2 millions citations [Tang et al., 2008]. We assume that a user query q is mapped directly to an option o and an immediate reward model f o q . For simplicity in our experiment, the reward models are all binary, with three non-zero features drawn uniformly at random. In total we used about 58 features, and the discount factor was 0.9. There were three policies. The first followed a reference selected uniformly at random, the second selected a reference written by an author of the current article (selected at random), and the third selected a reference with a keyword in common with the current article. Three options were defined from these policies, where the termination probability beta was 1.0 if no suitable outgoing reference was available and 0.25 otherwise. High-level policies of different option sequences could also be applied, but were not tested here. We used bibliometric features for the articles extracted from the author, title, venue fields. We generated queries q at random, where each query specified an associated option o and an optionindependent immediate reward model f o q = fq. We then computed their value functions. The immediate reward model is naturally constructed for these problems, as the reward comes from the starting article based on its features, so it is not dependent on the action taken (and thus not the option). This approach is appropriate in article recommendation as a query can provide both terms for relevant features (such as the venue), and how the reader intends to follow references in the paper. For the UOM based approach we pre-learned U o, and then computed U of o q for each query. For the LOEM approach, we learned a bq for each query by simulating 3000 trajectories in the database (the simulated trajectories were shared for all the queries). The computation time (in seconds) for the UOM and LOEM approaches are shown in the table below, which shows that UOMS are much more computationally efficient than LOEM. Number of reward functions 10 100 500 1,000 10,000 LOEM 0.03 0.09 0.47 0.86 9.65 UOM 0.01 0.04 0.07 0.12 1.21 7 Conclusion We proposed a new way of modelling options in both tabular representation and linear function approximation, called the universal option model. We showed how to learn UOMs and how to use them to construct the TD solution of option returns and value functions of policies, and prove their theoretical guarantees. UOMs are advantageous in large online systems. Estimating the return of an option given a new reward function with the UOM of the option is reduced to a one-step regression. Computing option returns dependent on many reward functions in large online games and search systems using UOMs is much faster than using previous methods for learning option models. Acknowledgment Thank the reviewers for their comments. This work was supported by grants from Alberta Innovates Technology Futures, NSERC, and Department of Science and Technology, Government of India. 8 References Abbeel, P., Coates, A., and Ng, A. Y. (2010). Autonomous helicopter aerobatics through apprenticeship learning. Int. J. Rob. Res., 29(13):1608–1639. Barto, A. and Duff, M. (1994). Monte carlo matrix inversion and reinforcement learning. NIPS, pages 687–694. Bertsekas, D. P. and Tsitsiklis, J. N. (1996). Neuro-dynamic Programming. Athena. Jaakkola, T., Jordan, M., and Singh, S. (1994). On the convergence of stochastic iterative dynamic programming algorithms. Neural Computation, 6(6):1185–1201. Ng, A. Y. and Russell, S. J. (2000). Algorithms for inverse reinforcement learning. ICML, pages 663–670. Page, L., Brin, S., Motwani, R., and Winograd, T. (1998). The PageRank citation ranking: Bringing order to the web. Technical report, Stanford University. Precup, D. (2000). Temporal Abstraction in Reinforcement Learning. PhD thesis, University of Massachusetts, Amherst. Richardson, M. and Domingos, P. (2002). The intelligent surfer: Probabilistic combination of link and content information in PageRank. NIPS. Sorg, J. and Singh, S. (2010). Linear options. AAMAS, pages 31–38. Sutton, R. S. and Barto, A. G. (1998). Reinforcement Learning: An Introduction. MIT Press. Sutton, R. S., Precup, D., and Singh, S. (1999). Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112:181–211. Syed, U. A. (2010). Reinforcement Learning Without Rewards. PhD thesis, Princeton University. Tang, J., Zhang, J., Yao, L., Li, J., Zhang, L., and Su, Z. (2008). Arnetminer: extraction and mining of academic social networks. SIGKDD, pages 990–998. 9
2014
254
5,352
Discovering, Learning and Exploiting Relevance Cem Tekin Electrical Engineering Department University of California Los Angeles cmtkn@ucla.edu Mihaela van der Schaar Electrical Engineering Department University of California Los Angeles mihaela@ee.ucla.edu Abstract In this paper we consider the problem of learning online what is the information to consider when making sequential decisions. We formalize this as a contextual multi-armed bandit problem where a high dimensional (D-dimensional) context vector arrives to a learner which needs to select an action to maximize its expected reward at each time step. Each dimension of the context vector is called a type. We assume that there exists an unknown relation between actions and types, called the relevance relation, such that the reward of an action only depends on the contexts of the relevant types. When the relation is a function, i.e., the reward of an action only depends on the context of a single type, and the expected reward of an action is Lipschitz continuous in the context of its relevant type, we propose an algorithm that achieves ˜O(T γ) regret with a high probability, where γ = 2/(1 + √ 2). Our algorithm achieves this by learning the unknown relevance relation, whereas prior contextual bandit algorithms that do not exploit the existence of a relevance relation will have ˜O(T (D+1)/(D+2)) regret. Our algorithm alternates between exploring and exploiting, it does not require reward observations in exploitations, and it guarantees with a high probability that actions with suboptimality greater than ϵ are never selected in exploitations. Our proposed method can be applied to a variety of learning applications including medical diagnosis, recommender systems, popularity prediction from social networks, network security etc., where at each instance of time vast amounts of different types of information are available to the decision maker, but the effect of an action depends only on a single type. 1 Introduction In numerous learning problems the decision maker is provided with vast amounts of different types of information which it can utilize to learn how to select actions that lead to high rewards. The value of each type of information can be regarded as the context on which the learner acts, hence all the information can be encoded in a context vector. We focus on problems where this context vector is high dimensional but the reward of an action only depends on a small subset of types. This dependence is given in terms of a relation between actions and types, which is called the relevance relation. For an action set A and a type set D, the relevance relation is given by R = {R(a)}a∈A, where R(a) ⊂D. Expected reward of an action a only depends on the values of the relevant types of contexts. Hence, for a context vector x, action a’s expected reward is equal to µ(a, xR(a)), where xR(a) is the context vector corresponding to the types in R(a). Several examples of relevance relations and their effect on expected action rewards are given in Fig. 1. The problem of finding the relevance relation is important especially when maxa∈A |R(a)| << |D|.1 In this paper we consider the case when the relevance relation is a function, i.e., |R(a)| = 1, for all a ∈A, which is an important special case. We discuss the extension of our framework to the more general case in Section 3.3. 1For a set A, |A| denotes its cardinality. 1 Figure 1: Examples of relevance relations: (i) general relevance relation, (ii) linear relevance relation, (iii) relevance function. In this paper we only consider (iii), while our methods can easily be generalized to (i) and (ii). Relevance relations exists naturally in many practical applications. For example, when sequentially treating patients with a particular disease, many types of information (contexts) are usually available - the patients’ age, weight, blood tests, scans, medical history etc. If a drug’s effect on a patient is caused by only one of the types, then learning the relevant type for the drug will result in significantly faster learning for the effectiveness of the drug for the patients.2 Another example is recommender systems, where recommendations are made based on the high dimensional information obtained from the browsing and purchase histories of the users. A user’s response to a product recommendation will depend on the user’s gender, occupation, history of past purchases etc., while his/her response to other product recommendations may depend on completely different information about the user such as the age and home address. Traditional contextual bandit solutions disregard existence of such relations, hence have regret bounds that scale exponentially with the dimension of the context vector [1, 2]. In order to solve the curse of dimensionality problem, a new approach which learns the relevance relation in an online way is required. The algorithm we propose simultaneously learns the relevance relation (when it is a function) and the action rewards by comparing sample mean rewards of each action for context pairs of different types that are calculated based on the context and reward observations so far. The only assumption we make about actions and contexts is the Lipschitz continuity of expected reward of an action in the context of its relevant type. Our main contributions can be summarized as follows: • We propose the Online Relevance Learning with Controlled Feedback (ORL-CF) algorithm that alternates between exploration and exploitation phases, which achieves a regret bound of ˜O(T γ),3 with γ = 2/(1 + √ 2), when the relevance relation is a function. • We derive separate bounds on the regret incurred in exploration and exploitation phases. ORL-CF only needs to observe the reward in exploration phases, hence the reward feedback is controlled. ORL-CF achieves the same time order of regret even when observing the reward has a non-zero cost. • Given any δ > 0, which is an input to ORL-CF, suboptimal actions will never be selected in exploitation steps with probability at least 1 −δ. This is very important, perhaps vital in numerous applications where the performance needs to be guaranteed, such as healthcare. Due to the limited space, numerical results on the performance of our proposed algorithm is included in the supplementary material. 2Even when there are multiple relevant types for each action, but there is one dominant type whose effect on the reward of the action is significantly larger than the effects of other types, assuming that the relevance relation is a function will be a good approximation. 3O(·) is the Big O notation, ˜O(·) is the same as O(·) except it hides terms that have polylogarithmic growth. 2 2 Problem Formulation A is the set of actions, D is the dimension of the context vector, D := {1, 2, . . . , D} is the set of types, and R = {R(a)}a∈A : A →D is the relevance function, which maps every a ∈A to a unique d ∈D. At each time step t = 1, 2, . . ., a context vector xt arrives to the learner. After observing xt the learner selects an action a ∈A, which results in a random reward rt(a, xt). The learner may choose to observe this reward by paying cost cO ≥0. The goal of the learner is to maximize the sum of the generated rewards minus costs of observations for any time horizon T. Each xt consists of D types of contexts, and can be written as xt = (x1,t, x2,t, . . . , xD,t) where xi,t is called the type i context. Xi denotes the space of type i contexts and X := X1 × X2 × . . . × XD denotes the space of context vectors. At any t, we have xi,t ∈Xi for all i ∈D. For the sake of notational simplicity we take Xi = [0, 1] for all i ∈D, but all our results can be generalized to the case when Xi is a bounded subset of the real line. For x = (x1, x2, . . . , xD) ∈X, rt(a, x) is generated according to an i.i.d. process with distribution F(a, xR(a)) with support in [0, 1] and expected value µ(a, xR(a)). The following assumption gives a similarity structure between the expected reward of an action and the contexts of the type that is relevant to that action. Assumption 1. For all a ∈A, x, x′ ∈X, we have |µ(a, xR(a))−µ(a, x′ R(a))| ≤L|xR(a)−x′ R(a)|, where L > 0 is the Lipschitz constant. We assume that the learner knows the L given in Assumption 1. This is a natural assumption in contextual bandit problems [1, 2]. Given a context vector x = (x1, x2, . . . , xD), the optimal action is a∗(x) := arg maxa∈A µ(a, xR(a)), but the learner does not know it since it does not know R, F(a, xR(a)) and µ(a, xR(a)) for a ∈A, x ∈X a priori. In order to assess the learner’s loss due to unknowns, we compare its performance with the performance of an oracle benchmark which knows a∗(x) for all x ∈X. Let µt(a) := µ(a, xR(a),t). The action chosen by the learner at time t is denoted by αt. The learner also decides whether to observe the reward or not, and this decision of the learner at time t is denoted by βt ∈{0, 1}, where βt = 1 implies that the learner chooses to observe the reward and βt = 0 implies that the learner does not observe the reward. The learner’s performance loss with respect to the oracle benchmark is defined as the regret, whose value at time T is given by R(T) := T X t=1 µt(a∗(xt)) − T X t=1 (µt(αt) −cOβt). (1) A regret that grows sublinearly in T, i.e., O(T γ), γ < 1, guarantees convergence in terms of the average reward, i.e., R(T)/T →0. We are interested in achieving sublinear growth with a rate independent of D. 3 Online Relevance Learning with Controlled Feedback 3.1 Description of the algorithm In this section we propose the algorithm Online Relevance Learning with Controlled Feedback (ORL-CF), which learns the best action for each context vector by simultaneously learning the relevance relation, and then estimating the expected reward of each action. The feedback, i.e., reward observations, is controlled based on the past context vector arrivals, in a way that reward observations are only made for actions for which the uncertainty in the reward estimates are high for the current context vector. The controlled feedback feature allows ORL-CF to operate as an active learning algorithm. Operation of ORL-CF can be summarized as follows: • Adaptively discretize (partition) the context space of each type to learn action rewards of similar contexts together. • For an action, form reward estimates for pairs of intervals corresponding to pairs of types. Based on the accuracy of these estimates, either choose to explore and observe the reward or choose to exploit the best estimated action for the current context vector. • In order to choose the best action, compare the reward estimates for pairs of intervals for which one interval belongs to type i, for each type i and action a. Conclude that type i 3 is relevant to a if the variation of the reward estimates does not greatly exceed the natural variation of the expected reward of action a over the interval of type i (calculated using Assumption 1). Online Relevance Learning with Controlled Feedback (ORL-CF): 1: Input: L, ρ, δ. 2: Initialization: Pi,1 = {[0, 1]}, i ∈D. Run Initialize(i, Pi,1, 1), i ∈D. 3: while t ≥1 do 4: Observe xt, find pt that xt belongs to. 5: Set Ut := S i∈D Ui,t, where Ui,t (given in (3)), is the set of under explored actions for type i. 6: if Ut ̸= ∅then 7: (Explore) βt = 1, select αt randomly from Ut, observe rt(αt, xt). 8: Update pairwise sample means: for all q ∈Qt, given in (2). ¯rind(q)(q, αt) = (Sind(q)(q, αt)¯rind(q)(q, αt) + rt(αt, xt))/(Sind(q)(q, αt) + 1). 9: Update counters: for all q ∈Qt, Sind(q)(q, αt) + +. 10: else 11: (Exploit) βt = 0, for each a ∈A calculate the set of candidate relevant contexts Relt(a) given in (4). 12: for a ∈A do 13: if Relt(a) = ∅then 14: Randomly select ˆct(a) from D. 15: else 16: For each i ∈Relt(a), calculate Vart(i, a) given in (5). 17: Set ˆct(a) = arg mini∈Relt(a) Vart(i, a). 18: end if 19: Calculate ¯rˆct(a) t (a) as given in (6). 20: end for 21: Select αt = arg maxa∈A ¯rˆct(a) t (pˆct(a),t, a). 22: end if 23: for i ∈D do 24: N i(pi,t) + +. 25: if N i(pi,t) ≥2ρl(pi,t) then 26: Create two new level l(pi,t) + 1 intervals p, p′ whose union gives pi,t. 27: Pi,t+1 = Pi,t ∪{p, p′} −{pi,t}. 28: Run Initialize(i, {p, p′}, t). 29: else 30: Pi,t+1 = Pi,t. 31: end if 32: end for 33: t = t + 1 34: end while Initialize(i, B, t): 1: for p ∈B do 2: Set Ni(p) = 0, ¯ri,j(p, pj, a) = ¯rj,i(pj, p, a) = 0, Si,j(p, pj, a) = Sj,i(pj, p, a) = 0 for all a ∈A, j ∈D−i and pj ∈Pj,t. 3: end for Figure 2: Pseudocode for ORL-CF. Since the number of contexts is infinite, learning the reward of an action for each context is not feasible. In order to learn fast, ORL-CF exploits the similarities between the contexts of the relevant type given in Assumption 1 to estimate the rewards of the actions. The key to success of our algorithm is that this estimation is good enough. ORL-CF adaptively forms the partition of the space for each type in D, where the partition for the context space of type i at time t is denoted by Pi,t. All the elements of Pi,t are disjoint intervals of Xi = [0, 1] whose lengths are elements of the set {1, 2−1, 2−2, . . .}.4 An interval with length 2−l, l ≥0 is called a level l interval, and for an interval p, l(p) denotes its level, s(p) denotes its length. By convention, intervals are of the form (a, b], with the only exception being the interval containing 0, which is of the form [0, b].5 Let pi,t ∈Pi,t be the interval that xi,t belongs to, pt := (p1,t, . . . , pD,t) and Pt := (P1,t, . . . , PD,t). 4Setting interval lengths to powers of 2 is for presentational simplicity. In general, interval lengths can be set to powers of any real number greater than 1. 5Endpoints of intervals will not matter in our analysis, so our results will hold even when the intervals have common endpoints. 4 The pseudocode of ORL-CF is given in Fig. 2. ORL-CF starts with Pi,1 = {Xi} = {[0, 1]} for each i ∈D. As time goes on and more contexts arrive for each type i, it divides Xi into smaller and smaller intervals. The idea is to combine the past observations made in an interval to form sample mean reward estimates for each interval, and use it to approximate the expected rewards of actions for contexts lying in these intervals. The intervals are created in a way to balance the variation of the sample mean rewards due to the number of past observations that are used to calculate them and the variation of the expected rewards in each interval. We also call Pi,t the set of active intervals for type i at time t. Since the partition of each type is adaptive, as time goes on, new intervals become active while old intervals are deactivated, based on how contexts arrive. For a type i interval p, let N i t(p) be the number of times xi,t′ ∈p ∈Pi,t′ for t′ ≤t. The duration of time that an interval remains active, i.e., its lifetime, is determined by an input parameter ρ > 0, which is called the duration parameter. Whenever the number of arrivals to an interval p exceeds 2ρl(p), ORL-CF deactivates p and creates two level l(p)+1 intervals, whose union gives p. For example, when pi,t = (k2−l, (k + 1)2−l] for some 0 < k ≤2l −1 if N i t(pi,t) ≥2ρl, ORL-CF sets Pi,t+1 = Pi,t ∪{(k2−l, (k + 1/2)2−l], ((k + 1/2)2−l, (k + 1)2−l]} −{pi,t}. Otherwise Pi,t+1 remains the same as Pi,t. It is easy to see that the lifetime of an interval increases exponentially in its duration parameter. We next describe the counters, control numbers and sample mean rewards the learner keeps for each pair of intervals corresponding to a pair of types to determine whether to explore or exploit and how to exploit. Let D−i := D −{i}. For type i, let Qi,t := {(pi,t, pj,t) : j ∈D−i} be the pair of intervals that are related to type i at time t, and let Qt := [ i∈D Qi,t. (2) To denote an element of Qi,t or Qt we use index q. For any q ∈Qt, the corresponding pair of types is denoted by ind(q). For example, ind((pi,t, pj,t)) = i, j. The decision to explore or exploit at time t is solely based on pt. For events A1, . . . , AK, let I(A1, . . . , Ak) denote the indicator function of event T k=1:K Ak. For p ∈Pi,t, p′ ∈Pj,t, let Si,j t (p, p′, a) := t−1 X t′=1 I (αt′ = a, βt = 1, pi,t′ = p, pj,t′ = p′) , be the number of times a is selected and the reward is observed when the type i context is in p and type j context is in p′, summed over times when both intervals are active. Also for the same p and p′ let ¯ri,j t (p, p′, a) := t−1 X t′=1 rt(a, xt)I (αt′ = a, βt = 1, pi,t′ = p, pj,t′ = p′) ! /(Si,j t (p, p′, a)), be the pairwise sample mean reward of action a for pair of intervals (p, p′). At time t, ORL-CF assigns a control number to each i ∈D denoted by Di,t := 2 log(tD|A|/δ) (Ls(pi,t))2 , which depends on the cardinality of A, the length of the active interval that type i context is in at time t and a confidence parameter δ > 0, which controls the accuracy of sample mean reward estimates. Then, it computes the set of under-explored actions for type i as Ui,t := {a ∈A : Sind(q) t (q, a) < Di,t for some q ∈Qi(t)}, (3) and then, the set of under-explored actions as Ut := S i∈D Ui,t. The decision to explore or exploit is based on whether or not Ut is empty. (i) If Ut ̸= ∅, ORL-CF randomly selects an action αt ∈Ut to explore, and observes its reward rt(αt, xt). Then, it updates the pairwise sample mean rewards and pairwise counters for all q ∈Qt, ¯rind(q) t+1 (q, αt) = Sind(q) t (q,αt)¯rind(q) t+1 (q,αt)+rt(αt,xt) Sind(q) t (q,αt)+1 , Sind(q) t+1 (q, αt) = Sind(q) t (q, αt) + 1. 5 (ii) If Ut = ∅, ORL-CF exploits by estimating the relevant type ˆct(a) for each a ∈A and forming sample mean reward estimates for action a based on ˆct(a). It first computes the set of candidate relevant types for each a ∈A, Relt(a) := {i ∈D : |¯ri,j t (pi,t, pj,t, a) −¯ri,k t (pi,t, pk,t, a)| ≤3Ls(pi,t), ∀j, k ∈D−i}. (4) The intuition is that if i is the type that is relevant to a, then independent of the values of the contexts of the other types, the variation of the pairwise sample mean reward of a over pi,t must be very close to the variation of the expected reward of a in that interval. If Relt(a) is empty, this implies that ORL-CF failed to identify the relevant type, hence ˆct(a) is randomly selected from D. If Relt(a) is nonempty, ORL-CF computes the maximum variation Vart(i, a) := max j,k∈D−i |¯ri,j t (pi,t, pj,t, a) −¯ri,k t (pi,t, pk,t, a)|, (5) for each i ∈Relt(a). Then it sets ˆct(a) = mini∈Relt(a) Vart(i, a). This way, whenever the type relevant to action a is in Relt(a), even if it is not selected as the estimated relevant type, the sample mean reward of a calculated based on the estimated relevant type will be very close to the sample mean of its reward calculated according to the true relevant type. After finding the estimated relevant types, the sample mean reward of each action is computed based on its estimated relevant type as ¯rˆct(a) t (a) := P j∈D−ˆct(a) ¯rˆct(a),j t (pˆct(a),t, pj,t, a)Sˆct(a),j t (pˆct(a),t, pj,t, a) P j∈D−ˆct(a) Sˆct(a),j t (pˆct(a),t, pj,t, a) . (6) Then, ORL-CF selects αt = arg maxa∈A ¯rˆct(a) t (pˆct(a),t, a). Since the reward is not observed in exploitations, pairwise sample mean rewards and counters are not updated. 3.2 Regret analysis of ORL-CF Let τ(T) ⊂{1, 2, . . . , T} be the set of time steps in which ORL-CF exploits by time T. τ(T) is a random set which depends on context arrivals and the randomness of the action selection of ORLCF. The regret R(T) defined in (1) can be written as a sum of the regret incurred during explorations (denoted by RO(T)) and the regret incurred during exploitations (denoted by RI(T)). The following theorem gives a bound on the regret of ORL-CF in exploitation steps. Theorem 1. Let ORL-CF run with duration parameter ρ > 0, confidence parameter δ > 0 and control numbers Di,t := 2 log(t|A|D/δ) (Ls(pi,t))2 , for i ∈D. Let Rinst(t) be the instantaneous regret at time t, which is the loss in expected reward at time t due to not selecting a∗(xt). Then, with probability at least 1 −δ, we have Rinst(t) ≤8L(s(pR(αt),t) + s(pR(a∗(xt)),t)), for all t ∈τ(T), and the total regret in exploitation steps is bounded above by RI(T) ≤8L X t∈τ(T ) (s(pR(αt),t + s(pR(a∗(xt)),t)) ≤16L22ρT ρ/(1+ρ), for arbitrary context vectors x1, x2, . . . , xT . Theorem 1 provides both context arrival process dependent and worst case bounds on the exploitation regret of ORL-CF. By choosing ρ arbitrarily close to zero, RI(T) can be made O(T γ) for any γ > 0. While this is true, the reduction in regret for smaller ρ not only comes from increased accuracy, but it is also due to the reduction in the number of time steps in which ORL-CF exploits, i.e., |τ(T)|. By definition time t is an exploitation step if Si,j t (pi,t, pj,t, a) ≥ 2 log(t|A|D/δ) L2 min{s(pi,t)2, s(pj,t)2} = 22 max{l(pi,t),l(pj,t)}+1 log(t|A|D/δ) L2 , for all q = (pi,t, pj,t) ∈Qt, i, j ∈D. This implies that for any q ∈Qi,t which has the interval with maximum level equal to l, ˜O(22l) explorations are required before any exploitation can take place. Since the time a level l interval can stay active is 2ρl, it is required that ρ ≥2 so that τ(T) is nonempty. The next theorem gives a bound on the regret of ORL-CF in exploration steps. 6 Theorem 2. Let ORL-CF run with ρ, δ and Di,t, i ∈D values as stated in Theorem 1. Then, RO(T) ≤960D2(cO + 1) log(T|A|D/δ) 7L2 T 4/ρ + 64D2(cO + 1) 3 T 2/ρ, with probability 1, for arbitrary context vectors x1, x2, . . . , xT . Based on the choice of the duration parameter ρ, which determines how long an interval will stay active, it is possible to get different regret bounds for explorations and exploitations. Any ρ > 4 will give a sublinear regret bound for both explorations and exploitations. The regret in exploitations increases in ρ while the regret in explorations decreases in ρ. Theorem 3. Let ORL-CF run with δ and Di,t, i ∈D values as stated in Theorem 1 and ρ = 2+2 √ 2. Then, the time order of exploration and exploitation regrets are balanced up to logaritmic orders. With probability at least 1 −δ we have both RI(T) = ˜O(T 2/(1+ √ 2)) and RO(T) = ˜O(T 2/(1+ √ 2)) . Remark 1. Prior work on contextual bandits focused on balancing the regret due to exploration and exploitation. For example in [1, 2], for a D-dimensional context vector algorithms are shown to achieve ˜O(T (D+1)/(D+2)) regret.6 Also in [1] a O(T (D+1)/(D+2)) lower bound on the regret is proved. An interesting question is to find the tightest lower bound for contextual bandits with relevance function. One trivial lower bound is O(T 2/3), which corresponds to D = 1. However, since finding the action with the highest expected reward for a context vector requires comparisons of estimated rewards of actions with different relevant types, which requires accurate sample mean reward estimates for 2 dimensions of the context space corresponding to those types, we conjecture that a tighter lower bound is O(T 3/4). Proving this is left as future work. Another interesting case is when actions with suboptimality greater than ϵ > 0 must never be chosen in any exploitation step by time T. When such a condition is imposed, ORL-CF can start with partitions Pi,1 that have sets with high levels such that it explores more at the beginning to have more accurate reward estimates before any exploitation. The following theorem gives the regret bound of ORL-CF for this case. Theorem 4. Let ORL-CF run with duration parameter ρ > 0, confidence parameter δ > 0, control numbers Di,t := 2 log(t|A|D/δ) (Ls(pi,t))2 , and with initial partitions Pi,1, i ∈D consisting of intervals of length lmin = ⌈log2(3L/(2ϵ))⌉. Then, with probability 1 −δ, Rinst(t) ≤ϵ for all t ∈τ(T), RI(T) ≤16L22ρT ρ/(1+ρ) and RO(T) ≤81L4 ϵ4 960D2(cO + 1) log(T|A|D/δ) 7L2 T 4/ρ + 64D2(cO + 1) 3 T 2/ρ  , for arbitrary context vectors x1, x2, . . . , xT . Bounds on RI(T) and RO(T) are balanced for ρ = 2 + 2 √ 2. 3.3 Future Work In this paper we only considered the relevance relations that are functions. Similar learning methods can be developed for more general relevance relations such as the ones given in Fig. 1 (i) and (ii). For example, for the general case in Fig. 1 (i), if |R(a)| ≤Drel << D, for all a ∈A, and Drel is known by the learner, the following variant of ORL-CF can be used to achieve regret whose time order depends only on Drel but not on D. • Instead of keeping pairwise sample mean reward estimates, keep sample mean reward estimates of actions for Drel + 1 tuples of intervals of Drel + 1 types. • For a Drel tuple of types i, let Qi,t be the Drel + 1 tuples of intervals that are related to i at time t, and Qt be the union of Qi,t over all Drel tuples of types. Similar to ORL-CF, compute the set of under-explored actions Ui,t, and the set of candidate relevant Drel tuples of types Relt(a), using the newly defined sample mean reward estimates. 6The results are shown in terms of the covering dimension which reduces to Euclidian dimension for our problem. 7 • In exploitation, set ˆct(a) to be the Drel tuple of types with the minimax variation, where the variation of action a for a tuple i is defined similar to (5), as the maximum of the distance between the sample mean rewards of action a for Drel+1 tuples that are in Qi,t. Another interesting case is when the relevance relation is linear as given in Fig. 1 (ii). For example, for action a if there is a type i that is much more relevant compared to other types j ∈D−i, i.e., wa,i >> wa,j, where the weights wa,i are given in Fig. 1, then ORL-CF is expected to have good performance (but not sublinear regret with respect to the benchmark that knows R). 4 Related Work Contextual bandit problems are studied by many others in the past [3, 4, 1, 2, 5, 6]. The problem we consider in this paper is a special case of the Lipschitz contextual bandit problem [1, 2], where the only assumption is the existence of a known similarity metric between the expected rewards of actions for different contexts. It is known that the lower bound on regret for this problem is O(T (D+1)/(D+2)) [1], and there exists algorithms that achieve ˜O(T (D+1)/(D+2)) regret [1, 2]. Compared to the prior work above, ORL-CF only needs to observe rewards in explorations and has a regret whose time order is independent of D. Hence it can still learn the optimal actions fast enough in settings where observations are costly and context vector is high dimensional. Examples of related works that consider limited observations are KWIK learning [7, 8] and label efficient learning [9, 10, 11]. For example, [8] considers a bandit model where the reward function comes from a parameterized family of functions and gives bound on the average regret. An online prediction problem is considered in [9, 10, 11], where the predictor (action) lies in a class of linear predictors. The benchmark of the context is the best linear predictor. This restriction plays a crucial role in deriving regret bounds whose time order does not depend on D. Similar to these works, ORL-CF can guarantee with a high probability that actions with large suboptimalities will never be selected in exploitation steps. However, we do not have any assumptions on the form of the expected reward function other than the Lipschitz continuity and that it depends on a single type for each action. In [12] graphical bandits are proposed where the learner takes an action vector a which includes actions from several types that consitute a type set T . The expected reward of a for context vector x can be decomposed into sum of reward functions each of which only depends on a subset of D ∪T . However, it is assumed that the form of decomposition is known but the functions are not known. Another work [13] proposes a fast learning algorithm for an i.i.d. contextual bandit problem in which the rewards for contexts and actions are sampled from a joint probability distribution. In this work the authors consider learning the best policy from a finite set of policies with oracle access, and prove a regret bound of O( √ T) which is also logarithmic in the size of the policy space. In contrast, in our problem (i) contexts arrive according to an arbitrary exogenous process, and the action rewards are sampled from an i.i.d. distribution given the context value, (ii) the set of policies that the learner can adopt is not restricted. Large dimensional action spaces, where the rewards depend on a subset of the types of actions are considered in [14] and [15]. [14] considers the problem when the reward is H¨older continuous in an unknown low-dimensional tuple of types, and uses a special discretization of the action space to achieve dimension independent bounds on the regret. This discretization can be effectively used since the learner can select the actions, as opposed to our case where the learner does not have any control over contexts. [15] considers the problem of optimizing high dimensional functions that have an unknown low dimensional structure from noisy observations. 5 Conclusion In this paper we formalized the problem of learning the best action through learning the relevance relation between types of contexts and actions. For the case when the relevance relation is a function, we proposed an algorithm that (i) has sublinear regret with time order independent of D, (ii) only requires reward observations in explorations, (iii) for any ϵ > 0, does not select any ϵ suboptimal actions in exploitations with a high probability. In the future we will extend our results to the linear and general relevance relations illustrated in Fig. 1. 8 References [1] T. Lu, D. P´al, and M. P´al, “Contextual multi-armed bandits,” in International Conference on Artificial Intelligence and Statistics (AISTATS), 2010, pp. 485–492. [2] A. Slivkins, “Contextual bandits with similarity information,” in Conference on Learning Theory (COLT), 2011. [3] E. Hazan and N. Megiddo, “Online learning with prior knowledge,” in Learning Theory. Springer, 2007, pp. 499–513. [4] J. Langford and T. Zhang, “The epoch-greedy algorithm for contextual multi-armed bandits,” Advances in Neural Information Processing Systems (NIPS), vol. 20, pp. 1096–1103, 2007. [5] W. Chu, L. Li, L. Reyzin, and R. E. Schapire, “Contextual bandits with linear payoff functions,” in International Conference on Artificial Intelligence and Statistics (AISTATS), 2011, pp. 208– 214. [6] M. Dudik, D. Hsu, S. Kale, N. Karampatziakis, J. Langford, L. Reyzin, and T. Zhang, “Efficient optimal learning for contextual bandits,” arXiv preprint arXiv:1106.2369, 2011. [7] L. Li, M. L. Littman, T. J. Walsh, and A. L. Strehl, “Knows what it knows: a framework for self-aware learning,” Machine Learning, vol. 82, no. 3, pp. 399–443, 2011. [8] K. Amin, M. Kearns, M. Draief, and J. D. Abernethy, “Large-scale bandit problems and KWIK learning,” in International Conference on Machine Learning (ICML), 2013, pp. 588–596. [9] N. Cesa-Bianchi, C. Gentile, and F. Orabona, “Robust bounds for classification via selective sampling,” in International Conference on Machine Learning (ICML), 2009, pp. 121–128. [10] S. M. Kakade, S. Shalev-Shwartz, and A. Tewari, “Efficient bandit algorithms for online multiclass prediction,” in International Conference on Machine Learning (ICML), 2008, pp. 440– 447. [11] E. Hazan and S. Kale, “Newtron: an efficient bandit algorithm for online multiclass prediction.” in Advances in Neural Information Processing Systems (NIPS), 2011, pp. 891–899. [12] K. Amin, M. Kearns, and U. Syed, “Graphical models for bandit problems,” in Conference on Uncertainty in Artificial Intelligence (UAI), 2011. [13] A. Agarwal, D. Hsu, S. Kale, J. Langford, L. Li, and R. E. Schapire, “Taming the monster: A fast and simple algorithm for contextual bandits,” arXiv preprint arXiv:1402.0555, 2014. [14] H. Tyagi and B. Gartner, “Continuum armed bandit problem of few variables in high dimensions,” in Workshop on Approximation and Online Algorithms (WAOA), 2014, pp. 108–119. [15] J. Djolonga, A. Krause, and V. Cevher, “High-dimensional Gaussian process bandits,” in Advances in Neural Information Processing Systems (NIPS), 2013, pp. 1025–1033. 9
2014
255
5,353
Stochastic Network Design in Bidirected Trees Xiaojian Wu1 Daniel Sheldon1,2 Shlomo Zilberstein1 1 School of Computer Science, University of Massachusetts Amherst 2 Department of Computer Science, Mount Holyoke College Abstract We investigate the problem of stochastic network design in bidirected trees. In this problem, an underlying phenomenon (e.g., a behavior, rumor, or disease) starts at multiple sources in a tree and spreads in both directions along its edges. Actions can be taken to increase the probability of propagation on edges, and the goal is to maximize the total amount of spread away from all sources. Our main result is a rounded dynamic programming approach that leads to a fully polynomial-time approximation scheme (FPTAS), that is, an algorithm that can find (1−ϵ)-optimal solutions for any problem instance in time polynomial in the input size and 1/ϵ. Our algorithm outperforms competing approaches on a motivating problem from computational sustainability to remove barriers in river networks to restore the health of aquatic ecosystems. 1 Introduction Many planning problems from diverse areas such as urban planning, social networks, and transportation can be cast as stochastic network design, where the goal is to take actions to enhance connectivity in a network with some stochastic element [1–8]. In this paper we consider a simple and widely applicable model where a stochastic network G′ is obtained by flipping an independent coin for each edge of a directed host graph G = (V, E) to determine whether it is included in G′. The planner collects reward rst for each pair of vertices s, t ∈V that are connected by a directed path in G′. Actions are available to increase the probabilities of individual edges for some cost, and the goal is to maximize the total expected reward subject to a budget constraint. Stochastic network design generalizes several existing problems related to spreading phenomena in networks, including the well known influence maximization problem. Specifically, the coin-flipping process captures the live-edge characterization of the Independent Cascade model [7], in which the presence of edge (u, v) in G′ allows influence (e.g., behavior, disease, or some other spreading phenomenon) to propagate from u to v. Influence maximization seeks a seed set S of at most k nodes to maximize the expected number of nodes reachable from S, which is easily modeled within our model by assigning appropriate rewards and actions. The framework also captures more complex problems with actions that increase edge probabilities—a setup that proved useful in various computational sustainability problems aimed to restore habitat or remove barriers in landscape networks to facilitate the spread and conserve a target species [4–6, 8]. The stochastic network design problem in its general form is intractable. It includes influence maximization as a special case and is thus NP-hard to approximate within a ratio of 1 −1/e + ϵ for any ϵ > 0 [7], and it is #P-hard to compute the objective function under fixed probabilities [9, 10]. Unlike the influence maximization problem, which is a monotone submodular maximization problem and thus admits a greedy (1 −1/e)-approximation algorithm, the general problem is not submodular [6]. Previous problems in this class were solved by a combination of techniques including the sample average approximation, mixed integer programming, dual decomposition, and primal-dual heuristics [6, 11–13], none of which provide both scalable running-time and optimality guarantees. 1 It is therefore of great interest to design efficient algorithms with provable approximation guarantees for restricted classes of stochastic network design. Wu, Sheldon, and Zilberstein [8] recently showed that the special case in which G is a directed tree where influence flows away from the root (i.e., rewards are non-zero only for paths originating at the root) admits a fully polynomial-time approximation scheme (FPTAS). Their algorithm—rounded dynamic programming (RDP)—is based on recursion over rooted subtrees. Their work was motivated by the upstream barrier removal problem in river networks [5], in which migratory fish such as salmon swim upstream from the root (ocean) of a river network attempting to access upstream spawning habitat, but are blocked by barriers such as dams along the way. Actions are taken to remove or repair barriers and thus increase the probability fish can pass and therefore utilize a greater amount of their historical spawning habitat. In this paper, we investigate the harder problem of stochastic network design in a bidirected tree, motivated by a novel conservation planning problem we term bidirectional barrier removal. The goal is to remove barriers to facilitate point-to-point movement in river networks. This applies to the much broader class of resident (non-migratory) fish species whose populations and gene-flow are threatened by dams and smaller river barriers (e.g., culverts) [14]. Replacing or retrofitting barriers with passage structures is a key conservation priority [15, 16]. However, stochastic network design in a bidirected tree is apparently much harder than in a directed tree. Since spread originates at all vertices instead of a designated root and edges may have different probabilities in each direction, it is not obvious how computations can be structured in a recursive fashion as in [8]. Our main contribution is a novel RDP algorithm for stochastic network design in bidirected trees and a proof that it is an FPTAS—in particular, it computes (1 −ϵ)-optimal solutions in time O(n8/ϵ6). To derive the new RDP algorithm, we first show in Section 3 that the computation can be structured recursively despite the lack of a fixed orientation to the tree by choosing an arbitrary orientation and using a more nuanced dynamic programming algorithm. However, this algorithm does not run in polynomial time. In Section 4, we apply a rounding scheme and then prove in Section 5 that this leads to a polynomial-time algorithm with the desired optimality guarantee. However, the running time of O(n8/ϵ6) limits scalability in practice, so in Section 6 we describe an adaptive-rounding version of the algorithm that is much more efficient. Finally, we show that RDP significantly outperforms competing algorithms on the bidirectional barrier removal problem in real river networks. 2 Problem Definition The input to the stochastic network design problem consists of a bidirected tree T = (V, E) with probabilities puv assigned to each directed edge (u, v) ∈E. A finite set of possible repair actions Au,v = Av,u is associated with each bidirected edge {u, v}; action a ∈Au,v has cost cuv,a and, if taken, simultaneously increases the two directed edge probabilities to puv|a and pvu|a. We assume that Au,v contains a default zero-cost “noop” action a0 such that puv|a0 = puv and pvu|a0 = pvu. A policy π selects an action π(u, v)—either a repair action or a noop—for each bidirected edge. We write puv|π := puv|π(u,v) for the probability of edge (u, v) under policy π. In addition to the edge probabilities, a non-negative reward rs,t is specified for each pair of vertices s, t ∈V . Given a policy π, the s-t accessibility ps⇝t|π is the product of all edge probabilities on the unique path from s to t, which is the probability that s retains a path to t in the subgraph T ′ where each edge is present independently with probability puv|π. The total expected reward for policy π is z(π) = P s,t∈V rs,t ps⇝t|π. Our goal is to find a policy that maximizes z(π) subject to a budget b limiting the total cost c(π) of the actions being taken. Hence, the resulting policy satisfies π∗∈ arg max{π|c(π)≤b} z(π). In this work, we will assume that the rewards factor as rs,t = hsht, which is useful for our dynamic programming approach and consistent with several widely used metrics. For example, network resilience [17] is defined as the expected number of node-pairs that can communicate after random component failures, which is captured in our framework by setting rs,t = hs = ht = 1. Network resilience is a general model of connectivity that can apply in diverse complex network settings. The ecological measure of probability of connectivity (PC) [18], which was the original motivation of our formulation, can also be expressed using factored rewards. PC is widely used in ecology and conservation planning and is implemented in the Conefor software, which is the basis of many planning applications [19]. A precise definition of PC appears below. 2 u w x v u w v x A B C A C B Figure 1: Left: sample river network with barriers A, B, C and contiguous regions u, v, w, x. Right: corresponding bidirected tree. Barrier Removal Problem Fig. 1 illustrates the bidirectional barrier removal problem in river networks and its mapping to stochastic network design in a bidirected tree. A river network is a tree with edges that represent stream segments and nodes that represent either stream junctions or barriers that divide segments. Fish begin in each segment and can swim freely between adjacent segments, but can only pass a barrier with a specified passage probability or passability in each direction; in most cases, downstream passability is higher than upstream passability. To map this problem to stochastic network design, we create a bidirected tree T = (V, E) where each node v ∈V represents a contiguous region of the river network—i.e., a connected set of stream segments among which fish can move freely without passing any barriers—and the value hv is equal to the total amount of habitat in that region (e.g., the total length of all segments). Each barrier then becomes a bidirected edge that connects two regions, with the passage probabilities in the upstream and downstream directions assigned to the corresponding directed edges. It is easy to see that T retains a tree structure. Our objective function z(π) is motivated by PC introduced above. It is defined as follows: PC(π) = z(π) R = P s∈S P t∈S rs,tps⇝t|π R (1) where R = P s,t hsht is a normalization constant. When hv is the amount of suitable habitat in region v, PC(π) is the probability that a fish placed at a starting point chosen uniformly at random from suitable habitat (so that a point in region s is chosen with probability proportional to hs) can reach a random target point also chosen uniformly at random by passing each barrier in between. In the rest of the paper, we present algorithms for solving this problem and their theoretical analysis that generalize the rounded DP approach introduced in [8]. 3 Dynamic Programming Algorithm Given a bidirected tree T , we present a divide-and-conquer method to evaluate a policy π and a dynamic programming algorithm to optimize the policy. We use the fact that given an arbitrary root, any bidirected tree T can be viewed as a rooted tree in which each vertex u has corresponding children and subtrees. To simplify our algorithm and proofs, we make the following assumption. Assumption 1. Each vertex in the rooted tree has at most two children. Any problem instance can be converted into one that satisfies this assumption by replacing any vertex u with more than two children by a sequence of internal vertices with exactly two children. The original edges are attached to the original children of u and the added edges have probabilities 1. In the modified tree, u has two children and its habitat is split equally among u and the newly added vertices. The resulting binary tree has at most twice as many vertices as the original one. Most importantly, a policy for the modified tree can be trivially mapped to a unique policy for the original tree with the same expected reward. Evaluating A Fixed Policy Using Divide and Conquer To evaluate a fixed policy π, we use a divide and conquer method that recursively computes a tuple of three values per subtree. Let v and w be the children of u. The tuple of the subtree Tu rooted at u can be calculated using the tuples of subtrees Tv and Tw. Once the tuple of Troot = T , is calculated, we can extract the total expected reward from that tuple. Now, given a policy π, we define the tuple of Tu as ψu(π) = (νu(π), µu(π), zu(π)), where • νu(π) = P t∈Tu pu⇝t|πht is the sum of the s-t accessibilities of all paths from u to t ∈Tu, each of which is weighted by the habitat ht of its ending vertex t. • µu(π) = P s∈Tu ps⇝u|πhs is the sum of the s-t accessibilities of all paths from s ∈Tu to u, each of which is weighted by the habitat hs of its departing vertex s. • zu(π) = P s∈Tu P t∈Tu ps⇝t|πrs,t (rs,t = hsht) represents the total expected reward that a fish obtains by following paths with both starting and ending vertices in Tu. 3 The tuple ψu(π) is calculated recursively using ψv(π) and ψw(π). To calculate νu(π), we note that a path from u to a vertex in Tu\{u} is the concatenation of either the edge (u, v) with a path from v to Tv or the edge (u, w) with a path from w to Tw, that is, νu(π) can be written as X t∈Tv puv|πpv⇝t|πht + X t∈Tw puw|πpw⇝t|πht + hu = puv|πνv(π) + puw|πνw(π) + hu (2) Similarly, µu(π) = X s∈Tv ps⇝v|πpvu|πhs + X s∈Tw ps⇝w|πpwu|πhs + hu = pvu|πµv(π) + pwu|πµw(π) + hu (3) By dividing the reward from paths that start and end in Tu based on their start and end nodes, we can express zu(π) as follows: zu(π) = zv(π)+zw(π)+µv(π)pv⇝w|πνw(π)+µw(π)pw⇝v|πνv(π)+huνu(π)+huµu(π)−h2 u (4) The first two terms describe paths that start and end within a single subtree—either Tv or Tw. The third and fourth terms describe paths that start in Tv and end in Tw or vice versa. The last three terms describe paths that start or end at u, with an adjustment to avoid double-counting the trivial path that starts and ends at u. That way, all tuples can be evaluated with one pass from the leaves to the root and each vertex is only visited once. At the root, zroot(π) is the expected reward of policy π. Dynamic Programming Algorithm We introduce a DP algorithm to compute the optimal policy. Let subpolicy πu be the part of the full policy that defines actions for barriers within Tu. In the DP algorithm, each subtree Tu maintains a list of tuples ψ that are reachable by some subpolicies and each tuple is associated with a least-cost subpolicy, that is, π∗ u ∈arg min{πu|ψu(πu)=ψ} c(πu). Let v and w be two children of u. We recursively generate the list of reachable tuples and the associated least-cost subpolicies using the tuples of v and w. To do this, for each ψv, ψw, we first extract the corresponding π∗ v and π∗ w. Then, using these two least-cost subpolicies of the children, for each a ∈Auv and a′ ∈Auw, a new subpolicy πu is constructed for Tu with cost c(πu) = cuv,a + cuw,a′ + c(π∗ v) + c(π∗ w). Using Eqs. (2), (3) and (4), the tuple ψu(πu) of πu is calculated. If ψu(πu) already exists in the list (i.e., ψu(πu) was created by some other previously constructed subpolicies), we update the associated subpolicy such that only the minimum cost subpolicy is kept. If not, we add this tuple ψu(πu) and subpolicy πu to the list. To initialize the recurrence, the list of a leaf subtree contains only a single tuple (hu, hu, h2 u) associated with an empty subpolicy. Once the list of Troot is calculated, we scan the list to pick a pair (ψ∗ root, π∗) such that (ψ∗ root, π∗) ∈arg max{(ψroot,π)|c(π)≤b} zroot where zroot is the third element of ψroot. Finally, π∗is the returned optimal policy and z∗ root is the optimal expected reward. 4 Rounded Dynamic Programming The DP algorithm is not a polynomial-time algorithm because the number of reachable tuples increases exponentially as we approach the root. In this section, we modify the DP algorithm into a FPTAS algorithm. The basic idea is to discretize the continuous space of ψu at each vertex such that there only exists a polynomial number of different tuples. To do this, the three dimensions are discretized using granularity factors Kν u, Kµ u and Kz u respectively such that the space is divided into a finite number of cubes with volume Kν u × Kµ u × Kz u. For any subpolicy πu of u in the discretized space, there is a rounded tuple ˆψu(πu) = (ˆνu(πu), ˆµu(πu), ˆzu(πu)) to underestimate the true tuple ψu(πu) of πu. To evaluate ˆψu(πu), we use the same recurrences as (2), (3) and (4), but rounding each intermediate value into a value in the discretized space. The recurrences are as follow: ˆνsum u (πu) = puv|πu ˆνv(πu)+puw|πu ˆνw(πu)+hu ˆµsum u (πu) = pvu|πu ˆµv(πu)+pwu|πu ˆµw(πu)+hu ˆνu(πu) = Kν u  ˆνsum u (πu) Kνu  ˆµu(πu) = Kµ u  ˆµsum u (πu) Kµ u  (5) 4 ˆzu(πu) = Kz u· (6)  ˆzv(πu)+ˆzw(πu)+ˆµv(πu)pv⇝w|πu ˆνw(πu)+ˆµw(πu)pw⇝v|πu ˆνv(πu)+huˆµsum u (πu)+huˆνsum u (πu)−h2 u Kzu  The modified algorithm—rounded dynamic programming (RDP)—is the same as the DP algorithm, except that it works in the discretized space. Specifically, each vertex maintains a list of reachable rounded tuples ˆψu, each one associated with a least costly subpolicy achieving ˆψu, that is, π∗ u ∈ arg min{πu| ˆ ψu(πu)= ˆ ψu} c(πu). Similarly to our DP algorithm, we generate the list of reachable tuples for each vertex using its children’s lists of tuples. The difference is that to calculate the rounded tuple of a new subpolicy we use recurrences (5) and (6) instead of (2), (3) and (4). 5 Theoretical Analysis We now turn to the main theoretical result: Theorem 1. RDP is a FPTAS. Specifically, let OPT be the value of the optimal policy. Then, RDP can compute a policy with value at least (1 −ϵ)OPT in time bounded by O( n8 ϵ6 ). Approximation Guarantee Let π∗be the optimal policy and let π′ be the policy returned by RDP. We bound the value loss z(π∗) −z(π′) by bounding the distance of the true tuple ψ(π) and the rounded tuple ˆψ(π) for an arbitrary policy π. In Eqs. (5) and (6), starting from leaf vertices, each rounding operation introduces an error at most K· u where · represents ν, µ and z. For ν, starting from u, each vertex t ∈Tu introduces error Kν t by using the rounding operation. The error is discounted by the accessibility from u to t. For µ, each vertex s ∈Tu introduces error Kµ s , discounted in the same way. The total error is equal to the sum of all discounted errors. Finally, we get the following result by setting Kν u = ϵ 3hu, Kµ u = ϵ 3hu, Kz u = ϵ 3h2 u (7) Lemma 1. If condition (7) holds, then for all u ∈V and an arbitrary policy π: νu(π) −ˆνu(π) ≤ X t∈Tu pu⇝t|πKν t = ϵ 3 X t∈Tu pu⇝t|πht = ϵ 3νu(π) (8) µu(π) −ˆµu(π) ≤ X s∈Tu ps⇝u|πKµ s = ϵ 3 X s∈Tu ps⇝u|πhs = ϵ 3µu(π) (9) The difference of z(π) −ˆz(π) is bounded by the following lemma. Lemma 2. If condition (7) holds, z(π) −ˆz(π) ≤ϵz(π) for an arbitrary policy π. The proof by induction on the tree appears in the supplementary material. Theorem 2. Let π∗and π′ be the optimal policy and the policy return by RDP respectively. Then, if condition (7) holds, we have z(π∗) −z(π′) ≤ϵz(π∗). Proof. By Lemma 2, we have z(π∗)−ˆz(π∗) ≤ϵz(π∗). Furthermore, z(π′) ≥ˆz(π′) ≥ˆz(π∗) where the second inequality holds because π′ is the optimal policy with respect to the rounded policy value. Therefore, we have z(π∗) −z(π′) ≤z(π∗) −ˆz(π∗) which proves the theorem. Runtime Analysis Now, we derive the runtime result of Theorem 1, that is, if condition (7) holds, the runtime of RDP is bounded by O( n8 ϵ6 ). First, it is reasonable to make the following assumption: Assumption 2. The value hu is constant with respect to n and ϵ for each u ∈V . Let mu,ˆν, mu,ˆµ and mu,ˆz be the number of different values for ˆνu, ˆµu and ˆzu respectively in the rounded value space of u. Lemma 3. If condition (7) holds, then mu,ˆν = O nu ϵ  , mu,ˆµ = O nu ϵ  , mu,ˆz = O n2 u ϵ  (10) for all u ∈V where nu is the number of vertices in subtree Tu. 5 Proof. The number mu,ˆν is bounded by P t∈Tu ht Kν u where P t∈Tu ht is a naive and loose upper bound of νu obtained assuming all passabilities of streams in Tu are 1.0. By Assumption (2), mu,ˆν = O( nu ϵ ). The upper bound of mu,ˆµ can be similarly derived. Assuming all passabilities are 1.0, the upper bound of zu is P s∈Tu P t∈Tu hsht. Therefore, mu,ˆz ≤ P s∈Tu P t∈Tu hsht Kzu = O( n2 u ϵ ) Recall that RDP works by recursively calculating the list of reachable rounded tuples and associated least costly subpolicy. Using Lemma 3, we get the following main result: Theorem 3. If condition (7) holds, the runtime of RDP is bounded by O( n8 ϵ6 ). Proof. Let T(n) be the maximum runtime of RDP for any subtree with n vertices. In RDP, for vertex u with children v and w, we compute the list and associated subpolicies by iterating over all combinations of ˆψv and ˆψw. For each combination, we iterate over all available action combinations auv ∈Auv and auw ∈Auw, which takes constant time because the number of available repair actions are constant w.r.t. n and ϵ. Therefore, we can bound T(n) using the following recurrence: T(nu)=O(mv,ˆνmv,ˆµmv,ˆzmw,ˆνmw,ˆµmw,ˆz) + T(nv) + T(nw) ≤cn4 vn4 w ϵ6 + T(nv) + T(nw) ≤ max 0≤k≤(nu−1) ck4(nu −k −1)4 ϵ6 + T(k) + T(nu −k −1) where nu = 1 + nv + nw as Tu consists of u, Tv and Tw. The second inequality is due to Lemma 3. The third inequality is obtained by a change of variable. We prove that T(n) ≤c n8 ϵ6 using induction. For the base case n = 0, we have T(n) = 0 and for the base case n = 1, the subtree only contains one vertex, so T(n) = c. Now assume that T(k) ≤c k8 ϵ6 for all k < n. Then one can show that T(n) ≤ max 0≤k≤(n−1) c ϵ6 k4(n −k −1)4 + k8 + (n −k −1)8 ≤cn8 ϵ6 (11) and thus the theorem holds. A detailed justification of the final inequality appears in the supplementary material. 6 Algorithm Implementation and Experiments The theoretical results suggest that the RDP approach may be impractical for large networks. However, we can accelerate the algorithm and produce high quality solutions by making some changes, motivated by observations from our initial experiments. First, the theoretical runtime upper bound is much worse than the actual runtime of RDP because in practice, because the number of reachable tuples per vertex is much lower than the upper bounds of mu,ˆν mu,ˆµ and mu,ˆz used in the proof. Moreover, some inequalities used in Section 5 are very loose; most of the rounding operations in fact produce much less error than the upper bound K· u. Therefore, we can set the values of K· u much larger than the theoretical values without compromising the quality of approximation. Consequently, before calculating the list of reachable tuples of u, we first estimate the upper bound and lower bound of the reachable values of ˆνu, ˆµu and ˆzu using the list of tuples of its children. Then, we dynamically assign values to K· u by fixing the total number of different discrete values of ˆνu, ˆµu and ˆzu in the space, thereby determining the granularity of discretization. For example, if the upper and the lower bounds of ˆνu are 1000 and 500 respectively, and we want 10 different values, the value of Kν u is set to be 1000−500 10 = 50. By using a finer granularity of discretization, we get a slower algorithm but better solution quality. In our experiments, setting these numbers to be 50, 50 and 150 for ˆνu, ˆµu and ˆzu, the algorithm became very fast and we were able to get very good solution quality. We compared RDP with a greedy algorithm and a state-of-the-art algorithm for conservation planning, which uses sample average approximation and mixed integer programming (SAA+MIP) [4, 6, 11]. We initially considered two different greedy algorithms. One incrementally maximizes the increase of expected reward. The other incrementally maximizes the ratio between increase in expected reward and action cost. We found that the former performs better than the latter, so we 6 only report results for that version. We compare all three algorithms on small river networks. On large networks, we only compare RDP with the greedy algorithm because SAA+MIP fails to solve problems of that size. Figure 2: River networks in Massachusetts Dataset Our experiments use data from the CAPS project [20] for river networks in Massachusetts (Fig. 2). Barrier passabilities are calculated from barrier features using the model defined by the CAPS project. We created actions to model practical repair activities. For road-crossings, most passabilities start close to 1 and are cheap to repair relative to dams. To model this, we set Au,v ={a1}, puv|a1 =pvu|a1 =1.0 and cuv|a1 = 5. In contrast, it is difficult and expensive to remove dams, so multiple strategies must be considered to improve their passability. We created actions Au ={a1, a2, a3} with action a1 having puv|a1 =pvu|a1 =0.2 and cuv|a1 =20; action a2 having puv|a2 =pvu|a2 =0.5 and cuv|a2 =40; and action a3 having puv|a3 =pvu|a3 =1.0 and cuv|a3 =100. Results on Small Networks We compared SAA+MIP, RDP and Greedy on small river networks. SAA+MIP used 20 samples for the sample average approximation and IBM CPLEX on 12 CPU cores to solve the integer program. RDP1 used finer discretization than RDP2, therefore requiring longer runtime. The results in Table 1 show that RDP1 gives the best increase in expected reward (relative to a zero-cost policy) in most cases and RDP2 produces similarly good solutions, but takes less time. Although Greedy is extremely fast, it produces poor solutions on some networks. SAA+MIP gives better results than Greedy, but fails to scale up. For example, on a network with 781 segments and 604 barriers, SAA+MIP needs more than 16G of memory to construct the MIP. Number of ER Increase Runtime Segments Barriers SAA+MIP Greedy RDP1 RDP2 SAA+MIP Greedy RDP1 RDP2 106 36 3.7 4.1 4.1 4.0 3.3 0.0 0.7 0.4 101 71 4.0 3.6 4.3 4.3 19.5 0.0 2.5 1.2 163 91 11.3 11.2 12.3 12.1 42.3 0.0 13.6 6.8 263 289 20.7 11.1 25.3 24.8 1148.7 0.7 263.3 98.7 499 206 48.6 55.6 53.8 53.2 116.0 0.7 11.9 6.4 456 464 124.1 96.8 146.9 144.3 8393.5 0.7 359.9 142.0 639 609 51.8 25.8 53.7 51.6 12720.1 1.3 721.2 242.4 Table 1: Comparison of SAA, RDP and Greedy. Time is in seconds. Each unit of expected reward is 107 (square meters). “ER increase” means the increase in expected reward after taking the computed policy. Results on Large Networks We compared RDP and Greedy on a large network—the Connecticut River watershed, which has 10451 segments, 587 dams and 7545 crossings. We tested both algorithms on three different settings of action passabilities. 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 10 20 30 40 50 Budget ER Increase RDP1 RDP2 Greedy (a) Expected reward increase 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 1000 2000 3000 4000 5000 Budget Runtime RDP1 RDP2 Greedy (b) Runtime in seconds Figure 3: RDP vs Greedy on symmetric passabilities. Actions w/ symmetric passabilities In this experiment, we used the actions introduced above. The expected reward increase (Fig. 3a) and runtime (Fig. 3b) are plotted for different budgets. For the expected reward, each unit represents 1014 m2. Runtime is in seconds. As before, RDP1 uses finer discretization of tuple space than RDP2. As Fig. 3 shows, the RDP algorithms give much better solution quality than the greedy algorithm. With a budget of 20000, the ER increase of RDP1 is almost twice the increase for Greedy. Incidentally, RDP1 doesn’t improve the solution quality by much, but it takes much longer time to finish. Notice that both RDP1 and RDP2 use constant runtime because the number of discrete values in both settings are bounded. In contrast, the runtime of Greedy increases with the budget size and eventually exceeds RDP2’s runtime. 7 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 20 25 30 35 40 45 50 55 Budget ER Increase RDP Greedy (a) Expected reward increase 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 1000 1500 2000 2500 3000 3500 4000 Budget Runtime RDP Greedy (b) Runtime in seconds Figure 4: RDP vs Greedy on asymmetric passabilities with all downstream passabilities equal to 1. Actions with asymmetric passabilities The RDP algorithms work with asymmetric passabilities as well. For road-crossings, we set the actions to be the same as before. For dams, we first considered the case in which the downstream passabilities are all 1— which happens for some fish—and all upstream passabilities are the same as before. The results are shown in Figures 4a and 4b. In this case RDP still performs better than Greedy and tends to use less time as the budget increases. 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 10 15 20 25 30 35 40 45 50 55 Budget ER Increase RDP Greedy (a) Expected reward increase 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10 4 0.05 0.2 0.5 0.8 1.1 1.4 1.7 2 2.3 2.5x 10 4 Budget Runtime RDP Greedy (b) Runtime in seconds Figure 5: RDP vs Greedy on asymmetric passabilities with varying downstream passabilities. We also considered a hard case in which the downstream passabilities of a dam are given by pvu|a1 = 0.8, pvu|a2 = 0.9, and pvu|a3 = 1.0. These variations of passabilities produce more tuples in the discretized space. Our RDP algorithm still works well and produces better solutions than Greedy over a range of budgets as shown in Fig. 5a. As expected in such hard cases, RDP needs much more time than Greedy. However, obtaining high quality solutions to such complex conservation planning problems in a matter of hours makes the approach very valuable. 0 2000 4000 6000 0 5 10 15 20 25 Runtime ER Increase RDP Greedy Figure 6: Time/quality tradeoffs Time/Quailty Tradeoff Finally, we tested the time/quality tradeoff offered by RDP. The tradeoff is controlled by varying the level of discretization. We ran these experiments on the Connecticut River watershed using symmetric passabilities. Fig. 6 shows how runtime and expected reward grow as we refine the level of discretization. As we can see, in this case RDP converges quickly on high-quality results and exhibits the desired diminishing returns property of anytime algorithms—the quality gain is large initially and it diminishes as we continue to refine the discretization. 7 Conclusion We present an approximate algorithm that extends the rounded dynamic programming paradigm to stochastic network design in bidirected trees. The resulting RDP algorithm is designed to maximize connectivity in a river network by solving the bidirectional barrier removal problem—a hard conservation planning problem for which no scalable algorithms exist. We prove that RDP is an FPTAS, returning (1 −ϵ)-optimal solutions in polynomial time. However, its time complexity, O(n8/ϵ6), makes it hard to apply it to realistic river networks. We present an adaptive-rounding version of the algorithm that is much more efficient. We apply this adaptive rounding method to segments of river networks in Massachusetts, including the entire Connecticut River watershed. In these experiments, RDP outperforms both a baseline greedy algorithm and an SAA+MIP algorithm, which is a state-of-art technique for stochastic network design. Our new algorithm offers an effective tool to guide ecologists in hard conservation planning tasks that help preserve biodiversity and mitigate the impacts of barriers in river networks. In future work, we will examine additional applications of RDP and ways to relax the assumption that the underlying network is tree-structured. Acknowledgments This work has been partially supported by NSF grant IIS-1116917. 8 References [1] Srinivas Peeta, F. Sibel Salman, Dilek Gunnec, and Kannan Viswanath. Pre-disaster investment decisions for strengthening a highway network. Computers and Operations Research, 37(10):1708–1719, 2010. [2] Jean-Christophe Foltˆete, Xavier Girardet, and C´eline Clauzel. A methodological framework for the use of landscape graphs in land-use planning. Landscape and Urban Planning, 124:140–150, 2014. [3] Leandro R. Tambosi, Alexandre C. Martensen, Milton C. Ribeiro, and Jean P. Metzger. A framework to optimize biodiversity restoration efforts based on habitat amount and landscape connectivity. Restoration Ecology, 22(2):169–177, 2014. [4] Xiaojian Wu, Daniel Sheldon, and Shlomo Zilberstein. Stochastic network design for river networks. NIPS Workshop on Machine Learning for Sustainability, 2013. [5] Jesse Rush OHanley and David Tomberlin. Optimizing the removal of small fish passage barriers. Environmental Modeling & Assessment, 10(2):85–98, 2005. [6] Daniel Sheldon, Bistra Dilkina, Adam Elmachtoub, Ryan Finseth, Ashish Sabharwal, Jon Conrad, Carla Gomes, David Shmoys, William Allen, Ole Amundsen, and William Vaughan. Maximizing the spread of cascades using network design. In Proc. of the 26th Conference on Uncertainty in Artificial Intelligence (UAI), pages 517–526, 2010. [7] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In Proc. of the 9th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 137–146, 2003. [8] Xiaojian Wu, Daniel Sheldon, and Shlomo Zilberstein. Rounded dynamic programming for treestructured stochastic network design. Proc. of the 28th Conference on Artificial Intelligence (AAAI), 2014. [9] Wei Chen, Chi Wang, and Yajun Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In Proc. of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1029–1038, 2010. [10] Leslie G. Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(2):410–421, 1979. [11] Akshat Kumar, Xiaojian Wu, and Shlomo Zilberstein. Lagrangian relaxation techniques for scalable spatial conservation planning. In Proc. of the 26th AAAI Conference on Artificial Intelligence (AAAI), pages 309–315, 2012. [12] Shan Xue, Alan Fern, and Daniel Sheldon. Scheduling conservation designs via network cascade optimization. In Proc. of the 26th Conference on Artificial Intelligence (AAAI), pages 391–397, 2012. [13] Shan Xue, Alan Fern, and Daniel Sheldon. Dynamic resource allocation for optimizing population diffusion. In Proc. of the Conference on Artificial Intelligence and Statistics (AISTATS), 2014. [14] Benjamin H. Letcher, Keith H. Nislow, Jason A. Coombs, Matthew J. O’Donnell, and Todd L. Dubreuil. Population response to habitat fragmentation in a stream-dwelling brook trout population. PloS one, 2 (11):e1139, January 2007. [15] Alison A. Bowden. Towards a comprehensive strategy to recover river herring on the Atlantic seaboard: Lessons from Pacific salmon. ICES Journal of Marine Science, 2013. [16] Erik H. Martin and Colin D. Apse. Northeast aquatic connectivity: An assessment of dams on northeastern rivers. Technical report, The Nature Conservancy, Eastern Freshwater Program, 2011. [17] Charles J. Colbourn. Network resilience. SIAM Journal on Algebraic Discrete Methods, 8(3):404–409, 1987. [18] Santiago Saura and Luc´ıa Pascual-Hortal. A new habitat availability index to integrate connectivity in landscape conservation planning: Comparison with existing indices and application to a case study. Landscape and Urban Planning, 83:91–103, 2007. [19] Santiago Saura and Josep Torne. Conefor sensinode 2.2: A software package for quantifying the importance of habitat patches for landscape connectivity. Environmental Modelling & Software, 24(1):135–139, 2009. [20] Kevin McGarigal, Bradley W. Compton, Scott D. Jackson, Ethan Plunkett, Kasey Rolih, Theresa Portante, and Eduard Ene. Conservation assessment and prioritization system (CAPS). Technical report, Department of Environmental Conservation, Univ. of Massachusetts Amherst, 2011. 9
2014
256
5,354
Distributed Variational Inference in Sparse Gaussian Process Regression and Latent Variable Models Yarin Gal∗ Mark van der Wilk∗ University of Cambridge {yg279,mv310,cer54}@cam.ac.uk Carl E. Rasmussen Abstract Gaussian processes (GPs) are a powerful tool for probabilistic inference over functions. They have been applied to both regression and non-linear dimensionality reduction, and offer desirable properties such as uncertainty estimates, robustness to over-fitting, and principled ways for tuning hyper-parameters. However the scalability of these models to big datasets remains an active topic of research. We introduce a novel re-parametrisation of variational inference for sparse GP regression and latent variable models that allows for an efficient distributed algorithm. This is done by exploiting the decoupling of the data given the inducing points to re-formulate the evidence lower bound in a Map-Reduce setting. We show that the inference scales well with data and computational resources, while preserving a balanced distribution of the load among the nodes. We further demonstrate the utility in scaling Gaussian processes to big data. We show that GP performance improves with increasing amounts of data in regression (on flight data with 2 million records) and latent variable modelling (on MNIST). The results show that GPs perform better than many common models often used for big data. 1 Introduction Gaussian processes have been shown to be flexible models that are able to capture complicated structure, without succumbing to over-fitting. Sparse Gaussian process (GP) regression [Titsias, 2009] and the Bayesian Gaussian process latent variable model (GPLVM, Titsias and Lawrence [2010]) have been applied in many tasks, such as regression, density estimation, data imputation, and dimensionality reduction. However, the use of these models with big datasets has been limited by the scalability of the inference. For example, the use of the GPLVM with big datasets such as the ones used in continuous-space natural language disambiguation is quite cumbersome and challenging, and thus the model has largely been ignored in such communities. It is desirable to scale the models up to be able to handle large amounts of data. One approach is to spread computation across many nodes in a distributed implementation. Brockwell [2006]; Wilkinson [2005]; Asuncion et al. [2008], among others, have reasoned about the requirements such distributed algorithms should satisfy. The inference procedure should: 1. distribute the computational load evenly across nodes, 2. scale favourably with the number of nodes, 3. and have low overhead in the global steps. In this paper we scale sparse GP regression and latent variable modelling, presenting the first distributed inference algorithm for the models able to process datasets with millions of points. We derive a re-parametrisation of the variational inference proposed by Titsias [2009] and Titsias and Lawrence [2010], unifying the two, which allows us to perform inference using the original guarantees. This is achieved through the fact that conditioned on the inducing inputs, the data decouples and the variational parameters can be updated independently on different nodes, with the only communi∗Authors contributed equally to this work. 1 cation between nodes requiring constant time. This also allows the optimisation of the embeddings in the GPLVM to be done in parallel. We experimentally study the properties of the suggested inference showing that the inference scales well with data and computational resources, and showing that the inference running time scales inversely with computational power. We further demonstrate the practicality of the inference, inspecting load distribution over the nodes and comparing run-times to sequential implementations. We demonstrate the utility in scaling Gaussian processes to big data showing that GP performance improves with increasing amounts of data. We run regression experiments on 2008 US flight data with 2 million records and perform classification tests on MNIST using the latent variable model. We show that GPs perform better than many common models which are often used for big data. The proposed inference was implemented in Python using the Map-Reduce framework [Dean and Ghemawat, 2008] to work on multi-core architectures, and is available as an open-source package1. The full derivation of the inference is given in the supplementary material as well as additional experimental results (such as robustness tests to node failure by dropping out nodes at random). The open source software package contains an extensively documented implementation of the derivations, with references to the equations presented in the supplementary material for explanation. 2 Related Work Recent research carried out by Hensman et al. [2013] proposed stochastic variational inference (SVI, Hoffman et al. [2013]) to scale up sparse Gaussian process regression. Their method trained a Gaussian process using mini-batches, which allowed them to successfully learn from a dataset containing 700,000 points. Hensman et al. [2013] also note the applicability of SVI to GPLVMs and suggest that SVI for GP regression can be carried out in parallel. However SVI also has some undesirable properties. The variational marginal likelihood bound is less tight than the one proposed in Titsias [2009]. This is a consequence of representing the variational distribution over the inducing targets q(u) explicitly, instead of analytically deriving and marginalising the optimal form. Additionally SVI needs to explicitly optimise over q(u), which is not necessary when using the analytic optimal form. The noisy gradients produced by SVI also complicate optimisation; the inducing inputs need to be fixed in advance because of their strong correlation with the inducing targets, and additional optimiser-specific parameters, such as step-length, have to be introduced and fine-tuned by hand. Heuristics do exist, but these points can make SVI rather hard to work with. Our approach results in the same lower bound as presented in Titsias [2009], which averts the difficulties with the approach above, and enables us to scale GPLVMs as well. 3 The Gaussian Process Latent Variable Model and Sparse GP Regression We now briefly review the sparse Gaussian process regression model [Titsias, 2009] and the Gaussian process latent variable model (GPLVM) [Lawrence, 2005; Titsias and Lawrence, 2010], in terms of model structure and inference. 3.1 Sparse Gaussian Process Regression We consider the standard Gaussian process regression setting, where we aim to predict the output of some unknown function at new input locations, given a training set of n inputs {X1, . . . , Xn} and corresponding observations {Y1, . . . , Yn}. The observations consist of the latent function values {F1, . . . , Fn} corrupted by some i.i.d. Gaussian noise with precision β. This gives the following generative model2: F(Xi) ∼GP(0, k(X, X)), Yi ∼N(Fi, β−1I) For convenience, we collect the data in a matrix and denote single data points by subscripts. X ∈Rn×q, F ∈Rn×d, Y ∈Rn×d 1see http://github.com/markvdw/GParML 2We follow the definition of matrix normal distribution [Arnold, 1981]. For a full treatment of Gaussian Processes, see Rasmussen and Williams [2006]. 2 We can marginalise out the latent F analytically in order to find the predictive distribution and marginal likelihood. However, this consists of an inversion of an n×n matrix, thus requiring O(n3) time complexity, which is prohibitive for large datasets. To address this problem, many approximations have been developed which aim to summarise the behaviour of the regression function using a sparse set of m input-output pairs, instead of the entire dataset3. These input-output pairs are termed “inducing points” and are taken to be sufficient statistics for any predictions. Given the inducing inputs Z ∈Rm×q and targets u ∈Rm×d, predictions can be made in O(m3) time complexity: p(F ∗|X∗, Y ) ≈ Z N F ∗; k∗mK−1 mmu, k∗∗−k∗mK−1 mmkm∗  p(u|Y, X)du (3.1) where Kmm is the covariance between the m inducing inputs, and likewise for the other subscripts. Learning the function corresponds to inferring the posterior distribution over the inducing targets u. Predictions are then made by marginalising u out of equation 3.1. Efficiently learning the posterior over u requires an additional assumption to be made about the relationship between the training data and the inducing points, such as a deterministic link using only the conditional GP mean F = KnmK−1 mmu. This results in an overall computational complexity of O(nm2). Qui˜nonero-Candela and Rasmussen [2005] view this procedure as changing the prior to make inference more tractable, with Z as hyperparameters which can be tuned using optimisation. However, modifying the prior in response to training data has led to over-fitting. An alternative sparse approximation was introduced by Titsias [2009]. Here a variational distribution over u is introduced, with Z as variational parameters which tighten the corresponding evidence lower bound. This greatly reduces over-fitting, while retaining the improved computational complexity. It is this approximation which we further develop in this paper to give a distributed inference algorithm. A detailed derivation is given in section 3 of the supplementary material. 3.2 Gaussian Process Latent Variable Models The Gaussian process latent variable model (GPLVM) can be seen as an unsupervised version of the regression problem above. We aim to infer both the inputs, which are now latent, and the function mapping at the same time. This can be viewed as a non-linear generalisation of PCA [Lawrence, 2005]. The model set-up is identical to the regression case, only with a prior over the latents X. Xi ∼N(Xi; 0, I), F(Xi) ∼GP(0, k(X, X)), Yi ∼N(Fi, β−1I) A Variational Bayes approximation for this model has been developed by Titsias and Lawrence [2010] using similar techniques as for variational sparse GPs. In fact, the sparse GP can be seen as a special case of the GPLVM where the inputs are given zero variance. The main task in deriving approximate inference revolves around finding a variational lower bound to: p(Y ) = Z p(Y |F)p(F|X)p(X)d(F, X) Which leads to a Gaussian approximation to the posterior q(X) ≈p(X|Y ), explained in detail in section 4 of the supplementary material. In the next section we derive a distributed inference scheme for both models following a re-parametrisation of the derivations of Titsias [2009]. 4 Distributed Inference We now exploit the conditional independence of the data given the inducing points to derive a distributed inference scheme for both the sparse GP model and the GPLVM, which will allow us to easily scale these models to large datasets. The key equations are given below, with an in-depth explanation given in sections sections 3 and 4 of the supplementary material. We present a unifying derivation of the inference procedures for both the regression case and the latent variable modelling (LVM) case, by identifying that the explicit inputs in the regression case are identical to the latent inputs in the LVM case when their mean is set to the observed inputs and used with variance 0 (i.e. the latent inputs are fixed and not optimised). We start with the general expression for the log marginal likelihood of the sparse GP regression model, after introducing the inducing points, 3See Qui˜nonero-Candela and Rasmussen [2005] for a comprehensive review. 3 log p(Y |X) = log Z p(Y |F)p(F|X, u)p(u)d(u, F). The LVM derivation encapsulates this expression by multiplying with the prior over X and then marginalising over X: log p(Y ) = log Z p(Y |F)p(F|X, u)p(u)p(X)d(u, F, X). We then introduce a free-form variational distribution q(u) over the inducing points, and another over X (where in the regression case, p(X)’s and q(X)’s variance is set to 0 and their mean set to X). Using Jensen’s inequality we get the following lower bound: log p(Y |X) ≥ Z p(F|X, u)q(u) log p(Y |F)p(u) q(u) d(u, F) = Z q(u) Z p(F|X, u) log p(Y |F)d(F) + log p(u) q(u)  d(u) (4.1) all distributions that involve u also depend on Z which we have omitted for brevity. Next we integrate p(Y ) over X to be able to use 4.1, log p(Y ) = log Z q(X)p(Y |X)p(X) q(X) d(X) ≥ Z q(X)  log p(Y |X) + log p(X) q(X)  d(X) (4.2) and obtain a bound which can be used for both models. Up to here the derivation is identical to the two derivations given in [Titsias and Lawrence, 2010; Titsias, 2009]. However, now we exploit the conditional independence given u to break the inference into small independent components. 4.1 Decoupling the Data Conditioned on the Inducing Points The introduction of the inducing points decouples the function values from each other in the following sense. If we represent Y as the individual data points (Y1; Y2; ...; Yn) with Yi ∈R1×d and similarly for F, we can write the lower bound as a sum over the data points, since Yi are independent of Fj for j ̸= i: Z p(F|X, u) log p(Y |F)d(F) = Z p(F|X, u) n X i=1 log p(Yi|Fi)d(F) = n X i=1 Z p(Fi|Xi, u) log p(Yi|Fi)d(Fi) Simplifying this expression and integrating over X we get that each term is given by −d 2 log(2πβ−1) −β 2 YiY T i −2 ⟨Fi⟩p(Fi|Xi,u)q(Xi) Y T i + FiF T i p(Fi|Xi,u)q(Xi))  where we use triangular brackets ⟨F⟩p(F ) to denote the expectation of F with respect to the distribution p(F). Now, using calculus of variations we can find optimal q(u) analytically. Plugging the optimal distribution into eq. 4.1 and using further algebraic manipulations we obtain the following lower bound: log p(Y ) ≥−nd 2 log 2π + nd 2 log β + d 2 log |Kmm| −d 2 log |Kmm + βD| −β 2 A −βd 2 B + βd 2 Tr(K−1 mmD) + β2 2 Tr(CT · (Kmm + βD)−1 · C) −KL (4.3) where A = n X i=1 YiY T i , B = n X i=1 ⟨Kii⟩q(Xi) , C = n X i=1 ⟨Kmi⟩q(Xi) Yi, D = n X i=1 ⟨KmiKim⟩q(Xi) and KL = n X i=1 KL(q(Xi)||p(Xi)) when the inputs are latent or set to 0 when they are observed. 4 Notice that the obtained unifying bound is identical to the ones derived in [Titsias, 2009] for the regression case and [Titsias and Lawrence, 2010] for the LVM case since ⟨Kmi⟩q(Xi) = Kmi for q(Xi) with variance 0 and mean Xi. However, the terms are re-parametrised as independent sums over the input points – sums that can be computed on different nodes in a network without intercommunication. An in-depth explanation of the different transitions is given in the supplementary material sections 3 and 4. 4.2 Distributed Inference Algorithm A parallel inference algorithm can be easily derived based on this factorisation. Using the MapReduce framework [Dean and Ghemawat, 2008] we can maintain different subsets of the inputs and their corresponding outputs on each node in a parallel implementation and distribute the global parameters (such as the kernel hyper-parameters and the inducing inputs) to the nodes, collecting only the partial terms calculated on each node. We denote by G the set of global parameters over which we need to perform optimisation. These include Z (the inducing inputs), β (the observation noise), and k (the set of kernel hyper-parameters). Additionally we denote by Lk the set of local parameters on each node k that need to be optimised. These include the mean and variance for each input point for the LVM model. First, we send to all end-point nodes the global parameters G for them to calculate the partial terms ⟨Kmi⟩q(Xi) Yi, ⟨KmiKim⟩q(Xi), ⟨Kii⟩q(Xi), YiY T i , and KL(q(Xi)||p(Xi)). The calculation of these terms is explained in more detail in the supplementary material section 4. The end-point nodes return these partial terms to the central node (these are m × m × q matrices – constant space complexity for fixed m). The central node then sends the accumulated terms and partial derivatives back to the nodes and performs global optimisation over G. In the case of the GPLVM, the nodes then concurrently perform local optimisation on Lk, the embedding posterior parameters. In total, we have two Map-Reduce steps between the central node and the end-point nodes to follow: 1. The central node distributes G, 2. Each end-point node k returns a partial sum of the terms A, B, C, D and KL based on Lk, 3. The central node calculates F, ∂F (m × m × q matrices) and distributes to the end-point nodes, 4. The central node optimises G; at the same time the end-point nodes optimise Lk. When performing regression, the third step and the second part of the fourth step are not required. The appendices of the supplementary material contain the derivations of all the partial derivatives required for optimisation. Optimisation of the global parameters can be done using any procedure that utilises the calculated partial derivative (such as scaled conjugate gradient [Møller, 1993]), and the optimisation of the local variables can be carried out by parallelising SCG or using local gradient descent. We now explore the developed inference empirically and evaluate its properties on a range of tasks. 5 Experimental Evaluation We now demonstrate that the proposed inference meets the criteria set out in the introduction. We assess the inference on its scalability with increased computational power for a fixed problem size (strong scaling) as well as with proportionally increasing data (weak scaling) and compare to existing inference. We further explore the distribution of the load over the different nodes, which is a major inhibitor in large scale distributed systems. In the following experiments we used a squared exponential ARD kernel over the latent space to automatically determine the dimensionality of the space, as in Titsias and Lawrence [2010]. We initialise our latent points using PCA and our inducing inputs using k-means with added noise. We optimise using both L-BFGS and scaled conjugate gradient [Møller, 1993]. 5.1 Scaling with Computation Power We investigate how much inference on a given dataset can be sped up using the proposed algorithm given more computational resources. We assess the improvement of the running time of the algo5 Figure 1: Running time per iteration for 100K points synthetic dataset, as a function of available cores on log-scale. Figure 2: Time per iteration when scaling the computational resources proportionally to dataset size up to 50K points. Also shown standard inference (GPy) for comparison. rithm on a synthetic dataset of which large amounts of data could easily be generated. The dataset was obtained by simulating a 1D latent space and transforming this non-linearly into 3D observations. 100K points were generated and the algorithm was run using an increasing number of cores and a 2D latent space. We measured the total running time the algorithm spent in each iteration. Figure 1 shows the improvement of run-time as a function of available cores. We obtain a relation very close to the ideal t ∝c·(cores)−1. When doubling the number of cores from 5 to 10 we achieve a factor 1.93 decrease in computation time – very close to ideal. In a higher range, a doubling from 15 to 30 cores improves the running time by a factor of 1.90, so there is very little sign of diminishing returns. It is interesting to note that we observed a minuscule overhead of about 0.05 seconds per iteration in the global steps. This is due to the m × m matrix inversion carried out in each global step, which amounts to an additional time complexity of O(m3) – constant for fixed m. 5.2 Scaling with Data and Comparison to Standard Inference Using the same setup, we assessed the scaling of the running time as we increased both the dataset size and computational resources equally. For a doubling of data, we doubled the number of available CPUs. In the ideal case of an algorithm with only distributable components, computation time should be constant. Again, we measure the total running time of the algorithm per iteration. Figure 2 shows that we are able to effectively utilise the extra computational resources. Our total running time takes 4.3% longer for a dataset scaled by 30 times. Comparing the computation time to the standard inference scheme we see a significant improvement in performance in terms of running time. We compared to the sequential but highly optimised GPy implementation (see figure 2). The suggested inference significantly outperforms GPy in terms of running time given more computational resources. Our parallel inference allows us to run sparse GPs and the GPLVM on datasets which would simply take too long to run with standard inference. 5.3 Distribution of the Load The development of parallel inference procedures is an active field of research for Bayesian nonparametric models [Lovell et al., 2012; Williamson et al., 2013]. However, it is important to study Figure 3: Load distribution for each iteration. The maximum time spent in a node is the rate limiting step. Shown are the minimum, mean and maximum execution times of all nodes when using 5 (left) and 30 (right) cores. 6 Dataset Mean Linear Ridge RF SVI 100 SVI 200 Dist GP 100 Flight 7K 36.62 34.97 35.05 34.78 NA NA 33.56 Flight 70K 36.61 34.94 34.98 34.88 NA NA 33.11 Flight 700K 36.61 34.94 34.95 34.96 33.20 33.00 32.95 Table 1: RMSE of flight delay (measured in minutes) for regression over flight data with 7K700K points by predicting mean, linear regression, ridge regression, random forest regression (RF), Stochastic Variational Inference (SVI) GP regression with 100 and 200 inducing points, and the proposed inference with 100 inducing points (Dist GP 100). the characteristics of the parallel algorithm, which are sometimes overlooked [Gal and Ghahramani, 2014]. One of our stated requirements for a practical parallel inference algorithm is an approximately equal distribution of the load on the nodes. This is especially relevant in a Map-Reduce framework, where the reduce step can only happen after all map computations have finished, so the maximum execution time of one of the workers is the rate limiting step. Figure 3 shows the minimum, maximum and average execution time of all nodes. For 30 cores, there is on average a 1.9% difference between the minimum and maximum run-time of the nodes, suggesting an even distribution of the load. 6 GP Regression and Latent Variable Modelling on Real-World Big Data Next we describe a series of experiments demonstrating the utility in scaling Gaussian processes to big data. We show that GP performance improves with increasing amounts of data in regression and latent variable modelling tasks. We further show that GPs perform better than common models often used for big data. We evaluate GP regression on the US flight dataset [Hensman et al., 2013] with up to 2 million points, and compare the results that we got to an array of baselines demonstrating the utility of using GPs for large scale regression. We then present density modelling results over the MNIST dataset, performing imputation tests and digit classification based on model comparison [Titsias and Lawrence, 2010]. As far as we are aware, this is the first GP experiment to run on the full MNIST dataset. 6.1 Regression on US Flight Data In the regression test we predict flight delays from various flight-record characteristics such as flight date and time, flight distance, and others. The US 2008 flight dataset [Hensman et al., 2013] was used with different subset sizes of data: 7K, 70K, and 700K. We selected the first 800K points from the dataset and then split the data randomly into a test set and a training set, using 100K points for testing. We then used the first 7K and 70K points from the large training set to construct the smaller training sets, using the same test set for comparison. This follows the experiment setup of [Hensman et al., 2013] and allows us to compare our results to the Stochastic Variational Inference suggested for GP regression. In addition to that we constructed a 2M points dataset based on a different split using 100K points for test. This test is not comparable to the other experiments due to the non-stationary nature of the data, but it allows us to investigate the performance of the proposed inference compared to the baselines on even larger datasets. For baselines we predicted the mean of the data, used linear regression, ridge regression with parameter 0.5, and MSE random forest regression at depth 2 with 100 estimators. We report the best results we got for each model for different parameter settings with available resources. We trained our model with 100 inducing points for 500 iterations using LBFGS optimisation and compared the Dataset Mean Linear Ridge RF Dist GP 100 Flight 2M 38.92 37.65 37.65 37.33 35.31 Table 2: RMSE for flight data with 2M points by predicting mean, linear regression, ridge regression, random forest regression (RF), and the proposed inference with 100 inducing points (Dist GP). 7 Figure 4: Log likelihood as a function of function evaluation for the 70K flight dataset using SCG and LBFGS optimisation. Figure 5: Digit from MNIST with missing data (left) and reconstruction using GPLVM (right). root mean square error (RMSE) to the baselines as well as SVI with 100 and 200 inducing points (table 1). The results for 2M points are given in table 2. Our inference with 2M data points on a 64 cores machine took ∼13.8 minutes per iteration. Even though the training of the baseline models took several minutes, the use of GPs for big data allows us to take advantage of their desirable properties of uncertainty estimates, robustness to over-fitting, and principled ways for tuning hyper-parameters. One unexpected result was observed while doing inference with SCG. When increasing the number of data points, the SCG optimiser converged to poor values. When using the final parameters of a model trained on a small dataset to initialise a model to be trained on a larger dataset, performance was as expected. We concluded that SCG was not converging to the correct optimum, whereas LBFGS performed better (figure 4). We suspect this happens because the modes in the optimisation surface sharpen with more data. This is due to the increased weight of the likelihood terms. 6.2 Latent Variable Modelling on MNIST We also run the GP latent variable model on the full MNIST dataset, which contains 60K examples of 784 dimensions and is considered large in the Gaussian processes community. We trained one model for each digit and used it as a density model, using the predictive probabilities to perform classification. We classify a test point to the model with the highest posterior predictive probability. We follow the calculation in [Titsias and Lawrence, 2010], by taking the ratio of the exponentiated log marginal likelihoods: p(y∗|Y ) = p(y∗, Y )/p(Y ) ≈eLy∗,Y −LY . Due to the randomness in the initialisation of the inducing inputs and latent point variances, we performed 10 random restarts on each model and chose the model with the largest marginal likelihood lower bound. We observed that the models converged to a point where they performed similarly, occasionally getting stuck in bad local optima. No pre-processing was performed on the training data as our main aim here is to show the benefit of training GP models using larger amounts of data, rather than proving state-of-the-art performance. We trained the models on a subset of the data containing 10K points as well as the entire dataset with all 60K points, using additional 10K points for testing. We observed an improvement of 3.03 percentage points in classification error, decreasing the error from 8.98% to 5.95%. Training on the full MNIST dataset took 20 minutes for the longest running model, using 500 iterations of SCG. We demonstrate the reconstruction abilties of the GPLVM in figure 5. 7 Conclusions We have scaled sparse GP regression and latent variable modelling, presenting the first distributed inference algorithm able to process datasets with millions of data points. An extensive set of experiments demonstrated the utility in scaling Gaussian processes to big data showing that GP performance improves with increasing amounts of data. We studied the properties of the suggested inference, showing that the inference scales well with data and computational resources, while preserving a balanced distribution of the load among the nodes. Finally, we showed that GPs perform better than many common models used for big data. The algorithm was implemented in the Map-Reduce architecture and is available as an open-source package, containing an extensively documented implementation of the derivations, with references to the equations presented in the supplementary material for explanation. 8 References Arnold, S. (1981). The theory of linear models and multivariate analysis. Wiley series in probability and mathematical statistics: Probability and mathematical statistics. Wiley. Asuncion, A. U., Smyth, P., and Welling, M. (2008). Asynchronous distributed learning of topic models. In Advances in Neural Information Processing Systems, pages 81–88. Brockwell, A. E. (2006). Parallel Markov Chain Monte Carlo simulation by Pre-Fetching. Journal of Computational and Graphical Statistics, 15(1):pp. 246–261. Dean, J. and Ghemawat, S. (2008). MapReduce: Simplified data processing on large clusters. Commun. ACM, 51(1):107–113. Gal, Y. and Ghahramani, Z. (2014). Pitfalls in the use of parallel inference for the Dirichlet process. In Proceedings of the 31th International Conference on Machine Learning (ICML-14). Hensman, J., Fusi, N., and Lawrence, N. D. (2013). Gaussian processes for big data. In Nicholson, A. and Smyth, P., editors, UAI. AUAI Press. Hoffman, M. D., Blei, D. M., Wang, C., and Paisley, J. (2013). Stochastic Variational Inference. JOURNAL OF MACHINE LEARNING RESEARCH, 14:1303–1347. Lawrence, N. (2005). Probabilistic non-linear principal component analysis with gaussian process latent variable models. The Journal of Machine Learning Research, 6:1783–1816. Lovell, D., Adams, R. P., and Mansingka, V. (2012). Parallel Markov chain Monte Carlo for Dirichlet process mixtures. In Workshop on Big Learning, NIPS. Møller, M. F. (1993). A scaled conjugate gradient algorithm for fast supervised learning. Neural networks, 6(4):525–533. Qui˜nonero-Candela, J. and Rasmussen, C. E. (2005). A unifying view of sparse approximate gaussian process regression. Journal of Machine Learning Research, 6:2005. Rasmussen, C. E. and Williams, C. K. I. (2006). Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning). The MIT Press. Titsias, M. and Lawrence, N. (2010). Bayesian gaussian process latent variable model. Titsias, M. K. (2009). Variational learning of inducing variables in sparse Gaussian processes. Technical report, Technical Report. Wilkinson, D. J. (2005). Parallel Bayesian computation. In Kontoghiorghes, E. J., editor, Handbook of Parallel Computing and Statistics, volume 184, pages 477–508. Chapman and Hall/CRC, Boca Raton, FL, USA. Williamson, S., Dubey, A., and Xing, E. P. (2013). Parallel Markov Chain Monte Carlo for nonparametric mixture models. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 98–106. 9
2014
257
5,355
On the Convergence Rate of Decomposable Submodular Function Minimization Robert Nishihara, Stefanie Jegelka, Michael I. Jordan Electrical Engineering and Computer Science University of California Berkeley, CA 94720 {rkn,stefje,jordan}@eecs.berkeley.edu Abstract Submodular functions describe a variety of discrete problems in machine learning, signal processing, and computer vision. However, minimizing submodular functions poses a number of algorithmic challenges. Recent work introduced an easy-to-use, parallelizable algorithm for minimizing submodular functions that decompose as the sum of “simple” submodular functions. Empirically, this algorithm performs extremely well, but no theoretical analysis was given. In this paper, we show that the algorithm converges linearly, and we provide upper and lower bounds on the rate of convergence. Our proof relies on the geometry of submodular polyhedra and draws on results from spectral graph theory. 1 Introduction A large body of recent work demonstrates that many discrete problems in machine learning can be phrased as the optimization of a submodular set function [2]. A set function F : 2V ! R over a ground set V of N elements is submodular if the inequality F(A)+F(B) ≥F(A[B)+F(A\B) holds for all subsets A, B ✓V . Problems like clustering [33], structured sparse variable selection [1], MAP inference with higher-order potentials [28], and corpus extraction problems [31] can be reduced to the problem of submodular function minimization (SFM), that is min A✓V F(A). (P1) Although SFM is solvable in polynomial time, existing algorithms can be inefficient on large-scale problems. For this reason, the development of scalable, parallelizable algorithms has been an active area of research [24, 25, 29, 35]. Approaches to solving Problem (P1) are either based on combinatorial optimization or on convex optimization via the Lov´asz extension. Functions that occur in practice are usually not arbitrary and frequently possess additional exploitable structure. For example, a number of submodular functions admit specialized algorithms that solve Problem (P1) very quickly. Examples include cut functions on certain kinds of graphs, concave functions of the cardinality |A|, and functions counting joint ancestors in trees. We will use the term simple to refer to functions F for which we have a fast subroutine for minimizing F + s, where s 2 RN is any modular function. We treat these subroutines as black boxes. Many commonly occuring submodular functions (for example, graph cuts, hypergraph cuts, MAP inference with higher-order potentials [16, 28, 37], co-segmentation [22], certain structured-sparsity inducing functions [26], covering functions [35], and combinations thereof) can be expressed as a sum F(A) = XR r=1 Fr(A) (1) of simple submodular functions. Recent work demonstrates that this structure offers important practical benefits [25, 29, 35]. For instance, it admits iterative algorithms that minimize each Fr separately and combine the results in a straightforward manner (for example, dual decomposition). 1 In particular, it has been shown that the minimization of decomposable functions can be rephrased as a best-approximation problem, the problem of finding the closest points in two convex sets [25]. This formulation brings together SFM and classical projection methods and yields empirically fast, parallel, and easy-to-implement algorithms. In these cases, the performance of projection methods depends heavily on the specific geometry of the problem at hand and is not well understood in general. Indeed, while Jegelka et al. [25] show good empirical results, the analysis of this alternative approach to SFM was left as an open problem. Contributions. In this work, we study the geometry of the submodular best-approximation problem and ground the prior empirical results in theoretical guarantees. We show that SFM via alternating projections, or block coordinate descent, converges at a linear rate. We show that this rate holds for the best-approximation problem, relaxations of SFM, and the original discrete problem. More importantly, we prove upper and lower bounds on the worst-case rate of convergence. Our proof relies on analyzing angles between the polyhedra associated with submodular functions and draws on results from spectral graph theory. It offers insight into the geometry of submodular polyhedra that may be beneficial beyond the analysis of projection algorithms. Submodular minimization. The first polynomial-time algorithm for minimizing arbitrary submodular functions was a consequence of the ellipsoid method [19]. Strongly and weakly polynomialtime combinatorial algorithms followed [32]. The current fastest running times are O(N 5⌧1 + N 6) [34] in general and O((N 4⌧1 + N 5) log Fmax) for integer-valued functions [23], where Fmax = maxA |F(A)| and ⌧1 is the time required to evaluate F. Some work has addressed decomposable functions [25, 29, 35]. The running times in [29] apply to integer-valued functions and range from O((N + R)2 log Fmax) for cuts to O((N + Q2R)(N + Q2R + QR⌧2) log Fmax), where Q N is the maximal cardinality of the support of any Fr, and ⌧2 is the time required to minimize a simple function. Stobbe and Krause [35] use a convex optimization approach based on Nesterov’s smoothing technique. They achieve a (sublinear) convergence rate of O(1/k) for the discrete SFM problem. Their results and our results do not rely on the function being integral. Projection methods. Algorithms based on alternating projections between convex sets (and related methods such as the Douglas–Rachford algorithm) have been studied extensively for solving convex feasibility and best-approximation problems [4, 5, 7, 11, 12, 20, 21, 36, 38]. See Deutsch [10] for a survey of applications. In the simple case of subspaces, the convergence of alternating projections has been characterized in terms of the Friedrichs angle cF between the subspaces [5, 6]. There are often good ways to compute cF (see Lemma 6), which allow us to obtain concrete linear rates of convergence for subspaces. The general case of alternating projections between arbitrary convex sets is less well understood. Bauschke and Borwein [3] give a general condition for the linear convergence of alternating projections in terms of the value ⇤(defined in Section 3.1). However, except in very limited cases, it is unclear how to compute or even bound ⇤. While it is known that ⇤< 1 for polyhedra [5, Corollary 5.26], the rate may be arbitrarily slow, and the challenge is to bound the linear rate away from one. We are able to give a specific uniform linear rate for the submodular polyhedra that arise in SFM. Although both ⇤and cF are useful quantities for understanding the convergence of projection methods, they largely have been studied independently of one another. In this work, we relate these two quantities for polyhedra, thereby obtaining some of the generality of ⇤along with the computability of cF . To our knowledge, we are the first to relate ⇤and cF outside the case of subspaces. We feel that this connection may be useful beyond the context of submodular polyhedra. 1.1 Background Throughout this paper, we assume that F is a sum of simple submodular functions F1, . . . , FR and that F(;) = 0. Points s 2 RN can be identified with (modular) set functions via s(A) = P n2A sn. The base polytope of F is defined as the set of all modular functions that are dominated by F and that sum to F(V ), B(F) = {s 2 RN | s(A) F(A) for all A ✓V and s(V ) = F(V )}. The Lov´asz extension f : RN ! R of F can be written as the support function of the base polytope, that is f(x) = maxs2B(F ) s>x. Even though B(F) may have exponentially many faces, the extension f can be evaluated in O(N log N) time [15]. The discrete SFM problem (P1) can be relaxed to 2 the non-smooth convex optimization problem min x2[0,1]N f(x) ⌘ min x2[0,1]N R X r=1 fr(x), (P2) where fr is the Lov´asz extension of Fr. This relaxation is exact – rounding an optimal continuous solution yields the indicator vector of an optimal discrete solution. The formulation in Problem (P2) is amenable to dual decomposition [30] and smoothing techniques [35], but suffers from the nonsmoothness of f [25]. Alternatively, we can formulate a proximal version of the problem min x2RN f(x) + 1 2kxk2 ⌘ min x2RN R X r=1 (fr(x) + 1 2Rkxk2). (P3) By thresholding the optimal solution of Problem (P3) at zero, we recover the indicator vector of an optimal discrete solution [17], [2, Proposition 8.4]. Lemma 1. [25] The dual of the right-hand side of Problem (P3) is the best-approximation problem min ka −bk2 a 2 A, b 2 B, (P4) where A = {(a1, . . . , aR) 2 RNR | PR r=1 ar = 0} and B = B(F1) ⇥· · · ⇥B(FR). Lemma 1 implies that we can minimize a decomposable submodular function by solving Problem (P4), which means finding the closest points between the subspace A and the product B of base polytopes. Projecting onto A is straightforward because A is a subspace. Projecting onto B amounts to projecting onto each B(Fr) separately. The projection ⇧B(Fr)z of a point z onto B(Fr) may be solved by minimizing Fr −z [25]. We can compute these projections easily because each Fr is simple. Throughout this paper, we use A and B to refer to the specific polyhedra defined in Lemma 1 (which live in RNR) and P and Q to refer to general polyhedra (sometimes arbitrary convex sets) in RD. Note that the polyhedron B depends on the submodular functions F1, . . . , FR, but we omit the dependence to simplify our notation. Our bound will be uniform over all submodular functions. 2 Algorithm and Idea of Analysis A popular class of algorithms for solving best-approximation problems are projection methods [5]. The most straightforward approach uses alternating projections (AP) or block coordinate descent. Start with any point a0 2 A, and inductively generate two sequences via bk = ⇧Bak and ak+1 = ⇧Abk. Given the nature of A and B, this algorithm is easy to implement and use in our setting, and it solves Problem (P4) [25]. This is the algorithm that we will analyze. The sequence (ak, bk) will eventually converge to an optimal pair (a⇤, b⇤). We say that AP converges linearly with rate ↵< 1 if kak−a⇤k C1↵k and kbk−b⇤k C2↵k for all k and for some constants C1 and C2. Smaller values of ↵are better. Analysis: Intuition. We will provide a detailed analysis of the convergence of AP for the polyhedra A and B. To motivate our approach, we first provide some intuition with the following muchsimplified setup. Let U and V be one-dimensional subspaces spanned by the unit vectors u and v respectively. In this case, it is known that AP converges linearly with rate cos2 ✓, where ✓2 [0, ⇡ 2 ] is the angle such that cos ✓= u>v. The smaller the angle, the slower the rate of convergence. For subspaces U and V of higher dimension, the relevant generalization of the “angle” between the subspaces is the Friedrichs angle [11, Definition 9.4], whose cosine is given by cF (U, V ) = sup # u>v | u 2 U \ (U \ V )?, v 2 V \ (U \ V )?, kuk 1, kvk 1 . (2) In finite dimensions, cF (U, V ) < 1. In general, when U and V are subspaces of arbitrary dimension, AP will converge linearly with rate cF (U, V )2 [11, Theorem 9.8]. If U and V are affine spaces, AP still converges linearly with rate cF (U −u, V −v)2, where u 2 U and v 2 V . We are interested in rates for polyhedra P and Q, which we define as the intersection of finitely many halfspaces. We generalize the preceding results by considering all pairs (Px, Qy) of 3 P Q E H v P E Q0 Figure 1: The optimal sets E, H in Equation (4), the vector v, and the shifted polyhedron Q0. faces of P and Q and showing that the convergence rate of AP between P and Q is at worst maxx,y cF (a↵0(Px), a↵0(Qy))2, where a↵(C) is the affine hull of C and a↵0(C) = a↵(C) −c for some c 2 C. The faces {Px}x2RD of P are defined as the nonempty maximizers of linear functions over P, that is Px = arg max p2P x>p. (3) While we look at angles between pairs of faces, we remark that Deutsch and Hundal [13] consider a different generalization of the “angle” between arbitrary convex sets. Roadmap of the Analysis. Our analysis has two main parts. First, we relate the convergence rate of AP between polyhedra P and Q to the angles between the faces of P and Q. To do so, we give a general condition under which AP converges linearly (Theorem 2), which we show depends on the angles between the faces of P and Q (Corollary 5) in the polyhedral case. Second, we specialize to the polyhedra A and B, and we equate the angles with eigenvalues of certain matrices and use tools from spectral graph theory to bound the relevant eigenvalues in terms of the conductance of a specific graph. This yields a worst-case bound of 1 − 1 N 2R2 on the rate, stated in Theorem 12. In Theorem 14, we show a lower bound of 1 −2⇡2 N 2R on the worst-case convergence rate. 3 The Upper Bound We first derive an upper bound on the rate of convergence of AP between the polyhedra A and B. The results in this section are proved in Appendix A. 3.1 A Condition for Linear Convergence We begin with a condition under which AP between two closed convex sets P and Q converges linearly. This result is similar to that of Bauschke and Borwein [3, Corollary 3.14], but the rate we achieve is twice as fast and relies on slightly weaker assumptions. We will need a few definitions from Bauschke and Borwein [3]. Let d(K1, K2) = inf{kk1 −k2k : k1 2 K1, k2 2 K2} be the distance between sets K1 and K2. Define the sets of “closest points” as E = {p 2 P | d(p, Q) = d(P, Q)} H = {q 2 Q | d(q, P) = d(Q, P)}, (4) and let v = ⇧Q−P 0 (see Figure 1). Note that H = E + v, and when P \ Q 6= ; we have v = 0 and E = H = P \ Q. Therefore, we can think of the pair (E, H) as a generalization of the intersection P \Q to the setting where P and Q do not intersect. Pairs of points (e, e+v) 2 E ⇥H are solutions to the best-approximation problem between P and Q. In our analysis, we will mostly study the translated version Q0 = Q −v of Q that intersects P at E. For x 2 RD\E, the function relates the distance to E with the distances to P and Q0, (x) = d(x, E) max{d(x, P), d(x, Q0)}. If is bounded, then whenever x is close to both P and Q0, it must also be close to their intersection. If, for example, D ≥2 and P and Q are balls of radius one whose centers are separated by distance 4 exactly two, then is unbounded. The maximum ⇤= supx2(P [Q0)\E (x) is useful for bounding the convergence rate. Theorem 2. Let P and Q be convex sets, and suppose that ⇤< 1. Then AP between P and Q converges linearly with rate 1 − 1 2⇤. Specifically, kpk −p⇤k 2kp0 −p⇤k(1 − 1 2⇤)k and kqk −q⇤k 2kq0 −q⇤k(1 − 1 2⇤)k. 3.2 Relating ⇤to the Angles Between Faces of the Polyhedra In this section, we consider the case of polyhedra P and Q, and we bound ⇤in terms of the angles between pairs of their faces. In Lemma 3, we show that is nondecreasing along the sequence of points generated by AP between P and Q0. We treat points p for which (p) = 1 separately because those are the points from which AP between P and Q0 converges in one step. This lemma enables us to bound (p) by initializing AP at p and bounding at some later point in the resulting sequence. Lemma 3. For any p 2 P\E, either (p) = 1 or 1 < (p) (⇧Q0p). Similarly, for any q 2 Q0\E, either (q) = 1 or 1 < (q) (⇧P q). We can now bound by angles between faces of P and Q. Proposition 4. If P and Q are polyhedra and p 2 P\E, then there exist faces Px and Qy such that 1 − 1 (p)2 cF (a↵0(Px), a↵0(Qy))2. The analogous statement holds when we replace p 2 P\E with q 2 Q0\E. Note that a↵0(Qy) = a↵0(Q0 y). Proposition 4 immediately gives us the following corollary. Corollary 5. If P and Q are polyhedra, then 1 −1 2⇤ max x,y2RD cF (a↵0(Px), a↵0(Qy))2. 3.3 Angles Between Subspaces and Singular Values Corollary 5 leaves us with the task of bounding the Friedrichs angle. To do so, we first relate the Friedrichs angle to the singular values of certain matrices in Lemma 6. We then specialize this to base polyhedra of submodular functions. For convenience, we prove Lemma 6 in Appendix A.5, though this result is implicit in the characterization of principal angles between subspaces given in [27, Section 1]. Ideas connecting angles between subspaces and eigenvalues are also used by Diaconis et al. [14]. Lemma 6. Let S and T be matrices with orthonormal rows and with equal numbers of columns. If all of the singular values of ST > equal one, then cF (null(S), null(T)) = 0. Otherwise, cF (null(S), null(T)) is equal to the largest singular value of ST > that is less than one. Faces of relevant polyhedra. Let Ax and By be faces of the polyhedra A and B from Lemma 1. Since A is a vector space, its only nonempty face is Ax = A. Hence, Ax = null(S), where S is an N ⇥NR matrix of N ⇥N identity matrices IN: S = 1 p R ✓ IN · · · IN | {z } repeated R times ◆ . (5) The matrix for a↵0(By) requires a bit more elaboration. Since B is a Cartesian product, we have By = B(F1)y1 ⇥· · · ⇥B(FR)yR, where y = (y1, . . . , yR) and B(Fr)yr is a face of B(Fr). To proceed, we use the following characterization of faces of base polytopes [2, Proposition 4.7]. Proposition 7. Let F be a submodular function, and let B(F)x be a face of B(F). Then there exists a partition of V into disjoint sets A1, . . . , AM such that a↵(B(F)x) = M \ m=1 {s 2 RN | s(A1 [ · · · [ Am) = F(A1 [ · · · [ Am)}. 5 The following corollary is immediate. Corollary 8. Define F, B(F)x, and A1, . . . , AM as in Proposition 7. Then a↵0(B(F)x) = M \ m=1 {s 2 RN | s(A1 [ · · · [ Am) = 0}. By Corollary 8, for each Fr, there exists a partition of V into disjoint sets Ar1, . . . , ArMr such that a↵0(By) = R \ r=1 Mr \ m=1 {(s1, . . . , sR) 2 RNR | sr(Ar1 [ · · · [ Arm) = 0}. (6) In other words, we can write a↵0(By) as the nullspace of either of the matrices T 0 = 0 B B B B B B B B B B B B @ 1> A11 ... 1> A11[···[A1M1 ... 1> AR1 ... 1> AR1[···[ARMR 1 C C C C C C C C C C C C A or T = 0 B B B B B B B B B B B B B B B B @ 1> A11 p |A11| ... 1> A1M1 p |A1M1| ... 1> AR1 p |AR1| ... 1> ARMR p |ARMR| 1 C C C C C C C C C C C C C C C C A , where 1A is the indicator vector of A ✓V . For T 0, this follows directly from Equation (6). T can be obtained from T 0 via left multiplication by an invertible matrix, so T and T 0 have the same nullspace. Lemma 6 then implies that cF (a↵0(Ax), a↵0(By)) equals the largest singular value of ST > = 1 p R ✓ 1A11 p |A11| · · · 1A1M1 p |A1M1| · · · 1AR1 p |AR1| · · · 1ARMR p |ARMR| ◆ that is less than one. We rephrase this conclusion in the following remark. Remark 9. The largest eigenvalue of (ST >)>(ST >) less than one equals cF (a↵0(Ax), a↵0(By))2. Let Mall = M1 + · · · + MR. Then (ST >)>(ST >) is the Mall ⇥Mall square matrix whose rows and columns are indexed by (r, m) with 1 r R and 1 m Mr and whose entry corresponding to row (r1, m1) and column (r2, m2) equals 1 R 1> Ar1m1 1Ar2m2 p |Ar1m1||Ar2m2| = 1 R |Ar1m1 \ Ar2m2| p |Ar1m1||Ar2m2| . 3.4 Bounding the Relevant Eigenvalues It remains to bound the largest eigenvalue of (ST >)>(ST >) that is less than one. To do so, we view the matrix in terms of the symmetric normalized Laplacian of a weighted graph. Let G be the graph whose vertices are indexed by (r, m) with 1 r R and 1 m Mr. Let the edge between vertices (r1, m1) and (r2, m2) have weight |Ar1m1 \ Ar2m2|. We may assume that G is connected (the analysis in this case subsumes the analysis in the general case). The symmetric normalized Laplacian L of this graph is closely related to our matrix of interest, (ST >)>(ST >) = I −R−1 R L. (7) Hence, the largest eigenvalue of (ST >)>(ST >) that is less than one can be determined from the smallest nonzero eigenvalue λ2(L) of L. We bound λ2(L) via Cheeger’s inequality (stated in Appendix A.6) by bounding the Cheeger constant hG of G. Lemma 10. For R ≥2, we have hG ≥ 2 NR and hence λ2(L) ≥ 2 N 2R2 . 6 We prove Lemma 10 in Appendix A.7. Combining Remark 9, Equation (7), and Lemma 10, we obtain the following bound on the Friedrichs angle. Proposition 11. Assuming that R ≥2, we have cF (a↵0(Ax), a↵0(By))2 1 −R−1 R 2 N 2R2 1 − 1 N 2R2 . Together with Theorem 2 and Corollary 5, Proposition 11 implies the final bound on the rate. Theorem 12. The AP algorithm for Problem (P4) converges linearly with rate 1 − 1 N 2R2 , i.e., kak −a⇤k 2ka0 −a⇤k(1 − 1 N 2R2 )k and kbk −b⇤k 2kb0 −b⇤k(1 − 1 N 2R2 )k. 4 A Lower Bound To probe the tightness of Theorem 12, we construct a “bad” submodular function and decomposition that lead to a slow rate. Appendix B gives the formal details. Our example is an augmented cut function on a cycle: for each x, y 2 V , define Gxy to be the cut function of a single edge (x, y), Gxy = ⇢1 if |A \ {x, y}| = 1 0 otherwise . Take N to be even and R ≥2 and define the submodular function F lb = F lb 1 + · · · + F lb R, where F lb 1 = G12 + G34 + · · · + G(N−1)N F lb 2 = G23 + G45 + · · · + GN1 and F lb r = 0 for all r ≥3. The optimal solution to the best-approximation problem is the all zeros vector. Lemma 13. The cosine of the Friedrichs angle between A and a↵(Blb) is cF (A, a↵(Blb))2 = 1 −1 R 4 1 −cos 4 2⇡ N 55 . Around the optimal solution 0, the polyhedra A and Blb behave like subspaces, and it is possible to pick initializations a0 2 A and b0 2 Blb such that the Friedrichs angle exactly determines the rate of convergence. That means 1 −1/2 ⇤= cF (A, a↵(Blb))2, and kakk = (1 −1 R(1 −cos( 2⇡ N )))kka0k and kbkk = (1 −1 R(1 −cos( 2⇡ N )))kkb0k. Bounding 1 −cos(x) 1 2x2 leads to the following lower bound on the rate. Theorem 14. There exists a decomposed function F lb and initializations for which the convergence rate of AP is at least 1 −2⇡2 N 2R. This theoretical bound can also be observed empirically (Figure 3 in Appendix B). 5 Convergence of the Primal Objective We have shown that AP generates a sequence of points {ak}k≥0 and {bk}k≥0 in RNR such that (ak, bk) ! (a⇤, b⇤) linearly, where (a⇤, b⇤) minimizes the objective in Problem (P4). In this section, we show that this result also implies the linear convergence of the objective in Problem (P3) and of the original discrete objective in Problem (P1). The proofs may be found in Appendix C. Define the matrix Γ = −R1/2S, where S is the matrix defined in Equation (5). Multiplication by Γ maps a vector (w1, . . . , wR) to −P r wr, where wr 2 RN for each r. Set xk = Γbk and x⇤= Γb⇤. As shown in Jegelka et al. [25], Problem (P3) is minimized by x⇤. Proposition 15. We have f(xk) + 1 2kxkk2 ! f(x⇤) + 1 2kx⇤k2 linearly with rate 1 − 1 N 2R2 . This linear rate of convergence translates into a linear rate for the original discrete problem. Theorem 16. Choose A⇤2 arg minA✓V F(A). Let Ak be the suplevel set of xk with smallest value of F. Then F(Ak) ! F(A⇤) linearly with rate 1 − 1 2N 2R2 . 7 6 Discussion In this work, we analyze projection methods for parallel SFM and give upper and lower bounds on the linear rate of convergence. This means that the number of iterations required for an accuracy of ✏is logarithmic in 1/✏, not linear as in previous work [35]. Our rate is uniform over all submodular functions. Moreover, our proof highlights how the number R of components and the facial structure of B affect the convergence rate. These insights may serve as guidelines when working with projection algorithms and aid in the analysis of special cases. For example, reducing R is often possible. Any collection of Fr that have disjoint support, such as the cut functions corresponding to the rows or columns of a grid graph, can be grouped together without making the projection harder. Our analysis also shows the effects of additional properties of F. For example, suppose that F is separable, that is, F(V ) = F(S) + F(V \S) for some nonempty S ( V . Then the subsets Arm ✓V defining the relevant faces of B satisfy either Arm ✓S or Arm ✓Sc [2]. This makes G in Section 3.4 disconnected, and as a result, the N in Theorem 12 gets replaced by max{|S|, |Sc|} for an improved rate. This applies without the user needing to know S when running the algorithm. A number of future directions suggest themselves. For example, Jegelka et al. [25] also considered the related Douglas–Rachford (DR) algorithm. DR between subspaces converges linearly with rate cF [6], as opposed to c2 F for AP. We suspect that our approach may be modified to analyze DR between polyhedra. Further questions include the extension to cyclic updates (instead of parallel ones), multiple polyhedra, and stochastic algorithms. Acknowledgments. We would like to thank M˘ad˘alina Persu for suggesting the use of Cheeger’s inequality. This research is supported in part by NSF CISE Expeditions Award CCF-1139158, LBNL Award 7076018, and DARPA XData Award FA8750-12-2-0331, and gifts from Amazon Web Services, Google, SAP, The Thomas and Stacey Siebel Foundation, Apple, C3Energy, Cisco, Cloudera, EMC, Ericsson, Facebook, GameOnTalis, Guavus, HP, Huawei, Intel, Microsoft, NetApp, Pivotal, Splunk, Virdata, VMware, WANdisco, and Yahoo!. This work is supported in part by the Office of Naval Research under grant number N00014-11-1-0688, the US ARL and the US ARO under grant number W911NF-11-1-0391, and the NSF under grant number DGE-1106400. References [1] F. Bach. Structured sparsity-inducing norms through submodular functions. In Advances in Neural Information Processing Systems, 2011. [2] F. Bach. Learning with submodular functions: A convex optimization perspective. Foundations and Trends in Machine Learning, 6(2-3):145–373, 2013. [3] H. H. Bauschke and J. M. Borwein. On the convergence of von Neumann’s alternating projection algorithm for two sets. Set-Valued Analysis, 1(2):185–212, 1993. [4] H. H. Bauschke and J. M. Borwein. Dykstra’s alternating projection algorithm for two sets. Journal of Approximation Theory, 79(3):418–443, 1994. [5] H. H. Bauschke and J. M. Borwein. On projection algorithms for solving convex feasibility problems. SIAM Review, 38(3):367–426, 1996. [6] H. H. Bauschke, J. B. Cruz, T. T. Nghia, H. M. Phan, and X. Wang. The rate of linear convergence of the Douglas–Rachford algorithm for subspaces is the cosine of the Friedrichs angle. Journal of Approximation Theory, 185:63–79, 2014. [7] A. Beck and L. Tetruashvili. On the convergence of block coordinate descent type methods. SIAM Journal on Optimization, 23(4):2037–2060, 2013. [8] J. V. Burke and J. J. Mor´e. On the identification of active constraints. SIAM Journal on Numerical Analysis, 25(5):1197–1211, 1988. [9] F. R. Chung. Spectral Graph Theory. American Mathematical Society, 1997. [10] F. Deutsch. The method of alternating orthogonal projections. In Approximation Theory, Spline Functions and Applications, pages 105–121. Springer, 1992. [11] F. Deutsch. Best Approximation in Inner Product Spaces, volume 7. Springer, 2001. [12] F. Deutsch and H. Hundal. The rate of convergence of Dykstra’s cyclic projections algorithm: The polyhedral case. Numerical Functional Analysis and Optimization, 15(5-6):537–565, 1994. 8 [13] F. Deutsch and H. Hundal. The rate of convergence for the cyclic projections algorithm I: angles between convex sets. Journal of Approximation Theory, 142(1):36–55, 2006. [14] P. Diaconis, K. Khare, and L. Saloff-Coste. Stochastic alternating projections. Illinois Journal of Mathematics, 54(3):963–979, 2010. [15] J. Edmonds. Combinatorial Structures and Their Applications, chapter Submodular Functions, Matroids and Certain Polyhedra, pages 69–87. Gordon and Breach, 1970. [16] A. Fix, T. Joachims, S. Park, and R. Zabih. Structured learning of sum-of-submodular higher order energy functions. In Int. Conference on Computer Vision (ICCV), 2013. [17] S. Fujishige and S. Isotani. A submodular function minimization algorithm based on the minimum-norm base. Pacific Journal of Optimization, 7:3–17, 2011. [18] R. M. Gray. Toeplitz and circulant matrices: A review. Foundations and Trends in Communications and Information Theory, 2(3):155–239, 2006. [19] M. Gr¨otschel, L. Lov´asz, and A. Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica, 1(2):169–197, 1981. [20] L. Gubin, B. Polyak, and E. Raik. The method of projections for finding the common point of convex sets. USSR Computational Mathematics and Mathematical Physics, 7(6):1–24, 1967. [21] I. Halperin. The product of projection operators. Acta Sci. Math. (Szeged), 23:96–99, 1962. [22] D. Hochbaum and V. Singh. An efficient algorithm for co-segmentation. In Int. Conference on Computer Vision (ICCV), 2009. [23] S. Iwata. A faster scaling algorithm for minimizing submodular functions. SIAM J. on Computing, 32: 833–840, 2003. [24] S. Jegelka, H. Lin, and J. Bilmes. On fast approximate sumodular minimization. In Advances in Neural Information Processing Systems, 2011. [25] S. Jegelka, F. Bach, and S. Sra. Reflection methods for user-friendly submodular optimization. In Advances in Neural Information Processing Systems, pages 1313–1321, 2013. [26] R. Jenatton, J. Mairal, G. Obozinski, and F. Bach. Proximal methods for hierarchical sparse coding. JMLR, page 22972334, 2011. [27] A. V. Knyazev and M. E. Argentati. Principal angles between subspaces in an A-based scalar product: algorithms and perturbation estimates. SIAM Journal on Scientific Computing, 23(6):2008–2040, 2002. [28] P. Kohli, L. Ladick´y, and P. Torr. Robust higher order potentials for enforcing label consistency. Int. Journal of Computer Vision, 82, 2009. [29] V. Kolmogorov. Minimizing a sum of submodular functions. Discrete Applied Mathematics, 160(15): 2246–2258, 2012. [30] N. Komodakis, N. Paragios, and G. Tziritas. MRF energy minimization and beyond via dual decomposition. IEEE Trans. Pattern Analysis and Machine Intelligence, 2011. [31] H. Lin and J. Bilmes. Optimal selection of limited vocabulary speech corpora. In Proc. Interspeech, 2011. [32] S. McCormick. Handbook on Discrete Optimization, chapter Submodular Function Minimization, pages 321–391. Elsevier, 2006. [33] M. Narasimhan and J. Bilmes. Local search for balanced submodular clusterings. In IJCAI, pages 981– 986, 2007. [34] J. Orlin. A faster strongly polynomial time algorithm for submodular function minimization. Math. Programming, 118:237–251, 2009. [35] P. Stobbe and A. Krause. Efficient minimization of decomposable submodular functions. In Advances in Neural Information Processing Systems, 2010. [36] P. Tseng. Alternating projection-proximal methods for convex programming and variational inequalities. SIAM Journal on Optimization, 7(4):951–965, 1997. [37] S. Vicente, V. Kolmogorov, and C. Rother. Joint optimization of segmentation and appearance models. In Int. Conference on Computer Vision (ICCV), 2009. [38] J. Von Neumann. Functional Operators: The Geometry of Orthogonal Spaces. Princeton University Press, 1950. 9
2014
258
5,356
Efficient Inference of Continuous Markov Random Fields with Polynomial Potentials Shenlong Wang University of Toronto slwang@cs.toronto.edu Alexander G. Schwing University of Toronto aschwing@cs.toronto.edu Raquel Urtasun University of Toronto urtasun@cs.toronto.edu Abstract In this paper, we prove that every multivariate polynomial with even degree can be decomposed into a sum of convex and concave polynomials. Motivated by this property, we exploit the concave-convex procedure to perform inference on continuous Markov random fields with polynomial potentials. In particular, we show that the concave-convex decomposition of polynomials can be expressed as a sum-of-squares optimization, which can be efficiently solved via semidefinite programing. We demonstrate the effectiveness of our approach in the context of 3D reconstruction, shape from shading and image denoising, and show that our method significantly outperforms existing techniques in terms of efficiency as well as quality of the retrieved solution. 1 Introduction Graphical models are a convenient tool to illustrate the dependencies among a collection of random variables with potentially complex interactions. Their widespread use across domains from computer vision and natural language processing to computational biology underlines their applicability. Many algorithms have been proposed to retrieve the minimum energy configuration, i.e., maximum a-posteriori (MAP) inference, when the graphical model describes energies or distributions defined on a discrete domain. Although this task is NP-hard in general, message passing algorithms [16] and graph-cuts [4] can be used to retrieve the global optimum when dealing with tree-structured models or binary Markov random fields composed out of sub-modular energy functions. In contrast, graphical models with continuous random variables are much less well understood. A notable exception is Gaussian belief propagation [31], which retrieves the optimum when the potentials are Gaussian for arbitrary graphs under certain conditions of the underlying system. Inspired by discrete graphical models, message-passing algorithms based on discrete approximations in the form of particles [6, 17] or non-linear functions [27] have been developed for general potentials. They are, however, computationally expensive and do not perform well when compared to dedicated algorithms [20]. Fusion moves [11] are a possible alternative, but they rely on the generation of good proposals, a task that is often difficult in practice. Other related work focuses on representing relations on pairwise graphical models [24], or marginalization rather than MAP [13]. In this paper we study the case where the potentials are polynomial functions. This is a very general family of models as many applications such as collaborative filtering [8], surface reconstruction [5] and non-rigid registration [30] can be formulated in this way. Previous approaches rely on either polynomial equation system solvers [20], semi-definite programming relaxations [9, 15] or approximate message-passing algorithms [17, 27]. Unfortunately, existing methods either cannot cope with large-scale graphical models, and/or do not have global convergence guarantees. In particular, we exploit the concave-convex procedure (CCCP) [33] to perform inference on continuous Markov random fields (MRFs) with polynomial potentials. Towards this goal, we first show that an arbitrary multivariate polynomial function can be decomposed into a sum of a convex and 1 a concave polynomial. Importantly, this decomposition can be expressed as a sum-of-squares optimization [10] over polynomial Hessians, which is efficiently solvable via semidefinite programming. Given the decomposition, our inference algorithm proceeds iteratively as follows: at each iteration we linearize the concave part and solve the resulting subproblem efficiently to optimality. Our algorithm inherits the global convergence property of CCCP [25]. We demonstrate the effectiveness of our approach in the context of 3D reconstruction, shape from shading and image denoising. Our method proves superior in terms of both computational cost and the energy of the solutions retrieved when compared to approaches such as dual decomposition [20], fusion moves [11] and particle belief propagation [6]. 2 Graphical Models with Continuous Variables and Polynomial Functions In this section we first review inference algorithms for graphical models with continuous random variables, as well as the concave-convex procedure. We then prove existence of a concave-convex decomposition for polynomials and provide a construction. Based on this decomposition and construction, we propose a novel inference algorithm for continuous MRFs with polynomial potentials. 2.1 Graphical Models with Polynomial Potentials The MRFs we consider represent distributions defined over a continuous domain X = Q i Xi, which is a product-space assembled by continuous sub-spaces Xi ⊂R. Let x ∈X be the output configuration of interest, e.g., a 3D mesh or a denoised image. Note that each output configuration tuple x = (x1, · · · , xn) subsumes a set of random variables. Graphical models describe the energy of the system as a sum of local scoring functions, i.e., f(x) = P r∈R fr(xr). Each local function fr(xr) : Xr →R depends on a subset of variables xr = (xi)i∈r defined on a domain Xr ⊆X, which is specified by the restriction often referred to as region r ⊆{1, . . . , n}, i.e., Xr = Q i∈r Xi. We refer to R as the set of all restrictions required to compute the energy of the system. We tackle the problem of maximum a-posteriori (MAP) inference, i.e., we want to find the configuration x∗having the minimum energy. This is formally expressed as x∗= arg min x X r∈R fr(xr). (1) Solving this program for general functions is hard. In this paper we focus on energies composed of polynomial functions. This is a fairly general case, as the energies employed in many applications obey this assumption. Furthermore, for well-behaved continuous non-polynomial functions (e.g., k-th order differentiable) polynomial approximations could be used (e.g., via a Taylor expansion). Let us define polynomials more formally: Definition 1. A d-degree multivariate polynomial f(x) : Rn →R is a finite linear combination of monomials, i.e., f(x) = X m∈M cmxm1 1 xm2 2 · · · xmn n , where we let the coefficient cm ∈R and the tuple m = (m1, . . . , mn) ∈M ⊆Nn with Pn i=1 mi ≤ d ∀m ∈M. The set M subsumes all tuples relevant to define the function f. We are interested in minimizing Eq. (1) where the potential functions fr are polynomials with arbitrary degree. This is a difficult problem as polynomial functions are in general non-convex. Moreover, for many applications of interest we have to deal with a large number of variables, e.g., more than 60,000 when reconstructing shape from shading of a 256 × 256 image. Optimal solutions exist under certain conditions when the potentials are Gaussian [31], i.e., polynomials of degree 2. Message passing algorithms have not been very successful for general polynomials due to the fact that the messages are continuous functions. Discrete [6, 17] and non-parametric [27] approximations have been employed with limited success. Furthermore, polynomial system solvers [20], and moment-based methods [9] cannot scale up to such a large number of variables. Dual-decomposition provides a plausible approach for tackling large-scale problems by dividing the task into many small sub-problems [20]. However, solving a large number of smaller systems is still a bottleneck, and decoding the optimal solution from the sub-problems might be difficult. In contrast, we propose to use the Concave-Convex Procedure (CCCP) [33], which we now briefly review. 2 2.2 Inference via CCCP CCCP is a majorization-minimization framework for optimizing non-convex functions that can be written as the sum of a convex and a concave part, i.e., f(x) = fvex(x) + fcave(x). This framework has recently been used to solve a wide variety of machine learning tasks, such as learning in structured models with latent variables [32, 22], kernel methods with missing entries [23] and sparse principle component analysis [26]. In CCCP, f is optimized by iteratively computing a linearization of the concave part at the current iterate x(i) and solving the resulting convex problem x(i+1) = arg min x fvex(x) + xT ∇fcave(x(i)). (2) This process is guaranteed to monotonically decrease the objective and it converges globally, i.e., for any point x (see Theorem 2 of [33] and Theorem 8 [25]). Moreover, Salakhutdinov et al. [19] showed that the convergence rate of CCCP, which is between super-linear and linear, depends on the curvature ratio between the convex and concave part. In order to take advantage of CCCP to solve our problem, we need to decompose the energy function into a sum of convex and concave parts. In the next section we show that this decomposition always exists. Furthermore, we provide a procedure to perform this decomposition given general polynomials. 2.3 Existence of a Concave-Convex Decomposition of Polynomials Theorem 1 in [33] shows that for all arbitrary continuous functions with bounded Hessian a decomposition into convex and concave parts exists. However, Hessians of polynomial functions are not bounded in Rn. Furthermore, [33] did not provide a construction for the decomposition. In this section we show that for polynomials this decomposition always exists and we provide a construction. Note that since odd degree polynomials are unbounded from below, i.e., not proper, we only focus on even degree polynomials in the following. Let us therefore consider the space spanned by polynomial functions with an even degree d. Proposition 1. The set of polynomial functions f(x) : Rn →R with even degree d, denoted Pn d , is a topological vector space. Furthermore, its dimension dim(Pn d ) =  n + d −1 d  . Proof. (Sketch) According to the definition of vector spaces, we know that the set of polynomial functions forms a vector space over R. We can then show that addition and multiplication over the polynomial ring Pn d is continuous. Finally, dim(Pn d ) is equivalent to computing a d-combination with repetition from n elements [3]. Next we investigate the geometric properties of convex even degree polynomials. Lemma 1. Let the set of convex polynomial functions c(x) : Rn →R with even degree d be Cn d . This subset of Pn d is a convex cone. Proof. Given two arbitrary convex polynomial functions f and g ∈Cn d , let h = af +bg with positive scalars a, b ∈R+. ∀x, y ∈Rn, ∀λ ∈[0, 1], we have: h(λx + (1 −λ)y) = af(λx + (1 −λ)y) + bg(λx + (1 −λ)y) ≤a(λf(x) + (1 −λ)f(y)) + b(λh(x) + (1 −λ)h(y)) = λh(x) + (1 −λ)h(y). Therefore, ∀f, g ∈Cn d , ∀a, b ∈R+, we have af + bg ∈Cn d , i.e., Cn d is a convex cone. We now show that the eigenvalues of the Hessian of f (hence the smallest one) continuously depend on f ∈Pn d . Proposition 2. For any polynomial function f ∈Pn d with d ≥2, the eigenvalues of its Hessian eig(∇2f(x)) are continuous w.r.t. f in the polynomial space Pn d . Proof. ∀f ∈Pn d , given a basis {gi} of Pn d , we obtain the representation f = P i cigi, linear in the coefficients ci. It is easy to see that ∀f ∈Pn d , the Hessian ∇2f(x) is a polynomial matrix, linear in ci, i.e., ∇2f(x) = P i ci∇2gi(x). Let M(c1, · · · , cn) = ∇2f(x) = P i ci∇2gi(x) define the Hessian as a function of the coefficients (c1, · · · , cn). The eigenvalues eig(M(c1, · · · , cn)) are 3 equivalent to the root of the characteristic polynomial of M(c1, · · · , cn), i.e., the set of solutions for det(M −λI) = 0. All the coefficients of the characteristic polynomial are polynomial expressions w.r.t. the entries of M, hence they are also polynomial w.r.t. (c1, · · · , cn) since each entry of M is linear on (c1, · · · , cn). Therefore, the coefficients of the characteristic polynomial are continuously dependent on (c1, · · · , cn). Moreover, the root of a polynomial is continuously dependent on the coefficients of the polynomial [28]. Based on these dependencies, eig(M(c1, · · · , cn)) are continuously dependent on (c1, · · · , cn), and eig(M(c1, · · · , cn)) are continuous w.r.t. f in the polynomial space Pn d . The following proposition illustrates that the relative interior of the convex cone of even degree polynomials is not empty. Proposition 3. For an even degree function space Pn d , there exists a function f(x) ∈Pn d , such that ∀x ∈Rn, the Hessian is strictly positive definite, i.e., ∇2f(x) ≻0. Hence the relative interior of Cn d is not empty. Proof. Let f(x) = P i xd i + P i x2 i ∈Pn d . It follows trivially that ∇2f(x) = diag  d(d −1)xd−2 1 + 2, d(d −1)xd−2 2 + 2, · · · , d(d −1)xd−2 n + 2  ≻0 ∀x. Given the above two propositions it follows that the dimensionality of Cn d and Pn d is identical. Lemma 2. The dimension of the polynomial vector space is equal to the dimension of the convex even degree polynomial cone having the same degree d and the same number of variables n, i.e., dim(Cn d ) = dim(Pn d ). Proof. According to Proposition 3, there exists a function f ∈Pn d , with strictly positive definite Hessian, i.e., ∀x ∈Rn, eig(∇2f(x)) > 0. Consider a polynomial basis {gi} of Pn d . Consider the vector of eigenvalues E(ˆci) = eig(∇2(f(x) + ˆcigi)). According to Proposition 2, E(ˆci) is continuous w.r.t. ˆci, and E(0) is an all-positive vector. According to the definition of continuity, there exists an ϵ > 0, such that E(ˆci) > 0, ∀ˆci ∈{c : |c| < ϵ}. Hence, there exists a nonzero constant ˆci such that the polynomial f + ˆcigi is also strictly convex. We can construct such a strictly convex polynomial ∀gi. Therefore the polynomial set f + ˆcigi is linearly independent and hence a basis of Cn d . This concludes the proof. Lemma 3. The linear span of the basis of Cn d is Pn d Proof. Suppose Pn d is N-dimensional. According to Lemma 2, Cn d is also N-dimensional. Denote {g1, g2, · · · gN} a basis of Cn d . Assume there exists h ∈Pn d such that h cannot be linearly represented by {g1, g2, · · · gN}. We have {g1, g2, · · · , gN, h} are N +1 linear independent vectors in Pn d , which is in contradiction with Pn d being N-dimensional. Theorem 1. ∀f ∈Pn d , there exist convex polynomials h, g ∈Cn d such that f = h −g. Proof. Let the basis of Cn d be {g1, g2, · · · , gN}. According to Lemma 3, there exist coefficients c1, · · · , cN, such that f = c1g1 + c2g2 + · · · + cNgN. We can partition the coefficients into two sets, according to their sign, i.e., f = P ci≥0 cigi + P cj<0 cjgj. Let h = P ci≥0 cigi and g = −P cj<0 cjgj. We have f = h −g, while both h and g are convex polynomials. According to Theorem 1 there exists a concave-convex decomposition given any polynomial, where both the convex and concave parts are also polynomials with degree no greater than the original polynomial. As long as we can find  n + d −1 d  linearly independent convex polynomial basis functions for any arbitrary polynomial function f ∈Pn d , we obtain a valid decomposition by looking at the sign of the coefficients. It is however worth noting that the concave-convex decomposition is not unique. In fact, there is an infinite number of decompositions, trivially seen by adding and subtracting an arbitrary convex polynomial to an existing decomposition. Finding a convex basis is however not an easy task, mainly due to the difficulties on checking convexity and the exponentially increasing dimension. Recently, Ahmadi et al. [1] proved that even deciding on the convexity of quartic polynomials is NP-hard. 4 Algorithm 1 CCCP Inference on Continuous MRFs with Polynomial Potentials Input: Initial estimation x0 ∀r find fr(xr) = fr,vex(xr) + fr,cave(xr) via Eq. (4) or via a polynomial basis (Theorem 1) repeat solve x(i+1) = arg minx P r fr,vex(xr) + xT ∇x(P r∈R fr,cave(x(i) r )) with L-BFGS. until convergence Output: x∗ 2.4 Constructing a Concave-Convex Decomposition of Polynomials In this section we derive an algorithm to construct the concave-convex decomposition of arbitrary polynomials. Our algorithm first constructs the convex basis of the polynomial vector space Pn d before extracting a convex polynomial containing the target polynomial via a sum-of-squares (SOS) program. More formally, given a non-convex polynomial f(x) we are interested in constructing a convex function h(x) = f(x) + P i cigi(x), with gi(x), i = {1, . . . , m}, the set of all convex monomials with degree no grater than deg(f(x)). From this it follows that fvex = h(x) and fcave = −P i cigi(x). In particular, we want a convex function h(x), with coefficients ci as small as possible: min c wT c s.t. ∇2f(x) + X i ci∇2gi(x) ≻0 ∀x ∈Rn, (3) with the objective function being a weighted sum of coefficients. The weight vector w can encode preferences in the minimization, e.g., smaller coefficients for larger degrees. This minimization problem is NP-hard. If it was not, we could decide whether an arbitrary polynomial f(x) is convex by solving such a program, which contradicts the NP-hardness result of [1]. Instead, we utilize a tighter set of constraints, i.e., sum-of-square constraints, which are easier to solve [14]. Definition 2. For an even degree polynomial f(x) ∈Pn d , with d = 2m, f is an SOS polynomial if and only if there exist g1, . . . , gk ∈Pn m such that f(x) = Pk i=1 gi(x)2. Thus, instead of solving the NP-hard program stated in Eq. (3), we optimize: min c wT c s.t. ∇2f(x) + X i ci∇2gi(x) ∈SOS. (4) The set of SOS Hessians is a subset of the positive definite Hessians [9]. Hence, every solution of this problem can be considered a valid construction. Furthermore, the sum-of-squares optimization in Eq. (4) can be formulated as an efficiently solvable semi-definite program (SDP) [10, 9]. It is important to note that the gap between the SOS Hessians and the positive definite Hessians increases as the degree of the polynomials grows. Hence using SOS constraints we might not find a solution, even though there exists one for the original program given in Eq. (3). In practice, SOS optimization works well for monomials and low-degree polynomials. For pairwise graphical models with arbitrary degree polynomials, as well as for graphical models of order up to four with maximum fourth order degree polynomials, we are guaranteed to find a decomposition. This is due to the fact that SOS convexity and polynomial convexity coincide (Theorem 5.2 in [2]). Most practical graphical models are within this set. Known counter-examples [2] are typically found using specific tools. We summarize our algorithm in Alg. 1. Given a graphical model with polynomial potentials with degree at most d, we obtain a concave-convex decomposition by solving Eq. (4). This can be done for the full polynomial or for each non-convex monomial. We then apply CCCP in order to perform inference, where we solve a convex problem at each iteration. In particular, we employ L-BFGS, mainly due to its super-linear convergence and its storage efficiency [12]. In each L-BFGS step, we apply a line search scheme based on the Wolfe conditions [12]. 2.5 Extensions Dealing with very large graphs: Motivated by recent progress on accelerating graphical model inference [7, 21, 20], we can handle large-scale problems by employing dual decomposition and using our approach to solve the sub-problems. Non-polynomial cases: We have described our method in the context of graphical models with polynomial potentials. It can be extended to the non-polynomial case if the involved functions have 5 L-BFGS PCBP FusionMove ADMM-Poly Ours Energy 10736.4 6082.7 4317.7 3221.1 3062.8 RMSE (mm) 4.98 4.50 2.95 3.82 3.07 Time (second) 0.11 56.60 0.12 18.32 8.70 (×2) Table 1: 3D Reconstruction on 3 × 3 meshes with noise variance σ = 2. 10 0 10 2 9 10 11 12 13 14 15 16 Time (seconds) Log−scale Energy Real Data 3D Reconstruction Energy Evolution ADMM−Poly Ours (a) Synthetic meshes 10 0 10 1 10 10.5 11 11.5 12 12.5 13 Time (seconds) Log−scale Energy Synthetic 3× 3 Mesh Energy Evolution ADMM−Poly Ours (b) Cardboard meshes 10 −5 10 0 10 5 −10 −5 0 5 Time (seconds) Log−scale Energy Shape−from−shading Energy Evolution Curve ADMM−Poly LBFGS Ours (c) Shape-from-Shading 10 1 10 2 10 3 14.89 14.9 14.91 14.92 14.93 14.94 14.95 Time (seconds) Log−scale Energy FoE Energy Evolution GradDesc LBFGS Ours (d) Denoising Figure 1: Average energy evolution curve for different applications. bounded Hessians, since we can still construct the concave-convex decomposition. For instance, for the Lorentzian regularizer ρ(x) = log(1 + x2 2 ), we note that ρ(x) = {log(1 + x2 2 ) + x2 8 } −x2 8 is a valid concave-convex decomposition. We refer the reader to the supplementary material for a detailed proof. Alternatively, we can approximate any continuous function with polynomials by employing a Taylor expansion around the current iterate, and updating the solution via one CCCP step within a trust region. 3 Experimental Evaluation We demonstrate the effectiveness of our approach using three different applications: non-rigid 3D reconstruction, shape from shading and image denoising. We refer the reader to the supplementary material for more figures as well as an additional toy experiment on a densely connected graph with box constraints. 3.1 Non-rigid 3D Reconstruction We tackle the problem of deformable surface reconstruction from a single image. Following [30], we parameterize the 3D shape via the depth of keypoints. Let x ∈RN be the depth of N points. We follow the locally isometric deformation assumption [20], i.e., the distance between neighboring keypoints remains constant as the non-rigid surface deforms. The 3D reconstruction problem is then formulated as min x X (i,j)∈N ∥xiqi −xjqj∥2 −d2 i,j 2 , (5) where di,j is the distance between keypoints (given as input), N is the set of all neighboring pixels, xi is the unknown depth of point i, qi = A−1(ui, vi, 1)T is the line-of-sight of pixel i with A denoting the known internal camera parameters. We consider a six-neighborhod system, i.e., up, down, left, right, upper-left and lower-right. Note that each pairwise potential is a four-degree nonconvex polynomial with two random variables. We can easily decompose it into 15 monomials, and perform a concave-convex decomposition given the corresponding convex polynomials (see supplementary material for an example). We first conduct reconstruction experiments on the 100 randomly generated 3 × 3 meshes of [20], where zero-mean Gaussian noise with standard deviation σ = 2 is added to each observed keypoint coordinate. We compare our approach to Fusion Moves [30], particle convex belief propagation (PCBP) [17], L-BFGS as well as dual decomposition with the alternating direction method of multipliers using a polynomial solver (ADMM-Poly) [20]. We employ three different metrics, energy at convergence, running time and root mean square error (RMSE). For L-BFGS and our method, we use a flat mesh as initialization with two rotation angles (0, 0, 0) and (π/4, 0, 0). The convergence criteria is an energy decrease of less than 10−5 or a maximum of 500 iterations is reached. As shown in Table 1 our algorithm achieves lower energy, lower RMSE, and faster running time than ADMM-Poly and PCBP. Furthermore, as shown in Fig. 1(a) the time for running our algorithm to convergence is similar to a single iteration of ADMM-Poly, while we achieve much lower energy. 6 L-BFGS CLVM ADMM-Poly Ours Energy 736.98 N/A 905.37 687.21 RMSE (mm) 4.16 7.23 5.68 3.29 Time (second) 0.3406 N/A 314.8 10.16 Table 2: 3D Reconstruction on Cardboard sequences. 0 5 10 15 20 500 1000 1500 2000 Sample Index Energy Convergent Energy for Samples Ours ADMM−Poly 10 0 10 2 10 4 6 8 10 12 14 16 Log−Energy Evolution Curve (4th Sample) Time (log scale) Log−Energy Ours ADMM−Poly −50 0 50 −50 0 50 100 150 200 ADMM−Poly, Error: 4.9181 mm −50 0 50 −50 0 50 100 150 200 Ours, Error: 2.1997 mm −50 0 50 −50 0 50 100 150 200 GroundTruth Figure 2: 3D reconstruction results on Cardboard. Left to right: sample comparison, energy curve, groundtruth, ADMM-Poly and our reconstruction. 0 10 20 30 0 5 10 15 20 Time (sceonds) Log−Energy Log−Energy evolution curve 20406080100120 20 40 60 80 100 120 0 10 20 Iteration: 98, Energy: 81.564, Time: 28.549 Iteration: 98, RMSE: 0.012595, Time: 28.549 GroundTruth Figure 3: Shape-from-Shading results on Penny. Left to right: energy curve, inferred shape, rendered image with inferred shape, groundtruth image. We next reconstruct the real-world 9×9 Cardboard sequence [20]. We compare with both ADMMPoly and L-BFGS in terms of energy, time and RMSE. We also compare with the constrained latent variable model of [29], in terms of RMSE. We cannot compare the energy value since the energy function is different. Again, we use a flat mesh as initialization. As shown in Table 2, our algorithm outperforms all baselines. Furthermore, it is more than 20 times faster than ADMM-Poly, which is the second best algorithm. Average energy as a function of time is shown in Fig. 1(b). We refer the reader to Fig. 2 and the video in the supplementary material for a visual comparison between ADMM-Poly and our method. From the first subfigure we observe that our method achieves lower energy for most samples. The second subfigure illustrate the fact that our approach monotonically decreases the energy, as well as our method being much faster than ADMM-Poly. 3.2 Shape-from-Shading Following [5, 20], we formulate the shape from shading problem with 3rd-order 4-th degree polynomial functions. Let xi,j = (ui,j, vi,j, wi,j)T be the 3D coordinates of each triangle vertex. Under the Lambertian model assumption, the intensity of a triangle r is represented as: Ir = l1pr+l2qr+l3 √ p2r+q2r+1 , where l = (l1, l2, l3)T is the direction of the light, pr and qr are the x and y coordinates of normal vector nr = (pr, qr, 1)T , which is computed as pr = (vi,j+1−vi,j)(wi+1,j−wi,j)−(vi+1,j−vi,j)(wi,j+1−wi,j) (ui,j+1−ui,j)(vi+1,j−vi,j)−(ui+1,j−ui,j)(vi,j+1−vi,j) and pr = (ui,j+1−ui,j)(wi+1,j−wi,j)−(ui+1,j−ui,j)(wi,j+1−wi,j) (ui,j+1−ui,j)(vi+1,j−vi,j)−(ui+1,j−ui,j)(vi,j+1−vi,j) , respectively. Each clique r represents a triangle, which is constructed by three neighboring points on the grid, i.e., either (xi,j, xi,j+1, xi+1,j) or (xi,j, xi,j−1, xi+1,j). Given the rendered image and lighting direction, shape from shading is formulated as min w X r∈R (p2 r + q2 r + 1)I2 r −(l1pr + l2qr + l3)22 . (6) We tested our algorithm on the Vase, Penny and Mozart datasets, where Vase and Penny are 128×128 images and Mozart is a 256 × 256 image with light direction l = (0, 0, 1)T . The energy evolution curve, the inferred shape as well as the rendered and groud-truth images are illustrated in Fig. 3. See the supplementary material for more figures on Penny and Mozart. Our algorithm achieves very low energy, producing very accurate results in only 30 seconds. ADMM-Poly hardly runs on such large-scale data due to the computational cost of the polynomial system solver (more than 2 hours 7 L-BFGS GradDesc Ours Energy 29547 29598 29413 PSNR 30.96 31.56 31.43 Time (sec) 189.5 1122.5 384.5 Table 3: FoE Energy Minimization Results. Clean Image Noisy Image, PSNR: 24.5952 GradDesc, PSNR: 31.0689 Ours, PSNR: 30.9311 L−BFGS, PSNR: 30.7695 0 50 100 150 11.41 11.42 11.43 11.44 11.45 11.46 Time (seconds) Energy (log−scale) Energy evolution curve for FoE GradDesc LBFGS Ours Figure 4: FoE based image denoising results on Cameraman, σ = 15. per iteration). In order to compare with ADMM-Poly, we also conduct the shape from shading experiment on a scaled 16 × 16 version of the Vase data. Both methods retrieve a shape that is very close to the global optimum (0.00027 for ADMM-Poly and 0.00032 for our approach), however, our algorithm is over 500 times faster than ADMM-Poly (2250 seconds for ADMM-Poly and 13.29 seconds for our proposed method). The energy evolution curve on the 16 × 16 re-scaled image in shown in Fig. 1(c). 3.3 Image Denoising We formulate image denoising via minimizing the Fields-of-Experts (FoE) energy [18]. The data term encodes the fact that the recovered image should be close to the noisy input, where closeness is weighted by the noise level σ. Given a pre-learned linear filterbank of ‘experts’ {Ji}i=1,...,K, the image prior term encodes the fact that natural images are Gibbs distributed via p(x) = 1 Z exp(Q r∈R QK i=1(1 + 1 2(JT i xr)2)αi). Thus we formulate denoising as min x λ σ2 ∥x −y∥2 2 + X r∈R K X i=1 αi log(1 + 1 2(JT i xr)2), (7) where y is the noisy image input, x is the clean image estimation, r indexes 5 × 5 cliques and i is the index for each FoE filter. Note that this energy function is not a polynomial function. However, for each FoE model, the Hessian of the energy function log(1 + 1 2(JT i xr)2) is lower bounded by −JT i Ji 8 (proof in the supplementary material). Therefore, we simply add an extra term γxT r xr with γ > JT i Ji 8 to obtain the concave-convex decomposition log(1+ 1 2(JT i xr)2) = {log(1+ 1 2(JT i xr)2)+ γxT r xr} −γxT r xr. We utilize a pre-trained 5 × 5 filterbank with 24 filters, and conduct experiments on the BM3D benchmark 1 with noise level σ = 15. In addition to the other baselines, we compare to the original FoE inference algorithm, which essentially is a first-order gradient descent method with fixed gradient step [18]. For L-BFGS, we set the maximum number of iterations to 10,000, to make sure that the algorithm converges. As shown in Table 3 and Fig. 1(d), our algorithm achieves lower energy than L-BFGS and first-order gradient descent. Furthermore, we see that lower energy does not translate to higher PSNR, showing the limitation of FoE as an image prior. 4 Conclusions We investigated the properties of polynomials, and proved that every multivariate polynomial with even degree can be decomposed into a sum of convex and concave polynomials with degree no greater than the original one. Motivated by this property, we exploited the concave-convex procedure to perform inference on continuous Markov random fields with polynomial potentials. Our algorithm is especially fit for solving inference problems on continuous graphical models, with a large number of variables. Experiments on non-rigid reconstruction, shape-from-shading and image denoising validate the effectiveness of our approach. We plan to investigate continuous inference with arbitrary differentiable functions, by making use of polynomial approximations as well as tighter concave-convex decompositions. 1http://www.cs.tut.fi/˜foi/GCF-BM3D/ 8 References [1] A. A. Ahmadi, A. Olshevsky, P. A. Parrilo, and J. N. Tsitsiklis. Np-hardness of deciding convexity of quartic polynomials and related problems. Mathematical Programming, 2013. [2] A. A. Ahmadi and P. A. Parrilo. A complete characterization of the gap between convexity and sosconvexity. SIAM J. on Optimization, 2013. [3] K. Batselier, P. Dreesen, and B. D. Moor. The geometry of multivariate polynomial division and elimination. SIAM Journal on Matrix Analysis and Applications, 2013. [4] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. PAMI, 2001. [5] A. Ecker and A. D. Jepson. Polynomial shape from shading. In CVPR, 2010. [6] A. T. Ihler and D. A. McAllester. Particle belief propagation. In AISTATS, 2009. [7] N. Komodakis, N. Paragios, and G. Tziritas. Mrf energy minimization and beyond via dual decomposition. PAMI, 2011. [8] Y. Koren, R. Bell, and C. Volinsky. Matrix factorization techniques for recommender systems. Computer, 2009. [9] J. B. Lasserre. Global optimization with polynomials and the problem of moments. SIAM Journal on Optimization, 2001. [10] J. B. Lasserre. Convergent sdp-relaxations in polynomial optimization with sparsity. SIAM Journal on Optimization, 2006. [11] V. Lempitsky, C. Rother, S. Roth, and A. Blake. Fusion moves for markov random field optimization. PAMI, 2010. [12] J. Nocedal and S. J. Wright. Numerical optimization 2ed. Springer-Verlag, 2006. [13] N. Noorshams and M. J. Wainwright. Belief propagation for continuous state spaces: Stochastic messagepassing with quantitative guarantees. JMLR, 2013. [14] A. Papachristodoulou, J. Anderson, G. Valmorbida, S. Prajna, P. Seiler, and P. Parrilo. Sostools version 3.00 sum of squares optimization toolbox for matlab. arXiv:1310.4716, 2013. [15] P. A. Parrilo. Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization. PhD thesis, Caltech, 2000. [16] J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988. [17] J. Peng, T. Hazan, D. McAllester, and R. Urtasun. Convex max-product algorithms for continuous mrfs with applications to protein folding. In ICML, 2011. [18] S. Roth and M. J. Black. Fields of experts. IJCV, 2009. [19] R. Salakhutdinov, S. Roweis, and Z. Ghahramani. On the convergence of bound optimization algorithms. In UAI, 2002. [20] M. Salzmann. Continuous inference in graphical models with polynomial energies. In CVPR, 2013. [21] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Distributed Message Passing for Large Scale Graphical Models. In CVPR, 2011. [22] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Efficient Structured Prediction with Latent Variables for General Graphical Models. In ICML, 2012. [23] A. Smola, S. Vishwanathan, and T. Hofmann. Kernel methods for missing variables. AISTATS, 2005. [24] L. Song, A. Gretton, D. Bickson, Y. Low, and C. Guestrin. Kernel belief propagation. In AISTATS, 2011. [25] B. Sriperumbudur and G. Lanckriet. On the convergence of the concave-convex procedure. In NIPS, ’09. [26] B. Sriperumbudur, D. Torres, and G. Lanckriet. Sparse eigen methods by dc programming. In ICML, ’07. [27] E. B. Sudderth, A. T. Ihler, M. Isard, W. T. Freeman, and A. S. Willsky. Nonparametric belief propagation. Communications of the ACM, 2010. [28] D. J. Uherka and A. M. Sergott. On the continuous dependence of the roots of a polynomial on its coefficients. American Mathematical Monthly, 1977. [29] A. Varol, M. Salzmann, P. Fua, and R. Urtasun. A constrained latent variable model. In CVPR, 2012. [30] S. Vicente and L. Agapito. Soft inextensibility constraints for template-free non-rigid reconstruction. In ECCV, 2012. [31] Y. Weiss and W. T. Freeman. Correctness of belief propagation in gaussian graphical models of arbitrary topology. Neural computation, 2001. [32] C. N. Yu and T. Joachims. Learning structural svms with latent variables. In ICML, 2009. [33] A. L. Yuille and A. Rangarajan. The concave-convex procedure. Neural Computation, 2003. 9
2014
259
5,357
Extracting Latent Structure From Multiple Interacting Neural Populations Jo˜ao D. Semedo1,2,3, Amin Zandvakili4, Adam Kohn4, ∗Christian K. Machens3, ∗Byron M. Yu1,5 1Department of Electrical and Computer Engineering, Carnegie Mellon University 2Department of Electrical and Computer Engineering, Instituto Superior T´ecnico 3Champalimaud Neuroscience Programme, Champalimaud Center for the Unknown 4Dominick Purpura Department of Neuroscience, Albert Einstein College of Medicine 5Department of Biomedical Engineering, Carnegie Mellon University jsemedo@cmu.edu {amin.zandvakili,adam.kohn}@einstein.yu.edu christian.machens@neuro.fchampalimaud.org byronyu@cmu.edu ∗Denotes equal contribution. Abstract Developments in neural recording technology are rapidly enabling the recording of populations of neurons in multiple brain areas simultaneously, as well as the identification of the types of neurons being recorded (e.g., excitatory vs. inhibitory). There is a growing need for statistical methods to study the interaction among multiple, labeled populations of neurons. Rather than attempting to identify direct interactions between neurons (where the number of interactions grows with the number of neurons squared), we propose to extract a smaller number of latent variables from each population and study how these latent variables interact. Specifically, we propose extensions to probabilistic canonical correlation analysis (pCCA) to capture the temporal structure of the latent variables, as well as to distinguish within-population dynamics from across-population interactions (termed Group Latent Auto-Regressive Analysis, gLARA). We then applied these methods to populations of neurons recorded simultaneously in visual areas V1 and V2, and found that gLARA provides a better description of the recordings than pCCA. This work provides a foundation for studying how multiple populations of neurons interact and how this interaction supports brain function. 1 Introduction In recent years, developments in neural recording technologies have enabled the recording of populations of neurons from multiple brain areas simultaneously [1–7]. In addition, it is rapidly becoming possible to identify the types of neurons being recorded (e.g., excitatory versus inhibitory [8]). Enabled by these experimental advances, a major growing line of scientific inquiry is to ask how different populations of neurons interact, whether the populations correspond to different brain areas or different neuron types. To address such questions, we need statistical methods that are well-suited for assessing how different groups of neurons interact on a population level. One way to characterize multi-population activity is to have the neurons interact directly [9–11], then examine the properties of the interaction strengths. While this may be a reasonable approach for small populations of neurons, the number of interactions grows with the square of the number of recorded neurons, which may make it difficult to summarize how larger populations of neurons interact [12]. Instead, it may be possible to obtain a more succinct account by extracting latent variables for each population and asking how these latent variables interact. 1 (a) pCCA (b) AR-pCCA (c) gLARA Figure 1: Directed graphical models for multi-population activity. (a) Probabilistic canonical correlation analysis (pCCA). (b) pCCA with auto-regressive latent dynamics (AR-pCCA). (c) Group latent auto-regressive analysis (gLARA). For clarity, we show only two populations in each panel and auto-regressive dynamics of order 1 in panel (c). Dimensionality reduction methods have been widely used to extract succinct representations of population activity [13–17] (see [18] for a review). Each observed dimension corresponds to the spike count (or firing rate) of a neuron, and the goal is to extract latent variables that describe how the population activity varies across experimental conditions, experimental trials, and/or across time. These previous studies use dimensionality reduction methods that do not explicitly account for multiple populations of neurons. In other words, these methods are invariant to permutations of the ordering of the neurons (i.e., the observed dimensions). This work focuses on latent variable methods designed explicitly for studying the interaction between labelled populations of neurons. To motivate the need for these methods, consider applying a standard dimensionality reduction method, such as factor analysis (FA) [19], to all neurons together by ignoring the population labels. The extracted latent variables would capture all modes of covariability across the neurons, without distinguishing between-population interaction (i.e., the quantity of interest) from within-population interaction. Alternatively, one might first apply a standard dimensionality reduction method to each population of neurons individually, then examine how the latent variables extracted from each population interact. However, important features of the between-population interaction may be eliminated by the dimensionality reduction step, whose sole objective is to preserve the within-population interaction. We begin by considering canonical correlations analysis (CCA) and its probabilistic formulation (pCCA) [20], which identify a single set of latent variables that explicitly captures the betweenpopulation covariability. To understand how the different neural populations interact on different timescales, we propose extensions of pCCA that introduce a separate set of latent variables for each neural population, as well as dynamics on the latent variables to describe their interaction over time. We then apply the proposed methods to populations of neurons recorded simultaneously in visual areas V1 and V2 to demonstrate their utility. 2 Methods We consider the setting where many neurons are recorded simultaneously, and the neurons belong to distinct populations (either by brain area or by neuron type). Let yi t ∈Rqi represent the observed activity vector of population i ∈{1, ..., M} at time t ∈{1, ..., T}, where qi denotes the number of neurons in population i. Below, we consider three different ways to study the interaction between the neural populations. To keep the notation simple, we’ll only consider two populations (M = 2); the extension to more than two populations is straightforward. 2.1 Factor analysis and probabilistic canonical correlation analysis Consider the following latent variable model, that defines a linear-Gaussian relationship between the observed variables, y1 t and y2 t , and the latent state, xt ∈Rp: xt ∼N (0, I) (1) 2  y1 t y2 t  | xt ∼N  C1 C2  xt +  d1 d2  ,  R11 R12 R12T R22  (2) where Ci ∈Rqi×p, di ∈Rqi and:  R11 R12 R12T R22  ∈Sq ++ with q = q1 + q2. According to this model, the covariance of the observed variables is given by: cov  y1 t y2 t  =  C1 C2  h C1T C2T i +  R11 R12 R12T R22  (3) Factor analysis (FA) and probabilistic canonical correlation analysis (pCCA) can be seen as two special cases of the general model presented above. FA assumes the noise covariance to be diagonal, i.e., R11 = diag(r1 1, ..., r1 q1), R22 = diag(r2 1, ..., r2 q2) and R12 = 0. This noise covariance captures only the independent variance of each neuron, and not the covariance between neurons. As a result, the covariance between neurons is explained by the latent state through the observation matrices C1 and C2. pCCA, on the other hand, considers a block diagonal noise covariance, i.e., R12 = 0. This noise covariance accounts for the covariance observed between neurons in the same population. The latent state is therefore only used to explain the covariance between neurons in different populations. The directed graphical model for pCCA is shown in Fig.1a. 2.2 Auto-regressive probabilistic canonical correlation analysis (AR-pCCA) While pCCA offers a succinct picture of the covariance structure between populations of neurons, it does not capture any temporal structure. There are two main reasons as to why this time structure may be interesting. First, pCCA is modelling the covariance structure at zero time lag, which may not capture all of the interactions of interest. If the two populations of neurons correspond to two different brain areas, there may be important interactions at non-zero time lags due to physical delays in information transmission. Second, the two populations of neurons may interact at more than one time delay, for example if multiple pathways exist between the neurons in these populations. To take the temporal structure into account we will first extend pCCA by defining an auto-regressive linear-Gaussian model on the latent state: xt ∼N (0, I), if 1 ≤t ≤τ (4) xt | xt−1, xt−2, ..., xt−τ ∼N τ X k=1 Akxt−k, Q ! , if t > τ (5) where Ak ∈Rp×p, ∀k, Q ∈Sp ++ and τ denotes the order of the autoregressive model. We term this model AR-pCCA, which is defined by the state model in Eq.(4)-(5) and the observation model in Eq.(2) with R12 = 0. Although the observation model is the same as that for pCCA, the latent state here accounts for temporal dynamics, as well as the covariation structure between the populations. The corresponding directed graphical model is shown in Fig.1b. 2.3 Group latent auto-regressive analysis (gLARA) According to AR-pCCA, a single latent state drives the observed activity in both areas. As a result, it’s not possible to distinguish the within-population dynamics from the between-population interactions. To allow for this, we propose using two separate latent states, one per population, that interact over time. We refer to the proposed model as group latent auto-regressive analysis (gLARA): xt ∼N (0, I), if 1 ≤t ≤τ (6) xi t | xt−1, xt−2, ..., xt−τ ∼N   2 X j=1 τ X k=1 Aij k xj t−k, Qi  , if t > τ (7) 3  y1 t y2 t  | xt ∼N  C1 0 0 C2   x1 t x2 t  +  d1 d2  ,  R1 0 0 R2  (8) where xt is obtained by stacking x1 t ∈Rp1 and x2 t ∈Rp2, the latent states for each population, Ci ∈Rqi×pi, Aij k ∈Rpi×pj and Qi ∈Spi ++, ∀k and i ∈{1, 2}. Note that the covariance structure observed on a population level now has to be completely reflected by the latent states (there are no shared latent variables in this model) and is therefore defined by the dynamics matrices Aij k , allowing for the separation of the within-population dynamics (A11 k and A22 k ) and the between-population interactions (A12 k and A21 k ). Furthermore, the interaction between the populations is asymmetrically defined by A12 k and A21 k , allowing for a more in depth study of the way in each the two areas interact by comparing these across the various time delays considered. Note that gLARA represents a special case of the AR-pCCA model. 2.4 Parameter estimation for gLARA The parameters of gLARA can be fit to the training data using the expectation-maximization (EM) algorithm. To do so, we start by defining the augmented latent state ¯xt ∈Rpτ, with p = p1 + p2: ¯xt =  ¯x1 t ¯x2 t  = h x1 t T . . . x1 t−τ T x2 t T . . . x2 t−τ T iT (9) and the augmented observation vector ¯yt ∈Rq, with q = q1 + q2: ¯yt = h y1 t T y2 t T iT (10) for t ∈{τ, ..., T}. Using the augmented latent state ¯x, the dynamics equation (Eq.(6) and (7)) can be rewritten as: ¯xt ∼N (0, I), if t = τ (11) ¯xt | ¯xt−1 ∼N ¯A¯xt−1, ¯Q  , if t > τ (12) for appropriately structured ¯A ∈Rpτ×pτ and ¯Q ∈Spτ ++. The observation model (Eq.(8)) can be rewritten as: ¯yt | ¯xt ∼N  ¯C  ¯xt 1  , ¯R  (13) for appropriately structured ¯C ∈Rq×(pτ+1) and ¯R ∈Sq ++. Due to space constraints, we will not explicitly show the structure of the augmented parameters ¯θ = { ¯C, ¯R, ¯A, ¯Q}. It is straightforward to derive them by inspection of Eq.(9)-(13). We fit the model parameters using the EM algorithm. In the E-step, because the latent and observed variables are jointly Gaussian, P(¯xt | ¯y1, ..., ¯yT ) is also Gaussian and can be computed exactly by applying the forward-backward recursion of the Kalman smoother [21] on the augmented vectors. In the M-step, we directly estimate the original parameters θ = {Ci, di, Ri, Aij k }, as opposed to estimating the structured form of the augmented parameters ¯θ = { ¯C, ¯R, ¯A} (without loss of generality, we set Qi = I):  Ci di  = T X t=1 yi t h E(xi t T ) 1 i! T X t=1 " E(xi txi t T ) E(xi t) E(xi t T ) 1 #!−1 (14) Ri = 1 T T X t=1 {(yi t −di)(yi t T −di) −CiE(xi t)(yi t −di)T −(yi t −di)E(xi t T )CiT + CiE(xi txi t T )CiT } (15)  A11 1 . . . A11 k A12 1 . . . A12 k A21 1 . . . A21 k A22 1 . . . A22 k  = T X t=2 E ¯xt¯xT t−1  ! T X t=2 E ¯xt−1¯xT t−1  !−1 (16) To initialize the EM algorithm, we start by applying FA to each population individually, and use the estimated observation matrices C1 and C2, as well as the mean vectors d1 and d2 and the observation covariance matrices R11 and R22. The Aij k matrices are initialized at 0. 4 10 20 30 40 50 60 −4.795 −4.77 x 10 5 FA pCCA shufed pCCA latent dimensionality cross−validated log−likelihood Figure 2: Comparing the optimal dimensionality for FA and pCCA. (a) Cross-validated loglikelihood plotted as a function of the dimensionality of the latent state for FA (black) and pCCA (blue). pCCA was also applied to the same data after randomly shuffling the population labels (green). Note that maximum possible dimensionality for pCCA is 31, which is the size of the smaller of the two populations (in this case, V2). 2.5 Neural recordings The methods described above were applied to multi-electrode recordings performed simultaneously in visual area 1 (V1) and visual area 2 (V2) of an anaesthetised monkey, while the monkey was shown a set of oriented gratings with 8 different orientations. Each of the 8 orientations was shown 400 times for a period of 1.28s, providing a total of 3200 trials. We used 1.23s of data in each trial, from 50ms after stimulus onset until the end of the trial, and proceeded to bin the observed spikes with a 5ms window. The recordings include a total of 97 units in V1 and 31 units in V2 (single- and multi-units). For model comparison, we performed 4-fold cross-validation, splitting the data into four non-overlapping test folds with 250 trials each. We chose to analyze a subset of the trials for rapid iteration of the analyses, as the cross-validation procedure is computationally expensive for the full dataset. Given that 1000 trials provides a total of 246,000 timepoints (at 5 ms resolution), this provides a reasonable amount of data to fit any of the models with the 128 observed neurons. In this study, we sought to investigate how trial-to-trial population variability in V1 relates to the trial-to-trial population variability in V2. For these gratings stimuli (which are relatively simple compared to naturalistic stimuli [22]), there is likely richer structure in the V1-V2 interaction for the trial-to-trial variability than for the stimulus drive. To this end, we preprocessed the neural activity by computing the peristimulus time histogram (PSTH), representing the trial-averaged firing rate timecourse, for each neuron and experimental condition (grating orientation). For each spike train, we then subtracted the appropriate PSTH from the binned spike counts to obtain a single-trial “residual”. The residuals across all neurons and conditions were considered together in the analyses shown in Section 3. Note that the methods considered in this study could also be applied to the PSTHs of sequentially recorded neurons in multiple areas. 3 Results We started by asking how many dimensions are needed to describe the between-population covariance, relative to the number of dimensions needed to describe the within-population covariance. This was assessed by applying pCCA to the labeled V1 and V2 populations, as well as FA to the two populations together (which ignores the V1 and V2 labels). In this analysis, pCCA captures only the between-population covariance, whereas FA captures both the between-population and withinpopulation covariance. By comparing cross-validated data likelihoods for different dimensionalities, we found that pCCA required three latent dimensions, whereas FA required 40 latent dimensions (Fig.2). This indicates that the zero time lag interaction between V1 and V2 is confined to a small number of dimensions (three) relative to the number of dimensions (40) needed to describe all covariance among the neurons. The difference of these two dimensionalities (37) describes covariance that is ‘private’ to each population (i.e., within-population covariance). The FA and pCCA curves peak at similar cross-validated likelihoods in Fig.2 because the observation model for pCCA Eq.(2) accounts for the within-population covariance (which is not captured by the pCCA latents). 5 20 40 60 80 −4.62 −4.52 x 10 5 AR−pCCA gLARA latent dimensionality cross−validated log−likelihood (a) 10 20 30 40 50 τ = 1 τ = 5 τ = 3 latent dimensionality p1 (b) 5 10 15 20 25 τ = 1 τ = 5 τ = 3 latent dimensionality p2 (c) Figure 3: Model selection for AR-pCCA and gLARA. (a) Comparing AR-pCCA and gLARA as a function of the latent dimensionality (defined as p1 + p2 for gLARA, where p2 was fixed at 15), for τ = 3. (b) gLARA’s cross-validated log-likelihood plotted as a function of the dimensionality of V1’s latent state, p1 (for p2 = 15), for different choices of τ. (c) gLARA’s cross-validated loglikelihood plotted as a function of the dimensionality of V2’s latent state, p2 (for p1 = 50), for different choices of τ. The distinction between within-population covariance and between-population covariance is further supported by re-applying pCCA, but now randomly shuffling the population labels. The crossvalidated log-likelihood curve for these mixed populations now peaks at a larger dimensionality than three. The reason is that the shuffling procedure removes the distinction between the two types of covariance, such that the pCCA latents now capture both types of covariance (of the original unmixed populations). The peak for mixed pCCA occurs at a lower dimensionality than for FA for two reasons: i) because the mixed populations have the same number of neurons as the original populations (97 and 31), the maximum number of dimensions that can be identified by pCCA is 31, and ii) for the same latent dimensionality, pCCA has a larger number of parameters than FA, which makes pCCA more prone to overfitting. Together, the analyses in Fig.2 demonstrate two key points. First, if the focus of the analysis lies in the interaction between populations, then pCCA provides a more parsimonious description, as it focuses exclusively on the covariance between populations. In contrast, FA is unable to distinguish within-population covariance from between-population covariance. Second, the neuron groupings for V1 and V2 are meaningful, as the number of dimensions needed to describe the covariance between V1 and V2 is small relative to that within each population. We then analysed the performance of the models with latent dynamics (AR-pCCA and gLARA). The cross-validated log-likelihood for these models depends jointly on the dimensionality of the latent state, p, and the order of the auto-regressive model, τ. For gLARA, p is the sum of the dimensionalities of each population’s latent state, p1 + p2, and we therefore want to jointly maximize the cross-validated log-likelihood with respect to both p1 and p2. AR-pCCA required a latent dimensionality of p = 70, while gLARA peaked for a joint latent dimensionality of 65 (p1 = 50 and p2 = 15) (Fig.3a). When computing the performance of AR-pCCA we considered models with p ∈{5, 10, ..., 75} and τ ∈{1, 3, ..., 7} (Fig.3a shows the τ = 3 case). To access how gLARA’s cross-validated log-likelihood varied with the latent dimensionalities and the model order, we plotted it in Fig.3b, for p2 = 15 and p1 ∈{5, 10, ..., 50}, for different choices of τ. This showed that the performance is greater for an order 3 model, and that it saturates by the time p1 reaches 50. In Fig.3c, we did a similar analysis for the dimensionality of V2’s latent state, where p1 was held constant at 50 and p2 ∈{5, 10, ..., 25}. The cross-validated log-likelihood shows a clear peak at p2 = 15 regardless of τ. We found that, for both models, the cross-validated log-likelihood peaks for τ = 3 (see Fig.3b and 3c for gLARA, results not shown for AR-pCCA). Finally, we asked which model, AR-pCCA or gLARA, better describes the data. Note that gLARA is a special case of AR-pCCA, where the observation matrix in Eq.(8) is constrained to have a block diagonal structure (with blocks C1 and C2). The key difference between the two models is that gLARA assigns a non-overlapping set of latent variables to each population. We found that gLARA outperforms AR-pCCA (Fig.3a). This suggests that the extra flexibility of the AR-pCCA model 6 200 400 600 800 1000 1200 −40 40 time (ms) average activity (spikes/s) observed activity predicted activity V1 (a) 200 400 600 800 1000 1200 −20 20 time (ms) observed activity predicted activity V2 (b) Figure 4: Leave-one-neuron-out prediction using gLARA. Observed activity (black) and the leave-one-neuron-out prediction of gLARA (blue) for a representative held-out trial, averaged over (a) the V1 population and (b) the V2 population. Note that the activity can be negative because we are analyzing the single-trial residuals (cf. Section 2.5). leads to overfitting and that the data are better explained by considering two separate sets of latent variables that interact. The optimal latent dimensionalities found for AR-pCCA and gLARA are substantially higher than those found for pCCA, as the latent states now also capture non-zero time lag interactions between the populations, and the dynamics within each population. For gLARA, the between-population covariance must be accounted for by the interaction between the population-specific latents, x1 t and x2 t, because there are no shared latents in this model. Thus, the interaction between V1 and V2 is summarized by the A12 k and A21 k matrices. Also, both AR-pCCA and gLARA outperform FA and pCCA (comparing vertical axes in Fig.2 and 3), showing that there is meaningful temporal structure in how V1 and V2 interact that can be captured by these models. Having performed a systematic, relative comparison between AR-pCCA and gLARA models of different complexities, we asked how well the best gLARA model fit the data in an absolute sense. To do so, we used 3/4 of the data to fit the model parameters and performed leave-one-neuron-out prediction [15] on the remaining 1/4. This is done by estimating the latent states E x1 1,...,T | y1 1,...,T  and E x2 1,...,T | y2 1,...,T  using all but one neuron. This estimate of the latent state is then used to predict the activity of the neuron that was left out (the same procedure was repeated for each neuron). For visualization purposes, we averaged the predicted activity across neurons for a given trial and compared it to the recorded activity averaged across neurons for the same trial. We found that they indeed tracked each other, as shown in Fig.4 for a representative trial. Finally, we asked whether gLARA reveals differences in the time structures of the within-population dynamics and the between-population interactions. We computed the Frobenius norm of both the within-population dynamics matrices A11 k and A22 k (Fig.5a) and the between-population interaction matrices A12 k and A21 k (Fig.5b), for p1 = 50, p2 = 15 and τ = 3 (k ∈{1, 2, 3}), which is the model for which the cross-validated log-likelihood was the highest. The time structure of the withinpopulation dynamics appears to differ from that of the between-population interaction. In particular, the latents for each area depend more strongly on its own previous latents as the time delay increases up to 15 ms (Fig.5a). In contrast, the dependence between areas is stronger at time lags of 5 and 15 ms, compared to 10 ms (Fig.5b). Note that the peak of the cross-validated log-likelihood for τ = 3 (Fig.3) shows that delays longer than 15ms do not contribute to an increase in the accuracy of the model and, therefore, the most significant interactions between these areas may occur within this time window. The structure seen in Fig.5 is not present if the same analysis is performed on data that are shuffled across time (results not shown). Because the latent states may have different scales, it is not informative to compare the magnitude of A12 k and A21 k or A11 k and A22 k (A11 k and A22 k also have different dimensions). Thus, we divided the norms for each Aij k matrix by the respective maximum across k. 7 5 10 15 0.4 1 V1 à V1 V2 à V2 time delay (ms) Frobenius norm (a.u.) (a) 5 10 15 0.75 1 V2 à V1 V1 à V2 time delay (ms) (b) Figure 5: Temporal structure of coupling matrices for gLARA. (a) Frobenius norm of the withinpopulation dynamics matrices A11 k and A22 k , for k ∈{1, 2, 3}. Each curve was divided by its maximum value. (b) Same as (a) for the between-population interaction matrices A12 k and A21 k . 4 Discussion We started by applying standard methods, FA and pCCA, to neural activity recorded simultaneously from visual areas V1 and V2. We found that the neuron groupings by brain area are meaningful, as the covariance of the neurons across areas is lower dimensional than that within each area. We then proposed an extension to pCCA that takes temporal dynamics into account and allows for the separation of within-population dynamics from between-population interactions (gLARA). This method was then shown to provide a better characterization of the two-population neural activity than FA and pCCA. In the context of studying the interaction between populations of neurons, capturing the information flow is key to understanding how information is processed in the brain [3–7,23]. To do so, one must be able to characterize the directionality of these between-population interactions. Previous studies have sought to identify the directionality of interactions directly between neurons, using measures such as Granger causality [10] (and related extensions, such as directed transfer function (DTF) [24]), and directed information [11]. Here, we proposed to study between-population interaction on the level of latent variables, rather than of the neurons themselves. The advantage is that this approach scales better with the number of recorded neurons and provides a more succinct picture of the structure of these interactions. To detect fine timescale interactions, it may be necessary to replace the linear-Gaussian model with a point process model on the spike trains [25]. References [1] Xiaoxuan Jia, Seiji Tanabe, and Adam Kohn. Gamma and the coordination of spiking activity in early visual cortex. Neuron, 77(4):762–774, February 2013. [2] Misha B. Ahrens, Jennifer M. Li, Michael B. Orger, Drew N. Robson, Alexander F. Schier, Florian Engert, and Ruben Portugues. Brain-wide neuronal dynamics during motor adaptation in zebrafish. Nature, 485(7399):471–477, May 2012. [3] David A. Crowe, Shikha J. Goodwin, Rachael K. Blackman, Sofia Sakellaridi, Scott R. Sponheim, Angus W. MacDonald Iii, and Matthew V. Chafee. Prefrontal neurons transmit signals to parietal neurons that reflect executive control of cognition. Nature Neuroscience, 16(10):1484– 1491, October 2013. [4] Georgia G. Gregoriou, Stephen J. Gotts, Huihui Zhou, and Robert Desimone. Highfrequency, long-range coupling between prefrontal and visual cortex during attention. Science, 324(5931):1207–1210, May 2009. [5] Yuri B. Saalmann, Mark A. Pinsk, Liang Wang, Xin Li, and Sabine Kastner. The pulvinar regulates information transmission between cortical areas based on attention demands. Science, 337(6095):753–756, August 2012. [6] R. F. Salazar, N. M. Dotson, S. L. Bressler, and C. M. Gray. Content-specific fronto-parietal synchronization during visual working memory. Science, 338(6110):1097–1100, November 2012. 8 [7] Yuriria V´azquez, Emilio Salinas, and Ranulfo Romo. Transformation of the neural code for tactile detection from thalamus to cortex. Proceedings of the National Academy of Sciences, 110(28):E2635–E2644, July 2013. [8] Davi D. Bock, Wei-Chung Allen Lee, Aaron M. Kerlin, Mark L. Andermann, Greg Hood, Arthur W. Wetzel, Sergey Yurgenson, Edward R. Soucy, Hyon Suk Kim, and R. Clay Reid. Network anatomy and in vivo physiology of visual cortical neurons. Nature, 471(7337):177– 182, March 2011. [9] Jonathan W. Pillow, Jonathon Shlens, Liam Paninski, Alexander Sher, Alan M. Litke, E. J. Chichilnisky, and Eero P. Simoncelli. Spatio-temporal correlations and visual signalling in a complete neuronal population. Nature, 454(7207):995–999, August 2008. [10] Sanggyun Kim, David Putrino, Soumya Ghosh, and Emery N. Brown. A granger causality measure for point process models of ensemble neural spiking activity. PLoS Comput Biol, 7(3):e1001110, March 2011. [11] Christopher J. Quinn, Todd P. Coleman, Negar Kiyavash, and Nicholas G. Hatsopoulos. Estimating the directed information to infer causal relationships in ensemble neural spike train recordings. Journal of Computational Neuroscience, 30(1):17–44, February 2011. [12] Jakob H. Macke, Lars Buesing, John P. Cunningham, M. Yu Byron, Krishna V. Shenoy, and Maneesh Sahani. Empirical models of spiking in neural populations. In NIPS, pages 1350– 1358, 2011. [13] Mark Stopfer, Vivek Jayaraman, and Gilles Laurent. Intensity versus identity coding in an olfactory system. Neuron, 39(6):991–1004, September 2003. [14] Jayant E. Kulkarni and Liam Paninski. Common-input models for multiple neural spike-train data. Network: Computation in Neural Systems, 18(4):375–407, January 2007. [15] Byron M. Yu, John P. Cunningham, Gopal Santhanam, Stephen I. Ryu, Krishna V. Shenoy, and Maneesh Sahani. Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity. In NIPS, pages 1881–1888, 2008. [16] Wieland Brendel, Ranulfo Romo, and Christian K. Machens. Demixed principal component analysis. In NIPS, pages 2654–2662, 2011. [17] Valerio Mante, David Sussillo, Krishna V. Shenoy, and William T. Newsome. Contextdependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78–84, November 2013. [18] John P. Cunningham and Byron M. Yu. Dimensionality reduction for large-scale neural recordings. Nature Neuroscience, 17(11):1500–1509, November 2014. [19] B. S. Everitt. An Introduction to Latent Variable Models. Springer Netherlands, Dordrecht, 1984. [20] Francis R. Bach and Michael I. Jordan. A probabilistic interpretation of canonical correlation analysis. 2005. [21] Brian DO Anderson and John B. Moore. Optimal filtering. Courier Dover Publications, 2012. [22] Jeremy Freeman, Corey M. Ziemba, David J. Heeger, Eero P. Simoncelli, and J. Anthony Movshon. A functional and perceptual signature of the second visual area in primates. Nature Neuroscience, 16(7):974–981, July 2013. [23] Pascal Fries. A mechanism for cognitive dynamics: neuronal communication through neuronal coherence. Trends in Cognitive Sciences, 9(10):474–480, October 2005. [24] M. J. Kaminski and K. J. Blinowska. A new method of the description of the information flow in the brain structures. Biological Cybernetics, 65(3):203–210, July 1991. [25] Anne C. Smith and Emery N. Brown. Estimating a state-space model from point process observations. Neural Computation, 15(5):965–991, May 2003. 9
2014
26
5,358
Metric Learning for Temporal Sequence Alignment Damien Garreau ∗† ENS damien.garreau@ens.fr R´emi Lajugie ∗† INRIA remi.lajugie@inria.fr Sylvain Arlot † CNRS sylvain.arlot@ens.fr Francis Bach † INRIA francis.bach@inria.fr Abstract In this paper, we propose to learn a Mahalanobis distance to perform alignment of multivariate time series. The learning examples for this task are time series for which the true alignment is known. We cast the alignment problem as a structured prediction task, and propose realistic losses between alignments for which the optimization is tractable. We provide experiments on real data in the audio-toaudio context, where we show that the learning of a similarity measure leads to improvements in the performance of the alignment task. We also propose to use this metric learning framework to perform feature selection and, from basic audio features, build a combination of these with better alignment performance. 1 Introduction The problem of aligning temporal sequences is ubiquitous in applications ranging from bioinformatics [5, 1, 23] to audio processing [4, 6]. The goal is to align two similar time series that have the same global structure, but local temporal differences. Most alignments algorithms rely on similarity measures, and having a good metric is crucial, especially in the high-dimensional setting where some features of the signals can be irrelevant to the alignment task. The goal of this paper is to show how to learn this similarity measure from annotated examples in order to improve the relevance of the alignments. For example, in the context of music information retrieval, alignment is used in two different cases: (1) audio-to-audio alignment and (2) audio-to-score alignment. In the first case, the goal is to match two audio interpretations of the same piece that are potentially different in rythm, whereas audio-toscore alignment focuses on matching an audio signal to a symbolic representation of the score. In the second case, there are some attempts to learn from annotated data a measure for performing the alignment. Joder et al. [12] propose to fit a generative model in that context, and Keshet et al. [13] learn this measure in a discriminative setting. Similarly to Keshet et al. [13], we use a discriminative loss to learn the measure, but our work focuses on audio-to-audio alignment. In that context, the set of authorized alignments is much larger, and we explicitly cast the problem as a structured prediction task, that we solve using off-the-shelf stochastic optimization techniques [15] but with proper and significant adjustments, in particular in terms of losses. The ideas of alignment are also very relevant to the community of speech recognition since the pioneering work of Sakoe and Chiba [19]. ∗Contributed equally †SIERRA project-team, D´epartement d’Informatique de l’Ecole Normale Sup´erieure (CNRS, INRIA, ENS) 1 The need for metric learning goes far beyond unsupervised partitioning problems. Weinberger and Saul [26] proposed a large-margin framework for learning a metric in nearest-neighbour algorithms based on sets of must-link/must-not-link constraints. Lajugie et al. [16] proposed to use a large margin framework to learn a Mahalanobis metric in the context of partitioning problems. Since structured SVM have been proposed by Tsochantaridis et al. [25] and Taskar et al. [22], they have successfully been used to solve many learning problems, for instance to learn weights for graph matching [3] or a metric for ranking tasks [17]. They have also been used to learn graph structures using graph cuts [21]. We make the following five contributions: – We cast the learning of a Mahalanobis metric in the context of alignment as a structured prediction problem. – We show that on real musical datasets this metric improves the performance of alignment algorithms using high-level features. – We propose to use the metric learning framework to learn combinations of basic audio features and get good alignment performances. – We show experimentally that the standard Hamming loss, although tractable computationnally, does not permit to learn a relevant similarity measure in some real world settings. – We propose a new loss, closer to the true evaluation loss for alignments, leading to a tractable learning task, and derive an efficient Frank-Wolfe-based algorithm to deal with this new loss. That loss solves some issues encountered with the Hamming loss. 2 Matricial formulation of alignment problems 2.1 Notations In this paper, we consider the alignment problem between two multivariate time series sharing the same dimension p, but possibly of different lengths TA and TB, namely A ∈RTA×p and B ∈ RTB×p. We refer to the rows of A as a1, . . . , aTA ∈Rp and those of B as b1, . . . , bTB ∈Rp as column vectors. From now on, we denote by X the pair of signals (A, B). Let C(X) ∈RTA×TB be an arbitrary pairwise affinity matrix associated to the pair X, that is, C(X)i,j encodes the affinity between ai and bj. Note that our framework can be extended to the case where A and B are multivariate signals of different dimensions, as long as C(X) is welldefined. The goal of the alignment task is to find two non-decreasing sequences of indices α and β of same length u ≥max(TA, TB) and to match each time index α(i) in the time series A to the time index β(i) in the time series B, in such a way that Pu i=1 C(X)α(i),β(i) is maximal, and that (α, β) satisfies:    α(1) = β(1) = 1 (matching beginnings) α(u) = TA, β(u) = TB (matching endings) ∀i, (α(i + 1), β(i + 1)) −(α(i), β(i)) ∈{(1, 0), (0, 1), (1, 1)} (three type of moves) (1) For a given (α, β), we define the binary matrix Y ∈{0, 1}TA×TB such that Yα(i),β(i) = 1 for every i ∈{1, . . . , u} and 0 otherwise. We denote by Y(X) the set of such matrices, which is uniquely determined by TA and TB. An example is given in Fig. 1. A vertical move in the Y matrix means that the signal B is waiting for A, whereas an horizontal one means that A is waiting for B, and a diagonal move means that they move together. In this sense the time reference is “warped”. When C(X) is known, the alignment task can be cast as the following linear program (LP) over the set Y(X): max Y ∈Y(X) Tr(C(X)⊤Y ). (2) Our goal is to learn how to form the affinity matrix: once we have learned C(X), the alignment is obtained from Eq. (2). The optimization problem in Eq. (2) will be referred to as the decoding of our model. Dynamic time warping. Given the affinity matrix C(X) associated with the pair of signals X = (A, B), finding the alignment that solves the LP of Eq. (2) can be done efficiently in O(TATB) using 2 Figure 1: Example of two valid alignments encoded by matrices Y 1 and Y 2. Red upper triangles show the (i, j) such that Y 1 i,j = 1, and the blue lower ones show the (i, j) such that Y 2 i,j = 1. The grey zone corresponds to the area loss δabs between Y 1 and Y 2. a dynamic programming algorithm. It is often referred to as dynamic time warping [5, 18]. This algorithm is described in Alg. 1 of the supplementary material. Various additional constraints may be used in the dynamic time warping algorithm [18], which we could easily add to Alg. 1. The cardinality of the set Y(X) is huge: it corresponds to the number of paths on a rectangular grid from the southwest (1, 1) to the northeast corner (TA, TB) with vertical, horizontal and diagonal moves allowed. This is the definition of the Delannoy numbers [2]. As noted in [24], when t = TA = TB goes to infinity, and one can show that #Yt,s ∼ (3+2 √ 2)t √ πt√ 3 √ 2−4. 2.2 The Mahalanobis metric In many applications (see, e.g., [6]), for a pair X = (A, B), the affinity matrix is computed by C(A, B)i,j = −∥ai,k −bj,k∥2. In this paper we propose to learn the metric to compare ai and bj instead of using the plain Euclidean metric. That is, C(X) is parametrized by a matrix W ∈W ⊂ Rp×p, where W ⊂Rp×p is the set of semi-definite positive matrices, and we use the corresponding Mahalanobis metric to compute the pairwise affinity between ai and bj: C(X; W)i,j = −(ai −bj)⊤W(ai −bj). (3) Note that the decoding of Eq. (2) is the maximization of a linear function in the parameter W: max Y ∈Y(X) Tr(C(X; W)⊤Y ) ⇔ max Y ∈Y(X) Tr(W ⊤φ(X, Y )), (4) if we define the joint feature map φ(X, Y ) = − TA X i=1 TB X j=1 Yi,j(ai −bj)(ai −bj)⊤∈Rp×p. (5) 3 Learning the metric From now on, we assume that we are given n pairs of training instances1 (Xi, Y i) = ((Ai, Bi), Y i) ∈RT i A×p × RT i B×p × {0, 1}T i A×T i B, i = 1, . . . , n. Our goal is to find a matrix W such that the predicted alignments are close to the groundtruth on these examples, as well as on unseen examples. We first define a loss between alignments, in order to quantify the proximity between alignments. 1We will see that it is necessary to have fully labelled instances, which means that for each pair Xi we need an exact alignment Y i between Ai and Bi. Partial alignment might be dealt with by alternating between metric learning and constrained alignment. 3 3.1 Losses between alignments In our framework, the alignments are encoded by matrices in Y(X), thus we are interested in functions ℓ: Y(X) × Y(X) →R+. The Frobenius norm is defined by ∥M∥2 F = P i,j M 2 i,j. Hamming loss. A simple loss between matrices is the Frobenius norm of their difference, which turns out to be the unnormalized Hamming loss [9] for 0/1-valued matrices. For two matrices Y1, Y2 ∈Y(X), it is defined as: ℓH(Y1, Y2) = ∥Y1 −Y2∥2 F = Tr(Y ⊤ 1 Y1) + Tr(Y ⊤ 2 Y2) −2 Tr(Y ⊤ 1 Y2) = Tr(Y11TB1⊤ TA) + Tr(Y21TB1⊤ TA) −2 Tr(Y ⊤ 1 Y2), (6) where 1T is the vector of RT with all coordinates equal to 1. The last line of Eq. (6) comes from the fact that the Yi have 0/1-values; that makes the Hamming loss affine in Y1 and Y2. This loss is often used in other structured prediction tasks [15]; in the audio-to-score setting, Keshet et al. [13] use a modified version of this loss, which is the average number of times the difference between the two alignments is greater than a fixed threshold. This loss is easy to optimize since, it is linear in our parametrization of the alignement problem, but not optimal for audio-to-audio alignment. Indeed, a major drawback of the Hamming loss is that, for alignments of fixed length, it depends only on the number of “crossings” between alignment paths: one can easily find Y1, Y2, Y3 such that ℓH(Y2, Y1) = ℓH(Y3, Y1) but Y2 is much closer to Y1 than Y3 (see Fig. 2). It is important to notice this is often the case when the length of the signals grows. Area loss. A more natural loss can be computed as the mean distance beween the paths depicted by two matrices Y 1, Y 2 ∈Y(X). This loss corresponds to the area between the paths of two matrices Y , as represented by the grey zone on Fig. 1. Formally, as in Fig. 1, for each t ∈{1, . . . , TB} we put δt =| min{k, Y 1 t,k = 1}−min{k, Y 2 t,k = 1}|. Then the area loss is the mean of the δt. In the audio literature [14], this loss is sometimes called the “mean absolute deviation” loss and is noted δabs(Y 1, Y 2). Unfortunately, for the general alignment problem, δabs is not linear in the matrices Y . But in the context of alignment of sequences of two different natures, one of the signal is a reference and thus the index sequence α defined in Eq. (1) is increasing, e.g., for the audio-to-partition alignment problem [12]. This loss is then linear in each of its arguments. More precisely, if we introduce the matrix LTA ∈RTA×TA which is lower triangular with ones (including on the diagonal), we can write the loss as ℓO = ∥LTA(Y1 −Y2)∥2 F (7) = Tr(LTAY11TB1⊤ TA) + Tr(LTAY21TB1⊤ TA) −2 Tr(LTAY1Y ⊤ 2 L⊤ TA). We now prove that this loss corresponds to the area loss in this special case. Let Y be an alignment, then it is easy see that (LTAY )i,j = P k(LTA)i,kYk,j = Pi k=1 Yk,j. If Y does not have vertical moves, i.e., for each j there is an unique kj such that Ykj,j = 1, we have that (LTAY )i,j = 1 if and only if i ≥kj. So P i,j(LTAY )i,j = #{(i, j), i ≥kj}, which is exactly the area under the curve determined by the path of Y . In all our experiments, we use δabs for evaluation but not for training. Approximation of the area loss: the symmetrized area loss. In many real world applications [14], a meaningful loss to assess the quality of an alignment is the area loss. As shown by our experiments, if the Hamming loss is sufficient in some simple situations and allows to learn a metric that leads to good alignment performance in terms of area loss, on more challenging datasets it does not work at all (see Sec. 5). This is due to the fact that two alignments that are very close in terms of area loss can suffer a big Hamming loss (cf. Fig. 2). Thus it is natural to extend the formulation of Eq. (7) to matrices in Y(X). We start by symmetrizing the formulation of Eq. (7) to overcome problems of overpenalization of vertical vs. horizontal moves. We define, for any couple of binary matrices (Y 1, Y 2), ℓS(Y1, Y2) = 1 2 ∥LTA(Y1 −Y2)∥2 F + ∥(Y1 −Y2)LTB)∥2 F  (8) = 1 2 h Tr(Y ⊤ 1 L⊤ TALTAY1) + Tr(LTAY21TB1⊤ TA) −2 Tr(Y ⊤ 2 L⊤ TALTAY1) + Tr(Y1LTBL⊤ TBY ) + Tr(Y ⊤ 2 1TA1TBLTBL⊤ TBY2) −2 Tr(Y2LTBL⊤ TBY ⊤ 1 i . 4 0 200 400 600 800 1000 1200 1400 1600 1800 0 200 400 600 800 1000 1200 1400 1600 tA tB Most violated constraint for Hamming Loss Most violated constraint for lS Groundruth alignment Figure 2: On the real world Bach chorales dataset, we have represented a groundtruth alignment together with two others. In term of Hamming loss, both alignments are as far from the groundtruth whereas for the area loss, they are not. In the structured prediction setting described in Sec. 4, the depicted alignment are the so-called “most violated constraint”, namely the output of the loss augmented decoding step (see Sec. 4). We propose now to make this loss concave over the convex hull of Y(X) that we denote from now on Y(X). Let us introduce DT = λmax(L⊤ T LT )IT ×T with λmax(U) the largest eigenvalue of U. 2 For any binary matrices Y1, Y2, we have ℓS(Y1, Y2) = 1 2  Tr(Y ⊤ 1 (L⊤ TALTA −DTA)Y1) + Tr(DTAY11TB1⊤ TA) + Tr(LTAY21TB1⊤ TA) −2 Tr(Y ⊤ 2 (L⊤ TAL −DTA)Y1) + Tr(Y1(LTBL⊤ TB −DTB)Y ) + Tr(Y1DTB1TB1⊤ TA) + Tr(Y ⊤ 2 LTBL⊤ TBY2) −2 Tr(Y2LTBL⊤ TBY ⊤ 1 ) i , and we get a concave function over Y(X) that coincides with ℓS on Y(X). 3.2 Empirical loss minimization Recall that we are given n alignment examples (Xi, Y i)1≤i≤n. For a fixed loss ℓ, our goal is now to solve the following minimization problem in W: min W ∈W    1 n n X i=1 ℓ Y i, argmax Y ∈YT i A,T i B Tr(C(Xi; W)⊤Y )  + λΩ(W)   , (9) where Ω= λ 2 ∥W∥2 F is a convex regularizer preventing from overfitting, with λ ≥0. 4 Large margin approach In this section we describe a large margin approach to solve a surrogate to the problem in Eq. (9), which is untractable. As shown in Eq. (4), the decoding task is the maximum of a linear function in the parameter W and aims at predicting an output over a large and discrete space (the space of potential alignments with respect to the constraints in Eq. (1)). Learning W thus falls into the structured prediction framework [25, 22]. We define the hinge loss, a convex surrogate, by L(X, Y ; W) = max Y ′∈Y(X) n ℓ(Y, Y ′) −Tr(W ⊤[φ(X, Y ) −φ(X, Y ′)]) o . (10) 2For completeness, in our experiments, we also try to set the matrices DT with minimal trace that dominate L⊤ T LT by solving a semidefinite program (SDP). We report the associated result in Fig 4. Note also that other matrices could have been chosen. In particular, since our matrices LT are pointwise positive, the matrix Diag(L⊤ T LT ) −L⊤ T LT is such that the loss is concave. 5 The evaluation of L is usually referred to as “loss-augmented decoding”, see [25]. If we define bY i as the argmax in Eq. (10) when (X, Y ) = (Xi, Y i), then elementary computations show that bY i = argmin Y ∈Y(X) Tr((U ⊤−2Y i⊤−C(Xi; W)⊤)Y ), where U = 1TB1⊤ TB ∈RTA×TB. We now aim at solving the following problem, sometimes called the margin-rescaled problem: min W ∈W λ 2 ∥W∥2 F + 1 n n X i=1 max Y ∈Y(X) n ℓ(Y, Y i) −Tr(W ⊤ φ(Xi, Y i) −φ(Xi, Y )  ) o . (11) Hamming loss case. From Eq. (4), one can notice that our joint feature map is linear in Y . Thus, if we take a loss that is linear in the first argument of ℓ, for instance the Hamming loss, the lossaugmented decoding is the maximization of a linear function over the spaces Y(X) that we can solve efficiently using dynamic programming algorithms (see Sec. 2.1 and supplementary material). That way, plugging the Hamming loss (Eq. (6)) in Eq. (11) leads to a convex structured prediction problem. This problem can be solved using standard techniques such as cutting plane methods [11], stochastic gradient descent [20], or block-coordinate Frank-Wolfe in the dual [15]. Note that we adapted the standard unconstrained optimization methods to our setting, where W ⪰0. Optimization using the symmetrized area loss. The symmetrized area loss is concave in its first argument, thus the problem of Eq. (11) is in a min/max form and deriving a dual is straightforward. Details can be found in the supplementary material. If we plug the symmetrized area loss ℓS (SAL) defined in Eq. (8) into our problem (11), we can show that the dual of (11) has the following form: min (Z1,...,Zn)∈Y 1 2λn2 ∥Pn i=1 −P j,k(Yi −Zi)j,k(aj −bk)(aj −bk)T ∥2 F −1 n Pn i=1 ℓS(Z, Zi), (12) if we denote by Y(Xi) the convex hull of the sets Y(Xi), and by Y the cartesian product over all the training examples i of such sets. Note that we recover a similar result as [15]. Since the SAL loss is concave, the aforementioned problem is convex. The problem (12) is a quadratic program over the compact set Y. Thus we can use a Frank-Wolfe [7] algorithm. Note that it is similar to the one proposed by Lacoste-Julien et al. [15] but with an additional term due to the concavity of the loss. 5 Experiments We applied our method to the task of learning a good similarity measure for aligning audio signals. In this field researchers have spent a lot of efforts in designing well-suited and meaningful features [12, 4]. But the problem of combining these features for aligning temporal sequences is still challenging. For simplicity, we took W diagonal for our experiments. 5.1 Dataset of Kirchhoff and Lerch [14] Dataset description. First, we applied our method on the dataset of Kirchhoff and Lerch [14]. In this dataset, pairs of aligned examples (Ai, Bi) are artificially created by stretching an original audio signal. That way, the groundtruth alignment Y i is known and thus the data falls into our setting A more precise description of the dataset can be found in [14]. The N = 60 pairs are stretched along two different tempo curves. Each signal is made of 30s of music divided in frames of 46ms with a hopsize of 23ms, thus leading to a typical length of the signals of T ≈1300 in our setting. We keep p = 11 features that are simple to implement and known to perform well for alignment tasks [14]. Those were: five MFCC [8] (labeled M1, . . . , M5 in Fig. 3), the spectral flatness (SF), the spectral centroid (SC), the spectral spread (SS), the maximum of the envelope (Max), and the power level of each frame (Pow), see [14] for more details on the computation of the features. We normalize each feature by subtracting the median value and dividing by the standard deviation to the median, as audio data are subject to outliers. 6 W M PowM1 SC M4 SR SF M3MaxSS M2 M5 0 0.05 0.1 0.15 0.2 δabs (s) Figure 3: Comparison of performance between individual features and the learned metric. Error bars for the performance of the learned metric were determined with the best and the worst performance on 5 different experiments. W denotes the learned combination using our method, and M the best MFCC combination. Experiments. We conducted the following experiment: for each individual feature, we perform alignment using dynamic time warping algorithm and evaluate the performance of this single feature in terms of losses typically used to asses performance in this setting [14]. In Fig. 3, we report the results of these experiments. Then, we plug these data into our method, using the Hamming loss to learn a linear positive combination of these features. The result is reported in Fig. 3. Thus, combining these features on this dataset yields to better performances than only considering a single feature. For completeness, we also conducted the experiments using the standard 13 first MFCCs coefficients and their first and second order derivatives as features. These results competed with the best learned combination of the handcrafted features. Namely, in terms of the δabs loss, they perform at 0.046 seconds. Note that these results are slightly worse than the best single handcrafted feature, but better than the best MFCC coefficient used as a feature. As a baseline, we also compared ourselves against the uniform combination of handcrafted features (the metric being the identity matrix). The results are off the charts on Fig. 3 with δabs at 4.1 seconds (individual values ranging from 1.4 seconds to 7.4 seconds). 5.2 Chorales dataset Dataset. The Bach 10 dataset3 consists in ten J. S. Bach’s Chorales (small quadriphonic pieces). For each Chorale, a MIDI reference file corresponding to the “score”, or basically a representation of the partition. The alignments between the MIDI files and the audio file are given, thus we have converted these MIDI files into audio following what is classically done for alignment (see e.g, [10]). That way we fall into the audio-to-audio framework in which our technique apply. Each piece of music is approximately 25s long, leading to similar signal length (T ≈1300). Experiments. We use the same features as in Sec. 5.1. As depicted in Fig. 4, the optimization with Hamming loss performs poorly on this dataset. In fact, the best individual feature performance is far better than the performance of the learned W. Thus metric learning with the “practical” Hamming loss performs much worse than the best single feature. Then, we conducted the same learning experiment with the symetrized area loss ℓS. The resulting learned parameter is far better than the one learned using the Hamming loss. We get a performance that is similar to the one of the best feature. Note that these features were handcrafted and reaching their performance on this hard task with only a few training instances is already challenging. 3http://music.cs.northwestern.edu/data/Bach10.html. 7 (1) (2) (3) (4) (5) (6) 0 2 4 6 8 δabs (s) Figure 4: Performance of our algorithms on the Chorales dataset. From left to right: (1) Best single feature, (2) Best learned combination of features using the symmetrized area loss ℓS, (3) Best combination of MFCC using SAL and DT obtained via SDP (see footnote in section 3) (4) Best combination of MFCC and derivatives learned with ℓS, (5) Best combination of MFCCs and derivatives learned with Hamming loss, (6) Best combination of features of [14] using Hamming loss. In Fig. 2, we have depicted the result, for a learned parameter W, of the loss augmented decoding performed either using the area. As it is known for structured SVM, this represents the most violated constraint [25]. We can see that the most violated constraint for the Hamming loss leads to an alignment which is totally unrelated to the groundtruth alignment whereas the one for the symmetrized area loss is far closer and much more discriminative. 5.3 Feature selection Last, we conducted feature selection experiments over the same datasets. Starting from low level features, namely the 13 leading MFCCs coefficients and their first two derivatives, we learn a linear combination of these that achieves good alignment performance in terms of the area loss. Note that very little musical prior knowledge is put into these. Moreover we either improve on the best handcrafted feature on the dataset of [14] or perform similarly. On both datasets, the performance of learned combination of handcrafted features performed similarly to the combination of these 39 MFCCs coefficients. 6 Conclusion In this paper, we have presented a structured prediction framework for learning the metric for temporal alignment problems. We are able to combine hand-crafted features, as well as building automatically new state-of-the-art features from basic low-level information with little expert knowledge. Technically, this is made possible by considering a loss beyond the usual Hamming loss which is typically used because it is “practical” within a structured prediction framework (linear in the output representation). The present work may be extended in several ways, the main one being to consider cases where only partial information about the alignments is available. This is often the case in music [4] or bioinformatics applications. Note that, similarly to Lajugie et al. [16] a simple alternating optimization between metric learning and constrained alignment provide a simple first solution, which could probably be improved upon. Acknowledgements. The authors acknowledge the support of the European Research Council (SIERRA project 239993), the GARGANTUA project funded by the Mastodons program of CNRS and the Airbus foundation through a PhD fellowship. Thanks to Piotr Bojanowski, for helpful discussions. Warm thanks go to Arshia Cont and Philippe Cuvillier for sharing their knowledge about audio processing, and to Holger Kirchhoff and Alexander Lerch for their dataset. 8 References [1] J. Aach and G. M. Church. Aligning gene expression time series with time warping algorithms. Bioinformatics, 17(6):495–508, 2001. [2] C. Banderier and S. Schwer. Why Delannoy numbers? Journal of statistical planning and inference, 135 (1):40–54, 2005. [3] T. S. Caetano, J. J. McAuley, L. Cheng, Q. V. Le, and A. J. Smola. Learning graph matching. IEEE Trans. on PAMI, 31(6):1048–1058, 2009. [4] A. Cont, D. Schwarz, N. Schnell, C. Raphael, et al. Evaluation of real-time audio-to-score alignment. In Proc. ISMIR, 2007. [5] M. Cuturi, J.-P. Vert, O. Birkenes, and T. Matsui. A kernel for time series based on global alignments. In Proc. ICASSP, volume 2, pages II–413. IEEE, 2007. [6] S. Dixon and G. Widmer. Match: A music alignment tool chest. In Proc. ISMIR, pages 492–497, 2005. [7] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval research logistics quarterly, 3 (1-2):95–110, 1956. [8] B. Gold, N. Morgan, and D. Ellis. Speech and audio signal processing: processing and perception of speech and music. John Wiley & Sons, 2011. [9] R. Hamming. Error detecting and error correcting codes. Bell system technical journal, 29(2), 1950. [10] N. Hu, R. B. Dannenberg, and G. Tzanetakis. Polyphonic audio matching and alignment for music retrieval. Computer Science Department, page 521, 2003. [11] T. Joachims, T. Finley, and C.-N. J. Yu. Cutting-plane training of structural SVMs. Machine Learning, 77(1):27–59, 2009. [12] C. Joder, S. Essid, and G. Richard. Learning optimal features for polyphonic audio-to-score alignment. IEEE Trans. on Audio, Speech, and Language Processing, 21(10):2118–2128, 2013. [13] J. Keshet, S. Shalev-Shwartz, Y. Singer, and D. Chazan. A large margin algorithm for speech-to-phoneme and music-to-score alignment. IEEE Transactions on Audio, Speech, and Language Processing, 15(8): 2373–2382, 2007. [14] H. Kirchhoff and A. Lerch. Evaluation of features for audio-to-audio alignment. Journal of New Music Research, 40(1):27–41, 2011. [15] S. Lacoste-Julien, M. Jaggi, M. Schmidt, P. Pletscher, et al. Block-coordinate Frank-Wolfe optimization for structural SVMs. In Proc. ICML, 2013. [16] R. Lajugie, F. Bach, and S. Arlot. Large-margin metric learning for constrained partitioning problems. In Proc. ICML, 2014. [17] B. McFee and G. R. Lanckriet. Metric learning to rank. In Proc. ICML, pages 775–782, 2010. [18] M. M¨uller. Information retrieval for music and motion. Springer, 2007. [19] H. Sakoe and S. Chiba. Dynamic programming algorithm optimization for spoken word recognition. Acoustics, Speech and Signal Processing, IEEE Transactions on, 26(1):43–49, 1978. [20] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter. Pegasos: Primal estimated sub-gradient solver for SVM. Mathematical Programming, 127(1):3–30, 2011. [21] M. Szummer, P. Kohli, and D. Hoiem. Learning CRFs using graph cuts. In Proc. CVPR. 2008. [22] B. Taskar, D. Koller, and C. Guestrin. Max-margin Markov networks. Adv. NIPS, 2003. [23] J. D. Thompson, F. Plewniak, and O. Poch. Balibase: a benchmark alignment database for the evaluation of multiple alignment programs. Bioinformatics, 15(1):87–88, 1999. [24] A. Torres, A. Cabada, and J. J. Nieto. An exact formula for the number of alignments between two dna sequences. Mitochondrial DNA, 14(6):427–430, 2003. [25] I. Tsochantaridis, T. Joachims, T. Hofmann, Y. Altun, and Y. Singer. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6(9):1453–1484, 2005. [26] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. 9
2014
260
5,359
Extended and Unscented Gaussian Processes Daniel M. Steinberg NICTA daniel.steinberg@nicta.com.au Edwin V. Bonilla The University of New South Wales e.bonilla@unsw.edu.au Abstract We present two new methods for inference in Gaussian process (GP) models with general nonlinear likelihoods. Inference is based on a variational framework where a Gaussian posterior is assumed and the likelihood is linearized about the variational posterior mean using either a Taylor series expansion or statistical linearization. We show that the parameter updates obtained by these algorithms are equivalent to the state update equations in the iterative extended and unscented Kalman filters respectively, hence we refer to our algorithms as extended and unscented GPs. The unscented GP treats the likelihood as a ‘black-box’ by not requiring its derivative for inference, so it also applies to non-differentiable likelihood models. We evaluate the performance of our algorithms on a number of synthetic inversion problems and a binary classification dataset. 1 Introduction Nonlinear inversion problems, where we wish to infer the latent inputs to a system given observations of its output and the system’s forward-model, have a long history in the natural sciences, dynamical modeling and estimation. An example is the robot-arm inverse kinematics problem. We wish to infer how to drive the robot’s joints (i.e. joint torques) in order to place the end-effector in a particular position, given we can measure its position and know the forward kinematics of the arm. Most of the existing algorithms either estimate the system inputs at a particular point in time like the Levenberg-Marquardt algorithm [1], or in a recursive manner such as the extended and unscented Kalman filters (EKF, UKF) [2]. In many inversion problems we have a continuous process; a smooth trajectory of a robot arm for example. Non-parametric regression techniques like Gaussian processes [3] seem applicable, and have been used in linear inversion problems [4]. Similarly, Gaussian processes have been used to learn inverse kinematics and predict the motion of a dynamical system such as robot arms [3, 5] and a human’s gait [6, 7, 8]. However, in [3, 5] the inputs (torques) to the system are observable (not latent) and are used to train the GPs. Whereas [7, 8] are not concerned with inference over the original latent inputs, but rather they want to find a low dimensional representation of high dimensional outputs for prediction using Gaussian process latent variable models [6]. In this paper we introduce inference algorithms for GPs that can infer and predict the original latent inputs to a system, without having to be explicitly trained on them. If we do not need to infer the latent inputs to a system it is desirable to still incorporate domain/system specific information into an algorithm in terms of a likelihood model specific to the task at hand. For example, non-parametric classification or robust regression problems. In these situations it is useful to have an inference procedure that does not require re-derivation for each new likelihood model without having to resort to MCMC. An example of this is the variational algorithm presented in [9] for factorizing likelihood models. In this model, the expectations arising from the use of arbitrary (non-conjugate) likelihoods are only one-dimensional, and so they can be easily evaluated using sampling techniques or quadrature. We present two alternatives to this algorithm that are also underpinned by variational principles but are based on linearizing the 1 nonlinear likelihood models about the posterior mean. These methods are straight-forwardly applicable to non-factorizing likelihoods and would retain computational efficiency, unlike [9] which would require evaluation of multidimensional intractable integrals. One of our algorithms, based on statistical linearization, does not even require derivatives of the likelihood model (like [9]) and so non-differentiable likelihoods can be incorporated. Initially we formulate our models in §2 for the finite Gaussian case because the linearization methods are more general and comparable with existing algorithms. In fact we show we can derive the update steps of the iterative EKF [10] and similar updates to the iterative UKF [11] using our variational inference procedures. Then in §3 we specifically derive a factorizing likelihood Gaussian process model using our framework, which we use for experiments in §4. 2 Variational Inference in Nonlinear Gaussian Models with Linearization Given some observable quantity y ∈Rd, and a likelihood model for the system of interest, in many situations it is desirable to reason about the latent input to the system, f ∈RD, that generated the observations. Finding these inputs is an inversion problem and in a probabilistic setting it can be cast as an application of Bayes’ rule. The following forms are assumed for the prior and likelihood: p(f) = N(f|µ, K) and p(y|f) = N(y|g(f) , Σ) , (1) where g(·) : RD →Rd is a nonlinear function or forward model. Unfortunately the marginal likelihood, p(y), is intractable as the nonlinear function makes the likelihood and prior non-conjugate. This also makes the posterior p(f|y), which is the solution to the inverse problem, intractable to evaluate. So, we choose to approximate the posterior with variational inference [12]. 2.1 Variational Approximation Using variational inference procedures we can put a lower bound on the log-marginal likelihood using Jensen’s inequality, log p(y) ≥ Z q(f) log p(y|f) p(f) q(f) df, (2) with equality iff KL[q(f)∥p(f|y)] = 0, and where q(f) is an approximation to the true posterior, p(f|y). This lower bound is often referred to as ‘free energy’, and can be re-written as follows F = ⟨log p(y|f)⟩qf −KL[q(f)∥p(f)] , (3) where ⟨·⟩qf is an expectation with respect to the variational posterior, q(f). We assume the posterior takes a Gaussian form, q(f) = N(f|m, C), so we can evaluate the expectation and KL term in (3), ⟨log p(y|f)⟩qf = −1 2  D log 2π + log |Σ| + D (y −g(f))⊤Σ-1 (y −g(f)) E qf  , (4) KL[q(f)∥p(f)] = 1 2  tr K-1C  + (µ −m)⊤K-1 (µ −m) −log |C| + log |K| −D  . (5) where the expectation involving g(·) may be intractable. One method of dealing with these expectations is presented in [9] by assuming that the likelihood factorizes across observations. Here we provide two alternatives based on linearizing g(·) about the posterior mean, m. 2.2 Parameter Updates To find the optimal posterior mean, m, we need to find the derivative, ∂F ∂m = −1 2 ∂ ∂m D (µ −f)⊤K-1 (µ −f) + (y −g(f))⊤Σ-1 (y −g(f)) E qf , (6) where all terms in F independent of m have been dropped, and we have placed the quadratic and trace terms from the KL component in Equation (5) back into the expectation. We can represent this as an augmented Gaussian, ∂F ∂m = −1 2 ∂ ∂m D (z −h(f))⊤S-1 (z −h(f)) E qf , (7) 2 where z =  y µ  , h(f) =  g(f) f  , S =  Σ 0 0 K  . (8) Now we can see solving for m is essentially a nonlinear least squares problem, but about the expected posterior value of f. Even without the expectation, there is no closed form solution to ∂F/∂m = 0. However, we can use an iterative Newton method to find m. It begins with an initial guess, m0, then proceeds with the iterations, mk+1 = mk −α (∇m∇mF)-1 ∇mF, (9) for some step length, α ∈(0, 1]. Though evaluating ∇mF is still intractable because of the nonlinear term within the expectation in Equation (7). If we linearize g(f), we can evaluate the expectation, g(f) ≈Af + b, (10) for some linearization matrix A ∈Rd×D and an intercept term b ∈Rd. Using this we get, ∇mF ≈A⊤Σ-1 (y −Am −b) + K-1 (µ −m) and ∇m∇mF ≈−K-1 −A⊤Σ-1A. (11) Substituting (11) into (9) and using the Woodbury identity we can derive the iterations, mk+1 = (1 −α) mk + αµ + αHk (y −bk −Akµ) , (12) where Hk is usually referred to as a “Kalman gain” term, Hk = KA⊤ k Σ + AkKA⊤ k -1 , (13) and we have assumed that the linearization Ak and intercept, bk are in some way dependent on the iteration. We can find the posterior covariance by setting ∂F/∂C = 0 where, ∂F ∂C = −1 2 ∂ ∂C D (z −h(f))⊤S-1 (z −h(f)) E qf + 1 2 ∂ ∂C log |C| . (14) Again we do not have an analytic solution, so we once more apply the approximation (10) to get, C =  K-1 + A⊤Σ-1A -1 = (ID −HA)K, (15) where we have once more made use of the Woodbury identity and also the converged values of A and H. At this point it is also worth noting the relationship between Equations (15) and (11). 2.3 Taylor Series Linearization Now we need to find expressions for the linearization terms A and b. One method is to use a first order Taylor Series expansion to linearize g(·) about the last calculation of the posterior mean, mk, g(f) ≈g(mk) + Jmk (f −mk) , (16) where Jmk is the Jacobian ∂g(mk)/∂mk. By linearizing the function in this way we end up with a Gauss-Newton optimization procedure for finding m. Equating coefficients with (10), A = Jmk, b = g(mk) −Jmkmk, (17) and then substituting these values into Equations (12) – (15) we get, mk+1 = (1 −α) mk + αµ + αHk (y −g(mk) + Jmk (mk −µ)) , (18) Hk = KJ⊤ mk Σ + JmkKJ⊤ mk -1 , (19) C = (ID −HJm)K. (20) Here Jm and H without the k subscript are constructed about the converged posterior, m. Remark 1 A single step of the iterated extended Kalman filter [10, 11] corresponds to an update in our variational framework when using the Taylor series linearization of the non-linear forward model g(·) around the posterior mean. Having derived the updates in our variational framework, the proof of this is trivial by making α = 1, and using Equations (18) – (20) as the iterative updates. 3 2.4 Statistical Linearization Another method for linearizing g(·) is statistical linearization (see e.g. [13]), which finds a least squares best fit to g(·) about a point. The advantage of this method is that it does not require derivatives ∂g(f)/∂f. To obtain the fit, multiple observations of the forward model output for different input points are required. Hence, the key question is where to evaluate our forward model so as to obtain representative samples to carry out the linearization. One method of obtaining these points is the unscented transform [2], which defines 2D + 1 ‘sigma’ points, M0 = m, (21) Mi = m + p (D + κ) C  i for i = 1 . . . D, (22) Mi = m − p (D + κ) C  i for i = D + 1 . . . 2D, (23) Yi = g(Mi) , (24) for a free parameter κ. Here (√·)i refers to columns of the matrix square root, we follow [2] and use the Cholesky decomposition. Unlike the usual unscented transform, which uses the prior to create the sigma points, here we have used the posterior because of the expectation in Equation (7). Using these points we can define the following statistics, ¯y = 2D X i=0 wiYi, Γym = 2D X i=0 wi (Yi −¯y) (Mi −m)⊤, (25) w0 = κ D + κ, wi = 1 2 (D + κ) for i = 1 . . . 2D. (26) According to [2] various settings of κ can capture information about the higher order moments of the distribution of y; or setting κ = 0.5 yields uniform weights. To find the linearization coefficients statistical linearization solves the following objective, argmin A,b 2D X i=0 ∥Yi −(AMi + b)∥2 2 . (27) This is simply linear least-squares and has the solution [13]: A = ΓymC-1, b = ¯y −Am. (28) Substituting b back into Equation (12), we obtain, mk+1 = (1 −α) mk + αµ + αHk (y −¯yk + Ak (mk −µ)) . (29) Here Hk, Ak and ¯yk have been evaluated using the statistics from the kth iteration. This implies that the posterior covariance, Ck, is now estimated at every iteration of (29) since we use it to form Ak and bk. Hk and Ck have the same form as Equations (13) and (15) respectively. Remark 2 A single step of the iterated unscented sigma-point Kalman filter (iSPKF, [11]) can be seen as an ad hoc approximation to an update in our statistically linearized variational framework. Equations (29) and (15) are equivalent to the equations for a single update of the iterated sigma-point Kalman filter (iSPKF) for α = 1, except for the term ¯yk appearing in Equation (29) as opposed to g(mk). The main difference is that we have derived our updates from variational principles. These updates are also more similar to the regular recursive unscented Kalman filter [2], and statistically linearized recursive least squares [13]. 2.5 Optimizing the Posterior Because of the expectations involving an arbitrary function in Equation (4), no analytical solution exists for the lower bound on the marginal likelihood, F. We can use our approximation (10) again, F ≈−1 2  D log 2π + log |Σ| −log |C| + log |K| + (µ −m)⊤K-1 (µ −m) + (y −Am −b)⊤Σ-1 (y −Am −b)  . (30) 4 Here the trace term from Equation (5) has cancelled with a trace term from the expected likelihood, tr A⊤Σ-1AC  = D −tr K-1C  , once we have linearized g(·) and substituted (15). Unfortunately this approximation is no longer a lower bound on the log marginal likelihood in general. In practice we only calculate this approximation F if we need to optimize some model hyperparameters, like for a Gaussian process as described in §3. When optimizing m, the only terms of F dependent on m in the Taylor series linearization case are, −1 2 (y −g(m))⊤Σ-1 (y −g(m)) −1 2 (µ −m)⊤K-1 (µ −m) . (31) This is also the maximum a-posteriori objective. A global convergence proof exists for this objective when optimized by a Gauss-Newton procedure, like our Taylor series linearization algorithm, under some conditions on the Jacobians, see [14, p255]. No such guarantees exist for statistical linearization, though monitoring (31) works well in practice (see the experiment in §4.1). A line search could be used to select an optimal value for the step length, α in Equation (12). However, we find that setting α = 1, and then successively multiplying α by some number in (0, 1) until the MAP objective (31) decreases, or some maximum number of iterations is exceeded is fast and works well in practice. If the maximum number of iterations is exceeded we call this a ‘diverge’ condition, and terminate the search for m (and return the last good value). This only tends to happen for statistical linearization, but does not tend to impact the algorithms performance since we always make sure to improve (approximate) F. 3 Variational Inference in Gaussian Process Models with Linearization We now present two inference methods for Gaussian Process (GP) models [3] with arbitrary nonlinear likelihoods using the framework presented previously. Both Gaussian process models have the following likelihood and prior, y ∼N g(f) , σ2IN  , f ∼N(0, K) . (32) Here y ∈RN are the N noisy observed values of the transformed latent function, g(f), and f ∈RN is the latent function we are interested in inferring. K ∈RN×N is the kernel matrix, where each element kij = k(xi, xj) is the result of applying a kernel function to each input, x ∈RP , in a pairwise manner. It is also important to note that the likelihood noise model is isotropic with a variance of σ2. This is not a necessary condition, and we can use a correlated noise likelihood model, however the factorized likelihood case is still useful and provides some computational benefits. As before, we make the approximation that the posterior is Gaussian, q(f|m, C) = N(f|m, C) where m ∈RN is the mean posterior latent function, and C ∈RN×N is the posterior covariance. Since the likelihood is isotropic and factorizes over the N observations we have the following expectation under our variational inference framework: ⟨log p(y|f)⟩qf = −N 2 log 2πσ2 − 1 2σ2 N X n=1 D (yn −g(fn))2E qfn . As a consequence, the linearization is one-dimensional, that is g(fn) ≈anfn + bn. Using this we can derive the approximate gradients, ∇mF ≈1 σ2 A (y −Am −b) −K-1m, ∇m∇mF ≈−K-1 −AΛ-1A, (33) where A = diag([a1, . . . , aN]) and Λ = diag  σ2, . . . , σ2 . Because of the factorizing likelihood we obtain C-1 = K-1 + AΛ-1A, that is, the inverse posterior covariance is just the prior inverse covariance, but with a modified diagonal. This means if we were to use this inverse parameterization of the Gaussian, which is also used in [9], we would only have to infer 2N parameters (instead of N + N(N + 1)/2). We can obtain the iterative steps for m straightforwardly: mk+1 = (1 −α) mk + αHk (y −bk) , where Hk = KAk (Λ + AkKAk)-1 , (34) and also an expression for posterior covariance, C = (IN −HA)K. (35) 5 The values for an and bn for the linearization methods are, Taylor : an= ∂g(mn) ∂mn , bn = g(mn) −∂g(mn) ∂mn mn, (36) Statistical : an = Γmy,n Cnn , bn = ¯yn −anmn. (37) Cnn is the nth diagonal element of C, and Γmy,n and ¯yn are scalar versions of Equations (21) – (26). The sigma points for each observation, n, are Mn =  mn, mn + p (1 + κ) Cnn, mn − p (1 + κ) Cnn . We refer to the Taylor series linearized GP as the extended GP (EGP), and the statistically linearized GP as the unscented GP (UGP). 3.1 Prediction The predictive distribution of a latent value, f ∗, given a query point, x∗, requires the marginalization R p(f ∗|f) q(f|m, C) df, where p(f ∗|f) is a regular predictive GP. This gives f ∗∼N(m∗, C∗), and, m∗= k∗⊤K-1m, C∗= k∗∗−k∗⊤K-1  IN −CK-1 k∗, (38) where k∗∗= k(x∗, x∗) and k∗= [k(x1, x∗) , . . . , k(xN, x∗)]⊤. We can also find the predicted observations, ¯y∗by evaluating the one-dimensional integral, ¯y∗= ⟨y∗⟩qf ∗= Z g(f ∗) N(f ∗|m∗, C∗) df ∗, (39) for which we use quadrature. Alternatively, if we were to use the UGP we can use another application of the unscented transform to approximate the predictive distribution y∗∼N ¯y∗, σ2 y∗  where, ¯y∗= 2 X i=0 wiM∗ i , σ2 y∗= 2 X i=0 wi (Y∗ i −¯y∗)2 . (40) This works well in practice, see Figure 1 for a demonstration. 3.2 Learning the Linearized GPs Learning the extended and unscented GPs consists of an inner and outer loop. Much like the Laplace approximation for binary Gaussian Process classifiers [3], the inner loop is for learning the posterior mean, m, and the outer loop is to optimize the likelihood parameters (e.g. the variance σ2) and kernel hyperparameters, k(·, ·|θ). The dominant computational cost in learning the parameters is the inversion in Equation (34), and so the computational complexity of the EGP and UGP is about the same as for the Laplace GP approximation. To learn the kernel hyperparameters and σ2 we use numerical techniques to find the gradients, ∂F/∂θ, for both the algorithms, where F is approximated, F ≈−1 2  Nlog 2πσ2 −log |C| + log |K| + m⊤K-1m + 1 σ2 (y −Am −b)⊤(y −Am −b)  . (41) Specifically we use derivative-free optimization methods (e.g. BOBYQA) from the NLopt library [15], which we find fast and effective. This also has the advantage of not requiring knowledge of ∂g(f)/∂f or higher order derivatives for any implicit gradient dependencies between f and θ. 4 Experiments 4.1 Toy Inversion Problems In this experiment we generate ‘latent’ function data from f ∼N(0, K) where a Matérn 5 2 kernel function is used with amplitude σm52 = 0.8, length scale lm52 = 0.6 and x ∈R are uniformly spaced between [−2π, 2π] to build K. Observations used to test and train the GPs are then generated as y = g(f) + ϵ where ϵ ∼N 0, 0.22 . 1000 points are generated in this way, and we use 5-fold cross validation to train (200 points) and test (800 points) the GPs. We use standardized mean 6 Table 1: The negative log predictive density (NLPD) and the standardized mean squared error (SMSE) on test data for various differentiable forward models. Lower values are better for both measures. The predicted f ∗and y∗are the same for g(f) = f, so we do not report y∗in this case. g(f) Algorithm NLPD f ∗ SMSE f ∗ SMSE y∗ mean std. mean std. mean std. f UGP -0.90046 0.06743 0.01219 0.00171 – – EGP -0.89908 0.06608 0.01224 0.00178 – – [9] -0.27590 0.06884 0.01249 0.00159 – – GP -0.90278 0.06988 0.01211 0.00160 – – f 3 + f 2 + f UGP -0.23622 1.72609 0.01534 0.00202 0.02184 0.00525 EGP -0.22325 1.76231 0.01518 0.00203 0.02184 0.00528 [9] -0.14559 0.04026 0.06733 0.01421 0.02686 0.00266 exp(f) UGP -0.75475 0.32376 0.13860 0.04833 0.03865 0.00403 EGP -0.75706 0.32051 0.13971 0.04842 0.03872 0.00411 [9] -0.08176 0.10986 0.17614 0.04845 0.05956 0.01070 sin(f) UGP -0.59710 0.22861 0.03305 0.00840 0.11513 0.00521 EGP -0.59705 0.21611 0.03480 0.00791 0.11478 0.00532 [9] -0.04363 0.03883 0.05913 0.01079 0.11890 0.00652 tanh(2f) UGP 0.01101 0.60256 0.15703 0.06077 0.08767 0.00292 EGP 0.57403 1.25248 0.18739 0.07869 0.08874 0.00394 [9] 0.15743 0.14663 0.16049 0.04563 0.09434 0.00425 (a) g(f) = 2 × sign(f) + f 3 (b) MAP trace from learning m Figure 1: Learning the UGP with a non-differentiable forward model in (a), and a corresponding trace from the MAP objective function used to learn m is shown in (b). The optimization shown terminated because of a ‘divergence’ condition, though the objective function value has still improved. squared error (SMSE) to test the predictions with the held out data in both the latent and observed spaces. We also use average negative log predictive density (NLPD) on the latent test data, which is calculated as −1 N ∗ P n log N(f ∗ n|m∗ n, C∗ n). All GP methods use Matérn 5 2 covariance functions with the hyperparameters and σ2 initialized at 1.0 and lower-bounded at 0.1 (and 0.01 for σ2). Table 1 shows results for multiple differentiable forward models, g(·). We test the EGP and UGP against the model in [9] – which uses 10,000 samples to evaluate the one dimensional expectations. Although this number of samples may seem excessive for these simple problems, our goal here is to have a competitive baseline algorithm. We also test against normal GP regression for a linear forward model, g(f) = f. In Figure 1 we show the results of the UGP using a forward model for which no derivative exists at the zero crossing points, as well as an objective function trace for learning the posterior mean. We use quadrature for the predictions in observation space in Table 1 and the unscented transform, Equation (40), for the predictions in Figure 1. Interestingly, there is almost no difference in performance between the EGP and UGP, even though the EGP has access to the derivatives of the forward models and the UGP does not. Both the UGP and EGP consistently outperformed [9] in terms of NLPD and SMSE, apart from the tanh experiment for inversion. In this experiment, the UGP had the best performance but the EGP was outperformed by [9]. 7 Table 2: Classification performance on the USPS handwritten-digits dataset for numbers ‘3’ and ‘5’. Lower values of the negative log probability (NLP) and error rate indicate better performance. The learned signal variance σ2 se  and length scale(lse) are also shown for consistency with [3, §3.7.3]. Algorithm NLP y∗ Error rate (%) log(σse) log(lse) GP – Laplace 0.11528 2.9754 2.5855 2.5823 GP – EP 0.07522 2.4580 5.2209 2.5315 GP – VB 0.10891 3.3635 0.9045 2.0664 SVM (RBF) 0.08055 2.3286 – – Logistic Reg. 0.11995 3.6223 – – UGP 0.07290 1.9405 1.5743 1.5262 EGP 0.08051 2.1992 2.9134 1.7872 4.2 Binary Handwritten Digit Classification For this experiment we evaluate the EGP and UGP on a classification task. We are just interested in a probabilistic prediction of class labels, and not the values of the latent function. We use the USPS handwritten digits dataset with the task of distinguishing between ‘3’ and ‘5’ – this is the same experiment from [3, §3.7.3]. A logistic sigmoid is used as the forward model, g(·), in our algorithms. We test against Laplace, expectation propagation and variational Bayes logistic GP classifiers (from the GPML Matlab toolbox [3]), a support vector machine (SVM) with a radial basis kernel function (and probabilistic outputs [16]), and logistic regression (both from the scikitlearn python library [17]). A squared exponential kernel with amplitude σse and length scale lse is used for the GPs in this experiment. We initialize these hyperparameters at 1.0, and put a lower bound of 0.1 on them. We initialize σ2 and place a lower bound at 10−14 for the EGP and UGP (the optimized values are near or at this value). The hyperparameters for the SVM are learned using grid search with three-fold cross validation. The results are summarized in Table 2, where we report the average Bernoulli negative logprobability (NLP), the error rate and the learned hyperparameter values for the GPs. Surprisingly, the UGP outperforms the other classifiers on this dataset, despite the other classifiers being specifically formulated for this task. 5 Conclusion and Discussion We have presented a variational inference framework with linearization for Gaussian models with nonlinear likelihood functions, which we show can be used to derive updates for the extended and unscented Kalman filter algorithms, the iEKF and the iSPKF. We then generalize these results and develop two inference algorithms for Gaussian processes, the EGP and UGP. The UGP does not use derivatives of the nonlinear forward model, yet performs as well as the EGP for inversion and classification problems. Our method is similar to the Warped GP (WGP) [18], however, we wish to infer the full posterior over the latent function f. The goal of the WGP is to infer a transformation of a non-Gaussian process observation to a space where a GP can be constructed. That is, the WGP is concerned with inferring an inverse function g−1(·) so the transformed (latent) function is well modeled by a GP. As future work we would like to create multi-task EGPs and UGPs. This would extend their applicability to inversion problems where the forward models have multiple inputs and outputs, such as inverse kinematics for dynamical systems. Acknowledgments This research was supported by the Science Industry Endowment Fund (RP 04-174) Big Data Knowledge Discovery project. We thank F. Ramos, L. McCalman, S. O’Callaghan, A. Reid and T. Nguyen for their helpful feedback. NICTA is funded by the Australian Government through the Department of Communications and the Australian Research Council through the ICT Centre of Excellence Program. 8 References [1] D. W. Marquardt, “An algorithm for least-squares estimation of nonlinear parameters,” Journal of the Society for Industrial & Applied Mathematics, vol. 11, no. 2, pp. 431–441, 1963. [2] S. Julier and J. Uhlmann, “Unscented filtering and nonlinear estimation,” Proceedings of the IEEE, vol. 92, no. 3, pp. 401–422, Mar 2004. [3] C. E. Rasmussen and C. K. I. Williams, Gaussian processes for machine learning. The MIT Press, Cambridge, Massachusetts, 2006. [4] A. Reid, S. O’Callaghan, E. V. Bonilla, L. McCalman, T. Rawling, and F. Ramos, “Bayesian joint inversions for the exploration of Earth resources,” in Proceedings of the Twenty-Third international joint conference on Artificial Intelligence. AAAI Press, 2013, pp. 2877–2884. [5] K. M. A. Chai, C. K. I. Williams, S. Klanke, and S. Vijayakumar, “Multi-task Gaussian process learning of robot inverse dynamics,” in Advances in Neural Information Processing Systems (NIPS). Curran Associates, Inc., 2009, pp. 265–272. [6] N. D. Lawrence, “Gaussian process latent variable models for visualisation of high dimensional data.” in Advances in Neural Information Processing Systems (NIPS), vol. 2, 2003, p. 5. [7] J. M. Wang, D. J. Fleet, and A. Hertzmann, “Gaussian process dynamical models,” in Advances in Neural Information Processing Systems (NIPS), vol. 18, 2005, p. 3. [8] ——, “Gaussian process dynamical models for human motion,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 30, no. 2, pp. 283–298, 2008. [9] M. Opper and C. Archambeau, “The variational Gaussian approximation revisited,” Neural computation, vol. 21, no. 3, pp. 786–792, 2009. [10] B. M. Bell and F. W. Cathey, “The iterated Kalman filter update as a Gauss-newton method,” IEEE Transactions on Automatic Control, vol. 38, no. 2, pp. 294–297, 1993. [11] G. Sibley, G. Sukhatme, and L. Matthies, “The iterated sigma point kalman filter with applications to long range stereo.” in Robotics: Science and Systems, vol. 8, no. 1, 2006, pp. 235–244. [12] 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. [13] M. Geist and O. Pietquin, “Statistically linearized recursive least squares,” in Machine Learning for Signal Processing (MLSP), 2010 IEEE International Workshop on. IEEE, 2010, pp. 272–276. [14] J. Nocedal and S. J. Wright, Numerical Optimization, 2nd ed. New York: Springer, 2006. [15] S. G. Johnson, “The nlopt nonlinear-optimization package.” [Online]. Available: http: //ab-initio.mit.edu/wiki/index.php/Citing_NLopt [16] J. Platt et al., “Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods,” Advances in large margin classifiers, vol. 10, no. 3, pp. 61–74, 1999. [17] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011. [18] E. Snelson, C. E. Rasmussen, and Z. Ghahramani, “Warped Gaussian processes,” in NIPS, 2003. 9
2014
261
5,360
A State-Space Model for Decoding Auditory Attentional Modulation from MEG in a Competing-Speaker Environment Sahar Akram1,2, Jonathan Z. Simon1,2,3, Shihab Shamma1,2, and Behtash Babadi1,2 1 Department of Electrical and Computer Engineering, 2 Institute for Systems Research, 3 Department of Biology University of Maryland College Park, MD 20742, USA {sakram,jzsimon,sas,behtash}@umd.edu Abstract Humans are able to segregate auditory objects in a complex acoustic scene, through an interplay of bottom-up feature extraction and top-down selective attention in the brain. The detailed mechanism underlying this process is largely unknown and the ability to mimic this procedure is an important problem in artificial intelligence and computational neuroscience. We consider the problem of decoding the attentional state of a listener in a competing-speaker environment from magnetoencephalographic (MEG) recordings from the human brain. We develop a behaviorally inspired state-space model to account for the modulation of the MEG with respect to attentional state of the listener. We construct a decoder based on the maximum a posteriori (MAP) estimate of the state parameters via the Expectation-Maximization (EM) algorithm. The resulting decoder is able to track the attentional modulation of the listener with multi-second resolution using only the envelopes of the two speech streams as covariates. We present simulation studies as well as application to real MEG data from two human subjects. Our results reveal that the proposed decoder provides substantial gains in terms of temporal resolution, complexity, and decoding accuracy. 1 Introduction Segregating a speaker of interest in a multi-speaker environment is an effortless task we routinely perform. It has been hypothesized that after entering the auditory system, the complex auditory signal resulted from concurrent sound sources in a crowded environment is decomposed into acoustic features. An appropriate binding of the relevant features, and discounting of others, leads to forming the percept of an auditory object [1, 2, 3]. The complexity of this process becomes tangible when one tries to synthesize the underlying mechanism known as the cocktail party problem [4, 5, 6, 7]. In a number of recent studies it has been shown that concurrent auditory objects even with highly overlapping spectrotemporal features, are neurally encoded as a distinct object in auditory cortex and emerge as fundamental representational units for high-level cognitive processing [8, 9, 10]. In the case of listening to speech, it has recently been demonstrated by Ding and Simon [8], that the auditory response manifested in MEG is strongly modulated by the spectrotemporal features of the speech. In the presence of two speakers, this modulation appears to be strongly correlated with the temporal features of the attended speaker as opposed to the unattended speaker (See Figure 1–A). Previous studies employ time-averaging across multiple trials in order to decode the attentional state of the listener from MEG observations. This method is only valid when the subject is attending to a single speaker during the entire trial. In a real-world scenario, the attention of the listener can switch dynamically from one speaker to another. Decoding the attentional target in this scenario requires a 1 Spk1 Attended Spk2 Attended Sink Source 50ft/Step B A C 0 125 250 375 500 −6 −4 −2 0 2 4 6 8 x 10−5 50 Time (ms) Temporal Response Function Spk1 Spk2 MEG Spk1 Speech Spk2 Speech Figure 1: A) Schematic depiction of auditory object encoding in the auditory cortex. B) The MEG magnetic field distribution of the first DSS component shows a stereotypical pattern of neural activity originating separately in the left and right auditory cortices. Purple and green contours represent the magnetic field strength. Red arrows schematically represent the locations of the dipole currents, generating the measured magnetic field. C) An example of the TRF, estimated from real MEG data. Significant TRF components analogous to the well-known M50 and M100 auditory responses are marked in the plot. dynamic estimation framework with high temporal resolution. Moreover, the current techniques use the full spectrotemporal features of the speech for decoding. It is not clear whether the decoding can be carried out with a more parsimonious set of spectrotemporal features. In this paper, we develop a behaviorally inspired state-space model to account for the modulation of MEG with respect to the attentional state of the listener in a double-speaker environment. MAP estimation of the state-space parameters given MEG observations is carried out via the EM algorithm. We present simulation studies as well as application to experimentally acquired MEG data, which reveal that the proposed decoder is able to accurately track the attentional state of a listener in a double-speaker environment while selectively listening to one of the two speakers. Our method has three main advantages over existing techniques. First, the decoder provides estimates with subsecond temporal resolution. Second, it only uses the envelopes of the two speech streams as the covariates, which is a substantial reduction in the dimension of the spectrotemporal feature set used for decoding. Third, the principled statistical framework used in constructing the decoder allows us to obtain confidence bounds on the estimated attentional state. The paper is organized as follows. In Section 2, we introduce the state-space model and the proposed decoding algorithm. We present simulation studies to test the decoder in terms of robustness with respect to noise as well as tracking performance and apply to real MEG data recorded from two human subjects in Section 3. Finally, we discuss the future directions and generalizations of our proposed framework in Section 4. 2 Methods We first consider the forward problem of relating the MEG observations to the spectrotemporal features of the attended and unattended speech streams. Next, we consider the inverse problem where we seek to decode the attentional state of the listener given the MEG observations and the temporal features of the two speech streams. 2.1 The Forward Problem: Estimating the Temporal Response Function Consider a task where the subject is passively listening to a speech stream. Let the discretetime MEG observation at time t, sensor j, and trial r be denoted by xt,j,r, for t = 1, 2, · · · , T, j = 1, 2, · · · , M and r = 1, 2, · · · , R. The stimulus-irrelevant neural activity can be removed using denoising source separation (DSS) [11]. The DSS algorithm is a blind source separation method that decomposes the data into T temporally uncorrelated components by enhancing consistent components over trials and suppressing noise-like components of the data, with no knowledge of the stimulus or timing of the task. Let the time series y1,r, y2,r, · · · , yT,r denote the first significant component of the DSS decomposition, denoted hereafter by MEG data. In an auditory task, this component has a field map which is consistent with the stereotypical auditory response in MEG (See Figure 1–B). Also, let Et be the speech envelope of the speaker at time t in dB scale. In a linear model, the MEG data is linearly related to the envelope of speech as: yt,r = τt ∗Et + vt,r, (1) 2 where τt is a linear filter of length L denoted by temporal response function (TRF), ∗denotes the convolution operator, and vt,r is a nuisance component accounting for trial-dependent and stimulusindependent components manifested in the MEG data. It is known that the TRF is a sparse filter, with significant components analogous to the M50 and M100 auditory responses ([9, 8], See Figure 1–C). A commonly-used technique for estimating the TRF is known as Boosting ([12, 9]), where the components of the TRF are greedily selected to decrease the mean square error (MSE) of the fit to the MEG data. We employ an alternative estimation framework based on ℓ1-regularization. Let τ := [τL, τL−1, · · · , τ1]′ be the time-reversed version of the TRF filter in vector form, and let Et := [Et, Et−1, · · · , Et−L+1]′. In order to obtain a sparse estimate of the TRF, we seek the ℓ1-regularized estimate: bτ = argmin τ R,T X r,t=1 ∥yt,r −τ ′Et∥2 2 + γ∥τ∥1, (2) where γ is the regularization parameter. The above problem can be solved using standard optimization software. We have used a fast solver based on iteratively re-weighted least squares [13]. The parameter γ is chosen by two-fold cross-validation, where the first half of the data is used for estimating τ and the second half is used to evaluate the goodness-of-fit in the MSE sense. An example of the estimated TRF is shown in Figure 1–C. In a competing-speaker environment, where the subject is only attending to one of the two speakers, the linear model takes the form: yt,r = τ a t ∗Ea t + τ u t ∗Eu t + vt,r, (3) with τ a t , Ea t , τ u t , and Eu t , denoting the TRF and envelope of the attended and unattended speakers, respectively. The above estimation framework can be generalized to the two-speaker case by replacing the regressor τ ′Et with τ a′Ea t + τ u′Eu t , where τ a, Ea t , τ u, and Eu t are defined in a fashion similar to the single-speaker case. Similarly, the regularization γ∥τ∥1 is replaced by γa∥τ a∥1 + γu∥τ u∥1. 2.2 The Inverse Problem: Decoding Attentional Modulation 2.2.1 Observation Model Let y1,r, y2,r, · · · , yT,r denote the MEG data time series at trial r, for r = 1, 2, · · · , R during an observation period of length T. For a window length W, let yk,r :=  y(k−1)W +1,r, y(k−1)W +2,r, · · · , ykW,r  , (4) for k = 1, 2, · · · , K := ⌊T/W⌋. Also, let Ei,t be the speech envelope of speaker i at time t in dB scale, i = 1, 2. Let τ a t and τ u t denote the TRFs of the attended and unattended speakers, respectively. The MEG predictors in the linear model are given by:  e1,t := τ a t ∗E1,t + τ u t ∗E2,t attending to speaker 1 e2,t := τ a t ∗E2,t + τ u t ∗E1,t attending to speaker 2 , t = 1, 2, · · · , T. (5) Let ei,k :=  ei,(k−1)W +1, ei,(k−1)W +2, · · · , ei,kW  , for i = 1, 2 and k = 1, 2, · · · , K. (6) Recent work by Ding and Simon [8] suggests that the MEG data yk is more correlated with the predictor ei,k when the subject is attending to the ith speaker at window k. Let θi,k,r := arccos  yk,r ∥yk,r∥2 , ei,k ∥ei,k∥2  (7) denote the empirical correlation between the observed MEG data and the model prediction when attending to speaker i at window k and trial r. When θi,k,r is close to 0 (π), the MEG data and its predicted value are highly (poorly) correlated. Inspired by the findings of Ding and Simon [8], we model the statistics of θi,k,r by the von Mises distribution [14]: p (θi,k,r) = 1 πI0(κi) exp (κi cos (θi,k,r)) , θi,k,r ∈[0, π], i = 1, 2 (8) where I0(·) is the zeroth order modified Bessel function of the first kind, and κi denotes the spread parameter of the von Mises distribution for i = 1, 2. The von Mises distribution gives more (less) weight to higher (lower) values of correlation between the MEG data and its predictor and is pretty robust to gain fluctuations of the neural data.The spread parameter κi accounts for the concentration of θi,k,r around 0. We assume a conjugate prior of the form p(κi) ∝exp(c0dκi) I0(κi)d over κi, for some hyper-parameters c0 and d. 3 2.2.2 State Model Suppose that at each window of observation, the subject is attending to either of the two speakers. Let nk,r be a binary variable denoting the attention state of the subject at window k and trial r: nk,r =  1 attending to speaker 1 0 attending to speaker 2 (9) The subjective experience of attending to a specific speech stream among a number of competing speeches reveals that the attention often switches to the competing speakers, although not intended by the listener. Therefore, we model the statistics of nk,r by a Bernoulli process with a success probability of qk: p(nk,r|qk) = qnk,r k (1 −qk)1−nk,r. (10) A value of qk close to 1 (0) implies attention to speaker 1 (2). The process {qk}K k=1 is assumed to be common among different trials. In order to model the dynamics of qk, we define a variable zk such that qk = logit−1(zk) := exp(zk) 1 + exp(zk). (11) When zk tends to +∞(−∞), qk tends to 1 (0). We assume that zk obeys AR(1) dynamics of the form: zk = zk−1 + wk, (12) where wk is a zero-mean i.i.d. Gaussian random variable with a variance of ηk. We further assume that ηk are distributed according to the conjugate prior given by the inverse-Gamma distribution with hyper-parameters α (shape) and β (scale). 2.2.3 Parameter Estimation Let Ω:= n κ1, κ2, {zk}K k=1, {ηk}K k=1 o (13) be the set of parameters. The log-posterior of the parameter set Ωgiven the observed data  θi,k,r 2,T,R i,k,r=1 is given by: log p  Ω {θi,k,r}2,K,R i,k,r=1  = R,K X r,k=1 log  qk πI0(κ1) exp (κ1cos (θ1,k,r))+ 1 −qk πI0(κ2) exp (κ2cos (θ2,k,r))  +  (κ1 + κ2)c0d −d log I0(κ1) + log I0(κ2)  − R,K X r,k=1  1 2ηk (zk−zk−1)2 + 1 2 log ηk + (α + 1) log ηk + β ηk  + cst. where cst. denotes terms that are not functions of Ω. The MAP estimate of the parameters is difficult to obtain given the involved functional form of the log-posterior. However, the complete data log-posterior, where the unobservable sequence {nk,r}K,R k=1,r=1 is given, takes the form: log p  Ω {θi,k,r, nk,r}2,K,R i,k,r=1  = R,K X r,k=1 nk,r [κ1 cos (θ1,k,r)−log I0(κ1) + log qk] + R,K X r,k=1 (1−nk,r) [κ2 cos (θ2,k,r)−log I0(κ2) + log(1 −qk)] +  (κ1 + κ2)c0d −d log I0(κ1) + log I0(κ2)  − R,K X r,k=1  1 2ηk (zk−zk−1)2+ 1 2 log ηk+(α + 1) log ηk+ β ηk  +cst. The log-posterior of the parameters given the complete data has a tractable functional form for optimization purposes. Therefore, by taking {nk,r}K,R k=1,r=1 as the unobserved data, we can estimate 4 Ωvia the EM algorithm [15]. Using Bayes’ rule, the expectation of nk,r, given  θi,k,r 2,K,R i,k,r=1 and current estimates of the parameters Ω(ℓ) :=  κ(ℓ) 1 , κ(ℓ) 2 ,  z(ℓ) k K k=1,  η(ℓ) k K k=1 is given by: E n nk,r {θi,k,r}2,K,R i,k,r=1, Ω(ℓ)o = q(ℓ) k πI0  κ(ℓ) 1  exp  κ(ℓ) 1 cos (θ1,k,r)  q(ℓ) k πI0  κ(ℓ) 1  exp  κ(ℓ) 1 cos (θ1,k,r)  + 1−q(ℓ) k πI0  κ(ℓ) 2  exp  κ(ℓ) 2 cos (θ2,k,r) . Denoting the expectation above by the shorthand E(ℓ){nk,r}, the M-step of the EM algorithm for κ(ℓ+1) 1 and κ(ℓ+1) 2 gives: κ(ℓ+1) i = A−1        c0d + R,K X r,k=1 ε(ℓ) i,k,r cos (θi,k,r) d + R,K X r,k=1 ε(ℓ) i,k,r        , ε(ℓ) i,k,r =  E(ℓ){nk,r} i = 1 1 −E(ℓ){nk,r} i = 2 , (14) where A(x) := I1(x)/I0(x), with I1(·) denoting the first order modified Bessel function of the first kind. Inversion of A(·) can be carried out numerically in order to find κ(ℓ+1) 1 and κ(ℓ+1) 2 . The M-step for {ηk}K k=1 and {zk}K k=1 corresponds to the following maximization problem: argmax {zk,ηk}K k=1 R,K X r,k=1  E(ℓ){nk,r}zk−log(1 + exp(zk))−1 2ηk h (zk −zk−1)2+2β i −1+2(α+1) 2 log ηk  . An efficient approximate solution to this maximization problem is given by another EM algorithm, where the E-step is the point process smoothing algorithm [16, 17] and the M-step updates the state variance sequence [18]. At iteration m, given an estimate of η(ℓ+1) k , denoted by η(ℓ+1,m) k , the forward pass of the E-step for k = 1, 2, · · · , K is given by:                                ¯z(ℓ+1,m) k|k−1 = ¯z(ℓ+1,m) k−1|k−1 σ(ℓ+1,m) k|k−1 = σ(ℓ+1,m) k−1|k−1 + η(ℓ+1,m) k R ¯z(ℓ+1,m) k|k = ¯z(ℓ+1,m) k|k−1 + σ(ℓ+1,m) k|k−1   R X r=1 E(ℓ){nk,r} −R exp  ¯z(ℓ+1,m) k|k  1 + exp  ¯z(ℓ+1,m) k|k    σ(ℓ+1,m) k|k =   1 σ(ℓ+1,m) k|k−1 + R exp  ¯z(ℓ+1,m) k|k   1 + exp  ¯z(ℓ+1,m) k|k 2   −1 (15) and for k = K −1, K −2, · · · , 1, the backward pass of the E-step is given by:        s(ℓ+1,m) k = σ(ℓ+1,m) k|k /σ(ℓ+1,m) k+1|k ¯z(ℓ+1,m) k|K = ¯z(ℓ+1,m) k|k + s(ℓ+1,m) k  ¯z(ℓ+1,m) k+1|K −¯z(ℓ+1,m) k+1|k  σ(ℓ+1,m) k|K = σ(ℓ+1,m) k|k + s(ℓ+1,m) k  σ(ℓ+1,m) k+1|K −σ(ℓ+1,m) k+1|k  s(ℓ+1,m) k (16) Note that the third equation in the forward filter is non-linear in ¯z(ℓ+1,m) k|k , and can be solved using standard techniques (e.g., Newton’s method). The M-step gives the updated value of η(ℓ+1,m+1) k as: η(ℓ+1,m+1) k =  ¯z(ℓ+1,m) k|K −¯z(ℓ+1,m) k−1|K 2 + σ(ℓ+1,m) k|K + σ(ℓ+1,m) k−1|K −2σ(ℓ+1,m) k|K s(ℓ+1,m) k−1 + 2β 1 + 2(α + 1) . (17) For each ℓin the outer EM iteration, the inner iteration over m is repeated until convergence, to obtain the updated values of {z(ℓ+1) k }K k=1 and {η(ℓ+1) k }K k=1 to be passed to the outer EM iteration. 5 The updated estimate of the Bernoulli success probability at window k and iteration ℓ+1 is given by q(ℓ+1) k = logit−1z(ℓ+1) k  . Starting with an initial guess of the parameters, the outer EM algorithm alternates between finding the expectation of {nk,r}K,R k=1,r=1 and estimating the parameters κ1, κ2, {zk}K k=1 and {ηk}K k=1 until convergence. Confidence intervals for q(ℓ) k can be obtained by mapping the Gaussian confidence intervals for the Gaussian variable z(ℓ) k via the inverse logit mapping. In summary, the decoder inputs the MEG observations and the envelopes of the two speech streams, and outputs the Bernoulli success probability sequence corresponding to attention to speaker 1. 3 Results 3.1 Simulated Experiments We first evaluated the proposed state-space model and estimation procedure on simulated MEG data. For a sampling rate of Fs = 200Hz, a window length of W = 50 samples (250ms), and a total observation time of T = 12000 samples (60s), the binary sequence {nk,r}240,3 k=1,r=1 is generated as realizations of a Bernoulli process with success probability qk = 0.95 or 0.05, corresponding to attention to speaker one or two, respectively. Using a TRF template of length 0.5s estimated from real data, we generated 3 trials with an SNR of 10dB. Each trial includes three attentional switches occurring every 15 seconds. The hyper-parameters α and β for the inverse-Gamma prior on the state variance are chosen as α = 2.01 and β = 2. This choice of α close to 2 results in a non-informative prior, as the variance of the prior is given by β2/[(α −1)2(α −2)] ≈400, while the mean is given by β/(α −1) ≈2. The mean of the prior is chosen large enough so that the state transition from qk = 0.99 to qk+1 = 0.01 lies in the 98% confidence interval around the state innovation variable wk (See Eq. (12)). The hyper-parameters for the von Mises distribution are chosen as d = 7 2KR and c0 = 0.15, as the average observed correlation between the MEG data and the model prediction is ≈ in the range of 0.1–0.2. The choice of d = 7 2KR gives more weight to the prior than the empirical estimate of κi. Figure 2–A and 2–B show the simulated MEG signal (black traces) and predictors of attending to speaker one and two (red traces), respectively, at an SNR of 10 dB. Regions highlighted in yellow in panels A and B indicate the attention of the listener to either of the two speakers. Estimated values of {qk}240 k=1 (green trace) and the corresponding confidence intervals (green hull) are shown in Figure 2–C. The estimated qk values reliably track the attentional modulation, and the transitions are captured with high accuracy. MEG data recorded from the brain is usually contaminated with environmental noise as well as nuisance sources of neural activity, which can considerably decrease the SNR of the measured signal. In order to test the robustness of the decoder with respect to observation noise, we repeated the above simulation with SNR values of 0 dB, −10 dB and −20 dB. As Figure 2–D shows, the dynamic denoising feature of the proposed state-space model results in a desirable decoding performance for SNR values as low as −20 dB. The confidence intervals and the estimated transition width widen gracefully as the SNR decreases. Finally, we test the tracking performance of the decoder with respect to the frequency of the attentional switches. From subjective experience, attentional switches occur over a time scale of few seconds. We repeated the above simulation for SNR = 10 dB with 14 attentional switches equally spaced during the 60s trial. Figure 2–E shows the corresponding estimate values of {qk}, which reliably tracks the 14 attentional switches during the observation period. 3.2 Application to Real MEG Data We evaluated our proposed state-space model and decoder on real MEG data recorded from two human subjects listening to a speech mixture from a male and a female speaker under different attentional conditions. The experimental methods were approved by the Institutional Review Board (IRB) at the authors’ home institution. Two normal-hearing right-handed young adults participated in this experiment. Listeners selectively listened to one of the two competing speakers of opposite gender, mixed into a single acoustic channel with equal density. The stimuli consisted of 4 segments from the book A Child History of England by Charles Dickens, narrated by two different readers (one male and one female). Three different mixtures, each 60s long, were generated and used in different experimental conditions to prevent reduction in attentional focus of the listeners, as opposed to listening to a single mixture repeatedly over the entire experiment. All stimuli were delivered 6 Figure 2: Simulated MEG data (black traces) and model prediction (red traces) of A) speaker one and B) speaker two at SNR = 10 dB. Regions highlighted in yellow indicate the attention of the listener to each of the speakers. C) Estimated values of {qk} with 95% confidence intervals. D) Estimated values of {qk} from simulated MEG data vs. SNR = 0, −10 and −20dB. E) Estimated values of {qk} from simulated MEG data with SNR = 10dB and 14 equally spaced attention switches during the entire trial. Error hulls indicate 95% confidence intervals. The MEG units are in pT/m. identically to both ears using tube phones plugged into the ears and at a comfortable loudness level of around 65 dB. The neuromagnetic signal was recorded using a 157–channel, whole-head MEG system (KIT) in a magnetically shielded room, with a sampling rate of 1kHz. Three reference channels were used to measure and cancel the environmental magnetic field [19]. The stimulus-irrelevant neural activity was removed using the DSS algorithm [11]. The recorded neural response during each 60s was high-pass filtered at 1 Hz and downsampled to 200 Hz before submission to the DSS analysis. Only the first component of the DSS decomposition was used in the analysis [9]. The TRF corresponding to the attended speaker was estimated from a pilot condition where only a single speech stream was presented to the subject, using 3 repeated trials (See Section 2.1). The TRF corresponding to the unattended speaker was approximated by truncating the attended TRF beyond a lag of 90ms, on the grounds of the recent findings of Ding and Simon [8] which show that the components of the unattended TRF are significantly suppressed beyond the M50 evoked field. In the following analysis, trials with poor correlation values between the MEG data and the model prediction were removed by testing for the hypothesis of uncorrelatedness using the Fisher transformation at a confidence level of 95% [20], resulting in rejection of about 26% of the trials. All the hyper-parameters are equal to those used for the simulation studies (See Section 3.1). In the first and second conditions, subjects were asked to attend to the male and female speakers, respectively, during the entire trial. Figure 3–A and 3–B show the MEG data and the predicted qk values for averaged as well as single trials for both subjects. Confidence intervals are shown by the shaded hulls for the averaged trial estimate in each condition. The decoding results indicate that the decoder reliably recovers the attention modulation in both conditions, by estimating {qk} close to 1 and 0 for the first and second conditions, respectively. For the third and fourth conditions, subjects were instructed to switch their attention in the middle of each trial, from the male to the female speaker (third condition) and from the female to the male speaker (fourth condition). Switching times were cued by inserting a 2s pause starting at 28s in each trial. Figures 3–C and 3–D show the MEG data and the predicted qk values for averaged and single trials corresponding to the third and fourth conditions, respectively. Dashed vertical lines show the start of the 2s pause before attentional switch. Using multiple trials, the decoder is able to capture the attentional switch occurring roughly halfway through the trial. The decoding of individual trials suggest that the exact switching time is not consistent across different trials, as the attentional switch may occur slightly earlier or later than the presented cue due to inter-trial variability. Moreover, the decoding results for a correlation-based classifier is shown in the third panel of each figure for one of the subjects. At each time window, the 7 Figure 3: Decoding of auditory attentional modulation from real MEG data. In each subplot, the MEG data (black traces) and the model prediction (red traces) for attending to speaker 1 (male) and speaker 2 (female) are shown in the first and second panels, respectively, for subject 1. The third panel shows the estimated values of {qk} and the corresponding confidence intervals using multiple trials for both subjects. The gray traces show the results for a correlation-based classifier for subject 1. The fourth panel shows the estimated {qk} values for single trials. A) Condition one: attending to speaker 1 through the entire trial. B) Condition two: attending to speaker 2 through the entire trial. C) Condition three: attending to speaker 1 until t = 28s and switching attention to speaker 2 starting at t = 30s. D) Condition four: attending to speaker 2 until t = 28s and switching attention to speaker 1 starting at t = 30s. Dashed lines in subplots C and D indicate the start of the 2s silence cue for attentional switch. Error hulls indicate 95% confidence intervals. The MEG units are in pT/m. classifier picks the speaker with the maximum correlation (averaged across trials) between the MEG data and its predicted value based on the envelopes. Our proposed method significantly outperforms the correlation-based classifier which is unable to consistently track the attentional modulation of the listener over time. 4 Discussion In this paper, we presented a behaviorally inspired state-space model and an estimation framework for decoding the attentional state of a listener in a competing-speaker environment. The estimation framework takes advantage of the temporal continuity in the attentional state, resulting in a decoding performance with high accuracy and high temporal resolution. Parameter estimation is carried out using the EM algorithm, which at its heart ties to the efficient computation of the Bernoulli process smoothing, resulting in a very low overall computational complexity. We illustrate the performance of our technique on simulated and real MEG data from human subjects. The proposed approach benefits from the inherent model-based dynamic denosing of the underlying state-space model, and is able to reliably decode the attentional state under very low SNR conditions. Future work includes generalization of the proposed model to more realistic and complex auditory environments with more diverse sources such as mixtures of speech, music and structured background noise. Adapting the proposed model and estimation framework to EEG is also under study. 8 References [1] Bregman, A. S. (1994). Auditory Scene Analysis: The Perceptual Organization of Sound, Cambridge, MA: MIT Press. [2] Griffiths, T. D., & Warren, J. D. (2004). What is an auditory object?. Nature Reviews Neuroscience, 5(11), 887–892. [3] Shamma, S. A., Elhilali, M., & Micheyl, C. (2011). Temporal coherence and attention in auditory scene analysis. Trends in neurosciences, 34(3), 114–123. [4] Bregman, A. S. (1998). Psychological data and computational ASA. In Computational Auditory Scene Analysis (pp. 1-12). Hillsdale, NJ: L. Erlbaum Associates Inc. [5] Cherry, E. C. (1953). Some experiments on the recognition of speech, with one and with two ears. Journal of the Acoustical Society of America, 25(5), 975–979. [6] Elhilali, M., Xiang, J., Shamma, S. A., & Simon, J. Z. (2009). Interaction between attention and bottom-up saliency mediates the representation of foreground and background in an auditory scene. PLoS Biology, 7(6), e1000129. [7] Shinn-Cunningham, B. G. (2008). Object-based auditory and visual attention. Trends in Cognitive Sciences, 12(5), 182–186. [8] Ding, N. & Simon, J.Z. (2012). Emergence of neural encoding of auditory objects while listening to competing speakers. PNAS, 109(29):11854–11859. [9] Ding, N. & Simon, J.Z. (2012). Neural coding of continuous speech in auditory cortex during monaural and dichotic listening. Journal of Neurophisiology, 107(1):78–89. [10] Mesgarani, N., & Chang, E. F. (2012). Selective cortical representation of attended speaker in multi-talker speech perception. Nature, 485(7397), 233–236. [11] de Cheveign´e, A., & Simon, J. Z. (2008). Denoising based on spatial filtering. Journal of Neuroscience Methods, 171(2), 331–339. [12] David, S. V., Mesgarani, N., & Shamma. (2007). Estimating sparse spectro-temporal receptive fields with natural stimuli. Network: Computation in Neural Systems, 18(3), 191–212. [13] Ba, D., Babadi, B., Purdon, P. L., & Brown, E. N. (2014). Convergence and stability of iteratively re-weighted least squares algorithms, IEEE Trans. on Signal Processing, 62(1), 183–195. [14] Fisher, N. I. (1995). Statistical Analysis of Circular Data, Cambridge, UK: Cambridge University Press. [15] Dempster, A. P., Laird, N. M., & Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, 39(1), 1–38. [16] Smith, A. C. & Brown, E. N. (2003). Estimating a state-space model from point process observations. Neural Computation. 15(5), 965–991. [17] Smith, A. C., Frank, L. M., Wirth, S., Yanike, M., Hu, D., Kubota, Y., Graybiel, A. M., Suzuki, W. A., & Brown, E. N. (2004). Dynamic analysis of learning in behavioral experiments. The Journal of Neuroscience, 24(2), 447–461. [18] Shumway, R. H., & Stoffer, D. S. (1982). An approach to time series smoothing and forecasting using the EM algorithm. Journal of Time Series Analysis, 3(4), 253–264. [19] de Cheveign´e, A., & Simon, J. Z. (2007). Denoising based on time-shift PCA. Journal of Neuroscience Methods, 165(2), 297–305. [20] Fisher, R. A. (1915). Frequency distribution of the values of the correlation coefficient in samples of an indefinitely large population. Biometrika, 10(4): 507–521. 9
2014
262
5,361
Sensory Integration and Density Estimation Joseph G. Makin and Philip N. Sabes Center for Integrative Neuroscience/Department of Physiology University of California, San Francisco San Francisco, CA 94143-0444 USA makin, sabes @phy.ucsf.edu Abstract The integration of partially redundant information from multiple sensors is a standard computational problem for agents interacting with the world. In man and other primates, integration has been shown psychophysically to be nearly optimal in the sense of error minimization. An influential generalization of this notion of optimality is that populations of multisensory neurons should retain all the information from their unisensory afferents about the underlying, common stimulus [1]. More recently, it was shown empirically that a neural network trained to perform latent-variable density estimation, with the activities of the unisensory neurons as observed data, satisfies the information-preservation criterion, even though the model architecture was not designed to match the true generative process for the data [2]. We prove here an analytical connection between these seemingly different tasks, density estimation and sensory integration; that the former implies the latter for the model used in [2]; but that this does not appear to be true for all models. 1 Introduction A sensible criterion for integration of partially redundant information from multiple senses is that no information about the underlying cause be lost. That is, the multisensory representation should contain all of the information about the stimulus as the unisensory representations together did. A variant on this criterion was first proposed in [1]. When satisfied, and given sensory cues that have been corrupted with Gaussian noise, the most probable multisensory estimate of the underlying stimulus property (height, location, etc.) will be a convex combination of the estimates derived independently from the unisensory cues, with the weights determined by the variances of the corrupting noise—as observed psychophysically in monkey and man, e.g., [3,4]. The task of plastic organisms placed in novel environments is to learn, from scratch, how to perform this task. One recent proposal [2] is that primates treat the activities of the unisensory populations of neurons as observed data for a latent-variable density-estimation problem. Thus the activities of a population of multisensory neurons play the role of latent variables, and the model is trained to generate the same distribution of unisensory activities when they are driven by the multisensory neurons as when they are driven by their true causes in the world. The idea is that the latent variables in the model will therefore come to correspond (in some way) to the latent variables that truly underlie the observed distribution of unisensory activities, including the structure of correlations across populations. Then it is plausible to suppose that, for any particular value of the stimulus, inference to the latent variables of the model is “as good as” inference to the true latent cause, and that therefore the information criterion will be satisfied. Makin et alia showed precisely this, empirically, using an exponential-family harmonium (a generalization of the restricted Boltzmann machine [5]) as the density estimator [2]. 1 Here we prove analytically that successful density estimation in certain models, including that of [2], will necessarily satisfy the information-retention criterion. In variant architectures, the guarantee does not hold. 2 Theoretical background 2.1 Multisensory integration and information retention Psychophysical studies have shown that, when presented with cues of varying reliability in two different sense modalities but about a common stimulus property (e.g., location or height), primates (including humans) estimate the property as a convex combination of the estimates derived independently from the unisensory cues, where the weight on each estimate is proportional to its reliability [3,4]. Cue reliability is measured as the inverse variance in performance across repeated instances of the unisensory cue, and will itself vary with the amount of corrupting noise (e.g., visually blur) added to the cue. This integration rule is optimal in that it minimizes error variance across trials, at least for Gaussian corrupting noise. Alternatively, it can be seen as a special case of a more general scheme [6]. Assuming a uniform prior distribution of stimuli, the optimal combination just described is equal to the peak of the posterior distribution over the stimulus, conditioned on the noisy cues (y1, y2): x∗= argmax x Pr[X = x|y1, y2]. For Gaussian corrupting noise, this posterior distribution will itself be Gaussian; but even for integration problems that yield non-Gaussian posteriors, humans have been shown to estimate the stimulus with the peak of that posterior [7]. This can be seen as a consequence of a scheme more general still, namely, encoding not merely the peak of the posterior, but the entire distribution [1, 8]. Suppose again, for simplicity, that Pr[X|Y1, Y2] is Gaussian. Then if x∗is itself to be combined with some third cue (y3), optimality requires keeping the variance of this posterior as well, since it (along with the reliability of y3) determines the weight given to x∗in this new combination. This scheme is especially relevant when y1 and y2 are not “cues” but the activities of populations of neurons, e.g. visual and auditory, respectively. Since sensory information is more likely to be integrated in the brain in a staged, hierarchical fashion than in a single common pool [9], optimality requires encoding at least the first two cumulants of the posterior distribution. For more general, non-Gaussian posteriors, the entire posterior should be encoded [1, 6]. This amounts [1] to requiring, for downstream, “multisensory” neurons with activities Z, that: Pr[X|Z] = Pr[X|Y1, Y2]. When information about X reaches Z only via Y = [Y1, Y2] (i.e., X →Y →Z forms a Markov chain), this is equivalent (see Appendix) to requiring that no information about the stimulus be lost in transforming the unisensory representations into a multisensory representation; that is, I(X; Z) = I(X; Y), where I(A; B) is the mutual information between A and B. Of course, if there is any noise in the transition from unisensory to multisensory neurons, this equation cannot be satisfied exactly. A sensible modification is to require that this noise be the only source of information loss. This amounts to requiring that the information equality hold, not for Z, but for any set of sufficient statistics for Z as a function of Y, Tz(Y); that is, I(X; Tz(Y)) = I(X; Y). (1) 2.2 Information retention and density estimation A rather general statement of the role of neural sensory processing, sometimes credited to Helmholtz, is to make inferences about states of affairs in the world, given only the data supplied by the sense organs. Inference is hard because the mapping from the world’s states to sense data is 2 Y X p(y|x) p(x) A Y Z q(y|z) q(z) B Figure 1: Probabilistic graphical models. (A) The world’s generative process. (B) The model’s generative process. Observed nodes are shaded. After training the model (q), the marginals match: p(y) = q(y). not invertible, due both to noise and to the non-injectivity of physical processes (as in occlusion). A powerful approach to this problem used in machine learning, and arguably by the brain [10, 11], is to build a generative model for the data (Y), including the influence of unobserved (latent) variables (Z). The latent variables at the top of a hierarchy of such models would presumably be proxies for the true causes, states of affairs in the world (X). In density estimation, however, the objective function for learning the parameters of the model is that: Z x p(y|x)p(x)dx = Z z q(y|z)q(z)dz (2) (Fig. 1), i.e., that the “data distribution” of Y match the “model distribution” of Y; and this is consistent with models that throw away information about the world in the transformation from observed to latent variables, or even to their sufficient statistics. For example, suppose that the world’s generative process looked like this: Example 2.1. The prior p(x) is the flip of an unbiased coin; and the emission p(y|x) draws from a standard normal distribution, takes the absolute value of the result, and then multiplies by −1 for tails and +1 for heads. Information about the state of X is therefore perfectly represented in Y . But a trained density-estimation model with, say, a Gaussian emission model, q(y|z), would not bother to encode any information in Z, since the emission model alone can represent all the data (which just look like samples from a standard normal distribution). Thus Y and Z would be independent, and Eq. 1 would not be satisfied, even though Eq. 2 would. This case is arguably pathological, but similar considerations apply for more subtle variants. In addition to Eq. 2, then, we shall assume something more: namely, that the “noise models” for the world and model match; i.e., that q(y|z) has the same functional form as p(y|x). More precisely, we assume: ∃functions f(y; λ), φ(x), ψ(z) ∋ p(y|x) = f y; φ(x)  , q(y|z) = f y; ψ(z)  . (3) In [2], for example, f(y; λ) was assumed to be a product of Poisson distributions, so the “proximate causes” Λ were a vector of means. Note that the functions φ(x) and ψ(z) induce distributions over Λ which we shall call p(λ) and q(λ), respectively; and that: Ep(λ)[f(y; λ)] = Ep(x)[f(y; φ(x)] = Eq(z)[f(y; ψ(z)] = Eq(λ)[f(y; λ)], (4) where the first and last equalities follows from the “law of the unconscious statistician,” and the second follows from Eqs. 2 and 3. 3 Latent-variable density estimation for multisensory integration In its most general form, the aim is to show that Eq. 4 implies, perhaps with some other constraints, Eq. 1. More concretely, suppose the random variables Y1, Y2, provided by sense modalities 1 and 2, correspond to noisy observations of an underlying stimulus. These could be noisy cues, but they could also be the activities of populations of neurons (visual and proprioceptive, say, for concreteness). Then suppose a latent-variable density estimator is trained on these data, until it assigns the same probability, q(y1, y2), to realizations of the observations, [y1, y2], as that with which they appear, p(y1, y2). Then we should like to know that inference to the latent variables in the model, 3 i.e., computation of the sufficient statistics Tz(Y1, Y2), throws away no information about the stimulus. In [2], where this was shown empirically, the density estimator was a neural network, and its latent variables were interpreted as the activities of downstream, multisensory neurons. Thus the transformation from unisensory to multisensory representation was shown, after training, to obey this information-retention criterion. It might seem that we have already assembled sufficient conditions. In particular, knowing that the “noise models match,” Eq. 3, might seem to guarantee that the data distribution and model distribution have the same sufficient statistics, since sufficient statistics depend only on the form of the conditional distribution. Then Tz(Y) would be sufficient for X as well as for Z, and the proof complete. But this sense of “form of the conditional distribution” is stronger than Eq. 4. If, for example, the image of z under ψ(·) is lower-dimensional than the image of x under φ(·), then the conditionals in Eq. 3 will have different forms as far as their sufficient statistics go. An example will clarify the point. Example 3.1. Let p(y) be a two-component mixture of a (univariate) Bernoulli distribution. In particular, let φ(x) and ψ(z) be the identity maps, Λ provide the mean of the Bernoulli, and p(X = 0.4) = 1/2, p(X = 0.6) = 1/2. The mixture marginal is therefore another Bernoulli random variable, with equal probability of being 1 or 0. Now consider the “mixture” model q that has the same noise model, i.e., a univariate Bernoulli distribution, but a prior with all its mass at a single mixing weight. If q(Z = 0.5) = 1, this model will satisfy Eq. 4. But a (minimal) sufficient statistic for the latent variables under p is simply the single sample, y, whereas the minimal sufficient statistic for the latent variable under q is the nullset: the observation tells us nothing about Z because it is always the same value. To rule out such cases, we propose (below) further constraints. 3.1 Proof strategy We start by noting that any sufficient statistics Tz(Y) for Z are also sufficient statistics for any function of Z, since all the information about the output of that function must pass through Z first (Fig. 2A). In particular, then, Tz(Y) are sufficient statistics for the proximate causes, Λ = ψ(Z). That is, for any λ generated by the model, Fig. 1B, tz(y) for the corresponding y drawn from f(y; λ) are sufficient statistics. What about the λ generated by the world, Fig. 1A? We should like to show that tz(y) are sufficient for them as well. This will be the case if, for every λ produced by the world, there exists a vector z such that ψ(z) = λ. This minimal condition is hard to prove. Instead we might show a slightly stronger condition, that (q(λ) = 0) =⇒ (p(λ) = 0), i.e., to any λ that can be generated by the world, the model assigns nonzero probability. This is sufficient (although unnecessary) for the existence of a vector z for every λ produced by the world. Or we might pursue a stronger condition still, that to any λ that can be generated by the world, the model and data assign the same probability: q(λ) = p(λ). If one considers the marginals p(y) = q(y) to be mixture models, then this last condition is called the “identifiability” of the mixture [12], and for many conditional distributions f(y; λ), identifiability conditions have been proven. Note that mixture identifiability is taken to be a property of the conditional distribution, f(y; λ), not the marginal, p(y); so, e.g., without further restriction, a mixture model is not identifiable even if there exist just two prior distributions, p1(λ), p2(λ), that produce identical marginal distributions. To see that identifiability, although sufficient (see below) is unnecessary, consider again the twocomponent mixture of a (univariate) Bernoulli distribution: Example 3.2. Let p(X = 0.4) = 1/2, p(X = 0.6) = 1/2. If the model, q(y|z)q(z), has the same form, but mixing weights q(Z = 0.3) = 1/2, q(Z = 0.7) = 1/2, its mixture marginal will match the data distribution; yet p(λ) ̸= q(λ), so the model is clearly unidentifiable. Nevertheless, the sample itself, y, is a (minimal) sufficient statistic for both the model and the data distribution, so the information-retention criterion will be satisfied. 4 H[Z] H[Y] H[ψ(Z)] H[Tz(Y)] A H[Z] H[ψ(Z)] H[Y] H[Tz(Y)] H[X] H[φ(X)] B Figure 2: Venn diagrams for information. (A) ψ(Z) being a deterministic function of Z, its entropy (dark green) is a subset of the latter’s (green). The same is true for the entropies of Tz(Y) (dark orange) and Y (orange), but additionally their intersections with H[Z] are identical because Tz is a sufficient statistic for Z. The mutual information values I(ψ(Z); Y) and I(ψ(Z); Tz(Y)) (i.e., the intersections of the entropies) are clearly identical (outlined patch). This corresponds to the derivation of Eq. 6. (B) When ψ(Z) is a sufficient statistic for Y, as guaranteed by Eq. 3, the intersection of its entropy with H[Y] is the same as the intersection of H[Z] with H[Y]; likewise for H[φ(X)] and H[X] with H[Y]. Since all information about X reaches Z via Y, the entropies of X and Z overlap only on H[Y]. Finally, if p(φ(x)) = q(ψ(z)), and Pr[Y|φ(X)] = Pr[Y|ψ(Z)] (Eq. 3), then the entropies of φ(X) and ψ(Z) have the same-sized overlaps (but not the same overlaps) with H[Y] and H[Tz(Y)]. This guarantees that I(X; Tz(Y)) = I(X; Y) (see Eq. 7). In what follows we shall assume that the mixtures are finite. This is the case when the model is an exponential-family harmonium (EFH)1, as in [2]: there are at most K := 2|hiddens| mixture components. It is not true for real-valued stimuli X. For simplicity, we shall nevertheless assume that there are at most 2|hiddens| configurations of X since: (1) the stimulus must be discretized immediately upon transduction by the nervous system, the brain (presumably) having only finite representational capacity; and (2) if there were an infinite number of configurations, Eq. 2 could not be satisfied exactly anyway. Eq. 4 can therefore be expressed as: I X i f(y; λ)p(λ) = J X j f(y; λ)q(λ), (5) where I ≤K, J ≤K. 3.2 Formal description of the model, assumptions, and result • The general probabilistic model. This is given by the graphical models in Fig. 1. “The world” generates data according to Fig. 1A (“data distribution”), and “the brain” uses Fig. 1B. None of the distributions labeled in the diagram need be equal to each other, and in fact X and Z may have different support. • The assumptions. 1. The noise models “match”: Eq. 3. 2. The number of hidden-variable states is finite, but otherwise arbitrarily large. 3. Density estimation has been successful; i.e., the data and model marginals over Y match: Eq. 2 4. The noise model/conditional distribution f(y; λ) is identifiable: if p(y) = q(y), then p(λ) = q(λ). This condition holds for a very broad class of distributions. • The main result. Information about the stimulus is retained in inferring the latent variables of the model, i.e. in the “feedforward” (Y →Z) pass of the model. More precisely, 1An EFH is a two layer Markov random field, with full interlayer connectivity and no intralayer connectivity, and in which the conditional distributions of the visible layer given the hiddens and vice versa belong to exponential families of probability distributions [5]. The restricted Boltzmann machine is therefore the special case of Bernoulli hiddens and Bernoulli visibles. 5 information loss is due only to noise in the hidden layer (which is unavoidable), not to a failure of the inference procedure: Eq. 1. More succinctly: for identifiable mixture models, Eq. 5 and Eq. 3 together imply Eq. 1. 3.3 Proof First, for any set of sufficient statistics Tz(Y) for Z: I(Y; ψ(Z)|Tz(Y)) ≤I(Y; Z|Tz(Y)) data-processing inequality [13] = 0 Tz(Y) are sufficient for Z =⇒0 = I(Y; ψ(Z)|Tz(Y)) Gibbs’s inequality = H[ψ(Z)|Tz(Y)] −H[ψ(Z)|Y, Tz(Y)] def’n cond. mutual info. = H[ψ(Z)|Tz(Y)] −H[ψ(Z)|Y] Tz(Y) deterministic −H[ψ(Z)] + H[ψ(Z)] = 0 =⇒I(ψ(Z); Tz(Y)) = I(ψ(Z); Y). def’n mutual info. (6) So Tz are sufficient statistics for ψ(Z). Now if finite mixtures of f(y; λ) are identifiable, then Eq. 5 implies that p(λ) = q(λ). Therefore: I(X; Tz(Y)) ≤I(X; Y) data-processing inequality ≤I(φ(X); Y) X →φ(X) →Y, D.P.I. = I(ψ(Z); Y) p(λ) = q(λ), Eq. 3 = I(ψ(Z); Tz(Y)) Eq. 6 = I(φ(X); Tz(Y)) p(λ) = q(λ), Eq. 3 ≤I(X; Tz(Y)) data-processing inequality =⇒I(X; Tz(Y)) = I(X; Y), (7) which is what we set out to prove. (This last progression is illustrated in Fig. 2B.) 4 Relationship to empirical findings The use of density-estimation algorithms for multisensory integration appears in [2, 15, 16], and in [2], the connection between generic latent-variable density estimation and multisensory integration was made, although the result was shown only empirically. We therefore relate those results to the foregoing proof. 4.1 A density estimator for multisensory integration In [2], an exponential-family harmonium (model distribution, q, Fig. 3B) with Poisson visible units (Y) and Bernoulli hiddens units (Z) was trained on simulated populations of neurons encoding arm configuration in two-dimensional space (Fig. 3). An EFH is parameterized by the matrix of connection strengths between units (weights, W) and the unit biases, bi. The nonlinearities for Bernoulli and Poisson units are logistic and exponential, respectively, corresponding to their inverse “canonical links” [17]. The data for these populations were created by (data distribution, p, Fig. 3A): 1. drawing a pair of joint angles (θ1 = shoulder, θ2 = elbow) from a uniform distribution between the joint limits; drawing two population gains (gp, gv, the “reliabilities” of the two populations) from uniform distributions over spike counts—hence x = [θ1, θ1, gp, gv]; 2. encoding the joint angles in a set of 2D, Gaussian tuning curves (with maximum height gp) that smoothly tile joint space (“proprioceptive neurons,” λp), and encoding the correspond6 Θ Gv Gp Y v 0 Y v 1 Y v 2 Y v 3 Y p 0 Y p 1 Y p 2 Y p 3 X A Z0 Z1 Z2 Z3 Y v 0 Y v 1 Y v 2 Y v 3 Y p 0 Y p 1 Y p 2 Y p 3 B Figure 3: Two probabilistic graphical models for the same data—a specific instance of Fig. 1. Colors are as in Fig. 2. (A) Hand position (Θ) elicits a response from populations of visual (Yv) and proprioceptive (Yp) neurons. The reliability of each population’s encoding of hand position varies with their respective gains, Gv, Gp. (B) The exponential family harmonium (EFH; see text). After training, an up-pass through the model yields a vector of multisensory (mean) activities (z, hidden units) that contains all the information about θ, gv, and gp that was in the unisensory populations, Yv and Yp. ing end-effector position in a set of 2D, Gaussian tuning curves (with maximum height gv) that smoothly tile the reachable workspace (“visual neurons,” λv); 3. drawing spike counts, [yp, yv], from independent Poisson distributions whose means were given by [λp, λv]. Thus the distribution of the unisensory spike counts, Y = [Yp, Yv], conditioned on hand position, p(y|x) = Q i p(yi|x), was a “probabilistic population code,” a biologically plausible proposal for how the cortex encodes probability distributions over stimuli [1]. The model was trained using onestep contrastive divergence, a learning procedure that changes weights and biases by descending the approximate gradient of a function that has q(y) = p(y) as its minimum [18,19]. It was then shown empirically that the criterion for “optimal multisensory integration” proposed in [1], Pr[X|¯Z] = Pr[X|yp, yv], (8) held approximately for an average, ¯Z, of vectors sampled from q(z|y), and that the match improves as the number of samples grows—i.e., as the sample average ¯Z approaches the expected value Eq(z|y)[Z|y]. Since the weight matrix W was “fat,” the randomly initialized network was highly unlikely to satisfy Eq. 8 by chance. 4.2 Formulating the empirical result in terms of the proof of Section 3 To show that Eq. 8 must hold, we first demonstrate its equivalence to Eq. 1. It then suffices, under our proof, to show that the model obeys Eqs. 3 and 5 and that the “mixture model” defined by the true generative process is identifiable. For sufficiently many samples, ¯Z ≈Eq(z|y)[Z|Y], which is a sufficient statistic for a vector of Bernoulli random variables: Eq(z|y)[Z|Y] = Tz(Y). This also corresponds to a noiseless “uppass” through the model, Tz(Y) = σ{WY + bz}2. And the information about the stimulus reaches the multisensory population, Z, only via the two unisensory populations, Y. Together these imply that Eq. 8 is equivalent to Eq. 1 (see Appendix for proof). For both the “world” and the model, the function f(y; λ) is a product of independent Poissons, whose means Λ are given respectively by the embedding of hand position into the tuning curves of the two populations, φ(X), and by the noiseless “down-pass” through the model, exp{W TZ + by} =: ψ(Z). So Eq. 3 is satisfied. Eq. 5 holds because the EFH was trained as a density estimator, and because the mixture may be treated as finite. (Although hand positions were drawn from a continuous uniform distribution, the number of mixing components in the data distribution is limited to the number of training samples. For the model in [2], this was less than a million. For comparison, the harmonium had 2900 mixture weights at its disposal.) Finally, the noise model is factorial: 2That the vector of means alone and not higher-order cumulants suffices reflects the fact that the sufficient statistics can be written as linear functions of Y—in this case, WY, with W the weight matrix—which is arguably a generically desirable property for neurons [20]. 7 f(y; λ) = Q i f(yi; λi). The class of mixtures of factorial distributions, f(y; λ), is identifiable just in case the class of mixtures of f(yi; λi) is identifiable [14]; and mixtures of (univariate) Poisson conditionals are themselves identifiable [12]. Thus the mixture used in [2] is indeed identifiable. 5 Conclusions We have traced an analytical connection from psychophysical results in monkey and man to a broad class of machine-learning algorithms, namely, density estimation in latent-variable models. In particular, behavioral studies of multisensory integration have shown that primates estimate stimulus properties with the peak of the posterior distribution over the stimulus, conditioned on the two unisensory cues [3, 4]. This can be seen as a special case of a more general “optimal” computation, viz., computing and representing the entire posterior distribution [1, 6]; or, put differently, finding transformations of multiple unisensory representations into a multisensory representation that retains all the original information about the underlying stimulus. It has been shown that this computation can be learned with algorithms that implement forms of latent-variable density estimation [15, 16]; and, indeed, argued that generic latent-variable density estimators will satisfy the information-retention criterion [2]. We have provided an analytical proof that this is the case, at least for certain classes of models (including the ones in [2]). What about distributions f(y; λ) other than products of Poissons? Identifiability results, which we have relied on here, appear to be the norm for finite mixtures; [12] summarizes the “overall picture” thus: “[A]part from special cases with finite samples spaces [like binomials] or very special simple density functions [like the continuous uniform distribution], identifiability of classes of finite mixtures is generally assured.” Thus the results apply to a broad set of density-estimation models and their equivalent neural networks. Interestingly, this excludes Bernoulli random variables, and therefore the mixture model defined by restricted Boltzmann machines (RBMs). Such mixtures are not strictly identifiable [12], meaning there is more than one set of mixture weights that will produce the observed marginal distribution. Hence the guarantee proved in Section 3 does not hold. On the other hand, the proof provides only sufficient, not necessary conditions, so some guarantee of information retention is not ruled out. And indeed, a relaxation of the identifiability criterion to exclude sets of measure zero has recently been shown to apply to certain classes of mixtures of Bernoullis [21]. The information-retention criterion applies more broadly than multisensory integration; it is generally desirable. It is not, presumably, sufficient: the task of the cortex is not merely to pass information on unmolested from one point to another. On the other hand, the task of integrating data from multiple sources without losing information about the underlying cause of those data has broad application: it applies, for example, to the data provided by spatially distant photoreceptors that are reporting the edge of a single underlying object. Whether the criterion can be satisfied in this and other cases depends both on the brain’s generative model and on the true generative process by which the stimulus is encoded in neurons. The proof was derived for sufficient statistics rather than the neural responses themselves, but this limitation can be overcome at the cost of time (by collecting or averaging repeated samples of neural responses) or of space (by having a hidden vector long enough to contain most of the information even in the presence of noise). Finally, the result was derived for “completed” density estimation, q(y) = p(y). This is a strong limitation; one would prefer to know how approximate completion of learning, q(y) ≈p(y), affects the guarantee, i.e., how robust it is. In [2], for example, Eq. 2 was never directly verified, and in fact one-step contrastive divergence (the training rule used) has suboptimal properties for building a good generative model [22] And although the sufficient conditions supplied by the proof apply to a broad class of models, it would also be useful to know necessary conditions. Acknowledgments JGM thanks Matthew Fellows, Maria Dadarlat, Clay Campaigne, and Ben Dichter for useful conversations. 8 References [1] Wei Ji Ma, Jeffrey M. Beck, Peter E. Latham, and Alexandre Pouget. Bayesian inference with probabilistic population codes. Nature Neuroscience, 9:1423–1438, 2006. [2] Joseph G. Makin, Matthew R. Fellows, and Philip N. Sabes. Learning Multisensory Integration and Coordinate Transformation via Density Estimation. PLoS Computational Biology, 9(4):1–17, 2013. [3] Marc O. Ernst and Martin S. Banks. Humans integrate visual and haptic information in a statistically optimal fashion. Nature, 415(January):429–433, 2002. [4] David Alais and David Burr. The ventriloquist effect results from near-optimal bimodal integration. Current Biology, 14(3):257–62, February 2004. [5] Max Welling, Michal Rosen-Zvi, and Geoffrey E. Hinton. Exponential Family Harmoniums with an Application to Information Retrieval. In Advances in Neural Information Processing Systems 17: Proceedings of the 2004 Conference, pages 1481–1488., 2005. [6] David C. Knill and Alexandre Pouget. The Bayesian brain: the role of uncertainty in neural coding and computation. Trends in Neurosciences, 27(12), 2004. [7] J.A. Saunders and David C. Knill. Perception of 3D surface orientation from skew symmetry. Vision research, 41(24):3163–83, November 2001. [8] Robert J. van Beers, AC Sittig, and Jan J. Denier van Der Gon. Integration of proprioceptive and visual position-information: An experimentally supported model. Journal of Neurophysiology, 81:1355–1364, 1999. [9] Philip N. Sabes. Sensory integration for reaching: Models of optimality in the context of behavior and the underlying neural circuits. Progress in brain research, 191:195–209, January 2011. [10] Bruno A. Olshausen. Sparse codes and spikes. In R.P.N. Rao, Bruno A. Olshausen, and Michael S. Lewicki, editors, Probabilistic Models of the Brain: Perception and Neural Function, chapter 13. MIT Press, 2002. [11] Anthony J. Bell. Towards a Cross-Level Theory of Neural Learning. AIP Conference Proceedings, 954:56–73, 2007. [12] D.M. Titterington, A.F.M. Smith, and U.E. Makov. Statistical Analysis of Finite Mixture Distributions. Wiley, 1985. [13] Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. Wiley, 2006. [14] Henry Teicher. Identifiability of Mixtures of Product Measures. The Annals of Mathematical Statistics, 38(4):1300–1302, 1967. [15] Ilker Yildirim and Robert A. Jacobs. A rational analysis of the acquisition of multisensory representations. Cognitive Science, 36(2):305–32, March 2012. [16] Jeffrey M. Beck, Katherine Heller, and Alexandre Pouget. Complex Inference in Neural Circuits with Probabilistic Population Codes and Topic Models. Advances in Neural Information Processing Systems 25: Proceedings of the 2012 Conference, pages 1–9, 2013. [17] Peter McCullagh and John A. Nelder. Generalized Linear Models. Chapman and Hall/CRC, second edition, 1989. [18] Geoffrey E. Hinton, Simon Osindero, and Yee Whye Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18:1527–1554, 2006. [19] Geoffrey E. Hinton. Training Products of Experts by Minimizing Contrastive Divergence. Neural Computation, 14:1771–1800, 2002. [20] Jeffrey M. Beck, Vikranth R. Bejjanki, and Alexandre Pouget. Insights from a Simple Expression for Linear Fisher Information in a Recurrently Connected Population of Spiking Neurons. Neural Computation, 23(6):1484–1502, June 2011. [21] Elizabeth S. Allman, Catherine Matias, and John a. Rhodes. Identifiability of parameters in latent structure models with many observed variables. The Annals of Statistics, 37(6A):3099–3132, December 2009. [22] Geoffrey E. Hinton. A Practical Guide to Training Restricted Boltzmann Machines. Technical report, University of Toronto, Toronto, 2010. 9
2014
263
5,362
Causal Strategic Inference in Networked Microfinance Economies Mohammad T. Irfan Department of Computer Science Bowdoin College Brunswick, ME 04011 mirfan@bowdoin.edu Luis E. Ortiz Department of Computer Science Stony Brook University Stony Brook, NY 11794 leortiz@cs.stonybrook.edu Abstract Performing interventions is a major challenge in economic policy-making. We propose causal strategic inference as a framework for conducting interventions and apply it to large, networked microfinance economies. The basic solution platform consists of modeling a microfinance market as a networked economy, learning the parameters of the model from the real-world microfinance data, and designing algorithms for various causal questions. For a special case of our model, we show that an equilibrium point always exists and that the equilibrium interest rates are unique. For the general case, we give a constructive proof of the existence of an equilibrium point. Our empirical study is based on the microfinance data from Bangladesh and Bolivia, which we use to first learn our models. We show that causal strategic inference can assist policy-makers by evaluating the outcomes of various types of interventions, such as removing a loss-making bank from the market, imposing an interest rate cap, and subsidizing banks. 1 Introduction Although the history of microfinance systems takes us back to as early as the 18th century, the foundation of the modern microfinance movement was laid in the 1970s by Muhammad Yunus, a then-young Economics professor in Bangladesh. It was a time when the newborn nation was struggling to recover from a devastating war and an ensuing famine. A blessing in disguise may it be called, it led Yunus to design a small-scale experimentation on micro-lending as a tool for poverty alleviation. The feedback from that experimentation gave Yunus and his students the insight that micro-lending mechanism, with its social and humanitarian goals, could successfully intervene in the informal credit market that was predominated by opportunistic moneylenders. Although far from experiencing a smooth ride, the microfinance movement has nevertheless been a great success story ever since, especially considering the fact that it began with just a small, out-of-pocket investment on 42 clients and boasts a staggering 100 million poor clients worldwide at present [27]. Yunus and his organization Grameen Bank have recently been honored with the Nobel peace prize “for their efforts to create economic and social development from below.” A puzzling element in the success of microfinance programs is that while commercial banks dealing with well-off customers struggle to recover loans, microfinance institutions (MFI) operate without taking any collateral and yet experience very low default rates! The central mechanism that MFIs use to mitigate risks is known as the group lending with joint-liability contract. Roughly speaking, loans are given to groups of clients, and if a person fails to repay her loan, then either her partners repay it on her behalf or the whole group gets excluded from the program. Besides risk-mitigation, this mechanism also helps lower MFI’s cost of monitoring clients’ projects. Group lending with a jointliability contract also improves repayment rates and mitigates moral hazard [13]. Group lending and many other interesting aspects of microfinance systems, such as efficiency and distribution of 1 intervening informal credit markets, failure of pro-poor commercial banks, gender issues, subsidies, etc., have been beautifully delineated by de Aghion and Morduch in their book [9]. Here, we assume that assortative matching and joint-liability contracts would mitigate the risks of adverse selection [13] and moral hazard. We further assume that due to these mechanisms, there would be no default on loans. This assumption of complete repayment of loans may seem to be very much idealistic. However, practical evidence suggests very high repayment rates. For example, Grameen Bank’s loan recovery rate is 99.46% [21]. Next, we present causal strategic inference, followed by our model of microfinance markets and our algorithms for computing equilibria and learning model parameters. We present an empirical study at the end. We leave much of the details to the Appendix, located in the supplementary material. 2 Causality in Strategic Settings Going back two decades, one of the most celebrated success stories in the study of causality, which studies cause and effect questions using mathematical models of real-world phenomena, was the development of causal probabilistic inference. It was led by Judea Pearl, who was later awarded the ACM Turing prize in 2011 for his seminal contribution. In his highly acclaimed book on causality, Pearl organizes causal queries in probabilistic settings in three different levels of difficulty— prediction, interventions, and counterfactuals (in the order of increasing difficulty) [22, p. 38]. For example, an intervention query is about the effects of changing an existing system by what Judea Pearl calls “surgery.” We focus on this type of query here. Causal Strategic Inference. We study causal inferences in game-theoretic settings for interventiontype queries. Since game theory reliably encodes strategic interactions among a set of players, we call this type of inference causal strategic inference. Note that interventions in game-theoretic settings are not new (see Appendix B for a survey). Therefore, we use causal strategic inference simply as a convenient name here. Our main contribution is a framework for performing causal strategic inference in networked microfinance economy. As mentioned above, interventions are carried out by surgeries. So, what could be a surgery in a game-theoretic setting? Analogous to the probabilistic settings [22, p. 23], the types of surgeries we consider here change the “structure” of the game. This can potentially mean changing the payoff function of a player, removing a player from the game, adding a new player to the game, changing the set of actions of a player, as well as any combination of these. We discuss other possibilities in Appendix A. See also [14]. The proposed framework of causal strategic inference is composed of the following components: mathematically modeling a complex system, learning the parameters of the model from real-world data, and designing algorithms to predict the effects of interventions. Review of Literature. There is a growing literature in econometrics on modeling strategic scenarios and estimating the parameters of the model. Examples are Bjorn and Vuong’s model of labor force participation [5], Bresnahan and Reiss’ entry models [6, 7], Berry’s model of airline markets [4], Seim’s model of product differentiation [24], Augereau et al.’s model of technology adoption [2]. A survey of the recent results is given by Bajari et al. [3]. All of the above models are based on McFadden’s random utility model [18], which often leads to an analytical solution. In contrast, our model is based on classical models of two-sided economies, for which there is no known analytical solution. Therefore, our solution approach is algorithmic, not analytic. More importantly, although all of the above studies model a strategic scenario and estimate the parameters of the respective model, none of them perform any intervention, which is one of our main goals. We present more details on each of these as well as several additional studies in Appendix B. Our model is closely related to the classical Fisher model [12]. An important distinction between our model and Fisher’s, including its graphical extension [16], is that our model allows buyers (i.e., villages) to invest the goods (i.e., loans) in productive projects, thereby generating revenue that can be used to pay for the goods (i.e., repay the loans). In other words, the crucial modeling parameter of “endowment” is no longer a constant in our case. For the same reason, the classical Arrow-Debreu model [1] or the recently developed graphical extension to the Arrow-Debreu model [15], does not capture our setting. Moreover, in our model, the buyers have a very different objective function. 2 3 Our Model of Microfinance Markets We model a microfinance market as a two-sided market consisting of MFIs and villages. Each MFI has branches in a subset of the villages, and each branch of an MFI deals with the borrowers in that village only. Similarly, each village can only interact with the MFIs present there. We use the following notation. There are n MFIs and m villages. Vi is the set of villages where MFI i operates and Bj is the set of MFIs that operate in village j. Ti is the finite total amount of loan available to MFI i to be disbursed. gj(l) := dj + ejl is the revenue generation function of village j (parameterized by the loan amount l), where the initial endowment dj > 0 (i.e., each village has other sources of income [9, Ch. 1.3]) and the rate of revenue generation ej ≥1 are constants. ri is the flat interest rate of MFI i and xj,i is the amount of loan borrowed by village j from MFI i. Finally, the villages have a diversification parameter λ ≥0 that quantifies how much they want their loan portfolios to be diversified. 1 The problem statement is given below. Following are the inputs to the problem. First, for each MFI i, 1 ≤i ≤n, we are given the total amount of money Ti that the MFI has and the set Vi of villages that the MFI has branches. Second, for each village j, 1 ≤j ≤m, we are given the parameters dj > 0 and ej > 1 of the village’s revenue generation function 2 and the set Bj of the MFIs that operate in that village. MFI-side optimization problem. Each MFI i wants to set its interest rate ri such that all of its loan is disbursed. This is known as market-clearance in economics. Here, the objective function is a constant due to the MFIs’ goal of market-clearance. max ri 1 subject to ri  Ti − X j∈Vi xj,i  = 0 X j∈Vi xj,i ≤Ti (PM) ri ≥0 Village-side optimization problem. Each village j wants to maximize its diversified loan portfolio, subject to its repaying it. We call the second term of the objective function of (PV ) the diversification term, where λ is chosen using the data. 3 We call the first constraint of (PV ) the budget constraint. max xj=(xj,i)i∈Bj X i∈Bj xj,i + λ X i∈Bj xj,i log 1 xj,i subject to X i∈Bj xj,i(1 + ri −ej) ≤dj (PV ) xj ≥0 For this two-sided market, we use an equilibrium point as the solution concept. It is defined by an interest rate r∗ i for each MFI i and a vector x∗ j = (x∗ j,i)i∈Bj of loan allocations for each village j such that the following two conditions hold. First, given the allocations x∗, each MFI i is optimizing the program (PM). Second, given the interest rates r∗, each village j is optimizing the program (PV ). Justification of Modeling Aspects. Our model is inspired by the book of de Aghion and Morduch [9] and several other studies [20, 26, 23]. We list some of our modeling aspects below. 1For simplicity, we assume that all the villages have the same diversification parameters. 2When we apply our model to real-world settings, we will see that in contrast to the other inputs, dj and ej are not explicitly mentioned in the data and therefore, need to be learned from the data. The machine learning scheme for that will be presented in Section 4.2. 3Note that although this term bears a similarity with the well-known entropic term, they are different, because xj,i’s here can be larger than 1. 3 Objective of MFIs. It may seem unusual that although MFIs are banks, we do not model them as profit-maximizing agents. The perception that MFIs make profits while serving the poor has been described as a “myth” [9, Ch. 1]. In fact, the book devotes a whole chapter to bust this myth [9, Ch. 9]. Therefore, empirical evidence supports modeling MFIs as not-for-profit organizations. Objective of Villages. Typical customers of MFIs are low-income people engaged in small projects and most of them are women working at home (e.g., Grameen Bank has a 95% female customer base) [9]. Clearly, there is a distinction between customers borrowing from an MFI and those borrowing from commercial banks. Therefore, we model the village side as non-corporate agents. Diversification of Loan Portfolios. Empirical studies suggest that the village side does not maximize its loan by borrowing only from the lowest interest rate MFI [26, 23]. There are other factors, such as large loan sizes, shorter waiting periods, and flexible repayment schemes [26]. We added the diversification term in the village objective function to reflect this. Furthermore, this formulation is in line with the quantal response approach [19] and human subjects are known to respond to it[17]. Complete repayment of loans. A hallmark of microfinance systems worldwide is very high repayment rates. For example, the loan recovery rate of Grameen Bank is 99.46% and PKSF 99.51% [21]. Due to such empirical evidence, we assume that the village-side completely repays its loan. 3.1 Special Case: No Diversification of Loan Portfolios It will be useful to first study the case of non-diversified loan portfolios, i.e., λ = 0. In this case, the villages simply wish to maximize the amount of loan that they can borrow. Several properties of an equilibrium point can be derived for this special case. We give the complete proofs in Appendix C. Property 3.1. At any equilibrium point (x∗, r∗), every MFI i’s supply must match the demand for its loan, i.e., P j∈Vi x∗ j,i = Ti. Furthermore, every village j borrows only from those MFIs i ∈Bj that offer the lowest interest rate. That is, P i∈Bj,r∗ i =r∗ mj x∗ j,i(1 + r∗ i −ej) = dj for any MFI mj ∈argmini∈Bj r∗ i , and x∗ j,k = 0 for any MFI k such that r∗ k > r∗ mj. Proof Sketch. Show by contradiction that at an equilibrium point, the constraints of the village-side or the MFI-side optimization are violated otherwise. We next present a lower bound on interest rates at an equilibrium point. Property 3.2. At any equilibrium point (x∗, r∗), for every MFI i, r∗ i > maxj∈Vi ej −1. Proof Sketch. Otherwise, the village-side demand would be unbounded, which would violate the MFI-side constraint P j∈Vi x∗ j,i ≤Ti. Following are two related results that preclude certain trivial allocations such as all the allocations being zero at an equilibrium point. Property 3.3. At any equilibrium point (x∗, r∗), for any village j, there exists an MFI i ∈Bj such that x∗ j,i > 0. Proof Sketch. In this case, j satisfies its constraints but does not maximize its objective function. Property 3.4. At any equilibrium point (x∗, r∗), for any MFI i, there exists a village j ∈Vi such that x∗ j,i > 0. Proof Sketch. The first constraint of (PM) for MFI i is violated. 3.2 Eisenberg-Gale Formulation We now present an Eisenberg-Gale convex program formulation of a restricted case of our model where the diversification parameter λ = 0 and all the villages j, 1 ≤j ≤m, have the same revenue generation function gj(l) := d + el, where d > 0 and e ≥1 are constants. We first prove that this case is equivalent to the following Eisenberg-Gale convex program [11, 25], which gives us the existence of an equilibrium point and the uniqueness of the equilibrium interest rates as a corollary. Below is the Eisenberg-Gale convex program [11, p. 166]. 4 min z m X j=1 −log X i∈Bj zj,i subject to X j∈Vi zj,i −Ti ≤0, 1 ≤i ≤n (PE) zj,i ≥0, 1 ≤i ≤n, j ∈Vi We have the following theorem and corollary. Theorem 3.5. The special case of microfinance markets with identical villages and no loan portfolio diversification, has an equivalent Eisenberg-Gale formulation. Proof Sketch. The complete proof is very long and given in Appendix C. We first make a connection between an equilibrium point (x∗, r∗) of a microfinance market and the variables of program (PE). In particular, we define x∗ j,i ≡z∗ j,i and express r∗ i in terms of certain dual variables of (PE). Using the properties given in Section 3.1, we show that the equilibrium conditions of (PM) and (PV ) in this special case are equivalent to the Karush-Kuhn-Tucker (KKT) conditions of (PE). Corollary 3.6. For the above special case, there exists an equilibrium point with unique interest rates [11] and a combinatorial polynomial-time algorithm to compute it [25]. An implication of Theorem 3.5 is that in a more restricted case of our model (with the additional constraint of Ti being same for all MFI i), our model is indeed a graphical linear Fisher model where all the “utility coefficients” are set to 1 (see the convex program 5.1 [25] to verify this). 3.3 Equilibrium Properties of General Case In the general case, the objective function of (PV ) can be written as P i∈Bj xj,i − λ P i∈Bj xj,i log xj,i. While the first term wants to maximize the total amount of loan, the second (diversification term) wants, in colloquial terms, “not to put all the eggs in one basket.” If λ is sufficiently small, then the first term dominates the second, which is a desirable assumption. Assumption 3.1. 0 ≤λ ≤ 1 2 + log Tmax where Tmax ≡maxi Ti and w.l.o.g., Ti > 1 for all i. The following equilibrium properties will be used in the next section. Property 3.7. The first constraint of (PV ) must be tight at any equilibrium point. Proof Sketch. Otherwise, the village can increase its objective function slightly. We define ei max ≡maxj∈Vi ej and di max ≡maxj∈Vi dj and obtain the following bounds. Property 3.8. At any equilibrium point, for each MFI i, ei max −1 < r∗ i ≤|Vi|di max Ti + ei max −1. Proof Sketch. The proof of ei max −1 < r∗ i is similar to the proof of Property 3.2. The upper bound is derived from the maximum loan a village j can seek from the MFI i at an equilibrium point. 4 Computational Scheme For the clarity of presentation we first design an algorithm for equilibrium computation and then talk about learning the parameters of our model. 4.1 Computing an Equilibrium Point We give a constructive proof of the existence of an equilibrium point in the microfinance market defined by (PM) and (PV ). The inputs are λ > 0, ej and dj for each village j, and Ti for each MFI i. We first give a brief outline of our scheme in Algorithm 1. 5 Algorithm 1 Outline of Equilibrium Computation 1: For each MFI i, initialize ri to ei max −1. 2: For each village j, compute its best response xj. 3: repeat 4: for all MFI i do 5: while Ti ̸= P j∈Vi xj,i do 6: Change ri as described after Lemma 4.3. 7: For each village j ∈Vi, update its best response xj reflecting the change in ri. 8: end while 9: end for 10: until no change to ri occurs for any i Before going on to the details of how to change ri in Line 6 of Algorithm 1, we characterize the best response of the villages used in Line 7. Lemma 4.1. (Village’s Best Response) Given the interest rates of all the MFIs, the following is the unique best response of any village j to any MFI i ∈Bj: x∗ j,i = exp 1 −λ −α∗ j(1 + ri −ej) λ  (1) where α∗ j ≥0 is the unique solution to X i∈Bj exp 1 −λ −α∗ j(1 + ri −ej) λ  (1 + ri −ej) = dj. (2) Proof Sketch. Derive the Lagrangian of (PV ) and argue about optimality. Therefore, as soon as ri of some MFI i changes in Line 6 of Algorithm 1, both x∗ j,i and the Lagrange multiplier α∗ j change in Line 7, for any village j ∈Vi. Next, we show the direction of these changes. Lemma 4.2. Whenever ri increases (decreases) in Line 6, xj,i must decrease (increase) for every village j ∈Vi in Line 7 of Algorithm 1. Proof Sketch. Rewrite the expression of x∗ j,i given in Lemma 4.1 in terms of α∗ j. Do the same for x∗ j,k for some k ∈Bj. Use the two expressions for α∗ j to argue about the increase of ri. The next lemma is a cornerstone of our theoretical results. Here, we use the term turn of an MFI to refer to the iterative execution of Line 6, wherein an MFI sets its interest rate to clear its market. Lemma 4.3. (Strategic Complementarity) Suppose that an MFI i has increased its interest rate at the end of its turn. Thereafter, it cannot be the best response of any other MFI k to lower its interest rate when its turn comes in the algorithm. Proof Sketch. The proof follows from Lemma 4.2 and Assumption 3.1. The main task is to show that when ri increases α∗ j for j ∈Vi cannot increase. In essence, Lemma 4.2 is a result of strategic substitutability [10] between the MFI and the village sides, while Lemma 4.3 is a result of strategic complementarity [8] among the MFIs. Our algorithm exploits these two properties as we fill in the details of Lines 6 and 7 next. Line 6: MFI’s Best Response. By Lemma 4.2, the total demand for MFI i’s loan monotonically decreases with the increase of ri. We use a binary search between the upper and the lower bounds of ri given in Property 3.8 to find the “right” value of ri. More details are given in Appendix D. Line 7: Village’s Best Response. We use Lemma 4.1 to compute each village j’s best response x∗ j,i to MFIs i ∈Bj. However, Equation (1) requires computation of α∗ j, the solution to Equation (2). We exploit the convexity of Equation (2) to design a simple search algorithm to find α∗ j. Theorem 4.4. There always exists an equilibrium point in a microfinance market specified by programs (PM) and (PV ). Proof Sketch. Use Lemmas 4.3 and 4.1 and the well-known monotone convergence theorem. 6 4.2 Learning the Parameters of the Model The inputs are the spatial structure of the market, the observed loan allocations ˜xj,i for all village j and all MFI i ∈Bj, the observed interest rates ˜ri and total supply Ti for all MFI i. The objective of the learning scheme is to instantiate parameters ej and dj for all j. We learn these parameters using the program below so that an equilibrium point closely approximates the observed data. min e,d,r X i X j∈Vi (x∗ j,i −˜xj,i)2 + C X i (r∗ i −˜ri)2 such that for all j, x∗ j ∈arg maxxj X i∈Bj xj,i + λ X i∈Bj xj,i log 1 xj,i s. t. X i∈Bj xj,i(1 + r∗ i −ej) ≤dj xj ≥0 (3) ej ≥1, dj ≥0 X j∈Vi x∗ j,i = Ti, for all i ri ≥ej −1, for all i and all j ∈Vi The above is a nested (bi-level) optimization program. The term C is a constant. In the interior optimization program, x∗are best responses of the villages, w.r.t. the parameters and the interest rates r∗. In practice, we exploit Lemma 4.1 to compute x∗more efficiently, since it suffices to search for Lagrange multipliers αj in a much smaller search space and then apply Equation (1). We use the interior-point algorithm of Matlab’s large-scale optimization package to solve the above program. In the next section, we show that the above learning procedure does not overfit the real-world data. We also highlight the issue of equilibrium selection for parameter estimation. 5 Empirical Study We now present our empirical study based on the microfinance data from Bolivia and Bangladesh. The details of this study can be found in Appendix E (included in the supplementary material). Case Study: Bolivia Data. We obtained microfinance data of Bolivia from several sources, such as ASOFIN, the apex body of MFIs in Bolivia, and the Central Bank of Bolivia. 4 We were only able to collect somewhat coarse, region-level data (June 2011). It consists of eight MFIs operating in 10 regions. Computational Results. We first choose a value of λ such that the objective function value of the learning optimization is low as well as “stable” and the interest rates are also relatively dissimilar. Using this value of λ, the learned ej’s and dj’s capture the variation among the villages w.r.t. the revenue generation function. The learned loan allocations closely approximate the observed allocations. The learned model matches each MFI’s total loan allocations due to the learning scheme. Issues of Bias and Variance. Our dataset consists of a single sample. As a result, the traditional approach of performing cross validation using hold-out sets or plotting learning curves by varying the number of samples do not work in our setting. Instead, we systematically introduce noise to the observed data sample. In the case of overfitting, increasing the level of noise would lead the equilibrium outcome to be significantly different from the observed data. To that end, we used two noise models–Gaussian and Dirichlet. In both cases, the training and test errors are very low and the learning curves do not suggest overfitting. 4http://www.asofinbolivia.com; http://www.bcb.gob.bo/ 7 Equilibrium Selection. In the case of multiple equilibria, our learning scheme biases its search for an equilibrium point that most closely explains the data. However, does the equilibrium point change drastically when noise is added to data? For this, we extended the above procedure using a bootstrapping scheme to measure the distance between different equilibrium points when noise is added. For both Gaussian and Dirichlet noise models, we found that the equilibrium point does not change much even with a high degree of noise. Details, including plots, are given in Appendix E. Case Study: Bangladesh Based on the microfinance data (consisting of seven MFIs and 464 villages/regions), dated December 2005, from Palli Karma Sahayak Foundation (PKSF), which is the apex body of NGO MFIs in Bangladesh, we have obtained very similar results to the Bolivia case (see Appendix E). 6 Policy Experiments For a specific intervention policy, e.g., removal of government-owned MFIs, we first learn the parameters of the model and then compute an equilibrium point, both in the original setting (before removal of any MFI). Using the parameters learned, we compute a new equilibrium point after the removal of the government-owned MFIs. Finally, we study changes in these two equilibria (before and after removal) in order to predict the effect of such an intervention. Role of subsidies. MFIs are very much dependent on subsidies [9, 20]. We ask a related question: how does giving subsidies to an MFI affect the market? For instance, one of the Bolivian MFIs named Eco Futuro exhibits very high interest rates both in observed data and at an equilibrium point. Eco Futuro is connected to all the villages, but has very little total loan to be disbursed compared to the leading MFI Bancosol. Using our model, if we inject further subsidies into Eco Futuro to make its total loan amount equal to Bancosol’s, not only do these two MFIs have the same (but lower than before) equilibrium interest rates, it also drives down the interest rates of the other MFIs. Changes in interest rates. Our model computes lower equilibrium interest rate (around 12%) for ASA than its observed interest rate (15%). It is interesting to note that in late 2005, ASA lowered its interest rate from 15% to 12.5%, which is close to what our model predicts at an equilibrium point. 5 Interest rates ceiling. PKSF recently capped the interest rates of its partner organization to 12.5% [23], and more recently, the country’s Microfinance Regulatory Authority has also imposed a ceiling on interest rate at around 13.5% flat. 6 Such evidence on interest rate ceiling is consistent with the outcome of our model, since in our model, 13.4975% is the highest equilibrium interest rate. Government-owned MFIs. Many of the government-owned MFIs are loss-making [26]. Our model shows that removing government-owned MFIs from the market would result in an increase of equilibrium interest rates by approximately 0.5% for every other MFI. It suggests that less competition leads to higher interest rates, which is consistent with empirical findings [23]. Adding new branches. Suppose that MFI Fassil in Bolivia expands its business to all villages. It may at first seem that due to the increase in competition, equilibrium interest rates would go down. However, since Fassil’s total amount of loan does not change, the new connections and the ensuing increase in demand actually increase equilibrium interest rates of all MFIs. Other types of intervention. Through our model, we can ask more interesting questions such as would an interest rate ceiling be still respected after the removal of certain MFIs from the market? Surprisingly, according to our discussion above, the answer is yes if we were to remove governmentowned MFIs. Similarly, we can ask what would happen if a major MFI gets entirely shut down? We can also evaluate effects of subsidies from the donor’s perspective (e.g., which MFIs should a donor select and how should the donor distribute its grants among these MFIs in order to achieve some goal). Causal questions like these form the long-term goal of this research. Acknowledgement We thank the reviewers. Luis E. Ortiz was supported in part by NSF CAREER Award IIS-1054541. 5 http://www.adb.org/documents/policies/ microfinance/microfinance0303.asp?p=microfnc. 6http://www.microfinancegateway.org/ p/site/m/template.rc/1.1.10946/ 8 References [1] K. J. Arrow and G. Debreu. Existence of an equilibrium for a competitive economy. Econometrica, 22(3):265–290, 1954. [2] A. Augereau, S. Greenstein, and M. Rysman. Coordination versus differentiation in a standards war: 56K modems. The Rand Journal of Economics, 37(4):887–909, 2006. [3] P. Bajari, H. Hong, and D. Nekipelov. Game theory and econometrics: A survey of some recent research. Working paper, University of Minnesota, Department of Economics, 2010. [4] S. T. Berry. Estimation of a model of entry in the airline industry. Econometrica: Journal of the Econometric Society, pages 889–917, 1992. [5] P. A. Bjorn and Q. H. Vuong. Simultaneous equations models for dummy endogenous variables: A game theoretic formulation with an application to labor force participation. Technical Report 527, California Institute of Technology, Division of the Humanities and Social Sciences, 1984. [6] T. F. Bresnahan and P. C. Reiss. Entry in monopoly market. The Review of Economic Studies, 57(4):531– 553, 1990. [7] T. F. Bresnahan and P. C. Reiss. Empirical models of discrete games. Journal of Econometrics, 48(1):57– 81, 1991. [8] J. I. Bulow, J. D. Geanakoplos, and P. D. Klemperer. Multimarket oligopoly: Strategic substitutes and complements. The Journal of Political Economy, 93(3):488–511, 1985. [9] B. de Aghion and J. Morduch. The economics of microfinance. MIT Press, 2005. [10] P. Dubey, O. Haimanko, and A. Zapechelnyuk. Strategic complements and substitutes, and potential games. Games and Economic Behavior, 54(1):77 – 94, 2006. [11] E. Eisenberg and D. Gale. Consensus of subjective probabilities: The pari-mutuel method. Annals Math. Stat., 30:165–168, 1959. [12] I. Fisher. Mathematical Investigations in the Theory of Value and Prices. Yale University, 1892. books.google.com/books?id=djIoAAAAYAAJ. [13] M. Ghatak and T. Guinnane. The economics of lending with joint liability: Theory and practice. Journal of Development Economics, 60:195–228, 1999. [14] M. T. Irfan. Causal Strategic Inference in Social and Economic Networks. PhD thesis, Stony Brook University, August 2013. [15] S. M. Kakade, M. Kearns, and L. E. Ortiz. Graphical economics. In In Proceedings of the 17th Annual Conference on Learning Theory (COLT), pages 17–32. Springer, 2004. [16] S. M. Kakade, M. Kearns, L. E. Ortiz, R. Pemantle, and S. Suri. Economic properties of social networks. In Advances in Neural Information Processing Systems 17, pages 633–640. MIT Press, 2005. [17] R. D. Luce. Individual Choice Behavior: A Theoretical Analysis. Wiley New York, 1959. [18] D. McFadden. Conditional logit analysis of qualitative choice behavior. In P. Zarembka, editor, Frontiers of Econometrics, pages 105–142. Academic Press, New York, NY, 1974. [19] R. McKelvey and T. Palfrey. Quantal response equilibria for normal form games. Games and Economic Behavior, 10:6–38, 1995. [20] J. Morduch. The role of subsidies in microfinance: Evidence from the Grameen Bank. Journal of Development Economics, 60:229–248, 1999. [21] I. of Microfinance (InM). Bangladesh Microfinance Statistics. The University Press Limited (UPL), Dhaka 1000, Bangladesh, 2009. [22] J. Pearl. Causality: Models, Reasoning, and Inference. University Press, 2000. [23] D. Porteous. Competition and microcredit interest rates. Focus Note, 33, 2006. [24] K. Seim. An empirical model of firm entry with endogenous product-type choices. The RAND Journal of Economics, 37(3):619–640, 2006. [25] V. V. Vazirani. Combinatorial algorithms for market equilibria. In N. Nisan, T. Roughgarden, ´Eva Tardos, and V. V. Vazirani, editors, Algorithmic Game Theory, chapter 5, pages 103–134. Cambridge University Press, 2007. [26] D. Wright and D. Alamgir. Microcredit interest rates in Bangladesh ‘capping v competition’. Donors Local Consultative Group on Finance, March 2004. [27] D. K. X. Gine, P. Jakiela and J. Morduch. Microfinance games. Discussion paper 936, Yale University Economic Growth Center, 2006. 9
2014
264
5,363
Exact Post Model Selection Inference for Marginal Screening Jason D. Lee Computational and Mathematical Engineering Stanford University Stanford, CA 94305 jdl17@stanford.edu Jonathan E. Taylor Department of Statistics Stanford University Stanford, CA 94305 jonathan.taylor@stanford.edu Abstract We develop a framework for post model selection inference, via marginal screening, in linear regression. At the core of this framework is a result that characterizes the exact distribution of linear functions of the response y, conditional on the model being selected (“condition on selection" framework). This allows us to construct valid confidence intervals and hypothesis tests for regression coefficients that account for the selection procedure. In contrast to recent work in high-dimensional statistics, our results are exact (non-asymptotic) and require no eigenvalue-like assumptions on the design matrix X. Furthermore, the computational cost of marginal regression, constructing confidence intervals and hypothesis testing is negligible compared to the cost of linear regression, thus making our methods particularly suitable for extremely large datasets. Although we focus on marginal screening to illustrate the applicability of the condition on selection framework, this framework is much more broadly applicable. We show how to apply the proposed framework to several other selection procedures including orthogonal matching pursuit and marginal screening+Lasso. 1 Introduction Consider the model yi = µ(xi) + ϵi, ϵi ∼N(0, σ2I), (1) where µ(x) is an arbitrary function, and xi ∈Rp. Our goal is to perform inference on (XT X)−1XT µ, which is the best linear predictor of µ. In the classical setting of n > p , the least squares estimator ˆβ = (XT X)−1XT y is a commonly used estimator for (XT X)−1XT µ. Under the linear model assumption µ = Xβ0, the exact distribution of ˆβ is ˆβ ∼N(β0, σ2(XT X)−1). (2) Using the normal distribution, we can test the hypothesis H0 : β0 j = 0 and form confidence intervals for β0 j using the z-test. However in the high-dimensional p > n setting, the least squares estimator is an underdetermined problem, and the predominant approach is to perform variable selection or model selection [4]. There are many approaches to variable selection including AIC/BIC, greedy algorithms such as forward stepwise regression, orthogonal matching pursuit, and regularization methods such as the Lasso. The focus of this paper will be on the model selection procedure known as marginal screening, which selects the k most correlated features xj with the response y. Marginal screening is the simplest and most commonly used of the variable selection procedures [9, 21, 16]. Marginal screening requires only O(np) computation and is several orders of magnitude 1 faster than regularization methods such as the Lasso; it is extremely suitable for extremely large datasets where the Lasso may be computationally intractable to apply. Furthermore, the selection properties are comparable to the Lasso [8]. Since marginal screening utilizes the response variable y, the confidence intervals and statistical tests based on the distribution in (2) are not valid; confidence intervals with nominal 1 −α coverage may no longer cover at the advertised level: Pr β0 j ∈C1−α(x)  < 1 −α. Several authors have previously noted this problem including recent work in [13, 14, 15, 2]. A major line of work [13, 14, 15] has described the difficulty of inference post model selection: the distribution of post model selection estimates is complicated and cannot be approximated in a uniform sense by their asymptotic counterparts. In this paper, we describe how to form exact confidence intervals for linear regression coefficients post model selection. We assume the model (1), and operate under the fixed design matrix X setting. The linear regression coefficients constrained to a subset of variables S is linear in µ, eT j (XT S XS)−1XT S µ = ηT µ for some η. We derive the conditional distribution of ηT y for any vector η, so we are able to form confidence intervals for regression coefficients. In Section 2 we discuss related work on high-dimensional statistical inference, and Section 3 introduces the marginal screening algorithm and shows how z intervals may fail to have the correct coverage properties. Section 4 and 5 show how to represent the marginal screening selection event as constraints on y, and construct pivotal quantities for the truncated Gaussian. Section 6 uses these tools to develop valid confidence intervals, and Section 7 evaluates the methodology on two real datasets. Although the focus of this paper is on marginal screening, the “condition on selection" framework, first proposed for the Lasso in [12], is much more general; we use marginal screening as a simple and clean illustration of the applicability of this framework. In Section 8, we discuss several extensions including how to apply the framework to other variable/model selection procedures and to nonlinear regression problems. Section 8 covers 1) marginal screening+Lasso, a screen and clean procedure that first uses marginal screening and cleans with the Lasso, and orthogonal matching pursuit (OMP). 2 Related Work Most of the theoretical work on high-dimensional linear models focuses on consistency. Such results establish, under restrictive assumptions on X, the Lasso ˆβ is close to the unknown β0 [19] and selects the correct model [26, 23, 11]. We refer to the reader to [4] for a comprehensive discussion about the theoretical properties of the Lasso. There is also recent work on obtaining confidence intervals and significance testing for penalized Mestimators such as the Lasso. One class of methods uses sample splitting or subsampling to obtain confidence intervals and p-values [24, 18]. In the post model selection literature, the recent work of [2] proposed the POSI approach, a correction to the usual t-test confidence intervals by controlling the familywise error rate for all parameters in any possible submodel. The POSI methodology is extremely computationally intensive and currently only applicable for p ≤30. A separate line of work establishes the asymptotic normality of a corrected estimator obtained by “inverting” the KKT conditions [22, 25, 10]. The corrected estimator ˆb has the form ˆb = ˆβ + λˆΘˆz, where ˆz is a subgradient of the penalty at ˆβ and ˆΘ is an approximate inverse to the Gram matrix XT X. The two main drawbacks to this approach are 1) the confidence intervals are valid only when the M-estimator is consistent, and thus require restricted eigenvalue conditions on X, 2) obtaining ˆΘ is usually much more expensive than obtaining ˆβ, and 3) the method is specific to regularized estimators, and does not extend to marginal screening, forward stepwise, and other variable selection methods. Most closely related to our work is the “condition on selection" framework laid out in [12] for the Lasso. Our work extends this methodology to other variable selection methods such as marginal screening, marginal screening followed by the Lasso (marginal screening+Lasso) and orthogonal matching pursuit. The primary contribution of this work is the observation that many model selection 2 methods, including marginal screening and Lasso, lead to “selection events" that can be represented as a set of constraints on the response variable y. By conditioning on the selection event, we can characterize the exact distribution of ηT y. This paper focuses on marginal screening, since it is the simplest of variable selection methods, and thus the applicability of the “condition on selection event" framework is most transparent. However, this framework is not limited to marginal screening and can be applied to a wide a class of model selection procedures including greedy algorithms such as orthogonal matching pursuit. We discuss some of these possible extensions in Section 8, but leave a thorough investigation to future work. A remarkable aspect of our work is that we only assume X is in general position, and the test is exact, meaning the distributional results are true even under finite samples. By extension, we do not make any assumptions on n and p, which is unusual in high-dimensional statistics [4]. Furthermore, the computational requirements of our test are negligible compared to computing the linear regression coefficients. 3 Marginal Screening Let X ∈Rn×p be the design matrix, y ∈Rn the response variable, and assume the model yi = µ(xi) + ϵi, ϵi ∼N(0, σ2I). We will assume that X is in general position and has unit norm columns. The algorithm estimates ˆβ via Algorithm 1. The marginal screening algorithm chooses Algorithm 1 Marginal screening algorithm 1: Input: Design matrix X, response y, and model size k. 2: Compute |XT y|. 3: Let ˆS be the index of the k largest entries of |XT y|. 4: Compute ˆβ ˆS = (XT ˆS X ˆS)−1XT ˆS y the k variables with highest absolute dot product with y, and then fits a linear model over those k variables. We will assume k ≤min(n, p). For any fixed subset of variables S, the distribution of ˆβS = (XT S XS)−1XT S y is ˆβS ∼N (XT S XS)−1XT S µ, σ2(XT S XS)−1 (3) We will use the notation β⋆ j∈S := (β⋆ S)j, where j is indexing a variable in the set S. The z-test intervals for a regression coefficient are C(α, j, S) :=  ˆβj∈S −σz1−α/2(XT S XS)jj, ˆβj∈S + σz1−α/2(XT S XS)jj  (4) and each interval has 1 −α coverage, meaning Pr β⋆ j∈S ∈C(α, j, S)  = 1 −α. However if ˆS is chosen using a model selection procedure that depends on y, the distributional result (3) no longer holds and the z-test intervals will not cover at the 1−α level, and Pr  β⋆ j∈ˆS ∈C(α, j, ˆS)  < 1−α. 3.1 Failure of z-test confidence intervals We will illustrate empirically that the z-test intervals do not cover at 1 −α when ˆS is chosen by marginal screening in Algorithm 1. For this experiment we generated X from a standard normal with n = 20 and p = 200. The signal vector is 2 sparse with β0 1, β0 2 = SNR, y = Xβ0 + ϵ, and ϵ ∼N(0, 1). The confidence intervals were constructed for the k = 2 variables selected by the marginal screening algorithm. The z-test intervals were constructed via (4) with α = .1, and the adjusted intervals were constructed using Algorithm 2. The results are described in Figure 1. 4 Representing the selection event Since Equation (3) does not hold for a selected ˆS when the selection procedure depends on y, the z-test intervals are not valid. Our strategy will be to understand the conditional distribution of y 3 −1 0 1 0.4 0.5 0.6 0.7 0.8 0.9 1 log10 SNR Coverage Proportion Adjusted Z test Figure 1: Plots of the coverage proportion across a range of SNR (log-scale). We see that the coverage proportion of the z intervals can be far below the nominal level of 1 −α = .9, even at SNR =5. The adjusted intervals always have coverage proportion .9. Each point represents 500 independent trials. and contrasts (linear functions of y) ηT y, then construct inference conditional on the selection event ˆE. We will use ˆE(y) to represent a random variable, and E to represent an element of the range of ˆE(y). In the case of marginal screening, the selection event ˆE(y) corresponds to the set of selected variables ˆS and signs s: ˆE(y) = n y : sign(xT i y)xT i y > ±xT j y for all i ∈ˆS and j ∈ˆSco = n y : ˆsixT i y > ±xT j y and ˆsixT i y ≥0 for all i ∈ˆS and j ∈ˆSco = n y : A( ˆS, ˆs)y ≤b( ˆS, ˆs) o (5) for some matrix A( ˆS, ˆs) and vector b( ˆS, ˆs)1. We will use the selection event ˆE and the selected variables/signs pair ( ˆS, ˆs) interchangeably since they are in bijection. The space Rn is partitioned by the selection events, Rn = F (S,s){y : A(S, s)y ≤ b(S, s)}2. The vector y can be decomposed with respect to the partition as follows y = P S,s y 1 (A(S, s)y ≤b(S, s)). Theorem 4.1. The distribution of y conditional on the selection event is a constrained Gaussian, y|{ ˆE(y) = E} d= z {A(S, s)z ≤b}, z ∼N(µ, σ2I). Proof. The event E is in bijection with a pair (S, s), and y is unconditionally Gaussian. Thus the conditional y {A(S, s)y ≤b(S, s)} is a Gaussian constrained to the set {A(S, s)y ≤b(S, s)}. 5 Truncated Gaussian test This section summarizes the recent tools developed in [12] for testing contrasts3 ηT y of a constrained Gaussian y. The results are stated without proof and the proofs can be found in [12]. The primary result is a one-dimensional pivotal quantity for ηT µ. This pivot relies on characterizing the distribution of ηT y as a truncated normal. The key step to deriving this pivot is the following lemma: Lemma 5.1. The conditioning set can be rewritten in terms of ηT y as follows: {Ay ≤b} = {V−(y) ≤ηT y ≤V+(y), V0(y) ≥0} 1b can be taken to be 0 for marginal screening, but this extra generality is needed for other model selection methods. 2It is also possible to use a coarser partition, where each element of the partition only corresponds to a subset of variables S. See [12] for details. 3A contrast of y is a linear function of the form ηT y. 4 where α = AΣη ηT Ση (6) V−= V−(y) = max j: αj<0 bj −(Ay)j + αjηT y αj (7) V+ = V+(y) = min j: αj>0 bj −(Ay)j + αjηT y αj . (8) V0 = V0(y) = min j: αj=0 bj −(Ay)j (9) Moreover, (V+, V−, V0) are independent of ηT y. Theorem 5.2. Let Φ(x) denote the CDF of a N(0, 1) random variable, and let F [a,b] µ,σ2 denote the CDF of TN(µ, σ, a, b), i.e.: F [a,b] µ,σ2(x) = Φ((x −µ)/σ) −Φ((a −µ)/σ) Φ((b −µ)/σ) −Φ((a −µ)/σ) . (10) Then F [V−,V+] ηT µ, ηT Ση(ηT y) is a pivotal quantity, conditional on {Ay ≤b}: F [V−,V+] ηT µ, ηT Ση(ηT y) {Ay ≤b} ∼Unif(0, 1) (11) where V−and V+ are defined in (7) and (8). 0 0.2 0.4 0.6 0.8 1 0 50 100 150 200 250 300 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 empirical cdf Unif(0,1) cdf Figure 2: Histogram and qq plot of F [V−,V+] ηT µ, ηT Ση(ηT y) where y is a constrained Gaussian. The distribution is very close to Unif(0, 1), which is in agreement with Theorem 5.2. 6 Inference for marginal screening In this section, we apply the theory summarized in Sections 4 and 5 to marginal screening. In particular, we will construct confidence intervals for the selected variables. To summarize the developments so far, recall that our model (1) says that y ∼N(µ, σ2I). The distribution of interest is y|{ ˆE(y) = E}, and by Theorem 4.1, this is equivalent to y|{A(S, s)z ≤b(S, s)}, where y ∼N(µ, σ2I). By applying Theorem 5.2, we obtain the pivotal quantity F [V−,V+] ηT µ, σ2||η||2 2(ηT y) { ˆE(y) = E} ∼Unif(0, 1) (12) for any η, where V−and V+ are defined in (7) and (8). In this section, we describe how to form confidence intervals for the components of β⋆ ˆS = (XT ˆS X ˆS)−1XT ˆS µ. The best linear predictor of µ that uses only the selected variables is β⋆ ˆS , and ˆβ ˆS = (XT ˆS X ˆS)−1XT ˆS y is an unbiased estimate of β⋆ ˆS. If we choose ηj = ((XT ˆS X ˆS)−1XT ˆS ej)T , (13) 5 then ηT j µ = β⋆ j∈ˆS, so the above framework provides a method for inference about the jth variable in the model ˆS. 6.1 Confidence intervals for selected variables Next, we discuss how to obtain confidence intervals for β⋆ j∈ˆS. The standard way to obtain an interval is to invert a pivotal quantity [5]. In other words, since Pr  α 2 ≤F [V−,V+] β⋆ j∈ˆ S, σ2||ηj||2(ηT j y) ≤1 −α 2 { ˆE = E}  = α one can define a (1 −α) (conditional) confidence interval for β⋆ j, ˆ E as n x : α 2 ≤F [V−,V+] x, σ2||ηj||2(ηT j y) ≤1 −α 2 o . (14) In fact, F is monotone decreasing in x, so to find its endpoints, one need only solve for the root of a smooth one-dimensional function. The monotonicity is a consequence of the fact that the truncated Gaussian distribution is a natural exponential family and hence has monotone likelihood ratio in µ [17]. We now formalize the above observations in the following result, an immediate consequence of Theorem 5.2. Corollary 6.1. Let ηj be defined as in (13), and let Lα = Lα(ηj, ( ˆS, ˆs)) and Uα = Uα(ηj, ( ˆS, ˆs)) be the (unique) values satisfying F [V−,V+] Lα, σ2||ηj||2(ηT j y) = 1 −α 2 F [V−,V+] Uα, σ2||ηj||2(ηT j y) = α 2 (15) Then [Lα, Uα] is a (1 −α) confidence interval for β⋆ j∈ˆS, conditional on ˆE: P  β⋆ j∈ˆS ∈[Lα, Uα] { ˆE = E}  = 1 −α. (16) Proof. The confidence region of β⋆ j∈ˆS is the set of βj such that the test of H0 : β⋆ j∈ˆS accepts at the 1 −α level. The function F [V−,V+] x, σ2||ηj||2(ηT j y) is monotone in x, so solving for Lα and Uα identify the most extreme values where H0 is still accepted. This gives a 1 −α confidence interval. Next, we establish the unconditional coverage of the constructed confidence intervals and the false coverage rate (FCR) control [1]. Corollary 6.2. For each j ∈ˆS, Pr  β⋆ j∈ˆS ∈[Lj α, U j α]  = 1 −α. (17) Furthermore, the FCR of the intervals  [Lj α, U j α] j∈ˆ E is α. Proof. By (16), the conditional coverage of the confidence intervals are 1 −α. The coverage holds for every element of the partition { ˆE(y) = E}, so Pr  β⋆ j∈ˆS ∈[Lj α, U j α]  = X E Pr  β⋆ j∈ˆS ∈[Lα, Uα] { ˆE = E}  Pr( ˆE = E) = X E (1 −α) Pr( ˆE = E) = 1 −α. Remark 6.3. We would like to emphasize that the previous Corollary shows that the constructed confidence intervals are unconditionally valid. The conditioning on the selection event ˆE(y) = E was only for mathematical convenience to work out the exact pivot. Unlike standard z-test intervals, the coverage target, β⋆ j∈ˆS, and the interval [Lα, Uα] are random. In a typical confidence interval only the interval is random; however in the post-selection inference setting, the selected model is random, so both the interval and the target are necessarily random [2]. We summarize the algorithm for selecting and constructing confidence intervals below. 6 Algorithm 2 Confidence intervals for selected variables 1: Input: Design matrix X, response y, model size k. 2: Use Algorithm 1 to select a subset of variables ˆS and signs ˆs = sign(XT ˆS y). 3: Let A = A( ˆS, ˆs) and b = b( ˆS, ˆs) using (5). Let ηj = (XT ˆS )†ej. 4: Solve for Lj α and U j α using Equation (15) where V−and V+ are computed via (7) and (8) using the A, b, and ηj previously defined. 5: Output: Return the intervals [Lj α, U j α] for j ∈ˆS. 7 Experiments In Figure 1, we have already seen that the confidence intervals constructed using Algorithm 2 have exactly 1 −α coverage proportion. In this section, we perform two experiments on real data where the linear model does not hold, the noise is not Gaussian, and the noise variance is unknown. 7.1 Diabetes dataset The diabetes dataset contains n = 442 diabetes patients measured on p = 10 baseline variables [6]. The baseline variables are age, sex, body mass index, average blood pressure, and six blood serum measurements, and the response y is a quantitative measure of disease progression measured one year after the baseline. Since the noise variance σ2 is unknown, we estimate it by σ2 = ∥y−ˆy∥ n−p , 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1−α Coverage Proportion Z−test Adjusted Nominal Figure 3: Plot of 1 −α vs the coverage proportion for diabetes dataset. The nominal curve is the line y = x. The coverage proportion of the adjusted intervals agree with the nominal coverage level, but the z-test coverage proportion is strictly below the nominal level. The adjusted intervals perform well, despite the noise being non-Gaussian, and σ2 unknown. where ˆy = X ˆβ and ˆβ = (XT X)−1XT y. For each trial we generated new responses ˜yi = X ˆβ + ˜ϵ, and ˜ϵ is bootstrapped from the residuals ri = yi −ˆyi. We used marginal screening to select k = 2 variables, and then fit linear regression on the selected variables. The adjusted confidence intervals were constructed using Algorithm 2 with the estimated σ2. The nominal coverage level is varied across 1 −α ∈{.5, .6, .7, .8, .9, .95, .99}. From Figure 3, we observe that the adjusted intervals always cover at the nominal level, whereas the z-test is always below. The experiment was repeated 2000 times. 7.2 Riboflavin dataset Our second data example is a high-throughput genomic dataset about riboflavin (vitamin B2) production rate [3]. There are p = 4088 variables which measure the log expression level of different genes, a single real-valued response y which measures the logarithm of the riboflavin production rate, and n = 71 samples. We first estimate σ2 by using cross-validation [20], and apply marginal screening with k = 30, as chosen in [3]. We then use Algorithm 2 to identify genes significant at 7 α = 10%. The genes identified as significant were YCKE_at, YOAB_at, and YURQ_at. After using Bonferroni to control for FWER, we found YOAB_at remained significant. 8 Extensions The purpose of this section is to illustrate the broad applicability of the condition on selection framework. For expository purposes, we focused the paper on marginal screening where the framework is particularly easy to understand. In the rest of this section, we show how to apply the framework to marginal screening+Lasso, and orthogonal matching pursuit. This is a non-exhaustive list of selection procedures where the condition on selection framework is applicable, but we hope this incomplete list emphasizes the ease of constructing tests and confidence intervals post-model selection via conditioning. 8.1 Marginal screening + Lasso The marginal screening+Lasso procedure was introduced in [7] as a variable selection method for the ultra-high dimensional setting of p = O(enk). Fan et al. [7] recommend applying the marginal screening algorithm with k = n −1, followed by the Lasso on the selected variables. This is a two-stage procedure, so to properly account for the selection we must encode the selection event of marginal screening followed by Lasso. This can be done by representing the two stage selection as a single event. Let ( ˆSm, ˆsm) be the variables and signs selected by marginal screening, and the ( ˆSL, ˆzL) be the variables and signs selected by Lasso [12]. In Proposition 2.2 of [12], it is shown how to encode the Lasso selection event ( ˆSL, ˆzL) as a set of constraints {ALy ≤bL} 4, and in Section 4 we showed how to encode the marginal screening selection event ( ˆSm, ˆsm) as a set of constraints {Amy ≤bm}. Thus the selection event of marginal screening+Lasso can be encoded as {ALy ≤bL, Amy ≤bm}. Using these constraints, the hypothesis test and confidence intervals described in Algorithm 2 are valid for marginal screening+Lasso. 8.2 Orthogonal Matching Pursuit Orthogonal matching pursuit (OMP) is a commonly used variable selection method. At each iteration, OMP selects the variable most correlated with the residual r, and then recomputes the residual using the residual of least squares using the selected variables. Similar to Section 4, we can represent the OMP selection event as a set of linear constraints on y. ˆE(y) =  y : sign(xT piri)xT piri > ±xT j ri, for all j ̸= pi and all i ∈[k] = {y : ˆsixT pi(I −X ˆSi−1X† ˆSi−1)y > ±xT j (I −X ˆSi−1X† ˆSi−1)y and ˆsixT pi(I −X ˆSi−1X† ˆSi−1)y > 0, for all j ̸= pi, and all i ∈[k] } The selection event encodes that OMP selected a certain variable and the sign of the correlation of that variable with the residual, at steps 1 to k. The primary difference between the OMP selection event and the marginal screening selection event is that the OMP event also describes the order at which the variables were chosen. 9 Conclusion Due to the increasing size of datasets, marginal screening has become an important method for fast variable selection. However, the standard hypothesis tests and confidence intervals used in linear regression are invalid after using marginal screening to select important variables. We have described a method to form confidence intervals after marginal screening. The condition on selection framework is not restricted to marginal screening, and also applies to OMP and marginal screening + Lasso. The supplementary material also discusses the framework applied to non-negative least squares. 4The Lasso selection event is with respect to the Lasso optimization problem after marginal screening. 8 References [1] Yoav Benjamini and Daniel Yekutieli. False discovery rate–adjusted multiple confidence intervals for selected parameters. Journal of the American Statistical Association, 100(469):71–81, 2005. [2] Richard Berk, Lawrence Brown, Andreas Buja, Kai Zhang, and Linda Zhao. Valid post-selection inference. Annals of Statistics, 41(2):802–837, 2013. [3] Peter Bühlmann, Markus Kalisch, and Lukas Meier. High-dimensional statistics with a view toward applications in biology. Statistics, 1, 2014. [4] Peter Lukas Bühlmann and Sara A van de Geer. Statistics for High-dimensional Data. Springer, 2011. [5] George Casella and Roger L Berger. Statistical inference, volume 70. Duxbury Press Belmont, CA, 1990. [6] Bradley Efron, Trevor Hastie, Iain Johnstone, and Robert Tibshirani. Least angle regression. The Annals of statistics, 32(2):407–499, 2004. [7] Jianqing Fan and Jinchi Lv. Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(5):849–911, 2008. [8] Christopher R Genovese, Jiashun Jin, Larry Wasserman, and Zhigang Yao. A comparison of the lasso and marginal regression. The Journal of Machine Learning Research, 98888:2107–2143, 2012. [9] Isabelle Guyon and André Elisseeff. An introduction to variable and feature selection. The Journal of Machine Learning Research, 3:1157–1182, 2003. [10] Adel Javanmard and Andrea Montanari. Confidence intervals and hypothesis testing for high-dimensional regression. arXiv preprint arXiv:1306.3171, 2013. [11] Jason Lee, Yuekai Sun, and Jonathan E Taylor. On model selection consistency of penalized m-estimators: a geometric theory. In Advances in Neural Information Processing Systems, pages 342–350, 2013. [12] Jason D Lee, Dennis L Sun, Yuekai Sun, and Jonathan E Taylor. Exact inference after model selection via the lasso. arXiv preprint arXiv:1311.6238, 2013. [13] Hannes Leeb and Benedikt M Pötscher. The finite-sample distribution of post-model-selection estimators and uniform versus nonuniform approximations. Econometric Theory, 19(1):100–142, 2003. [14] Hannes Leeb and Benedikt M Pötscher. Model selection and inference: Facts and fiction. Econometric Theory, 21(1):21–59, 2005. [15] Hannes Leeb and Benedikt M Pötscher. Can one estimate the conditional distribution of post-modelselection estimators? The Annals of Statistics, pages 2554–2591, 2006. [16] Jeff Leek. Prediction: the lasso vs just using the top 10 predictors. http://simplystatistics.tumblr.com/post/18132467723/ prediction-the-lasso-vs-just-using-the-top-10. [17] Erich L. Lehmann and Joseph P. Romano. Testing Statistical Hypotheses. Springer, 3 edition, 2005. [18] Nicolai Meinshausen, Lukas Meier, and Peter Bühlmann. P-values for high-dimensional regression. Journal of the American Statistical Association, 104(488), 2009. [19] Sahand N Negahban, Pradeep Ravikumar, Martin J Wainwright, and Bin Yu. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. Statistical Science, 27(4):538–557, 2012. [20] Stephen Reid, Robert Tibshirani, and Jerome Friedman. A study of error variance estimation in lasso regression. arXiv preprint arXiv:1311.5274, 2013. [21] Virginia Goss Tusher, Robert Tibshirani, and Gilbert Chu. Significance analysis of microarrays applied to the ionizing radiation response. Proceedings of the National Academy of Sciences, 98(9):5116–5121, 2001. [22] Sara van de Geer, Peter Bühlmann, and Ya’acov Ritov. On asymptotically optimal confidence regions and tests for high-dimensional models. arXiv preprint arXiv:1303.0518, 2013. [23] M.J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using ℓ1-constrained quadratic programming (lasso). 55(5):2183–2202, 2009. [24] Larry Wasserman and Kathryn Roeder. High dimensional variable selection. Annals of statistics, 37(5A):2178, 2009. [25] Cun-Hui Zhang and S Zhang. Confidence intervals for low-dimensional parameters with highdimensional data. arXiv preprint arXiv:1110.2563, 2011. [26] P. Zhao and B. Yu. On model selection consistency of lasso. 7:2541–2563, 2006. 9
2014
265
5,364
Sequence to Sequence Learning with Neural Networks Ilya Sutskever Google ilyasu@google.com Oriol Vinyals Google vinyals@google.com Quoc V. Le Google qvl@google.com Abstract Deep Neural Networks (DNNs) are powerful models that have achieved excellent performance on difficult learning tasks. Although DNNs work well whenever large labeled training sets are available, they cannot be used to map sequences to sequences. In this paper, we present a general end-to-end approach to sequence learning that makes minimal assumptions on the sequence structure. Our method uses a multilayered Long Short-Term Memory (LSTM) to map the input sequence to a vector of a fixed dimensionality, and then another deep LSTM to decode the target sequence from the vector. Our main result is that on an English to French translation task from the WMT-14 dataset, the translations produced by the LSTM achieve a BLEU score of 34.8 on the entire test set, where the LSTM’s BLEU score was penalized on out-of-vocabulary words. Additionally, the LSTM did not have difficulty on long sentences. For comparison, a phrase-based SMT system achieves a BLEU score of 33.3 on the same dataset. When we used the LSTM to rerank the 1000 hypotheses produced by the aforementioned SMT system, its BLEU score increases to 36.5, which is close to the previous state of the art. The LSTM also learned sensible phrase and sentence representations that are sensitive to word order and are relatively invariant to the active and the passive voice. Finally, we found that reversing the order of the words in all source sentences (but not target sentences) improved the LSTM’s performance markedly, because doing so introduced many short term dependencies between the source and the target sentence which made the optimization problem easier. 1 Introduction Deep Neural Networks (DNNs) are extremely powerful machine learning models that achieve excellent performance on difficult problems such as speech recognition [13, 7] and visual object recognition [19, 6, 21, 20]. DNNs are powerful because they can perform arbitrary parallel computation for a modest number of steps. A surprising example of the power of DNNs is their ability to sort N N-bit numbers using only 2 hidden layers of quadratic size [27]. So, while neural networks are related to conventional statistical models, they learn an intricate computation. Furthermore, large DNNs can be trained with supervised backpropagation whenever the labeled training set has enough information to specify the network’s parameters. Thus, if there exists a parameter setting of a large DNN that achieves good results (for example, because humans can solve the task very rapidly), supervised backpropagation will find these parameters and solve the problem. Despite their flexibility and power, DNNs can only be applied to problems whose inputs and targets can be sensibly encoded with vectors of fixed dimensionality. It is a significant limitation, since many important problems are best expressed with sequences whose lengths are not known a-priori. For example, speech recognition and machine translation are sequential problems. Likewise, question answering can also be seen as mapping a sequence of words representing the question to a 1 sequence of words representing the answer. It is therefore clear that a domain-independent method that learns to map sequences to sequences would be useful. Sequences pose a challenge for DNNs because they require that the dimensionality of the inputs and outputs is known and fixed. In this paper, we show that a straightforward application of the Long Short-Term Memory (LSTM) architecture [16] can solve general sequence to sequence problems. The idea is to use one LSTM to read the input sequence, one timestep at a time, to obtain large fixeddimensional vector representation, and then to use another LSTM to extract the output sequence from that vector (fig. 1). The second LSTM is essentially a recurrent neural network language model [28, 23, 30] except that it is conditioned on the input sequence. The LSTM’s ability to successfully learn on data with long range temporal dependencies makes it a natural choice for this application due to the considerable time lag between the inputs and their corresponding outputs (fig. 1). There have been a number of related attempts to address the general sequence to sequence learning problem with neural networks. Our approach is closely related to Kalchbrenner and Blunsom [18] who were the first to map the entire input sentence to vector, and is very similar to Cho et al. [5]. Graves [10] introduced a novel differentiable attention mechanism that allows neural networks to focus on different parts of their input, and an elegant variant of this idea was successfully applied to machine translation by Bahdanau et al. [2]. The Connectionist Sequence Classification is another popular technique for mapping sequences to sequences with neural networks, although it assumes a monotonic alignment between the inputs and the outputs [11]. Figure 1: Our model reads an input sentence “ABC” and produces “WXYZ” as the output sentence. The model stops making predictions after outputting the end-of-sentence token. Note that the LSTM reads the input sentence in reverse, because doing so introduces many short term dependencies in the data that make the optimization problem much easier. The main result of this work is the following. On the WMT’14 English to French translation task, we obtained a BLEU score of 34.81 by directly extracting translations from an ensemble of 5 deep LSTMs (with 380M parameters each) using a simple left-to-right beam-search decoder. This is by far the best result achieved by direct translation with large neural networks. For comparison, the BLEU score of a SMT baseline on this dataset is 33.30 [29]. The 34.81 BLEU score was achieved by an LSTM with a vocabulary of 80k words, so the score was penalized whenever the reference translation contained a word not covered by these 80k. This result shows that a relatively unoptimized neural network architecture which has much room for improvement outperforms a mature phrase-based SMT system. Finally, we used the LSTM to rescore the publicly available 1000-best lists of the SMT baseline on the same task [29]. By doing so, we obtained a BLEU score of 36.5, which improves the baseline by 3.2 BLEU points and is close to the previous state-of-the-art (which is 37.0 [9]). Surprisingly, the LSTM did not suffer on very long sentences, despite the recent experience of other researchers with related architectures [26]. We were able to do well on long sentences because we reversed the order of words in the source sentence but not the target sentences in the training and test set. By doing so, we introduced many short term dependencies that made the optimization problem much simpler (see sec. 2 and 3.3). As a result, SGD could learn LSTMs that had no trouble with long sentences. The simple trick of reversing the words in the source sentence is one of the key technical contributions of this work. A useful property of the LSTM is that it learns to map an input sentence of variable length into a fixed-dimensional vector representation. Given that translations tend to be paraphrases of the source sentences, the translation objective encourages the LSTM to find sentence representations that capture their meaning, as sentences with similar meanings are close to each other while different 2 sentences meanings will be far. A qualitative evaluation supports this claim, showing that our model is aware of word order and is fairly invariant to the active and passive voice. 2 The model The Recurrent Neural Network (RNN) [31, 28] is a natural generalization of feedforward neural networks to sequences. Given a sequence of inputs (x1, . . . , xT ), a standard RNN computes a sequence of outputs (y1, . . . , yT ) by iterating the following equation: ht = sigm W hxxt + W hhht−1  yt = W yhht The RNN can easily map sequences to sequences whenever the alignment between the inputs the outputs is known ahead of time. However, it is not clear how to apply an RNN to problems whose input and the output sequences have different lengths with complicated and non-monotonic relationships. A simple strategy for general sequence learning is to map the input sequence to a fixed-sized vector using one RNN, and then to map the vector to the target sequence with another RNN (this approach has also been taken by Cho et al. [5]). While it could work in principle since the RNN is provided with all the relevant information, it would be difficult to train the RNNs due to the resulting long term dependencies [14, 4] (figure 1) [16, 15]. However, the Long Short-Term Memory (LSTM) [16] is known to learn problems with long range temporal dependencies, so an LSTM may succeed in this setting. The goal of the LSTM is to estimate the conditional probability p(y1, . . . , yT ′|x1, . . . , xT ) where (x1, . . . , xT ) is an input sequence and y1, . . . , yT ′ is its corresponding output sequence whose length T ′ may differ from T. The LSTM computes this conditional probability by first obtaining the fixeddimensional representation v of the input sequence (x1, . . . , xT ) given by the last hidden state of the LSTM, and then computing the probability of y1, . . . , yT ′ with a standard LSTM-LM formulation whose initial hidden state is set to the representation v of x1, . . . , xT : p(y1, . . . , yT ′|x1, . . . , xT ) = T ′ Y t=1 p(yt|v, y1, . . . , yt−1) (1) In this equation, each p(yt|v, y1, . . . , yt−1) distribution is represented with a softmax over all the words in the vocabulary. We use the LSTM formulation from Graves [10]. Note that we require that each sentence ends with a special end-of-sentence symbol “<EOS>”, which enables the model to define a distribution over sequences of all possible lengths. The overall scheme is outlined in figure 1, where the shown LSTM computes the representation of “A”, “B”, “C”, “<EOS>” and then uses this representation to compute the probability of “W”, “X”, “Y”, “Z”, “<EOS>”. Our actual models differ from the above description in three important ways. First, we used two different LSTMs: one for the input sequence and another for the output sequence, because doing so increases the number model parameters at negligible computational cost and makes it natural to train the LSTM on multiple language pairs simultaneously [18]. Second, we found that deep LSTMs significantly outperformed shallow LSTMs, so we chose an LSTM with four layers. Third, we found it extremely valuable to reverse the order of the words of the input sentence. So for example, instead of mapping the sentence a, b, c to the sentence α, β, γ, the LSTM is asked to map c, b, a to α, β, γ, where α, β, γ is the translation of a, b, c. This way, a is in close proximity to α, b is fairly close to β, and so on, a fact that makes it easy for SGD to “establish communication” between the input and the output. We found this simple data transformation to greatly boost the performance of the LSTM. 3 Experiments We applied our method to the WMT’14 English to French MT task in two ways. We used it to directly translate the input sentence without using a reference SMT system and we it to rescore the n-best lists of an SMT baseline. We report the accuracy of these translation methods, present sample translations, and visualize the resulting sentence representation. 3 3.1 Dataset details We used the WMT’14 English to French dataset. We trained our models on a subset of 12M sentences consisting of 348M French words and 304M English words, which is a clean “selected” subset from [29]. We chose this translation task and this specific training set subset because of the public availability of a tokenized training and test set together with 1000-best lists from the baseline SMT [29]. As typical neural language models rely on a vector representation for each word, we used a fixed vocabulary for both languages. We used 160,000 of the most frequent words for the source language and 80,000 of the most frequent words for the target language. Every out-of-vocabulary word was replaced with a special “UNK” token. 3.2 Decoding and Rescoring The core of our experiments involved training a large deep LSTM on many sentence pairs. We trained it by maximizing the log probability of a correct translation T given the source sentence S, so the training objective is 1/|S| X (T,S)∈S log p(T|S) where S is the training set. Once training is complete, we produce translations by finding the most likely translation according to the LSTM: ˆT = arg max T p(T|S) (2) We search for the most likely translation using a simple left-to-right beam search decoder which maintains a small number B of partial hypotheses, where a partial hypothesis is a prefix of some translation. At each timestep we extend each partial hypothesis in the beam with every possible word in the vocabulary. This greatly increases the number of the hypotheses so we discard all but the B most likely hypotheses according to the model’s log probability. As soon as the “<EOS>” symbol is appended to a hypothesis, it is removed from the beam and is added to the set of complete hypotheses. While this decoder is approximate, it is simple to implement. Interestingly, our system performs well even with a beam size of 1, and a beam of size 2 provides most of the benefits of beam search (Table 1). We also used the LSTM to rescore the 1000-best lists produced by the baseline system [29]. To rescore an n-best list, we computed the log probability of every hypothesis with our LSTM and took an even average with their score and the LSTM’s score. 3.3 Reversing the Source Sentences While the LSTM is capable of solving problems with long term dependencies, we discovered that the LSTM learns much better when the source sentences are reversed (the target sentences are not reversed). By doing so, the LSTM’s test perplexity dropped from 5.8 to 4.7, and the test BLEU scores of its decoded translations increased from 25.9 to 30.6. While we do not have a complete explanation to this phenomenon, we believe that it is caused by the introduction of many short term dependencies to the dataset. Normally, when we concatenate a source sentence with a target sentence, each word in the source sentence is far from its corresponding word in the target sentence. As a result, the problem has a large “minimal time lag” [17]. By reversing the words in the source sentence, the average distance between corresponding words in the source and target language is unchanged. However, the first few words in the source language are now very close to the first few words in the target language, so the problem’s minimal time lag is greatly reduced. Thus, backpropagation has an easier time “establishing communication” between the source sentence and the target sentence, which in turn results in substantially improved overall performance. Initially, we believed that reversing the input sentences would only lead to more confident predictions in the early parts of the target sentence and to less confident predictions in the later parts. However, LSTMs trained on reversed source sentences did much better on long sentences than LSTMs 4 trained on the raw source sentences (see sec. 3.7), which suggests that reversing the input sentences results in LSTMs with better memory utilization. 3.4 Training details We found that the LSTM models are fairly easy to train. We used deep LSTMs with 4 layers, with 1000 cells at each layer and 1000 dimensional word embeddings, with an input vocabulary of 160,000 and an output vocabulary of 80,000. We found deep LSTMs to significantly outperform shallow LSTMs, where each additional layer reduced perplexity by nearly 10%, possibly due to their much larger hidden state. We used a naive softmax over 80,000 words at each output. The resulting LSTM has 380M parameters of which 64M are pure recurrent connections (32M for the “encoder” LSTM and 32M for the “decoder” LSTM). The complete training details are given below: • We initialized all of the LSTM’s parameters with the uniform distribution between -0.08 and 0.08 • We used stochastic gradient descent without momentum, with a fixed learning rate of 0.7. After 5 epochs, we begun halving the learning rate every half epoch. We trained our models for a total of 7.5 epochs. • We used batches of 128 sequences for the gradient and divided it the size of the batch (namely, 128). • Although LSTMs tend to not suffer from the vanishing gradient problem, they can have exploding gradients. Thus we enforced a hard constraint on the norm of the gradient [10, 25] by scaling it when its norm exceeded a threshold. For each training batch, we compute s = ∥g∥2, where g is the gradient divided by 128. If s > 5, we set g = 5g s . • Different sentences have different lengths. Most sentences are short (e.g., length 20-30) but some sentences are long (e.g., length > 100), so a minibatch of 128 randomly chosen training sentences will have many short sentences and few long sentences, and as a result, much of the computation in the minibatch is wasted. To address this problem, we made sure that all sentences within a minibatch were roughly of the same length, which a 2x speedup. 3.5 Parallelization A C++ implementation of deep LSTM with the configuration from the previous section on a single GPU processes a speed of approximately 1,700 words per second. This was too slow for our purposes, so we parallelized our model using an 8-GPU machine. Each layer of the LSTM was executed on a different GPU and communicated its activations to the next GPU (or layer) as soon as they were computed. Our models have 4 layers of LSTMs, each of which resides on a separate GPU. The remaining 4 GPUs were used to parallelize the softmax, so each GPU was responsible for multiplying by a 1000 × 20000 matrix. The resulting implementation achieved a speed of 6,300 (both English and French) words per second with a minibatch size of 128. Training took about a ten days with this implementation. 3.6 Experimental Results We used the cased BLEU score [24] to evaluate the quality of our translations. We computed our BLEU scores using multi-bleu.pl1 on the tokenized predictions and ground truth. This way of evaluating the BELU score is consistent with [5] and [2], and reproduces the 33.3 score of [29]. However, if we evaluate the state of the art system of [9] (whose predictions can be downloaded from statmt.org\matrix) in this manner, we get 37.0, which is greater than the 35.8 reported by statmt.org\matrix. The results are presented in tables 1 and 2. Our best results are obtained with an ensemble of LSTMs that differ in their random initializations and in the random order of minibatches. While the decoded translations of the LSTM ensemble do not beat the state of the art, it is the first time that a pure neural translation system outperforms a phrase-based SMT baseline on a large MT task by 1There several variants of the BLEU score, and each variant is defined with a perl script. 5 Method test BLEU score (ntst14) Bahdanau et al. [2] 28.45 Baseline System [29] 33.30 Single forward LSTM, beam size 12 26.17 Single reversed LSTM, beam size 12 30.59 Ensemble of 5 reversed LSTMs, beam size 1 33.00 Ensemble of 2 reversed LSTMs, beam size 12 33.27 Ensemble of 5 reversed LSTMs, beam size 2 34.50 Ensemble of 5 reversed LSTMs, beam size 12 34.81 Table 1: The performance of the LSTM on WMT’14 English to French test set (ntst14). Note that an ensemble of 5 LSTMs with a beam of size 2 is cheaper than of a single LSTM with a beam of size 12. Method test BLEU score (ntst14) Baseline System [29] 33.30 Cho et al. [5] 34.54 State of the art [9] 37.0 Rescoring the baseline 1000-best with a single forward LSTM 35.61 Rescoring the baseline 1000-best with a single reversed LSTM 35.85 Rescoring the baseline 1000-best with an ensemble of 5 reversed LSTMs 36.5 Oracle Rescoring of the Baseline 1000-best lists ∼45 Table 2: Methods that use neural networks together with an SMT system on the WMT’14 English to French test set (ntst14). a sizeable margin, despite its inability to handle out-of-vocabulary words. The LSTM is within 0.5 BLEU points of the previous state of the art by rescoring the 1000-best list of the baseline system. 3.7 Performance on long sentences We were surprised to discover that the LSTM did well on long sentences, which is shown quantitatively in figure 3. Table 3 presents several examples of long sentences and their translations. 3.8 Model Analysis −8 −6 −4 −2 0 2 4 6 8 10 −6 −5 −4 −3 −2 −1 0 1 2 3 4 John respects Mary Mary respects John John admires Mary Mary admires John Mary is in love with John John is in love with Mary −15 −10 −5 0 5 10 15 20 −20 −15 −10 −5 0 5 10 15 I gave her a card in the garden In the garden , I gave her a card She was given a card by me in the garden She gave me a card in the garden In the garden , she gave me a card I was given a card by her in the garden Figure 2: The figure shows a 2-dimensional PCA projection of the LSTM hidden states that are obtained after processing the phrases in the figures. The phrases are clustered by meaning, which in these examples is primarily a function of word order, which would be difficult to capture with a bag-of-words model. Notice that both clusters have similar internal structure. One of the attractive features of our model is its ability to turn a sequence of words into a vector of fixed dimensionality. Figure 2 visualizes some of the learned representations. The figure clearly shows that the representations are sensitive to the order of words, while being fairly insensitive to the 6 Type Sentence Our model Ulrich UNK , membre du conseil d’ administration du constructeur automobile Audi , affirme qu’ il s’ agit d’ une pratique courante depuis des ann´ees pour que les t´el´ephones portables puissent ˆetre collect´es avant les r´eunions du conseil d’ administration afin qu’ ils ne soient pas utilis´es comme appareils d’ ´ecoute `a distance . Truth Ulrich Hackenberg , membre du conseil d’ administration du constructeur automobile Audi , d´eclare que la collecte des t´el´ephones portables avant les r´eunions du conseil , afin qu’ ils ne puissent pas ˆetre utilis´es comme appareils d’ ´ecoute `a distance , est une pratique courante depuis des ann´ees . Our model “ Les t´el´ephones cellulaires , qui sont vraiment une question , non seulement parce qu’ ils pourraient potentiellement causer des interf´erences avec les appareils de navigation , mais nous savons , selon la FCC , qu’ ils pourraient interf´erer avec les tours de t´el´ephone cellulaire lorsqu’ ils sont dans l’ air ” , dit UNK . Truth “ Les t´el´ephones portables sont v´eritablement un probl`eme , non seulement parce qu’ ils pourraient ´eventuellement cr´eer des interf´erences avec les instruments de navigation , mais parce que nous savons , d’ apr`es la FCC , qu’ ils pourraient perturber les antennes-relais de t´el´ephonie mobile s’ ils sont utilis´es `a bord ” , a d´eclar´e Rosenker . Our model Avec la cr´emation , il y a un “ sentiment de violence contre le corps d’ un ˆetre cher ” , qui sera “ r´eduit `a une pile de cendres ” en tr`es peu de temps au lieu d’ un processus de d´ecomposition “ qui accompagnera les ´etapes du deuil ” . Truth Il y a , avec la cr´emation , “ une violence faite au corps aim´e ” , qui va ˆetre “ r´eduit `a un tas de cendres ” en tr`es peu de temps , et non apr`es un processus de d´ecomposition , qui “ accompagnerait les phases du deuil ” . Table 3: A few examples of long translations produced by the LSTM alongside the ground truth translations. The reader can verify that the translations are sensible using Google translate. 4 7 8 12 17 22 28 35 79 test sentences sorted by their length 20 25 30 35 40 BLEU score LSTM (34.8) baseline (33.3) 0 500 1000 1500 2000 2500 3000 3500 test sentences sorted by average word frequency rank 20 25 30 35 40 BLEU score LSTM (34.8) baseline (33.3) Figure 3: The left plot shows the performance of our system as a function of sentence length, where the x-axis corresponds to the test sentences sorted by their length and is marked by the actual sequence lengths. There is no degradation on sentences with less than 35 words, there is only a minor degradation on the longest sentences. The right plot shows the LSTM’s performance on sentences with progressively more rare words, where the x-axis corresponds to the test sentences sorted by their “average word frequency rank”. replacement of an active voice with a passive voice. The two-dimensional projections are obtained using PCA. 4 Related work There is a large body of work on applications of neural networks to machine translation. So far, the simplest and most effective way of applying an RNN-Language Model (RNNLM) [23] or a 7 Feedforward Neural Network Language Model (NNLM) [3] to an MT task is by rescoring the nbest lists of a strong MT baseline [22], which reliably improves translation quality. More recently, researchers have begun to look into ways of including information about the source language into the NNLM. Examples of this work include Auli et al. [1], who combine an NNLM with a topic model of the input sentence, which improves rescoring performance. Devlin et al. [8] followed a similar approach, but they incorporated their NNLM into the decoder of an MT system and used the decoder’s alignment information to provide the NNLM with the most useful words in the input sentence. Their approach was highly successful and it achieved large improvements over their baseline. Our work is closely related to Kalchbrenner and Blunsom [18], who were the first to map the input sentence into a vector and then back to a sentence, although they map sentences to vectors using convolutional neural networks, which lose the ordering of the words. Similarly to this work, Cho et al. [5] used an LSTM-like RNN architecture to map sentences into vectors and back, although their primary focus was on integrating their neural network into an SMT system. Bahdanau et al. [2] also attempted direct translations with a neural network that used an attention mechanism to overcome the poor performance on long sentences experienced by Cho et al. [5] and achieved encouraging results. Likewise, Pouget-Abadie et al. [26] attempted to address the memory problem of Cho et al. [5] by translating pieces of the source sentence in way that produces smooth translations, which is similar to a phrase-based approach. We suspect that they could achieve similar improvements by simply training their networks on reversed source sentences. End-to-end training is also the focus of Hermann et al. [12], whose model represents the inputs and outputs by feedforward networks, and map them to similar points in space. However, their approach cannot generate translations directly: to get a translation, they need to do a look up for closest vector in the pre-computed database of sentences, or to rescore a sentence. 5 Conclusion In this work, we showed that a large deep LSTM with a limited vocabulary can outperform a standard SMT-based system whose vocabulary is unlimited on a large-scale MT task. The success of our simple LSTM-based approach on MT suggests that it should do well on many other sequence learning problems, provided they have enough training data. We were surprised by the extent of the improvement obtained by reversing the words in the source sentences. We conclude that it is important to find a problem encoding that has the greatest number of short term dependencies, as they make the learning problem much simpler. In particular, while we were unable to train a standard RNN on the non-reversed translation problem (shown in fig. 1), we believe that a standard RNN should be easily trainable when the source sentences are reversed (although we did not verify it experimentally). We were also surprised by the ability of the LSTM to correctly translate very long sentences. We were initially convinced that the LSTM would fail on long sentences due to its limited memory, and other researchers reported poor performance on long sentences with a model similar to ours [5, 2, 26]. And yet, LSTMs trained on the reversed dataset had little difficulty translating long sentences. Most importantly, we demonstrated that a simple, straightforward and a relatively unoptimized approach can outperform a mature SMT system, so further work will likely lead to even greater translation accuracies. These results suggest that our approach will likely do well on other challenging sequence to sequence problems. 6 Acknowledgments We thank Samy Bengio, Jeff Dean, Matthieu Devin, Geoffrey Hinton, Nal Kalchbrenner, Thang Luong, Wolfgang Macherey, Rajat Monga, Vincent Vanhoucke, Peng Xu, Wojciech Zaremba, and the Google Brain team for useful comments and discussions. 8 References [1] M. Auli, M. Galley, C. Quirk, and G. Zweig. Joint language and translation modeling with recurrent neural networks. In EMNLP, 2013. [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] Y. Bengio, R. Ducharme, P. Vincent, and C. Jauvin. A neural probabilistic language model. In Journal of Machine Learning Research, pages 1137–1155, 2003. [4] Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2):157–166, 1994. [5] K. Cho, B. Merrienboer, C. Gulcehre, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Arxiv preprint arXiv:1406.1078, 2014. [6] D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In CVPR, 2012. [7] G. E. Dahl, D. Yu, L. Deng, and A. Acero. Context-dependent pre-trained deep neural networks for large vocabulary speech recognition. IEEE Transactions on Audio, Speech, and Language Processing - Special Issue on Deep Learning for Speech and Language Processing, 2012. [8] J. Devlin, R. Zbib, Z. Huang, T. Lamar, R. Schwartz, and J. Makhoul. Fast and robust neural network joint models for statistical machine translation. In ACL, 2014. [9] Nadir Durrani, Barry Haddow, Philipp Koehn, and Kenneth Heafield. Edinburgh’s phrase-based machine translation systems for wmt-14. In WMT, 2014. [10] A. Graves. Generating sequences with recurrent neural networks. In Arxiv preprint arXiv:1308.0850, 2013. [11] A. Graves, S. Fern´andez, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In ICML, 2006. [12] K. M. Hermann and P. Blunsom. Multilingual distributed representations without word alignment. In ICLR, 2014. [13] G. Hinton, L. Deng, D. Yu, G. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 2012. [14] S. Hochreiter. Untersuchungen zu dynamischen neuronalen netzen. Master’s thesis, Institut fur Informatik, Technische Universitat, Munchen, 1991. [15] S. Hochreiter, Y. Bengio, P. Frasconi, and J. Schmidhuber. Gradient flow in recurrent nets: the difficulty of learning long-term dependencies, 2001. [16] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 1997. [17] S. Hochreiter and J. Schmidhuber. LSTM can solve hard long time lag problems. 1997. [18] N. Kalchbrenner and P. Blunsom. Recurrent continuous translation models. In EMNLP, 2013. [19] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. [20] Q.V. Le, M.A. Ranzato, R. Monga, M. Devin, K. Chen, G.S. Corrado, J. Dean, and A.Y. Ng. Building high-level features using large scale unsupervised learning. In ICML, 2012. [21] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [22] T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno University of Technology, 2012. [23] T. Mikolov, M. Karafi´at, L. Burget, J. Cernock`y, and S. Khudanpur. Recurrent neural network based language model. In INTERSPEECH, pages 1045–1048, 2010. [24] K. Papineni, S. Roukos, T. Ward, and W. J. Zhu. BLEU: a method for automatic evaluation of machine translation. In ACL, 2002. [25] R. Pascanu, T. Mikolov, and Y. Bengio. On the difficulty of training recurrent neural networks. arXiv preprint arXiv:1211.5063, 2012. [26] J. Pouget-Abadie, D. Bahdanau, B. van Merrienboer, K. Cho, and Y. Bengio. Overcoming the curse of sentence length for neural machine translation using automatic segmentation. arXiv preprint arXiv:1409.1257, 2014. [27] A. Razborov. On small depth threshold circuits. In Proc. 3rd Scandinavian Workshop on Algorithm Theory, 1992. [28] D. Rumelhart, G. E. Hinton, and R. J. Williams. Learning representations by back-propagating errors. Nature, 323(6088):533–536, 1986. [29] H. Schwenk. University le mans. http://www-lium.univ-lemans.fr/˜schwenk/cslm_ joint_paper/, 2014. [Online; accessed 03-September-2014]. [30] M. Sundermeyer, R. Schluter, and H. Ney. LSTM neural networks for language modeling. In INTERSPEECH, 2010. [31] P. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of IEEE, 1990. 9
2014
266
5,365
Information-based learning by agents in unbounded state spaces Shariq A. Mobin, James A. Arnemann, Friedrich T. Sommer Redwood Center for Theoretical Neuroscience University of California, Berkeley Berkeley, CA 94720 shariqmobin@berkeley.edu, arnemann@berkeley.edu, fsommer@berkeley.edu Abstract The idea that animals might use information-driven planning to explore an unknown environment and build an internal model of it has been proposed for quite some time. Recent work has demonstrated that agents using this principle can efficiently learn models of probabilistic environments with discrete, bounded state spaces. However, animals and robots are commonly confronted with unbounded environments. To address this more challenging situation, we study informationbased learning strategies of agents in unbounded state spaces using non-parametric Bayesian models. Specifically, we demonstrate that the Chinese Restaurant Process (CRP) model is able to solve this problem and that an Empirical Bayes version is able to efficiently explore bounded and unbounded worlds by relying on little prior information. 1 Introduction Learning in animals involves the active gathering of sensor data, presumably selecting those sensor inputs that are most useful for learning a model of the world. Thus, a theoretical framework for the learning in agents, where learning itself is the primary objective, would be essential for making testable predictions for neuroscience and psychology [9, 7], and it would also impact applications such as optimal experimental design and building autonomous robots [3]. It has been proposed that information theory-based objective functions, such as those based on the comparison of learned probability distributions, could guide exploratory behavior in animals and artificial agents [13, 18]. Although reinforcement learning theory has largely advanced in describing action planning in fully or partially observable worlds with a fixed reward function, e.g., [17], the study of planning with internally defined and gradually decreasing reward functions has been rather slow. A few recent studies [20, 11, 12] developed remarkably efficient action policies for learning an internal model of an unknown fully observable world that are driven by maximizing an objective of predicted information gain. Although using somewhat different definitions of information gain, the key insights of these studies are that optimization has to be non-greedy, with a longer time horizon, and that gain in information also translates to efficient reward gathering. However, these models are still quite limited and cannot be applied to agents in more realistic environments. They only work in observable, discrete and bounded state spaces. Here, we relax one of these restrictions and present a model for unbounded, observable discrete state spaces. Using methods from non-parametric Bayesian statistics, specifically the Chinese Restaurant Process (CRP), the resulting agent can efficiently learn the structure of an unknown, unbounded state space. To our knowledge this is the first use of CRPs to address this problem, however, CRPs have been introduced earlier to reinforcement learning for other purposes, such as state clustering [2]. 1 2 Model 2.1 Mathematical framework for embodied active learning In this study we follow [12] and use Controlled Markov Chains (CMC) to describe how an agent can interact with its environment in closed, embodied, action-perception loops. A CMC is a Markov Chain with an additional control variable to allow for switching between different transition distributions in each state, e.g. [6]. Put differently, it is a Markov Decision Process (MDP) without the reward function. A CMC is described by a 3-tuple (S , A , Θ) where S denotes a finite set of states, A is a finite set of actions the agent can take, and Θ is a 3-dimensional CMC kernel describing the transition probabilities between states for each action Θsas′ = ps′|s,a = P(st+1 = s′|st = s, at = a) (1) Like in [12] we consider the exploration task of the agent to be the formation of an accurate estimate, or internal model bΘ, of the true CMC kernel, Θ, that describes its world. 2.2 Modeling the transition in unbounded state spaces Let t be the current number of observations of states S and Kt be the number of different states discovered so far. The observed counts are denoted by Ct := {#1, ..., #Kt}. Species sampling models have been proposed as generalizations of the Dirichlet process [14], which are interesting for non-parametric Bayesian inference in unbounded state spaces. A species sampling sequence (SSS) describes the distribution of the next observation St+1. It is defined by St+1|S1, , St ∼ Kt X i=1 pi(Ct)δ ˜S + pKt+1(Ct) (2) with δ ˜S a degenerate probability measure, see [10] for details. In order to define a valid SSS, the sequence (p1, p2, ...) must sum to one and be an Exchangeable Partition Probability Function (EPPF). The exchangeability condition requires that the probabilities depend only on the counts Ct, not on the order of how the agent sampled the transitions. Here we consider one of most common EPPF models in the literature, the Chinese Restaurant Process (CRP) or Polya urn process [1]. According to the CRP model, the probability of observing a state is pi(Ct) = #i t + θ for i = 1, ..., Kt (3) pψ(Ct) ≡pKt+1(Ct) = θ t + θ (4) where (3) describes revisiting a state and (4) describes the undiscovered probability mass (UPM), i.e., the probability of discovering a new state, which is then labeled Kt+1. In the following, the set of undiscovered states will be denoted by ψ. Using this formalism, the agent must define a separate CRP for each state action pair s, a. The internal model is then described by bΘsas′ = ps′|s,a(Ct), (5) updated according to (3, 4). The t index in bΘsas′ is suppressed for the sake of notational ease. Our simplest agent uses a CRP (3, 4) with fixed θ. Further, we will investigate an Empirical Bayes CRP, referred to as EB-CRP, in which the parameter θ is learned and adjusted from observations online using a maximum likelihood estimate (MLE). This is similar to the approach of [22] but we follow a more straightforward path and derive a MLE of θ using the EPPF of the CRP and employing an approximation of the harmonic series. The likelihood of observing a given number of state counts is described by the EPPF of the CRP [8] π(Ct; θ) = θKt Qt−1 i=0(θ + i) Kt Y i=1 (#i −1)! (6) 2 Maximizing the log likelihood d dθln(π(Ct; θ)) = Kt θ − t−1 X i=0 1 θ + i = 0 (7) yields θ(t) ≈ Kt ln(t) + γ + 1 2t − 1 12t2 , (8) where (8) uses a closed form approximation of the harmonic series in (7) with Euler’s Mascheroni constant γ. In our EB-CRP agent, the parameter θ is updated after each observation according to (8). 2.3 Information-theoretic assessment of learning Assessing or guiding the progress of the agent in the exploration process can be done by comparing probability distributions. For example, the learning progress should increase the similarity between the internal model, bΘ, of the agent and the true model, Θ. A popular measure for comparing distributions of the same dimensions is the KL Divergence, DKL. However, in our case, with the size of the underlying state space unknown and states being discovered successively in bΘ, models of different sizes have to be compared. To address this, we apply the following padding procedure to the smaller model with fewer discovered states and transitions (Figure 1). If the smaller model, bΘ, has n undiscovered state transitions from a known origin state, one splits the UPM uniformly into n equal probabilities (Figure 1a). The resulting padded model is given by bΘP sas′ =      bΘsaψ (|SΘsa|−|S b Θsa|), bΘsas′ = 0 [Figure 1a] 1/|SΘsa|, s /∈SbΘ [Figure 1b] bΘsas′, bΘsas′ > 0 (9) where |SΘsa| is the number of known states reachable from state s by taking action a in Θ. Further, if there are undiscovered origin states in bΘ, one adds such states and a uniform transition kernel to potential target states (Figure 1b). Figure 1: Illustration of the padding procedure for adding unknown states and state transitions in a smaller, less informed model, bΘ, of an unbounded environment in order to compare it with a larger, better informed model, Θ. (a) If transitions to target states are missing, we uniformly split the UPM into equal transition probabilities to the missing target states, which are in fact the unknown elements of the set ψ. (b) If a state is not discovered yet, we paste this state in with a uniform transition distribution to all target states reachable in the larger model, Θ. With this type of padding procedure we can define a distance between two unequally sized models, DKLP (Θsa·||bΘsa·) := DKL(Θsa·||bΘP sa·) := X s′∈SΘsa Θsas′ log2 Θsas′ bΘP sas′ ! , (10) and use it to extend previous information measures for assessing and guiding explorative learning [12] to unbounded state spaces. First, we define Missing Information, IM(Θ||bΘ) := X s∈S ,a∈A DKLP (Θsa·||bΘsa·), (11) 3 a quantity an external observer can use for assessing the deficiency of the internal model of the agent with respect to the true model. Second, we define Information Gain, IG(s, a, s′) := IM(Θ||bΘ) −IM(Θ||bΘs,a→s′), (12) a quantity measuring the improvement between two models, in this case, between the current internal model of the agent, bΘ, and an improved one, bΘs,a→s′, which represents an updated model after observing a new state transition from s to s′ under action a. 2.4 Predicted information gain Predicted information gain (PIG) as used in [12] is the expected information gain for a given state action pair. To extend the previous formula in [12] to compute this expectation in the non-parametric setting, we again make use of the padding procedure described in the last section PIG(s, a) := Es′,Θ|Ct[IG(s, a, s′)] = bΘsaψDKLP (bΘs,a→η sa· ||bΘsa·) + X s′∈S b Θsa bΘsas′DKL(bΘs,a→s′ sa· ||bΘsa·) (13) Here, DKLP handles the case where the agent, during its planning, hypothetically discovers a new target state, η ∈ψ, from the state action pair, s, a. There is one small difference in calculating the DKLP from the previous section, which is that in equation (9) SΘsa is replaced by SbΘs,a→η sa . Thus the RHS of (13) can be computed internally by the agent for action planning as it does not contain the true model, Θ. 2.5 Value Iteration When states of low information gain separate the agent from states of high information gain in the environment, greedy maximization of PIG performs poorly. Thus, like in [12], we employ value iteration using the Bellman equations [4]. We begin at a distant time point (τ = 0) assigning initial values to PIG. Then, we propogate backward in time calculating the expected reward. Q0(s, a) := PIG(s, a) (14) Qτ−1(s, a) := PIG(s, a) + λ h bΘsaψVτ(ψ) + X s′∈S b Θsa bΘsas′Vτ(s′) i (15) Vτ(s) := max a Qτ(s, a) (16) With the discount factor, λ, set to 0.95, one can define how actions are chosen by all our PIG agents aP IG := argmax a Q−10(s, a) (17) 3 Experimental Results Here we describe simulation experiments with our two models, CRP-PIG and EB-CRP-PIG, and compare them with published approaches. The models are tested in environments defined in the literature and also in an unbounded world. First the agents were tested in a bounded maze environment taken from [12] (Figure 2). The state space in the maze consists of the |S | = 36 rooms. There are |A | = 4 actions that correspond to noisy translations in the four cardinal directions, drawn from a Dirichlet distribution. To make the task of learning harder, 30 transporters are distributed amongst the walls which lead to an absorbing state (state 29 marked by concentric rings in Figure 2). Absorbing states, such as at the bottom of gravity wells, are common in real world environments and pose serious challenges for many exploration algorithms [12]. We compare the learning strategies proposed here, CRP-PIG and EB-CRP-PIG, with the following strategies: 4 Random action: A negative control, representing the minimally directed action policy that any directed action policy should beat. Least Taken Action (LTA): A well known explorative strategy that simply takes the action it has taken least often in the current state [16]. Counter-Based Exploration (CB): Another explorative strategy from the literature that attempts to induce a uniform sampling across states [21]. DP-PIG: The strategy of [12] which applies the same objective function as described here, but is given the size of the state space and is therefore at an advantage. This agent uses a Dirichlet process (DP) with α set to 0.20, which was found empirically to be optimal for the maze environment. Unembodied: An agent which can choose any action from any state at each time step (hence unembodied) and can therefore attain the highest PIG possible at every sampling step. This strategy represents a positive control. Figure 2: Bounded Maze environment. Two transition distributions, Θsa·, are depicted, one for (s=13, a=‘left’) and one for (s=9, a=‘up’). Dark versus light gray arrows represent high versus low probabilities. For (s=13, a=‘left’), the agent moves with highest probability left into a transporter (blue line), leading it to the absorbing state 29 (blue concentric rings). With smaller probabilities the agent moves up, down or is reflected back to its current state by the wall to the right. The second transition distribution is displayed similarly. Figure 3 depicts the missing information (11) in the bounded maze for the various learning strategies over 3000 sampling steps averaged over 200 runs. All PIG-based embodied strategies exhibit a faster decrease of missing information with sampling, however, still significantly slower than the unembodied control. In this finite environment the DP-PIG agent with the correct Dirichlet prior (experimentally optimized α-parameter) has an advantage over the CRP based agents and reduced the missing information more quickly. However, the new strategies for unbounded state space still outperform the competitor agents from the literature by far. Interestingly, EB-CRP-PIG with continuously adjusted θ can reduce missing information significantly faster than CRP-PIG with fixed, experimentally optimized θ = 0.25. Figure 3: Missing Information vs. Time for EB-CRP-PIG and several other strategies in the bounded maze environment. To directly assess how efficient learning translates to the ability to harvest reward, we consider the 5state “Chain” problem [19], shown in Figure 4, a popular benchmark problem. In this environment, agents have two actions available, a and b, which cause transitions between the five states. At each time step the agent “slips” and performs the opposite action with probability pslip = 0.2. The agent receives a reward of 2 for taking action b in any state and a reward of 0 for taking action a in 5 Figure 4: Chain Environment. every state but the last, in which it receives a reward of 10. The optimal policy is to always choose action a to reach the highest reward at the end of the chain, it is used as a positive control for this experiment. We follow the protocol in previous publications and report the cumulative reward in 1000 steps, averaged over 500 runs. Our agent EB-CRP-PIG-R executes the EB-CRP-PIG strategy for S steps, then computes the best reward policy given its internal model and executes it for the remaining 1000-S steps. We found S=120 to be roughly optimal for our agent and display the results of the experiment in Table 1, taking the results of the competitor algorithms directly from the corresponding papers. The competitor algorithms define their own balance between exploitation and exploration, leading to different results. Method Reward RAM-RMAX [5] 2810 BOSS [2] 3003 exploit [15] 3078 Bayesian DP [19] 3158 ± 31 EB-CRP-PIG-R 3182 ± 25 Optimal 3658 ± 14 Table 1: Cumulative reward for 1000 steps in the chain environment. The EB-CRP-PIG-R agent is able to perform the best and significantly outperforms many of the other strategies. This result is remarkable because the EB-CRP-PIG-R agent has no prior knowledge of the state space size, unlike all the competitor models. We also note that our algorithm is extremely efficient computationally, it must approximate the optimal policy only once and then simply execute it. In comparison, the exploit strategy [15] must compute the approximation at each time step. Further, we interpret our competitive edge over BOSS to reflect a more efficient exploration strategy. Specifically, BOSS uses LTA for exploration and Figure 3 indicates that the learning performance of LTA is far worse than the performance of the PIG-based models. Figure 5: Missing Information vs. Time for EB-CRP-PIG and CRP-PIG in the unbounded maze environment. Finally, we consider an unbounded maze environment with |S | being infinite and with multiple absorbing states. Figure 5 shows the decrease of missing information (11) for the two CRP based strategies. Interestingly, like in the bounded maze the Empirical Bayes version reduces the missing information more rapidly than a CRP which has a fixed, but experimentally optimized, parameter value. What is important about this result is that EB-CRP-PIG is not only better but it requires no prior parameter tuning since θ is adjusted intrinsicially. Figure 6 shows how an EB-CRP-PIG and an LTA agent explore the environment over 6000 steps. The missing information for each state is 6 Figure 6: Unbounded Maze environment. Exploration is depicted for two different agents (a) EBCRP-PIG and (b) LTA, after 2000, 4000, and 6000 exploration steps respectively. Initially all states are white (not depicted), which represent unexplored states. Transporters (blue lines) move the agent to the closest gravity well (small blue concentric rings). The current position of the agent is indicated by the purple arrow. color coded, light yellow representing high missing information, and red representing low missing information, less than 1 bit. Note that the EB-CRP-PIG agent explores a much bigger area than the LTA agent. The two agents are also tested in a reward task in the unbounded environment for assessing whether the exploration of EB-CRP-PIG leads to efficient reward acquisition. Specifically, we assign a reward to each state equal to the Euclidian distances from the starting state. Like for the Chain problem before, we create two agents EB-CRP-PIG-R and LTA-R which each run for 1000 total steps, exploring for S=750 steps (defined previously) and then calculating their best reward policy and executing it for the remaining 250 steps. The agents are repositioned to the start state after S steps and the best reward policy is calculated. The simulation results are shown in Table 2. Clearly, the increased coverage of the EB-CRP-PIG agent also results in higher reward acquisition. Method Reward EB-CRP-PIG-R 1053 LTA-R 812 Table 2: Cumulative reward after 1000 steps in the unbounded maze environment. 7 4 Discussion To be able to learn environments whose number of states is unknown or even unbounded is crucial for applications in biology, as well as in robotics. Here we presented a principled information-based strategy for an agent to learn a model of an unknown, unbounded environment. Specifically, the proposed model uses the Chinese Restaurant Process (CRP) and a version of predicted information gain (PIG) [12], adjusted for being able to accommodate comparisons of models with different numbers of states. We evaluated our model in three different environments in order to assess its performance. In the bounded maze environment the new algorithm performed quite similarly to DP-PIG despite being at a disadvantage in terms of prior knowledge. This result suggests that agents exploring environments of unknown size can still develop accurate models of it quite rapidly. Since the new model is based on the CRP, calculating the posterior and sampling from it is easily tractable. The experiments in a simple bounded reward task, the Chain environment, were equally encouraging. Although the agent was unaware of the size of its environment, it was able to learn the states and their transition probabilities quickly and retrieved a cumulative reward that was competitive with published results. Some of the competitor strategies (exploit [15]) required to recompute the best reward policy for each step. In contrast, EB-CRP-PIG computed the best policy only once, yet, was able to outperform the exploit [15] strategy. In the unbounded maze environment, EB-CRP-PIG was able to outperform CRP-PIG even though it required no prior parameter tuning. In addition, it covered much more ground during exploration than LTA, one of the few existing competitor models able to function in unbounded environments. Specifically, the EB-CRP-PIG model evenly explored a large number of environmental states. In contrast, LTA, exhaustively explored a much smaller area limited by two nearby absorbing states. Two caveats need to be mentioned. First, although the computational complexity of the CRP is low, the complexity of the value iteration algorithm scales linearly with the number of states discovered. Thus, tractability of value iteration is an issue in EB-CRP-PIG. A possible remedy to this problem would be to only calculate value iteration for states that are reachable from the current state in the calculated time horizon. Second, the described padding procedure implicitly sets a balance between seeking to discover new state transitions versus sampling from known ones. For different goals or environments this balance may not be optimal, a future investigation of alternatives for comparing models of different sizes would be very interesting. All told, the proposed novel models overcome a major limitation of information-based learning methods, the assumption of a bounded state space of known size. Since the new models are based on the CRP, sampling is quite tractable. Interestingly, by applying Empirical Bayes for continuously updating the parameter of the CRP, we are able to build agents that can explore bounded or unbounded environments with very little prior information. For describing learning in animals, models that easily adapt to diverse environments could be crucial. Of course, other restrictictions in these models still need to be addressed, in particular, the limitation to discrete and fully observable state spaces. For example, the need to act in continuous state spaces is obviously crucial for animals and robots. Further, recent literature [7] supports that information-based learning in partially observable state spaces, like POMDPs [17], will be important to address applications in neuroscience. 5 Acknowledgements JAA was funded by NSF grant IIS-1111765. FTS was supported by the Director, Office of Science, Office of Advanced Scientific Computing Research, Applied Mathematics program of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231. The authors thank Bruno Olshausen, Tamara Broderick, and the members of the Redwood Center for Theoretical Neuroscience for their valuable input. 8 References [1] David Aldous. Exchangeability and related topics. ´Ecole d’ ´Et´e de Probabilit´es de Saint-Flour XIII1983, pages 1–198, 1985. [2] John Asmuth, Lihong Li, Michael L Littman, Ali Nouri, and David Wingate. A bayesian sampling approach to exploration in reinforcement learning. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, pages 19–26. AUAI Press, 2009. [3] Nihat Ay, Nils Bertschinger, Ralf Der, Frank G¨uttler, and Eckehard Olbrich. Predictive information and explorative behavior of autonomous robots. The European Physical Journal B, 63(3):329–339, 2008. [4] Richard Bellman. E. 1957. dynamic programming. Princeton UniversityPress. BellmanDynamic programming1957, 1957. [5] Ronen I Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for near-optimal reinforcement learning. The Journal of Machine Learning Research, 3:213–231, 2003. [6] Hugo Gimbert. Pure stationary optimal strategies in markov decision processes. In STACS 2007, pages 200–211. Springer, 2007. [7] Jacqueline Gottlieb, Pierre-Yves Oudeyer, Manuel Lopes, and Adrien Baranes. Information-seeking, curiosity, and attention: computational and neural mechanisms. Trends in cognitive sciences, 17(11):585– 593, 2013. [8] Hemant Ishwaran and Lancelot F James. Generalized weighted chinese restaurant processes for species sampling mixture models. Statistica Sinica, 13(4):1211–1236, 2003. [9] Laurent Itti and Pierre Baldi. Bayesian surprise attracts human attention. Advances in neural information processing systems, 18:547, 2006. [10] Jaeyong Lee, Fernando A Quintana, Peter M¨uller, and Lorenzo Trippa. Defining predictive probability functions for species sampling models. Statistical science: a review journal of the Institute of Mathematical Statistics, 28(2):209, 2013. [11] Daniel Y Little and Friedrich T Sommer. Learning in embodied action-perception loops through exploration. arXiv preprint arXiv:1112.1125, 2011. [12] Daniel Y Little and Friedrich T Sommer. Learning and exploration in action-perception loops. Frontiers in neural circuits, 7, 2013. [13] David JC MacKay. Information-based objective functions for active data selection. Neural computation, 4(4):590–604, 1992. [14] Jim Pitman. Exchangeable and partially exchangeable random partitions. Probability theory and related fields, 102(2):145–158, 1995. [15] Pascal Poupart, Nikos Vlassis, Jesse Hoey, and Kevin Regan. An analytic solution to discrete bayesian reinforcement learning. In Proceedings of the 23rd international conference on Machine learning, pages 697–704. ACM, 2006. [16] Mitsuo Sato, Kenichi Abe, and Hiroshi Takeda. Learning control of finite markov chains with an explicit trade-off between estimation and control. Systems, Man and Cybernetics, IEEE Transactions on, 18(5):677–684, 1988. [17] Adhiraj Somani, Nan Ye, David Hsu, and Wee Sun Lee. Despot: Online pomdp planning with regularization. In Advances in Neural Information Processing Systems, pages 1772–1780, 2013. [18] Jan Storck, Sepp Hochreiter, and J¨urgen Schmidhuber. Reinforcement driven information acquisition in non-deterministic environments. In Proceedings of the International Conference on Artificial Neural Networks, Paris, volume 2, pages 159–164. Citeseer, 1995. [19] Malcolm Strens. A bayesian framework for reinforcement learning. In ICML, pages 943–950, 2000. [20] Yi Sun, Faustino Gomez, and J¨urgen Schmidhuber. Planning to be surprised: Optimal bayesian exploration in dynamic environments. In Artificial General Intelligence, pages 41–51. Springer, 2011. [21] Sebastian B Thrun. Efficient exploration in reinforcement learning. 1992. [22] Jian Zhang, Zoubin Ghahramani, and Yiming Yang. A probabilistic model for online document clustering with application to novelty detection. In NIPS, volume 4, pages 1617–1624, 2004. 9
2014
267
5,366
Multi-Resolution Cascades for Multiclass Object Detection Mohammad Saberian Yahoo! Labs saberian@yahoo-inc.com Nuno Vasconcelos Statistical Visual Computing Laboratory University of California, San Diego nuno@ucsd.edu Abstract An algorithm for learning fast multiclass object detection cascades is introduced. It produces multi-resolution (MRes) cascades, whose early stages are binary target vs. non-target detectors that eliminate false positives, late stages multiclass classifiers that finely discriminate target classes, and middle stages have intermediate numbers of classes, determined in a data-driven manner. This MRes structure is achieved with a new structurally biased boosting algorithm (SBBoost). SBBost extends previous multiclass boosting approaches, whose boosting mechanisms are shown to implement two complementary data-driven biases: 1) the standard bias towards examples difficult to classify, and 2) a bias towards difficult classes. It is shown that structural biases can be implemented by generalizing this class-based bias, so as to encourage the desired MRes structure. This is accomplished through a generalized definition of multiclass margin, which includes a set of bias parameters. SBBoost is a boosting algorithm for maximization of this margin. It can also be interpreted as standard multiclass boosting algorithm augmented with margin thresholds or a cost-sensitive boosting algorithm with costs defined by the bias parameters. A stage adaptive bias policy is then introduced to determine bias parameters in a data driven manner. This is shown to produce MRes cascades that have high detection rate and are computationally efficient. Experiments on multiclass object detection show improved performance over previous solutions. 1 Introduction There are many learning problems where classifiers must make accurate decisions quickly. A prominent example is the problem of object detection in computer vision, where a sliding window is scanned throughout an image, generating hundreds of thousands of image sub-windows. A classifier must then decide if each sub-window contains certain target objects, ideally at video frame-rates, i.e. less than a micro second per window. The problem of simultaneous real-time detection of multiple class of objects subsumes various important applications in computer vision alone. These range from the literal detection of many objects (e.g. an automotive vision system that must detect cars, pedestrians, traffic signs), to the detection of objects at multiple semantic resolutions (e.g. a camera that can both detect faces and recognize certain users), to the detection of different aspects of the same object (e.g. by defining classes as different poses). A popular architecture for real-time object detection is the detector cascade of Figure 1-a [17]. This is implemented as a sequence of simple to complex classification stages, each of which can either reject the example x to classify or pass it to the next stage. An example that reaches the end of the cascade is classified as a target. Since targets constitute a very small portion of the space of image sub-windows, most examples can be rejected in the early cascade stages, by classifiers of very small computation. In result, the average computation per image is small, and the cascaded detector is very fast. While the design of cascades for real-time detection of a single object class has been the subject of extensive research [18, 20, 2, 15, 1, 12, 14], the simultaneous detection of multiple objects has received much less attention. 1 (a) (b) 1) 2) M) … Cascade(1 Cascade(2 Cascade(M Detector Detector DetectorC (c) ClassEstimator … scade(1) scade(2) scade(M) DetectorCa DetectorCa etectorCas D D De (d) de(all) ectorCasca Class Estimator Dete ClassEstimator … Figure 1: a) detector cascade [17], b) parallel cascade [19], c) parallel cascade with pre-estimator [5] and d) all-class cascade with post-estimator. Most solutions for multiclass cascade learning simply decompose the problem into several binary (single class) detection sub-problems. They can be grouped into two main classes. Methods in the first class, here denoted parallel cascades [19], learn a cascaded detector per object class (e.g. view), as shown in Figure 1-b, and rely on some post-processing to combine their decisions. This has two limitations. The first is the well known sub-optimality of one-vs.-all multiclass classification, since scores of independently trained detectors are not necessarily comparable [10]. Second, because there is no sharing of features across detectors, the overall classifier performs redundant computations and tends to be very slow. This has motivated work in feature sharing. Examples include JointBoost [16], which exhaustively searches for features to be shared between classes, and [11], which implicitly partitions positive examples and performs a joint search for the best partition and features. These methods have large training complexity. The complexity of the parallel architecture can also be reduced by first making a rough guess of the target class and then running only one of the binary detectors, as in Figure 1-c. We refer to these methods as parallel cascades with pre-estimator [5]. While, for some applications (e.g. where classes are object poses), it is possible to obtain a reasonable pre-estimate of the target class, pre-estimation errors are difficult to undo. Hence, this classifier must be fairly accurate. Since it must also be fast, this approach boils down to real-time multiclass classification, i.e. the original problem. [4] proposed a variant of this method, where multiple detectors are run after the pre-estimate. This improves accuracy but increases complexity. In this work, we pursue an alternative strategy, inspired by Figure 1-d. Target classes are first grouped into an abstract class of positive patches. A detector cascade is then trained to distinguish these patches from everything else. A patch identified as positive is finally fed to a multiclass classifier, for assignment to one of the target classes. In comparison to parallel cascades, this has the advantage of sharing features across all classes, eliminating redundant computation. When compared to the parallel cascade with pre-estimator, it has the advantage that the complexity of its class estimator has little weight in the overall computation, since it only processes a small percentage of the examples. This allows the use of very accurate/complex estimators. The main limitation is that the design of a cascade to detect all positive patches can be quite difficult, due to the large intraclass variability. This is, however, due to the abrupt transition between the all-class and multiclass regimes. While it is difficult to build an all-class detector with high detection and low false-positive rate, we show that this is really not needed. Rather than the abrupt transition of Figure 1-d, we propose to learn a multiclass cascade that gradually progresses from all-class to multiclass. Early stages are binary all-class detectors, aimed at eliminating sub-windows in background image regions. Intermediate stages are classifiers with intermediate numbers of classes, determined by the structure of the data itself. Late stages are multiclass classifiers of high accuracy/complexity. Since these cascades represent the set of classes at different resolutions, they are denoted multi-resolution (MRes) cascades. To learn MRes cascades, we consider a M-class classification problem and define a negative class M + 1, which contains all non-target examples. We then analyze a recent multiclass boosting algorithm, MCBoost [13], showing that its weighting mechanism has two components. The first is the standard weighting of examples by how well they are classified at each iteration. The second, and more relevant to this work, is a similar weighting of the classes according to their difficulty. MC2 Boost is shown to select the weak learner of largest margin on the reweighted training sample, under a biased definition of margin that reflects the class weights. This is a data-driven bias, based purely on classification performance, which does not take computational efficiency into account. To induce the MRes behavior, it must be complemented by a structural bias that modifies the class weighting to encourage the desired multi resolution structure. We show that this can be implemented by augmenting MCBoost with structural bias parameters that lead to a new structurally biased boosting algorithm (SBBoost). This can also be seen as a variant of boosting with tunable margin thresholds or as boosting under a cost-sensitive risk. By establishing a connection between the bias parameters and the computational complexity of cascade stages, we then derive a stage adaptive bias policy that guarantees computationally efficient MRes cascades of high detection rate. Experiments in multi-view car detection and simultaneous detection of multiple traffic signs show that the resulting classifiers are faster and more accurate than those previously available. 2 Boosting with structural biases Consider the design of a M class cascade. The M target classes are augmented with a class M + 1, the negative class, containing non-target examples. The goal is to learn a multiclass cascade detector H[h1(x), . . . , hr(x)] with r stages. This has the structure of Figure 1-a but, instead of a binary detector, each stage is a multiclass classifier hk(x) : X →{1, . . . , M + 1}. Mathematically, H[h1(x), . . . , hr(x)] =  hr(x) if hk(x) ̸= M + 1 ∀k, M + 1 if ∃k| hk(x) = M + 1. (1) We propose to learn the cascade stages with an extension of the MCBoost framework for multiclass boosting of [13]. The class labels {1, . . . , M + 1} are first translated into a set of codewords {y1, . . . , yM+1} ∈RM that form a simplex where PM+1 i=1 yi = 0. MCBoost uses the codewords to learn a M-dimensional predictor F ∗(x) = [f1(x), . . . , fM(x)] ∈RM so that      F ∗(x) = arg minF (x) R[F] = 1 n Pn i=1 M+1 X j=1 e−1 2 [⟨yzi,F (xi)⟩−⟨yj,F (xi)⟩] s.t F(x) ∈span(G), (2) where G = {gi} is a set of weak learners. This is done by iterative descent [3, 9]. At each iteration, the best update for F(x) is identified as g∗ k = arg max g∈G −δR[F; g], (3) with −δR[F; g] = −∂R[f t + ϵg] ∂ϵ ϵ=0 = 1 2 n X i=1 M+1 X k=1 ⟨g(xi), yzi −yk⟩e−1 2 ⟨F (xi),yzi−yk⟩. (4) The optimal step size along this weak learner direction is α∗= arg min α∈R R[F(x) + αg∗(x)], (5) and the predictor is updated according to F(x) = F(x) + α∗g∗(x). The final decision rule is h(x) = arg max k=1...M+1⟨yk, F ∗(xi)⟩. (6) We next provide an analysis of the updates of (3) which inspires the design of MRes cascades. Weak learner selection: the multiclass margin of predictor F(x) for an example x from class z is M(z, F(x)) = ⟨F(x), yz⟩−max j̸=z ⟨F(x), yj⟩= min j̸=z ⟨F(x), yz −yj⟩, (7) where ⟨F(x), yz −yj⟩is the margin component of F(x) with respect to class j. Rewriting (3) as −δR[F; g] = 1 2 n X i=1 M+1 X k=1|k̸=zi ⟨g(xi), yzi −yk⟩e−1 2 ⟨F (xi),yzi−yk⟩ (8) = 1 2 n X i=1 w(xi)⟨g(xi), M+1 X k=1|k̸=zi ρk(xi)(yzi −yk)⟩, (9) 3 where w(xi) = M X k=1|k̸=zi e−1 2 ⟨F (xi),yzi−yk⟩, ρk(xi) = e−1 2 ⟨F (xi),yzi−yk⟩ PM k=1|k̸=zi e−1 2 ⟨F (xi),yzi−yk⟩. (10) enables the interpretation of MCBoost as a generalization of AdaBoost. From (10), an example xi has large weight w(xi) if F(xi) has at least one large negative margin component, namely ⟨F(xi), yz −y⟩< 0 for y = arg min yj̸=yz⟨F(xi), yz −yj⟩. (11) In this case, it follows from (6) that xi is incorrectly classified into the class of codeword y. In summary, as in AdaBoost, the weighting mechanism of (9) emphasizes examples incorrectly classified by the current predictor F(x). However, in the multiclass setting, this is only part of the weighting mechanism, since the terms ρk(xi) of (9)-(10) are coefficients of a soft-min operator over margin components ⟨F(xi), yzi −yk⟩. Assuming the soft-min closely approximates the min, (9) becomes −δR[F; g] ≈ n X i=1 w(xi)MF (yzi, g(xi)), (12) where MF (z, g(x)) = ⟨g(x), yz −y⟩. (13) and y is the codeword of (11). This is the multiclass margin of weak learner g(x) under an alternative margin definition MF (z, g(x)). Comparing to the original definition of (7), which can be written as M(z, g(x)) = 1 2⟨g(x), yz −y⟩ where y = arg min yj̸=yz⟨g(x), yz −yj⟩, (14) MF (yz, g(x)) restricts the margin of g(x) to the worst case codeword y for the current predictor F(x). The strength of this restriction is determined by the soft-min operator. If < F(x), yz −y > is much smaller than < F(x), yz −yj > ∀yj ̸= y, ρk(x) closely approximates the minimum operator and (12) is identical to (9). Otherwise, the remaining codewords also contribute to (9). In summary, ρk(xi) is a set of class weights that emphasizes classes of small margin for F(x). The inner product of (9) is the margin of g(x) after this class reweighting. Overall, MCBoost weights introduce a bias towards difficult examples (weights w) and difficult classes (margin MF ). Structural biases: The core idea of cascade design is to bias the learning algorithm towards computationally efficient classifier architectures. This is not a data driven bias, as in the previous section, but a structural bias, akin to the use of a prior (in Bayesian learning) to guarantee that a graphical model has a certain structure. For example, because classifier speed depends critically on the ability to quickly eliminate negative examples, the initial cascade stages should effectively behave as a binary classifier (all classes vs. negative). This implies that the learning algorithm should be biased towards predictors of large margin component ⟨F(x), yz −yM+1⟩with respect to the negative class j = M + 1. We propose to implement this structural bias by forcing yM+1 to be the dominant codeword in the soft-min weighting of (10). This is achieved by rescaling the soft-min coefficients, i.e. by using an alternative soft-min operator ρα k(xi) ∝αke−1 2 ⟨F (xi),yzi−yk⟩, where αk = τ ∈[0, 1] for k ̸= M + 1 and αM+1 = 1. The parameter τ controls the strength of the structural bias. When τ = 0, ρα k(xi) assigns all weight to codeword yM+1 and the structural bias dominates. For 0 < τ < 1 the bias of ρα k(xi) varies between the data driven bias of ρk(xi) and the structural bias towards yM+1. When τ = 1, ρα k(xi) = ρk(xi), the bias is purely data driven, as in MCBoost. More generally, we can define biases towards any classes (beyond j = M + 1) by allowing different αk ∈[0, 1] for different k ̸= M + 1. From (10), this is equivalent to redefining the margin components as ⟨F(xi), yzi −yk⟩−2 log αk. Finally the biases can be adaptive with respect to the class of xi, by redefining the margin components as ⟨F(xi), yzi −yk⟩−δzi,k. Under this structurally biased margin, the approximate boosting updates of (12) become −δR[F; g] ≈ n X i=1 w(xi)Mc F (yzi, g(xi)), (15) where Mc F (z, g(x)) = ⟨g(x), yz −ˆy⟩−δzi,k ˆy = arg min yj̸=yz⟨F(x), yz −yj⟩−δzi,k. (16) 4 This is, in turn, equivalent to the approximation of (9) by (12) under the definition of margin as Mc(z, F(x)) = min j̸=z ⟨F(x), yz −yj⟩−δz,j, (17) and boosting weights wc(xi) = M X k=1|k̸=zi e−1 2 [⟨F (xi),yzi−yk⟩−δzi,k], ρc k(xi) = e−1 2 [⟨F (xi),yzi−yk⟩−δzi,k] PM l=1|k̸=zi e−1 2 [⟨F (xi),yzi−yl⟩−δzi,l] . (18) We denote the boosting algorithm with these weights as structurally biased boosting (SBBoost). Alternative interpretations: the parameters δzi,k, which control the amount of structural bias, can be seen as thresholds on the margin components. For binary classification, where M = 1, y1 = 1, y2 = −1 and F(x) is scalar, (7) reduces to the standard margin M(z, F(x)) = yzF(x), (10) to the standard boosting weights w(xi) = e−yziF (xi) and ρk(xi) = 1, k ∈{1, 2}. In this case, MCBoost is identical to AdaBoost. SBBoost can thus been seen as an extension of AdaBoost, where the margin is redefined to include thresholds δzi according to Mc(z, F(x)) = yzF(x) −δz. By controlling the thresholds it is possible to bias the learned classifier towards accepting or rejecting more examples. For multiclass classification, a larger δz,j encodes a larger bias against assigning examples from class z to class j. This behavior is frequently denoted as cost-sensitive classification. While it can be achieved by training a classifier with AdaBoost (or MCBoost) and adding thresholds to the final decision rule, this is suboptimal since it corresponds to using a classification boundary on which the predictor F(x) was not trained [8]. Due to Boosting’s weighting mechanism (which emphasizes a small neighborhood of the classification boundary), classification accuracy can be quite poor when the thresholds are introduced a-posteriori. Significantly superior performance is achieved when the thresholds are accounted for by the learning algorithm, as is the case for SBBoost. Boosting algorithms with this property are usually denoted as cost-sensitive and derived by introducing a set of classification costs in the risk of (2). It can be shown, through a derivation identical to that of Section 2, that SBBoost is a cost-sensitive boosting algorithm with respect to the risk R c[F] = 1 n n X i=1 M+1 X j=1 Cz,je−1 2 ⟨yzi,F (xi)⟩−⟨yj,F (xi)⟩ (19) with δz,j = 1 2 log Cz,j. Under this interpretation, the bias parameters δz,j are the log-costs of assigning examples of class z to class j. For binary classification, SBBoost reduces to the costsensitive boosting algorithm of [18]. 3 Boosting MRes cascades In this section we discuss a strategy for the selection of bias parameters δi,j that encourage multiresolution behavior. We start by noting that some biases must be shared by all stages. For example, while a cascade cannot recover a rejected target, the false-positives of a stage can be rejected by its successors. Hence, the learning of each stage must enforce a bias against target rejections, at the cost of increased false-positive rates. This high detection rate problem has been the subject of extensive research in binary cascade learning, where a bias against assigning examples to the negative class is commonly used [18, 8]. The natural multiclass extension is to use much larger thresholds for the margin components with respect to the negative class than the others, i.e. δk,M+1 ≫δM+1,k ∀k = 1, . . . , M. (20) We implement this bias with the thresholds δk,M+1 = log β δM+1,k = log(1 −β) β ∈[0.5, 1]. (21) The value of β is determined by the target detection rate of the cascade. For each boosting iteration, we set β = 0.5 and measure the detection rate of the cascade. If this falls below the target rate, β is increased to (β + 1)/2. The process is repeated until the desired rate is achieved. There is also a need for structural biases that vary with the cascade stage. For example, the computational complexity ct+1 of stage t + 1 is proportional to the product of the per-example complexity 5 ϵt+1 of the classifier (e.g. number of weak learners) and the number of image sub-windows that it evaluates. Since the latter is dominated by the false positives rate of the previous cascade stages, fpt, it follows that ct+1 ∝fptϵt+1. Since fpt decreases with t, an efficient cascade must have early stages of low complexity and more complicated detectors in later stages. This suggests the use of stages that gradually progress from binary to multiclass. Early stages eliminate false-positives, late stages are accurate multiclass classifiers. In between, the cascade stages should detect intermediate numbers of classes, according to the structure of the data. Cascades with this structure represent the set of classes at different resolutions and are denoted Multi-Resolution (MRes) cascades. To encourage the MRes structure, we propose the following stage adaptive bias policy δt k,l =    γt = log F P fpt ∀k, l ∈{1, . . . , M} log β for k ∈{1, . . . , M} and l = M + 1 log(1 −β) for k = M + 1 and l ∈{1, . . . , M}, (22) where FP is the target false-positive rate for the whole cascade. This policy complements the stageindependent bias towards high detection rate (due to β) with a stage dependent bias δt k,l = γt, ∀k, l ∈ {1, . . . , M}. This has the following consequences. First, since β ≥0.5 and fpt ≫2FP when t is small, it follows that γt ≪δk,M+1 in the early stages. Hence, for these stages, there is a much larger bias against rejection of examples from the target classes {1, . . . , M}, than for the differentiation of these classes. In result, the classifier ht(x) is an all-class detector, as in Figure 1-d. Second, for large t, where fpt approaches FP, γt decreases to zero. In this case, there is no bias against class differentiation and the learning algorithm places less emphasis on improvements of false-positive rate (δk,M+1 ≈γt) and more emphasis on target differentiation. Like MCBoost (which has no biases), it will focus in the precise assignment of targets to their individual classes. In result, for late cascade stages, ht(x) is a multiclass classifier, similar to the class post-estimator of Figure 1d. Third, for intermediate t, it follows from (19) and eγt ∝ϵt+1/ct+1 that the learned cascade stages are optimal under a risk with costs Ct z,j ∝1/νt+1, for z, j ∈{1, . . . , M} where νt = ct/ϵt. Note that νt is a measure of how much the computational cost per example is magnified by stage t, therefore this risk favors cascades with stages of low complexity magnification. In result, weak learners are preferentially added to the stages where their addition produces the smallest overall computational increase. This makes the resulting cascades computationally efficient, since 1) stages of high complexity magnification have small per example complexity ϵt and 2) classifiers of large per example complexity are pushed to the stages of low complexity magnification. Since complexity magnification is proportional to false-positive rate (ct/ϵt ∝fpt−1), multiclass decisions (higher ϵt) are pushed to the latter cascade stages. This push is data driven and gradual and thus the cascade gradually transitions from binary to multiclass, becoming a soft version of the detector of Figure 1-d. 4 Experiments SBBoost was evaluated on the tasks of multi-view car detection, and multiple traffic sign detection. The resulting MRes cascades were compared to the detectors of Figure 1. Since it has been established in the literature that the all-class detector with post-estimation has poor performance [5], the comparison was limited to parallel cascades [19] and parallel cascades with pre-estimation [5]. All binary cascade detectors were learned with a combination of the ECBoost algorithm of [14] and the cost-sensitive Boosting method of [18]. Following [2], all cascaded detectors used integral channel features and trees of depth two as weak learners. The training parameters were set to η = 0.02, D = 0.95, FP = 10−6 and the training set was bootstrapped whenever the false positive rate dropped below 90%. Bootstrapping also produced an estimate of the real false positive rate fpt, used to define the biases δt k,l. As in [5], the detector cascade with pre-class estimation used tree classifiers for pre-estimation. In the remainder of this section, detection rate is defined as the percentage of target examples, from all views or target classes, that were detected. Detector accuracy is the percentage of the target examples that were detected and assigned to the correct class. Finally, detector complexity is the average number of tree node classifiers evaluated per example. Multi-view Car Detection: To train a multi-view car detector, we collected images of 128 Frontal, 100 Rear, 103 Left, and 103 Right car views. These were resized to 41 × 70 pixels. The multi-view car detector was evaluated on the USC car dataset [6], which consists of 197 color images of size 480 × 640, containing 410 instances of cars in different views. 6 a) 0 50 100 150 0.2 0.4 0.6 0.8 1 number of false positives detection rate parallel cascade P.C. + pre−estimate MRes−Cascade b) 0 50 100 150 200 220 0.65 0.7 0.75 0.8 0.85 0.9 number of false positives detection rate parallel cascade P.C. + pre−estimate MRes−Cascade Figure 2: ROCs for a) multi-view car detection and b) traffic sign detection. Table 1: Multi-view car detection performance at 100 false positives. car detection traffic sign detection Method complexity accuracy det. rate complexity accuracy det. rate Parallel Cascades [19] 59.94 0.35 0.72 10.08 0.78 0.78 P.C. + Pre-estimation [5] 15.15 + 6 0.35 0.70 2.32 + 4 0.78 0.78 MRes cascade 16.40 0.58 0.88 5.56 0.84 0.84 The ROCs of the various cascades are shown in Figure 2-a. Their detection rate, accuracy and complexity are reported in Table 1. The complexity of parallel cascades with pre-processing is broken up into the complexity of the cascade plus the complexity of the pre-estimator. Figure 2a, shows that the MRes cascade has significantly better ROC performance than any of the other detectors. This is partially due to the fact that the detector is learned jointly across classes and thus has access to more training examples. In result, there is less over-fitting and better generalization. Furthermore, as shown in Table 1, the MRes cascade is much faster. The 3.5-fold reduction of complexity over the parallel cascade suggests that MRes cascades share features very efficiently across classes. The MRes cascade also detects 16% more cars and assigns 23% more cars to the true class. The parallel cascade with pre-processing was slightly less accurate than the parallel cascade but three times as fast. Its accuracy is still 23% lower than that of the MRes cascade and the complexity of the pre-estimator makes it 20% slower. Figure 3 shows the evolution of the detection rate, false positive rate, and accuracy of the MRes cascade with learning iterations. Note that the detection rate is above the specified D = 95% throughout the learning process. This is due to the updating of the β parameter of (22). It can also be seen that, while the false positive rate decreases gradually, accuracy remains low for many iterations. This shows that the early stages of the MRes cascade place more emphasis on rejecting negative examples (lowering the false positive rate) than making precise view assignments for the car examples. This reflects the structural biases imposed by the policy of (22). Early on, confusion between classes has little cost. However, as the cascade grows and its false positive rate fpt decreases, the detector starts to distinguish different car views. This happens soon after iteration 100, where there is a significant jump in accuracy. Note, however, that the false-positive rate is still 10−4 at this point. In the remaining iterations, the learning algorithm continues to improve this rate, but also “goes to work” on increasing accuracy. Eventually, the false-positive rate flattens and the SBBoost behaves as a multiclass boosting algorithm. Overall, the MRes cascade behaves as a soft version of the all-class detector cascade with post-estimation, shown in Figure 1-d. Traffic Sign Detection: For the detection of traffic signs, we extracted 1, 159 training examples from the first set of the Summer traffic sign dataset [7]. This produced 660 examples of “priority road”, 145 of “pedestrian crossing”, 232 of “give way” and 122 of “no stopping no standing” signs. For training, these images were resized to 40×40. For testing, we used 357 images from the second set of the Summer dataset which contained at least one visible instance of the traffic signs, with more than 35 pixels of height. The performance of different traffic sign detectors is reported in Figure 2-b) and Table 1. Again, the MRes cascade was faster and more accurate than the others. In particular, it was faster than other methods, while detecting/recognizing 6% more traffic signs. We next trained a MRes cascade for detection of the 17 traffic signs shown in the left end of Figure 4. The figure also shows the evolution of MRes cascade decisions for 20 examples from each of the different classes. Each row of color pixels illustrates the evolution of one example. The color of the kth pixel in a row indicates the decision made by the cascade after k weak learners. The traffic signs and corresponding colors are shown in the left of the figure. Note that the early cascade stages only reject a few examples, assigning most of the remaining to the first class. This assures 7 50 100 150 0.94 0.95 0.96 0.97 0.98 0.99 1 number of iterations detection rate 50 100 150 10 −4 10 −3 10 −2 10 −1 10 0 number of iterations false positive rate 50 100 150 0.2 0.4 0.6 0.8 1 number of iterations accuracy Figure 3: MRes cascade detection rate (left), false positive rate (center), and accuracy (right) during learning. Number of evaluated weak learners 0 20 40 60 80 Figure 4: Evolution of MRes cascade decisions for 20 randomly selected examples of 17 traffic sign classes. Each row illustrates the evolution of the label assigned to one example. The ground-truth traffic sign classes and corresponding label colors are shown on the left. a high detection rate but very low accuracy. However, as more weak learners are evaluated, the detector starts to create some intermediate categories. For example, after 20 weak learners, all traffic signs containing red and yellow colors are assigned to the “give way” class. Evaluating more weak learners further separates these classes. Eventually, almost all examples are assigned to the correct class (right side of the picture). This shows that besides being a soft version of the all-class detector cascade, the MRes cascade automatically creates an internal class taxonomy. Finally, although we have not produced detection ground truth for this experiment, we have empirically observed that the final 17-traffic sign MRes cascade is accurate and has low complexity (5.15). This make it possible to use the detector in real-time on low complexity devices, such as smart-phones. A video illustrating the detection results is available in the supplementary material. 5 Conclusion In this work, we have made various contributions to multiclass boosting with structural constraints and cascaded detector design. First, we proposed that a multiclass detector cascade should have MRes structure, where early stages are binary target vs. non-target detectors and late stages perform fine target discrimination. Learning such cascades requires the addition of a structural bias to the learning algorithm. Second, to incorporate such biases in boosting, we analyzed the recent MCBoost algorithm, showing that it implements two complementary weighting mechanisms. The first is the standard weighting of examples by difficulty of classification. The second is a redefinition of the margin so as to weight more heavily the most difficult classes. This class reweighting was interpreted as a data driven class bias, aimed at optimizing classification performance. This suggested a natural way to add structural biases, by modifying class weights so as to favor the desired MRes structure. Third, we showed that such biases can be implemented through the addition of a set of thresholds, the bias parameters, to the definition of multiclass margin. This was, in turn, shown identical to a cost-sensitive multiclass boosting algorithm, using bias parameters as log-costs of mis-classifying examples between pairs of classes. Fourth, we introduced a stage adaptive policy for the determination of bias parameters, which was shown to enforce a bias towards cascade stages of 1) high detection rate, and 2) MRes structure. Cascades designed under this policy were shown to have stages that progress from binary to multiclass in a gradual manner that is data-driven and computationally efficient. Finally, these properties were illustrated in fast multiclass object detection experiments involving multi-view car detection and detection of multiple traffic signs. These experiments showed that MRes cascades are faster and more accurate than previous solutions. 8 References [1] L. Bourdev and J. Brandt. Robust object detection via soft cascade. In CVPR, pages 236–243, 2005. [2] P. Dollar, Z. Tu, P. Perona, and S. Belongie. Integral channel features. In BMVC, 2009. [3] J. H. Friedman. Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29:1189–1232, 1999. [4] C. Huang, H. Ai, Y. Li, and S. Lao. High-performance rotation invariant multiview face detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(4):671–686, 2007. [5] M. Jones and P. Viola. Fast multi-view face detection. In Proc. of Computer Vision and Pattern Recognition, 2003. [6] C. Kuo and R. Nevatia. Robust multi-view car detection using unsupervised sub-categorization. In Workshop on Applications of Computer Vision (WACV), pages 1–8, 2009. [7] 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. [8] H. Masnadi-Shirazi and N. Vasconcelos. Cost-sensitive boosting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33:294 –309, 2011. [9] L. Mason, J. Baxter, P. Bartlett, and M. Frean. Boosting algorithms as gradient descent. In NIPS, 2000. [10] D. Mease and A. Wyner. Evidence contrary to the statistical view of boosting. Journal of Machine Learning Research, 9:131–156, June 2008. [11] X. Perrotton, M. Sturzel, and M. Roux. Implicit hierarchical boosting for multi-view object detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 958–965, 2010. [12] M. Pham, H. V-D.D., and T. Cham. Detection with multi-exit asymmetric boosting. In CVPR, pages 1 –8, 2008. [13] M. Saberian and N. Vasconcelos. Multiclass boosting: Theory and algorithms. In NIPS, 2011. [14] M. Saberian and N. Vasconcelos. Learning optimal embedded cascades. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 32005 –2018, 2012. [15] J. sochman J. Matas. Waldboost - learning for time constrained sequential detection. In CVPR, pages 150–157, 2005. [16] A. Torralba, K. Murphy, and W. Freeman. Sharing visual features for multiclass and multiview object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(5):854–869, 2007. [17] P. Viola and M. Jones. Robust real-time object detection. Workshop on Statistical and Computational Theories of Vision, 2001. [18] P. Viola and M. Jones. Fast and robust classification using asymmetric adaboost and a detector cascade. In NIPS, pages 1311–1318, 2002. [19] B. Wu, H. Ai, C. Huang, and S. Lao. Fast rotation invariant multi-view face detection based on real adaboost. In IEEE International Conference on Automatic Face and Gesture Recognition, pages 79–84, 2004. [20] Q. Zhu, S. Avidan, M. Yeh, , and K. Cheng. Fast human detection using a cascade of histograms of oriented gradients. In CVPR, pages 1491–1498, 2006. 9
2014
268
5,367
Generalized Dantzig Selector: Application to the k-support norm Soumyadeep Chatterjee∗ Sheng Chen∗ Arindam Banerjee Dept. of Computer Science & Engg. University of Minnesota, Twin Cities {chatter,shengc,banerjee}@cs.umn.edu Abstract We propose a Generalized Dantzig Selector (GDS) for linear models, in which any norm encoding the parameter structure can be leveraged for estimation. We investigate both computational and statistical aspects of the GDS. Based on conjugate proximal operator, a flexible inexact ADMM framework is designed for solving GDS. Thereafter, non-asymptotic high-probability bounds are established on the estimation error, which rely on Gaussian widths of the unit norm ball and the error set. Further, we consider a non-trivial example of the GDS using k-support norm. We derive an efficient method to compute the proximal operator for k-support norm since existing methods are inapplicable in this setting. For statistical analysis, we provide upper bounds for the Gaussian widths needed in the GDS analysis, yielding the first statistical recovery guarantee for estimation with the k-support norm. The experimental results confirm our theoretical analysis. 1 Introduction The Dantzig Selector (DS) [3, 5] provides an alternative to regularized regression approaches such as Lasso [19, 22] for sparse estimation. While DS does not consider a regularized maximum likelihood approach, [3] has established clear similarities between the estimates from DS and Lasso. While norm regularized regression approaches have been generalized to more general norms [14, 2], the literature on DS has primarily focused on the sparse L1 norm case, with a few notable exceptions which have considered extensions to sparse group-structured norms [11]. In this paper, we consider linear models of the form y = Xθ∗+ w, where y ∈Rn is a set of observations, X ∈Rn×p is a design matrix with i.i.d. standard Gaussian entries, and w ∈Rn is i.i.d. standard Gaussian noise. For any given norm R(·), the parameter θ∗is assumed to be structured in terms of having a low value of R(θ∗). For this setting, we propose the following Generalized Dantzig Selector (GDS) for parameter estimation: ˆθ = argmin θ∈Rp R(θ) s.t. R∗! XT (y −Xθ) " ≤λp , (1) where R∗(·) is the dual norm of R(·), and λp is a suitable constant. If R(·) is the L1 norm, (1) reduces to standard DS [5]. A key novel aspect of GDS is that the constraint is in terms of the dual norm R∗(·) of the original structure inducing norm R(·). It is instructive to contrast GDS with the recently proposed atomic norm based estimation framework [6] which, unlike GDS, considers constraints based on the L2 norm of the error ∥y −Xθ∥2. In this paper, we consider both computational and statistical aspects of the GDS. For the L1-norm Dantzig selector, [5] proposed a primal-dual interior point method since the optimization is a linear program. DASSO and its generalization proposed in [10, 9] focused on homotopy methods, which ∗Both authors contributed equally. 1 provide a piecewise linear solution path through a sequential simplex-like algorithm. However, none of the algorithms above can be immediately extended to our general formulation. In recent work, the Alternating Direction Method of Multipliers (ADMM) has been applied to the L1-norm Dantzig selection problem [12, 21], and the linearized version in [21] proved to be efficient. Motivated by such results for DS, we propose a general inexact ADMM [20] framework for GDS where the primal update steps, interestingly, turn out respectively to be proximal updates involving R(θ) and its convex conjugate, the indicator of R∗(x) ≤λp. As a result, by Moreau decomposition, it suffices to develop efficient proximal update for either R(θ) or its conjugate. On the statistical side, we establish non-asymptotic high-probability bounds on the estimation error ∥ˆθ −θ∗∥2. Interestingly, the bound depends on the Gaussian width of the unit norm ball of R(·) as well as the Gaussian width of intersection of error cone and unit sphere [6, 16]. As a non-trivial example of the GDS framework, we consider estimation using the recently proposed k-support norm [1, 13]. We show that proximal operators for k-support norm can be efficiently computed in O(p log p + log k log(p −k)), and hence the estimation can be done efficiently. Note that existing work [1, 13] on k-support norm has focused on the proximal operator for the square of the k-support norm, which is not directly applicable in our setting. On the statistical side, we provide upper bounds for the Gaussian widths of the unit norm ball and the error cone as needed in the GDS framework, yielding the first statistical recovery guarantee for estimation with the k-support norm. The rest of the paper is organized as follows: We establish general optimization and statistical recovery results for GDS for any norm in Section 2. In Section 3, we present efficient algorithms and estimation error bounds for the k-support norm. We present experimental results in Section 4 and conclude in Section 5. All technical analysis and proofs can be found in [7]. 2 General Optimization and Statistical Recovery Guarantees The problem in (1) is a convex program, and a suitable choice of λp ensures that the feasible set is not empty. We start the section with an inexact ADMM framework for solving problems of the form (1), and then present bounds on the estimation error establishing statistical consistency of GDS. 2.1 General Optimization Framework using Inexact ADMM For convenience, we temporarily drop the subscript p of λp. We let A = XT X, b = XT y, and define the set Cλ = {v : R∗(v) ≤λ}. The optimization problem is equivalent to min θ,v R(θ) s.t. b −Aθ = v, v ∈Cλ . (2) Due to the nonsmoothness of both R and R∗, solving (2) can be quite challenging and a generally applicable algorithm is Alternating Direction Method of Multipliers (ADMM) [4]. The augmented Lagrangian function for (2) is given as LR(θ, v, z) = R(θ) + ⟨z, Aθ + v −b⟩+ ρ 2||Aθ + v −b||2 2 , (3) where z is the Lagrange multiplier and ρ controls the penalty introduced by the quadratic term. The iterative updates of the variables (θ, v, z) in standard ADMM are given by θk+1 ←argmin θ LR(θ, vk, zk) , (4) vk+1 ←argmin v∈Cλ LR(θk+1, v, zk) , (5) zk+1 ←zk + ρ(Aθk+1 + vk+1 −b) . (6) Note that update (4) amounts to a norm regularized least squares problem for θ, which can be computationally expensive. Thus we use an inexact update for θ instead, which can alleviate the computational cost and lead to a quite simple algorithm. Inspired by [21, 20], we consider a simpler subproblem for the θ-update which minimizes #Lk R(θ, vk, zk) = R(θ) + ⟨zk, Aθ + vk −b⟩+ ρ 2 $%%Aθk + vk −b %%2 2+ 2 & θ −θk, AT (Aθk + vk −b) ' + µ 2 %%θ −θk%%2 2 ( , (7) 2 Algorithm 1 ADMM for Generalized Dantzig Selector Input: A = XT X, b = XT y, ρ, µ Output: Optimal ˆθ of (1) 1: Initialize (θ, v, z) 2: while not converged do 3: θk+1 ←prox 2R ρµ ! θk −2 µAT (Aθk + vk −b + zk ρ ) " 4: vk+1 ←prox Cλ ! b −Aθk+1 −zk ρ " 5: zk+1 ←zk + ρ(Aθk+1 + vk+1 −b) 6: end while where µ is a user-defined parameter. #Lk R(θ, vk, zk) can be viewed as an approximation of LR(θ, vk, zk) with the quadratic term linearized at θk. Then the update (4) is replaced by θk+1 ←argmin θ #Lk R(θ, vk, zk) = argmin θ )2R(θ) ρµ + 1 2 %%%θ − ! θk −2 µAT (Aθk + vk −b + zk ρ ) "%%% 2 2 * . (8) Similarly the update of v in (5) can be recast as vk+1 ←argmin v∈Cλ LR(θk+1, v, zk) = argmin v∈Cλ 1 2 %%v −(b −Aθk+1 −zk ρ ) %%2 2 . (9) In fact, the updates of both θ and v are to compute certain proximal operators [15]. In general, the proximal operator proxh(·) of a closed proper convex function h : Rp →R ∪{+∞} is defined as proxh(x) = argmin w∈Rp +1 2∥w −x∥2 2 + h(w) , . Hence it is easy to see that (8) and (9) correspond to prox 2R ρµ (·) and prox Cλ (·), respectively, where Cλ(·) is the indicator function of set Cλ given by Cλ(x) = ) 0 if x ∈Cλ +∞ if otherwise . In Algorithm 1, we provide our general ADMM for the GDS. For the ADMM to work, we need two subroutines that can efficiently compute the proximal operators for the functions in Line 3 and 4 respectively. The simplicity of the proposed approach stems from the fact that we in fact need only one subroutine, for any one of the functions, since the functions are conjugates of each other. Proposition 1 Given β > 0 and a norm R(·), the two functions, f(x) = βR(x) and g(x) = Cβ(x) are convex conjugate to each other, thus giving the following identity, x = proxf(x) + proxg(x) . (10) Proof: The Proposition 1 simply follows from the definition of convex conjugate and dual norm, and (10) is just Moreau decomposition provided in [15]. The decomposition enables conversion of the two types of proximal operator to each other at negligible cost (i.e., vector subtraction). Thus we have the flexibility in Algorithm 1 to focus on the proximal operator that is efficiently computable, and the other can be simply obtained through (10). Remark on convergence: Note that Algorithm 1 is a special case of inexact Bregman ADMM proposed in [20], which matches the case of linearizing quadratic penalty term by using Bϕ′ θ(θ, θk) = 1 2∥θ −θk∥2 2 as Bregman divergence. In order to converge, the algorithm requires µ 2 to be larger than the spectral radius of AT A, and the convergence rate is O(1/T ) according to Theorem 2 in [20]. 3 2.2 Statistical Recovery for Generalized Dantzig Selector Our goal is to provide non-asymptotic bounds on ∥ˆθ −θ∗∥2 between the true parameter θ∗and the minimizer ˆθ of (1). Let the error vector be defined as ˆ∆= ˆθ −θ∗. For any set Ω⊆Rp, we would measure the size of this set using its Gaussian width [17, 6], which is defined as ω(Ω) = Eg [supz∈Ω⟨g, z⟩] , where g is a vector of i.i.d. standard Gaussian entries. We also consider the error cone TR(θ∗), generated by the set of possible error vectors ∆and containing ˆ∆, defined as TR(θ∗) := cone{∆∈Rp : R(θ∗+ ∆) ≤R(θ∗)} . (11) Note that this set contains a restricted set of directions and does not in general span the entire space of Rp. With these definitions, we obtain our main result. Theorem 1 Suppose that both design matrix X and noise w consists of i.i.d. Gaussian entries with zero mean variance 1 and X has normalized columns, i.e. ∥X(j)∥2 = 1, j = 1, . . . , p. If we solve the problem (1) with λp ≥cE R∗(XT w) . , (12) where c > 1 is a constant, then, with probability at least (1 −η1 exp(−η2n)), we have ∥ˆθ −θ∗∥2 ≤ 4 / R(θ∗)λp (ℓn −ω(TR(θ∗) ∩Sp−1)) , (13) where ω(TR(θ∗)∩Sp−1) is the Gaussian width of the intersection of the error cone TR(θ∗) and the unit spherical shell Sp−1, and ℓn is the expected length of a length n i.i.d. standard Gaussian vector with n √n+1 < ℓn < √n, and η1, η2 > 0 are constants. Remark: The choice of λp is also intimately connected to the notion of Gaussian width. Note that for X with unit length columns, XT w = z is an i.i.d. standard Gaussian vector. Therefore the right hand side of (12) can be written as E R∗(XT w) . = E 0 sup u: R(u)≤1 ⟨u, z⟩ 1 = ω ({u : R(u) ≤1}) , (14) which is the Gaussian width of the unit ball of the norm R(·). Example: L1-norm Dantzig Selector When R(·) is chosen to be L1 norm, the dual norm is the L∞norm, and (1) is reduced to the standard DS, given by ˆθ = argmin θ∈Rp ∥θ∥1 s.t. ∥XT (y −Xθ)∥∞≤λ . (15) We know that proxβ∥·∥1(·) is given by the elementwise soft-thresholding operation proxβ∥·∥1(x) . i = sign(xi) · max(0, |xi| −β) . (16) Based on Proposition 1, the ADMM updates in Algorithm 1 can be instantiated as θk+1 ←prox 2∥·∥1 ρµ ! θk −2 µAT (Aθk + vk −u + zk ρ ) " , vk+1 ←(u −Aθk+1 −zk ρ ) −proxλ∥·∥1 ! u −Aθk+1 −zk ρ " , zk+1 ←zk + ρ(Aθk+1 + vk+1 −u) , where the update of v leverages the decomposition (10). Similar updates were used in [21] for L1-norm Dantzig selector. For statistical recovery, we assume that θ∗is s-sparse, i.e., contains s non-zero entries, and that ∥θ∗∥2 = 1, so that ∥θ∗∥1 ≤s. It was shown in [6] that the Gaussian width of the set (TL1(θ∗) ∩ Sp−1) is upper bounded as ω(TL1(θ∗)∩Sp−1)2 ≤2s log ! p s " + 5 4s. Also note that E R∗(XT w) . = 4 E[∥XT w∥∞] ≤log p, since XT w is a vector of i.i.d. standard Gaussian entries [5]. Therefore, if we solve (15) with λp = 2 log p, then ∥ˆθ −θ∗∥2 ≤ / 32∥θ∗∥1 log p $ ℓn − 2 2s log ! p s " + 5 4s ( = O 34 s log p n 5 (17) with high probability, which agrees with known results for DS [3, 5]. 3 Dantzig Selection with k-support norm We first introduce some notations. Given any θ ∈Rp, let |θ| denote its absolute-valued counterpart and θ↓denote the permutation of θ with its elements arranged in decreasing order. In previous work [1, 13], the k-support norm has been defined as ∥θ∥sp k = min ⎧ ⎨ ⎩ 9 I∈G(k) ∥vI∥2 : supp(vI) ⊆I, 9 I∈G(k) vI = θ ⎫ ⎬ ⎭, (18) where G(k) denotes the set of subsets of {1, . . ., p} of cardinality at most k. The unit ball of this norm is the set Ck = conv {θ ∈Rp : ∥θ∥0 ≤k, ∥θ∥2 ≤1} . The dual norm of the k-support norm is given by ∥θ∥sp∗ k = max + ∥θG∥2 : G ∈G(k), = 3 k 9 i=1 |θ|↓2 i 5 1 2 . (19) Note that k = 1 gives the L1 norm and its dual norm is L∞norm. The k-support norm was proposed in order to overcome some of the empirical shortcomings of the elastic net [23] and the (group)-sparse regularizers. It was shown in [1] to behave similarly as the elastic net in the sense that the unit norm ball of the k-support norm is within a constant factor of √ 2 of the unit elastic net ball. Although multiple papers have reported good empirical performance of the k-support norm on selecting correlated features, where L1 regularization fails, there exists no statistical analysis of the k-support norm. Besides, current computational methods consider square of k-support norm in their formulation, which might fail to work out in certain cases. In the rest of this section, we focus on GDS with R(θ) = ∥θ∥sp k given as ˆθ = argmin θ∈Rp ∥θ∥sp k s.t. ∥XT (y −Xθ)∥sp∗ k ≤λp . (20) For the indicator function Cλ(·) of the dual norm, we present a fast algorithm for computing its proximal operator by exploiting the structure of its solution, which can be directly plugged in Algorithm 1 to solve (20). Further, we prove statistical recovery bounds for k-support norm Dantzig selection, which hold even for a high-dimensional scenario, where n < p. 3.1 Computation of Proximal Operator In order to solve (20), either proxλ∥·∥sp k (·) or prox Cλ (·) for ∥· ∥sp∗ k should be efficiently computable. Existing methods [1, 13] are inapplicable to our scenario since they compute the proximal operator for squared k-support norm, from which prox Cλ(·) cannot be directly obtained. In Theorem 2, we show that prox Cλ (·) can be efficiently computed, and thus Algorithm 1 is applicable. Theorem 2 Given λ > 0 and x ∈Rp, if ∥x∥sp∗ k ≤λ, then w∗= prox Cλ (x) = x. If ∥x∥sp∗ k > λ, define Asr = =r i=s+1 |x|↓ i , Bs = =s i=1(|x|↓ i )2, in which 0 ≤s < k and k ≤r ≤p, and construct the nonlinear equation of β, (k −s)A2 sr > 1 + β r −s + (k −s)β ?2 −λ2(1 + β)2 + Bs = 0 . (21) 5 Let βsr be given by βsr = ) nonnegative root of (21) if s > 0 and the root exists 0 otherwise . (22) Then the proximal operator w∗= proxICλ(x) is given by |w∗|↓ i = ⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ 1 1+βs∗r∗|x|↓ i if 1 ≤i ≤s∗ 2 λ2−Bs∗ k−s∗ if s∗< i ≤r∗and βs∗r∗= 0 As∗r∗ r∗−s∗+(k−s∗)βs∗r∗ if s∗< i ≤r∗and βs∗r∗> 0 |x|↓ i if r∗< i ≤p , (23) where the indices s∗and r∗with computed |w∗|↓satisfy the following two inequalities: |w∗|↓ s∗> |w∗|↓ k , (24) |x|↓ r∗+1 ≤|w∗|↓ k < |x|↓ r∗. (25) There might be multiple pairs of (s, r) satisfying the inequalities (24)-(25), and we choose the pair with the smallest ∥|x|↓−|w|↓∥2. Finally, w∗is obtained by sign-changing and reordering |w∗|↓to conform to x. Remark: The nonlinear equation (21) is quartic, for which we can use general formula to get all the roots [18]. In addition, if it exists, the nonnegative root is unique, as shown in the proof [7]. Theorem 2 indicates that computing prox Cλ (·) requires sorting of entries in |x| and a twodimensional search of s∗and r∗. Hence the total time complexity is O(p log p + k(p −k)). However, a more careful observation can particularly reduce the search complexity from O(k(p −k)) to O(log k log(p −k)), which is motivated by Theorem 3. Theorem 3 In search of (s∗, r∗) defined in Theorem 2, there can be only one ˜r for a given candidate ˜s of s∗, such that the inequality (25) is satisfied. Moreover if such ˜r exists, then for any r < ˜r, the associated | ˜w|↓ k violates the first part of (25), and for r > ˜r, | ˜w|↓ k violates the second part of (25). On the other hand, based on the ˜r, we have following assertion of s∗, s∗ ⎧ ⎨ ⎩ > ˜s if ˜r does not exist ≥˜s if ˜r exists and corresponding | ˜w|↓ k satisfies (24) < ˜s if ˜r exists but corresponding | ˜w|↓ k violates (24) . (26) Based on Theorem 3, the accelerated search procedure for finding (s∗, r∗) is to execute a twodimensional binary search, and Algorithm 2 gives the details. Therefore the total time complexity becomes O(p log p + log k log(p −k)). Compared with previous proximal operators for squared k-support norm, this complexity is better than that in [1], and roughly the same as the one in [13]. 3.2 Statistical Recovery Guarantees for k-support norm The analysis of the generalized Dantzig Selector for k-support norm consists of addressing two key challenges. First, note that Theorem 1 requires an appropriate choice of λp. Second, one needs to compute the Gaussian width of the subset of the error set TR(θ∗) ∩Sp−1. For the k-support norm, we can get upper bounds to both of these quantities. We start by defining some notation. Let G∗⊆G(k) be the set of groups intersecting with the support of θ∗, and let S be the union of groups in G∗, such that s = |S|. Then, we have the following bounds which are used for choosing λp, and bounding the Gaussian width. Theorem 4 For the k-support norm Generalized Dantzig Selection problem (20), we obtain E R∗(XT w) . ≤k A4 2 log $ep k ( + 1 B2 (27) ω(TR(θ∗) ∩Sp−1)2 ≤ A4 2k log $ p −k − C s k D + 2 ( + √ k B2 · C s k D + s . (28) 6 Algorithm 2 Algorithm for computing prox Cλ (·) of ∥· ∥sp∗ k Input: x, k, λ Output: w∗= prox Cλ (x) 1: if ∥x∥sp∗ k ≤λ then 2: w∗:= x 3: else 4: l := 0, u := k −1, and sort |x| to get |x|↓ 5: while l ≤u do 6: ˜s := ⌊(l + u)/2⌋, and binary search for ˜r that satisfies (25) and compute ˜w based on (23) 7: if ˜r does not exist then 8: l := ˜s + 1 9: else if ˜r exists and (24) is satisfied then 10: w∗:= ˜w, l := ˜s + 1 11: else if ˜r exists but (24) is not satisfied then 12: u := ˜s −1 13: end if 14: end while 15: end if Our analysis technique for these bounds follows [16]. Similar results were obtained in [8] in the context of calculating norms of Gaussian vectors, and our bounds are of the same order as those of [8]. Choosing λp = 2k $2 2 log ! ep k " + 1 (2 , and under the assumptions of Theorem 1, we obtain the following result on the error bound for the minimizer of (20). Corollary 1 Suppose that we obtain i.i.d. Gaussian measurements X, and the noise w is i.i.d. N(0, 1). If we solve (20) with λp chosen as above. Then, with high probability, we obtain ∥ˆθ −θ∗∥2 ≤ / 8∥θ∗∥sp k $2 2k log ! ep k " + √ k ( (ℓn −ω(TR(θ∗) ∩Sp−1)) = O ⎛ ⎝ 2 sk log ! p k " + √ sk √n ⎞ ⎠. (29) Remark The error bound provides a natural interpretation for the two special cases of the k-support norm, viz. k = 1 and k = p. First, for k = 1 the k-support norm is exactly the same as the L1 norm, and the error bound obtained will be O A2 s log p n B , the same as known results of DS, and shown in Section 2.2. Second, for k = p, the k-support norm is equal to the L2 norm, and the error cone (11) is then simply a half space (there is no structural constraint) and the error bound scales as O !/ sp n " . 4 Experimental Results On the optimization side, we focus on the efficiency of different proximal operators related to ksupport norm. On the statistical side, we concentrate on the behavior and performance of GDS with k-support norm. All experiments are implemented in MATLAB. 4.1 Efficiency of Proximal Operator We tested four proximal operators related to k-support norm, which are normal prox Cλ (·) in Theorem 2 and the accelerated one in Theorem 3, prox 1 2β (∥·∥sp k )2(·) in [1], and prox λ 2 ∥·∥2 Θ(·) in [13]. The dimension p of vector varied from 1000 to 10000, and the ratio p/k = {200, 100, 50, 20}. As illustrated in Figure 1, the speedup of accelerated prox Cλ (·) is considerable compared with the normal one and prox 1 2β (∥·∥sp k )2(·). It is also slightly better than the prox λ 2 ∥·∥2 Θ(·). 4.2 Statistical Recovery on Synthetic Data Data generation We fixed p = 600, and θ∗= (10, . . . , 10 I JK L 10 , 10, . . . , 10 I JK L 10 , 10, . . . , 10 I JK L 10 , 0, 0, . . ., 0 I JK L 570 ) throughout the experiment, in which nonzero entries were divided equally into three groups. The design matrix X were generated from a normal distribution such that the entries in the same group 7 5000 10000 −4 −3 −2 −1 0 1 p log(time) p / k = 200 5000 10000 −4 −3 −2 −1 0 1 p log(time) p / k = 100 5000 10000 −4 −3 −2 −1 0 1 p log(time) p / k = 50 5000 10000 −4 −3 −2 −1 0 1 p log(time) p / k = 20 Figure 1: Efficiency of proximal operators. Diamond: proxICλ (·) in Theorem 2, Square: prox 1 2β (∥·∥sp k )2(·) in [1], Downward-pointing triangle: prox λ 2 ∥·∥2 Θ(·) in [13], Upward-pointing triangle: accelerated proxICλ (·) in Theorem 3. For each (p, k), 200 vectors are randomly generated for testing. Time is measured in seconds. have the same mean sampled from N(0, 1). X was normalized afterwards. The response vector y was given by y = Xθ∗+ 0.01 × N(0, 1). The number of samples n is specified later. ROC curves with different k We fixed n = 400 to obtain the ROC plot for k = {1, 10, 50} as shown in Figure 2(a). λp ranged from 10−2 to 103. Small k gets better ROC curve. 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FPR TPR k = 1 k = 10 k = 50 (a) ROC curves 0 50 100 150 200 250 300 0 10 20 30 40 50 60 n ℓ2 error : ∥ˆθ −θ∗∥2 k = 1 k = 10 k = 50 (b) L2 error vs. n 0 5 10 15 20 25 30 35 40 0 0.5 1 1.5 2 2.5 k ℓ2 error : ∥ˆθ −θ∗∥2 Mean of error (c) L2 error vs. k Figure 2: (a) The true positive rate reaches 1 quite early for k = 1, 10. When k = 50, the ROC gets worse due to the strong smoothing effect introduced by large k. (b) For each k, the L2 error is large when the sample is inadequate. As n increases, the error decreases dramatically for k = 1, 10 and becomes stable afterwards, while the decrease is not that significant for k = 50 and the error remains relatively large. (c) Both mean and standard deviation of L2 error are decreasing as k increases until it exceeds the number of nonzero entries in θ∗, and then the error goes up for larger k. L2 error vs. n We investigated how the L2 error ∥ˆθ −θ∗∥2 of Dantzig selector changes as the number of samples increases, where k = {1, 10, 50} and n = {30, 60, 90, . . ., 300}. k = 1, 10 give small errors when n is sufficiently large. L2 error vs. k We also looked at the L2 error with different k. We again fixed n = 400 and varied k from 1 to 39. For each k, we repeated the experiment 100 times, and obtained the mean and standard deviation plot in Figure 2(c). The result shows that the k-support-norm GDS with suitable k outperforms the L1-norm DS (i.e. k = 1) when correlated variables present in data. 5 Conclusions In this paper, we introduced the GDS, which generalizes the standard L1-norm Dantzig selector to estimation with any norm, such that structural information encoded in the norm can be efficiently exploited. A flexible framework based on inexact ADMM is proposed for solving the GDS, which only requires one of conjugate proximal operators to be efficiently solved. Further, we provide a unified statistical analysis framework for the GDS, which utilizes Gaussian widths of certain restricted sets for proving consistency. In the non-trivial example of k-support norm, we showed that the proximal operators used in the inexact ADMM can be computed more efficiently compared to previously proposed variants. Our statistical analysis for the k-support norm provides the first result of consistency of this structured norm. Further, experimental results provided sound support to the theoretical development in the paper. Acknowledgements The research was supported by NSF grants IIS-1447566, IIS-1422557, CCF-1451986, CNS1314560, IIS-0953274, IIS-1029711, and by NASA grant NNX12AQ39A. 8 References [1] Andreas Argyriou, Rina Foygel, and Nathan Srebro. Sparse prediction with the k-support norm. In NIPS, pages 1466–1474, 2012. [2] Arindam Banerjee, Sheng Chen, Farideh Fazayeli, and Vidyashankar Sivakumar. Estimation with norm regularization. In NIPS, 2014. [3] Peter J Bickel, Ya’acov Ritov, and Alexandre B Tsybakov. Simultaneous analysis of lasso and dantzig selector. The Annals of Statistics, 37(4):1705–1732, 2009. [4] Stephen P. 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 in Machine Learning, 3(1):1–122, 2011. [5] Emmanuel Candes and Terence Tao. The Dantzig selector: Statistical estimation when p is much larger than n. The Annals of Statistics, 35(6):2313–2351, December 2007. [6] Venkat Chandrasekaran, Benjamin Recht, Pablo A Parrilo, and Alan S Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805– 849, 2012. [7] Soumyadeep Chatterjee, Sheng Chen, and Arindam Banerjee. Generalized dantzig selector: Application to the k-support norm. ArXiv e-prints, June 2014. [8] Yehoram Gordon, Alexander E. Litvak, Shahar Mendelson, and Alain Pajor. Gaussian averages of interpolated bodies and applications to approximate reconstruction. Journal of Approximation Theory, 149(1):59–73, 2007. [9] Gareth M. James and Peter Radchenko. A generalized Dantzig selector with shrinkage tuning. Biometrika, 96(2):323–337, 2009. [10] Gareth M. James, Peter Radchenko, and Jinchi Lv. DASSO: connections between the Dantzig selector and lasso. Journal of the Royal Statistical Society Series B, 71(1):127–142, 2009. [11] Han Liu, Jian Zhang, Xiaoye Jiang, and Jun Liu. The group Dantzig selector. In AISTATS, pages 461–468, 2010. [12] Zhaosong Lu, Ting Kei Pong, and Yong Zhang. An alternating direction method for finding dantzig selectors. Computational Statistics & Data Analysis, 56(12):4037 – 4046, 2012. [13] Andrew M. McDonald, Massimiliano Pontil, and Dimitris Stamos. New perspectives on ksupport and cluster norms. ArXiv e-prints, March 2014. [14] Sahand N Negahban, Pradeep Ravikumar, Martin J Wainwright, Bin Yu, et al. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. Statistical Science, 27(4):538–557, 2012. [15] Neal Parikh and Stephen Boyd. Proximal algorithms. Foundations and Trends in Optimization, 1(3):127–239, 2014. [16] Nikhil S Rao, Ben Recht, and Robert D Nowak. Universal measurement bounds for structured sparse signal recovery. In AISTATS, pages 942–950, 2012. [17] Mark Rudelson and Roman Vershynin. On sparse reconstruction from Fourier and Gaussian measurements. Communications on Pure and Applied Mathematics, 61(8):1025–1045, 2008. [18] Ian Stewart. Galois Theory, Third Edition. Chapman Hall/CRC Mathematics Series. Taylor & Francis, 2003. [19] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [20] Huahua Wang and Arindam Banerjee. Bregman alternating direction method of multipliers. In NIPS, 2014. [21] Xiangfeng Wang and Xiaoming Yuan. The linearized alternating direction method of multipliers for Dantzig selector. SIAM Journal on Scientific Computing, 34(5), 2012. [22] Peng Zhao and Bin Yu. On model selection consistency of lasso. The Journal of Machine Learning Research, 7:2541–2563, 2006. [23] Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(2):301–320, 2005. 9
2014
269
5,368
Variational Gaussian Process State-Space Models Roger Frigola, Yutian Chen and Carl E. Rasmussen Department of Engineering University of Cambridge {rf342,yc373,cer54}@cam.ac.uk Abstract State-space models have been successfully used for more than fifty years in different areas of science and engineering. We present a procedure for efficient variational Bayesian learning of nonlinear state-space models based on sparse Gaussian processes. The result of learning is a tractable posterior over nonlinear dynamical systems. In comparison to conventional parametric models, we offer the possibility to straightforwardly trade off model capacity and computational cost whilst avoiding overfitting. Our main algorithm uses a hybrid inference approach combining variational Bayes and sequential Monte Carlo. We also present stochastic variational inference and online learning approaches for fast learning with long time series. 1 Introduction State-space models (SSMs) are a widely used class of models that have found success in applications as diverse as robotics, ecology, finance and neuroscience (see, e.g., Brown et al. [3]). State-space models generalize other popular time series models such as linear and nonlinear auto-regressive models: (N)ARX, (N)ARMA, (G)ARCH, etc. [21]. In this article we focus on Bayesian learning of nonparametric nonlinear state-space models. In particular, we use sparse Gaussian processes (GPs) [19] as a convenient method to encode general assumptions about the dynamical system such as continuity or smoothness. In contrast to conventional parametric methods, we allow the user to easily trade off model capacity and computation time. Moreover, we present a variational training procedure that allows very complex models to be learned without risk of overfitting. Our variational formulation leads to a tractable approximate posterior over nonlinear dynamical systems. This approximate posterior can be used to compute fast probabilistic predictions of future trajectories of the dynamical system. The computational complexity of our learning approach is linear in the length of the time series. This is possible thanks to the use of variational sparse GPs [22] which lead to a smoothing problem for the latent state trajectory in a simpler auxiliary dynamical system. Smoothing in this auxiliary system can be carried out with any conventional technique (e.g. sequential Monte Carlo). In addition, we present a stochastic variational inference procedure [10] to accelerate learning for long time series and we also present an online learning scheme. This work is useful in situations where: 1) it is important to know how uncertain future predictions are, 2) there is not enough knowledge about the underlying nonlinear dynamical system to create a principled parametric model, and 3) it is necessary to have an explicit model that can be used to simulate the dynamical system into the future. These conditions arise often in engineering and finance. For instance, consider an autonomous aircraft adapting its flight control when carrying a large external load of unknown weight and aerodynamic characteristics. A model of the nonlinear dynamics of the new system can be very useful in order to automatically adapt the control strategy. When few data points are available, there is high uncertainty about the dynamics. In this situation, 1 a model that quantifies its uncertainty can be used to synthesize control laws that avoid the risks of overconfidence. The problem of learning flexible models of nonlinear dynamical systems has been tackled from multiple perspectives. Ghahramani and Roweis [9] presented a maximum likelihood approach to learn nonlinear SSMs based on radial basis functions. This work was later extended by using a parameterized Gaussian process point of view and developing tailored filtering algorithms [6, 7, 23]. Approximate Bayesian learning has also been developed for parameterized nonlinear SSMs [5, 24]. Wang et al. [25] modeled the nonlinear functions in SSMs using Gaussian processes (GP-SSMs) and found a MAP estimate of the latent variables and hyperparameters. Their approach preserved the nonparametric properties of Gaussian processes. Despite using MAP learning over state trajectories, overfitting was not an issue since it was applied in a dimensionality reduction context where the latent space of the SSM was much smaller than the observation space. In a similar vein, [4, 12] presented a hierarchical Gaussian process model that could model linear dynamics and nonlinear mappings from latent states to observations. More recently, Frigola et al. [8] learned GP-SSMs in a fully Bayesian manner by employing particle MCMC methods to sample from the smoothing distribution. However, their approach led to predictions with a computational cost proportional to the length of the time series. In the rest of this article, we present an approach to variational Bayesian learning of flexible nonlinear state-space models which leads to a simple representation of the posterior over nonlinear dynamical systems and results in predictions having a low computational complexity. 2 Gaussian Process State-Space Models We consider discrete-time nonlinear state-space models built with deterministic functions and additive noise xt+1 = f(xt) + vt, (1a) yt = g(xt) + et. (1b) The dynamics of the system are defined by the state transition function f(xt) and independent additive noise vt (process noise). The states xt ∈RD are latent variables such that all future variables are conditionally independent on the past given the present state. Observations yt ∈RE are linked to the state via another deterministic function g(xt) and independent additive noise et (observation noise). State-space models are stochastic dynamical processes that are useful to model time series y ≜{y1, ..., yT }. The deterministic functions in (1) can also take external known inputs (such as control signals) as an argument but, for conciseness, we will omit those in our notation. A traditional approach to learn f and g is to restrict them to a family of parametric functions. This is particularly appropriate when the dynamical system is very well understood, e.g. orbital mechanics of a spacecraft. However, in many applications, it is difficult to specify a class of parametric models that can provide both the ability to model complex functions and resistance to overfitting thanks to an easy to specify prior or regularizer. Gaussian processes do have these properties: they can represent functions of arbitrary complexity and provide a straightforward way to specify assumptions about those unknown functions, e.g. smoothness. In the light of this, it is natural to place Gaussian process priors over both f and g [25]. However, the extreme flexibility of the two Gaussian processes leads to severe nonidentifiability and strong correlations between the posteriors of the two unknown functions. In the rest of this paper we will focus on a model with a GP prior over the transition function and a parametric likelihood. However, our variational formulation can also be applied to the double GP case (see supplementary material). A probabilistic state-space model with a Gaussian process prior over the transition function and a parametric likelihood is specified by f(x) ∼GP mf(x), kf(x, x′)  , (2a) xt | ft ∼N(xt | ft, Q), (2b) x0 ∼p(x0) (2c) yt | xt ∼p(yt | xt, θy), (2d) where we have used ft ≜f(xt−1). Since f(x) ∈RD, we use the convention that the covariance function kf returns a D ×D matrix. We group all hyperparameters into θ ≜{θf, θy, Q}. Note that 2 0 time states 0 time 0 time 0 time Figure 1: State trajectories from four 2-state nonlinear dynamical systems sampled from a GP-SSM prior with fixed hyperparameters. The same prior generates systems with qualitatively different behaviors, e.g. the leftmost panel shows behavior similar to that of a non-oscillatory linear system whereas the rightmost panel appears to have arisen from a limit cycle in a nonlinear system. we are not restricting the likelihood (2d) to any particular form. The joint distribution of a GP-SSM is p(y, x, f) = p(x0) T Y t=1 p(yt|xt)p(xt|ft)p(ft|f1:t−1, x0:t−1), (3) where we use the convention f1:0 = ∅and omit the conditioning on θ in the notation. The GP on the transition function induces a distribution over the latent function values with the form of a GP predictive: p(ft|f1:t−1, x0:t−1) = N mf(xt−1) + Kt−1,0:t−2K−1 0:t−2,0:t−2(f1:t−1 −mf(x0:t−2)), Kt−1,t−1 −Kt−1,0:t−2K−1 0:t−2,0:t−2K⊤ t−1,0:t−2  , (4) where the subindices of the kernel matrices indicate the arguments to the covariance function necessary to build each matrix, e.g. Kt−1,0:t−2 = [kf(xt−1, x0) . . . kf(xt−1, xt−2)]. When t = 1, the distribution is that of a GP marginal p(f1|x0) = N(mf(x0), kf(x0, x0)). Equation (3) provides a sequential procedure to sample state trajectories and observations. GPSSMs are doubly stochastic models in the sense that one could, at least notionally, first sample a state transition dynamics function from eq. (2a) and then, conditioned on that function, sample the state trajectory and observations. GP-SSMs are a very rich prior over nonlinear dynamical systems. In Fig. 1 we illustrate this concept by showing state trajectories sampled from a GP-SSM with fixed hyperparameters. The dynamical systems associated with each of these trajectories are qualitatively very different from each other. For instance, the leftmost panel shows the dynamics of an almost linear non-oscillatory system whereas the rightmost panel corresponds to a limit cycle in a nonlinear system. Our goal in this paper is to use this prior over dynamical systems and obtain a tractable approximation to the posterior over dynamical systems given the data. 3 Variational Inference in GP-SSMs Since the GP-SSM is a nonparametric model, in order to define a posterior distribution over f(x) and make probabilistic predictions it is necessary to first find the smoothing distribution p(x0:T |y1:T ). Frigola et al. [8] obtained samples from the smoothing distribution that could be used to define a predictive density via Monte Carlo integration. This approach is expensive since it requires averaging over L state trajectory samples of length T. In this section we present an alternative approach that aims to find a tractable distribution over the state transition function that is independent of the length of the time series. We achieve this by using variational sparse GP techniques [22]. 3.1 Augmenting the Model with Inducing Variables As a first step to perform variational inference in a GP-SSM, we augment the model with M inducing points u ≜{ui}M i=1. Those inducing points are jointly Gaussian with the latent function values. In the case of a GP-SSM, the joint probability density becomes p(y, x, f, u) = p(x, f|u) p(u) T Y t=1 p(yt|xt), (5) 3 where p(u) = N(u | 0, Ku,u) (6a) p(x, f|u) = p(x0) T Y t=1 p(ft|f1:t−1, x0:t−1, u)p(xt|ft), (6b) T Y t=1 p(ft|f1:t−1, x0:t−1, u) = N f1:T | K0:T −1,uK−1 u,uu, K0:T −1−K0:T −1,uK−1 u,uK⊤ 0:T −1,u  . (6c) Kernel matrices relating to the inducing points depend on a set of inducing inputs {zi}M i=1 in such a way that Ku,u is an MD × MD matrix formed with blocks kf(zi, zj) having size D × D. For brevity, we use a zero mean function and we omit conditioning on the inducing inputs in the notation. 3.2 Evidence Lower Bound of an Augmented GP-SSM Variational inference [1] is a popular method for approximate Bayesian inference based on making assumptions about the posterior over latent variables that lead to a tractable lower bound on the evidence of the model (sometimes referred to as ELBO). Maximizing this lower bound is equivalent to minimizing the Kullback-Leibler divergence between the approximate posterior and the exact one. Following standard variational inference methodology, [1] we obtain the evidence lower bound of a GP-SSM augmented with inducing points log p(y|θ) ≥ Z x,f,u q(x, f, u) log p(u)p(x0) QT t=1 p(ft|f1:t−1, x0:t−1, u)p(yt|xt)p(xt|ft) q(x, f, u) . (7) In order to achieve tractability, we use a variational distribution that factorizes as q(x, f, u) = q(u)q(x) T Y t=1 p(ft|f1:t−1, x0:t−1, u), (8) where q(u) and q(x) can take any form but the terms relating to f are taken to match those of the prior (3). As a consequence, the difficult p(ft|...) terms inside the log cancel out and lead to the following lower bound L(q(u), q(x),θ) = −KL(q(u)∥p(u)) + H(q(x)) + Z x q(x) log p(x0) + T X t=1  Z x,u q(x)q(u) Z ft p(ft|xt−1, u) log p(xt|ft) | {z } Φ(xt,xt−1,u) + Z x q(x) log p(yt|xt)  (9) where KL denotes the Kullback-Leibler divergence and H the entropy. The integral with respect to ft can be solved analytically: Φ(xt, xt−1, u) = −1 2tr(Q−1Bt−1) + log N(xt|At−1u, Q) where At−1 = Kt−1,uK−1 u,u, and Bt−1 = Kt−1,t−1 −Kt−1,uK−1 u,uKu,t−1. As in other variational sparse GP methods, the choice of variational distribution (8) gives the ability to precisely learn the latent function at the locations of the inducing inputs. Away from those locations, the posterior takes the form of the prior conditioned on the inducing variables. By increasing the number of inducing variables, the ELBO can only become tighter [22]. This offers a straightforward trade-off between model capacity and computation cost without increasing the risk of overfitting. 3.3 Optimal Variational Distribution for u The optimal distribution of q(u) can be found by setting to zero the functional derivative of the evidence lower bound with respect to q(u) q∗(u) ∝p(u) T Y t=1 exp{⟨log N(xt|At−1u, Q)⟩q(x)}, (10) 4 where ⟨·⟩q(x) denotes an expectation with respect to q(x). The optimal variational distribution q∗(u) is, conveniently, a multivariate Gaussian distribution. If, for simplicity of notation, we restrict ourselves to D = 1 the natural parameters of the optimal distribution are η1 = Q−1 T X t=1 ⟨AT t−1xt⟩q(xt,xt−1), η2 = −1 2 K−1 uu + Q−1 T X t=1 ⟨AT t−1At−1⟩q(xt−1) ! . (11) The mean and covariance matrix of q∗(u), denoted as µ and Σ respectively, can be computed as µ = Ση1 and Σ = (−2η2)−1. Note that the optimal q(u) depends on the sufficient statistics Ψ1 = PT t=1⟨KT t−1,uxt⟩q(xt,xt−1) and Ψ2 = PT t=1⟨KT t−1,uKt−1,u⟩q(xt−1). 3.4 Optimal Variational Distribution for x In an analogous way as for q∗(u), we can obtain the optimal form of q(x) q∗(x) ∝p(x0) T Y t=1 p(yt|xt) exp{−1 2tr Q−1(Bt−1 + At−1ΣAT t−1)  } N(xt|At−1µ, Q), (12) where, in the second equation, we have used q(u) = N(u|µ, Σ). The optimal distribution q∗(x) is equivalent to the smoothing distribution of an auxiliary parametric state-space model. The auxiliary model is simpler than the original one in (3) since the latent states factorize with a Markovian structure. Equation (12) can be interpreted as a nonlinear state-space model with a Gaussian state transition density, N(xt|At−1µ, Q), and a likelihood augmented with an additional term: exp{−1 2tr Q−1(Bt−1 + At−1ΣAT t−1)  }. Smoothing in nonlinear Markovian state-space models is a standard problem in the context of time series modeling. There are various existing strategies to find the smoothing distribution which could be used depending on the characteristics of each particular problem [20]. For instance, in a mildly nonlinear system with Gaussian noise, an extended Kalman smoother can have very good performance. On the other hand, problems with severe nonlinearities and/or non-Gaussian likelihoods can lead to heavily multimodal smoothing distributions that are better represented using particle methods. We note that the application of sequential Monte Carlo (SMC) is particularly straightforward in the present auxiliary model. 3.5 Optimizing the Evidence Lower Bound Algorithm 1 presents a procedure to maximize the evidence lower bound by alternatively sampling from the smoothing distribution and taking steps both in θ and in the natural parameters of q∗(u). We propose a hybrid variational-sampling approach whereby approximate samples from q∗(x) are obtained with a sequential Monte Carlo smoother. However, as discussed in section 3.4, depending on the characteristics of the dynamical system, other smoothing methods could be more appropriate [20]. As an alternative to smoothing on the auxiliary dynamical system in (12), one could force a q(x) from a particular family of distributions and optimise the evidence lower bound with respect to its variational parameters. For instance, we could posit a Gaussian q(x) with a sparsity pattern in the covariance matrix assuming zero covariance between non-neighboring states and maximize the ELBO with respect to the variational parameters. We use stochastic gradient descent [10] to maximize the ELBO (where we have plugged in the optimal q∗(u) [22]) by using its gradient with respect to the hyperparameters. Both quantities are stochastic in our hybrid approach due to variance introduced by the sampling of q∗(x). In fact, vanilla sequential Monte Carlo methods will result in biased estimators of the gradient and the parameters of q∗(u). However, in our experiments this has not been an issue. Techniques such as particle MCMC would be a viable alternative to conventional sequential Monte Carlo [13]. 5 Algorithm 1 Variational learning of GP-SSMs with particle smoothing. Batch mode (i.e. non-SVI) is the particular case where the mini-batch is the whole dataset. Require: Observations y1:T . Initial values for θ, η1 and η2. Schedules for ρ and λ. i = 1. repeat yτ:τ ′ ←SAMPLEMINIBATCH(y1:T ) {xτ:τ ′}L l=1 ←GETSAMPLESOPTIMALQX(yτ:τ ′, θ, η1, η2) sample from eq. (12) ∇θL ←GETTHETAGRADIENT({xτ:τ ′}L l=1, θ) supp. material η∗ 1, η∗ 2 ←GETOPTIMALQU({xτ:τ ′}L l=1, θ) eq. (11) or (14) η1 ←η1 + ρi(η∗ 1 −η1) η2 ←η2 + ρi(η∗ 2 −η2) θ ←θ + λi∇θL i ←i + 1 until ELBO convergence 3.6 Making Predictions One of the most appealing properties of our variational approach to learning GP-SSMs is that the approximate predictive distribution of the state transition function can be cheaply computed p(f∗|x∗, y) = Z x,u p(f∗|x∗, x, u) p(x|u, y) p(u|y) ≈ Z x,u p(f∗|x∗, u) p(x|u, y) q(u) = Z u p(f∗|x∗, u) q(u) = N(f∗|A∗µ, B∗+ A∗ΣA⊤ ∗). (13) The derivation in eq. (13) contains two approximations: 1) predictions at new test points are considered to depend only on the inducing variables, and 2) the posterior distribution over u is approximated by a variational distribution. After pre-computations, the cost of each prediction is O(M) for the mean and O(M 2) for the variance. This contrasts with the O(TL) and O(T 2L) complexity of approaches based on sampling from the smoothing distribution where p(f∗|x∗, y) = R x p(f∗|x∗, x) p(x|y) is approximated with L samples from p(x|y) [8]. The variational approach condenses the learning of the latent function on the inducing points u and does not explicitly need the smoothing distribution p(x|y) to make predictions. 4 Stochastic Variational Inference Stochastic variational inference (SVI) [10] can be readily applied using our evidence lower bound. When the observed time series is long, it can be expensive to compute q∗(u) or the gradient of L with respect to the hyperparameters and inducing inputs. Since both q∗(u) and ∂L ∂θ/z1:M depend linearly on q(x) via sufficient statistics that contain a summation over all elements in the state trajectory, we can obtain unbiased estimates of these sufficient statistics by using one or multiple segments of the sequence that are sampled uniformly at random. However, obtaining q(x) also requires a time complexity of O(T). Yet, in practice, q(x) can be approximated by running the smoothing algorithm locally around those segments. This can be justified by the fact that in a time series context, the smoothing distribution at a particular time is not largely affected by measurements that are far into the past or the future [20]. The natural parameters of q∗(u) can be estimated by using a portion of the time series of length S η1 = Q−1 T S τ ′ X t=τ ⟨AT t−1xt⟩q(xt,xt−1), η2 = −1 2  K−1 uu + Q−1 T S τ ′ X t=τ ⟨AT t−1At−1⟩q(xt−1)  . (14) 5 Online Learning Our variational approach to learn GP-SSMs also leads naturally to an online learning implementation. This is of particular interest in the context of dynamical systems as it is often the case that data arrives in a sequential manner, e.g. a robot learning the dynamics of different objects by interacting 6 Table 1: Experimental evaluation of 1D nonlinear system. Unless otherwise stated, training times are reported for a dataset with T = 500 and test times are given for a test set with 105 data points. All pre-computations independent on test data are performed before timing the “test time”. Predictive log likelihoods are the average over the full test set. * our PMCMC code did not use fast updatesdowndates of the Cholesky factors during training. This does not affect test times. Test RMSE log p(xtest t+1|xtest t , ytr 0:T ) Train time Test time Variational GP-SSM 1.15 -1.61 2.14 min 0.14 s Var. GP-SSM (SVI, T = 104) 1.07 -1.47 4.12 min 0.14 s PMCMC GP-SSM [8] 1.12 -1.57 547 min* 421 s GP-NARX [17] 1.46 -1.90 0.22 min 3.85 s GP-NARX + FITC [17, 18] 1.47 -1.90 0.17 min 0.23 s Linear (N4SID, [16]) 2.35 -2.30 0.01 min 0.11 s with them. Online learning in a Bayesian setting consists in sequential application of Bayes rule whereby the posterior after observing data up to time t becomes the prior at time t + 1 [2, 15]. In our case, this involves replacing the prior p(u) = N(u|0, Ku,u) by the approximate posterior N(u|µ, Σ) obtained in the previous step. The expressions for the update of the natural parameters of q∗(u) with a new mini batch yτ:τ ′ are η′ 1 = η1 + Q−1 τ ′ X t=τ ⟨AT t−1xt⟩q(xt,xt−1), η′ 2 = η2 −1 2Q−1 τ ′ X t=τ ⟨AT t−1At−1⟩q(xt−1). (15) 6 Experiments The goal of this section is to showcase the ability of variational GP-SSMs to perform approximate Bayesian learning of nonlinear dynamical systems. In particular, we want to demonstrate: 1) the ability to learn the inherent nonlinear dynamics of a system, 2) the application in cases where the latent states have higher dimensionality than the observations, and 3) the use of non-Gaussian likelihoods. 6.1 1D Nonlinear System We apply our variational learning procedure presented above to the one-dimensional nonlinear system described by p(xt+1|xt) = N(f(xt), 1) and p(yt|xt) = N(xt, 1) where the transition function is xt + 1 if x < 4 and −4xt + 21 if x ≥4. Its pronounced kink makes it challenging to learn. Our goal is to find a posterior distribution over this function using a GP-SSM with Mat´ern covariance function. To solve the expectations with respect to the approximate smoothing distribution q(x) we use a bootstrap particle fixed-lag smoother with 1000 particles and a lag of 10. In Table 1, we compare our method (Variational GP-SSM) against the PMCMC sampling procedure from [8] taking 100 samples and 10 burn in samples. As in [8], the sampling exhibited very good mixing with 20 particles. We also compare to an auto-regressive model based on Gaussian process regression [17] of order 5 with Mat´ern ARD covariance function with and without FITC approximation. Finally, we use a linear subspace identification method (N4SID, [16]) as a baseline for comparison. The PMCMC training offers the best test performance from all methods using 500 training points at the cost of substantial train and test time. However, if more data is available (T = 104) the stochastic variational inference procedure can be very attractive since it improves test performance while having a test time that is independent of the training set size. The reported SVI performance has been obtained with mini-batches of 100 time-steps. 6.2 Neural Spike Train Recordings We now turn to the use of SSMs to learn a simple model of neural activity in rats’ hippocampus. We use data in neuron cluster 1 (the most active) from experiment ec013.717 in [14]. In some regions of the time series, the action potential spikes show a clear pattern where periods of rapid spiking are followed by periods of very little spiking. We wish to model this behaviour as an autonomous nonlinear dynamical system (i.e. one not driven by external inputs). Many parametric models of nonlinear neuron dynamics have been proposed [11] but our goal here is to learn a model from data 7 940 940.5 941 10 20 30 40 time [s] spike counts 940 940.5 941 0 time [s] states 0 0.5 1 10 20 30 40 prediction time [s] spike counts 0 0.5 1 0 prediction time [s] states Figure 2: From left to right: 1) part of the observed spike count data, 2) sample from the corresponding smoothing distribution, 3) predictive distribution of spike counts obtained by simulating the posterior dynamical from an initial state, and 4) corresponding latent states. 0 x(1) x(2) x(1) x(2) 0 x(1) x(2) 0 x(1) x(2) 0 Figure 3: Contour plots of the state transition function x(2) t+1 = f(x(1) t , x(2) t ), and trajectories in state space. Left: mean posterior function and trajectory from smoothing distribution. Other three panels: transition functions sampled from the posterior and trajectories simulated conditioned on the corresponding sample. Those simulated trajectories start inside the limit cycle and are naturally attracted towards it. Note how function samples are very similar in the region of the limit cycle. without using any biological insight. We use a GP-SSM with a structure such that it is the discretetime analog of a second order nonlinear ordinary differential equation: two states one of which is the derivative of the other. The observations are spike counts in temporal bins of 0.01 second width. We use a Poisson likelihood relating the spike counts to the second latent state yt|xt ∼ Poisson(exp(αx(2) t + β)). We find a posterior distribution for the state transition function using our variational GP-SSM approach. Smoothing is done with a fixed-lag particle smoother and training until convergence takes approximately 50 iterations of Algorithm 1. Figure 2 shows a part of the raw data together with an approximate sample from the smoothing distribution during the same time interval. In addition, we show the distribution over predictions made by chaining 1-step-ahead predictions. To make those predictions we have switched off process noise (Q = 0) to show more clearly the effect of uncertainty in the state transition function. Note how the frequency of roughly 6 Hz present in the data is well captured. Figure 3 shows how the limit cycle corresponding to a nonlinear dynamical system has been captured (see caption for details). 7 Discussion and Future Work We have derived a tractable variational formulation to learn GP-SSMs: an important class of models of nonlinear dynamical systems that is particularly suited to applications where a principled parametric model of the dynamics is not available. Our approach makes it possible to learn very expressive models without risk of overfitting. In contrast to previous approaches [4, 12, 25], we have demonstrated the ability to learn a nonlinear state transition function in a latent space of greater dimensionality than the observation space. More crucially, our approach yields a tractable posterior over nonlinear systems that, as opposed to those based on sampling from the smoothing distribution [8], results in a computation time for the predictions that does not depend on the length of the time series. Given the interesting capabilities of variational GP-SSMs, we believe that future work is warranted. In particular, we want to focus on structured variational distributions q(x) that could eliminate the need to solve the smoothing problem in the auxiliary dynamical system at the cost of having more variational parameters to optimize. On a more theoretical side, we would like to better characterize GP-SSM priors in terms of their dynamical system properties: stability, equilibria, limit cycles, etc. 8 References [1] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [2] Tamara Broderick, Nicholas Boyd, Andre Wibisono, Ashia C Wilson, and Michael Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems 26, pages 1727–1735. Curran Associates, Inc., 2013. [3] Emery N. Brown, Loren M. Frank, Dengda Tang, Michael C. Quirk, and Matthew A. Wilson. A statistical paradigm for neural spike train decoding applied to position prediction from ensemble firing patterns of rat hippocampal place cells. The Journal of Neuroscience, 18(18):7411–7425, 1998. [4] Andreas C. Damianou, Michalis Titsias, and Neil D. Lawrence. Variational Gaussian process dynamical systems. In Advances in Neural Information Processing Systems 24, pages 2510–2518. 2011. [5] J. Daunizeau, K.J. Friston, and S.J. Kiebel. Variational Bayesian identification and prediction of stochastic nonlinear dynamic causal models. Physica D: Nonlinear Phenomena, 238(21):2089 – 2118, 2009. [6] M. P. Deisenroth and S. Mohamed. Expectation Propagation in Gaussian process dynamical systems. In Advances in Neural Information Processing Systems (NIPS) 25, pages 2618–2626. 2012. [7] M. P. Deisenroth, R. D. Turner, M. F. Huber, U. D. Hanebeck, and C. E. Rasmussen. Robust filtering and smoothing with Gaussian processes. IEEE Transactions on Automatic Control, 57(7):1865 –1871, 2012. [8] Roger Frigola, Fredrik Lindsten, Thomas B. Sch¨on, and Carl E. Rasmussen. Bayesian inference and learning in Gaussian process state-space models with particle MCMC. In Advances in Neural Information Processing Systems (NIPS) 26. 2013. [9] Z. Ghahramani and S. Roweis. Learning nonlinear dynamical systems using an EM algorithm. In Advances in Neural Information Processing Systems (NIPS) 11. MIT Press, 1999. [10] 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. [11] Eugene M Izhikevich. Neural excitability, spiking and bursting. International Journal of Bifurcation and Chaos, 10(06):1171–1266, 2000. [12] Neil D. Lawrence and Andrew J. Moore. The hierarchical Gaussian process latent variable model. In Zoubin Ghahramani, editor, Proceedings of the 24th International Conference on Machine Learning (ICML), 2007. [13] Fredrik Lindsten and Thomas B. Sch¨on. Backward simulation methods for Monte Carlo statistical inference. Foundations and Trends in Machine Learning, 6(1):1–143, 2013. [14] K. Mizuseki, A. Sirota, E. Pastalkova, K. Diba, and G. Buzski. Multiple single unit recordings from different rat hippocampal and entorhinal regions while the animals were performing multiple behavioral tasks. CRCNS.org. http://dx.doi.org/10.6080/K09G5JRZ, 2013. [15] Manfred Opper. A bayesian approach to on-line learning. In David Saad, editor, On-Line Learning in Neural Networks. Cambridge University Press, 1998. [16] Van Overschee P. and De Moor B. Subspace Identification for Linear Systems, Theory, Implementation, Applications. Kluwer Academic Publishers, 1996. [17] J. Qui˜nonero Candela, A Girard, J. Larsen, and C.E. Rasmussen. Propagation of uncertainty in Bayesian kernel models - application to multiple-step ahead forecasting. In Acoustics, Speech, and Signal Processing, 2003. Proceedings. (ICASSP ’03). 2003 IEEE International Conference on, volume 2, pages II–701–4 vol.2, April 2003. [18] J. Qui˜nonero-Candela and C.E. Rasmussen. A unifying view of sparse approximate Gaussian process regression. Journal of Machine Learning Research, 6:1939–1959, 2005. [19] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [20] S. S¨arkk¨a. Bayesian Filtering and Smoothing. Cambridge University Press, 2013. [21] R. H. Shumway and D. S. Stoffer. Time Series Analysis and Its Applications. Springer, 3rd edition, 2011. [22] Michalis Titsias. Variational learning of inducing variables in sparse Gaussian processes. In Proceedings of the 12th International Conference on Artificial Intelligence and Statistics (AISTATS), 2009. [23] R. Turner, M. P. Deisenroth, and C. E. Rasmussen. State-space inference and learning with Gaussian processes. In Yee Whye Teh and Mike Titterington, editors, 13th International Conference on Artificial Intelligence and Statistics, volume 9 of W&CP, pages 868–875, Chia Laguna, Sardinia, Italy, 2010. [24] Harri Valpola and Juha Karhunen. An unsupervised ensemble learning method for nonlinear dynamic state-space models. Neural Computation, 14(11):2647–2692, 2002. [25] J.M. Wang, D.J. Fleet, and A. Hertzmann. Gaussian process dynamical models. In Advances in Neural Information Processing Systems (NIPS) 18, pages 1441–1448. MIT Press, Cambridge, MA, 2006. 9
2014
27
5,369
Conditional Swap Regret and Conditional Correlated Equilibrium Mehryar Mohri Courant Institute and Google 251 Mercer Street New York, NY 10012 mohri@cims nyu edu Scott Yang Courant Institute 251 Mercer Street New York, NY 10012 yangs@cims nyu edu Abstract We introduce a natural extension of the notion of swap regret, conditional swap regret, that allows for action modifications conditioned on the player’s action history. We prove a series of new results for conditional swap regret minimization. We present algorithms for minimizing conditional swap regret with bounded conditioning history. We further extend these results to the case where conditional swaps are considered only for a subset of actions. We also define a new notion of equilibrium, conditional correlated equilibrium, that is tightly connected to the notion of conditional swap regret: when all players follow conditional swap regret minimization strategies, then the empirical distribution approaches this equilibrium. Finally, we extend our results to the multi-armed bandit scenario. 1 Introduction On-line learning has received much attention in recent years. In contrast to the standard batch framework, the online learning scenario requires no distributional assumption. It can be described in terms of sequential prediction with expert advice [13] or formulated as a repeated two-player game between a player (the algorithm) and an opponent with an unknown strategy [7]: at each time step, the algorithm probabilistically selects an action, the opponent chooses the losses assigned to each action, and the algorithm incurs the loss corresponding to the action it selected. The standard measure of the quality of an online algorithm is its regret, which is the difference between the cumulative loss it incurs after some number of rounds and that of an alternative policy. The cumulative loss can be compared to that of the single best action in retrospect [13] (external regret), to the loss incurred by changing every occurrence of a specific action to another [9] (internal regret), or, more generally, to the loss of action sequences obtained by mapping each action to some other action [4] (swap regret). Swap regret, in particular, accounts for situations where the algorithm could have reduced its loss by swapping every instance of one action with another (e.g. every time the player bought Microsoft, he should have bought IBM). There are many algorithms for minimizing external regret [7], such as, for example, the randomized weighted-majority algorithm of [13]. It was also shown in [4] and [15] that there exist algorithms for minimizing internal and swap regret. These regret minimization techniques have been shown to be useful for approximating game-theoretic equilibria: external regret algorithms for Nash equilibria and swap regret algorithms for correlated equilibria [14]. By definition, swap regret compares a player’s action sequence against all possible modifications at each round, independently of the previous time steps. In this paper, we introduce a natural extension of swap regret, conditional swap regret, that allows for action modifications conditioned on the player’s action history. Our definition depends on the number of past time steps we condition upon. 1 As a motivating example, let us limit this history to just the previous one time step, and suppose we design an online algorithm for the purpose of investing, where one of our actions is to buy bonds and another to buy stocks. Since bond and stock prices are known to be negatively correlated, we should always be wary of buying one immediately after the other – unless our objective was to pay for transaction costs without actually modifying our portfolio; However, this does not mean that we should avoid purchasing one or both of the two assets completely, which would be the only available alternative in the swap regret scenario. The conditional swap class we introduce provides precisely a way to account for such correlations between actions. We start by introducing the learning set-up and the key notions relevant to our analysis (Section 2). 2 Learning set­up and model We consider the standard online learning set-up with a set of actions N = {1 . . .  N}. At each round t ∈{1 . . .  T}, T ≥1, the player selects an action xt ∈N according to a distribution pt over N, in response to which the adversary chooses a function f t : N t →[0 1] and causes the player to incur a loss f txt xt−1 . . .  x1). The objective of the player is to choose a sequence of actions x1 . . .  xT ) that minimizes his cumulative loss T t=1 f txt xt−1 . . .  x1). A standard metric used to measure the performance of an online algorithm  over T rounds is its expected) external regret, which measures the player’s expected performance against the best fixed action in hindsight: Reg Ext  T) = T  t=1  xt..x1)∼ pt...p1) [f txt .. x1)] −min j∈N T  t=1 f tj j ... j). There are several common modifications to the above online learning scenario: (1) we may compare regret against stronger competitor classes: Reg T) = T t=1 pt...p1 f txt .. x1) − minϕ∈ T t=1 pt...p1[f tϕxt) ϕxt−1) ... ϕx1))] for some function class C ⊆N N ; (2) the player may have access to only partial information about the loss, i.e. only knowledge of f txt .. x1) as opposed to f ta xt−1 . . .  x1)∀a ∈N (also known as the bandit scenario); (3) the loss function may have bounded memory: f txt ... xt−k xt−k−1 ... x1) = f txt ... xt−k yt−k−1 ... y1), ∀xj yj ∈N. The scenario where C = N N in (1) is called the swap regret case, and the case where k = 0 in (3) is referred to as the oblivious adversary. (Sublinear) regret minimization is possible for loss functions against any competitor class of the form described in (1), with only partial information, and with at least some level of bounded memory. See [4] and [1] for a reference on (1), [2] and [5] for (2), and [1] for (3). [6] also provides a detailed summary of the best known regret bounds in all of these scenarios and more. The introduction of adversaries with bounded memory naturally leads to an interesting question: what if we also try to increase the power of the competitor class in this way? While swap regret is a natural competitor class and has many useful game theoretic consequences (see [14]), one important missing ingredient is that the competitor class of functions does not have memory. In fact, in most if not all online learning scenarios and regret minimization algorithms considered so far, the point of comparison has been against modification of the player’s actions at each point of time independently of the previous actions. But, as we discussed above in the financial markets example, there exist cases where a player should be measured against alternatives that depend on the past and the player should take into account the correlations between actions. Specifically, we consider competitor functions of the form Φt : N t →N t. Let Call = {Φt : N t → N t}∞ t=1 denote the class of all such functions. This leads us to the expression: T t=1 p1...pt[f t]− minΦt∈all T t=1 p1...pt[f t ◦Φt]. Call is clearly a substantially richer class of competitor functions than traditional swap regret. In fact, it is the most comprehensive class, since we can always reach T t=1 p1...pt[f t] −T t=1 minx1..xt) f tx1 .. xt) by choosing Φt to map all points to argminxt..x1) f txt ... x1). Not surprisingly, however, it is not possible to obtain a sublinear regret bound against this general class. 2                     (a) (b) Figure 1: (a) unigram conditional swap class interpreted as a finite-state transducer. This is the same as the usual swap class and has only the trivial state; (b) bigram conditional swap class interpreted as a finite-state transducer. The action at time t−1 defines the current state and influences the potential swap at time t. Theorem 1. No algorithm can achieve sublinear regret against the class Call, regardless of the loss function’s memory. This result is well-known in the on-line learning community, but, for completeness, we include a proof in Appendix 9. Theorem 1 suggests examining more reasonable subclasses of Call. To simplify the notation and proofs that follow in the paper, we will henceforth restrict ourselves to the scenario of an oblivious adversary, as in the original study of swap regret [4]. However, an application of the batching technique of [1] should produce analogous results in the non-oblivious case for all of the theorems that we provide. Now consider the collection of competitor functions Ck = {ϕ: N k →N}. Then, a player who has played actions {as}t−1 s=1 in the past should have his performance compared against ϕat at−1 at−2 . . .  at−k−1)) at time t, where ϕ ∈Ck. We call this class Ck of functions the k-gram conditional swap regret class, which also leads us to the regret definition: Reg k  T) = T  t=1  xt∼pt[f txt)] −min ϕ∈k T  t=1  xt∼pt[f tϕxt at−1 at−2 . . .  at−k−1)))]. Note that this is a direct extension of swap regret to the scenario where we allow for swaps conditioned on the history of the previous k −1) actions. For k = 1, this precisely coincides with swap regret. One important remark about the k-gram conditional swap regret is that it is a random quantity that depends on the particular sequence of actions played. A natural deterministic alternative would be of the form: T  t=1  xt∼pt[f txt)] −min ϕ∈k T  t=1  xt...x1)∼pt...p1)[f tϕxt xt−1 xt−2 . . .  xt−k−1)))]. However, by taking the expectation of Regk T) with respect to aT −1 aT2 . . .  a1 and applying Jensen’s inequality, we obtain Reg k  T)≥ T  t=1  xt∼pt[f txt)]−min ϕ∈k T  t=1  xt...x1)∼pt...p1)[f tϕxt xt−1 xt−2 . . .  xt−k−1)))] and so no generality is lost by considering the randomized sequence of actions in our regret term. Another interpretation of the bigram conditional swap class is in the context of finite-state transducers. Taking a player’s sequence of actions x1 ... xT ), we may view each competitor function in the conditional swap class as an application of a finite-state transducer with N states, as illustrated by Figure 1. Each state encodes the history of actions xt−1 . . .  xt−k−1)) and admits N outgoing transitions representing the next action along with its possible modification. In this framework, the original swap regret class is simply a transducer with a single state. 3 3 Full Information Scenario Here, we prove that it is in fact possible to minimize k-gram conditional swap regret against an oblivious adversary, starting with the easier to interpret bigram scenario. Our proof constructs a meta-algorithm using external regret algorithms as subroutines, as in [4]. The key is to attribute a fraction of the loss to each external regret algorithm, so that these losses sum up to our actual realized loss and also press the subroutines to minimize regret against each of the conditional swaps. Theorem 2. There exists an online algorithm  with bigram swap regret bounded as follows: Reg2 T) ≤O  N√T log N  . Proof. Since the distribution pt at round t is finite-dimensional, we can represent it as a vector pt = pt 1 ... pt N). Similarly, since oblivious adversaries take only N arguments, we can write f t as the loss vector f t = f t 1 ... f t N). Let {at}T t=1 be a sequence of random variables denoting the player’s actions at each time t, and let δt at denote the (random) Dirac delta distribution concentrated at at and applied to variable xt. Then, we can rewrite the bigram swap regret as follows: Reg 2  T) = T  t=1  pt[f txt)] −min ϕ∈2 T  t=1  ptδt−1 at−1 [f tϕxt xt−1)] = T  t=1 N  i=1 pt if t i −min ϕ∈2 T  t=1 N  ij=1 pt iδt−1 {at−1=j}f t ϕij) Our algorithm for achieving sublinear regret is defined as follows: 1. At t = 1, initialize N 2 external regret minimizing algorithms Aik, i k) ∈N 2. We can view these in the form of N matrices in RN×N, {Qtk}N k=1, where for each k ∈{1 . . .  N}, Qtk i is a row vector consisting of the distribution weights generated by algorithm Aik at time t based on losses received at times 1 . . .  t −1. 2. At each time t, let at−1 denote the random action played at time t −1 and let δt−1 at−1 denote the (random) Dirac delta distribution for this action. Define the N × N matrix Qt = N k=1 δt−1 {at−1=k}Qtk. Qt is a Markov chain (i.e., its rows sum up to one), so it admits a stationary distribution pt which we we will use as our distribution for time t. 3. When we draw from pt, we play a random action at and receive loss f t. Attribute the portion of loss pt iδt−1 {at−1=k}f t to algorithm Aik, and generate distributions Qtk i . Notice that N ik=1 pt iδt−1 {at−1=k}f t = f t, so that the actual realized loss is allocated completely. Recall that an optimal external regret minimizing algorithm  (e.g. randomized weighted majority) admits a regret bound of the form Rik = RikLik min T N) = O  Lik min logN)  , where Lik min = minN j=1 T t=1 f tik j for the sequence of loss vectors {f tik}T t=1 incurred by the algorithm. Since pt = ptQt is a stationary distribution, we can write: T  t=1 pt · f t = T  t=1 N  j=1 pt jf t j = T  t=1 N  j=1 N  i=1 pt iQt ijf t j = T  t=1 N  j=1 N  i=1 pt i N  k=1 δt−1 {it−1=k}Qtk ij f t j. 4 Rearranging leads to T  t=1 pt · f t = N  ik=1 T  t=1 N  j=1 pt iδt−1 {it−1=k}Qtk ij f t j ≤ N  ik=1  T  t=1 pt iδt−1 {it−1=k}f t ϕik) + RikLmin T N) (for arbitrary ϕ: N 2 →N) = N  ik=1  T  t=1 pt iδt−1 {it−1=k}f t ϕik) + N  ik=1 RikLmin T N). Since ϕ is arbitrary, we obtain Reg 2  T) = T  t=1 pt · f t −min ϕ∈2 T  t=1 N  ik=1 pt iδt−1 {it−1=k}f t ϕik) ≤ N  ik=1 RikLmin T N). Using the fact that Rik = O  Lik min logN)  and that we scaled the losses to algorithm Aik by pt iδt−1 {it−1=k}, the following inequality holds: N k=1 N j=1 Lkj min ≤T. By Jensen’s inequality, this implies 1 N 2 N  k=1 N  j=1  Lkj min ≤ 1 N 2 N  k=1 N  j=1 Lkj min ≤ √ T N  or, equivalently, N k=1 N j=1  Lkj min ≤N √ T. Combining this with our regret bound yields Reg 2  T) ≤ N  ik=1 RikLmin T N) = N  ik=1 O  Lik min log N  ≤O N  T log N   which concludes the proof. Remark 1. The computational complexity of a standard external regret minimization algorithm such as randomized weighted majority per round is in ON) update the distribution on each of the N actions multiplicatively and then renormalize), which implies that updating the N 2 subroutines will cost ON 3) per round. Allocating losses to these subroutines and combining the distributions that they return will cost an additional ON 3) time. Finding the stationary distribution of a stochastic matrix can be done via matrix inversion in ON 3) time. Thus, the total computational complexity of achieving ON  T logN)) regret is only ON 3T). We remark that in practice, one often uses iterative methods to compute dominant eigenvalues see [16] for a standard reference and [11] for recent improvements). [10] has also studied techniques to avoid computing the exact stationary distribution at every iteration step for similar types of problems. The meta-algorithm above can be interpreted in three equivalent ways: (1) the player draws an action xt from distribution pt at time t; (2) the player uses distribution pt to choose among the N subsets of algorithms Qt 1 ... Qt N, picking one subset Qt j; next, after drawing j from pt, the player uses δt−1 {at−1=k} to randomly choose among the algorithms Qt1 j  ... QtN j , picking algorithm Qtat−1 j ; after locating this algorithm, the player uses the distribution from algorithm Qtat−1 j to draw an action; (3) the player chooses algorithm Qtk j with probability pt jδt−1 {at−1=k} and draws an action from its distribution. The following more general bound can be given for an arbitrary k-gram swap scenario. Theorem 3. There exists an online algorithm  with k-gram swap regret bounded as follows: Regk T) ≤O  N kT log N  . The algorithm used to derive this result is a straightforward extension of the algorithm provided in the bigram scenario, and the proof is given in Appendix 11. Remark 2. The computational complexity of achieving the above regret bound is ON k+1T). 5                   Figure 2: bigram conditional swap class restricted to a finite number of active states. When the action at time t −1 is 1 or 2, the transducer is in the same state, and the swap function is the same. 4 State­Dependent Bounds In some situations, it may not be relevant to consider conditional swaps for every possible action, either because of the specific problem at hand or simply for the sake of computational efficiency. Thus, for any S ⊆N 2, we define the following competitor class of functions: C2S = {ϕ: N 2 →N|ϕi k) = ˜ϕi) for i k) ∈S where ˜ϕ: N →N}. See Figure 2 for a transducer interpretation of this scenario. We will now show that the algorithm above can be easily modified to derive a tighter bound that is dependent on the number of states in our competitor class. We will focus on the bigram case, although a similar result can be shown for the general k-gram conditional swap regret. Theorem 4. There exists an online algorithm  such that Reg2 T) ≤ O  T|Sc| + N) logN)). The proof of this result is given in Appendix 10. Note that when S = ∅, we are in the scenario where all the previous states matter, and our bound coincides with that of the previous section. Remark 3. The computational complexity of achieving the above regret bound is ON|π1S)| + |Sc|) + N 3)T), where π1 is projection onto the first component. This follows from the fact that we allocate the same loss to all {Aik}k:ik)∈S ∀i ∈π1S), so we effectively only have to manage |π1S)| + |Sc| subroutines. 5 Conditional Correlated Equilibrium and ­Dominated Actions It is well-known that regret minimization in on-line learning is related to game-theoretic equilibria [14]. Specifically, when both players in a two-player zero-sum game follow external regret minimizing strategies, then the product of their individual empirical distributions converges to a Nash equilibrium. Moreover, if all players in a general K-player game follow swap regret minimizing strategies, then their empirical joint distribution converges to a correlated equilibrium [7]. We will show in this section that when all players follow conditional swap regret minimization strategies, then the empirical joint distribution will converge to a new stricter type of correlated equilibrium. Definition 1. Let Nk = {1 ... Nk}, for k ∈{1 ... K} and G = S = ×K k=1Nk {lk) : S → [0 1]}K k=1) denote a K-player game. Let s = s1 ... sK) ∈S denote the strategies of all players in one instance of the game, and let s−k) denote the K −1)-vector of strategies played by all players aside from player k. A joint distribution P on two rounds of this game is a conditional correlated equilibrium if for any player k, actions j j ∈Nk, and map ϕk : N 2 k →Nk, we have  sr)∈S2 : sk=jrk=j Ps r) lk)sk s−k)) −lk)ϕksk rk) s−k))  ≤0. The standard interpretation of correlated equilibrium, which was first introduced by Aumann, is a scenario where an external authority assigns mixed strategies to each player in such a way that no player has an incentive to deviate from the recommendation, provided that no other player deviates 6 from his [3]. In the context of repeated games, a conditional correlated equilibrium is a situation where an external authority assigns mixed strategies to each player in such a way that no player has an incentive to deviate from the recommendation in the second round, even after factoring in information from the previous round of the game, provided that no other player deviates from his. It is important to note that the concept of conditional correlated equilibrium presented here is different from the notions of extensive form correlated equilibrium and repeated game correlated equilibrium that have been studied in the game theory and economics literature [8, 12]. Notice that when the values taken for ϕk are indepndent of its second argument, we retrieve the familiar notion of correlated equilibrium. Theorem 5. Suppose that all players in a K-player repeated game follow bigram conditional swap regret minimizing strategies. Then, the joint empirical distribution of all players converges to a conditional correlated equilibrium. Proof. Let It ∈S be a random vector denoting the actions played by all K players in the game at round t. The empirical joint distribution of every two subsequent rounds of a K-player game played repeatedly for T total rounds has the form P T = 1 T T t=1  sr)∈S2 δ{It=sIt−1=r}, where I = I1 .. IK) and Ik ∼pk) denotes the action played by player k using the mixed strategy pk). Let qtk) denote δt−1 {it−1=k} ⊗pt−1k−1). Then, the conditional swap regret of each player k, regk T), can be bounded as follows since he is playing with a conditional swap regret minimizing strategy: regk T) = 1 T T  t=1  st k∼ptk)  lk)sk s−k))  −min ϕ 1 T T  t=1  st kst−1 k ) ∼ptk)qtk))  lk)ϕst k st−1 k ) st −k))  ≤O  N  logN) T  . Define the instantaneous conditional swap regret vector as rk) tj0j1 = δ{It k)=j0It−1 k) =j1} lk) It −lk) ϕkj0 j1) It −k)   and the expected instantaneous conditional swap regret vector as rk) tj0j1 = Pst k = j0)δ{It−1 k) =j1} lk) j0 It −k)  −lk) ϕkj0 j1) It −k)  . Consider the filtration Gt = {information of opponents at time t and of the player’s actions up to time t −1}. Then, we see that   rk) tj0j1|Gt  = rk) tj0j1. Thus, {Rt = rk) tj0j1 −rk) tj0j1}∞ t=1 is a sequence of bounded martingale differences, and by the Hoeffding-Azuma inequality, we can write for any α > 0, that P[| T t=1 Rt| > α] ≤2 exp−Cα2/T) for some constant C > 0. Now define the sets AT :=  1 T T t=1 Rt  >  C T log  2 δT  . By our concentration bound, we have PAT ) ≤δT . Setting δT = exp− √ T) and applying the Borel-Cantelli lemma, we obtain that lim supT →∞| 1 T T t=1 Rt| = 0 a.s.. Finally, since each player followed a conditional swap regret minimizing strategy, we can write lim supT →∞ 1 T T t=1 rk) tj0j1 ≤0. Now, if the empirical distribution did not converge to a conditional correlated equilibrium, then by Prokhorov’s theorem, there exists a subsequence { P Tj}j satisfying the conditional correlated equilibrium inequality but converging to some limit P ∗that is not a conditional correlated equilibrium. This cannot be true because the inequality is closed under weak limits. Convergence to equilibria over the course of repeated game-playing also naturally implies the scarcity of “very suboptimal” strategies. 7 Definition 2. An action pair sk rk) ∈N 2 k played by player k is conditionally #­dominated if there exists a map ϕk : N 2 k →Nk such that lk)sk s−k)) −lk)ϕksk rk) s−k)) ≥#. Theorem 6. Suppose player k follows a conditional swap regret minimizing strategy that produces a regret R over T instances of the repeated game. Then, on average, an action pair of player k is conditionally #-dominated at most R T fraction of the time. The proof of this result is provided in Appendix 12. 6 Bandit Scenario As discussed earlier, the bandit scenario differs from the full-information scenario in that the player only receives information about the loss of his action f txt) at each time and not the entire loss function f t. One standard external regret minimizing algorithm is the Exp3 algorithm introduced by [2], and it is the base learner off of which we will build a conditional swap regret minimizing algorithm. To derive a sublinear conditional swap regret bound, we require an external regret bound on Exp3: T  t=1  pt[f txt)] −min a∈N T  t=1 f ta) ≤2  LminN logN) which can be found in Theorem 3.1 of [5]. Using this estimate, we can derive the following result. Theorem 7. There exists an algorithm  such that Reg2bandit T) ≤O  N 3 logN)T  . The proof is given in Appendix 13 and is very similar to the proof for the full information setting. It can also easily be extended in the analogous way to provide a regret bound for the k-gram regret in the bandit scenario. Theorem 8. There exists an algorithm  such that Regkbandit T) ≤O  N k+1 logN)T  . See Appendix 14 for an outline of the algorithm. 7 Conclusion We analyzed the extent to which on-line learning scenarios are learnable. In contrast to some of the more recent work that has focused on increasing the power of the adversary (see e.g. [1]), we increased the power of the competitor class instead by allowing history-dependent action swaps and thereby extending the notion of swap regret. We proved that this stronger class of competitors can still be beaten in the sense of sublinear regret as long as the memory of the competitor is bounded. We also provided a state-dependent bound that gives a more favorable guarantee when only some parts of the history are considered. In the bigram setting, we introduced the notion of conditional correlated equilibrium in the context of repeated K-player games, and showed how it can be seen as a generalization of the traditional correlated equilibrium. We proved that if all players follow bigram conditional swap regret minimizing strategies, then the empirical joint distribution converges to a conditional correlated equilibrium and that no player can play very suboptimal strategies too often. Finally, we showed that sublinear conditional swap regret can also be achieved in the partial information bandit setting. 8 Acknowledgements We thank the reviewers for their comments, many of which were very insightful. We are particularly grateful to the reviewer who found an issue in our discussion on conditional correlated equilibrium and proposed a helpful resolution. This work was partly funded by the NSF award IIS-1117591. The material is also based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE 1342536. 8 References [1] Raman Arora, Ofer Dekel, and Ambuj Tewari. Online bandit learning against an adaptive adversary: from regret to policy regret. In ICML, 2012. [2] Peter Auer, Nicol`o Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77, 2002. [3] Robert J. Aumann. Subjectivity and correlation in randomized strategies. Journal of Mathematical Economics, 1(1):67–96, March 1974. [4] Avrim Blum and Yishay Mansour. From external to internal regret. Journal of Machine Learning Research, 8:1307–1324, 2007. [5] S´ebastien Bubeck and Nicol`o Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. CoRR, abs/1204.5721, 2012. [6] Nicol`o Cesa-Bianchi, Ofer Dekel, and Ohad Shamir. Online learning with switching costs and other adaptive adversaries. In NIPS, pages 1160–1168, 2013. [7] Nicol`o Cesa-Bianchi and G´abor Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [8] Francoise Forges. An approach to communication equilibria. Econometrica, 54(6):pp. 1375– 1385, 1986. [9] Dean P. Foster and Rakesh V. Vohra. Calibrated learning and correlated equilibrium. Games and Economic Behavior, 21(12):40 – 55, 1997. [10] Amy Greenwald, Zheng Li, and Warren Schudy. More efficient internal-regret-minimizing algorithms. In COLT, pages 239–250. Omnipress, 2008. [11] N. Halko, P. G. Martinsson, and J. A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Rev., 53(2):217–288, 2011. [12] Ehud Lehrer. Correlated equilibria in two-player repeated games with nonobservable actions. Mathematics of Operations Research, 17(1):pp. 175–199, 1992. [13] Nick Littlestone and Manfred K. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212–261, 1994. [14] Noam Nisan, Tim Roughgarden, ´Eva Tardos, and Vijay V. Vazirani. Algorithmic Game Theory. Cambridge University Press, New York, NY, USA, 2007. [15] Gilles Stoltz and G´abor Lugosi. Learning correlated equilibria in games with compact sets of strategies. Games and Economic Behavior, 59(1):187–208, 2007. [16] Lloyd N. Trefethen and David Bau. Numerical Linear Algebra. SIAM: Society for Industrial and Applied Mathematics, 1997. 9
2014
270
5,370
Gaussian Process Volatility Model Yue Wu Cambridge University wu5@post.harvard.edu Jos´e Miguel Hern´andez Lobato Cambridge University jmh233@cam.ac.uk Zoubin Ghahramani Cambridge University zoubin@eng.cam.ac.uk Abstract The prediction of time-changing variances is an important task in the modeling of financial data. Standard econometric models are often limited as they assume rigid functional relationships for the evolution of the variance. Moreover, functional parameters are usually learned by maximum likelihood, which can lead to overfitting. To address these problems we introduce GP-Vol, a novel non-parametric model for time-changing variances based on Gaussian Processes. This new model can capture highly flexible functional relationships for the variances. Furthermore, we introduce a new online algorithm for fast inference in GP-Vol. This method is much faster than current offline inference procedures and it avoids overfitting problems by following a fully Bayesian approach. Experiments with financial data show that GP-Vol performs significantly better than current standard alternatives. 1 Introduction Time series of financial returns often exhibit heteroscedasticity, that is the standard deviation or volatility of the returns is time-dependent. In particular, large returns (either positive or negative) are often followed by returns that are also large in size. The result is that financial time series frequently display periods of low and high volatility. This phenomenon is known as volatility clustering [1]. Several univariate models have been proposed in the literature for capturing this property. The best known and most popular is the Generalised Autoregressive Conditional Heteroscedasticity model (GARCH) [2]. An alternative to GARCH are stochastic volatility models [3]. However, there is no evidence that SV models have better predictive performance than GARCH [4, 5, 6]. GARCH has further inspired a host of variants and extensions. A review of many of these models can be found in [7]. Most of these GARCH variants attempt to address one or both limitations of GARCH: a) the assumption of a linear dependency between current and past volatilities, and b) the assumption that positive and negative returns have symmetric effects on volatility. Asymmetric effects are often observed, as large negative returns often send measures of volatility soaring, while this effect is smaller for large positive returns [8, 9]. Finally, there are also extensions that use additional data besides daily closing prices to improve volatility predictions [10]. Most solutions proposed in these variants of GARCH involve: a) introducing nonlinear functional relationships for the evolution of volatility, and b) adding asymmetric effects in these functional relationships. However, the GARCH variants do not fundamentally address the problem that the specific functional relationship of the volatility is unknown. In addition, these variants can have a high number of parameters, which may lead to overfitting when using maximum likelihood learning. More recently, volatility modeling has received attention within the machine learning community, with the development of copula processes [11] and heteroscedastic Gaussian processes [12]. These 1 models leverage the flexibility of Gaussian Processes [13] to model the unknown relationship between the variances. However, these models do not address the asymmetric effects of positive and negative returns on volatility. We introduce a new non-parametric volatility model, called the Gaussian Process Volatility Model (GP-Vol). This new model is more flexible, as it is not limited by a fixed functional form. Instead, a non-parametric prior distribution is placed on possible functions, and the functional relationship is learned from the data. This allows GP-Vol to explicitly capture the asymmetric effects of positive and negative returns on volatility. Our new volatility model is evaluated in a series of experiments with real financial returns, and compared against popular econometric models, namely, GARCH, EGARCH [14] and GJR-GARCH [15]. In these experiments, GP-Vol produces the best overall predictions. In addition to this, we show that the functional relationship learned by GP-Vol often exhibits the nonlinear and asymmetric features that previous models attempt to capture. The second main contribution of the paper is the development of an online algorithm for learning GP-Vol. GP-Vol is an instance of a Gaussian Process State Space Model (GP-SSM). Previous work on GP-SSMs [16, 17, 18] has mainly focused on developing approximation methods for filtering and smoothing the hidden states in GP-SSM, without jointly learning the GP transition dynamics. Only very recently have Frigola et al. [19] addressed the problem of learning both the hidden states and the transition dynamics by using Particle Gibbs with Ancestor Sampling (PGAS) [20]. In this paper, we introduce a new online algorithm for performing inference on GP-SSMs. Our algorithm has similar predictive performance as PGAS on financial data, but is much faster. 2 Review of GARCH and GARCH variants The standard variance model for financial data is GARCH. GARCH assumes a Gaussian observation model and a linear transition function for the variance: the time-varying variance σ2 t is linearly dependent on p previous variance values and q previous squared time series values, that is, xt∼N(0, σ2 t ) , and σ2 t = α0 + Pq j=1 αjx2 t−j + Pp i=1 βiσ2 t−i , (1) where xt are the values of the return time series being modeled. This model is flexible and can produce a variety of clustering behaviors of high and low volatility periods for different settings of α1, . . . , αq and β1, . . . , βp. However, it has several limitations. First, only linear relationships between σ2 t−p:t−1 and σ2 t are allowed. Second, past positive and negative returns have the same effect on σ2 t due to the quadratic term x2 t−j. However, it is often observed that large negative returns lead to larger rises in volatility than large positive returns [8, 9]. A more flexible and often cited GARCH extension is Exponential GARCH (EGARCH) [14]. The equation for σ2 t is now: log(σ2 t ) = α0 + Pq j=1 αjg(xt−j) + Pp i=1 βi log(σ2 t−i) , where g(xt) = θxt + λ |xt| . (2) Asymmetry in the effects of positive and negative returns is introduced through the function g(xt). If the coefficient θ is negative, negative returns will increase volatility, while the opposite will happen if θ is positive. Another GARCH extension that models asymmetric effects is GJR-GARCH [15]: σ2 t = α0 + Pq j=1 αjx2 t−j + Pp i=1 βiσ2 t−i + Pr k=1 γkx2 t−kIt−k , (3) where It−k = 0 if xt−k ≥0 and It−k = 1 otherwise. The asymmetric effect is now captured by It−k, which is nonzero if xt−k < 0. 3 Gaussian process state space models GARCH, EGARCH and GJR-GARCH can be all represented as General State-Space or Hidden Markov models (HMM) [21, 22], with the unobserved dynamic variances being the hidden states. Transition functions for the hidden states are fixed and assumed to be linear in these models. The linear assumption limits the flexibility of these models. More generally, a non-parametric approach can be taken where a Gaussian Process (GP) prior is placed on the transition function, so that its functional form can be learned from data. This Gaussian Process state space model (GP-SSM) is a generalization of HMM. GP-SSM and HMM differ in two main ways. First, in HMM the transition function has a fixed functional form, while in GP-SSM 2 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 3 Number of Observations truth GP−Vol 5% GP−Vol 95% 0 20 40 60 80 100 −0.5 0 0.5 1 1.5 2 2.5 Number of Observations truth GP−Vol 5% GP−Vol 95% Figure 1: Left, graphical model for GP-Vol. The transitions of the hidden states vt is represented by the unknown function f. f takes as inputs the previous state vt−1 and previous observation xt−1. Middle, 90% posterior interval for a. Right, 90% posterior interval for b. it is represented by a GP. Second, in GP-SSM the states do not have Markovian structure once the transition function is marginalized out. The flexibility of GP-SSMs comes at a cost: inference in GP-SSMs is computationally challenging. Because of this, most of the previous work on GP-SSMs [16, 17, 18] has focused on filtering and smoothing the hidden states in GP-SSM, without jointly learning the GP dynamics. Note that in [18], the authors learn the dynamics, but using a separate dataset in which both input and target values for the GP model are observed. A few papers considered learning both the GP dynamics and the hidden states for special cases of GP-SSMs. For example, [23] applied EM to obtain maximum likelihood estimates for parametric systems that can be represented by GPs. A general method has been recently proposed for joint inference on the hidden states and the GP dynamics using Particle Gibbs with Ancestor Sampling (PGAS) [20, 19]. However, PGAS is a batch MCMC inference method that is computationally very expensive. 4 Gaussian process volatility model Our new Gaussian Process Volatility Model (GP-Vol) is an instance of GP-SSM: xt ∼N(0, σ2 t ) , vt := log(σ2 t ) = f(vt−1, xt−1) + ϵt , ϵt ∼N(0, σ2 n) . (4) Note that we model the logarithm of the variance, which has real support. Equation (4) defines a GP-SMM. We place a GP prior on the transition function f. Let zt = (vt, xt). Then f ∼ GP(m, k) where m(zt) and k(zt, z′ t) are the GP mean and covariance functions, respectively. The mean function can encode prior knowledge of the system dynamics. The covariance function gives the prior covariance between function values: k(zt, z′ t) = Cov(f(zt), f(z′ t)) . Intuitively if zt and z′ t are close to each other, the covariances between the corresponding function values should be large: f(zt) and f(z′ t) should be highly correlated. The graphical model for GP-Vol is given in Figure 1. The explicit dependence of transition function values on the previous return xt−1 enables GP-Vol to model the asymmetric effects of positive and negative returns on the variance evolution. GP-Vol can be extended to depend on p previous log variances and q past returns like in GARCH(p,q). In this case, the transition would be of the form vt = f(vt−1, vt−2, ..., vt−p, xt−1, xt−2, ..., xt−q) + ϵt. 5 Bayesian inference in GP-Vol In the standard GP regression setting, the inputs and targets are fully observed and f can be learned using exact Bayesian inference [13]. However, this is not the case in GP-Vol, where the unknown {vt} form part of the inputs and all the targets. Let θ denote the model hyper-parameters and let f = [f(v1), . . . , f(vT )]. Directly learning the joint posterior of the unknown variables f, v1:T and θ is a challenging task. Fortunately, the posterior p(vt|θ, x1:t), where f has been marginalized out, can be approximated with particles [24]. We first describe a standard sequential Monte Carlo (SMC) particle filter to learn this posterior. Let {vi 1:t−1}N i=1 be particles representing chains of states up to t−1 with corresponding normalized weights W i t−1. The posterior p(v1:t−1|θ, x1:t−1) is then approximated by ˆp(v1:t−1|θ, x1:t−1) = PN i=1 W i t−1δvi 1:t−1(v1:t−1) . (5) 3 The corresponding posterior for v1:t can be approximated by propagating these particles forward. For this, we propose new states from the GP-Vol transition model and then we importance-weight them according to the GP-Vol observation model. Specifically, we resample particles vj 1:t−1 from (5) according to their weights W j t−1, and propagate the samples forward. Then, for each of the particles propagated forward, we propose vj t from p(vt|θ, vj 1:t−1, x1:t−1), which is the GP predictive distribution. The proposed particles are then importance-weighted according to the observation model, that is, W j t ∝p(xt|θ, vj t ) = N(xt|0, exp{vj t }). The above setup assumes that θ is known. To learn these hyper-parameters, we can also encode them in particles and filter them together with the hidden states. However, since θ is constant across time, naively filtering such particles without regeneration will fail due to particle impoverishment, where a few or even one particle receives all the weight. To solve this problem, the Regularized Auxiliary Particle Filter (RAPF) regenerates parameter particles by performing kernel smoothing operations [25]. This introduces artificial dynamics and estimation bias. Nevertheless, RAPF has been shown to produce state-of-the-art inference in multivariate parametric financial models [6]. RAPF was designed for HMMs, but GP-Vol is non-Markovian once f is marginalized out. Therefore, we design a new version of RAPF for non-Markovian systems and refer to it as the Regularized Auxiliary Particle Chain Filter (RAPCF), see Algorithm 1. There are two main parts in RAPCF. First, there is the Auxiliary Particle Filter (APF) part in lines 5, 6 and 7 of the pseudocode [26]. This part selects particles associated with high expected likelihood, as given by the new expected state in (7) and the corresponding resampling weight in (8). This bias towards particles with high expected likelihood is eliminated when the final importance weights are computed in (9). The most promising particles are propagated forward in lines 8 and 9. The main difference between RAPF and RAPCF is in the effect that previous states vi 1:t−1 have in the propagation of particles. In RAPCF all the previous states determine the probabilities of the particles being propagated, as the model is non-Markovian, while in RAPF these probabilities are only determined by the last state vi t−1. The second part of RAPCF avoids particle impoverishment in θ. For this, new particles are generated in line 10 by sampling from a Gaussian kernel. The over-dispersion introduced by these artificial dynamics is eliminated in (6) by shrinking the particles towards their empirical average. We fix the shrinking parameter λ to be 0.95. In practice, we found little difference in predictions when we varied λ from 0.99 to 0.95. RAPCF has limitations similar to those of RAPF. First, it introduces bias as sampling from the kernel adds artificial dynamics. Second, RAPCF only filters forward and does not smooth backward. Consequently, there will be impoverishment in distant ancestors vt−L, since these states are not regenerated. When this occurs, GP-Vol will consider the collapsed ancestor states as inputs with little uncertainty and the predictive variance near these inputs will be underestimated. These issues can be addressed by adopting a batch MCMC approach. In particular, Particle Markov Chain Monte Carlo (PMCMC) procedures [24] established a framework for learning the states and the parameters in general state space models. Additionally, [20] developed a PMCMC algorithm called Particle Gibbs with ancestor sampling (PGAS) for learning non-Markovian state space models. PGAS was applied by [19] to learn GP-SSMs. These batch MCMC methods are computationally much more expensive than RAPCF. Furthermore, our experiments show that in the GP-Vol model, RAPCF and PGAS have similar empirical performance, while RAPCF is orders of magnitude faster than PGAS. This indicates that the aforementioned issues have limited impact in practice. 6 Experiments We performed three sets of experiments. First, we tested on synthetic data whether we can jointly learn the hidden states and transition dynamics in GP-Vol using RAPCF. Second, we compared the performance of GP-Vol against standard econometric models GARCH, EGARCH and GJRGARCH on fifty real financial time series. Finally, we compared RAPCF with the batch MCMC method PGAS in terms of accuracy and execution time. The code for RAPCF in GP-Vol is publicly available at http://jmhl.org. 6.1 Experiments with synthetic data We generated ten synthetic datasets of length T = 100 according to (4). The transition function f is sampled from a GP prior specified with a linear mean function and a squared exponential covariance 4 Algorithm 1 RAPCF 1: Input: data x1:T , number of particles N, shrinkage parameter 0 < λ < 1, prior p(θ). 2: Sample N parameter particles from the prior: {θi 0}i=1,...,N ∼p(θ). 3: Set initial importance weights, W i 0 = 1/N. 4: for t = 1 to T do 5: Shrink parameter particles towards their empirical mean ¯θt−1 = PN i=1 W i t−1θi t−1 by setting eθi t = λθi t−1 + (1 −λ)¯θt−1 . (6) 6: Compute the new expected states: µi t = E(vt|eθi t, vi 1:t−1, x1:t−1) . (7) 7: Compute importance weights proportional to the likelihood of the new expected states: gi t ∝W i t−1p(xt|µi t, eθi t) . (8) 8: Resample N auxiliary indices {j} according to weights {gi t}. 9: Propagate the corresponding chains of hidden states forward, that is, {vj 1:t−1}j∈J. 10: Add jitter: θj t ∼N(eθj t , (1 −λ2)Vt−1), where Vt−1 is the empirical covariance of θt−1. 11: Propose new states vj t ∼p(vt|θj t , vj 1:t−1, x1:t−1). 12: Compute importance weights adjusting for the modified proposal: W j t ∝p(xt|vj t , θj t )/p(xt|µj t, eθj t ) , (9) 13: end for 14: Output: particles for chains of states vj 1:T , particles for parameters θj t and particle weights W j t . function. The linear mean function is E(vt) = m(vt−1, xt−1) = avt−1 + bxt−1. The squared exponential covariance function is k(y, z) = γ exp(−0.5|y −z|2/l2) where l is the length-scale parameter and γ is the amplitude parameter. We used RAPCF to learn the hidden states v1:T and the hyper-parameters θ = (a, b, σn, γ, l) using non-informative diffuse priors for θ. In these experiments, RAPCF successfully recovered the state and the hyper-parameter values. For the sake of brevity, we only include two typical plots of the 90% posterior intervals for hyper-parameters a and b in the middle and right of Figures 1. The intervals are estimated from the filtered particles for a and b at each time step t. In both plots, the posterior intervals eventually concentrate around the true parameter values, shown as dotted blue lines. 6.2 Experiments with real data We compared the predictive performances of GP-Vol, GARCH, EGARCH and GJR-GARCH on real financial datasets. We used GARCH(1,1), EGARCH(1,1) and GJR-GARCH(1,1,1) models since these variants have the least number of parameters and are consequently less affected by overfitting problems. We considered fifty datasets, consisting of thirty daily Equity and twenty daily foreign exchange (FX) time series. For the Equity series, we used daily closing prices. For FX, which operate 24h a day, with no official daily closing prices, we cross-checked different pricing sources and took the consensus price up to 4 decimal places at 10am New York, which is the time with most market liquidity. Each of the resulting time series contains a total of T = 780 observations from January 2008 to January 2011. The price data p1:T was pre-processed to eliminate prices corresponding to times when markets were closed or not liquid. After this, prices were converted into logarithmic returns, xt = log(pt/pt−1). Finally, the resulting returns were standardized to have zero mean and unit standard deviation. During the experiments, each method receives an initial time series of length 100. The different models are trained on that data and then a one-step forward prediction is made. The performance of each model is measured in terms of the predictive log-likelihood on the first return out of the training set. Then the training set is augmented with the new observation and the training and prediction steps are repeated. The whole process is repeated sequentially until no further data is received. GARCH, EGARCH and GJR-GARCH were implemented using numerical optimization routines provided by Kevin Sheppard 1. A relatively long initial time series of length 100 was needed to to train these models. Using shorter initial data resulted in wild jumps in the maximum likelihood 1http:///www.kevinsheppard.com/wiki/UCSD_GARCH/ 5 1 2 3 4 EGARCH GARCH GP−VOL GJR CD Nemenyi Test Figure 2: Comparison between GP-Vol, GARCH, EGARCH and GJR-GARCH via a Nemenyi test. The figure shows the average rank across datasets of each method (horizontal axis). The methods whose average ranks differ more than a critical distance (segment labeled CD) show significant differences in performance at this confidence level. When the performances of two methods are statistically different, their corresponding average ranks appear disconnected in the figure. estimates of the model parameters. These large fluctuations produced very poor one-step forward predictions. By contrast, GP-Vol is less susceptible to overfitting since it approximates the posterior distribution using RAPCF instead of finding point estimates of the model parameters. We placed broad non-informative priors on θ = (a, b, σn, γ, l) and used N = 200 particles and shrinkage parameter λ = .95 in RAPCF. Dataset GARCH EGARCH GJR GP-Vol AUDUSD −1.303 −1.514 −1.305 −1.297 BRLUSD −1.203 −1.227 −1.201 −1.180 CADUSD −1.402 −1.409 −1.402 −1.386 CHFUSD −1.375 −1.404 −1.404 −1.359 CZKUSD −1.422 −1.473 −1.422 −1.456 EURUSD −1.418 −2.120 −1.426 −1.403 GBPUSD −1.382 −3.511 −1.386 −1.385 IDRUSD −1.223 −1.244 −1.209 −1.039 JPYUSD −1.350 −2.704 −1.355 −1.347 KRWUSD −1.189 −1.168 −1.209 −1.154 MXNUSD −1.220 −3.438 −1.278 −1.167 MYRUSD −1.394 −1.412 −1.395 −1.392 NOKUSD −1.416 −1.567 −1.419 −1.416 NZDUSD −1.369 −3.036 −1.379 −1.389 PLNUSD −1.395 −1.385 −1.382 −1.393 SEKUSD −1.403 −3.705 −1.402 −1.407 SGDUSD −1.382 −2.844 −1.398 −1.393 TRYUSD −1.224 −1.461 −1.238 −1.236 TWDUSD −1.384 −1.377 −1.388 −1.294 ZARUSD −1.318 −1.344 −1.301 −1.304 Table 1: FX series. Dataset GARCH EGARCH GJR GP-Vol A −1.304 −1.449 −1.281 −1.282 AA −1.228 −1.280 −1.230 −1.218 AAPL −1.234 −1.358 −1.219 −1.212 ABC −1.341 −1.976 −1.344 −1.337 ABT −1.295 −1.527 −1.3003 −1.302 ACE −1.084 −2.025 −1.106 −1.073 ADBE −1.335 −1.501 −1.386 −1.302 ADI −1.373 −1.759 −1.352 −1.356 ADM −1.228 −1.884 −1.223 −1.223 ADP −1.229 −1.720 −1.205 −1.211 ADSK −1.345 −1.604 −1.340 −1.316 AEE −1.292 −1.282 −1.263 −1.166 AEP −1.151 −1.177 −1.146 −1.142 AES −1.237 −1.319 −1.234 −1.197 AET −1.285 −1.302 −1.269 −1.246 Table 2: Equity series 1-15. Dataset GARCH EGARCH GJR GP-Vol AFL −1.057 −1.126 −1.061 −0.997 AGN −1.270 −1.338 −1.261 −1.274 AIG −1.151 −1.256 −1.195 −1.069 AIV −1.111 −1.147 −1.1285 −1.133 AIZ −1.423 −1.816 −1.469 −1.362 AKAM −1.230 −1.312 −1.229 −1.246 AKS −1.030 −1.034 −1.052 −1.015 ALL −1.339 −3.108 −1.316 −1.327 ALTR −1.286 −1.443 −1.277 −1.282 AMAT −1.319 −1.465 −1.332 −1.310 AMD −1.342 −1.348 −1.332 −1.243 AMGN −1.191 −1.542 −1.1772 −1.189 AMP −1.386 −1.444 −1.365 −1.317 AMT −1.206 −1.820 −1.3658 −1.210 AMZN −1.206 −1.567 −1.3537 −1.342 Table 3: Equity series 16-30. We show the average predictive log-likelihood of GP-Vol, GARCH, EGARCH and GJR-GARCH in tables 1, 2 and 3 for the FX series, the first 15 Equity series and the last 15 Equity series, respectively. The results of the best performing method in each dataset have been highlighted in bold. These tables show that GP-Vol obtains the highest predictive log-likelihood in 29 of the 50 analyzed datasets. We perform a statistical test to determine whether differences among GP-Vol, GARCH, EGARCH and GJR-GARCH are significant. These methods are compared against each other using the multiple comparison approach described by [27]. In this comparison framework, all the methods are ranked according to their performance on different tasks. Statistical tests are then applied to determine whether the differences among the average ranks of the methods are significant. In our case, each of the 50 datasets analyzed represents a different task. A Friedman rank sum test rejects the hypothesis that all methods have equivalent performance at α = 0.05 with p-value less than 10−15. Pairwise comparisons between all the methods with a Nemenyi test at a 95% confidence level are summarized in Figure 2. The Nemenyi test shows that GP-Vol is significantly better than the other methods. The other main advantage of GP-Vol over existing models is that it can learn the functional relationship f between the new log variance vt and the previous log variance vt−1 and previous return xt−1. We plot a typical log variance surface in the left of Figure 3. This surface is generated by plotting the mean predicted outputs vt against a grid of inputs for vt−1 and xt−1. For this, we use the functional dynamics learned with RAPCF on the AUDUSD time series. AUDUSD stands for the amount of US dollars that an Australian dollar can buy. The grid of inputs is designed to contain a range of values experienced by AUDUSD from 2008 to 2011, which is the period covered by the data. The surface is colored according to the standard deviation of the posterior predictive distribution for the log variance. Large standard deviations correspond to uncertain predictions, and are redder. 6 −2 0 2 4 −5 0 5 −4 −2 0 2 4 input, vt−1 Log Variance Surface for AUDUSD input, xt−1 output, vt 0.1 0.15 0.2 0.25 0.3 0.35 −6 −4 −2 0 2 4 6 −5 −4 −3 −2 −1 0 1 2 3 4 Cross section vt vs vt−1 vt−1 vt −6 −4 −2 0 2 4 6 0 0.5 1 1.5 2 xt−1 vt Cross section vt vs xt−1 Figure 3: Left, surface generated by plotting the mean predicted outputs vt against a grid of inputs for vt−1 and xt−1. Middle, predicted vt ± 2 s.d. for inputs (0, xt−1). Right, predicted vt ± 2 s.d. for inputs (0, xt−1). The plot in the left of Figure 3 shows several patterns. First, there is an asymmetric effect of positive and negative previous returns xt−1. This can be seen in the skewness and lack of symmetry of the contour lines with respect to the vt−1 axis. Second, the relationship between vt−1 and vt is slightly non-linear because the distance between consecutive contour lines along the vt−1 axis changes as we move across those lines, especially when xt−1 is large. In addition, the relationship between xt−1 and vt is nonlinear, but some sort of skewed quadratic function. These two patterns confirm the asymmetric effect and the nonlinear transition function that EGARCH and GJR-GARCH attempt to model. Third, there is a dip in predicted log variance for vt−1 < −2 and −1 < xt−1 < 2.5. Intuitively this makes sense, as it corresponds to a calm market environment with low volatility. However, as xt−1 becomes more extreme the market becomes more turbulent and vt increases. To further understand the transition function f we study cross sections of the log variance surface. First, vt is predicted for a grid of vt−1 and xt−1 = 0 in the middle plot of Figure 3. Next, vt is predicted for various xt−1 and vt−1 = 0 in the right plot of Figure 3. The confidence bands in the figures correspond to the mean prediction ±2 standard deviations. These cross sections confirm the nonlinearity of the transition function and the asymmetric effect of positive and negative returns on the log variance. The transition function is slightly non-linear as a function of vt−1 as the band in the middle plot of Figure 3 passes through (−2, −2) and (0, 0), but not (2, 2). Surprisingly, we observe in the right plot of Figure 3 that large positive xt−1 produces larger vt when vt−1 = 0 since the band is slightly higher at xt−1 = 6 than at xt−1 = −6. However, globally, the highest predicted vt occurs when vt−1 > 5 and xt−1 < −5, as shown in the surface plot. 6.3 Comparison between RAPCF and PGAS We now analyze the potential shortcomings of RAPCF that were discussed in Section 5. For this, we compare RAPCF against PGAS on the twenty FX time series from the previous section in terms of predictive log-likelihood and execution times. The RAPCF setup is the same as in Section 6.2. For PGAS, which is a batch method, the algorithm is run on initial training data x1:L, with L = 100, and a one-step forward prediction is made. The predictive log-likelihood is evaluated on the next observation out of the training set. Then the training set is augmented with the new observation and the batch training and prediction steps are repeated. The process is repeated sequentially until no further data is received. For these experiments we used shorter time series with T = 120 since PGAS is computationally very expensive. Note that we cannot simply learn the GP-SSM dynamics on a small set of training data and then predict on a large test dataset, as it was done in [19]. These authors were able to predict forward as they were using synthetic data with known “hidden” states. We analyze different settings of RAPCF and PGAS. In RAPCF we use N = 200 particles since that number was used to compare against GARCH, EGARCH and GJR-GARCH in the previous section. PGAS has two parameters: a) N, the number of particles and b) M, the number of iterations. Three combinations of these settings were used. The resulting average predictive log-likelihoods for RAPCF and PGAS are shown in Table 4. On each dataset, the results of the best performing method 7 have been highlighted in bold. The average rank of each method across the analyzed datasets is shown in Table 5. From these tables, there is no evidence that PGAS outperforms RAPCF on these financial datasets, since there is no clear predictive edge of any PGAS setting over RAPCF. RAPCF PGAS.1 PGAS.2 PGAS.3 N = 200 N = 10 N = 25 N = 10 Dataset M = 100 M = 100 M = 200 AUDUSD −1.1205 −1.0571 −1.0699 −1.0936 BRLUSD −1.0102 −1.0043 −0.9959 −0.9759 CADUSD −1.4174 −1.4778 −1.4514 −1.4077 CHFUSD −1.8431 −1.8536 −1.8453 −1.8478 CZKUSD −1.2263 −1.2357 −1.2424 −1.2093 EURUSD −1.3837 −1.4586 −1.3717 −1.4064 GBPUSD −1.1863 −1.2106 −1.1790 −1.1729 IDRUSD −0.5446 −0.5220 −0.5388 −0.5463 JPYUSD −2.0766 −1.9286 −2.1585 −2.1658 KRWUSD −1.0566 −1.1212 −1.2032 −1.2066 MXNUSD −0.2417 −0.2731 −0.2271 −0.2538 MYRUSD −1.4615 −1.5464 −1.4745 −1.4724 NOKUSD −1.3095 −1.3443 −1.3048 −1.3169 NZDUSD −1.2254 −1.2101 −1.2366 −1.2373 PLNUSD −0.8972 −0.8704 −0.8708 −0.8704 SEKUSD −1.0085 −1.0085 −1.0505 −1.0360 SGDUSD −1.6229 −1.9141 −1.7566 −1.7837 TRYUSD −1.8336 −1.8509 −1.8352 −1.8553 TWDUSD −1.7093 −1.7178 −1.8315 −1.7257 ZARUSD −1.3236 −1.3326 −1.3440 −1.3286 Table 4: Results for RAPCF vs. PGAS. Method Configuration Rank RAPCF N = 200 2.025 PGAS.1 N = 10, M = 100 2.750 PGAS.2 N = 25, M = 100 2.550 PGAS.3 N = 10, M = 200 2.675 Table 5: Average ranks. Method Configuration Avg. Time RAPCF N = 200 6 PGAS.1 N = 10, M = 100 732 PGAS.2 N = 25, M = 100 1832 PGAS.3 N = 10, M = 200 1465 Table 6: Avg. running time. As mentioned above, there is little difference between the predictive accuracies of RAPCF and PGAS. However, PGAS is computationally much more expensive. We show average execution times in minutes for RAPCF and PGAS in Table 6. Note that RAPCF is up to two orders of magnitude faster than PGAS. The cost of this latter method could be reduced by using fewer particles N or fewer iterations M, but this would also reduce its predictive accuracy. Even after doing so, PGAS would still be more costly than RAPCF. RAPCF is also competitive with GARCH, EGARCH and GJR, whose average training times are in this case 2.6, 3.5 and 3.1 minutes, respectively. A naive implementation of RAPCF has cost O(NT 4), since at each time step t there is a O(T 3) cost from the inversion of the GP covariance matrix. On the other hand, the cost of applying PGAS naively is O(NMT 5), since for each batch of data x1:t there is a O(NMT 4) cost. These costs can be reduced to be O(NT 3) and O(NMT 4) for RAPCF and PGAS respectively by doing rank one updates of the inverse of the GP covariance matrix at each time step. The costs can be further reduced by a factor of T 2 by using sparse GPs [28]. 7 Summary and discussion We have introduced a novel Gaussian Process Volatility model (GP-Vol) for time-varying variances in financial time series. GP-Vol is an instance of a Gaussian Process State-Space model (GP-SSM) which is highly flexible and can model nonlinear functional relationships and asymmetric effects of positive and negative returns on time-varying variances. In addition, we have presented an online inference method based on particle filtering for GP-Vol called the Regularized Auxiliary Particle Chain Filter (RAPCF). RAPCF is up to two orders of magnitude faster than existing batch Particle Gibbs methods. Results for GP-Vol on 50 financial time series show significant improvements in predictive performance over existing models such as GARCH, EGARCH and GJR-GARCH. Finally, the nonlinear transition functions learned by GP-Vol can be easily analyzed to understand the effect of past volatility and past returns on future volatility. For future work, GP-Vol can be extended to learn the functional relationship between a financial instrument’s volatility, its price and other market factors, such as interest rates. The functional relationship thus learned can be useful in the pricing of volatility derivatives on the instrument. Additionally, the computational efficiency of RAPCF makes it an attractive choice for inference in other GP-SSMs different from GP-Vol. For example, RAPCF could be more generally applied to learn the hidden states and the dynamics in complex control systems. 8 References [1] R. Cont. Empirical properties of asset returns: Stylized facts and statistical issues. Quantitative Finance, 1(2):223–236, 2001. [2] T. Bollerslev. Generalized autoregressive conditional heteroskedasticity. Journal of econometrics, 31(3):307–327, 1986. [3] A. Harvey, E. Ruiz, and N. Shephard. Multivariate stochastic variance models. The Review of Economic Studies, 61(2):247–264, 1994. [4] S. Kim, N. Shephard, and S. Chib. Stochastic volatility: likelihood inference and comparison with ARCH models. The Review of Economic Studies, 65(3):361–393, 1998. [5] S.H. Poon and C. Granger. Practical issues in forecasting volatility. Financial Analysts Journal, 61(1):45– 56, 2005. [6] Y. Wu, J. M. Hern´andez-Lobato, and Z. Ghahramani. Dynamic covariance models for multivariate financial time series. In ICML, pages 558–566, 2013. [7] L. Hentschel. All in the family nesting symmetric and asymmetric GARCH models. Journal of Financial Economics, 39(1):71–104, 1995. [8] G. Bekaert and G. Wu. Asymmetric volatility and risk in equity markets. Review of Financial Studies, 13(1):1–42, 2000. [9] J.Y. Campbell and L. Hentschel. No news is good news: An asymmetric model of changing volatility in stock returns. Journal of financial Economics, 31(3):281–318, 1992. [10] M.W. Brandt and C.S. Jones. Volatility forecasting with range-based EGARCH models. Journal of Business & Economic Statistics, 24(4):470–486, 2006. [11] A. Wilson and Z. Ghahramani. Copula processes. In Advances in Neural Information Processing Systems 23, pages 2460–2468. 2010. [12] M. L´azaro-Gredilla and M. K. Titsias. Variational heteroscedastic Gaussian process regression. In ICML, pages 841–848, 2011. [13] C.E. Rasmussen and C.K.I. Williams. Gaussian processes for machine learning. Springer, 2006. [14] D.B. Nelson. Conditional heteroskedasticity in asset returns: A new approach. Econometrica, 59(2):347– 370, 1991. [15] L.R. Glosten, R. Jagannathan, and D.E. Runkle. On the relation between the expected value and the volatility of the nominal excess return on stocks. The Journal of Finance, 48(5):1779–1801, 1993. [16] J. Ko and D. Fox. GP-BayesFilters: Bayesian filtering using Gaussian process prediction and observation models. Autonomous Robots, 27(1):75–90, 2009. [17] M. P. Deisenroth, M. F. Huber, and U. D. Hanebeck. Analytic moment-based Gaussian process filtering. In ICML, pages 225–232. ACM, 2009. [18] M. Deisenroth and S. Mohamed. Expectation Propagation in Gaussian Process Dynamical Systems. In Advances in Neural Information Processing Systems 25, pages 2618–2626, 2012. [19] R. Frigola, F. Lindsten, T. B. Sch¨on, and C. E. Rasmussen. Bayesian inference and learning in Gaussian process state-space models with particle MCMC. In NIPS, pages 3156–3164. 2013. [20] F. Lindsten, M. Jordan, and T. Sch¨on. Ancestor Sampling for Particle Gibbs. In Advances in Neural Information Processing Systems 25, pages 2600–2608, 2012. [21] L.E. Baum and T. Petrie. Statistical inference for probabilistic functions of finite state Markov chains. The Annals of Mathematical Statistics, 37(6):1554–1563, 1966. [22] A. Doucet, N. De Freitas, and N. Gordon. Sequential Monte Carlo methods in practice. Springer Verlag, 2001. [23] R. D. Turner, M. P. Deisenroth, and C. E. Rasmussen. State-space inference and learning with Gaussian processes. In AISTATS, pages 868–875, 2010. [24] C. Andrieu, A. Doucet, and R. Holenstein. Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3):269–342, 2010. [25] J. Liu and M. West. Combined parameter and state estimation in simulation-based filtering. Institute of Statistics and Decision Sciences, Duke University, 1999. [26] M.K. Pitt and N. Shephard. Filtering via simulation: Auxiliary particle filters. Journal of the American Statistical Association, pages 590–599, 1999. [27] J. Demˇsar. Statistical comparisons of classifiers over multiple data sets. Journal of Machine Learning Research, 7:1–30, 2006. [28] J. Qui˜nonero-Candela and C.E. Rasmussen. A unifying view of sparse approximate Gaussian process regression. The Journal of Machine Learning Research, 6:1939–1959, 2005. 9
2014
271
5,371
Fast Sampling-Based Inference in Balanced Neuronal Networks Guillaume Hennequin1 gjeh2@cam.ac.uk Laurence Aitchison2 laurence@gatsby.ucl.ac.uk M´at´e Lengyel1 m.lengyel@eng.cam.ac.uk 1Computational & Biological Learning Lab, Dept. of Engineering, University of Cambridge, UK 2Gatsby Computational Neuroscience Unit, University College London, UK Abstract Multiple lines of evidence support the notion that the brain performs probabilistic inference in multiple cognitive domains, including perception and decision making. There is also evidence that probabilistic inference may be implemented in the brain through the (quasi-)stochastic activity of neural circuits, producing samples from the appropriate posterior distributions, effectively implementing a Markov chain Monte Carlo algorithm. However, time becomes a fundamental bottleneck in such sampling-based probabilistic representations: the quality of inferences depends on how fast the neural circuit generates new, uncorrelated samples from its stationary distribution (the posterior). We explore this bottleneck in a simple, linear-Gaussian latent variable model, in which posterior sampling can be achieved by stochastic neural networks with linear dynamics. The well-known Langevin sampling (LS) recipe, so far the only sampling algorithm for continuous variables of which a neural implementation has been suggested, naturally fits into this dynamical framework. However, we first show analytically and through simulations that the symmetry of the synaptic weight matrix implied by LS yields critically slow mixing when the posterior is high-dimensional. Next, using methods from control theory, we construct and inspect networks that are optimally fast, and hence orders of magnitude faster than LS, while being far more biologically plausible. In these networks, strong – but transient – selective amplification of external noise generates the spatially correlated activity fluctuations prescribed by the posterior. Intriguingly, although a detailed balance of excitation and inhibition is dynamically maintained, detailed balance of Markov chain steps in the resulting sampler is violated, consistent with recent findings on how statistical irreversibility can overcome the speed limitation of random walks in other domains. 1 Introduction The high speed of human sensory perception [1] is puzzling given its inherent computational complexity: sensory inputs are noisy and ambiguous, and therefore do not uniquely determine the state of the environment for the observer, which makes perception akin to a statistical inference problem. Thus, the brain must represent and compute with complex and often high-dimensional probability distributions over relevant environmental variables. Most state-of-the-art machine learning techniques for large scale inference trade inference accuracy for computing speed (e.g. [2]). The brain, on the contrary, seems to enjoy both simultaneously [3]. Some probabilistic computations can be made easier through an appropriate choice of representation for the probability distributions of interest. Sampling-based representations used in Monte Carlo 1 techniques, for example, make computing moments of the distribution or its marginals straightforward. Indeed, recent behavioural and neurophysiological evidence suggests that the brain uses such sampling-based representations by neural circuit dynamics implementing a Markov chain Monte Carlo (MCMC) algorithm such that their trajectories in state space produce sequential samples from the appropriate posterior distribution [4, 5, 6]. However, for sampling-based representations, speed becomes a key bottleneck: computations involving the posterior distribution become accurate only after enough samples have been collected, and one has no choice but to wait for those samples to be delivered by the circuit dynamics. For sampling to be of any practical use, the interval that separates the generation of two independent samples must be short relative to the desired behavioral timescale. Single neurons can integrate their inputs on a timescale τm ≈10 −50 ms, whereas we must often make decisions in less than a second: this leaves just enough time to use (i.e. read out) a few tens of samples. What kinds of neural circuit dynamics are capable of producing uncorrelated samples at ∼100 Hz remains unclear. Here, we introduce a simple yet non-trivial generative model and seek plausible neuronal network dynamics for fast sampling from the corresponding posterior distribution. While some standard machine learning techniques such as Langevin or Gibbs sampling do suggest “neural network”type solutions to sampling, not only are the corresponding architectures implausible in fundamental ways (e.g. they violate Dale’s law), but we show here that they lead to unacceptably slow mixing in high dimensions. Although the issue of sampling speed in general is well appreciated in the context of machine learning, there have been no systematic approaches to tackle it owing to a large part to the fact that sampling speed can only be evaluated empirically in most cases. In contrast, the simplicity of our generative model allowed us to draw an analytical picture of the problem which in turn suggested a systematic approach for solving it. Specifically, we used methods from robust control to discover the fastest neural-like sampler for our generative model, and to study its structure. We find that it corresponds to greatly non-symmetric synaptic interactions (leading to statistical irreversibility), and mathematically nonnormal1 circuit dynamics [7, 8] in close analogy with the dynamical regime in which the cortex has been suggested to operate [9]. 2 Linear networks perform sampling under a linear Gaussian model We focus on a linear Gaussian latent variable model which generates observations h ∈RM as weighted sums of N features A ≡(a1; . . . ; aN) ∈RM×N with jointly Gaussian coefficients r ∈ RN, plus independent additive noise terms (Fig. 1, left). More formally: p(r) = N(r; 0, C) and p(h|r) = N h; Ar, σ2 hI  (1) where I denotes the identity matrix. The posterior distribution is multivariate Gaussian, p(r|h) = N (r; µ(h), Σ), with Σ = C−1 + A⊤A/σ2 h −1 and µ(h) = ΣA⊤h/σ2 h. (2) where we made explicit the fact that under this simple model, only the mean, µ(h), but not the covariance of the posterior, Σ, depends on the input, h. We are interested in neural circuit dynamics for sampling from p(r|h), whereby the data (observation) h is given as a constant feedforward input to a population of recurrently connected neurons, each of which encodes one of the latent variables and also receives inputs from an external, private source of noise ξ (Fig. 1, right). Our goal is to devise a network such that the activity fluctuations r(t) in the recurrent layer have a stationary distribution that matches the posterior, for any h. Specifically, we consider linear recurrent stochastic dynamics of the form: dr = dt τm [−r(t) + Wr(t) + Fh] + σξ r 2 τm dξ(t) (3) where τm = 20 ms is the single-unit “membrane” time constant, and dξ is a Wiener process of unit variance, which is scaled by a scalar noise intensity σξ. The activity ri(t) could represent either the 1“Nonnormal” should not be confused with “non-Gaussian”: a matrix M is nonnormal iff MM⊤̸= M⊤M. 2 Linear Gaussian latent variable model: r latent variables h observations P(r) = N (r; 0, C) P(h|r) = N  h; Ar, σ2 h I  Posterior sampling: network r(t) input h(t) noise ξ W F Figure 1: Sampling under a linear Gaussian latent variable model using neuronal network dynamics. Left: schematics of the generative model. Right: schematics of the recognition model. See text for details. membrane potential of neuron i, or the deviation of its momentary firing rate from a baseline. The matrices F and W contain the feedforward and recurrent connection weights, respectively. The stationary distribution of r is indeed Gaussian with a mean µr(h) = (I −W)−1Fh and a covariance matrix Σr ≡ (r(t) −µr)(r(t) −µr)⊤ t. For the following, we will use the dependence of Σr on W (and σξ) given implicitly by the following Lyapunov equation [10]: (W −I)Σr + Σr(W −I)⊤= −2σ2 ξI (4) Note that in the absence of recurrent connectivity (W = 0), the variance of every ri(t) would be exactly σ2 ξ. Note also that, just as required (see above), only the mean, µr(h), but not the covariance, Σr, depends on the input, h. In order for the dynamics of Eq. 3 to sample from the correct posteriors, we must choose F, W and σξ such that µr(h) = µ(h) for any h, and Σr = Σ. One possible solution (which, importantly, is not unique, as we show later) is F = (σξ/σh)2 A⊤ and W = WL ≡I −σ2 ξ Σ−1 (5) with arbitrary σξ > 0. In the following, we will be interested in the likelihood matrix A only insofar as it affects the posterior covariance matrix Σ, which turns out to be the main determinant of sampling speed. We will therefore directly choose some covariance matrix Σ, and set h = 0 without loss of generality. 3 Langevin sampling is very slow Langevin sampling (LS) is a common sampling technique [2, 11, 12], and in fact the only one that has been proposed to be neurally implemented for continuous variables [6, 13]. According to LS, a stochastic dynamical system performs “noisy gradient ascent of the log posterior”: dr = 1 2 ∂ ∂r log p(r|h) dt + dξ (6) where dξ is a unitary Wiener process. When r|h is Gaussian, Eq. 6 reduces to Eq. 3 for σξ = 1 and the choice of F and W given in Eq. 5 – hence the notation WL above. Note that WL is symmetric. As we show now, this choice of weight matrix leads to critically slow mixing (i.e. very long autocorrelation time scales in r(t)) when N is large. In a linear network, the average autocorrelation length is dominated by the decay time constant τmax of the slowest eigenmode, i.e. the eigenvector of (W −I) associated with the eigenvalue λW−I max which, of all the eigenvalues of (W −I), has the largest real part (which must still be negative, to ensure stability). The contribution of the slowest eigenmode to the sample autocorrelation time is τmax = −τm/Re λW−I max  , so sampling becomes very slow when Re λW−I max  approaches 0. This is, in fact, what happens with LS as N →∞. Indeed, we could derive the following generic lower bound (details can be found in our Supplementary Information, SI): λWL−I max ≥ −(σξ/σ0)2 p 1 + Nσ2r (7) which is shown as dashed lines in Fig. 2. Thus, LS becomes infinitely slow in the large N limit when pairwise correlations do not vanish in that limit (or at least not as fast as N −1 2 in their std.). Slowing becomes even worse when Σ is drawn from the inverse Wishart distribution with ν degrees of freedom and scale matrix ω−2I (Fig. 2). We choose ν = N −1+⌊σ−2 r ⌋and ω−2 = σ2 0(ν−N −1) 3 1 10 100 1000 1 10 100 1000 slowing factor τmax/τm σr = 0.10 σr = 0.20 -1 -0.8 -0.6 -0.4 -0.2 0 1 10 100 1000 λWL−I max -1 -0.5 0 0.5 1 (≈N (0, σr)) network size N simulation (inverse Wishart) theory (inverse Wishart) lower bound (general) network size N pairwise corr. Figure 2: Langevin sampling (LS) is slow in high-dimension. Random covariance matrices Σ of size N are drawn from an inverse Wishart distribution with parameters chosen such that the average diagonal element (variance) is σ2 0 = 1 and the distribution of pairwise correlations has zero mean and variance σ2 r (right). Sampling from N(0, Σ) using a stochastic neural network (cf. Fig. 1) with W = WL (LS, symmetric solution) becomes increasingly slow as N grows, as indicated by the relative decay time constant τmax/τm of the slowest eigenmode of (WL −I) (left), which is also the negative inverse of its largest eigenvalue (middle). Dots indicate the numerical evaluation of the corresponding quantities, and errorbars (barely noticeable) denote standard deviation across several random realizations of Σ. Dashed lines correspond to the generic bound in Eq. 7. Solid lines are obtained from random matrix theory under the asssumption that Σ is drawn from an inverse Wishart distribution (Eq. 8). Parameters: σξ = σ0 = 1. such that the expected value of a diagonal element (variance) in Σ is σ2 0, and the distribution of pairwise correlations is centered on zero with variance σ2 r. The asymptotic behavior of the largest eigenvalue of Σ−1 (the square of the smallest singular value of a random ν × N rectangular matrix) is known from random matrix theory (e.g. [14]), and we have for large N: λWL−I max ≈−(σξ/σ0)2 ⌊σ−2 r ⌋−2 q N −1 + ⌊σ−2 r ⌋− √ N 2 ∼−O  1 N  (8) This scaling behavior is shown in Fig. 2 (solid lines). In fact, we can also show (cf. SI) that LS is (locally) the slowest possible choice (see Sec. 4 below for a precise definition of “slowest”, and SI for details). Note that both Eqs. 7-8 are inversely proportional to the ratio (σ0/σξ), which tells us how much the recurrent interactions must amplify the external noise in order to produce samples from the right stationary activity distribution. The more amplification is required (σ0 ≫σξ), the slower the dynamics of LS. Conversely, one could potentially make Langevin sampling faster by increasing σξ, but σξ would need to scale as √ N to annihilate the critical slowing problem. This – in itself – is unrealistic; moreover, it would also require the resulting connectivity matrix to have a large negative diagonal (O(−N)) – ie. the intrinsic neuronal time constant τm to scale as O(1/N) –, which is perhaps even more unrealistic.2 Note also that LS can be sped up by appropriate “preconditioning” (e.g. [15, 16]), for example using the inverse Hessian of the log-posterior. In our case, a simple calculation shows that this corresponds to removing all recurrent connections, and pushing the posterior covariance matrix to the external noise sources, which is only postponing the problem to some other brain network. Finally, LS is fundamentally implausible as a neuronal implementation: it imposes symmetric synaptic interactions, which is simply not possible in the brain due to the existence of distinct classes of excitatory and inhibitory neurons (Dale’s principle). In the following section, we show that networks can be constructed that overcome all the above limitations of LS in a principled way. 4 General solution and quantification of sampling speed While Langevin dynamics (Eq. 6) provide a general recipe for sampling from any given posterior density, they unduly constrain the recurrent interactions to be symmetric – at least in the Gaussian 2From a pure machine learning perspective, increasing σξ is not an option either: the increasing stiffness of Eq. 6 would either require the use of a very small integration step, or would lead to arbitrarily small acceptance ratios in the context of Metropolis-Hastings proposals. 4 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 A B C 0.01 0.1 1 0.01 0.1 1 10 S ∼N (0, ζ2) 0.01 0.1 1 10 0.01 0.1 1 10 S ∼N (0, ζ2) ∥K(kτm)∥F ∥K(0)∥F time lag k (units of τm) Langevin optimal optimal E/I random S (ζ = 0.2; 0.4; 0.8; 1.6) Newton (unconnected net) Gibbs (update time τm) ψslow ζ weight RMS ζ Figure 3: How fast is the fastest sampler? (A) Scalar measure of the statistical dependency between any two samples collected kτm seconds apart (cf. main text), for Langevin sampling (black), Gibbs sampling (blue, assuming a full update sweep is done every τm), a series of networks (brown to red) with connectivities given by Eq. 9 where the elements of the skew-symmetric matrix S were drawn iid. from N(0, ζ2) for different values of ζ (see also panel B), the unconstrained optimized network (yellow), and the optimized E/I network (green). For reference, the dashed gray line shows the behavior of a network in which there are no recurrent interactions, and the posterior covariance is encoded in the covariance of the input noise, which in fact corresponds to Langevin sampling with inverse Hessian (“Newton”-like) preconditioning [16]. (B) Total slowing cost ψslow(S) when Si<j ∼N(0, ζ2), for increasing values of ζ. The Langevin and the two optimized networks are shown as horizontal lines for comparison. (C) Same as in (B), showing the root mean square (RMS) value of the synaptic weights. Parameter values: N = 200, NI = 100, σξ = 1, τm = 20 ms. case. To see why this is a drastic restriction, let us observe that any connectivity matrix of the form W(S) = I + −σ2 ξI + S  Σ−1 (9) where S is an arbitrary skew-symmetric matrix (S⊤= −S), solves Eq. 4, and therefore induces the correct stationary distribution N(·, Σ) under the linear stochastic dynamics of Eq. 3. Note that Langevin sampling corresponds to S = 0 (cf. Eq. 5). In general, though, there are O(N 2) degrees of freedom in the skew-symmetric matrix S, which could perhaps be exploited to increase the mixing rate. In Sec. 5, we will show that indeed a large gain in sampling speed can be obtained through an appropriate choice of S. For now, let us quantify slowness. Let Λ ≡diag (Σ) be the diagonal matrix that contains all the posterior variances, and K(S, τ) ≡ (r(t + τ) −µ)(r(t) −µ)⊤ t be the matrix of lagged covariances among neurons under the stationary distribution of the dynamics (so that Λ−1 2 K(S, τ)Λ−1 2 is the autocorrelation matrix of the network). Note that K(S, 0) = Σ is the posterior covariance matrix, and that for fixed Σ, σ2 ξ and τm, K(S, τ) depends only on the lag τ and on the matrix of recurrent weights W, which itself depends only on the skew-symmetric matrix S of free parameters. We then define a “total slowing cost” ψslow(S) = 1 2τmN 2 Z ∞ 0 Λ−1 2 K(S, τ)Λ−1 2 2 F dτ (10) which penalizes the magnitude of the temporal (normalized) autocorrelations and pairwise crosscorrelations in the sequence of samples generated by the circuit dynamics. Here ∥M∥2 F ≡ trace(MM⊤) = P ij M 2 ij is the squared Frobenius norm of M. Using the above measure of slowness, we revisit the mixing behavior of LS on a toy covariance matrix Σ drawn from the same inverse Wishart distribution mentioned above with parameters N = 200, σ2 0 = 2 and σr = 0.2. We further regularize Σ by adding the identity matrix to it, which does not change anything in terms of the scaling law of Eq. 8 but ensures that the diagonal of WL remains bounded as N grows large. We will use the same Σ in the rest of the paper. Figure 3A shows Λ−1/2K(S, τ)Λ−1/2 F as a function of the time lag τ: as predicted in Sec. 3, mixing is indeed an order of magnitude slower for LS (S = 0, solid black line) than the single-neuron time constant τm (grey dashed line). Note that ψslow (Eq. 10, Fig. 3B) is proportional to the area under the squared curve shown in Fig. 3A. Sample activity traces for this network, implementing LS, can be found in Fig. 4B (top). Using the same measure of slowness, we also inspected the speed of Gibbs sampling, another widely used sampling technique (e.g. [17]) inspiring neural network dynamics for sampling from distributions over binary variables [18, 19, 20]. Gibbs sampling defines a Markov chain that operates in 5 discrete time, and also uses a symmetric weight matrix. In order to compare its mixing speed with that of our continuous stochastic dynamics, we assume that a full update step (in which all neurons have been updated once) takes time τm. We estimated the integrand of the slowing cost (Eq. 10) numerically using 30’000 samples generated by the Gibbs chain (Fig. 3A, blue). Gibbs sampling is comparable to LS here: samples are still correlated on a timescale of order ∼50 τm. Finally, one may wonder how a random choice of S would perform in terms of decorrelation speed. We drew random skew-symmetric S matrices from the Gaussian ensemble, Si<j ∼N(0, ζ2), and computed the slowing cost (Fig. 3, red). As the magnitude ζ of S increases, sampling becomes faster and faster until the dynamics is about as fast as the single-neuron time constant τm. However, the synaptic weights also grow with ζ (Fig. 3C), and we show in Sec. 5 that an even faster sampler exists that has comparatively weaker synapses. It is also interesting to note that the slope of ψslow at ζ = 0 is zero, suggesting that LS is in fact maximally slow (we prove this formally in the SI). 5 What is the fastest sampler? We now show that the skew-symmetric matrix S can be optimized for sampling speed, by directly minimizing the slowing cost ψslow(S) (Eq. 10), subject to an L2-norm penalty. We thus seek to minimize: L(S) ≡ ψslow(S) + λL2 2N 2 ∥W(S)∥2 F . (11) The key to performing this minimization is to use classical Ornstein-Uhlenbeck theory (e.g. [10]) to bring our slowness cost under a form mathematically analogous to a different optimization problem that has arisen recently in the field of robust control [21]. We can then use analytical results obtained there concerning the gradient of ψslow, and obtain the overall gradient: ∂L(S) ∂S = 1 N 2  (Σ−1PQ)⊤−(Σ−1PQ)  + λL2 N 2  SΣ−2 + Σ−2S  (12) where matrices P and Q are obtained by solving two dual Lyapunov equations. All details can be found in our SI. We initialized S with random, weak and uncorrelated elements (cf. the end of Sec. 4, with ζ = 0.01), and ran the L-BFGS optimization algorithm using the gradient of Eq. 12 to minimize L(S) (with λL2 = 0.1). The resulting, optimal sampler is an order of magnitude faster than either Langevin or Gibbs sampling: samples are decorrelated on a timescale that is even faster than the single-neuron time constant τm (Fig. 3A, orange). We also found that fast solutions (with correlation length ∼τm) can be found irrespective of the size N of the state space (not shown), meaning that the relative speed-up between the optimal solution and LS grows with N (cf. Fig. 2). The optimal Sopt induces a weight matrix Wopt given by Eq. 9 and shown in Fig. 4A (middle). Notably, Wopt is no longer symmetric, and its elements are much larger than in the Langevin symmetric solution WL with the same stationary covariance, albeit orders of magnitude smaller than in random networks of comparable decorrelation speed (Fig. 3C). It is illuminating to visualize activity trajectories in the plane defined by the topmost and bottommost eigenvectors of Σ, i.e. the first and last principal components (PCs) of the network activity (Fig. 4C). The distribution of interest is broad along some dimensions, and narrow along others. In order to sample efficiently, large steps ought to be taken along directions in which the distribution is broad, and small steps along directions in which the distribution is narrow. This is exactly what our optimal sampler does, whereas LS takes small steps along both broad and narrow directions (Fig. 4C). 6 Balanced E/I networks for fast sampling We can further constrain our network to obey Dale’s law, i.e. the separation of neurons into separate excitatory (E) and inhibitory (I) groups. The main difficulty in building such networks is that picking an arbitrary skew-symmetric matrix S in Eq. 9 will not yield the column sign structure of an E/I network in general. Therefore, we no longer have a parametric form for the solution matrix manifold on which to find the fastest network. However, by extending the methods of Sec. 5, described in 6 Langevin weight matrices sample activity traces trajectories in state space (1 ms steps) dist. of increments (1 ms steps) A B C D optimized net. optimized E/I net. 1 20 40 100ms ri(t) ri(t) ri(t) 1 20 40 100ms 1 20 40 100ms -404 -20 0 20 0 500 ms -404 -20 0 20 -404 -20 0 20 -3 0 3 -3 0 3 -3 0 3 -1 0 1 -1 0 1 -1 0 1 postsynaptic -0.1 0 0.1 postsynaptic -1 0 1 postsynaptic presynaptic -1 -0.5 0 0.5 neuron # -8 -4 0 4 8 neuron # -8 -4 0 4 8 neuron # -8 -4 0 4 8 last PC last PC last PC first PC step along {first|last} PC E/I corr. Figure 4: Fast sampling with optimized networks. (A) Synaptic weight matrices for the Langevin network (top), the fastest sampler (middle) and the fastest sampler that obeys Dale’s law (bottom). Note that the synaptic weights in both optimized networks are an order of magnitude larger than in the symmetric Langevin solution. The first two networks are of size N = 200, while the optimized E/I network has size N +NI = 300. (B) 500 ms of spontaneous network activity (h = 0) in each of the three networks, for all of which the stationary distribution of r (restricted here to the first 40 neurons) is the same multivariate Gaussian. (C) Left: activity trajectories (the same 500 ms as shown in (B)) in the plane defined by the topmost and bottommost eigenvectors of the posterior covariance matrix Σ (corresponding to the first and last principal components of the activity fluctuations r(t)). For the E/I network, the projection is restricted to the excitatory neurons. Right: distribution of increments along both axes, measured in 1 ms time steps. Langevin sampling takes steps of comparable size along all directions, while the optimized networks take much larger steps along the directions of large variance prescribed by the posterior. (D) Distributions of correlations between the time courses of total excitatory and inhibitory input in individual neurons. detail in our SI, we can still formulate the problem as one of unconstrained optimization, and obtain the fastest, balanced E/I sampler. We consider the posterior to be encoded in the activity of the N = 200 excitatory neurons, and add NI = 100 inhibitory neurons which we regard as auxiliary variables, in the spirit of Hamiltonian Monte Carlo methods [11]. Consequently, the E-I and I-I covariances are free parameters, while the E-E covariance is given by the target posterior. For additional biological realism, we also forbid self-connections as they can be interpreted as a modification of the intrinsic membrane time constant of the single neurons, which in principle cannot be arbitrarily learned. The speed optimization yields the connectivity matrix shown in Fig. 4A (bottom). Results for this network are presented in a similar format as before, in the same figures. Sampling is almost as fast as in the best (regularized) unconstrained network (compare yellow and green in Fig. 3), indicating that Dale’s law – unlike the symmetry constraint implicitly present in Langevin sampling – is not fundamentally detrimental to mixing speed. Moreover, the network operates in a regime of excitation/inhibition balance, whereby the total E and I input time courses are correlated in single cells (Fig. 4D, bottom). This is true also in the unconstrained optimal sampler. In contrast, E and I inputs are strongly anti-correlated in LS. 7 7 Discussion We have studied sampling for Bayesian inference in neural circuits, and observed that a linear stochastic network is able to sample from the posterior under a linear Gaussian latent variable model. Hidden variables are directly encoded in the activity of single neurons, and their joint activity undergoes moment-to-moment fluctuations that visit each portion of the state space at a frequency given by the target posterior density. To achieve this, external noise sources fed into the network are amplified by the recurrent circuitry, but preferentially amplified along the state-space directions of large posterior variance. Although, for the very simple linear Gaussian model we considered here, a purely feed-forward architecture would also trivially be able to provide independent samples (ie. provide samples that are decorrelated at the time scale of τm), the network required to achieve this is deeply biologically implausible (see SI). We have shown that the choice of a symmetric weight matrix – equivalent to LS, a popular machine learning technique [2, 11, 12] that has been suggested to underlie neuronal network dynamics sampling continuous variables [6, 13] – is most unfortunate. We presented an analytical argument predicting dramatic slowing in high-dimensional latent spaces, supported by numerical simulations. Even in moderately large networks, samples were correlated on timescales much longer than the single-neuron decay time constant. We have also shown that when the above symmetry constraint is relaxed, a family of other solutions opens up that can potentially lead to much faster sampling. We chose to explore this possibility from a normative viewpoint, optimizing the network connectivity directly for sampling speed. The fastest sampler turned out to be highly asymmetric and typically an order of magnitude faster than Langevin sampling. Notably, we also found that constraining each neuron to be either excitatory or inhibitory does not impair performance while giving a far more biologically plausible sampler. Dale’s law could even provide a natural safeguard against reaching slow symmetric solutions such as Langevin sampling, which we saw was the worst-case scenario (cf. also SI). It is worth noting that Wopt is strongly nonnormal.3 Deviation from normality has important consequences for the dynamics of our networks: it makes the network sensitive to perturbations along some directions in state space. Such perturbations are rapidly amplified into large, transient excursions along other, relevant directions. This phenomenon has been shown to explain some key features of spontaneous activity in primary visual cortex [9] and primary motor cortex [22]. Several aspects would need to be addressed before our proposal can crystalize into a more thorough understanding of the neural implementation of the sampling hypothesis. First, can local synaptic plasticity rules perform the optimization that we have approached from an algorithmic viewpoint? Second, what is the origin of the noise that we have hypothesized to come from external sources? Third, what kind of nonlinearity must be added in order to allow sampling from non-Gaussian distributions, whose shapes may have non-trivial dependencies on the observations? Also, does the main insight reached here – namely that fast samplers are to be found among nonsymmetric, nonnormal networks – carry over to the nonlinear case? As a proof of principle, in preliminary simulations, we have shown that speed optimization in a linearized version of a nonlinear network (with a tanh gain function) does yield fast sampling in the nonlinear regime, even when fluctuations are strong enough to trigger the nonlinearity and make the resulting sampled distribution non-Gaussian (details in SI). Finally, we have also shown (see SI) that the Langevin solution is the only network that satisfies the detailed balance condition [23] in our model class; reversibility is violated in all other stochastic networks we have presented here (random, optimal, optimal E/I). The fact that these networks are faster samplers is in line with recent machine learning studies on how non-reversible Markov chains can mix faster than their reversible counterparts [24]. The construction of such Monte-Carlo algorithms has proven challenging [25, 26, 27], suggesting that the brain – if it does indeed use sampling-based representations – might have something yet to teach us about machine learning. Acknowledgements This work was supported by the Wellcome Trust (GH, ML), the Swiss National Science Foundation (GH) and the Gatsby Charitable Foundation (LA). Our code will be made freely available from GH’s personal webpage. 3Indeed, the sum of the squared moduli of its eigenvalues accounts for only 25% of ∥Wopt∥2 F [7]. For a normal matrix W (such as the Langevin solution, WL), P i |λi|2 = ∥W∥2 F, i.e. this ratio is 100%. 8 References [1] S. Thorpe, D. Fize, and C. Marlot. Speed of processing in the human visual system. Nature, 381:520— 522, 1996. [2] D. MacKay. Information theory, inference, and learning algorithms. Cambridge University Press, 2003. [3] D. Knill and A. Pouget. The Bayesian brain: the role of uncertainty in neural coding and computation. Trends in Neurosciences, 27:712–719, 2004. [4] J. Fiser, P. Berkes, G. Orb´an, and M. Lengyel. Statistically optimal perception and learning: from behavior to neural representations. Trends in Cognitive Sciences, 14:119–130, 2010. [5] P. Berkes, G. Orb´an, M. Lengyel, and J. Fiser. Spontaneous cortical activity reveals hallmarks of an optimal internal model of the environment. Science, 331:83–87, 2011. [6] R. Moreno-Bote, D. C. Knill, and A. Pouget. Bayesian sampling in visual perception. Proceedings of the National Academy of Sciences, 108:12491–12496, 2011. [7] L. N. Trefethen and M. Embree. Spectra and pseudospectra: the behavior of nonnormal matrices and operators. Princeton University Press, 2005. [8] G. Hennequin, T. P. Vogels, and W. Gerstner. Non-normal amplification in random balanced neuronal networks. Physical Review E, 86:011909, 2012. [9] B. K. Murphy and K. D. Miller. Balanced amplification: A new mechanism of selective amplification of neural activity patterns. Neuron, 61:635–648, 2009. [10] C. W. Gardiner. Handbook of stochastic methods: for physics, chemistry, and the natural sciences. Berlin: Springer, 1985. [11] R. Neal. MCMC using Hamiltonian dynamics. Handbook of MCMC, pages 113–162, 2011. [12] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the International Conference on Machine Learning, 2011. [13] A. Grabska-Barwinska, J. Beck, A. Pouget, and P. Latham. Demixing odors - fast inference in olfaction. In C.J.C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 1968–1976. Curran Associates, Inc., 2013. [14] Mark Rudelson and Roman Vershynin. Smallest singular value of a random rectangular matrix. Communications on Pure and Applied Mathematics, 62:1707–1739, 2009. [15] M. Girolami and B. Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73:123–214, 2011. [16] J. Martin, L. C. Wilcox, C. Burstedde, and O. Ghattas. A stochastic Newton MCMC method for largescale statistical inverse problems with application to seismic inversion. SIAM Journal on Scientific Computing, 34:A1460–A1487, 2012. [17] M. Mezard and A. Montanari. Information, physics, and computation. Oxford University Press, 2009. [18] G. E. Hinton and T. J. Sejnowski. Learning and relearning in Boltzmann machines. In D E Rumelhart, J L McClelland, and the PDP Research Group, editors, Parallel Distributed Processing: Explorations in the Microstructure of Cognition, volume 1: Foundations, chapter 7, pages 282–317. MIT Press, Cambridge, MA, 1986. [19] G E Hinton, P Dayan, B J Frey, and R M Neal. The ”wake-sleep” algorithm for unsupervised neural networks. Science, 268(5214):1158–1161, 1995. [20] L. Buesing, J. Bill, B. Nessler, and W. Maass. Neural dynamics as sampling: a model for stochastic computation in recurrent networks of spiking neurons. PLoS Computational Biology, 7:1–22, 2011. [21] J. Vanbiervliet, B. Vandereycken, W. Michiels, S. Vandewalle, and M. Diehl. The smoothed spectral abscissa for robust stability optimization. SIAM Journal on Optimization, 20:156–171, 2009. [22] G. Hennequin, T. P. Vogels, and W. Gerstner. Optimal control of transient dynamics in balanced networks supports generation of complex movements. Neuron, 82, 2014. [23] W. Keith Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57:97–109, 1970. [24] Akihisa Ichiki and Masayuki Ohzeki. Violation of detailed balance accelerates relaxation. Physical Review E, 88:020101, 2013. [25] Y. Sun, J. Schmidhuber, and F. J. Gomez. Improving the asymptotic performance of Markov Chain Monte-Carlo by inserting vortices. In J.D. Lafferty, C.K.I. Williams, J. Shawe-Taylor, R.S. Zemel, and A. Culotta, editors, Advances in Neural Information Processing Systems 23, pages 2235–2243. 2010. [26] K. S. Turitsyn, M. Chertkov, and M. Vucelja. Irreversible Monte Carlo algorithms for efficient sampling. Physica D: Nonlinear Phenomena, 240:410–414, 2011. [27] Joris Bierkens. Non-reversible Metropolis-Hastings. arXiv:1401.8087 [math], 2014. 9
2014
272
5,372
Semi-Separable Hamiltonian Monte Carlo for Inference in Bayesian Hierarchical Models Yichuan Zhang School of Informatics University of Edinburgh Y.Zhang-60@sms.ed.ac.uk Charles Sutton School of Informatics University of Edinburgh c.sutton@inf.ed.ac.uk Abstract Sampling from hierarchical Bayesian models is often difficult for MCMC methods, because of the strong correlations between the model parameters and the hyperparameters. Recent Riemannian manifold Hamiltonian Monte Carlo (RMHMC) methods have significant potential advantages in this setting, but are computationally expensive. We introduce a new RMHMC method, which we call semi-separable Hamiltonian Monte Carlo, which uses a specially designed mass matrix that allows the joint Hamiltonian over model parameters and hyperparameters to decompose into two simpler Hamiltonians. This structure is exploited by a new integrator which we call the alternating blockwise leapfrog algorithm. The resulting method can mix faster than simpler Gibbs sampling while being simpler and more efficient than previous instances of RMHMC. 1 Introduction Bayesian statistics provides a natural way to manage model complexity and control overfitting, with modern problems involving complicated models with a large number of parameters. One of the most powerful advantages of the Bayesian approach is hierarchical modeling, which allows partial pooling across a group of datasets, allowing groups with little data to borrow information from similar groups with larger amounts of data. However, such models pose problems for Markov chain Monte Carlo (MCMC) methods, because the joint posterior distribution is often pathological due to strong correlations between the model parameters and the hyperparameters [3]. For example, one of the most powerful MCMC methods is Hamiltonian Monte Carlo (HMC). However, for hierarchical models even the mixing speed of HMC can be unsatisfactory in practice, as has been noted several times in the literature [3, 4, 11]. Riemannian manifold Hamiltonian Monte Carlo (RMHMC) [7] is a recent extension of HMC that aims to efficiently sample from challenging posterior distributions by exploiting local geometric properties of the distribution of interest. However, it is computationally too expensive to be applicable to large scale problems. In this work, we propose a simplified RMHMC method, called Semi-Separable Hamiltonian Monte Carlo (SSHMC), in which the joint Hamiltonian over parameters and hyperparameters has special structure, which we call semi-separability, that allows it to be decomposed into two simpler, separable Hamiltonians. This condition allows for a new efficient algorithm which we call the alternating blockwise leapfrog algorithm. Compared to Gibbs sampling, SSHMC can make significantly larger moves in hyperparameter space due to shared terms between the two simple Hamiltonians. Compared to previous RMHMC methods, SSHMC yields simpler and more computationally efficient samplers for many practical Bayesian models. 2 Hierarchical Bayesian Models Let D = {Di}N i=1 be a collection of data groups where ith data group is a collection of iid observations yj = {yji}Ni i=1 and their inputs xj = {xji}Ni i=1. We assume the data follows a parametric 1 distribution p(yi|xi, θi), where θi is the model parameter for group i. The parameters are assumed to be drawn from a prior p(θi|φ), where φ is the hyperparameter with a prior distribution p(φ). The joint posterior over model parameters θ = (θ1, . . . , θN) and hyperparameters φ is then p(θ, φ|D) ∝ N Y i=1 p(yi|xi, θi)p(θi|φ)p(φ). (1) This hierarchical Bayesian model is popular because the parameters θi for each group are coupled, allowing the groups to share statistical strength. However, this property causes difficulties when approximating the posterior distribution. In the posterior, the model parameters and hyperparameters are strongly correlated. In particular, φ usually controls the variance of p(θ|φ) to promote partial pooling, so the variance of θ|φ, D depends strongly on φ. This causes difficulties for many MCMC methods, such as the Gibbs sampler and HMC. An illustrative example of pathological structure in hierarchical models is the Gaussian funnel distribution [11]. Its density function is defined as p(x, v) = Qn i=1 N(xi|0, e−v)N(v|0, 32), where x is the vector of low-level parameters and v is the variance hyperparameter. The pathological correlation between x and v is illustrated by Figure 1. 3 Hamiltonian Monte Carlo on Posterior Manifold Hamiltonian Monte Carlo (HMC) is a gradient-based MCMC method with auxiliary variables. To generate samples from a target density π(z), HMC constructs an ergodic Markov chain with the invariant distribution π(z, r) = π(z)π(r), where r is an auxiliary variable. The most common choice of π(r) is a Gaussian distribution N(0, G−1) with precision matrix G. Given the current sample z, the transition kernel of the HMC chain includes three steps: first sample r ∼π(r), second propose a new sample (z′, r′) by simulating the Hamiltonian dynamics and finally accept the proposed sample with probability α = min {1, π(z′, r′)/π(z, r)}, otherwise leave z unchanged. The last step is a Metropolis-Hastings (MH) correction. Define H(z, r) := −log π(z, r). The Hamiltonian dynamics is defined by the differential equations (˙z, ˙r) = (∂rH, −∂zH), where z is called the position and r is called the momentum. It is easy to see that ˙H(z, r) = ∂zH ˙z + ∂rH ˙r = 0, which is called the energy preservation property [10, 11]. In physics, H(z, r) is known as the Hamiltonian energy, and is decomposed into the sum of the potential energy U(z) := −log π(z) and the kinetic energy K(r) := −log π(r). The most used discretized simulation in HMC is the leapfrog algorithm, which is given by the recursion r(τ + ϵ/2) = r(τ) −ϵ 2∇zU(τ) (2a) z(τ + ϵ) = z(τ) + ϵ∇rK(τ + ϵ/2) (2b) r(τ + ϵ) = r(τ + ϵ/2) −ϵ 2∇θU(τ + ϵ), (2c) where ϵ is the step size of discretized simulation time. After L steps from the current sample (z(0), r(0)) = (z, r), the new sample is proposed as the last point (z′, r′) = (z(Lϵ), r(Lϵ)). In Hamiltonian dynamics, the matrix G is called the mass matrix. If G is constant w.r.t. z, then z and r are independent in π(z, r). In this case we say that H(z, r) is a separable Hamiltonian. In particular, we use the term standard HMC to refer to HMC using the identity matrix as G. Although HMC methods often outperform other popular MCMC methods, they may mix slowly if there are strong correlations between variables in the target distribution. Neal [11] showed that HMC can mix faster if G is not the identity matrix. Intuitively, such a G acts like a preconditioner. However, if the curvature of π(z) varies greatly, a global preconditioner can be inadequate. For this reason, recent work, notably that on Riemannian manifold HMC (RMHMC) [7], has considered non-separable Hamiltonian methods, in which G(z) varies with position z, so that z and r are no longer independent in π(z, r). The resulting Hamiltonian H(z, r) = −log π(z, r) is called a non-separable Hamiltonian. For example, for Bayesian inference problems, Girolami and Calderhead [7] proposed using the Fisher Information Matrix (FIM) of π(θ), which is the metric tensor of posterior manifold. However, for a non-separable Hamiltonian, the simple leapfrog dynamics (2a)-(2c) do not yield a valid MCMC method, as they are no longer reversible. Simulation of general non-separable systems requires the generalized leapfrog integrator (GLI) [7], which requires computing higher order derivatives to solve a system of non-linear differential equations. The computational cost of GLI in general is O(d3) where d is the number of parameters, which is prohibitive for large d. 2 In hierarchical models, there are two ways to sample the posterior using HMC. One way is to sample the joint posterior π(θ, φ) directly. The other way is to sample the conditional π(θ|φ) and π(φ|θ), simulating from each conditional distribution using HMC. This strategy is called HMC within Gibbs [11]. In either case, HMC chains tend to mix slowly in hyperparameter space, because the huge variation of potential energy across different hyperparameter values can easily overwhelm the kinetic energy in separable HMC [11]. Hierarchical models also pose a challenge to RMHMC, if we want to sample the model parameters and hyperparameters jointly. In particular, the closed-form FIM of the joint posterior π(θ, φ) is usually unavailable. Due to this problem, even sampling some toy models like the Gaussian funnel using RMHMC becomes challenging. Betancourt [2] proposed a new metric that uses a transformed Hessian matrix of π(θ), and Betancourt and Girolami [3] demonstrate the power of this method for efficiently sampling hyperparameters of hierarchical models on some simple benchmarks like Gaussian funnel. However, the transformation requires computing eigendecomposition of the Hessian matrix, which is infeasible in high dimensions. Because of these technical difficulties, RMHMC for hierarchical models is usually used within a block Gibbs sampling scheme, alternating between θ and φ. This RMHMC within Gibbs strategy is useful because the simulation of the non-separable dynamics for the conditional distributions may have much lower computational cost than that for the joint one. However, as we have discussed, in hierarchical models these variables tend be very strongly correlated, and it is well-known that Gibbs samplers mix slowly in such cases [13]. So, the Gibbs scheme limits the true power of RMHMC. 4 Semi-Separable Hamiltonian Monte Carlo In this section we propose a non-separable HMC method that does not have the limitations of Gibbs sampling and that scales to relatively high dimensions, based on a novel property that we will call semi-separability. We introduce new HMC methods that rely on semi-separable Hamiltonians, which we call semi-separable Hamiltonian Monte Carlo (SSHMC). 4.1 Semi-Separable Hamiltonian In this section, we define the semi-separable Hamiltonian system. Our target distribution will be the posterior π(θ, φ) = log p(θ, φ|D) of a hierarchical model (1), where θ ∈Rn and φ ∈Rm. Let rθ ∈Rn and rφ ∈Rm be the momentum variables corresponding to θ and φ respectively. The non-separable Hamiltonian is defined as H(θ, φ, rθ, rφ) = U(θ, φ) + K(rθ, rφ|θ, φ), (3) where the potential energy is U(θ, φ) = −log π(θ, φ) and the kinetic energy is K(rθ, rφ|θ, φ) = −log N(rθ, rφ; 0, G(θ, φ)−1), which includes the normalization term log |G(θ, φ)|. The mass matrix G(θ, φ) can be an arbitrary p.d. matrix. For example, previous work on RMHMC [7] has chosen G(θ, φ) to be FIM of the joint posterior π(θ, φ), resulting in an HMC method that requires O  (m + n)3 time. This limits applications of RMHMC to large scale problems. To attack these computational challenges, we introduce restrictions on the mass matrix G(θ, φ) to enable efficient simulation. In particular, we restrict G(θ, φ) to have the form G(θ, φ) =  Gθ(φ, x) 0 0 Gφ(θ)  , where Gθ and Gφ are the precision matrices of rθ and rφ, respectively. Importantly, we restrict Gθ(φ, x) to be independent of θ and Gφ(θ) to be independent of φ. If G has these properties, we call the resulting Hamiltonian a semi-separable Hamiltonian. A semi-separable Hamiltonian is still in general non-separable, as the two random vectors (θ, φ) and (rθ, rφ) are not independent. The semi-separability property has important computational advantages. First, because G is block diagonal, the cost of matrix operations reduces from O((n + m)k) to O(nk). Second, and more important, substituting the restricted mass matrix into (3) results in the potential and kinetic energy: U(θ, φ) = − X i [log p(yi|θi, xi) + log p(θi|φ)] −log p(φ), (4) K(rθ, rφ|φ, θ) = 1 2  rT θ Gθ(x, φ)rθ + rT φGφ(θ)rφ + log |Gθ(x, φ)| + log |Gφ(θ)|  . (5) 3 If we fix (θ, rθ) or (φ, rφ), the non-separable Hamiltonian (3) can be seen as a separable Hamiltonian plus some constant terms. In particular, define the notation A(rθ|φ) = 1 2rT θ Gθ(x, φ)rθ, A(rφ|θ) = 1 2rT φGφ(θ)rφ. Then, considering (φ, rφ) as fixed, the non-separable Hamiltonian H in (3) is different from the following separable Hamiltonian H1(θ, rθ) = U1(θ|φ, rφ) + K1(rθ|φ), (6) U1(θ|φ, rφ) = − X i [log p(yi|θi, xi) + log p(θi|φ)] + A(rφ|θ) + 1 2 log |Gφ(θ)| , (7) K1(rθ|φ) = A(rθ|φ) (8) only by some constant terms that do not depend on (θ, rθ). What this means is that any update to (θ, rθ) that leaves H1 invariant leaves the joint Hamiltonian H invariant as well. An example is the leapfrog dynamics on H1, where U1 is considered the potential energy, and K1 the kinetic energy. Similarly, if (θ, rθ) are fixed, then H differs from the following separable Hamiltonian H2(φ, rφ) = U2(φ|θ, rθ) + K2(rφ|θ), (9) U2(φ|θ, rθ) = − X i log p(θi|φ) −log p(φ) + A(rθ|φ) + 1 2 log |Gθ(x, φ)| , (10) K2(rφ|θ) = A(rφ|θ) (11) only by terms that are constant with respect to (φ, rφ). Notice that H1 and H2 are coupled by the terms A(rθ|φ) and A(rφ|θ). Each of these terms appears in the kinetic energy of one of the separable Hamiltonians, but in the potential energy of the other one. We call these terms auxiliary potentials because they are potential energy terms introduced by the auxiliary variables. These auxiliary potentials are key to our method (see Section 4.3). 4.2 Alternating Block-wise Leapfrog Algorithm References [1] K. Bache and M. Lichman. UCI machine learning repository, 2013. URL http://archive. uci.edu/ml. [2] M. J. Betancourt. A General Metric for Riemannian Manifold Hamiltonian Monte Carlo. ArXiv eDec. 2012. [3] M. J. Betancourt and M. Girolami. Hamiltonian Monte Carlo for Hierarchical Models. ArXiv eDec. 2013. [4] K. Choo. Learning hyperparameters for neural network models using Hamiltonian dynamics. PhD Citeseer, 2000. [5] O. F. Christensen, G. O. Roberts, and J. S. Rosenthal. Scaling limits for the transient phase o Metropolis–Hastings algorithms. Journal of the Royal Statistical Society: Series B (Statistical Met ogy), 67(2):253–268, 2005. [6] C. J. Geyer. Practical Markov Chain Monte Carlo. Statistical Science, pages 473–483, 1992. [7] M. Girolami and B. Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo me Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(2):123–214, 2011. 1467-9868. doi: 10.1111/j.1467-9868.2010.00765.x. URL http://dx.doi.org/10.111 1467-9868.2010.00765.x. [8] M. D. Hoffman and A. Gelman. The no-U-turn sampler: Adaptively setting path lengths in Hamil Monte Carlo. Journal of Machine Learning Research, In press. [9] S. Kim, N. Shephard, and S. Chib. Stochastic volatility: likelihood inference and comparison with A models. The Review of Economic Studies, 65(3):361–393, 1998. [10] B. Leimkuhler and S. Reich. Simulating Hamiltonian dynamics, volume 14. Cambridge University 2004. [11] R. Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, pages 113 2011. [12] A. Pakman and L. Paninski. Auxiliary-variable exact hamiltonian monte carlo samplers for binary butions. In Advances in Neural Information Processing Systems 26, pages 2490–2498. 2013. [13] C. P. Robert and G. Casella. Monte Carlo statistical methods, volume 319. Citeseer, 2004. [14] Z. Wang, S. Mohamed, and N. de Freitas. Adaptive Hamiltonian and Riemann manifold Monte samplers. In International Conference on Machine Learning (ICML), pages 1462–1470, 2013. http://jmlr.org/proceedings/papers/v28/wang13e.pdf. JMLR W&CP 28 (3): 1470, 2013. [15] Y. Zhang, C. Sutton, A. Storkey, and Z. Ghahramani. Continuous relaxations for discrete Hamil Monte Carlo. In Advances in Neural Information Processing Systems (NIPS), 2012. Algorithm 1 SSHMC by ABLA Require: (✓, φ) Sample r✓⇠N(0, G✓(φ, x)) and rφ ⇠N(0, Gφ(✓)) for l in 1, 2, . . . , L do (✓(l+✏/2), r(l+✏/2) ✓ ) leapfrog(✓(l), r(l) ✓, H1, ✏/2) (φ(l+✏), r(l+✏) φ ) leapfrog(φ(l), r(l) φ , H2, ✏) (✓(l+✏), r(l+✏) ✓ ) leapfrog(✓(l), r(l) ✓, H1, ✏/2) end for Draw u ⇠U(0, 1) if u < min(1, eH(✓,φ,r✓,rφ)−H(✓(L✏),φ(L✏),r(L✏),r(L✏) φ )) then (✓0, φ0, r0 ✓, r0 φ) (✓(L✏), φ(L✏), r(L✏) ✓ , r(L✏) φ ) else (✓0, φ0, r0 ✓, r0 φ) (✓, φ, r✓, rφ) end if return (✓0, φ0) 9 Now we introduce an efficient SSHMC method that exploits the semi-separability property. As described in the previous section, any update to (θ, rθ) that leaves H1 invariant also leaves the joint Hamiltonian H invariant, as does any update to (φ, rφ) that leaves H2 invariant. So a natural idea is simply to alternate between simulating the Hamiltonian dynamics for H1 and that for H2. Crucially, even though the total Hamiltonian H is not separable in general, both H1 and H2 are separable. Therefore when simulating H1 and H2, the simple leapfrog method can be used, and the more complex GLI method is not required. We call this method the alternating block-wise leapfrog algorithm (ABLA), shown in Algorithm 1. In this figure the function “leapfrog” returns the result of the leapfrog dynamics (2a)-(2c) for the given starting point, Hamiltonian, and step size. We call each iteration of the loop from 1 . . . L an ABLA step. For simplicity, we have shown one leapfrog step for H1 and H2 for each ABLA step, but in practice it is useful to use multiple leapfrog steps per ABLA step. ABLA has discretization error due to the leapfrog discretization, so the MH correction is required. If it is possible to simulate H1 and H2 exactly, then H is preserved exactly and there is no need for MH correction. To show that the SSHMC method by ABLA preserves the distribution π(θ, φ), we also need to show that the ABLA is a time-reversible and volume-preserving transformation in the joint space of (θ, rθ, φ, rφ). Let X = Xθ,rθ ×Xφ,rφ where (θ, rθ) ∈Xθ,rθ and (φ, rφ) ∈Xφ,rφ. Obviously, any reversible and volume-preserving transformation in a subspace of X is also reversible and volumepreserving in X. It is easy to see that each leapfrog step in the ABLA algorithm is reversible and volume-preserving in either Xθ,rθ or Xφ,rφ. One more property of integrator of interest is 4 symplecticity. Because each leapfrog integrator is symplectic in a subspace of X [10], they are also symplectic in X. Then because ABLA is a composition of symplectic leapfrog integrators, and the composition of symplectic transformations is symplectic, we know ABLA is symplectic. We emphasize that ABLA is actually not a discretized simulation of the semi-separable Hamiltonian system H, that is, if starting at a point (θ, rθ, φ, rφ) in the joint space, we run the exact Hamiltonian dynamics for H for a length of time L, the resulting point will not be the same as that returned by ABLA at time L even if the discretized time step is infinitely small. For example, ABLA simulates H1 with step size ϵ1 and H2 with step size ϵ2 where ϵ1 = 2ϵ2, when ϵ2 →0 that preserves H. 4.3 Connection to Other Methods Although the SSHMC method may seem similar to RMHMC within Gibbs (RMHMCWG), SSHMC is actually very different. The difference is in the last two terms of (7) and (10); if these are omitted from SSHMC and the Hamiltonians for π(θ|φ), then we obtain HMC within Gibbs. Particularly important among these two terms is the auxiliary potential, because it allows each of the separable Hamiltonian systems to borrow energy from the other one. For example, if the previous leapfrog step increases the kinetic energy K1(rθ|φ) in H1(θ, rθ), then, in the next leapfrog step for H2(φ, rφ), we see that φ will have greater potential energy U2(φ|θ, rθ), because the auxiliary potential A(rθ|φ) is shared. That allows the leapfrog step to accommodate a larger change of log p(φ|θ) using A(rθ|φ). So, the chain will mix faster in Xφ. By the symmetry of θ and φ, the auxiliary potential will also accelerate the mixing in Xθ. Another way to see this is that the dynamics in RMHMCWG for (rφ, φ) preserves the distribution π(θ, rφ, φ) = π(θ, φ)N(rφ; 0, Gφ(φ)−1) but not the joint π(θ, φ, rθ, rφ). That is because the Gibbs sampler does not take into account the effect of φ on rθ. In other words, the Gibbs step has the stationary distribution π(φ, rφ|θ) rather than π(φ, rφ|θ, rθ). The difference between the two is the auxiliary potential. In contrast, the SSHMC methods preserve the Hamiltonian of π(θ, φ, rθ, rφ). 4.4 Choice of Mass Matrix The choice of Gθ and Gφ in SSHMC is usually similar to RMHMCWG. If the Hessian matrix of −log p(θ|y, x, φ) is independent of θ and always p.d., it is natural to define Gθ as the inverse of the Hessian matrix. However, for some popular models, e.g., logistic regression, the Hessian matrix of the likelihood function depends on the parameters θ. In this case, one can use any approximate Hessian B, like the Hessian at the mode, and define Gθ := (B + B(φ))−1, where B(φ) is the Hessian of the prior distribution. Such a rough approximation is usually good enough to improve the mixing speed, because the main difficulty is the correlation between model parameters and hyperparameters. In general, because the computational bottleneck in HMC and SSHMC is computing the gradient of the target distribution, both methods have the same computational complexity O(lg), where g is the cost of computing the gradient and l is the total number of leapfrog steps per iteration. However, in practice we find it very beneficial to use multiple steps in each blockwise leapfrog update in ABLA; this can cause SSHMC to require more time than HMC. Also, depending on the mass matrix Gθ, the cost of leapfrog a step in ABLA may be different from those in standard HMC. For some choices of Gθ, the leapfrog step in ABLA can be even faster than one leapfrog step of HMC. For example, in many models the computational bottleneck is the gradient ∇φ log Z(φ), Z(φ) is the normalization in prior. Recall that Gθ is a function of φ. If |Gθ| = Z(φ)−1, Z(φ) will be canceled out, avoiding computation of ∇φ log Z(φ). One example is using Gx = evI in Gaussian funnel distribution aforementioned in Section 2. A potential problem of such Gθ is that the curvature of the likelihood function p(D|θ) is ignored. But when the data in each group is sparse and the parameters θ are strongly correlated, this Gθ can give nearly optimal mixing speed and make SSHMC much faster. In general, any choice of Gθ and Gφ that would be valid for separable HMC with Gibbs is also valid for SSHMC. 5 Experimental Results In this section, we compare the performance of SSHMC with the standard HMC and RMHMC within Gibbs [7] on four benchmark models.1 The step size of all methods are manually tuned so 1Our use of a Gibbs scheme for RMHMC follows standard practice [7]. 5 5 10 15 20 25 30 0 50 100 150 200 250 300 time energy potential Kinetic Hamlt x1 v 5 10 15 20 25 30 −300 −200 −100 0 100 200 300 time energy potential Kinetic Hamlt x1 v HMC with diagonal constant mass SSHMC (semi-separable mass) Figure 1: The trace of energy over the simulation time and the trajectory of the first dimension of 100 dimensional Gaussian x1 (vertical axis) and hyperparameter v (horizontal axis). The two simulations start with the same initial point sampled from the Gaussian Funnel. time(s) min ESS(x, v) min ESS/s (x, v) MSE(E[v], E[v2]) HMC 36.63 (115.35, 38.96) (3.14, 1.06) (0.6, 0.18) RMHMC(Gibbs) 18.92 (1054.33, 31.69) (55.15, 1.6) (1.58, 0.72) SSHMC 22.12 (3868.79, 1541.67) (103.57, 41.27) (0.04, 0.03) Table 1: The result of ESS of 5000 samples on 100 + 1 dimensional Gaussian Funnel distribution. x are model parameters and v is the hyperparameter. The last column is the mean squared error of the sample estimated mean and variance of the hyperparameter. running time(s) ESS θ (min, med, max) ESS v min ESS/s HMC 378 (2.05, 3.68, 4.79) ×103 815 2.15 RMHMC(Gibbs) 411 (0.8, 4.08, 4.99)×103 271 0.6 SSHMC 385.82 (2.5, 3.42, 4.27)×103 2266 5.83 Table 2: The results of ESS of 5000 samples after 1000 burn-in on Hierarchical Bayesian Logistic Regression. θ are 200 dimensional model parameters and v is the hyperparameter. time (s) ESS x(min, med, max) ESS(β, σ, φ) min ESS/s HMC 162 (1.6, 2.2, 5.2)×102 (50, 50, 128) 0.31 RMHMC(Gibbs) 183 (12.1, 18.4, 33.5)×102 (385, 163, 411) 0.89 SSHMC 883 (78.4, 98.9, 120.7)×102 (4434, 1706, 1390) 1.57 Table 3: The ESS of 20000 posterior samples of Stochastic Volatility after 10000 burn-in. x are latent volatilities over 2000 time lags and (β, σ, φ) are hyperparameters. Min ESS/s is the lowest ESS over all parameters normalized by running time. that the acceptance rate is around 70-85%. The number of leapfrog steps are tuned for each method using preliminary runs. The implementation of RMHMC we used is from [7]. The running time is wall-clock time measured after burn-in. The performance is evaluated by the minimum Effective Sample Size (ESS) over all dimensions (see [6]). When considering the different computational complexity of methods, our main efficiency metric is time normalized ESS. 5.1 Demonstration on Gaussian Funnel We demonstrate SSHMC by sampling the Gaussian Funnel (GF) defined in Section 2. We consider n = 100 dimensional low-level parameters x and 1 hyperparameter v. RMHMC within Gibbs on GF has block diagonal mass matrix defined as Gx = −∂2 v log p(x, v)−1 = evI and Gv = −Ex[∂2 v log p(x, v)]−1 = (n + 1 9)−1. We use the same mass matrix in SSHMC, because it is semi-separable. We use 2 leapfrog steps for low-level parameters and 1 leapfrog step for the hyperparameter in ABLA and the same leapfrog step size for the two separable Hamiltonians. We generate 5000 samples from each method after 1000 burn-in iterations. The ESS per second (ESS/s) and mean squared error (MSE) of the sample estimated mean and variance of the hyperparameter are given in Table 1. Notice that RMHMC within Gibbs is much more efficient for the low-level variables because the mass matrix adapts with the hyperparameter. Figure 1 illustrates a dramatic difference between HMC and SSHMC. It is clear that HMC suffers from oscillation of the hyperparameter in a narrow region. That is because the kinetic energy limits the change of hyperparameters [3, 11]. In contrast, SSHMC has much wider energy variation and the trajectory spans 6 0.94 0.95 0.96 0.97 0.98 0.99 1 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.1 0.15 0.2 0.25 0.3 0.35 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.4 0.6 0.8 1 1.2 1.4 0 0.02 0.04 0.06 0.08 0.1 0.12 RMHMC SSHMC HMC Figure 2: The normalized histogram of 20000 posterior samples of hyperparameters of the stochastic volatility model (from left to right φ, σ, β) after 10000 burn-in samples. The data is generated by the hyperparameter (φ = 0.98, σ = 0.15, β = 0.65). All three methods produce accurate estimates, but SSHMC and RMHMC within Gibbs converge faster than HMC. a larger range of hyperparameter v. The energy variation of SSHMC is similar to the RMHMC with Soft-Abs metric (RMHMC-Soft-Abs) reported in [2], an instance of general RMHMC without Gibbs. But compared with [2], each ABLA step is about 100 times faster than each generalized leapfrog step and SSHMC can generate around 2.5 times more effective samples per second than RMHMC-Soft-Abs. Although RMHMC within Gibbs has better ESS/s on the low level variables, its estimation of the mean and variance is biased, indicating that the chain has not yet mixed. More important, Table 1 shows that the samples generated by SSHMC give nearly unbiased estimates of the mean and variance of the hyperparameter, which neither of the other methods are able to do. 5.2 Hierarchical Bayesian Logistic Regression In this experiment, we consider hierarchical Bayesian logistic regression with an exponential prior for the variance hyperparameter v, that is p(w, φ|D) ∝ Y i Y j σ(yijwT i xij)N(wi|0, vI)Exp(v|λ), where σ is the logistic function σ(z) = 1/(1+exp(−z)) and (yij, xij) is the jth data point in the ith group. We use the Statlog (German credit) dataset from [1]. This dataset includes 1000 data points and each data has 16 categorical features and 4 numeric features. Bayesian logistic regression on this dataset has been considered as a benchmark for HMC [7, 8], but the previous work uses only one group in their experiments. To make the problem more interesting, we partition the dataset into 10 groups according to the feature Purpose. The size of group varies from 9 to 285. There are 200 model parameters (20 parameters for each group) and 1 hyperparameter. We consider the reparameterization of the hyperparameter γ = log v. For RMHMC within Gibbs, the mass matrix for group i is Gi := I(x, θ)−1, where I(x, θ) is the Fisher Information matrix for model parameter wi and constant mass Gv. In each iteration of the Gibbs sampler, each wi is sampled from by RMHMC using 6 generalized leapfrog steps and v is sampled using 6 leapfrog steps. For SSHMC, Gi := Cov(x) + exp(γ)I and the same constant mass Gv. The results are shown in Table 2. SSHMC again has much higher ESS/s than the other methods. 5.3 Stochastic Volatility A stochastic volatility model we consider is studied in [9], in which the latent volatilities are modeled by an auto-regressive AR(1) process such that the observations are yt = ϵtβ exp(xt/2) with latent variable xt+1 = φxt + ηt+1. We consider the distributions x1 ∼N(0, σ2/(1 −φ2)), ϵt ∼N(0, 1) and ηt ∼(0, σ2). The joint probability is defined as p(y, x, β, φ, σ) = T Y t=1 p(yt|xt, β)p(x1) T Y t=2 p(xt|xt−1, φ, σ)π(β)π(φ)φ(σ), where the prior π(β) ∝1/β, σ2 ∼Inv-χ2(10, 0.05) and (φ + 1)/2 ∼beta(20, 1.5). The FIM of p(x|α, β, φ, y) depends on the hyperparameters but not x, but the FIM of p(α, β, φ|x, y) depends on (α, β, φ). For RMHMC within Gibbs we consider FIM as the metric tensor following [7]. For SSHMC, we define Gθ as the inverse Hessian of log p(x|α, β, φ, y), but Gφ as an identity matrix. In each ABLA step, we use 5 leapfrog steps for updates of x and 2 leapfrog steps for updates of the hyperparameters, so that the running time of SSHMC is about 7 times that of standard HMC. 7 5 10 15 20 25 30 5 10 15 20 25 30 5 10 15 20 25 30 5 10 15 20 25 30 0 1 2 3 4 5 6 7 0 0.02 0.04 0.06 0.08 0.1 0.12 RMHMC SSHMC 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 RMHMC SSHMC (a) (b) (c) (d) Figure 3: Sample mean of latent fields of the LGCPP model from (a) RMHMC and (b) SSHMC. The normalized histogram of sampled hyperparameter (c) σ and (d) β. We draw 5000 samples from both methods after 1000 burn-in. The true hyperparameter values are (σ = 1.9, β = 0.03). time(h) ESS x(min, med, max) ESS(σ, β) min ESS/h SSHMC 2.6 (7.8, 30, 39)×102 (2101, 270) 103.8 RMHMC(Gibbs) 2.64 (1, 29, 38.3)×102 (200, 46) 16 Table 4: The ESS of 5000 posterior samples from 32x32 LGCPP after 1000 burn-in samples. x is the 1024 dimensional vector of latent variables and (σ, β) are the hyperparameters of the Gaussian Process prior. “min ESS/h” means minimum ESS per hour. We generate 20000 samples using each method after 10000 burn-in samples. As shown in Figure 2, the histogram of hyperparameters by all methods converge to the same distribution, so all methods are mixing well. But from Table 3, we see that SSHMC generates almost two times as many ESS/s as RMHMC within Gibbs. 5.4 Log-Gaussian Cox Point Process The log-Gaussian Cox Point Process (LGCPP) is another popular testing benchmark [5, 7, 14]. We follow the experimental setting of Girolami and Calderhead [7]. The observations Y = {yij} are counts at the location (i, j), i, j = 1, . . . , d on a regular spatial grid, which are conditionally independent given a latent intensity process Λ = {λ(i, j)} with mean mλ(i, j) = m exp(xi,j), where m = 1/d2, X = {xi,j}, x = Vec(X) and y = Vec(Y). X is assigned a Gaussian process prior, with mean function m(xi,j) = µ1 and covariance function Σ(xi,j, xi′,j′) = σ2 exp(−δ(i, i′, j, j′)/βd) where δ(·) is the Euclidean distance between (i, j) and (i′, j′). The log joint probability is given by log p(y, x|µ, σ, β) = P i,j yi,jxi,j −m exp(xi,j)−1 2(x−µ1)T Σ−1(x−µ1). We consider a 32×32 grid that has 1024 latent variables. Each latent variable xi,j corresponds to a single observation yi,j. We consider RMHMC within Gibbs with FIM of the conditional posteriors. See [7] for the FIM for this model. The generalized leapfrog steps are required for updating (σ, β), but only the leapfrog steps are required for updating x. Each Gibbs iteration takes 20 leapfrog steps for x and 1 general leapfrog step for (σ, β). In SSHMC, we use Gx = Σ−1 and G(σ,β) = I. In each ABLA step, the update of x takes 2 leapfrog steps and the update of (α, β) takes 1 leapfrog step. Each SSHMC transition takes 10 ABLA steps. We do not consider HMC on LGCPP, because it mixes extremely slowly for the hyperparameters. The results of ESS are given in Table 4. The mean of the sampled latent variables and the histogram of sampled hyperparameters are given in Figure 3. It is clear that the samples of RMHMC and SSHMC are consistent, so both methods are mixing well. However, SSHMC generates about six times as many effective samples per hour as RMHMC within Gibbs. 6 Conclusion We have presented Semi-Separable Hamiltonian Monte Carlo (SSHMC), a new version of Riemannian manifold Hamiltonian Monte Carlo (RMHMC) that aims to retain the flexibility of RMHMC for difficult Bayesian sampling problems, while achieving greater simplicity and lower computational complexity. We tested SSHMC on several different hierarchical models, and on all the models we considered, SSHMC outperforms both HMC and RMHMC within Gibbs in terms of number of effective samples produced in a fixed amount of computation time. Future work could consider other choices of mass matrix within the semi-separable framework, or the use of SSHMC within discrete models, following previous work in discrete HMC [12, 15]. 8 References [1] K. Bache and M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics. uci.edu/ml. [2] M. J. Betancourt. A general metric for Riemannian manifold Hamiltonian Monte Carlo. ArXiv e-prints, Dec. 2012. [3] M. J. Betancourt and M. Girolami. Hamiltonian Monte Carlo for hierarchical models. ArXiv e-prints, Dec. 2013. [4] K. Choo. Learning hyperparameters for neural network models using Hamiltonian dynamics. PhD thesis, Citeseer, 2000. [5] O. F. Christensen, G. O. Roberts, and J. S. Rosenthal. Scaling limits for the transient phase of local Metropolis–Hastings algorithms. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(2):253–268, 2005. [6] C. J. Geyer. Practical Markov Chain Monte Carlo. Statistical Science, pages 473–483, 1992. [7] M. Girolami and B. Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(2):123–214, 2011. doi: 10.1111/j.1467-9868.2010.00765.x. [8] M. D. Hoffman and A. Gelman. The no-U-turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15:1593–1623, 2014. [9] S. Kim, N. Shephard, and S. Chib. Stochastic volatility: likelihood inference and comparison with ARCH models. The Review of Economic Studies, 65(3):361–393, 1998. [10] B. Leimkuhler and S. Reich. Simulating Hamiltonian dynamics, volume 14. Cambridge University Press, 2004. [11] R. Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, pages 113–162, 2011. [12] A. Pakman and L. Paninski. Auxiliary-variable exact Hamiltonian Monte Carlo samplers for binary distributions. In Advances in Neural Information Processing Systems 26, pages 2490–2498. 2013. [13] C. P. Robert and G. Casella. Monte Carlo Statistical Methods. Springer, 2004. [14] Z. Wang, S. Mohamed, and N. de Freitas. Adaptive Hamiltonian and Riemann manifold Monte Carlo samplers. In International Conference on Machine Learning (ICML), pages 1462–1470, 2013. URL http://jmlr.org/proceedings/papers/v28/wang13e.pdf. JMLR W&CP 28 (3): 1462– 1470, 2013. [15] Y. Zhang, C. Sutton, A. Storkey, and Z. Ghahramani. Continuous relaxations for discrete Hamiltonian Monte Carlo. In Advances in Neural Information Processing Systems (NIPS), 2012. 9
2014
273
5,373
Predicting Useful Neighborhoods for Lazy Local Learning Aron Yu University of Texas at Austin aron.yu@utexas.edu Kristen Grauman University of Texas at Austin grauman@cs.utexas.edu Abstract Lazy local learning methods train a classifier “on the fly” at test time, using only a subset of the training instances that are most relevant to the novel test example. The goal is to tailor the classifier to the properties of the data surrounding the test example. Existing methods assume that the instances most useful for building the local model are strictly those closest to the test example. However, this fails to account for the fact that the success of the resulting classifier depends on the full distribution of selected training instances. Rather than simply gathering the test example’s nearest neighbors, we propose to predict the subset of training data that is jointly relevant to training its local model. We develop an approach to discover patterns between queries and their “good” neighborhoods using large-scale multilabel classification with compressed sensing. Given a novel test point, we estimate both the composition and size of the training subset likely to yield an accurate local model. We demonstrate the approach on image classification tasks on SUN and aPascal and show its advantages over traditional global and local approaches. 1 Introduction Many domains today—vision, speech, biology, and others—are flush with data. Data availability, combined with recent large-scale annotation efforts and crowdsourcing developments, have yielded labeled datasets of unprecedented size. Though a boon for learning approaches, large labeled datasets also present new challenges. Beyond the obvious scalability concerns, the diversity of the data can make it difficult to learn a single global model that will generalize well. For example, a standard binary dog classifier forced to simultaneously account for the visual variations among hundreds of dog breeds may be “diluted” to the point it falls short in detecting new dog instances. Furthermore, with training points distributed unevenly across the feature space, the model capacity required in any given region of the space will vary. As a result, if we train a single high capacity learning algorithm, it may succeed near parts of the decision boundary that are densely populated with training examples, yet fail in poorly sampled areas of the feature space. Local learning methods offer a promising direction to address these challenges. Local learning is an instance of “lazy learning”, where one defers processing of the training data until test time. Rather than estimate a single global model from all training data, local learning methods instead focus on a subset of the data most relevant to the particular test instance. This helps learn fine-grained models tailored to the new input, and makes it possible to adjust the capacity of the learning algorithm to the local properties of the data [5]. Local methods include classic nearest neighbor classification as well as various novel formulations that use only nearby points to either train a model [2, 3, 5, 13, 29] or learn a feature transformation [8, 9, 15, 25] that caters to the novel input. A key technical question in local learning is how to determine which training instances are relevant to a test instance. All existing methods rely on an important core assumption: that the instances most useful for building a local model are those that are nearest to the test example. This assumption is well-motivated by the factors discussed above, in terms of data density and intra-class variation. 1 Furthermore, identifying training examples solely based on proximity has the appeal of permitting specialized similarity functions (whether learned or engineered for the problem domain), which can be valuable for good results, especially in structured input spaces. On the other hand, there is a problem with this core assumption. By treating the individual nearness of training points as a metric of their utility for local training, existing methods fail to model how those training points will actually be employed. Namely, the relative success of a locally trained model is a function of the entire set or distribution of the selected data points—not simply the individual pointwise nearness of each one against the query. In other words, the ideal target subset consists of a set of instances that together yield a good predictive model for the test instance. Based on this observation, we propose to learn the properties of a “good neighborhood” for local training. Given a test instance, the goal is to predict which subset of the training data should be enlisted to train a local model on the fly. The desired prediction task is non-trivial: with a large labeled dataset, the power set of candidates is enormous, and we can observe relatively few training instances for which the most effective neighborhood is known. We show that the problem can be cast in terms of large-scale multi-label classification, where we learn a mapping from an individual instance to an indicator vector over the entire training set that specifies which instances are jointly useful to the query. Our approach maintains an inherent bias towards neighborhoods that are local, yet makes it possible to discover subsets that (i) deviate from a strict nearest-neighbor ranking and (ii) vary in size. The proposed technique is a general framework to enhance local learning. We demonstrate its impact on image classification tasks for computer vision, and show its substantial advantages over existing local learning strategies. Our results illustrate the value in estimating the size and composition of discriminative neighborhoods, rather than relying on proximity alone. 2 Related Work Local learning algorithms Lazy local learning methods are most relevant to our work. Existing methods primarily vary in how they exploit the labeled instances nearest to a test point. One strategy is to identify a fixed number of neighbors most similar to the test point, then train a model with only those examples (e.g., a neural network [5], SVM [29], ranking function [3, 13], or linear regression [2]). Alternatively, the nearest training points can be used to learn a transformation of the feature space (e.g., Linear Discriminant Analysis); after projecting the data into the new space, the model is better tailored to the query’s neighborhood properties [8, 9, 15, 25]. In local selection methods, strictly the subset of nearby data is used, whereas in locally weighted methods, all training points are used but weighted according to their distance [2]. All prior methods select the local neighborhood based on proximity, and they typically fix its size. In contrast, our idea is to predict the set of training instances that will produce an effective discriminative model for a given test instance. Metric learning The question “what is relevant to a test point?” also brings to mind the metric learning problem. Metric learning methods optimize the parameters of a distance function so as to best satisfy known (dis)similarity constraints between training data [4]. Most relevant to our work are those that learn local metrics; rather than learn a single global parameterization, the metric varies in different regions of the feature space. For example, to improve nearest neighbor classification, in [11] a set of feature weights is learned for each individual training example, while in [26, 28] separate metrics are trained for clusters discovered in the training data. Such methods are valuable when the data is multi-modal and thus ill-suited by a single global metric. Furthermore, one could plug a learned metric into the basic local learning framework. However, we stress that learning what a good neighbor looks like (metric learning’s goal) is distinct from learning what a good neighborhood looks like (our goal). Whereas a metric can be trained with pairwise constraints indicating what should be near or far, jointly predicting the instances that ought to compose a neighborhood requires a distinct form of learning, which we tackle in this work. Hierarchical classification For large multi-class problems, hierarchical classification approaches offer a different way to exploit “locality” among the training data. The idea is to assemble a tree of decision points, where at each node only a subset of labels are considered (e.g., [6, 12, 21]). Such methods are valuable for reducing computational complexity at test time, and broadly speaking they share the motivation of focusing on finer-grained learning tasks to improve accuracy. However, 2 otherwise the work is quite distant from our problem. Hierarchical methods precompute groups of labels to isolate in classification tasks, and apply the same classifiers to all test instances; lazy local learning predicts at test time what set of training instances are relevant for each novel test instance. Weighting training instances Our problem can be seen as deciding which training instances to “trust” most. Various scenarios call for associating weights with training instances such that some influence the learned parameters more than others. For example, weighted instances can reflect label confidences [27], help cope with imbalanced training sets [24], or resist the influence of outliers [20]. However, unlike our setting, the weights are given at training time and they are used to create a single global model. Methods to estimate the weights per example arise in domain adaptation, where one aims to give more weight to source domain samples distributed most like those in the target domain [14, 17, 18]. These are non-local, offline approaches, whereas we predict useful neighborhoods in an online, query-dependent manner. Rather than close the mismatch between a source and target domain, we aim to find a subset of training data amenable to a local model. Active learning Active learning [23] aims to identify informative unlabeled training instances, with the goal of minimizing labeling effort when training a single (global) classifier. In contrast, our goal is to ignore those labeled training points that are irrelevant to a particular novel instance. 3 Approach We propose to predict the set of training instances which, for a given test example, are likely to compose an effective neighborhood for local classifier learning. We use the word “neighborhood” to refer to such a subset of training data—though we stress that the optimal subset need not consist of strictly rank-ordered nearest neighbor points. Our approach has three main phases: (i) an offline stage where we generate positive training neighborhoods (Sec. 3.1), (ii) an offline stage where we learn a mapping from individual examples to their useful neighborhoods (Sec. 3.2), and (iii) an online phase where we apply the learned model to infer a novel example’s neighborhood, train a local classifier, and predict the test label (Sec. 3.3). 3.1 Generating training neighborhoods Let T = {(x1, c1), . . . , (xM, cM)} denote the set of M category-labeled training examples. Each xi ∈ℜd is a vector in some d-dimensional feature space, and each ci ∈{1, . . . , C} is its target category label. Given these examples, we first aim to generate a set of training neighborhoods, N = {(xn1, yn1), . . . , (xnN , ynN )}. Each training neighborhood (xni, yni) consists of an individual instance xni paired with a set of training instance indices capturing its target “neighbors”, the latter being represented as a M-dimensional indicator vector yni. If yni(j) = 1, this means xj appears in the target neighborhood for xni. Otherwise, yni(j) = 0. Note that the dimensionality of this target indicator vector is M, the number of total available training examples. We will generate N such pairs, where typically N ≪M. As discussed above, there are very good motivations for incorporating nearby points for local learning. Indeed, we do not intend to eschew the “locality” aspect of local learning. Rather, we start from the premise that points near to a query are likely relevant—but relevance is not necessarily preserved purely by their rank order, nor must the best local set be within a fixed radius of the query (or have a fixed set size). Instead, we aim to generalize the locality concept to jointly estimate the members of a neighborhood such that taken together they are equipped to train an accurate query-specific model. With these goals in mind, we devise an empirical approach to generate the pairs (xni, yni) ∈N. The main idea is to sample a series of candidate neighborhoods for each instance xni, evaluate their relative success at predicting the training instance’s label, and record the best candidate. Specifically, for instance xni, we first compute its proximity to the M −1 other training images in the feature space. (We simply apply Euclidean distance, but a task-specific kernel or learned metric could also be used here.) Then, for each of a series of possible neighborhood sizes {k1, . . . , kK}, we sample a neighborhood of size k from among all training images, subject to two requirements: (i) points nearer to xni are more likely to be chosen, and (ii) the category label composition within the neighborhood set is balanced. In particular, for each possible category label 1, . . . , C we sample k C training instances without replacement, where the weight associated with an instance is inversely 3 related to its (normalized) distance to xni. We repeat the sampling S times for each value of k, yielding K × S candidates per instance xni. Next, for each of these candidates, we learn a local model. Throughout we employ linear support vector machine (SVM) classifiers, both due to their training efficiency and because lower capacity models are suited to the sparse, local datasets under consideration; however, kernelized/non-linear models are also possible.1 Note that any number of the K × S sampled neighborhoods may yield a classifier that correctly predicts xni’s category label cni. Thus, to determine which among the successful classifiers is best, we rank them by their prediction confidences. Let pk s(xni) = P(cni|xni) be the posterior estimated by the s-th candidate classifier for neighborhood size k, as computed via Platt scaling using the neighborhood points. To automatically select the best k for instance xni, we average these posteriors across all samples per k value, then take the one with the highest probability: k∗= arg max k 1 S PS s=1 pk s(xni). The averaging step aims to smooth the estimated probability using the samples for that value of k, each of which favors near points but varies in its composition. Finally, we obtain a single neighborhood pair (xni, yni), where yni is the indicator vector for the neighborhood sampled with size k∗having the highest posterior pk∗ s . In general we can expect higher values of S and denser samplings of k to provide best results, though at a correspondingly higher computational cost during this offline training procedure. 3.2 Learning to predict neighborhoods with compressed sensing With the training instance-neighborhood pairs in hand, we next aim to learn a function capturing their relationships. This function must estimate the proper neighborhood for novel test instances. We are faced with a non-trivial learning task. The most straightforward approach might be to learn a binary decision function for each xi ∈T , trained with all xnj for which ynj(i) = 1 as positives. However, this approach has several problems. First, it would require training M binary classifiers, and in the applications of interest M—the number of all available category-labeled examples—may be very large, easily reaching the millions. Second, it would fail to represent the dependencies between the instances appearing in a single training neighborhood, which ought to be informative for our task. Finally, it is unclear how to properly gather negative instances for such a naive solution. Instead, we pose the learning task as a large-scale multi-label classification problem. In multi-label classification, a single data point may have multiple labels. Typical examples include image and web page tagging [16, 19] or recommending advertiser bid phrases [1]. In our case, rather than predict which labels to associate with a novel example, we want to predict which training instances belong in its neighborhood. This is exactly what is encoded by the target indicator vectors defined above, yni. Furthermore, we want to exploit the fact that, compared to the number of all labeled training images, the most useful local neighborhoods will contain relatively few examples. Therefore, we adopt a large-scale multi-label classification approach based on compressed sensing [19] into our framework. With it, we can leverage sparsity in the high-dimensional target neighborhood space to efficiently learn a prediction function that jointly estimates all useful neighbors. First, for each of the N training neighborhoods, we project its M-dimensional neighborhood vector yni to a lower-dimensional space using a random transformation: zni = φ yni, where φ is a D × M random matrix, and D denotes the compressed indicators’ dimensionality. Then, we learn regression functions to map the original features to these projected values zn1, . . . , znN as targets. That is, we obtain a series of D ≪M regression functions f1, . . . , fD minimizing the loss in the compressed indicator vector space. Given a novel instance xq, those same regression functions are applied to map to the reduced space, [f1(xq), . . . , fD(xq)]. Finally, we predict the complete indicator vector by recovering the M-dimensional vector using a standard reconstruction algorithm from the compressed sensing literature. We employ the Bayesian multi-label compressed sensing framework of [19], since it unifies the regression and sparse recovery stages, yielding accurate results for a compact set of latent variables. Due to compressed sensing guarantees, an M-dimensional indicator vector with l nonzero entries can be recovered efficiently using D = O(l log M l ) [16]. 1In our experiments the datasets have binary labels (C = 2); in the case of C > 2 the local model must be multi-class, e.g., a one-versus-rest SVM. 4 3.3 Inferring the neighborhood for a novel example All processing so far is performed offline. At test time, we are given a novel example xq, and must predict its category label. We first predict its neighborhood using the compressed sensing approach overviewed in the previous section, obtaining the M-dimensional vector ˆyq. The entries of this vector are real-valued, and correspond to our relative confidence that each category-labeled instance xi ∈T belongs in xq’s neighborhood. Past multi-label classification work focuses its evaluation on the precision of (a fixed number of) the top few most confident predictions and the raw reconstruction error [16, 19], and does not handle the important issue of how to truncate the values to produce hard binary decisions. In contrast, our setting demands that we extract both the neighborhood size estimate as well as the neighborhood composition from the estimated real-valued indicator vector. To this end, we perform steps paralleling the training procedure defined in Sec. 3.1, as follows. First, we use the sorted confidence values in ˆyq to generate a series of candidate neighborhoods of sizes varying from k1 to kK, each time ensuring balance among the category labels. That is, for each k, we take the k C most confident training instances per label. Recall that all M training instances referenced by ˆyq have a known category label among 1, . . . , C. Analogous to before, we then apply each of the K candidate predicted neighborhoods in turn to train a local classifier. Of those, we return the category label prediction from the classifier with the most confident decision value. Note that this process automatically selects the neighborhood size k to apply for the novel input. In contrast, existing local learning approaches typically manually define this parameter and fix it for all test examples [5, 8, 13, 15, 29]. Our results show that approach is sub-optimal; not only does the most useful neighborhood deviate from the strict ranked list of neighbors, it also varies in size. We previously explored an alternative approach for inference, where we directly used the confidences in ˆyq as weights in an importance-weighted SVM. That is, for each query, we trained a model with all M data points, but modulated their influence according to the soft indicator vector ˆyq, such that less confident points incurred lower slack penalties. However, we found that approach inferior, likely due to the difficulty in validating the slack scale factor for all training instances (problematic in the local learning setting) as well as the highly imbalanced datasets we tackle in the experiments. 3.4 Discussion While local learning methods strive to improve accuracy over standard global models, their lazy use of training data makes them more expensive to apply. This is true of any local approach that needs to compute distances to neighbors and train a fresh classifier online for each new test example. In our case, using Matlab, the run-time for processing a single novel test point can vary from 30 seconds to 30 minutes. It is dominated by the compressed sensing reconstruction step, which takes about 80% of the computation time and is highly dependent on the complexity of the trained model. One could improve performance by using approximate nearest neighbor methods to sort T , or pre-computing a set of representative local models. We leave these implementation improvements as future work. The offline stages of our algorithm (Secs. 3.1 and 3.2) require about 5 hours for datasets with M = 14, 000, N = 2, 000, d = 6, 300, and D = 2, 000. The run-time is dominated by the SVM evaluation of K × S candidate training neighborhoods on the N images, which could be performed in parallel. The compressed sensing formulation is quite valuable for efficiency here; if we were to instead naively train M independent classifiers, the offline run-time would be on the order of days. We found that building category-label balance into the training and inference algorithms was crucial for good results when dealing with highly imbalanced datasets. Earlier versions of our method that ignored label balance would often predict neighborhoods with only the same label as the query. Local methods typically handle this by reverting to a nearest neighbor decision. However, as we will see below, this can be inferior to explicitly learning to identify a local and balanced neighborhood, which can be used to build a more sophisticated classifier (like an SVM). Finally, while our training procedure designates a single neighborhood as the prediction target, it is determined by a necessarily limited sample of candidates (Sec. 3.1). Our confidence ranking step accounts for the differences between those candidates that ultimately make the same label prediction. Nonetheless, the non-exhaustive training samples mean that slight variations on the target vectors 5 may be equally good in practice. This suggests future extensions to explicitly represent “missing” entries in the indicator vector during training or employ some form of active learning. 4 Experiments We validate our approach on an array of binary image classification tasks on public datasets. Datasets We consider two challenging datasets with visual attribute classification tasks. The SUN Attributes dataset [22] (SUN) contains 14,340 scene images labeled with binary attributes of various types (e.g., materials, functions, lighting). We use all images and randomly select 8 attribute categories. We use the 6,300-dimensional HOG 2 × 2 features provided by the authors, since they perform best for this dataset [22]. The aPascal training dataset [10] contains 6,440 object images labeled with attributes describing the objects’ shapes, materials, and parts. We use all images and randomly select 6 attribute categories. We use the base features from [10], which include color, texture, edges, and HOG. We reduce their dimensionality to 200 using PCA. For both datasets, we treat each attribute as a separate binary classification task (C = 2). Implementation Details For each attribute, we compose a test set of 100 randomly chosen images (balanced between positives and negatives), and use all other images for T . This makes M = 14, 240 for SUN and M = 6, 340 for aPascal. We use N = 2, 000 training neighborhoods for both, and set D = {2000, 1000} for SUN and aPascal, roughly 15% of their original label indicator lengths. Generally higher values of D yield better accuracy (less compression), but for a greater expense. We fix the number of samples S = 100, and consider neighborhood sizes from k1 = 50 and kK = 500, in increments of 10 to 50. Baselines and Setup We compare to the following methods: (1) Global: for each test image, we apply the same global classifier trained with all M training images; (2) Local: for each test image, we apply a classifier trained with only its nearest neighbors, as measured with Euclidean distance on the image features. This baseline considers a series of k values, like our method, and independently selects the best k per test point according to the confidence of the resulting local classifiers (see Sec. 3.3). (3) Local+ML: same as Local, except the Euclidean distance is replaced with a learned metric. We apply the ITML metric learning algorithm [7] using the authors’ public code. Global represents the default classification approach, and lets us gauge to what extent the classification task requires local models at all (e.g., how multi-modal the dataset is). The two Local baselines represent the standard local learning approach [3, 5, 13, 15, 25, 29], in which proximal data points are used to train a model per test case, as discussed in Sec. 2. By using proximity instead of ˆyq to define neighborhoods, they isolate the impact of our compressed sensing approach. All results reported for our method and the Local baselines use the automatically selected k value per test image (cf. Sec. 3.3), unless otherwise noted. Each local method independently selects its best k value. All methods use the exact same image features and train linear SVMs, with the cost parameter cross-validated based on the Global baseline. To ensure the baselines do not suffer from the imbalanced data, we show results for the baselines using both balanced (B) and unbalanced (U) training sets. For the balanced case, for Global we randomly downsample the negatives and average results over 10 such runs, and for Local we gather the nearest k 2 neighbors from each class. SUN Results The SUN attributes are quite challenging classification tasks. Images within the same attribute exhibit wide visual variety. For example, the attribute “eating” (see Fig. 1, top right) is positive for any images where annotators could envision eating occurring, spanning from an restaurant scene, to home a kitchen, to a person eating, to a banquet table close-up. Furthermore, the attribute may occupy only a portion of the image (e.g., “metal” might occupy any subset of the pixels). It is exactly this variety that we expect local learning may handle well. Table 1 shows the results on SUN. Our method outperforms all baselines for all attributes. Global benefits from a balanced training set (B), but still underperforms our method (by 6 points on average). We attribute this to the high intra-class variability of the dataset. Most notably, conventional Local learning performs very poorly—whether or not we enforce balance. (Recall that the test sets are always balanced, so chance is 0.50.) Adding metric learning to local (Local+ML) improves things only marginally, likely because the attributes are not consistently localized in the image. We also implemented a local metric learning baseline that clusters the training points then learns a met6 Attribute Global Local Local+ML Ours Local Local+ML Ours Ours B U B U B U k = 400 Fix-k* hiking 0.80 0.60 0.51 0.56 0.55 0.65 0.85 0.53 0.53 0.89 0.89 eating 0.73 0.55 0.50 0.50 0.50 0.51 0.78 0.50 0.50 0.79 0.82 exercise 0.69 0.59 0.50 0.53 0.50 0.53 0.74 0.50 0.50 0.75 0.77 farming 0.77 0.56 0.51 0.54 0.52 0.57 0.83 0.51 0.51 0.81 0.88 metal 0.64 0.57 0.50 0.50 0.50 0.51 0.67 0.50 0.50 0.67 0.70 still water 0.70 0.54 0.51 0.53 0.51 0.52 0.76 0.50 0.50 0.71 0.81 clouds 0.78 0.77 0.70 0.74 0.74 0.75 0.80 0.65 0.74 0.79 0.84 sunny 0.60 0.67 0.65 0.67 0.62 0.60 0.73 0.59 0.57 0.72 0.78 Table 1: Accuracy (% of correctly labeled images) for the SUN dataset. B and U refers to balanced and unbalanced training data, respectively. All local results to left of double line use k values automatically selected per method and per test instance; all those to the right use a fixed k for all queries. See text for details. “hiking” Local Ours Local Ours “eating” Local Ours “exercise” Local “farming” Ours Local Ours “clouds” Local Ours “sunny” Figure 1: Example neighborhoods using visual similarity alone (Local) and compressed sensing inference (Ours) on SUN. For each attribute, we show a positive test image and its top 5 neighbors. Best viewed on pdf. ric per cluster, similar to [26, 28], then proceeds as Local+ML. Its results are similar to those of Local+ML (see Supp. file). The results left of the double bar correspond to auto-selected k values per query, which averaged k = 106 with a standard deviation of 24 for our method; see Supp. file for per attribute statistics. The rightmost columns of Table 1 show results when we fix k for all the local methods for all queries, as is standard practice.2 Here too, our gain over Local is sizeable, assuring that Local is not at any disadvantage due to our k auto-selection procedure. The rightmost column, Fix-k*, shows our results had we been able to choose the optimal fixed k (applied uniformly to all queries). Note this requires peeking at the test labels, and is something of an upper bound. It is useful, however, to isolate the quality of our neighborhood membership confidence estimates from the issue of automatically selecting the neighborhood size. We see there is room for improvement on the latter. Our method is more expensive at test time than the Local baseline due to the compressed sensing reconstruction step (see Sec. 3.4). In an attempt to equalize that factor, we also ran an experiment where the Local method was allowed to check more candidate k values than our method. Specifically, it could generate as many (proximity-based) candidate neighborhoods at test time as would fit in the run-time required by our approach, where k ranges from 20 up to 6,000 in increments of 10. Preliminary tests, however, showed that this gave no accuracy improvement to the baseline. This indicates our method’s higher computational overhead is warranted. Despite its potential to handle intra-class variations, the Local baseline fails on SUN because the neighbors that look most similar are often negative, leading to near-chance accuracy. Even when we balance its local neighborhood by label, the positives it retrieves can be quite distant (e.g., see “exercise” in Fig. 1). Our approach, on the other hand, combines locality with what it learned about 2We chose k = 400 based on the range where the Local baseline had best results. 7 Attribute Global Local Local+ML Ours Local Local+ML Ours Ours B U B U B U k = 400 Fix-k* wing 0.69 0.76 0.58 0.67 0.59 0.67 0.71 0.50 0.53 0.66 0.78 wheel 0.84 0.86 0.61 0.71 0.62 0.69 0.78 0.54 0.63 0.74 0.81 plastic 0.67 0.71 0.50 0.60 0.50 0.54 0.64 0.50 0.50 0.54 0.67 cloth 0.74 0.72 0.70 0.67 0.72 0.68 0.72 0.69 0.65 0.64 0.77 furry 0.80 0.80 0.58 0.75 0.60 0.71 0.81 0.54 0.63 0.72 0.82 shiny 0.72 0.77 0.56 0.67 0.57 0.64 0.72 0.52 0.55 0.62 0.73 Table 2: Accuracy (% of correctly labeled images) for the aPascal dataset, formatted as in Table 1 useful neighbor combinations, attaining much better results. Altogether, our gains over both Local and Local+ML—20 points on average—support our central claim that learning what makes a good neighbor is not equivalent to learning what makes a good neighborhood. Figure 1 shows example test images and the top 5 images in the neighborhoods produced by both Local and our approach. We stress that while Local’s neighbors are ranked based on visual similarity, our method’s “neighborhood” uses visual similarity only to guide its sampling during training, then directly predicts which instances are useful. Thus, purer visual similarity in the retrieved examples is not necessarily optimal. We see that the most confident neighborhood members predicted by our method are more often positives. Relying solely on visual similarity, Local can retrieve less informative instances (e.g., see “farming”) that share global appearance but do not assist in capturing the class distribution. The attributes where the Local baseline is most successful, “sunny” and “cloudy”, seem to differ from the rest in that (i) they exhibit more consistent global image properties, and (ii) they have many more positives in the dataset (e.g., 2,416 positives for “sunny” vs. only 281 for “farming”). In fact, this scenario is exactly where one would expect traditional visual ranking for local learning to be adequate. Our method does well not only in such cases, but also where image nearness is not a good proxy for relevance to classifier construction. aPascal Results Table 2 shows the results on the aPascal dataset. Again we see a clear and consistent advantage of our approach compared to the conventional Local baselines, with an average accuracy gain of 10 points across all the Local variants. The addition of metric learning again provides a slight boost over local, but is inferior to our method, again showing the importance of learning good neighborhoods. On average, the auto-selected k values for this dataset were 144 with a standard deviation of 20 for our method; see Supp. file for per attribute statistics. That said, on this dataset Global has a slight advantage over our method, by 2.7 points on average. We attribute Global’s success on this dataset to two factors: the images have better spatial alignment (they are cropped to the boundaries of the object, as opposed to displaying a whole scene as in SUN), and each attribute exhibits lower visual diversity (they stem from just 20 object classes, as opposed to 707 scene classes in SUN). See Supp. file. For this data, training with all examples is most effective. While this dataset yields a negative result for local learning on the whole, it is nonetheless a positive result for the proposed form of local learning, since we steadily outperform the standard Local baseline. Furthermore, in principle, our approach could match the accuracy of the Global method if we let kK = M during training; in that case our method could learn that for certain queries, it is best to use all examples. This is a flexibility not offered by traditional local methods. However, due to run-time considerations, at the time of writing we have not yet verified this in practice. 5 Conclusions We proposed a new form of lazy local learning that predicts at test time what training data is relevant for the classification task. Rather than rely solely on feature space proximity, our key insight is to learn to predict a useful neighborhood. Our results on two challenging image datasets show our method’s advantages, particularly when categories are multi-modal and/or its similar instances are difficult to match based on global feature distances alone. In future work, we plan to explore ways to exploit active learning during training neighborhood generation to reduce its costs. We will also pursue extensions to allow incremental additions to the labeled data without complete retraining. Acknowledgements We thank Ashish Kapoor for helpful discussions. This research is supported in part by NSF IIS-1065390. 8 References [1] R. Agrawal, A. Gupta, Y. Prabhu, and M. Varma. Multi-label learning with millions of labels: Recommending advertiser bid phrases for web pages. In WWW, 2013. [2] C. Atkeson, A. Moore, and S. Schaal. Locally weighted learning. AI Review, 1997. [3] S. Banerjee, A. Dubey, J. Machchhar, and S. Chakrabarti. Efficient and accurate local learning for ranking. In SIGIR Wkshp, 2009. [4] A. Bellet, A. Habrard, and M. Sebban. A survey on metric learning for feature vectors and structured data. CoRR, abs/1306.6709, 2013. [5] L. Bottou and V. Vapnik. Local learning algorithms. Neural Comp, 1992. [6] L. Cai and T. Hofmann. Hierarchical document categorization with support vector machines. In CIKM, 2004. [7] J. Davis, B. Kulis, P. Jain, S. Sra, and I. Dhillon. Information-Theoretic Metric Learning. In ICML, 2007. [8] C. Domeniconi and D. Gunopulos. Adaptive nearest neighbor classification using support vector machines. In NIPS, 2001. [9] K. Duh and K. Kirchhoff. Learning to rank with partially-labeled data. In SIGIR, 2008. [10] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009. [11] A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In NIPS, 2006. [12] T. Gao and D. Koller. Discriminative learning of relaxed hierarchy for large-scale visual recognition. In ICCV, 2011. [13] X. Geng, T. Liu, T. Qin, A. Arnold, H. Li, and H. Shum. Query dependent ranking using k-nearest neighbor. In SIGIR, 2008. [14] B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In ICML, 2013. [15] T. Hastie and R. Tibshirani. Discriminant adaptive nearest neighbor classification. PAMI, 1996. [16] D. Hsu, S. Kakade, J. Langford, and T. Zhang. Multi-label prediction via compressed sensing. In NIPS, 2009. [17] J. Huang, A. Smola, A. Gretton, K. Borgwardt, and B. Scholkopf. Correcting sample selection bias by unlabeled data. In NIPS, 2007. [18] J. Jiang and C. Zhai. Instance weighting for domain adapation in NLP. In ACL, 2007. [19] A. Kapoor and P. Jaina nd R. Viswanathan. Multilabel classification using Bayesian compressed sensing. In NIPS, 2012. [20] M. Lapin, M. Hein, and B. Schiele. Learning using privileged information: SVM+ and weighted SVM. Neural Networks, 53, 2014. [21] M. Marszalek and C. Schmid. Constructing category hierarchies for visual recognition. In ECCV, 2008. [22] G. Patterson and J. Hays. Sun attribute database: Discovering, annotating, and recognizing scene attributes. In CVPR, 2012. [23] B. Settles. Active Learning Literature Survey. Computer Sciences Technical Report 1648, University of Wisconsin–Madison, 2009. [24] K. Veropoulos, C. Campbell, and N. Cristianini. Controlling the sensitivity of support vector machines. In IJCAI, 1999. [25] P. Vincent and Y. Bengio. K-local hyperplane and convex distance nearest neighbor algorithms. In NIPS, 2001. [26] K. Weinberger and L. Saul. Distance metric learning for large margin nearest neighbor classification. JMLR, 2009. [27] X. Wu and R. Srihari. Incorporating prior knowledge with weighted margin support vector machines. In KDD, 2004. [28] L. Yang, R. Jin, R. Sukthankar, and Y. Liu. An efficent algorithm for local distance metric learning. In AAAI, 2006. [29] H. Zhang, A. Berg, M. Maire, and J. Malik. SVM-KNN: Discriminative nearest neighbor classification for visual category recognition. In CVPR, 2006. 9
2014
274
5,374
(Almost) No Label No Cry Giorgio Patrini1,2, Richard Nock1,2, Paul Rivera1,2, Tiberio Caetano1,3,4 Australian National University1, NICTA2, University of New South Wales3, Ambiata4 Sydney, NSW, Australia {name.surname}@anu.edu.au Abstract In Learning with Label Proportions (LLP), the objective is to learn a supervised classifier when, instead of labels, only label proportions for bags of observations are known. This setting has broad practical relevance, in particular for privacy preserving data processing. We first show that the mean operator, a statistic which aggregates all labels, is minimally sufficient for the minimization of many proper scoring losses with linear (or kernelized) classifiers without using labels. We provide a fast learning algorithm that estimates the mean operator via a manifold regularizer with guaranteed approximation bounds. Then, we present an iterative learning algorithm that uses this as initialization. We ground this algorithm in Rademacher-style generalization bounds that fit the LLP setting, introducing a generalization of Rademacher complexity and a Label Proportion Complexity measure. This latter algorithm optimizes tractable bounds for the corresponding bag-empirical risk. Experiments are provided on fourteen domains, whose size ranges up to ≈300K observations. They display that our algorithms are scalable and tend to consistently outperform the state of the art in LLP. Moreover, in many cases, our algorithms compete with or are just percents of AUC away from the Oracle that learns knowing all labels. On the largest domains, half a dozen proportions can suffice, i.e. roughly 40K times less than the total number of labels. 1 Introduction Machine learning has recently experienced a proliferation of problem settings that, to some extent, enrich the classical dichotomy between supervised and unsupervised learning. Cases as multiple instance labels, noisy labels, partial labels as well as semi-supervised learning have been studied motivated by applications where fully supervised learning is no longer realistic. In the present work, we are interested in learning a binary classifier from information provided at the level of groups of instances, called bags. The type of information we assume available is the label proportions per bag, indicating the fraction of positive binary labels of its instances. Inspired by [1], we refer to this framework as Learning with Label Proportions (LLP). Settings that perform a bag-wise aggregation of labels include Multiple Instance Learning (MIL) [2]. In MIL, the aggregation is logical rather than statistical: each bag is provided with a binary label expressing an OR condition on all the labels contained in the bag. More general setting also exist [3] [4] [5]. Many practical scenarios fit the LLP abstraction. (a) Only aggregated labels can be obtained due to the physical limits of measurement tools [6] [7] [8] [9]. (b) The problem is semi- or unsupervised but domain experts have knowledge about the unlabelled samples in form of expectation, as pseudomeasurement [5]. (c) Labels existed once but they are now given in an aggregated fashion for privacy-preserving reasons, as in medical databases [10], fraud detection [11], house price market, election results, census data, etc. . (d) This setting also arises in computer vision [12] [13] [14]. Related work. Two papers independently introduce the problem, [12] and [9]. In the first the authors propose a hierarchical probabilistic model which generates labels consistent with the proportions, and make inference through MCMC sampling. Similarly, the second and its follower [6] offer a 1 variety of standard machine learning methods designed to generate self-consistent labels. [15] gives a Bayesian interpretation of LLP where the key distribution is estimated through an RBM. Other ideas rely on structural learning of Bayesian networks with missing data [7], and on K-MEANS clustering to solve preliminary label assignment in order to resort to fully supervised methods [13] [8]. Recent SVM implementations [11] [16] outperform most of the other known methods. Theoretical works on LLP belong to two main categories. The first contains uniform convergence results, for the estimators of label proportions [1], or the estimator of the mean operator [17]. The second contains approximation results for the classifier [17]. Our work builds upon their Mean Map algorithm, that relies on the trick that the logistic loss may be split in two, a convex part depending only on the observations, and a linear part involving a sufficient statistic for the label, the mean operator. Being able to estimate the mean operator means being able to fit a classifier without using labels. In [17], this estimation relies on a restrictive homogeneity assumption that the class-conditional estimation of features does not depend on the bags. Experiments display the limits of this assumption [11][16]. Contributions. In this paper we consider linear classifiers, but our results hold for kernelized formulations following [17]. We first show that the trick about the logistic loss can be generalized, and the mean operator is actually minimally sufficient for a wide set of “symmetric” proper scoring losses with no class-dependent misclassification cost, that encompass the logistic, square and Matsushita losses [18]. We then provide an algorithm, LMM, which estimates the mean operator via a Laplacian-based manifold regularizer without calling to the homogeneity assumption. We show that under a weak distinguishability assumption between bags, our estimation of the mean operator is all the better as the observations norm increase. This, as we show, cannot hold for the Mean Map estimator. Then, we provide a data-dependent approximation bound for our classifier with respect to the optimal classifier, that is shown to be better than previous bounds [17]. We also show that the manifold regularizer’s solution is tightly related to the linear separability of the bags. We then provide an iterative algorithm, AMM, that takes as input the solution of LMM and optimizes it further over the set of consistent labelings. We ground the algorithm in a uniform convergence result involving a generalization of Rademacher complexities for the LLP setting. The bound involves a bag-empirical surrogate risk for which we show that AMM optimizes tractable bounds. All our theoretical results hold for any symmetric proper scoring loss. Experiments are provided on fourteen domains, ranging from hundreds to hundreds of thousands of examples, comparing AMM and LMM to their contenders: Mean Map, InvCal [11] and ∝SVM [16]. They display that AMM and LMM outperform their contenders, and sometimes even compete with the fully supervised learner while requiring few proportions only. Tests on the largest domains display the scalability of both algorithms. Such experimental evidence seriously questions the safety of privacy-preserving summarization of data, whenever accurate aggregates and informative individual features are available. Section (2) presents our algorithms and related theoretical results. Section (3) presents experiments. Section (4) concludes. A Supplementary Material [19] includes proofs and additional experiments. 2 LLP and the mean operator: theoretical results and algorithms Learning setting Hereafter, boldfaces like p denote vectors, whose coordinates are denoted pl for l = 1, 2, .... For any m ∈N∗, let [m] .= {1, 2, ..., m}. Let Σm .= {σ ∈{−1, 1}m} and X ⊆Rd. Examples are couples (observation, label) ∈X × Σ1, sampled i.i.d. according to some unknown but fixed distribution D. Let S .= {(xi, yi), i ∈[m]} ∼Dm denote a size-m sample. In Learning with Label Proportions (LLP), we do not observe directly S but S|y, which denotes S with labels removed; we are given its partition in n > 0 bags, S|y = ∪jSj, j ∈[n], along with their respective label proportions ˆπj .= ˆP[y = +1|Sj] and bag proportions ˆpj .= mj/m with mj = card(Sj). (This generalizes to a cover of S, by copying examples among bags.) The “bag assignment function” that partitions S is unknown but fixed. In real world domains, it would rather be known, e.g. state, gender, age band. A classifier is a function h : X →R, from a set of classifiers H. HL denotes the set of linear classifiers, noted hθ(x) .= θ⊤x with θ ∈X. A (surrogate) loss is a function F : R →R+. We let F(S, h) .= (1/m) P i F(yih(xi)) denote the empirical surrogate risk on S corresponding to loss F. For the sake of clarity, indexes i, j and k respectively refer to examples, bags and features. The mean operator and its minimal sufficiency We define the (empirical) mean operator as: µS .= 1 m X i yixi . (1) 2 Algorithm 1 Laplacian Mean Map (LMM) Input Sj, ˆπj, j ∈[n]; γ > 0 (7); w (7); V (8); permissible φ (2); λ > 0; Step 1 : let ˜B ± ←arg minX∈R2n×d ℓ(L, X) using (7) (Lemma 2) Step 2 : let ˜µS ←P j ˆpj(ˆπj˜b+ j −(1 −ˆπj)˜b− j ) Step 3 : let ˜θ∗←arg minθ Fφ(S|y, θ, ˜µS) + λ∥θ∥2 2 (3) Return ˜θ∗ Table 1: Correspondence between permissible functions φ and the corresponding loss Fφ. loss name Fφ(x) −φ(x) logistic loss log(1 + exp(−x)) −x log x −(1 −x) log(1 −x) square loss (1 −x)2 x(1 −x) Matsushita loss −x + √ 1 + x2 p x(1 −x) The estimation of the mean operator µS appears to be a learning bottleneck in the LLP setting [17]. The fact that the mean operator is sufficient to learn a classifier without the label information motivates the notion of minimal sufficient statistic for features in this context. Let F be a set of loss functions, H be a set of classifiers, I be a subset of features. Some quantity t(S) is said to be a minimal sufficient statistic for I with respect to F and H iff: for any F ∈F, any h ∈H and any two samples S and S′, the quantity F(S, h) −F(S′, h) does not depend on I iff t(S) = t(S′). This definition can be motivated from the one in statistics by building losses from log likelihoods. The following Lemma motivates further the mean operator in the LLP setting, as it is the minimal sufficient statistic for a broad set of proper scoring losses that encompass the logistic and square losses [18]. The proper scoring losses we consider, hereafter called “symmetric” (SPSL), are twice differentiable, non-negative and such that misclassification cost is not label-dependent. Lemma 1 µS is a minimal sufficient statistic for the label variable, with respect to SPSL and HL. ([19], Subsection 2.1) This property, very useful for LLP, may also be exploited in other weakly supervised tasks [2]. Up to constant scalings that play no role in its minimization, the empirical surrogate risk corresponding to any SPSL, Fφ(S, h), can be written with loss: Fφ(x) .= φ(0) + φ⋆(−x) φ(0) −φ(1/2) .= aφ + φ⋆(−x) bφ , (2) and φ is a permissible function [20, 18], i.e. dom(φ) ⊇[0, 1], φ is strictly convex, differentiable and symmetric with respect to 1/2. φ⋆is the convex conjugate of φ. Table 1 shows examples of Fφ. It follows from Lemma 1 and its proof, that any Fφ(Sθ), can be written for any θ ≡hθ ∈HL as: Fφ(S, θ) = bφ 2m X i X σ Fφ(σθ⊤xi) ! −1 2θ⊤µS .= Fφ(S|y, θ, µS) , (3) where σ ∈Σ1. The Laplacian Mean Map (LMM) algorithm The sum in eq. (3) is convex and differentiable in θ. Hence, once we have an accurate estimator of µS, we can then easily fit θ to minimize Fφ(S|y, θ, µS). This two-steps strategy is implemented in LMM in algorithm 1. µS can be retrieved from 2n bag-wise, label-wise unknown averages bσ j : µS = (1/2) n X j=1 ˆpj X σ∈Σ1 (2ˆπj + σ(1 −σ))bσ j , (4) with bσ j .= ES[x|σ, j] denoting these 2n unknowns (for j ∈[n], σ ∈Σ1), and let bj .= (1/mj) P xi∈Sj xi. The 2n bσ j s are solution of a set of n identities that are (in matrix form): B −Π⊤B± = 0 , (5) 3 where B .= [b1|b2|...|bn]⊤∈Rn×d, Π .= [DIAG(ˆπ)|DIAG(1 −ˆπ)]⊤∈R2n×n and B± ∈R2n×d is the matrix of unknowns: B± .= h b+1 1 |b+1 2 |...|b+1 n | {z } (B+)⊤ b-1 1 |b-1 2 |...|b-1 n | {z } (B–)⊤ i⊤ . (6) System (5) is underdetermined, unless one makes the homogeneity assumption that yields the Mean Map estimator [17]. Rather than making such a restrictive assumption, we regularize the cost that brings (5) with a manifold regularizer [21], and search for ˜B ± = arg minX∈R2n×d ℓ(L, X), with: ℓ(L, X) .= tr (B⊤−X⊤Π)Dw(B −Π⊤X)  + γtr X⊤LX  , (7) and γ > 0. Dw .= DIAG(w) is a user-fixed bias matrix with w ∈Rn +,∗(and w ̸= ˆp in general) and: L .= εI +  La | 0 0 | La  ∈R2n×2n , (8) where La .= D −V ∈Rn×n is the Laplacian of the bag similarities. V is a symmetric similarity matrix with non negative coordinates, and the diagonal matrix D satisfies djj .= P j′ vjj′, ∀j ∈[n]. The size of the Laplacian is O(n2), which is very small compared to O(m2) if there are not many bags. One can interpret the Laplacian regularization as smoothing the estimates of bσ j w.r.t the similarity of the respective bags. Lemma 2 The solution ˜B ± to minX∈R2n×d ℓ(L, X) is ˜B ± = ΠDwΠ⊤+ γL −1 ΠDwB. ([19], Subsection 2.2). This Lemma explains the role of penalty εI in (8) as ΠDwΠ⊤and L have respectively n- and (≥1)-dim null spaces, so the inversion may not be possible. Even when this does not happen exactly, this may incur numerical instabilities in computing the inverse. For domains where this risk exists, picking a small ε > 0 solves the problem. Let ˜bσ j denote the row-wise decomposition of ˜B ± following (6), from which we compute ˜µS following (4) when we use these 2n estimates in lieu of the true bσ j . We compare µj .= ˆπjb+ j −(1−ˆπj)b− j , ∀j ∈[n] to our estimates ˜µj .= ˆπj˜b+ j −(1 −ˆπj)˜b− j , ∀j ∈[n], granted that µS = P j ˆpjµj and ˜µS = P j ˆpj ˜µj. Theorem 3 Suppose that γ satisfies γ √ 2 ≤((ε(2n)−1) + maxj̸=j′ vjj′)/ minj wj. Let M .= [µ1|µ2|...|µn]⊤∈Rn×d, ˜M .= [˜µ1|˜µ2|...|˜µn]⊤∈Rn×d and ς(V, B±) .= ((ε(2n)−1) + maxj̸=j′ vjj′)2∥B±∥F . The following holds: ∥M −˜M∥F ≤ √n √ 2 min j w2 j −1 × ς(V, B±) . (9) ([19], Subsection 2.3) The multiplicative factor to ς in (9) is roughly O(n5/2) when there is no large discrepancy in the bias matrix Dw, so the upperbound is driven by ς(., .) when there are not many bags. We have studied its variations when the “distinguishability” between bags increases. This setting is interesting because in this case we may kill two birds in one shot, with the estimation of M and the subsequent learning problem potentially easier, in particular for linear separators. We consider two examples for vjj′, the first being (half) the normalized association [22]: vnc jj′ .= 1 2  ASSOC(Sj, Sj) ASSOC(Sj, Sj ∪Sj′) + ASSOC(Sj′, Sj′) ASSOC(Sj′, Sj ∪Sj′)  = NASSOC(Sj, Sj′) , (10) vG,s jj′ .= exp(−∥bj −bj′∥2/s) , s > 0 . (11) Here, ASSOC(Sj, Sj′) .= P x∈Sj,x′∈Sj′ ∥x −x′∥2 2 [22]. To put these two similarity measures in the context of Theorem 3, consider the setting where we can make assumption (D1) that there exists a small constant κ > 0 such that ∥bj −bj′∥2 2 ≥κ maxσ,j ∥bσ j ∥2 2, ∀j, j′ ∈[n]. This is a weak distinguishability property as if no such κ exists, then the centers of distinct bags may just be confounded. Consider also the additional assumption, (D2), that there exists κ′ > 0 such that maxj d2 j ≤κ′, ∀j ∈[n], where dj .= maxxi,x′ i∈Sj ∥xi −xi′∥2 is a bag’s diameter. In the following Lemma, the little-oh notation is with respect to the “largest” unknown in eq. (4), i.e. maxσ,j ∥bσ j ∥2. 4 Algorithm 2 Alternating Mean Map (AMMOPT) Input LMM parameters + optimization strategy OPT ∈{min, max} + convergence predicate PR Step 1 : let ˜θ0 ←LMM(LMM parameters) and t ←0 Step 2 : repeat Step 2.1 : let σt ←arg OPTσ∈Σˆ πFφ(S|y, θt, µS(σ)) Step 2.2 : let ˜θt+1 ←arg minθ Fφ(S|y, θ, µS(σt)) + λ∥θ∥2 2 Step 2.3 : let t ←t + 1 until predicate PR is true Return ˜θ∗ .= arg mint Fφ(S|y, ˜θt+1, µS(σt)) Lemma 4 There exists ε∗> 0 such that ∀ε ≤ε∗, the following holds: (i) ς(Vnc, B±) = o(1) under assumptions (D1 + D2); (ii) ς(VG,s, B±) = o(1) under assumption (D1), ∀s > 0. ([19], Subsection 2.4) Hence, provided a weak (D1) or stronger (D1+D2) distinguishability assumption holds, the divergence between M and ˜M gets smaller with the increase of the norm of the unknowns bσ j . The proof of the Lemma suggests that the convergence may be faster for VG,s. The following Lemma shows that both similarities also partially encode the hardness of solving the classification problem with linear separators, so that the manifold regularizer “limits” the distortion of the ˜b± . s between two bags that tend not to be linearly separable. Lemma 5 Take vjj′ ∈{vG,. jj′ , vnc jj′}. There exists 0 < κl < κn < 1 such that (i) if vjj′ > κn then Sj, Sj′ are not linearly separable, and if vjj′ < κl then Sj, Sj′ are linearly separable. ([19], Subsection 2.5) This Lemma is an advocacy to fit s in a data-dependent way in vG,s jj′ . The question may be raised as to whether finite samples approximation results like Theorem 3 can be proven for the Mean Map estimator [17]. [19], Subsection 2.6 answers by the negative. In the Laplacian Mean Map algorithm (LMM, Algorithm 1), Steps 1 and 2 have now been described. Step 3 is a differentiable convex minimization problem for θ that does not use the labels, so it does not present any technical difficulty. An interesting question is how much our classifier ˜θ∗in Step 3 diverges from the one that would be computed with the true expression for µS, θ∗. It is not hard to show that Lemma 17 in Altun and Smola [23], and Corollary 9 in Quadrianto et al. [17] hold for LMM so that ∥˜θ∗−θ∗∥2 2 ≤(2λ)−1∥˜µS −µS∥2 2. The following Theorem shows a data-dependent approximation bound that can be significantly better, when it holds that θ⊤ ∗xi, ˜θ⊤ ∗xi ∈φ′([0, 1]), ∀i (φ′ is the first derivative). We call this setting proper scoring compliance (PSC) [18]. PSC always holds for the logistic and Matsushita losses for which φ′([0, 1]) = R. For other losses like the square loss for which φ′([0, 1]) = [−1, 1], shrinking the observations in a ball of sufficiently small radius is sufficient to ensure this. Theorem 6 Let fk ∈Rm denote the vector encoding the kth feature variable in S : fki = xik (k ∈[d]). Let ˜F denote the feature matrix with column-wise normalized feature vectors: ˜fk .= (d/ P k′ ∥fk′∥2 2)(d−1)/(2d)fk. Under PSC, we have ∥˜θ∗−θ∗∥2 2 ≤(2λ + q)−1∥˜µS −µS∥2 2, with: q .= det ˜F ⊤˜F m × 2e−1 bφφ′′ (φ′−1(q′/λ)) (> 0) , (12) for some q′ ∈I .= [±(x∗+ max{∥µS∥2, ∥˜µS∥2})]. Here, x∗ .= maxi ∥xi∥2 and φ′′ .= (φ′)′. ([19], Subsection 2.7) To see how large q can be, consider the simple case where all eigenvalues of ˜F ⊤˜F, λk(˜F ⊤˜F) ∈[λ◦± δ] for small δ. In this case, q is proportional to the average feature “norm”: det ˜F ⊤˜F m = tr F⊤F  md + o(δ) = P i ∥xi∥2 2 md + o(δ) . 5 The Alternating Mean Map (AMM) algorithm Let us denote Σˆπ .= {σ ∈Σm : P i:xi∈Sj σi = (2ˆπj −1)mj, ∀j ∈[n]} the set of labelings that are consistent with the observed proportions ˆπ, and µS(σ) .= (1/m) P i σixi the biased mean operator computed from some σ ∈Σˆπ. Notice that the true mean operator µS = µS(σ) for at least one σ ∈Σˆπ. The Alternating Mean Map algorithm, (AMM, Algorithm 2), starts with the output of LMM and then optimizes it further over the set of consistent labelings. At each iteration, it first picks a consistent labeling in Σˆπ that is the best (OPT = min) or the worst (OPT = max) for the current classifier (Step 2.1) and then fits a classifier ˜θ on the given set of labels (Step 2.2). The algorithm then iterates until a convergence predicate is met, which tests whether the difference between two values for Fφ(., ., .) is too small (AMMmin), or the number of iterations exceeds a user-specified limit (AMMmax). The classifier returned ˜θ∗is the best in the sequence. In the case of AMMmin, it is the last of the sequence as risk Fφ(S|y, ., .) cannot increase. Again, Step 2.2 is a convex minimization with no technical difficulty. Step 2.1 is combinatorial. It can be solved in time almost linear in m [19] (Subsection 2.8). Lemma 7 The running time of Step 2.1 in AMM is ˜O(m), where the tilde notation hides log-terms. Bag-Rademacher generalization bounds for LLP We relate the “min” and “max” strategies of AMM by uniform convergence bounds involving the true surrogate risk, i.e. integrating the unknown distribution D and the true labels (which we may never know). Previous uniform convergence bounds for LLP focus on coarser grained problems, like the estimation of label proportions [1]. We rely on a LLP generalization of Rademacher complexity [24, 25]. Let F : R →R+ be a loss function and H a set of classifiers. The bag empirical Rademacher complexity of sample S, Rb m, is defined as Rb m .= Eσ∼Σm suph∈H{Eσ′∼Σˆ πES[σ(x)F(σ′(x)h(x))]. The usual empirical Rademacher complexity equals Rb m for card(Σˆπ) = 1. The Label Proportion Complexity of H is: L2m .= ED2mEI/2 1 ,I/2 2 sup h∈H ES[σ1(x)(ˆπs |2(x) −ˆπℓ |1(x))h(x)] . (13) Here, each of I/2 l , l = 1, 2 is a random (uniformly) subset of [2m] of cardinal m. Let S(I/2 l ) be the size-m subset of S that corresponds to the indexes. Take l = 1, 2 and any xi ∈S. If i ̸∈I/2 l then ˆπs |l(xi) = ˆπℓ |l(xi) is xi’s bag’s label proportion measured on S\S(I/2 l ). Else, ˆπs |2(xi) is its bag’s label proportion measured on S(I/2 2) and ˆπℓ |1(xi) is its label (i.e. a bag’s label proportion that would contain only xi). Finally, σ1(x) .= 2 × 1x∈S(I/2 1 ) −1 ∈Σ1. L2m tends to be all the smaller as classifiers in H have small magnitude on bags whose label proportion is close to 1/2. Theorem 8 Suppose ∃h∗≥0 s.t. |h(x)| ≤h∗, ∀x, ∀h. Then, for any loss Fφ, any training sample of size m and any 0 < δ ≤1, with probability > 1 −δ, the following bound holds over all h ∈H: ED[Fφ(yh(x))] ≤ EΣˆ πES[Fφ(σ(x)h(x))] + 2Rb m + L2m + 4 2h∗ bφ + 1  r 1 2m log 2 δ .(14) Furthermore, under PSC (Theorem 6), we have for any Fφ: Rb m ≤ 2bφEΣm sup h∈H {ES[σ(x)(ˆπ(x) −(1/2))h(x)]} . (15) ([19], Subsection 2.9) Despite similar shapes (13) (15), Rb m and L2m behave differently: when bags are pure (ˆπj ∈{0, 1}, ∀j), L2m = 0. When bags are impure (ˆπj = 1/2, ∀j), Rb m = 0. As bags get impure, the bag-empirical surrogate risk, EΣˆ πES[Fφ(σ(x)h(x))], also tends to increase. AMMmin and AMMmax respectively minimize a lowerbound and an upperbound of this risk. 3 Experiments Algorithms We compare LMM, AMM (Fφ = logistic loss) to the original MM [17], InvCal [11], conv∝SVM and alter-∝SVM [16] (linear kernels). To make experiments extensive, we test several initializations for AMM that are not displayed in Algorithm 2 (Step 1): (i) the edge mean map estimator, ˜µEMM S .= 1/m2(P i yi)(P i xi) (AMMEMM), (ii) the constant estimator ˜µ1 S .= 1 (AMM1), and finally AMM10ran which runs 10 random initial models (∥θ0∥2 ≤1), and selects the one with smallest risk; 6 1.0 1.1 1.2 1.3 2 4 6 divergence AUC rel. to MM MM LMMG LMMG,s LMMnc (a) 0.6 0.7 0.8 0.9 1.0 0.6 0.8 1.0 entropy AUC rel. to Oracle MM LMMG LMMG,s LMMnc (b) 0.6 0.7 0.8 0.9 1.0 0.6 0.8 1.0 entropy AUC rel. to Oracle AMMMM AMMG AMMG,s AMMnc AMM10ran (c) Bigger domains Small domains 0.2 0.4 0.6 0.8 1.0 10^−5 10^−3 10^−1 #bag/#instances AUC rel. to Oracle AMMG (d) Figure 1: Relative AUC (wrt MM) as homogeneity assumption is violated (a). Relative AUC (wrt Oracle) vs entropy on heart for LMM(b), AMMmin(c). Relative AUC vs n/m for AMMmin G,s (d). Table 2: Small domains results. #win/#lose for row vs column. Bold faces means p-val < .001 for Wilcoxon signed-rank tests. Top-left subtable is for one-shot methods, bottom-right iterative ones, bottom-left compare the two. Italic is state-of-the-art. Grey cells highlight the best of all (AMMmin G ). algorithm MM LMM InvCal AMMmin AMMmax convG G,s nc MM G G,s 10ran MM G G,s 10ran ∝SVM LMM G 36/4 G,s 38/3 30/6 nc 28/12 3/37 2/37 InvCal 4/46 3/47 4/46 4/46 MM 33/16 26/24 25/25 32/18 46/4 ↙ e.g. AMMmin G,s wins on AMMmin G 7 times, loses 15, with 28 ties G 38/11 35/14 30/20 37/13 47/3 31/7 G,s 35/14 33/17 30/20 35/15 47/3 24/11 7/15 AMMmin 10ran 27/22 24/26 22/28 26/24 44/6 20/30 16/34 19/31 AMMmax MM 25/25 23/27 22/28 25/25 45/5 15/35 13/37 13/37 8/42 G 27/23 22/28 21/28 26/24 45/5 17/33 14/36 14/36 10/40 13/14 G,s 25/25 21/29 22/28 24/26 45/5 15/35 13/37 13/37 12/38 15/22 16/22 10ran 23/27 21/29 19/31 24/26 50/0 19/31 15/35 17/33 7/43 19/30 20/29 17/32 SVM conv-∝ 21/29 2/48 2/48 2/48 2/48 4/46 3/47 3/47 4/46 3/47 3/47 4/46 0/50 alter-∝ 0/50 0/50 0/50 0/50 20/30 0/50 0/50 0/50 3/47 3/47 2/48 1/49 0/50 27/23 this is the same procedure of alter-∝SVM. Matrix V (eqs. (10), (11)) used is indicated in subscript: LMM/AMMG, LMM/AMMG,s, LMM/AMMnc respectively denote vG,s with s = 1, vG,s with s learned on cross validation (CV; validation ranges indicated in [19]) and vnc. For space reasons, results not displayed in the paper can be found in [19], Section 3 (including runtime comparisons, and detailed results by domain). We split the algorithms in two groups, one-shot and iterative. The latter, including AMM, (conv/alter)-∝SVM, iteratively optimize a cost over labelings (always consistent with label proportions for AMM, not always for (conv/alter)-∝SVM). The former (LMM, InvCal) do not and are thus much faster. Tests are done on a 4-core 3.2GHz CPUs Mac with 32GB of RAM. AMM/LMM/MM are implemented in R. Code for InvCal and ∝SVM is [16]. Simulated domains, MM and the homogeneity assumption The testing metric is the AUC. Prior to testing on our domains, we generate 16 domains that gradually move away the bσ j away from each other (wrt j), thus violating increasingly the homogeneity assumption [17]. The degree of violation is measured as ∥B± −B±∥F , where B± is the homogeneity assumption matrix, that replaces all bσ j by bσ for σ ∈{−1, 1}, see eq. (5). Figure 1 (a) displays the ratios of the AUC of LMM to the AUC of MM. It shows that LMM is all the better with respect to MM as the homogeneity assumption is violated. Furthermore, learning s in LMM improves the results. Experiments on the simulated domain of [16] on which MM obtains zero accuracy also display that our algorithms perform better (1 iteration only of AMMmax brings 100% AUC). Small and large domains experiments We convert 10 small domains [19] (m ≤1000) and 4 bigger ones (m > 8000) from UCI[26] into the LLP framework. We cast to one-against-all classification when the problem is multiclass. On large domains, the bag assignment function is inspired by [1]: we craft bags according to a selected feature value, and then we remove that feature from the data. This conforms to the idea that bag assignment is structured and non random in real-world problems. Most of our small domains, however, do not have a lot of features, so instead of clustering on one feature and then discard it, we run K-MEANS on the whole data to make the bags, for K = n ∈2[5]. Small domains results We performe 5-folds nested CV comparisons on the 10 domains = 50 AUC values for each algorithm. Table 2 synthesises the results [19], splitting one-shot and iterative algo7 Table 3: AUCs on big domains (name: #instances×#features). I=cap-shape, II=habitat, III=cap-colour, IV=race, V=education, VI=country, VII=poutcome, VIII=job (number of bags); for each feature, the best result over one-shot, and over iterative algorithms is bold faced. algorithm mushroom: 8124 × 108 adult: 48842 × 89 marketing: 45211 × 41 census: 299285 × 381 I(6) II(7) III(10) IV(5) V(16) VI(42) V(4) VII(4) VIII(12) IV(5) VIII(9) VI(42) EMM 55.61 59.80 76.68 43.91 47.50 66.61 63.49 54.50 44.31 56.05 56.25 57.87 MM 51.99 98.79 5.02 80.93 76.65 74.01 54.64 50.71 49.70 75.21 90.37 75.52 LMMG 73.92 98.57 14.70 81.79 78.40 78.78 54.66 51.00 51.93 75.80 71.75 76.31 LMMG,s 94.91 98.24 89.43 84.89 78.94 80.12 49.27 51.00 65.81 84.88 60.71 69.74 AMMmin AMMEMM 85.12 99.45 69.43 49.97 56.98 70.19 61.39 55.73 43.10 87.86 87.71 40.80 AMMMM 89.81 99.01 15.74 83.73 77.39 80.67 52.85 75.27 58.19 89.68 84.91 68.36 AMMG 89.18 99.45 50.44 83.41 82.55 81.96 51.61 75.16 57.52 87.61 88.28 76.99 AMMG,s 89.24 99.57 3.28 81.18 78.53 81.96 52.03 75.16 53.98 89.93 83.54 52.13 AMM1 95.90 98.49 97.31 81.32 75.80 80.05 65.13 64.96 66.62 89.09 88.94 56.72 AMMmax AMMEMM 93.04 3.32 26.67 54.46 69.63 56.62 51.48 55.63 57.48 71.20 77.14 66.71 AMMMM 59.45 55.16 99.70 82.57 71.63 81.39 48.46 51.34 56.90 50.75 66.76 58.67 AMMG 95.50 65.32 99.30 82.75 72.16 81.39 50.58 47.27 34.29 48.32 67.54 77.46 AMMG,s 95.84 65.32 84.26 82.69 70.95 81.39 66.88 47.27 34.29 80.33 74.45 52.70 AMM1 95.01 73.48 1.29 75.22 67.52 77.67 66.70 61.16 71.94 57.97 81.07 53.42 Oracle 99.82 99.81 99.8 90.55 90.55 90.50 79.52 75.55 79.43 94.31 94.37 94.45 rithms. LMMG,s outperforms all one-shot algorithms. LMMG and LMMG,s are competitive with many iterative algorithms, but lose against their AMM counterpart, which proves that additional optimization over labels is beneficial. AMMG and AMMG,s are confirmed as the best variant of AMM, the first being the best in this case. Surprisingly, all mean map algorithms, even one-shots, are clearly superior to ∝SVMs. Further results [19] reveal that ∝SVM performances are dampened by learning classifiers with the “inverted polarity” — i.e. flipping the sign of the classifier improves its performances. Figure 1 (b, c) presents the AUC relative to the Oracle (which learns the classifier knowing all labels and minimizing the logistic loss), as a function of the Gini entropy of bag assignment, gini(S) .= 4Ej[ˆπj(1 −ˆπj)]. For an entropy close to 1, we were expecting a drop in performances. The unexpected [19] is that on some domains, large entropies (≥.8) do not prevent AMMmin to compete with the Oracle. No such pattern clearly emerges for ∝SVM and AMMmax [19]. Big domains results We adopt a 1/5 hold-out method. Scalability results [19] display that every method using vnc and ∝SVM are not scalable to big domains; in particular, the estimated time for a single run of alter-∝SVM is >100 hours on the adult domain. Table 3 presents the results on the big domains, distinguishing the feature used for bag assignment. Big domains confirm the efficiency of LMM+AMM. No approach clearly outperforms the rest, although LMMG,s is often the best one-shot. Synthesis Figure 1 (d) gives the AUCs of AMMmin G over the Oracle for all domains [19], as a function of the “degree of supervision”, n/m (=1 if the problem is fully supervised). Noticeably, on 90% of the runs, AMMmin G gets an AUC representing at least 70% of the Oracle’s. Results on big domains can be remarkable: on the census domain with bag assignment on race, 5 proportions are sufficient for an AUC 5 points below the Oracle’s — which learns with 200K labels. 4 Conclusion In this paper, we have shown that efficient learning in the LLP setting is possible, for general loss functions, via the mean operator and without resorting to the homogeneity assumption. Through its estimation, the sufficiency allows one to resort to standard learning procedures for binary classification, practically implementing a reduction between machine learning problems [27]; hence the mean operator estimation may be a viable shortcut to tackle other weakly supervised settings [2] [3] [4] [5]. Approximation results and generalization bounds are provided. Experiments display results that are superior to the state of the art, with algorithms that scale to big domains at affordable computational costs. Performances sometimes compete with the Oracle’s — that learns knowing all labels —, even on big domains. Such experimental finding poses severe implications on the reliability of privacy-preserving aggregation techniques with simple group statistics like proportions. Acknowledgments NICTA is funded by the Australian Government through the Department of Communications and the Australian Research Council through the ICT Centre of Excellence Program. The first author would like to acknowledge that part of this research was conducted during his internship at the Commonwealth Bank of Australia. We thank A. Menon and D. Garc´ıa-Garc´ıa for useful discussions. 8 References [1] F.-X. Yu, S. Kumar, T. Jebara, and S.-F. Chang. On learning with label proportions. CoRR, abs/1402.5902, 2014. [2] T.-G. Dietterich, R.-H. Lathrop, and T. Lozano-P´erez. Solving the multiple instance problem with axisparallel rectangles. Artificial Intelligence, 89:31–71, 1997. [3] G.-S. Mann and A. McCallum. Generalized expectation criteria for semi-supervised learning of conditional random fields. In 46 th ACL, 2008. [4] J. Grac¸a, K. Ganchev, and B. Taskar. Expectation maximization and posterior constraints. In NIPS*20, pages 569–576, 2007. [5] P. Liang, M.-I. Jordan, and D. Klein. Learning from measurements in exponential families. In 26 th ICML, pages 641–648, 2009. [6] D.-J. Musicant, J.-M. Christensen, and J.-F. Olson. Supervised learning by training on aggregate outputs. In 7 th ICDM, pages 252–261, 2007. [7] J. Hern´andez-Gonz´alez, I. Inza, and J.-A. Lozano. Learning bayesian network classifiers from label proportions. Pattern Recognition, 46(12):3425–3440, 2013. [8] M. Stolpe and K. Morik. Learning from label proportions by optimizing cluster model selection. In 15th ECMLPKDD, pages 349–364, 2011. [9] B.-C. Chen, L. Chen, R. Ramakrishnan, and D.-R. Musicant. Learning from aggregate views. In 22 th ICDE, pages 3–3, 2006. [10] J. Wojtusiak, K. Irvin, A. Birerdinc, and A.-V. Baranova. Using published medical results and nonhomogenous data in rule learning. In 10 th ICMLA, pages 84–89, 2011. [11] S. R¨uping. Svm classifier estimation from group probabilities. In 27 th ICML, pages 911–918, 2010. [12] K. Hendrik and N. de Freitas. Learning about individuals from group statistics. In 21 th UAI, pages 332–339, 2005. [13] S. Chen, B. Liu, M. Qian, and C. Zhang. Kernel k-means based framework for aggregate outputs classification. In 9 th ICDMW, pages 356–361, 2009. [14] K.-T. Lai, F.X. Yu, M.-S. Chen, and S.-F. Chang. Video event detection by inferring temporal instance labels. In 11 th CVPR, 2014. [15] K. Fan, H. Zhang, S. Yan, L. Wang, W. Zhang, and J. Feng. Learning a generative classifier from label proportions. Neurocomputing, 139:47–55, 2014. [16] F.-X. Yu, D. Liu, S. Kumar, T. Jebara, and S.-F. Chang. ∝SVM for Learning with Label Proportions. In 30th ICML, pages 504–512, 2013. [17] N. Quadrianto, A.-J. Smola, T.-S. Caetano, and Q.-V. Le. Estimating labels from label proportions. JMLR, 10:2349–2374, 2009. [18] R. Nock and F. Nielsen. Bregman divergences and surrogates for learning. IEEE Trans.PAMI, 31:2048– 2059, 2009. [19] G. Patrini, R. Nock, P. Rivera, and T-S. Caetano. (Almost) no label no cry - supplementary material”. In NIPS*27, 2014. [20] M.J. Kearns and Y. Mansour. On the boosting ability of top-down decision tree learning algorithms. In 28 th ACM STOC, pages 459–468, 1996. [21] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. JMLR, 7:2399–2434, 2006. [22] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Trans.PAMI, 22:888–905, 2000. [23] Y. Altun and A.-J. Smola. Unifying divergence minimization and statistical inference via convex duality. In 19th COLT, pages 139–153, 2006. [24] P.-L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. JMLR, 3:463–482, 2002. [25] V. Koltchinskii and D. Panchenko. Empirical margin distributions and bounding the generalization error of combined classifiers. Ann. of Stat., 30:1–50, 2002. [26] K. Bache and M. Lichman. UCI machine learning repository, 2013. [27] A. Beygelzimer, V. Dani, T. Hayes, J. Langford, and B. Zadrozny. Error limiting reductions between classification tasks. In 22 th ICML, pages 49–56, 2005. 9
2014
275
5,375
Learning Mixtures of Submodular Functions for Image Collection Summarization Sebastian Tschiatschek Department of Electrical Engineering Graz University of Technology tschiatschek@tugraz.at Rishabh Iyer Department of Electrical Engineering University of Washington rkiyer@u.washington.edu Haochen Wei LinkedIn & Department of Electrical Engineering University of Washington weihch90@gmail.com Jeff Bilmes Department of Electrical Engineering University of Washington bilmes@u.washington.edu Abstract We address the problem of image collection summarization by learning mixtures of submodular functions. Submodularity is useful for this problem since it naturally represents characteristics such as fidelity and diversity, desirable for any summary. Several previously proposed image summarization scoring methodologies, in fact, instinctively arrived at submodularity. We provide classes of submodular component functions (including some which are instantiated via a deep neural network) over which mixtures may be learnt. We formulate the learning of such mixtures as a supervised problem via large-margin structured prediction. As a loss function, and for automatic summary scoring, we introduce a novel summary evaluation method called V-ROUGE, and test both submodular and non-submodular optimization (using the submodular-supermodular procedure) to learn a mixture of submodular functions. Interestingly, using non-submodular optimization to learn submodular functions provides the best results. We also provide a new data set consisting of 14 real-world image collections along with many human-generated ground truth summaries collected using Amazon Mechanical Turk. We compare our method with previous work on this problem and show that our learning approach outperforms all competitors on this new data set. This paper provides, to our knowledge, the first systematic approach for quantifying the problem of image collection summarization, along with a new data set of image collections and human summaries. 1 Introduction The number of photographs being uploaded online is growing at an unprecedented rate. A recent estimate is that 500 million images are uploaded to the internet every day (just considering Flickr, Facebook, Instagram and Snapchat), a figure which is expected to double every year [22]. Organizing this vast amount of data is becoming an increasingly important problem. Moreover, the majority of this data is in the form of personal image collections, and a natural problem is to summarize such vast collections. For example, one may have a collection of images taken on a holiday trip, and want to summarize and arrange this collection to send to a friend or family member or to post on Facebook. Here the problem is to identify a subset of the images which concisely represents all the diversity from the holiday trip. Another example is scene summarization [28], where one wants to concisely represent a scene, like the Vatican or the Colosseum. This is relevant for creating a visual summary of a particular interest point, where we want to identify a representative set of views. Another application that is gaining importance is summarizing video collections [26, 13] in order to enable efficient navigation of videos. This is particularly important in security applications, where one wishes to quickly identify representative and salient images in massive amounts of video. 1 These problems are closely related and can be unified via the problem of finding the most representative subset of images from an entire image collection. We argue that many formulations of this problem are naturally instances of submodular maximization, a statement supported by the fact that a number of scoring functions previously investigated for image summarization are (apparently unintentionally) submodular [30, 28, 5, 29, 8]. A set function f(·) is said to be submodular if for any element v and sets A ⊆B ⊆V \{v}, where V represents the ground set of elements, f(A ∪{v}) −f(A) ≥f(B ∪{v}) −f(B). This is called the diminishing returns property and states, informally, that adding an element to a smaller set increases the function value more than adding that element to a larger set. Submodular functions naturally model notions of coverage and diversity in applications, and therefore, a number of machine learning problems can be modeled as forms of submodular optimization [11, 20, 18]. In this paper, we investigate structured prediction methods for learning weighted mixtures of submodular functions for image collection summarization. Related Work: Previous work on image summarization can broadly be categorized into (a) clustering-based approaches, and (b) approaches which directly optimize certain scoring functions. The clustering papers include [12, 8, 16]. For example, [12] proposes a hierarchical clustering-based summarization approach, while [8] uses k-medoids-based clustering to generate summaries. Similarly [16] proposes top-down based clustering. A number of other methods attempt to directly optimize certain scoring functions. For example, [28] focuses on scene summarization and poses an objective capturing important summarization metrics such as likelihood, coverage, and orthogonality. While they do not explicitly mention this, their objective function is in fact a submodular function. Furthermore, they propose a greedy algorithm to optimize their objective. A similar approach was proposed by [30, 29], where a set cover function (which incidentally also is submodular) is used to model coverage, and a minimum disparity formulation is used to model diversity. Interestingly, they optimize their objective using the same greedy algorithm. Similarly, [15] models the problem of diverse image retrieval via determinantal point processes (DPPs). DPPs are closely related to submodularity, and in fact, the MAP inference problem is an instance of submodular maximization. Another approach for image summarization was posed by [5], where they define an objective function using a graph-cut function, and attempt to solve it using a semidefinite relaxation. They unintentionally use an objective that is submodular (and approximately monotone [18]) that can be optimized using the greedy algorithm. Our Contributions: We introduce a family of submodular function components for image collection summarization over which a convex mixture can be placed, and we propose a large margin formulation for learning the mixture. We introduce a novel data set of fourteen personal image collections, along with ground truth human summaries collected via Amazon mechanical Turk, and then subsequently cleaned via methods described below. Moreover, in order to automatically evaluate the quality of novel summaries, we introduce a recall-based evaluation metric, which we call V-ROUGE, to compare automatically generated summaries to the human ones. We are inspired by ROUGE [17], a wellknown evaluation criterion for evaluating summaries in the document summarization community, but we are unaware of any similar efforts in the computer vision community for image summarization. We show evidence that V-ROUGE correlates well with human evaluation. Finally, we extensively validate our approach on these data sets, and show that it outperforms previously explored methods developed for similar problems. The resulting learnt objective, moreover, matches human summarization performance on test data. 2 Image Collection Summarization Summarization is a task that most humans perform intuitively. Broadly speaking, summarization is the task of extracting information from a source that is both minimal and most important. The precise meaning of most important (relevance) is typically subjective and thus will differ from individual to individual and hence is difficult to precisely quantify. Nevertheless, we can identify two general properties that characterize good image collection summarizes [19, 28]: Fidelity: A summary should have good coverage, meaning that all of the distinct “concepts” in the collection have at least one representative in the summary. For example, a summary of a photo collection containing both mountains and beaches should contain images of both scene types. Diversity: Summaries should be as diverse as possible, i.e., summaries should not contain images that are similar or identical to each other. Other words for this concept include diversity or dispersion. In computer vision, this property has been referred to as orthogonality [28]. 2 Note that [28] also includes the notion of “likelihood,” where summary images should have high similarity to many other images in the collection. We believe, however, that such likelihood is covered by fidelity. I.e., a summary that only has images similar to many in the collection might miss certain outlier, or minority, concepts in the collection, while a summary that has high fidelity should include a representative image for every both majority and minority concept in the collection.Also, the above properties could be made very high without imposing further size or budget constraints. I.e., the goal of a summary is to find a small or within-budget subset having the above properties. 2.1 Problem Formulation We cast the problem of image collection summarization as a subset selection problem: given a collection of images I = (I1, I2, · · · , I|V |) represented by an index set V and given a budget c, we aim to find a subset S ⊆V, |S| ≤c, which best summarizes the collection. Though alternative approaches are possible, we aim to solve this problem by learning a scoring function F : 2V →R+, such that high quality summaries are mapped to high scores and low quality summaries to low scores. Then, image collection summarization can be performed by computing: S∗∈argmaxS⊆V,|S|≤c F(S). (1) For arbitrary set functions, computing S∗is intractable, but for monotone submodular functions we rely on the classic result [25] that the greedy algorithm offers a constant-factor mathematical quality guarantee. Computational tractability notwithstanding, submodular functions are natural for measuring fidelity and diversity [19] as we argue in Section 4. 2.2 Evaluation Criteria: V-ROUGE Before describing practical submodular functions for mixture components, we discuss a crucial element for both summarization evaluation and for the automated learning of mixtures: an objective evaluation criterion for judging the quality of summaries. Our criterion is constructed similar to the popular ROUGE score used in multi-document summarization [17] and that correlates well with human perception. For document summarization, ROUGE (which in fact, is submodular [19, 20]) is defined as: rS(A) = P w∈W P S∈S min (cw(A), cw(S)) P w∈W P S∈S cw(S) ( ≜r(A) when S is clear from the context), (2) where S is a set of human-generated reference summaries, W is a set of features (n-grams), and where cw(A) is the occurrence-count of w in summary A. We may extend r(·) to handle images by letting W be a set of visual words, S a set of reference summaries, and cw(A) be the occurrence-counts of visual word w in summary A. Visual words can for example be computed from SIFT-descriptors [21] as common in the popular bag-of-words framework in computer vision [31]. We call this V-ROUGE (visual ROUGE). In our experiments, we use visual words extracted from color histograms, from super-pixels, and also from OverFeat [27], a deep convolutional network — details are given in Section 5. 3 Learning Framework We construct our submodular scoring functions Fw(·) as convex combinations of non-negative submodular functions f1, f2, . . . , fm, i.e. Fw(S) = Pm i=1 wifi(S), where w = (w1, . . . , wm), wi ≥0, P i wi = 1. The functions fi are submodular components and assumed to be normalized: i.e., fi(∅) = 0, and fi(V ) = 1 for polymatroid functions and maxA⊆V fi(A) ≤1 for non-monotone functions. This ensures that the components are compatible with each other. Obviously, the merit of the scoring function Fw(·) depends on the selection of the components. In Section 4, we provide a large number of natural component choices, mixtures over which span a large diversity of submodular functions. Many of these component functions have appeared individually in past work and are unified into a single framework in our approach. Large-margin Structured Prediction: We optimize the weights w of the scoring function Fw(·) in a large-margin structured prediction framework, i.e. the weights are optimized such that human summaries S are separated from competitor summaries by a loss-dependent margin: Fw(S) ≥Fw(S′) + ℓ(S′), ∀S ∈S, S′ ∈Y \ S, (3) where ℓ(·) is the considered loss function, and where Y is a structured output space (for example Y is the set of summaries that satisfy a certain budget c, i.e. Y = {S′ ⊆V : |S′| ≤c}). We assume 3 the loss to be normalized, 0 ≤ℓ(S′) ≤1, ∀S′ ⊆V , to ensure mixture and loss are calibrated. Equation (3) can be stated as Fw(S) ≥maxS′∈Y [Fw(S′) + ℓ(S′)] , ∀S ∈S which is called lossaugmented inference. We introduce slack variables and minimize the regularized sum of slacks [20]: min w≥0,∥w∥1=1 X S∈S  max S′∈Y [Fw(S′) + ℓ(S′)] −Fw(S)  + λ 2 ∥w∥2 2, (4) where the non-negative orthant constraint, w ≥0, ensures that the final mixture is submodular. Note a 2-norm regularizer is used on top of a 1-norm constraint ∥w∥1 = 1 which we interpret as a prior to encourage higher entropy, and thus more diverse mixture, distributions. Tractability depends on the choice of the loss function. An obvious choice is ℓ(S) = 1 −r(S), which yields a non-submodular optimization problem suitable for optimization methods such as [10] (and which we try in Section 7). We also consider other loss functions that retain submodularity in loss augmented inference. For now, assume that ˜S = maxS′∈Y[Fw(S′) + ℓ(S′)] can be estimated efficiently. The objective in (4) can then be minimized using standard stochastic gradient descent methods, where the gradient for sample S with respect to weight wi is given as ∂ ∂wi  Fw( ˜S) + ℓ( ˜S) −Fw(S) + λ 2 ∥w∥2 2  = fi( ˜S) −fi(S) + λwi. (5) Loss Functions: A natural loss function is ℓ1−R(S) = 1 −r(S) where r(S) = V-ROUGE(S). Because r(S) is submodular, 1 −r(S) is supermodular and hence maximizing Fw(S′) + ℓ(S′) requires difference-of-submodular set function maximization [24] which is NP-hard [10]. We also consider two alternative loss functions [20], complement V-ROUGE and surrogate V-ROUGE. Complement V-ROUGE sets ℓc(S) = r(V \ S) and is still submodular but it is non-monotone. ℓc(·) does have the necessary characteristics of a proper loss: summaries S+ with large V-ROUGE score are mapped to small values and summaries S−with small V-ROUGE score are mapped to large values. In particular, submodularity means r(S) + r(V \ S) ≥r(V ) + r(∅) = r(V ) or r(V \S) ≥r(V )−r(S) = 1−r(S), so complement rouge is a submodular upper bound of the ideal supermodular loss. We define surrogate V-ROUGE as ℓsurr(A) = 1 Z P S∈S P w∈Wc S cw(A), where Wc S is the set of visual words that do not appear in reference summary S and Z is a normalization constant. Here, a summary has a high loss if it contains many visual words that do not occur in reference summaries and a low loss if it mainly contains visual words that occur in the reference summaries. Surrogate V-ROUGE is not only monotone submodular, it is modular. Loss augmented Inference: Depending on the loss function, different algorithms for performing loss augmented inference, i.e. computation of the maximum in (4), must be used. When using the surrogate loss lsurr(·), the mixture function together with the loss, i.e. fL(S) = Fw(S) + ℓ(S), is submodular and monotone. Hence, the greedy algorithm [25] can be used for maximization. This algorithm is extremely simple to implement, and starting at S0 = ∅, iteratively chooses an element j /∈St that maximizes fL(St ∪j), until the budget constraint is violated. While the complexity of this simple procedure is O(n2) function evaluations, it can be significantly accelerated, thanks again to submodularity [23], which in practice we find is almost linear time. When using complement rouge ℓc(·) as the loss, fL(S) is still submodular but no longer monotone, so we utilize the randomized greedy algorithm [2] (which is essentially a randomized variant of the greedy algorithm above, and has approximation guarantees). Finally, when using loss 1-V-ROUGE, Fw(S) + ℓ(S) is neither submodular nor monotone and approximate maximization is intractable. However, we resort to well motivated and scalable heuristics, such as the submodular-supermodular procedures that have shown good performance in various applications [24, 10]. Runtime Inference: Having learnt the weights for the mixture components, the resulting function Fw(S) = Pm i=1 wifi(S) is monotone submodular, which can be optimized by the accelerated greedy algorithm [23]. Thanks to submodularity, we can obtain near optimal solutions very efficiently. 4 Submodular Component Functions In this section, we consider candidate submodular component functions to use in Fw(·). We consider first functions capturing more of the notion of fidelity, and then next diversity, although the distinction is not entirely crystal clear in these functions as some have aspects of both. Many of the components are graph-based. We define a weighted graph G(V, E, s), with V representing a the full set of images and E is every pair of elements in V . Each edge (i, j) ∈E has weight si,j computed from the visual features as described in Section 7. The weight si,j is a similarity score between images i and j. 4 4.1 Fidelity-like Functions A function representing the fidelity of a subset to the whole is one that gets a large value when the subset faithfully represents that whole. An intuitively reasonable property for such a function is one that scores a summary highly if it is the case that the summary, as a whole, is similar to a large majority of items in the set V . In this case, if a given summary A has a fidelity of f(A), then any superset B ⊃A should, if anything, have higher fidelity, and thus it seems natural to use only monotone non-decreasing functions as fidelity functions. Submodularity is also a natural property since as more and more properties of an image collection are covered by a summary, the less chance any given image not part of the summary would have in offering additional coverage — in other words, submodularity is a natural model for measuring the inherent redundancy in any summary. Given this, we briefly describe some possible choices for coverage functions: Facility Location. Given a summary S ⊆V , we can quantify coverage of the whole image collection V by the similarity between i ∈V and its closest image j ∈S. Summing these similarities yields the facility location function ffac.loc.(S) = P i∈V maxj∈S si,j. The facility location function has been used for scene summarization in [28] and as one of the components in [20]. Sum Coverage. Here, we compute the average similarity in S rather than the similarity of the best element in S only. From the graph perspective (G) we sum over the weights of edges with at least one vertex in S. Thus, fsum cov.(S) = P i∈V P j∈S si,j. Thresholded sum/truncated graph cut This function has been used in document summarization [20] and is similar to the sum coverage function except that instead of summing over all elements in S, we threshold the inner sum. Define σi(S) = P j∈S si,j, i.e. informally, σi(S) conveys how much of image i is covered by S. In order to keep an element i from being overly covered by S as the cause of the objective getting large, we define fthresh.sum(S) = P i∈V min(σi(S), α σi(V )), which is both monotone and submodular [20]. Under budget constraints, this function avoids summaries that over-cover any images. Feature functions. Consider a bag-of-words image model where for i ∈V , bi = (bi,w)w∈W is a bag-of-words representation of image i indexed by the set of visual words W (cf. Section 5). We can then define a feature coverage function [14], defined using the visual words, as follows: ffeat.cov.(S) = P w∈W g P i∈I bi,w  , where g(·) is a monotone non-decreasing concave function. This class is both monotone and submodular, and an added benefit of scalability, since it does not require computation of a O(n2) similarity matrix like the graph-based functions proposed above. 4.2 Diversity Diversity is another trait of a good summary, and there are a number of ways to quantify it. In this case, while submodularity is still quite natural, monotonicity sometimes is not. Penalty based diversity/dispersion Given a set S, we penalize similarity within S by summing over all pairs as follows: fdissim.(S) = −P i∈S P j∈S,j>i si,j [28] (a variant, also submodular, takes the form −P i,j∈S si,j [19]). These functions are submodular, and monotone decreasing, so when added to other functions can yield non-monotone submodular functions. Such functions have occurred before in document summarization [19], as a dispersion function [1], and even for scene summarization [28] (in this last case, the submodularity property was not explicitly mentioned). Diversity reward based on clusters. As in [20], we define a cluster based function rewarding diversity. Given clusters P1, P2, · · · , Pk obtained by some clustering algorithm. We define diversity reward functions fdiv.reward(S) = Pk j=1 g(S ∩Pj), where g(·) is a monotone submodular function so that fdiv.reward(·) is also monotone and submodular. Given a budget, fdiv.reward(S) is maximized by selecting S as diverse, over different clusters, as possible because of diminishing credit when repeatedly choosing an item in a cluster. 5 Visual Words for Evaluation V-ROUGE (see Section 2.2) depends on a visual “bag-of-words” vocabulary, and to construct a visual vocabulary, multitude choices exists. Common choices include SIFT descriptors [21], color descriptors [34], raw image patches [7], etc. For encoding, vector quantization (histogram encoding) [4], sparse coding [35], kernel codebook encoding [4], etc. can all be used. For the construction of our 5 V-ROUGE metric, we computed three lexical types and used their union as our visual vocabulary. The different types are intended to capture information about the images at different scales of abstraction. Color histogram. The goal here is to capture overall image information via color information. We follow the method proposed in [34]: Firstly, we extract the most frequent colors in RGB color space from the images in an image collection using 10 × 10 pixel patches. Secondly, these frequent colors are clustered by k-means into 128 clusters, resulting in 128 cluster centers. Finally, we quantize the most frequent colors in every 10 × 10 pixel image patch using nearest neighbor vector quantization. For every image, the resulting bag-of-colors is normalized to unit ℓ1-norm. Super pixels. Here, we wish to capture information about small objects or image regions that are identified by segmentation. Images are first segmented using the quick shift algorithm implemented in VLFeat [33]. For every segment, dense SIFT descriptors are computed and clustered into 200 clusters. Then, a patch-wise intermediate bag of words bpatch is computed by vector quantization and the RGB color histogram of the corresponding patch cpatch is appended to that set of words. This results in intermediate features φpatch = [bpatch, cpatch]. These intermediate features are again clustered into 200 clusters. Finally, the intermediate features are vector-quantized according to their ℓ1-distance. This final bag-of-words representation is normalized to unit ℓ1-norm. Deep convolutional neural network. Our deep neural network based words are meant to capture high-level information from the images. We use OverFeat [27], i.e. an image recognizer and feature extractor based on a convolutional neural network for extracting medium to high level image features. A sliding window is moved across an input picture such that every image is divided into 10 × 10 blocks (using a 50% overlap) and the pixels within the window are presented to OverFeat as input. The activations on layer 17 are taken as intermediate features φk and clustered by k-means into 300 clusters. Then, each φk is encoded by kernel codebook encoding [4]. For every image, the resulting bag-of-words representation is normalized to the unit ℓ1-norm. 6 Data Collection Dataset. One major contribution of our paper is our new data set which we plan soon to publicly release. Our data set consists of 14 image collections, each comprising 100 images. The image collections are typical real world personal image collections as they, for the most part, were taken during holiday trips. For each collection, human-generated summaries were collected using Amazon mechanical Turk. Workers were asked to select a subset of 10 images from an image collection such that it summarizes the collection in the best possible way.1 In contrast to previous work on movie summarization [13], Turkers were not tested for their ability to produce high quality summaries. Every Turker was rewarded 10 US cents for every summary. Pruning of poor human-generated summaries. The summaries collected using Amazon mechanical Turk differ drastically in quality. For example, some of the collected summaries have low quality because they do not represent an image collection properly, e.g. they consist only of pictures of the same people but no pictures showing, say, architecture. Even though we went through several distinct iterations of summary collection via Amazon Turk, improving the quality of our instructions each time, it was impossible to ensure that all individuals produced meaningful summaries. Such low quality summaries can drastically degrade performance of the learning algorithm. We thus developed a strategy to automatically prune away bad summaries, where “bad” is defined as the worst V-ROUGE score relative to a current set of human summaries. The strategy is depicted in Algorithm 1. Each pruning step removes the worst human summary, and then creates a new instance of V-ROUGE using the updated pruned summaries. Pruning proceeds as long as a significant fraction (greater than a desired “p-value”) of null-hypothesis summarizes (generated uniformly at random) scores better than the worst human summary. We chose a significant value of p = 0.10. 7 Experiments To validate our approach, we learned mixtures of submodular functions with 594 component functions using the data set described in Section 6. In this data set, all human generated reference summaries are size 10, and we evaluated performance of our learnt mixtures also by producing size 10 summaries. The component functions were the monotone submodular functions described in 1We did not provide explicit instructions on precisely how to summarize an image collection and instead only asked that they choose a representative subset. We relied on their high-level intuitive understanding that the gestalt of the image collection should be preserved in the summary. 6 Algorithm 1 Algorithm for pruning poor human-generated summaries. Require: Confidence level p, human summaries S, number of random summaries N Sample N uniformly at random size-10 image sets, to be used as summaries R = (R1, . . . , RN) Instantiate V-ROUGE-score rS(·) instantiated with summaries S o ← 1 |R| P R∈R 1{rS(R)>minS∈S rS(S)} // fraction of random summaries better than worst human while o > p do S ←S \ (argminS∈S rS(S)) Re-instantiate V-ROUGE score rS(·) using updated pruned human summaries S. Recompute overlap o as above, but with updated V-ROUGE score. end while return Pruned human summaries S Figure 1: Three example 10×10 image collections from our new data set. Section 4 using features described in Section 5. For weight optimization, we used AdaGrad [6], an adaptive subgradient method allowing for informative gradient-based learning. We do 20 passes through the samples in the collection. We considered two types of experiments: 1) cheating experiments to verify that our proposed mixture components can effectively learn good scoring functions; and 2) a 14-fold cross-validation experiment to test our approach in real- world scenarios. In the cheating experiments, training and testing is performed on the same image collection, and this is repeated 14 times. By contrast, for our 14-fold cross-validation experiments, training is performed on 13 out of 14 image collections and testing is performed on the held out summary, again repeating this 14 times. In both experiment types, since our learnt functions are always monotone submodular, we compute summaries S∗of size 10 that approximately maximize the scoring functions using the greedy algorithm. For these summaries, we compute the V-ROUGE score r(S∗). For easy score interpretation, we normalize it according to sc(S∗) = (r(S∗) −R)/(H −R), where R is the average V-ROUGE score of random summaries (computed from 1000 summaries) and where H is the average V-ROUGE score of the collected final pruned human summaries. The result sc(S∗) is smaller than zero if S∗scores worse than the average random summary and larger than one if it scores better than the average human summary. The best cheating results are shown as Cheat in Table 1, learnt using 1-V-ROUGE as a loss. The results in column Min are computed by constrainedly minimizing V-ROUGE via the methods of [11], and the results in column Max are computed by maximizing V-ROUGE using the greedy algorithm. Therefore, the Max column is an approximate upper bound on our achievable performance. Clearly, we are able to learn good scoring functions, as on average we significantly exceed average human performance, i.e., we achieve an average score of 1.42 while the average human score is 1.00. Results for cross-validation experiments are presented in Table 1. In the columns Our Methods we present the performance of our mixtures learnt using the proposed loss functions described in Section 3. We also present a set of baseline comparisons, using similarity scores computed via a histogram intersection [32] method over the visual words used in the construction of V-ROUGE. We present baseline results for the following schemes: FL the facility location objective ffac.loc.(S) alone; FLpen the facility location objective mixed with a λ-weighted penalty, i.e. ffac.loc.(S)+λfdissim.(S); MMR Maximal marginal relevance [3], using λ to tradeoff between relevance and diversity; GCpen Graphcut mixed with a λ-weighted penalty, similar to FLpen but where graphcut is used in place of facility location; kM K-Medoids clustering [9, Algorithm 14.2]. Initial cluster centers were selected uniformly at random. As a dissimilarity score between images i and j, we used 1 −si,j. Clustering was run 20 times, and we used the cluster centers of the best clustering as the summary. 7 In each of the above cases where a λ weight is used, we take for each image collection the λ ∈ {0, 0.1, 0.2, . . . , 0.9, 1.0} that produced a submodular function that when maximized produced the best average V-ROUGE score on the 13 training image sets. This approach, therefore, selects the best baseline possible when performing a grid-search on the training sets. Note that both λ-dependent functions, i.e. FLpen and GCpen, are non-monotone submodular. Therefore, we used the randomized greedy algorithm [2] for maximization which has a mathematical guarantee (we ran the algorithm 10 times and used the best result). Table 1 shows that using 1-V-ROUGE as a loss significantly outperforms the other methods. Furthermore, the performance is on average better than human performance, i.e. we achieve an average score of 1.13 while the average human score is 1.00. This indicates that we can efficiently learn scoring functions suitable for image collection summarization. For the other two losses, i.e. surrogate and complement V-ROUGE, performance is significantly worse. Thus, in this case it seems advantageous to use the proper (supermodular) loss and heuristic optimization (the submodular-supermodular procedure [24, 10]) for loss-augmented inference during training, compared to using an approximate (submodular or modular) loss in combination with an optimization algorithm for loss-augmented inference with strong guarantees. This could, however, perhaps be circumvented by constructing a more accurate strictly submodular surrogate loss but we leave this to future work. Table 1: Cross-Validation Experiments (see text for details). Average human performance is 1.00, average random performance is 0.00. For each image collection, the best result achieved by any of Our Methods and by any of the Baseline Methods is highlighted in bold. Limits Our Methods Baseline Methods No. Min Max Cheat ℓ1−R ℓc ℓsurr FL FLpen MMR GCpen kM 1 -2.55 2.78 1.71 1.51 0.87 -0.36 1.45 0.82 -0.51 1.06 1.23 2 -2.06 2.22 1.38 1.27 1.26 0.44 0.18 0.58 0.65 0.21 0.89 3 -2.07 2.24 1.64 1.46 0.95 0.23 0.47 0.94 0.85 -0.53 0.52 4 -3.20 2.04 1.42 1.04 0.81 -0.18 0.71 1.01 0.51 -0.02 1.32 5 -1.65 1.92 1.60 1.11 1.06 0.58 0.96 0.93 0.95 -1.28 0.70 6 -2.83 2.40 1.81 1.47 0.65 0.27 1.26 1.16 -0.08 0.20 1.05 7 -2.44 2.07 1.07 1.07 0.96 0.15 0.93 0.70 -0.33 -0.84 0.97 8 -1.66 2.04 1.45 1.13 0.96 0.07 0.62 0.38 0.57 -1.27 0.91 9 -2.32 2.59 1.73 1.21 1.13 0.51 0.81 0.94 0.09 -0.59 0.38 10 -1.46 2.34 1.39 1.06 0.78 0.14 1.58 0.99 -0.26 0.07 0.73 11 -1.55 1.85 1.22 0.95 0.92 -0.08 0.43 0.56 -0.29 0.05 0.26 12 -1.74 2.39 1.57 1.11 0.58 0.12 0.78 0.54 0.02 -0.01 0.63 13 -0.94 1.72 0.77 0.32 0.53 0.14 0.02 -0.06 0.52 -0.04 0.02 14 -1.46 1.75 1.07 1.08 0.97 0.77 0.23 0.14 0.22 -0.80 0.29 Avg. -2.00 2.17 1.42 1.13 0.89 0.20 0.75 0.69 0.21 -0.27 0.71 8 Conclusions and Future Work We have considered the task of automated summarization of image collections. A new data set together with many human generated ground truth summaries was presented and a novel automated evaluation metric called V-ROUGE was introduced. Based on large-margin structured prediction, and either submodular or non-submodular optimization, we proposed a method for learning scoring functions for image collection summarization and demonstrated its empirical effectiveness. In future work, we would like to scale our methods to much larger image collections. A key step in this direction is to consider low complexity and highly scalable classes of submodular functions. Another challenge for larger image collections is how to collect ground truth, as it would be difficult for a human to summarize a collection of, say, 10,000 images. Acknowledgments: This material is based upon work supported by the National Science Foundation under Grant No. (IIS-1162606), the Austrian Science Fund under Grant No. (P25244-N15), a Google and a Microsoft award, and by the Intel Science and Technology Center for Pervasive Computing. Rishabh Iyer is also supported by a Microsoft Research Fellowship award. References [1] A. Borodin, H. C. Lee, and Y. Ye. Max-sum diversification, monotone submodular functions and dynamic updates. In Proc. of the 31st symposium on Principles of Database Systems, pages 155–166. ACM, 2012. [2] N. Buchbinder, M. Feldman, J. Naor, and R. Schwartz. Submodular maximization with cardinality constraints. In SODA, 2014. 8 [3] J. Carbonell and J. Goldstein. The use of MMR, diversity-based reranking for reordering documents and producing summaries. In Research and Development in Information Retrieval, pages 335–336, 1998. [4] K. Chatfield, V. Lemtexpitsky, A. Vedaldi, and A. Zisserman. The devil is in the details: an evaluation of recent feature encoding methods. In British Machine Vision Conference (BMVC), 2011. [5] T. Denton, M. Demirci, J. Abrahamson, A. Shokoufandeh, and S. Dickinson. Selecting canonical views for view-based 3-d object recognition. In ICPR, volume 2, pages 273–276, Aug 2004. [6] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research (JMLR), 12:2121–2159, July 2011. [7] R. Fergus, P. Perona, and A. Zisserman. Object class recognition by unsupervised scale-invariant learning. In CVPR, volume 2, pages 264–271. IEEE, June 2003. [8] Y. Hadi, F. Essannouni, and R. O. H. Thami. Video summarization by k-medoid clustering. In Symposium on Applied Computing (SAC), pages 1400–1401, 2006. [9] T. Hastie, R. Tibshirani, and J. Friedman. The elements of statistical learning, volume 2. Springer New York, 2nd edition, 2009. [10] R. Iyer and J. Bilmes. Algorithms for approximate minimization of the difference between submodular functions, with applications. In UAI, 2012. [11] R. Iyer, S. Jegelka, and J. Bilmes. Fast semidifferential-based submodular function optimization. In ICML, 2013. [12] A. Jaffe, M. Naaman, T. Tassa, and M. Davis. Generating summaries and visualization for large collections of geo-referenced photographs. In MIR, pages 89–98. ACM, 2006. [13] A. Khosla, R. Hamid, C.-J. Lin, and N. Sundaresan. Large-scale video summarization using web-image priors. In Conference on Computer Vision and Pattern Recognition (CVPR), June 2013. [14] K. Kirchhoff and J. Bilmes. Submodularity for data selection in machine translation. In Empirical Methods in Natural Language Processing (EMNLP), October 2014. [15] A. Kulesza and B. Taskar. k-DPPs: Fixed-size determinantal point processes. In Proceedings of the 28th International Conference on Machine Learning, 2011. [16] X. Li, L. Chen, L. Zhang, F. Lin, and W.-Y. Ma. Image annotation by large-scale content-based image retrieval. In Proc. 14th ann. ACM Int. Conf. on Multimedia, pages 607–610. ACM, 2006. [17] C.-Y. Lin. Rouge: A package for automatic evaluation of summaries. In Text Summarization Branches Out: Proceedings of the ACL-04 Workshop, pages 74–81, July 2004. [18] H. Lin and J. Bilmes. Multi-document summarization via budgeted maximization of submodular functions. In NAACL, 2010. [19] H. Lin and J. Bilmes. A class of submodular functions for document summarization. In ACL/HLT-2011, Portland, OR, June 2011. [20] H. Lin and J. Bilmes. Learning mixtures of submodular shells with application to document summarization. In Conference on Uncertainty in Artificial Intelligence (UAI), pages 479–490, 2012. [21] D. Lowe. Object recognition from local scale-invariant features. In International Conference on Computer Vision (ICCV), volume 2, pages 1150–1157, 1999. [22] M. Meeker and L. Wu. Internet trends. Technical report, Kleiner Perkins Caufield & Byers, 2013. [23] M. Minoux. Accelerated greedy algorithms for maximizing submodular set functions. Optimization Techniques, pages 234–243, 1978. [24] M. Narasimhan and J. Bilmes. A submodular-supermodular procedure with applications to discriminative structure learning. In Conference on Uncertainty in Artificial Intelligence (UAI), Edinburgh, Scotland, July 2005. Morgan Kaufmann Publishers. [25] G. Nemhauser, L. Wolsey, and M. Fisher. An analysis of approximations for maximizing submodular set functions–i. Mathematical Programming, 14(1):265–294, 1978. [26] C.-W. Ngo, Y.-F. Ma, and H. Zhang. Automatic video summarization by graph modeling. In International Conference on Computer Vision (ICCV), pages 104–109 vol.1, Oct 2003. [27] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks. ArXiv e-prints, Dec. 2013. [28] I. Simon, N. Snavely, and S. M. Seitz. Scene Summarization for Online Image Collections. ICCV, 2007. [29] P. Sinha and R. Jain. Extractive summarization of personal photos from life events. In International Conference on Multimedia and Expo (ICME), pages 1–6, 2011. [30] P. Sinha, S. Mehrotra, and R. Jain. Summarization of personal photologs using multidimensional content and context. In International Conference on Multimedia Retrieval (ICMR), pages 1–8, 2011. [31] J. Sivic, B. Russell, A. Efros, A. Zisserman, and W. Freeman. Discovering objects and their location in images. In International Conference on Computer Vision (ICCV), volume 1, pages 370–377, Oct 2005. [32] M. J. Swain and D. H. Ballard. Color indexing. Int. journal of computer vision, 7(1):11–32, 1991. [33] A. Vedaldi and B. Fulkerson. VLFeat: An open and portable library of computer vision algorithms. http://www.vlfeat.org/, 2008. [34] C. Wengert, M. Douze, and H. J´egou. Bag-of-colors for improved image search. In International Conference on Multimedia (MM), pages 1437–1440. ACM, 2011. [35] J. Yang, K. Yu, Y. Gong, and T. S. Huang. Linear spatial pyramid matching using sparse coding for image classification. In CVPR, pages 1794–1801, 2009. 9
2014
276
5,376
Distributed Bayesian Posterior Sampling via Moment Sharing Minjie Xu1∗, Balaji Lakshminarayanan2, Yee Whye Teh3, Jun Zhu1, and Bo Zhang1 1State Key Lab of Intelligent Technology and Systems; Tsinghua National TNList Lab 1Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China 2Gatsby Unit, University College London, 17 Queen Square, London WC1N 3AR, UK 3Department of Statistics, University of Oxford, 1 South Parks Road, Oxford OX1 3TG, UK Abstract We propose a distributed Markov chain Monte Carlo (MCMC) inference algorithm for large scale Bayesian posterior simulation. We assume that the dataset is partitioned and stored across nodes of a cluster. Our procedure involves an independent MCMC posterior sampler at each node based on its local partition of the data. Moment statistics of the local posteriors are collected from each sampler and propagated across the cluster using expectation propagation message passing with low communication costs. The moment sharing scheme improves posterior estimation quality by enforcing agreement among the samplers. We demonstrate the speed and inference quality of our method with empirical studies on Bayesian logistic regression and sparse linear regression with a spike-and-slab prior. 1 Introduction As we enter the age of “big data”, datasets are growing to ever increasing sizes and there is an urgent need for scalable machine learning algorithms. In Bayesian learning, the central object of interest is the posterior distribution, and a variety of variational and Markov chain Monte Carlo (MCMC) methods have been developed for “big data” settings. The main difficulty with both approaches is that each iteration of these algorithms requires an impractical O(N) computation for a dataset of size N ≫1. There are two general solutions: either to use stochastic approximation techniques based on small mini-batches of data [15, 4, 5, 20, 1, 14], or to distribute data as well as computation across a parallel computing architecture, e.g. using MapReduce [3, 13, 16]. In this paper we consider methods for distributing MCMC sampling across a computer cluster where a dataset has been partitioned and locally stored on the nodes. Recent years have seen a flurry of research on this topic, with many papers based around “embarrassingly parallel” architectures [16, 12, 19, 9]. The basic thesis is that because communication costs are so high, it is better for each node to run a separate MCMC sampler based on its data stored locally, completely independently from others, and then for a final combination stage to transform the local samples into samples for the desired global posterior distribution given the whole dataset. [16] directly combines the samples by weighted averages under an implicit Gaussian assumption; [12] approximates each local posterior with either a Gaussian or a Gaussian kernel density estimate (KDE) so that the combination follows an explicit product of densities; [19] takes the KDE idea one step further by representing it as a Weierstrass transform; [9] uses the “median posterior” in an RKHS embedding space as a combination technique that is robust in the presence of outliers. The main drawback of embarrassingly parallel MCMC sampling is that if the local posteriors differ significantly, perhaps due to noise or non-random partitioning of the dataset across the cluster, or if they do not satisfy the Gaussian as∗This work was started and completed when the author was visiting University of Oxford. 1 sumptions in a number of methods, the final combination stage can result in highly inaccurate global posterior representations. To encourage local MCMC samplers to roughly be aware of and hence agree with one another so as to improve inference quality, we develop a method to enforce sharing of a small number of moment statistics of the local posteriors, e.g. mean and covariance, across the samplers. We frame our method as expectation propagation (EP) [8], where the exponential family is defined by the shared moments and each node represents a factor to be approximated, with moment statistics to be estimated by the corresponding sampler. Messages passed among the nodes encode differences between the estimated moments, so that at convergence all nodes agree on these moments. As EP tends to converge rapidly, these messages will be passed around only infrequently (relative to the number of MCMC iterations). It can also be performed in an asynchronous fashion, hence incurring low communication costs. As opposed to previous embarrassingly parallel schemes which require a final combination stage, upon convergence each sample drawn at any single node with our method can be directly treated as a sample from an approximate global posterior distribution. Our method differs from standard EP as each factor to be approximated consists of a product of many likelihood terms (rather than just one as in standard EP), and therefore suffers less approximation bias. 2 A Distributed Bayesian Posterior Sampling Algorithm In this section we develop our method for distributed Bayesian posterior sampling. We assume that we have a dataset D = {xn}N n=1 with N ≫1 which has already been partitioned onto m compute nodes. Let Di denote the data on node i for i = 1, . . . , m such that D = ∪m i=1Di. Let D−i = D\Di. We assume that the data are i.i.d. given a parameter vector θ ∈Θ with prior distribution p0(θ). The object of interest is the posterior distribution, p(θ|D) ∝p0(θ) Qm i=1 p(Di|θ), where p(Di|θ) is a product of likelihood terms, one for each data item in Di. Recall that our general approach is to have an independent sampler running on each node targeting a “local posterior”, and our aim is for the samplers to agree on the overall shape of the posteriors, by enforcing that they share the same moment statistics, e.g. using the first two moments they will share the same mean and covariance. Let S(θ) be the sufficient statistics function such that f(S) := Ef[S(θ)] are the moments of interest for some density f(θ). Consider an exponential family of distributions with sufficient statistics S(·) and let q(θ; η) be a density in the family with natural parameter η. We will assume for simplicity that the prior belongs to the exponential family, p0(θ) = q(θ; η0) for some natural parameter η0. Let ˜pi(θ|Di) denote the local posterior at node i. Rather than using the same prior, e.g. p0(θ), at all nodes, we use a local prior which enforces the moments to be similar between local posteriors. More precisely, we consider the following target density, ˜pi(θ|Di) ∝q(θ; η−i)p(Di|θ), where the effective local prior q(θ; η−i) is determined by the (natural) parameter η−i. We set η−i such that E˜pi(θ|Di)[S(θ)] = µ for all i, for some shared moment vector µ. As an aside, note that the overall posterior distribution can be recovered via p(θ|D) ∝p(D|θ)p0(θ) = p0(θ) m Y i=1 p(Di|θ) ∝q(θ; η0) m Y i=1  ˜pi(θ|Di) q(θ; η−i)  , (1) for any choice of the parameters η−i, with a number of previous works corresponding to different choices. [16, 12, 19] use η−i = η0/m, so that the local prior is p0(θ)1/m and (1) reduces to p(θ|D) ∝Qm i=1 ˜pi(θ|Di). [2] set η−i = η0 for their distributed asynchronous streaming variational algorithm, but reported that setting η−i such that q(θ; η−i) approximates the posterior distribution given previously processed data achieves better performance. We say that such choice of η−i is context aware as it contains contextual information from other local posteriors. Finally, in the ideal situation with exact equality, q(θ; η−i) = p(θ|D−i), then each local posterior is precisely the true posterior p(θ|D). In the following subsections, we will describe how EP can be used to iteratively approximate η−i so that q(θ; η−i) matches p(θ|D−i) as closely as possible in the sense of minimising the KL divergence. Since our algorithm performs distributed sampling by sharing messages containing moment information, we refer to it as SMS (in short for sampling via moment sharing). 2 2.1 Expectation Propagation In many typical scenarios the posterior is intractable to compute because the product of likelihoods and the prior is not analytically tractable and approximation schemes, e.g. variational methods or MCMC, are required to compute the posterior. EP is a variational message-passing scheme [8], where each likelihood term is approximated by an exponential family density chosen iteratively to minimise the KL divergence to a “local posterior”. Suppose we wish to approximate (up to normalisation) the likelihood p(Di|θ) (as a function of θ), using the exponential family density q(θ; ηi) for some suitably chosen natural parameter ηi, and that other parameters {ηj}j̸=i are known such that each q(θ; ηj) approximates the corresponding p(Dj|θ) well. Then the posterior distribution is well approximated by a local posterior where all but one likelihood factor is approximated, p(θ|D) ≈˜pi(θ|D) ∝p0(θ)p(Di|θ) Y j̸=i q(θ; ηj) = p(Di|θ)˜pi(θ|D−i), where ˜pi(θ|D−i) = q(θ; η−i), with η−i = η0 + P j̸=i ηj, is a context-aware prior which incorporates information from the other data subsets and is an approximation to the conditional distribution p(θ|D−i). Replace p(Di|θ) by q(θ; ηi), then the corresponding local posterior ˜pi(θ|D) would be approximated by q(θ; η−i + ηi). A natural choice for the parameter ηi is the one that minimises KL(˜pi(θ|D)∥q(θ; η−i +ηi)). This optimisation can be solved by calculating the moment parameter µi = E˜pi(θ|D)[S(θ)], transforming the moment parameter µi into its natural parameter, say νi, and then updating ηi ←νi −η−i. EP proceeds iteratively, by updating each parameter given the current values of the others using the above procedure until convergence. At convergence (which is not guaranteed), we have that, νi = ν := η0 + m X j=1 ηj, for all i, where ηj are the converged parameter values. Hence the natural parameters, as well as the moments of the local posteriors, at all nodes agree. When the prior p0(θ) does not belong to the exponential family, we may simply treat it as p(D0|θ) where D0 = ∅and approximate it with q(θ; η0) just as we approximate the likelihoods. 2.2 Distributed Sampling via Moment Sharing In typical EP applications, the moment parameter µi = E˜pi(θ|D)[S(θ)] can be computed either analytically or using numerical quadrature. In our setting, this is not possible as each likelihood factor p(Di|θ) is now a product of many likelihoods with generally no tractable analytic form. Instead we can use MCMC sampling to estimate these moments. The simplest algorithm involves synchronous EP updates: At each EP iteration, each node i receives from a master node η−i (initialised to η0 at the first iteration) calculated from the previous iteration, runs MCMC to obtain T samples from which the moments µi are estimated, converts this into natural parameters νi, and returns ηi = νi −η−i to the master node. (Note that the MCMC samplers are run in parallel; hence the moments are computed in parallel unlike standard EP.) An asynchronous version can be implemented as well: At each node i, after the MCMC samples are obtained and the new ηi parameter computed, the node communicates asynchronously with the master to send ηi and receive the new value of η−i based on the current ηj̸=i from other nodes. Finally, a decentralised scheme is also possible: Each node i stores a local copy of all the parameters ηj for each j = 1, . . . , m, after the MCMC phase and a new value of ηi is computed it is broadcast to all nodes, the local copy is updated based on messages the node received in the mean time, and a new η−i is computed. 2.3 Multivariate Gaussian Exponential Family For concreteness, we will describe the required computations of the moments and natural parameters in the special cases of a multivariate Gaussian exponential family. In addition to being analytically tractable and popular, the usage of multivariate Gaussian distribution can also be motivated using 3 Bayesian asymptotics for large datasets. In particular, for parameters in Rd and under regularity conditions, if the size of the subset Di is large, the Bernstein-von Mises Theorem shows that the local posterior distribution is well approximated by a multivariate Gaussian; hence the EP approximation by an exponential family density will be very good. Given T samples {θit}T t=1 collected at node i, unbiased estimates of the moments (mean µi and covariance Σi) are given by µi ←1 T T X t=1 θit Σi ← 1 T −1 T X t=1 (θit −µi)(θit −µi)⊤, (2) while the natural parameters can be computed as ηi = (Ωiµi, Ωi), where Ωi = T −d −2 T −1 Σ−1 i (3) is an unbiased estimate of the precision matrix [11]. Note that simply using Σ−1 i leads to a biased estimate, which impacts upon the convergence of EP. Alternative estimators exist [18] but we use the above unbiased estimate for simplicity. We stress that our approach is not limited to multivariate Gaussian, but applicable to any exponential family distribution. In Section 3.2, we consider the case where the local posterior is approximated using the spike and slab distribution. 2.4 Additional Comments The collected samples can be used to form estimates for the global posterior p(θ|D) in two ways. Firstly, these samples can be combined using a combination technique [16, 12, 19, 9]. According to (1), each sample θ needs to be assigned a weight of q(θ; η−i)−1 before being combined. Alternatively, once EP has converged, the MCMC samples target the local posterior pi(θ|D), which is already a good approximation to the global posterior, so the samples can be used directly as approximate samples of the global posterior without need for a combination stage. This has the advantage of producing mT samples if each of the m nodes produces T samples, while other combination techniques only produce T samples. We have found the second approach to perform well in practice. In our experiments we have found damping to be essential for the convergence of the algorithm. This is because in addition to the typical convergence issues with EP, our mean parameters are also estimated using MCMC and thus introduces additional stochasticity which can affect the convergence. There is little theory in the literature on convergence of EP [17], and even less can be shown with the additional stochasticity introduced by the MCMC sampling. Nevertheless, we have found that damping the natural parameters ηi works well in practice. In the case of multivariate Gaussians, additional consideration has to be given due to the possibility that the oscillatory behaviour in EP can lead to covariance matrices that are not positive definite. If the precision of a local prior Ω−i is not positive definite, the resulting local posterior will become unnormalisable and the MCMC sampling will diverge. We adopt a number of mitigating strategies that we have found to be effective: Whenever a new value of the precision matrix Ωnew −i is not positive definite, we damp it towards its previous value as αΩold −i +(1−α)Ωnew −i , with an α large enough such that the linear combination is positive definite; We collect a large enough number of samples at each MCMC phase to reduce variability of the estimators; And we use the pseudo-inverse instead of actual matrix inverse in (3). 3 Experiments 3.1 Bayesian Logistic Regression We tested our sampling via moment sharing method (SMS) on Bayesian logistic regression with simulated data. Given a dataset D = {(xn, yn)}N n=1 where xn ∈Rd and yn = ±1, the conditional model of each yn given xn is p(yn|xn, w) = σ(ynw⊤xn), (4) where σ(x) = 1/(1+e−x) is the standard logistic (sigmoid) function and the weight vector w ∈Rd is our parameter of interest. For simplicity we did not include the intercept in the model. We used a standard Gaussian prior p0(w) = N(w; 0d, Id) on w and the aim is to draw samples from the posterior p(w|D). 4 −5 0 5 −5 0 5 d1 d20 yn = +1 yn = −1 p0(w) Figure 1: Plot of covariate dimensions 1 and 20 of the simulated dataset for Bayesian logistic regression. Our simulated dataset consists of N = 4000 data points, each with d = 20 dimensional covariates, generated using i.i.d. draws xn ∼N(µx, Σx), where Σx = PP ⊤, P ∈ [0, 1]d×d and each entry of µx and P are in turn generated i.i.d. from U(0, 1). We generate the “true” parameter vector w∗from the prior N(0d, Id), with which the labels are sampled i.i.d. according to the model, i.e. p(yn) = σ(ynw∗⊤xn). The dataset is visualized in Fig. 1. As the base MCMC sampler used across all methods, we used the No-U-Turn sampler (NUTS) [6]. NUTS was also used to generate 100000 samples from the full posterior p(θ|D) for ground truth. Across all the methods, the sampler was initialised at 0d and used the first 20d samples for burn-in, then thinned every other sample. We compared our method SMS against consensus Monte Carlo (SCOT) [16], the embarrassingly parallel MCMC sampler (NEIS) of [12] and the Weierstrass sampler (WANG) [19]. SMS: We tested both the synchronous (SMS(s)) and asynchronous (SMS(a)) versions of our method, using a multivariate Gaussian exponential family. The damping factor used was 0.2. At each EP iteration, SMS produced both the EP approximated Gaussian posterior q(θ; η0 +Pm i=1 ηi), as well as a collection of mT local posterior samples Θ. We use K to denote the total number of EP iterations. For SMS(a), every m worker-master update is counted as one EP iteration. SCOT: Since each node in our algorithm effectively draws KT samples in total, we allowed each node in SCOT to draw KT samples as well, using a single NUTS run. To compare against our algorithm at iteration k ≤K, we used the first kT samples for combination and form the approximate posterior samples. NEIS: As in SCOT, we drew KT samples at each node, and compared against ours at iteration k using the first kT samples. We tested both the parametric (NEIS(p)) and non-parametric (NEIS(n)) combination methods. To combine the kernel density estimates in NEIS(n), we adopted the recursive pairwise combination strategy as suggested in [12, 19]. We retained 10mT samples during intermediate stages of pair reduction and finally drew mT samples from the final reduction. WANG: We test the sequential sampler in the first arXiv version, which can handle moderately high dimensional data and does not require a good initial approximation. The bandwidths hl (l = 1, . . . , d) were initialized to 0.01 and updated with √mσl (if smaller) as suggested by the authors, where σl is the estimated posterior standard deviation of dimension l. As a Gibbs sampling algorithm, WANG requires a larger number of iterations for convergence but does not need as many samples within each iteration. Hence we ran it for K′ = 700 ≫K iterations, each time generating KT/K′ samples on every node. We then collected every T combined samples generated from each subsequent K′/K iterations for comparative purposes, leaving all previous samples as burn-in. All methods were implemented and tested in Matlab. Experiments were conducted on a cluster with as many as 24 nodes (Matlab workers), arranged in 4 servers, each being a multi-core server with 2 Intel(R) Xeon(R) E5645 CPUs (6 cores, 12 threads). We used the parfor command (synchronous) and the parallel.FevalFuture object (asynchronous) in Matlab for parallel computations. The underlying message passing is managed by the Matlab Distributed Computing Server. Convergence of Shared Moments. Figure 2 demonstrates the convergence of the local posterior means as the EP iteration progresses, on a smaller dataset generated likewise with N = 1000, d = 5 and 25000 samples as ground truth. It clearly illustrates that our algorithm achieves very good approximation accuracy by quickly enforcing agreement across nodes on local posterior moments (mean in this case). When m = 50, we used a larger number of samples for stable convergence. Approximation Accuracies. We compare the approximation accuracy of the different methods on our main simulated data (N = 4000, d = 20). We use a moderately large number of nodes m = 32, and T = 10000. In this case, each subset consists of 125 data points. We considered three different error measures for the approximation accuracies. Denote the ground truth posterior samples, mean and covariance by Θ∗, µ∗and Σ∗, and correspondingly bΘ, bµ and bΣ for the approximate samples collected using a distributed MCMC method. The first error measure is mean squared error (MSE) 5 250 500 750 1000 1250 1500 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 k × T × N/m × 103 (a) m = 4, T = 1000 100 200 300 400 500 600 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 k × T × N/m × 103 (b) m = 10, T = 1000 200 400 600 800 1000 1200 1400 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 k × T × N/m × 103 (c) m = 50, T = 10000 Figure 2: Convergence of local posterior means on a smaller Bayesian logistic regression dataset (N = 1000, d = 5). The x-axis indicates the number of likelihood evaluations, with vertical lines denoted EP iteration numbers. The y-axis indicates the estimated posterior means (dimensions indicated by different colours). We show ground truth with solid horizontal lines, the EP estimated mean with asterisks, and local sample estimated means dots connected with dash lines. 3.2 6.4 9.6 12.8 16 19.2 x 10 5 10 −6 10 −4 10 −2 10 0 k × T × m SMS(s) SMS(a) SCOT NEIS(p) NEIS(n) WANG (a) MSE of posterior mean 3.2 6.4 9.6 12.8 16 19.2 x 10 5 10 −1 10 0 10 1 10 2 k × T × m SMS(s) SMS(a) SCOT WANG (b) Approximate KL-divergence 3.2 6.4 9.6 12.8 16 19.2 x 10 5 10 −7 10 −6 10 −5 10 −4 10 −3 10 −2 10 −1 k × T × m SMS(s) SMS(a) SCOT NEIS(n) WANG (c) MSE of conditional prob. (5) Figure 3: Errors (log-scale) against the cumulative number of samples drawn on all nodes (kTm). We tested two random splits of the dataset (hence 2 curves for each algorithm). Each complete EP iteration is highlighted by a vertical grid line. Note that for SCOT, NEIS(p) and NEIS(n), apart from usual combinations that occur after every Tm/2 local samples are drawn on all nodes, we also deliberately looked into combinations at a much earlier stage at (0.01, 0.02, 0.1, 0.5)Tm. 0 1 2 3 4 5 6 7 x 10 4 10 −2 10 −1 10 0 10 1 10 2 k × T SMS(s) SMS(a) m = 8 m = 16 m = 32 m = 48 m = 64 (a) Approximate KL-divergence 0 0.5 1 1.5 2 2.5 x 10 8 10 −2 10 −1 10 0 10 1 10 2 k × T × N/m SMS(s) SMS(a) m = 8 m = 16 m = 32 m = 48 m = 64 (b) Approximate KL-divergence m=8 m=16 m=32 m=48 m=64 0 0.5 1 1.5 2 2.5 SMS(s,s) SMS(s,e) SMS(a,s) SMS(a,e) SCOT XING(p) (c) Approximate KL-divergence Figure 4: Cross comparison with different numbers of nodes. Note that the x-axes have different meanings. In figure (a), it is the cumulative number of samples drawn locally on each node (kT). For the asynchronous SMS(a), we only plot every m iterations so as to mimic the behaviour of SMS(s) for a more direct comparison. In figure (b) however, it is the cumulative number of likelihood evaluations on each node (kTN/m), which more accurately reflect computation time. 6 between bµ and µ∗: Pd l=1(bµl −µ∗ l )2/d; the second is KL-divergence between N(µ∗, Σ∗) and N(bµ, bΣ); and finally the MSE of the conditional probabilities: 1 N X x∈D h 1 |bΘ| X w∈bΘ σ(w⊤x) − 1 |Θ∗| X w∈Θ∗ σ(w⊤x) i2 . (5) Figure 3 shows the results for two separate runs of each method. We observe that both versions of SMS converge rapidly, requiring few rounds of EP iterations. Further, they produce approximation errors significantly below other methods. The synchronous SMS(s) does appear more stable and converges faster than its asynchronous counterpart but ultimately both versions achieve the same level of accuracy. SCOT and NEIS(p) are very closely related, with their MSE for posterior mean overlapping. Both methods achieve reasonable accuracy early on, but fail to further improve with the increasing number of samples available for combination due to their assumptions of Gaussianity. NEIS(p) directly estimates bµ and bΣ without drawing samples bΘ and is thus missing from Figure 3b and 3c. Note that NEIS(n) is missing from Figure 3b because the posterior covariance estimated from the combined samples is singular due to an insufficient number of distinct samples. Unsurprisingly, WANG requires a large number of iterations for convergence and does not achieve very good approximation accuracy. It is also possible that the poor performances of NEIS(n) and WANG are due to the kernel density estimation used, as its quality deteriorates very quickly with dimensionality. Influence of the Number of Nodes. We also investigated how the methods behave with varying numbers of partitions, m = 8, 16, 32, 48, 64. We tested the methods on three runs with three different random partitions of the dataset. We only tested m = 64 on our SMS methods. In Figure 4a, we see the rapid convergence in terms of the number of EP iterations, and the insensitivity to the number of nodes. Also, the final accuracies of the SMS methods are better for smaller values of m. This is not surprising since the approximation error of EP tends to increase when the posterior is factorised into more factors. In the extreme case of m = 1, the methods will be exact. Note however that with larger m, each node contains a smaller subset of data, and computation time is hence reduced. In Figure 4b we plotted the same curves against the number kTN/m of likelihood evaluations on each node, which better reflects the computation times. We thus see an accuracy-computation time trade-off, where with larger m computation time is reduced but accuracies get worse. In Figure 4c, we looked into the accuracy of the obtained approximate posterior in terms of KL-divergence. Note that apart from a direct read-off of the mean and covariance from the parametric EP estimate (SMS(s,e) & SMS(a,e)), we might also compute the estimators from the posterior samples (SMS(s,s) & SMS(a,s)), and we compared both of these in the figure. As noted above, the accuracies are better when we have less nodes. However, the errors of our methods still increase much slower than SCOT and NEIS(p), for both of which the KL-divergence increases to around 20 and 85 when m = 32 and 48 and is thus cropped from the figure. 3.2 Bayesian sparse linear regression with spike and slab prior In this experiment, we apply SMS to a Bayesian sparse linear regression model with a spike and slab prior over the weights. Our goal is to illustrate that our framework is applicable in scenarios where the local posterior distribution is approximated by other exponential family distributions and not just the multivariate Gaussian. Given a feature vector xn ∈Rd, we model the label as yn ∼N(w⊤xn, σ2 y), where w is the parameter of interest. We use a spike and slab prior [10] over w, which is equivalent to setting w = ew ⊙s, where s is a d-dimensional binary vector (where 1 corresponds to an active feature and 0 inactive) whose elements are drawn independently from a Bernoulli distribution whose natural (log odds) parameter is β0 and ewl|sl ∼N(0, σ2 w) i.i.d. for each l = 1, . . . , d. [7] proposed the following variational approximation of the posterior: q(ew, s) = Qd l=1 q( ewl, sl) where each factor q( ewl, sl) = q(sl)q( ewl|sl) is a spike and slab distribution. (We refer the reader to [7] for details.) The spike and slab distribution over θ = (ew, s) is an exponential family distribution with sufficient statistics {sl, sl ewl, sl ew2 l }d l=1, which we use for the EP approximation. The moments required consist of the probability of sl = 1, and the mean and variance of ewl conditioned on sl = 1, for each l = 1, . . . , d. The conditional distribution of ewl given sl = 0 is simply the prior N(0, σ2 w). The natural parameters consist of the log odds of sl = 1, as well as those for ewl conditioned on sl = 1 7 0 1000 2000 3000 4000 −0.4 −0.2 0 0.2 0.4 k × T × N/m × 103 (a) m = 2 0 500 1000 1500 2000 −0.4 −0.2 0 0.2 0.4 k × T × N/m × 103 (b) m = 4 Figure 5: Results on Boston housing dataset for Bayesian sparse linear regression model with spike and slab prior. The x-axis plots the number of data points per node (equals the number of likelihood evaluations per sample) times the cumulative number of samples drawn per node, which is a surrogate for the computation times of the methods. The y-axis plots the ground truth (solid), local sample estimated means (dashed) and EP estimated mean (asterisks) at every iteration. (Section 2.3). We used the paired Gibbs sampler described in [7] as the underlying MCMC sampler, and a damping factor of 0.5. We experimented using the Boston housing dataset which consists of N = 455 training data points in d = 13 dimensions. We fixed the hyperparameters to the values described in [7], and generated ground truth samples by running a long chain of the paired Gibbs sampler and computed the posterior mean of w using these ground truth samples. Figure 5 illustrates the output of SMS(s) for m = 2 and m = 4 (the number of nodes was kept small to ensure that each node contains at least 100 observations). Each color denotes a different dimension; to avoid clutter, we report results only for dimensions 2, 5, 6, 7, 9, 10, and 13. The dashed lines denote the local sample estimated means at each of the nodes; the solid lines denote the ground truth and the asterisks denote the EP estimated mean at each iteration. Initially, the local estimated means are quite different since each node has a different random data subset. As EP progresses, these local estimated means as well as the EP estimated mean converge rapidly to the ground truth values. 4 Conclusion We proposed an approach to performing distributed Bayesian posterior sampling where each compute node contains a different subset of data. We show that through very low-cost and rapidly converging EP messages passed among the nodes, the local MCMC samplers can be made to share a number of moment statistics like the mean and covariance. This in turn allows the local MCMC samplers to converge to the same part of the parameter space, and allows each local sample produced to be interpreted as an approximate global sample without the need for a combination stage. Through empirical studies, we showed that our methods are more accurate than previous methods and also exhibits better scalability to the number of nodes. Interesting avenues of research include using our SMS methods to adjust hyperparameters using either empirical or fully Bayesian learning, implementation and evaluation of the decentralised version of SMS, and theoretical analysis of the behaviour of EP under the stochastic perturbations caused by the MCMC estimation of moments. Acknowledgements We thank Willie Neiswanger for sharing his implementation of NEIS(n), and Michalis K Titsias for sharing the code used in [7]. MX, JZ and BZ gratefully acknowledge funding from the National Basic Research Program of China (No. 2013CB329403) and National NSF of China (Nos. 61322308, 61332007). BL gratefully acknowledges generous funding from the Gatsby charitable foundation. YWT gratefully acknowledges EPSRC for research funding through grant EP/K009362/1. 8 References [1] Sungjin Ahn, Anoop Korattikara, and Max Welling. Bayesian posterior sampling via stochastic gradient Fisher scoring. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), 2012. [2] Tamara Broderick, Nicholas Boyd, Andre Wibisono, Ashia C Wilson, and Michael Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems, pages 1727–1735, 2013. [3] Jeffrey Dean and Sanjay Ghemawat. MapReduce: simplified data processing on large clusters. Communications of the ACM, 51(1):107–113, 2008. [4] Matthew D Hoffman, Francis R Bach, and David M Blei. Online learning for latent Dirichlet allocation. In Advances in Neural Information Processing Systems, pages 856–864, 2010. [5] 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. [6] Matthew D Hoffman and Andrew Gelman. The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15:1593–1623, 2014. [7] Miguel L´azaro-gredilla and Michalis K Titsias. Spike and slab variational inference for multitask and multiple kernel learning. In Advances in Neural Information Processing Systems, pages 2339–2347, 2011. [8] Thomas P Minka. A family of algorithms for approximate Bayesian inference. PhD thesis, Massachusetts Institute of Technology, 2001. [9] Stanislav Minsker, Sanvesh Srivastava, Lizhen Lin, and David Dunson. Scalable and robust Bayesian inference via the median posterior. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1656–1664, 2014. [10] Toby J Mitchell and John J Beauchamp. Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83(404):1023–1032, 1988. [11] Robb J Muirhead. Aspects of multivariate statistical theory, volume 197. John Wiley & Sons, 2009. [12] Willie Neiswanger, Chong Wang, and Eric Xing. Asymptotically exact, embarrassingly parallel MCMC. In Proceedings of the 30th International Conference on Uncertainty in Artificial Intelligence (UAI-14), pages 623–632, 2014. [13] David Newman, Arthur Asuncion, Padhraic Smyth, and Max Welling. Distributed algorithms for topic models. The Journal of Machine Learning Research, 10:1801–1828, 2009. [14] 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. [15] Herbert Robbins and Sutton Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22(3):400–407, 1951. [16] Steven L Scott, Alexander W Blocker, Fernando V Bonassi, Hugh A Chipman, Edward I George, and Robert E McCulloch. Bayes and big data: The consensus Monte Carlo algorithm. EFaBBayes 250 conference, 16, 2013. [17] Matthias W Seeger. Bayesian inference and optimal design for the sparse linear model. The Journal of Machine Learning Research, 9:759–813, 2008. [18] Hisayuki Tsukuma and Yoshihiko Konno. On improved estimation of normal precision matrix and discriminant coefficients. Journal of Multivariate Analysis, 97(7):1477 – 1500, 2006. [19] Xiangyu Wang and David B. Dunson. Parallel MCMC via Weierstrass sampler. arXiv preprint arXiv:1312.4605, 2013. [20] 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
2014
277
5,377
Proximal Quasi-Newton for Computationally Intensive ℓ1-regularized M-estimators Kai Zhong 1 Ian E.H. Yen 2 Inderjit S. Dhillon 2 Pradeep Ravikumar 2 1 Institute for Computational Engineering & Sciences 2 Department of Computer Science University of Texas at Austin zhongkai@ices.utexas.edu, {ianyen,inderjit,pradeepr}@cs.utexas.edu Abstract We consider the class of optimization problems arising from computationally intensive ℓ1-regularized M-estimators, where the function or gradient values are very expensive to compute. A particular instance of interest is the ℓ1-regularized MLE for learning Conditional Random Fields (CRFs), which are a popular class of statistical models for varied structured prediction problems such as sequence labeling, alignment, and classification with label taxonomy. ℓ1-regularized MLEs for CRFs are particularly expensive to optimize since computing the gradient values requires an expensive inference step. In this work, we propose the use of a carefully constructed proximal quasi-Newton algorithm for such computationally intensive M-estimation problems, where we employ an aggressive active set selection technique. In a key contribution of the paper, we show that the proximal quasi-Newton method is provably super-linearly convergent, even in the absence of strong convexity, by leveraging a restricted variant of strong convexity. In our experiments, the proposed algorithm converges considerably faster than current state-of-the-art on the problems of sequence labeling and hierarchical classification. 1 Introduction ℓ1-regularized M-estimators have attracted considerable interest in recent years due to their ability to fit large-scale statistical models, where the underlying model parameters are sparse. The optimization problem underlying these ℓ1-regularized M-estimators takes the form: min w f(w) := λ∥w∥1 + ℓ(w), (1) where ℓ(w) is a convex differentiable loss function. In this paper, we are particularly interested in the case where the function or gradient values are very expensive to compute; we refer to these functions as computationally intensive functions, or CI functions in short. A particular case of interest are ℓ1regularized MLEs for Conditional Random Fields (CRFs), where computing the gradient requires an expensive inference step. There has been a line of recent work on computationally efficient methods for solving (1), including [2, 8, 13, 21, 23, 4]. It has now become well understood that it is key to leverage the sparsity of the optimal solution by maintaining sparse intermediate iterates [2, 5, 8]. Coordinate Descent (CD) based methods, like CDN [8], maintain the sparsity of intermediate iterates by focusing on an active set of working variables. A caveat with such methods is that, for CI functions, each coordinate update typically requires a call of inference oracle to evaluate partial derivative for single coordinate. One approach adopted in [16] to address this is using Blockwise Coordinate Descent that updates a block of variables at a time by ignoring the second-order effect, which however sacrifices the convergence guarantee. Newton-type methods have also attracted a surge of interest in recent years [5, 13], but these require computing the exact Hessian or Hessian-vector product, which is very 1 expensive for CI functions. This then suggests the use of quasi-Newton methods, popular instances of which include OWL-QN [23], which is adapted from ℓ2-regularized L-BFGS, as well as Projected Quasi-Newton (PQN) [4]. A key caveat with OWL-QN and PQN however is that they do not exploit the sparsity of the underlying solution. In this paper, we consider the class of Proximal QuasiNewton (Prox-QN) methods, which we argue seem particularly well-suited to such CI functions, for the following three reasons. Firstly, it requires gradient evaluations only once in each outer iteration. Secondly, it is a second-order method, which has asymptotic superlinear convergence. Thirdly, it can employ some active-set strategy to reduce the time complexity from O(d) to O(nnz), where d is the number of parameters and nnz is the number of non-zero parameters. While there has been some recent work on Prox-QN algorithms [2, 3], we carefully construct an implementation that is particularly suited to CI ℓ1-regularized M-estimators. We carefully maintain the sparsity of intermediate iterates, and at the same time reduce the gradient evaluation time. A key facet of our approach is our aggressive active set selection (which we also term a ”shrinking strategy”) to reduce the number of active variables under consideration at any iteration, and correspondingly the number of evaluations of partial gradients in each iteration. Our strategy is particularly aggressive in that it runs over multiple epochs, and in each epoch, chooses the next working set as a subset of the current working set rather than the whole set; while at the end of an epoch, allows for other variables to come in. As a result, in most iterations, our aggressive shrinking strategy only requires the evaluation of partial gradients in the current working set. Moreover, we adapt the L-BFGS update to the shrinking procedure such that the update can be conducted without any loss of accuracy caused by aggressive shrinking. Thirdly, we store our data in a feature-indexed structure to combine data sparsity as well as iterate sparsity. [26] showed global convergence and asymptotic superlinear convergence for Prox-QN methods under the assumption that the loss function is strongly convex. However, this assumption is known to fail to hold in high-dimensional sampling settings, where the Hessian is typically rank-deficient, or indeed even in low-dimensional settings where there are redundant features. In a key contribution of the paper, we provide provable guarantees of asymptotic superlinear convergence for Prox-QN method, even without assuming strong-convexity, but under a restricted variant of strong convexity, termed Constant Nullspace Strong Convexity (CNSC), which is typically satisfied by standard M-estimators. To summarize, our contributions are twofold. (a) We present a carefully constructed proximal quasiNewton method for computationally intensive (CI) ℓ1-regularized M-estimators, which we empirically show to outperform many state-of-the-art methods on CRF problems. (b) We provide the first proof of asymptotic superlinear convergence for Prox-QN methods without strong convexity, but under a restricted variant of strong convexity, satisfied by typical M-estimators, including the ℓ1-regularized CRF MLEs. 2 Proximal Quasi-Newton Method A proximal quasi-Newton approach to solve M-estimators of the form (1) proceeds by iteratively constructing a quadratic approximation of the objective function (1) to find the quasi-Newton direction, and then conducting a line search procedure to obtain the next iterate. Given a solution estimate wt at iteration t, the proximal quasi-Newton method computes a descent direction by minimizing the following regularized quadratic model, dt = arg min ∆gT t ∆+ 1 2∆T Bt∆+ λ∥wt + ∆∥1 (2) where gt = g(wt) is the gradient of ℓ(wt) and Bt is an approximation to the Hessian of ℓ(w). Bt is usually formulated by the L-BFGS algorithm. This subproblem (2) can be efficiently solved by randomized coordinate descent algorithm as shown in Section 2.2. The next iterate is obtained from the backtracking line search procedure, wt+1 = wt +αtdt, where the step size αt is tried over {β0, β1, β2, ...} until the Armijo rule is satisfied, f(wt + αtdt) ≤f(wt) + αtσ∆t, where 0 < β < 1, 0 < σ < 1 and ∆t = gT t dt + λ(∥wt + dt∥1 −∥wt∥1). 2 2.1 BFGS update formula Bt can be efficiently updated by the gradients of the previous iterations according to the BFGS update [18], Bt = Bt−1 −Bt−1st−1sT t−1Bt−1 sT t−1Bt−1st−1 + yt−1yT t−1 yT t−1st−1 (3) where st = wt+1 −wt and yt = gt+1 −gt We use the compact formula for Bt [18], Bt = B0 −QRQT = B0 −Q ˆQ, where Q := [ B0St Yt ] , R :=  ST t B0St Lt LT t −Dt −1 , ˆQ := RQT St = [s0, s1, ..., st−1] , Yt =  y0, y1, ..., yt−1  Dt = diag[sT 0 y0, ..., sT t−1yt−1] and (Lt)i,j = sT i−1yj−1 if i > j 0 otherwise In practical implementation, we apply Limited-memory-BFGS. It only uses the information of the most recent m gradients, so that Q and ˆQ have only size, d × 2m and 2m × d, respectively. B0 is usually set as γtI for computing Bt, where γt = yT t−1st−1/sT t−1st−1[18]. As will be discussed in Section 2.3, Q( ˆQ) is updated just on the rows(columns) corresponding to the working set, A. The time complexity for L-BFGS update is O(m2|A| + m3). 2.2 Coordinate Descent for Inner Problem Randomized coordinate descent is carefully employed to solve the inner problem (2) by Tang and Scheinberg [2]. In the update for coordinate j, d ←d + z∗ej, z∗is obtained by solving the onedimensional problem, z∗= arg min z 1 2(Bt)jjz2 + ((gt)j + (Btd)j)z + λ|(wt)j + dj + z| This one-dimensional problem has a closed-form solution, z∗= −c + S(c −b/a, λ/a) ,where S is the soft-threshold function and a = (Bt)jj, b = (gt)j +(Btd)j and c = (wt)j +dj. For B0 = γtI, the diagonal of Bt can be computed by (Bt)jj = γt −qT j ˆqj, where qT j is the j-th row of Q and ˆqj is the j-th column of ˆQ. And the second term in b, (Btd)j can be computed by, (Btd)j = γtdj −qT j ˆQd = γtdj −qT j ˆd, where ˆd := ˆQd. Since ˆd has only 2m dimension, it is fast to update (Btd)j by qj and ˆd. In each inner iteration, only dj is updated, so we have the fast update of ˆd, ˆd ←ˆd + ˆqjz∗. Since we only update the coordinates in the working set, the above algorithm has only computation complexity O(m|A| × inner iter), where inner iter is the number of iterations used for solving the inner problem. 2.3 Implementation In this section, we discuss several key implementation details used in our algorithm to speed up the optimization. Shrinking Strategy In each iteration, we select an active or working subset A of the set of all variables: only the variables in this set are updated in the current iteration. The complementary set, also called the fixed set, has only values of zero and is not updated. The use of such a shrinking strategy reduces the overall complexity from O(d) to O(|A|). Specifically, we (a) update the gradients just on the working set, (b) update Q ( ˆQ) just on the rows(columns) corresponding to the working set, and (c) compute the latest entries in Dt, γt, Lt and ST t St by just using the corresponding working set rather than the whole set. 3 The key facet of our “shrinking strategy” however is in aggressively shrinking the active set: at the next iteration, we set the active set to be a subset of the previous active set, so that At ⊂At−1. Such an aggressive shrinking strategy however is not guaranteed to only weed out irrelevant variables. Accordingly, we proceed in epochs. In each epoch, we progressively shrink the active set as above, till the iterations seem to converge. At that time, we then allow for all the “shrunk” variables to come back and start a new epoch. Such a strategy was also called an ϵ-cooling strategy by Fan et al. [14], where the shrinking stopping criterion is loose at the beginning, and progressively becomes more strict each time all the variables are brought back. For L-BFGS update, when a new epoch starts, the memory of L-BFGS is cleaned to prevent any loss of accuracy. Because at the first iteration of each new epoch, the entire gradient over all coordinates is evaluated, the computation time for those iterations accounts for a significant portion of the total time complexity. Fortunately, our experiments show that the number of epochs is typically between 3-5. Inexact inner problem solution Like many other proximal methods, e.g. GLMNET and QUIC, we solve the inner problem inexactly. This reduces the time complexity of the inner problem dramatically. The amount of inexactness is based on a heuristic method which aims to balance the computation time of the inner problem in each outer iteration. The computation time of the inner problem is determined by the number of inner iterations and the size of working set. Thus, we let the number of inner iterations, inner iter = min{max inner, ⌊d/|A|⌋}, where max inner = 10 in our experiment. Data Structure for both model sparsity and data sparsity In our implementation we take two sparsity patterns into consideration: (a) model sparsity, which accounts for the fact that most parameters are equal to zero in the optimal solution; and (b) data sparsity, wherein most feature values of any particular instance are zeros. We use a feature-indexed data structure to take advantage of both sparsity patterns. Computations involving data will be timeconsuming if we compute over all the instances including those that are zero. So we leverage the sparsity of data in our experiment by using vectors of pairs, whose members are the index and its value. Traditionally, each vector represents an instance and the indices in its pairs are the feature indices. However, in our implementation, to take both model sparsity and data sparsity into account, we use an inverted data structure, where each vector represents one feature (feature-indexed) and the indices in its pairs are the instance indices. This data structure facilitates the computation of the gradient for a particular feature, which involves only the instances related to this feature. We summarize these steps in the algorithm below. And a detailed algorithm is in Appendix 2. Algorithm 1 Proximal Quasi-Newton Algorithm (Prox-QN) Input: Dataset {x(i), y(i)}i=1,2,...,N, termination criterion ϵ, λ and L-BFGS memory size m. Output: w∗converging to arg minwf(w). 1: Initialize w ←0, g ←∂ℓ(w)/∂w, working set A ←{1, 2, ...d}, and S, Y , Q, ˆQ ←φ. 2: while termination criterion is not satisfied or working set doesn’t contain all the variables do 3: Shrink working set. 4: if Shrinking stopping criterion is satisfied then 5: Take all the shrunken variables back to working set and clean the memory of L-BFGS. 6: Update Shrinking stopping criterion and continue. 7: end if 8: Solve inner problem (2) over working set and obtain the new direction d. 9: Conduct line search based on Armijo rule and obtain new iterate w. 10: Update g, s, y, S, Y , Q, ˆQ and related matrices over working set. 11: end while 3 Convergence Analysis In this section, we analyze the convergence behavior of proximal quasi-Newton method in the superlinear convergence phase, where the unit step size is chosen. To simplify the analysis, in this section, we assume the inner problem is solved exactly and no shrinking strategy is employed. We also provide the global convergence proof for Prox-QN method with shrinking strategy in Appendix 1.5. In current literature, the analysis of proximal Newton-type methods relies on the assumption of 4 strongly convex objective function to prove superlinear convergence [3]; otherwise, only sublinear rate can be proved [25]. However, our objective (1) is not strongly convex when the dimension is very large or there are redundant features. In particular, the Hessian matrix H(w) of the smooth function ℓ(w) is not positive-definite. We thus leverage a recently introduced restricted variant of strong convexity, termed Constant Nullspace Strong Convexity (CNSC) in [1]. There the authors analyzed the behavior of proximal gradient and proximal Newton methods under such a condition. The proximal quasi-Newton procedure in this paper however requires a subtler analysis, but in a key contribution of the paper, we are nonetheless able to show asymptotic superlinear convergence of the Prox-QN method under this restricted variant of strong convexity. Definition 1 (Constant Nullspace Strong Convexity (CNSC)). A composite function (1) is said to have Constant Nullspace Strong Convexity restricted to space T (CNSC-T ) if there is a constant vector space T s.t. ℓ(w) depends only on projT (w), i.e. ℓ(w) = ℓ(projT (w)), and its Hessian satisfies m∥v∥2 ≤vT H(w)v ≤M∥v∥2, ∀v ∈T , ∀w ∈Rd (4) for some M ≥m > 0, and H(w)v = 0, ∀v ∈T ⊥, ∀w ∈Rd, (5) where projT (w) is the projection of w onto T and T ⊥is the complementary space orthogonal to T . This condition can be seen to be an algebraic condition that is satisfied by typical M-estimators considered in high-dimensional settings. In this paper, we will abuse the use of CNSC-T for symmetric matrices. We say a symmetric matrix H satisfies CNSC-T condition if H satisfies (4) and (5). In the following theorems, we will denote the orthogonal basis of T as U ∈Rd× ˆd, where ˆd ≤d is the dimensionality of T space and U T U = I. Then the projection to T space can be written as projT (w) = UU T w. Theorem 1 (Asymptotic Superlinear Convergence). Assume ∇2ℓ(w) and ∇ℓ(w) are Lipschitz continuous. Let Bt be the matrices generated by BFGS update (3). Then if ℓ(w) and Bt satisfy CNSC-T condition, the proximal quasi-Newton method has q-superlinear convergence: ∥zt+1 −z∗∥≤o (∥zt −z∗∥) , where zt = U T wt, z∗= U T w∗and w∗is an optimal solution of (1). The proof is given in Appendix 1.4. We prove it by exploiting the CNSC-T property. First, we re-build our problem and algorithm on the reduced space Z = {z ∈R ˆd|z = U T w}, where the strong-convexity property holds. Then we prove the asymptotic superlinear convergence on Z following Theorem 3.7 in [26]. Theorem 2. For Lipschitz continuous ℓ(w), the sequence {wt} produced by the proximal quasiNewton Method in the super-linear convergence phase has f(wt) −f(w∗) ≤L∥zt −z∗∥, (6) where L = Lℓ+ λ √ d, Lℓis the Lipschitz constant of ℓ(w), zt = U T wt and z∗= U T w∗. The proof is also in Appendix 1.4. It is proved by showing that both the smooth part and the nondifferentiable part satisfy the modified Lipschitz continuity. 4 Application to Conditional Random Fields with ℓ1 Penalty In CRF problems, we are interested in learning a conditional distribution of labels y ∈Y given observation x ∈X, where y has application-dependent structure such as sequence, tree, or table in which label assignments have inter-dependency. The distribution is of the form Pw(y|x) = 1 Zw(x) exp ( d X k=1 wkfk(y, x) ) , where fk is the feature functions, wk is the associated weight, d is the number of feature functions and Zw(x) is the partition function. Given a training data set {(xi, yi)}N i=1, our goal is to find the optimal weights w such that the following ℓ1-regularized negative log-likelihood is minimized. min w f(w) = λ∥w∥1 − N X i=1 log Pw(y(i)|x(i)) (7) 5 Since |Y|, the number of possible values y takes, can be exponentially large, the evaluation of ℓ(w) and the gradient ∇ℓ(w) needs application-dependent oracles to conduct the summation over Y. For example, in sequence labeling problem, a dynamic programming oracle, forward-backward algorithm, is usually employed to compute ∇ℓ(w). Such an oracle can be very expensive. In ProxQN algorithm for sequence labeling problem, the forward-backward algorithm takes O(|Y |2NT × exp) time, where exp is the time for the expensive exponential computation, T is the sequence length and Y is the possible label set for a symbol in the sequence. Then given the obtained oracle, the evaluation of the partial gradients over the working set A has time complexity, O(Dnnz|A|T), where Dnnz is the average number of instances related to a feature. Thus when O(|Y |2NT ×exp+ Dnnz|A|T) > O(m3 + m2|A|), the gradients evaluation time will dominate. The following theorem gives that the ℓ1-regularized CRF MLEs satisfy the CNSC-T condition. Theorem 3. With ℓ1 penalty, the CRF loss function, ℓ(w) = −PN i=1 log Pw(y(i)|x(i)), satisfies the CNSC-T condition with T = N ⊥, where N = {v ∈Rd|ΦT v = 0} is a constant subspace of Rd and Φ ∈Rd×(N|Y|) is defined as below, Φkn = fk(yl, x(i)) −E h fk(y, x(i)) i where n = (i −1)|Y| + l, l = 1, 2, ...|Y| and E is the expectation over the conditional probability Pw(y|x(i)). According to the definition of CNSC-T condition, the ℓ1-regularized CRF MLEs don’t satisfy the classical strong-convexity condition when N has non-zero members, which happens in the following two cases: (i) the exponential representation is not minimal [27], i.e. for any instance i there exist a non-zero vector a and a constant bi such that ⟨a, φ(y, x(i))⟩= bi, where φ(y, x) = [f1(y, x(i)), f2(y, x(i)), ..., fd(y, x(i))]T ; (ii) d > N|Y|, i.e., the number of feature functions is very large. The first case holds in many problems, like the sequence labeling and hierarchical classification discussed in Section 6, and the second case will hold in high-dimensional problems. 5 Related Methods There have been several methods proposed for solving ℓ1-regularized M-estimators of the form in (7). In this section, we will discuss these in relation to our method. Orthant-Wise Limited-memory Quasi-Newton (OWL-QN) introduced by Andrew and Gao [23] extends L-BFGS to ℓ1-regularized problems. In each iteration, OWL-QN computes a generalized gradient called pseudo-gradient to determine the orthant and the search direction, then does a line search and a projection of the new iterate back to the orthant. Due to its fast convergence, it is widely implemented by many software packages, such as CRF++, CRFsuite and Wapiti. But OWLQN does not take advantage of the model sparsity in the optimization procedure, and moreover Yu et al. [22] have raised issues with its convergence proof. Stochastic Gradient Descent (SGD) uses the gradient of a single sample as the search direction at each iteration. Thus, the computation for each iteration is very fast, which leads to fast convergence at the beginning. However, the convergence becomes slower than the second-order method when the iterate is close to the optimal solution. Recently, an ℓ1-regularized SGD algorithm proposed by Tsuruoka et al.[21] is claimed to have faster convergence than OWL-QN. It incorporates ℓ1-regularization by using a cumulative ℓ1 penalty, which is close to the ℓ1 penalty received by the parameter if it had been updated by the true gradient. Tsuruoka et al. do consider data sparsity, i.e. for each instance, only the parameters related to the current instance are updated. But they too do not take the model sparsity into account. Coordinate Descent (CD) and Blockwise Coordinate Descent (BCD) are popular methods for ℓ1regularized problem. In each coordinate descent iteration, it solves an one-dimensional quadratic approximation of the objective function, which has a closed-form solution. It requires the second partial derivative with respect to the coordinate. But as discussed by Sokolovska et al., the exact second derivative in CRF problem is intractable. So they instead use an approximation of the second derivative, which can be computed efficiently by the same inference oracle queried for the gradient evaluation. However, pure CD is very expensive because it requires to call the inference oracle for the instances related to the current coordinate in each coordinate update. BCD alleviates this problem by grouping the parameters with the same x feature into a block. Then each block update only 6 needs to call the inference oracle once for the instances related to the current x feature. However, it cannot alleviate the large number of inference oracle calls unless the data is very sparse such that every instance appears only in very few blocks. Proximal Newton method has proven successful on problems of ℓ1-regularized logistic regression [13] and Sparse Invariance Covariance Estimation [5], where the Hessian-vector product can be cheaply re-evaluated for each update of coordinate. However, the Hessian-vector product for CI function like CRF requires the query of the inference oracle no matter how many coordinates are updated at a time [17], which then makes the coordinate update on quadratic approximation as expensive as coordinate update in the original problem. Our proximal quasi-Newton method avoids such problem by replacing Hessian with a low-rank matrix from BFGS update. 6 Numerical Experiments We compare our approach, Prox-QN, with four other methods, Proximal Gradient (Prox-GD), OWLQN [23], SGD [21] and BCD [16]. For OWL-QN, we directly use the OWL-QN optimizer developed by Andrew et al.1, where we set the memory size as m = 10, which is the same as that in Prox-QN. For SGD, we implement the algorithm proposed by Tsuruoka et al. [21], and use cumulative ℓ1 penalty with learning rate ηk = η0/(1 + k/N), where k is the SGD iteration and N is the number of samples. For BCD, we follow Sokolovska et al. [16] but with three modifications. First, we add a line search procedure in each block update since we found it is required for convergence. Secondly, we apply shrinking strategy as discussed in Section 2.3. Thirdly, when the second derivative for some coordinate is less than 10−10, we set it to be 10−10 because otherwise the lack of ℓ2-regularization in our problem setting will lead to a very large new iterate. We evaluate the performance of Prox-QN method on two problems, sequence labeling and hierarchical classification. In particular, we plot the relative objective difference (f(wt)−f(w∗))/f(w∗) and the number of non-zero parameters (on a log scale) against time in seconds. More experiment results, for example, the testing accuracy and the performance for different λ’s, are in Appendix 5. All the experiments are executed on 2.8GHz Intel Xeon E5-2680 v2 Ivy Bridge processor with 1/4TB memory and Linux OS. 6.1 Sequence Labeling In sequence labeling problems, each instance (x, y) = {(xt, yt)}t=1,2...,T is a sequence of T pairs of observations and the corresponding labels. Here we consider the optical character recognition (OCR) problem, which aims to recognize the handwriting words. The dataset 2 was preprocessed by Taskar et al. [19] and was originally collected by Kassel [20], and contains 6877 words (instances). We randomly divide the dataset into two part: training part with 6216 words and testing part with 661 words. The character label set Y consists of 26 English letters and the observations are characters which are represented by images of 16 by 8 binary pixels as shown in Figure 1(a). We use degree 2 pixels as the raw features, which means all pixel pairs are considered. Therefore, the number of raw features is J = 128 × 127/2 + 128 + 1, including a bias. For degree 2 features, xtj = 1 only when both pixels are 1 and otherwise xtj = 0, where xtj is the j-th raw feature of xi. For the feature functions, we use unigram feature functions 1(yt = y, xtj = 1) and bigram feature functions 1(yt = y, yt+1 = y′) with their associated weights, Θy,j and Λy,y′, respectively. So w = {Θ, Λ} for Θ ∈R|Y |×J and Λ ∈R|Y |×|Y | and the total number of parameters, d = |Y |2 + |Y | × J = 215, 358. Using the above feature functions, the potential function can be specified as, ˜Pw(y, x) = exp n ⟨Λ, PT t=1(eytxT t )⟩+ ⟨Θ, PT −1 t=1 (eyteT yt+1)⟩ o ,where ⟨·, ·⟩is the sum of elementwise product and ey ∈R|Y | is an unit vector with 1 at y-th entry and 0 at other entries. The gradient and the inference oracle are given in Appendix 4.1. In our experiment, λ is set as 100, which leads to a relative high testing accuracy and an optimal solution with a relative small number of non-zero parameters (see Appendix 5.2). The learning rate η0 for SGD is tuned to be 2 × 10−4 for best performance. In BCD, the unigram parameters are grouped into J blocks according to the x features while the bigram parameters are grouped into one block. Our proximal quasi-Newton method can be seen to be much faster than the other methods. 1http://research.microsoft.com/en-us/downloads/b1eb1016-1738-4bd5-83a9-370c9d498a03/ 2http://www.seas.upenn.edu/ taskar/ocr/ 7 (a) Graphical model of OCR 0 500 1000 1500 10 −8 10 −6 10 −4 10 −2 time(s) Relative−objective−difference Sequence−Labelling−100 BCD OWL−QN Prox−GD Prox−QN SGD (b) Relative Objective Difference 0 500 1000 1500 10 3 10 4 10 5 time(s) nnz Sequence−Labelling−nnz−100 BCD OWL−QN Prox−GD Prox−QN SGD (c) Non-zero Parameters Figure 1: Sequence Labeling Problem 6.2 Hierarchical Classification In hierarchical classification problems, we have a label taxonomy, where the classes are grouped into a tree as shown in Figure 2(a). Here y ∈Y is one of the leaf nodes. If we have totally K classes (number of nodes) and J raw features, then the number of parameters is d = K × J. Let W ∈RK×J denote the weights. The feature function corresponding to Wk,j is fk,j(y, x) = 1[k ∈ Path(y)]xj, where k ∈Path(y) means class k is an ancestor of y or y itself. The potential function is ˜PW (y, x) = exp nP k∈Path(y) wT k x o where wT k is the weight vector of k-th class, i.e. the k-th row of W. The gradient and the inference oracle are given in Appendix 4.2. The dataset comes from Task1 of the dry-run dataset of LSHTC13. It has 4,463 samples, each with J=51,033 raw features. The hierarchical tree has 2,388 classes which includes 1,139 leaf labels. Thus, the number of the parameters d =121,866,804. The feature values are scaled by svm-scale program in the LIBSVM package. We set λ = 1 to achieve a relative high testing accuracy and high sparsity of the optimal solution. The SGD initial learning rate is tuned to be η0 = 10 for best performance. In BCD, parameters are grouped into J blocks according to the raw features. (a) Label Taxonomy 2000 4000 6000 8000 10000 10 −6 10 −4 10 −2 10 0 time(s) Relative−objective−difference Hierarchical−Classification−1 BCD OWL−QN Prox−GD Prox−QN SGD (b) Relative Objective Difference 500 1000 1500 2000 2500 3000 3500 10 4 10 5 time(s) nnz Hierarchicial−Classification−nnz−1 BCD OWL−QN Prox−GD Prox−QN SGD (c) Non-zero Parameters Figure 2: Hierarchical Classification Problem As both Figure 1(b),1(c) and Figure 2(b),2(c) show, Prox-QN achieves much faster convergence and moreover obtains a sparse model in much less time. Acknowledgement This research was supported by NSF grants CCF-1320746 and CCF-1117055. P.R. acknowledges the support of ARO via W911NF-12-1-0390 and NSF via IIS-1149803, IIS-1320894, IIS-1447574, and DMS-1264033. K.Z. acknowledges the support of the National Initiative for Modeling and Simulation fellowship 3http://lshtc.iit.demokritos.gr/node/1 8 References [1] I. E.H. Yen, C.-J. Hsieh, P. Ravikumar, and I. S. Dhillon. Constant Nullspace Strong Convexity and Fast Convergence of Proximal Methods under High-Dimensional Settings. In NIPS 2014. [2] X. Tang and K. Scheinberg. Efficiently Using Second Order Information in Large l1 Regularization Problems. arXiv:1303.6935, 2013. [3] J. D. Lee, Y. Sun, and M. A. Saunders. Proximal newton-type methods for minimizing composite functions. In NIPS 2012. [4] M. Schmidt, E. Van Den Berg, M.P. Friedlander, and K. Murphy. Optimizing costly functions with simple constraints: A limited-memory projected Quasi-Newton algorithm. In Int. Conf. Artif. Intell. Stat., 2009. [5] C.-J. Hsieh, M. A. Sustik, I. S. Dhillon, and P. Ravikumar. Sparse inverse covariance estimation using quadratic approximation. In NIPS 2011. [6] S. Boyd and L. Vandenberghe. Convex Optimization, Cambridge Univ. Press, Cambridge, U.K., 2003. [7] P.-W. Wang and C.-J. Lin. Iteration Complexity of Feasible Descent Methods for Convex Optimization. Technical report, Department of Computer Science, National Taiwan University, Taipei, Taiwan, 2013. [8] G.-X. Yuan, K.-W. Chang, C.-J. Hsieh, and C.-J. Lin. A comparison of optimization methods and software for large-scale l1-regularized linear classification. Journal of Machine Learning Research (JMLR), 11:3183-3234, 2010. [9] A. Agarwal, S. Negahban, and M. Wainwright. Fast Global Convergence Rates of Gradient Methods for High-Dimensional Statistical Recovery. In NIPS 2010. [10] K. Hou, Z. Zhou, A. M.-S. So, and Z.-Q. Luo. On the linear convergence of the proximal gradient method for trace norm regularization. In NIPS 2014. [11] L. Xiao and T. Zhang. A proximal-gradient homotopy method for the l1-regularized least-squares problem. In ICML 2012. [12] P. Tseng and S. Yun. A coordinate gradient descent method for nonsmooth separable minimization, Math. Prog. B. 117, 2009. [13] G.-X. Yuan, C.-H. Ho, and C.-J. Lin. An improved GLMNET for l1-regularized logistic regression, JMLR, 13:1999-2030, 2012. [14] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A library for large linear classification, JMLR, 9:1871-1874, 2008. [15] A. J Hoffman. On approximate solutions of systems of linear inequalities. Journal of Research of the National Bureau of Standards, 1952. [16] N. Sokolovska, T. Lavergne, O. Cappe, and F. Yvon. Efficient Learning of Sparse Conditional Random Fields for Supervised Sequence Labelling. arXiv:0909.1308, 2009. [17] Y. Tsuboi, Y. Unno, H. Kashima, and N. Okazaki. Fast Newton-CG Method for Batch Learning of Conditional Random Fields, Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011. [18] J. Nocedal and S. J. Wright. Numerical Optimization. Springer Series in Operations Research. Springer, New York, NY, USA, 2nd edition, 2006. [19] B. Taskar, C. Guestrin, and D. Koller. Max-margin markov networks. In NIPS 2003. [20] R. Kassel. A Comparison of Approaches to On-line Handwritten Character Recognition. PhD thesis, MIT Spoken Language Systems Group, 1995. [21] Y. Tsuruoka, J. Tsujii, and S. Ananiadou. Stochastic gradient descent training for l1- regularized log-linear models with cumulative penalty. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, pages 477-485, Suntec, Singapore, 2009. [22] J. Yu, S.V.N. Vishwanathan, S. Gunter, and N. N. Schraudolph. A Quasi-Newton approach to nonsmooth convex optimization problems in machine learning, JMLR, 11:1-57, 2010. [23] G. Andrew and J. Gao. Scalable training of ℓ1-regularized log-linear models. In ICML 2007. [24] J.E. Dennis and J.J. More. A characterization of superlinear convergence and its application to QuasiNewton methods. Math. Comp., 28(126):549560, 1974. [25] K. Scheinberg and X. Tang. Practical Inexact Proximal Quasi-Newton Method with Global Complexity Analysis. COR@L Technical Report at Lehigh University. arXiv:1311.6547, 2013 [26] J. D. Lee, Y. Sun, and M. A. Saunders. Proximal Newton-type methods for minimizing composite functions. arXiv:1206.1623, 2012 [27] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Technical Report 649, Dept. Statistics, Univ. California, Berkeley. 2003 9
2014
278
5,378
Fast Multivariate Spatio-temporal Analysis via Low Rank Tensor Learning Mohammad Taha Bahadori∗ Dept. of Electrical Engineering Univ. of Southern California Los Angeles, CA 90089 mohammab@usc.edu Qi (Rose) Yu∗ Dept. of Computer Science Univ. of Southern California Los Angeles, CA 90089 qiyu@usc.edu Yan Liu Dept. of Computer Science Univ. of Southern California Los Angeles, CA 90089 yanliu.cs@usc.edu Abstract Accurate and efficient analysis of multivariate spatio-temporal data is critical in climatology, geology, and sociology applications. Existing models usually assume simple inter-dependence among variables, space, and time, and are computationally expensive. We propose a unified low rank tensor learning framework for multivariate spatio-temporal analysis, which can conveniently incorporate different properties in spatio-temporal data, such as spatial clustering and shared structure among variables. We demonstrate how the general framework can be applied to cokriging and forecasting tasks, and develop an efficient greedy algorithm to solve the resulting optimization problem with convergence guarantee. We conduct experiments on both synthetic datasets and real application datasets to demonstrate that our method is not only significantly faster than existing methods but also achieves lower estimation error. 1 Introduction Spatio-temporal data provide unique information regarding “where” and “when”, which is essential to answer many important questions in scientific studies from geology, climatology to sociology. In the context of big data, we are confronted with a series of new challenges when analyzing spatiotemporal data because of the complex spatial and temporal dependencies involved. A plethora of excellent work has been conducted to address the challenge and achieved successes to a certain extent [8, 13]. Often times, geostatistical models use cross variogram and cross covariance functions to describe the intrinsic dependency structure. However, the parametric form of cross variogram and cross covariance functions impose strong assumptions on the spatial and temporal correlation, which requires domain knowledge and manual work. Furthermore, parameter learning of those statistical models is computationally expensive, making them infeasible for large-scale applications. Cokriging and forecasting are two central tasks in multivariate spatio-temporal analysis. Cokriging utilizes the spatial correlations to predict the value of the variables for new locations. One widely adopted method is multitask Gaussian process (MTGP) [4], which assumes a Gaussian process prior over latent functions to directly induce correlations between tasks. However, for a cokriging task with M variables of P locations for T time stamps, the time complexity of MTGP is O(M 3P 3T) [4]. For forecasting, popular methods in multivariate time series analysis include vector autoregressive (VAR) models, autoregressive integrated moving average (ARIMA) models, and cointegration models. An alternative method for spatio-temporal analysis is Bayesian hierarchical spatio-temporal models with either separable and non-separable space-time covariance functions [6]. Rank reduced ∗Authors have equal contributions. 1 models have been proposed to capture the inter-dependency among variables [1]. However, very few models can directly handle the correlations among variables, space and time simultaneously in a scalable way. In this paper, we aim to address this problem by presenting a unified framework for many spatio-temporal analysis tasks that are scalable for large-scale applications. Tensor representation provides a convenient way to capture inter-dependencies along multiple dimensions. Therefore it is natural to represent the multivariate spatio-temporal data in tensor. Recent advances in low rank learning have led to simple models that can capture the commonalities among each mode of the tensor [15, 20]. Similar argument can be found in the literature of spatial data recovery [11], neuroimaging analysis [26], and multi-task learning [20]. Our work builds upon recent advances in low rank tensor learning [15, 11, 26] and further considers the scenario where additional side information of data is available. For example, in geo-spatial applications, apart from measurements of multiple variables, geographical information is available to infer location adjacency; in social network applications, friendship network structure is collected to obtain preference similarity. To utilize the side information, we can construct a Laplacian regularizer from the similarity matrices, which favors locally smooth solutions. We develop a fast greedy algorithm for learning low rank tensors based on the greedy structure learning framework [2, 24, 21]. Greedy low rank tensor learning is efficient, as it does not require full singular value decomposition of large matrices as opposed to other alternating direction methods [11]. We also provide a bound on the difference between the loss function at our greedy solution and the one at the globally optimal solution. Finally, we present experiment results on simulation datasets as well as application datasets in climate and social network analysis, which show that our algorithm is faster and achieves higher prediction accuracy than state-of-art approaches in cokriging and forecasting tasks. 2 Tensor formulation for multivariate spatio-temporal analysis The critical element in multivariate spatio-temporal analysis is an efficient way to incorporate the spatial temporal correlations into modeling and automatically capture the shared structures across variables, locations, and time. In this section, we present a unified low rank tensor learning framework that can perform various types of spatio-temporal analysis. We will use two important applications, i.e., cokriging and forecasting, to motivate and describe the framework. 2.1 Cokriging In geostatistics, cokriging is the task of interpolating the data of one variable for unknown locations by taking advantage of the observations of variables from known locations. For example, by making use of the correlations between precipitation and temperature, we can obtain more precise estimate of temperature in unknown locations than univariate kriging. Formally, denote the complete data for P locations over T time stamps with M variables as X ∈RP ×T ×M. We only observe the measurements for a subset of locations Ω⊂{1, . . . , P} and their side information such as longitude and latitude. Given the measurements XΩand the side information, the goal is to estimate a tensor W ∈RP ×T ×M that satisfies WΩ= XΩ. Here XΩrepresents the outcome of applying the index operator IΩto X:,:,m for all variables m = 1, . . . , M. The index operator IΩis a diagonal matrix whose entries are one for the locations included in Ωand zero otherwise. Two key consistency principles have been identified for effective cokriging [9, Chapter 6.2]: (1) Global consistency: the data on the same structure are likely to be similar. (2) Local consistency: the data in close locations are likely to be similar. The former principle is akin to the cluster assumption in semi-supervised learning [25]. We incorporate these principles in a concise and computationally efficient low-rank tensor learning framework. To achieve global consistency, we constrain the tensor W to be low rank. The low rank assumption is based on the belief that high correlations exist within variables, locations and time, which leads to natural clustering of the data. Existing literature have explored the low rank structure among these three dimensions separately, e.g., multi-task learning [19] for variable correlation, fixed rank kriging [7] for spatial correlations. Low rankness assumes that the observed data can be described with a few latent factors. It enforces the commonalities along three dimensions without an explicit form for the shared structures in each dimension. 2 For local consistency, we construct a regularizer via the spatial Laplacian matrix. The Laplacian matrix is defined as L = D −A, where A is a kernel matrix constructed by pairwise similarity and diagonal matrix Di,i = P j(Ai,j). Similar ideas have been explored in matrix completion [16]. In cokriging literature, the local consistency is enforced via the spatial covariance matrix. The Bayesian models often impose the Gaussian process prior on the observations with the covariance matrix K = Kv ⊗Kx where Kv is the covariance between variables and Kx is that for locations. The Laplacian regularization term corresponds to the relational Gaussian process [5] where the covariance matrix is approximated by the spatial Laplacian. In summary, we can perform cokriging and find the value of tensor W by solving the following optimization problem: c W = argmin W ( ∥WΩ−XΩ∥2 F + µ M X m=1 tr(W⊤ :,:,mLW:,:,m) ) s.t. rank(W) ≤ρ, (1) where the Frobenius norm of a tensor A is defined as ∥A∥F = qP i,j,k A2 i,j,k and µ, ρ > 0 are the parameters that make tradeoff between the local and global consistency, respectively. The low rank constraint finds the principal components of the tensor and reduces the complexity of the model while the Laplacian regularizer clusters the data using the relational information among the locations. By learning the right tradeoff between these two techniques, our method is able to benefit from both. Due to the various definitions of tensor rank, we use rank as supposition for rank complexity, which will be specified in later section. 2.2 Forecasting Forecasting estimates the future value of multivariate time series given historical observations. For ease of presentation, we use the classical VAR model with K lags and coefficient tensor W ∈RP ×KP ×M as an example. Using the matrix representation, the VAR(K) process defines the following data generation process: X:,t,m = W:,:,mXt,m + E:,t,m, for m = 1, . . . , M and t = K + 1, . . . , T, (2) where Xt,m = [X ⊤ :,t−1,m, . . . , X ⊤ :,t−K,m]⊤denotes the concatenation of K-lag historical data before time t. The noise tensor E is a multivariate Gaussian with zero mean and unit variance . Existing multivariate regression methods designed to capture the complex correlations, such as Tucker decomposition [20], are computationally expensive. A scalable solution requires a simpler model that also efficiently accounts for the shared structures in variables, space, and time. Similar global and local consistency principles still hold in forecasting. For global consistency, we can use low rank constraint to capture the commonalities of the variables as well as the spatial correlations on the model parameter tensor, as in [8]. For local consistency, we enforce the predicted value for close locations to be similar via spatial Laplacian regularization. Thus, we can formulate the forecasting task as the following optimization problem over the model coefficient tensor W: c W = argmin W ( ∥b X −X∥2 F + µ M X m=1 tr( b X ⊤ :,:,mL b X:,:,m) ) s.t. rank(W) ≤ρ, b X:,t,m = W:,:,mXt,m (3) Though cokriging and forecasting are two different tasks, we can easily see that both formulations follow the global and local consistency principles and can capture the inter-correlations from spatialtemporal data. 2.3 Unified Framework We now show that both cokriging and forecasting can be formulated into the same tensor learning framework. Let us rewrite the loss function in Eq. (1) and Eq. (3) in the form of multitask regression and complete the quadratic form for the loss function. The cokriging task can be reformulated as follows: c W = argmin W ( M X m=1 ∥W:,:,mH −(H⊤)−1XΩ,m∥2 F ) s.t. rank(W) ≤ρ (4) 3 where we define HH⊤= IΩ+ µL.1 For the forecasting problem, HH⊤= IP + µL and we have: c W = argmin W ( M X m=1 T X t=K+1 ∥HW:,:,mXt,m −(H−1)X:,t,m∥2 F ) s.t. rank(W) ≤ρ, (5) By slight change of notation (cf. Appendix D), we can easily see that the optimal solution of both problems can be obtained by the following optimization problem with appropriate choice of tensors Y and V: c W = argmin W ( M X m=1 ∥W:,:,mY:,:,m −V:,:,m∥2 F ) s.t. rank(W) ≤ρ. (6) After unifying the objective function, we note that tensor rank has different notions such as CP rank, Tucker rank and mode n-rank [15, 11]. In this paper, we choose the mode-n rank, which is computationally more tractable [11, 23]. The mode-n rank of a tensor W is the rank of its mode-n unfolding W(n).2 In particular, for a tensor W with N mode, we have the following definition: mode-n rank(W) = N X n=1 rank(W(n)). (7) A common practice to solve this formulation with mode n-rank constraint is to relax the rank constraint to a convex nuclear norm constraint [11, 23]. However, those methods are computationally expensive since they need full singular value decomposition of large matrices. In the next section, we present a fast greedy algorithm to tackle the problem. 3 Fast greedy low rank tensor learning To solve the non-convex problem in Eq. (6) and find its optimal solution, we propose a greedy learning algorithm by successively adding rank-1 estimation of the mode-n unfolding. The main idea of the algorithm is to unfold the tensor into a matrix, seek for its rank-1 approximation and then fold back into a tensor with same dimensionality. We describe this algorithm in three steps: (i) First, we show that we can learn rank-1 matrix estimations efficiently by solving a generalized eigenvalue problem, (ii) We use the rank-1 matrix estimation to greedily solve the original tensor rank constrained problem, and (iii) We propose an enhancement via orthogonal projections after each greedy step. Optimal rank-1 Matrix Learning The following lemma enables us to find such optimal rank-1 estimation of the matrices. Lemma 1. Consider the following rank constrained problem: bA1 = argmin A:rank(A)=1 n ∥Y −AX∥2 F o , (8) where Y ∈Rq×n, X ∈Rp×n, and A ∈Rq×p. The optimal solution of bA1 can be written as bA1 = bubv⊤, ∥bv∥2 = 1 where bv is the dominant eigenvector of the following generalized eigenvalue problem: (XY ⊤Y X⊤)v = λ(XX⊤)v (9) and bu can be computed as bu = 1 bv⊤XX⊤bvY X⊤bv. (10) Proof is deferred to Appendix A. Eq. (9) is a generalized eigenvalue problem whose dominant eigenvector can be found efficiently [12]. If XX⊤is full rank, as assumed in Theorem 2, the problem is simplified to a regular eigenvalue problem whose dominant eigenvector can be efficiently computed. 1We can use Cholesky decomposition to obtain H. In the rare cases that IΩ+ µL is not full rank, ϵIP is added where ϵ is a very small positive value. 2The mode-n unfolding of a tensor is the matrix resulting from treating n as the first mode of the matrix, and cyclically concatenating other modes. Tensor refolding is the reverse direction operation [15]. 4 Algorithm 1 Greedy Low-rank Tensor Learning 1: Input: transformed data Y, V of M variables, stopping criteria η 2: Output: N mode tensor W 3: Initialize W ←0 4: repeat 5: for n = 1 to N do 6: Bn ← argmin B: rank(B)=1 L(refold(W(n) + B); Y, V) 7: ∆n ←L(W; Y, V) −L(refold(W(n) + Bn); Y, V) 8: end for 9: n∗←argmax n {∆n} 10: if ∆n∗> η then 11: W ←W + refold(Bn∗, n∗) 12: end if 13: W ←argminrow(A(1))⊆row(W(1)) col(A(1))⊆col(W(1)) L(A; Y, V) # Optional Orthogonal Projection Step. 14: until ∆n∗< η Greedy Low n-rank Tensor Learning The optimal rank-1 matrix learning serves as a basic element in our greedy algorithm. Using Lemma 1, we can solve the problem in Eq. (6) in the Forward Greedy Selection framework as follows: at each iteration of the greedy algorithm, it searches for the mode that gives the largest decrease in the objective function. It does so by unfolding the tensor in that mode and finding the best rank-1 estimation of the unfolded tensor. After finding the optimal mode, it adds the rank-1 estimate in that mode to the current estimation of the tensor. Algorithm 1 shows the details of this approach, where L(W; Y, V) = PM m=1 ∥W:,:,mY:,:,m −V:,:,m∥2 F . Note that we can find the optimal rank-1 solution in only one of the modes, but it is enough to guarantee the convergence of our greedy algorithm. Theorem 2 bounds the difference between the loss function evaluated at each iteration of the greedy algorithm and the one at the globally optimal solution. Theorem 2. Suppose in Eq. (6) the matrices Y⊤ :,:,mY:,:,m for m = 1, . . . , M are positive definite. The solution of Algo. 1 at its kth iteration step satisfies the following inequality: L(Wk; Y, V) −L(W∗; Y, V) ≤ (∥Y∥2∥W∗ (1)∥∗)2 (k + 1) , (11) where W∗is the global minimizer of the problem in Eq. (6) and ∥Y∥2 is the largest singular value of a block diagonal matrix created by placing the matrices Y(:, :, m) on its diagonal blocks. The detailed proof is given in Appendix B. The key idea of the proof is that the amount of decrease in the loss function by each step in the selected mode is not smaller than the amount of decrease if we had selected the first mode. The theorem shows that we can obtain the same rate of convergence for learning low rank tensors as achieved in [22] for learning low rank matrices. The greedy algorithm in Algorithm 1 is also connected to mixture regularization in [23]: the mixture approach decomposes the solution into a set of low rank structures while the greedy algorithm successively learns a set of rank one components. Greedy Algorithm with Orthogonal Projections It is well-known that the forward greedy algorithm may make steps in sub-optimal directions because of noise. A common solution to alleviate the effect of noise is to make orthogonal projections after each greedy step [2, 21]. Thus, we enhance the forward greedy algorithm by projecting the solution into the space spanned by the singular vectors of its mode-1 unfolding. The greedy algorithm with orthogonal projections performs an extra step in line 13 of Algorithm 1: It finds the top k singular vectors of the solution: [U, S, V ] ←svd(W(1), k) where k is the iteration number. Then it finds the best solution in the space spanned by U and V by solving bS ←minS L(USV ⊤, Y, V) which has a closed form solution. Finally, it reconstructs the solution: W ←refold(U bSV ⊤, 1). Note that the projection only needs to find top k singular vectors which can be computed efficiently for small values of k. 5 0 50 100 150 200 250 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 # of Samples Parameter Estimation RMSE Forward Orthogonal ADMM Trace MTL−L1 MTL−L21 MTL−Dirty (a) RMSE 0 50 100 150 200 −5 0 5 10 15 20 # of Samples Mixture Rank Complexity Forward Orthogonal ADMM Trace (b) Rank 10 1 10 2 0 200 400 600 800 1000 1200 # of Variables Run Time (Sec) Forward Greedy Orthogonal Greedy ADMM (c) Scalability Figure 1: Tensor estimation performance comparison on the synthetic dataset over 10 random runs. (a) parameter Estimation RMSE with training time series length, (b) Mixture Rank Complexity with training time series length, (c) running time for one single round with respect to number of variables. 4 Experiments We evaluate the efficacy of our algorithms on synthetic datasets and real-world application datasets. 4.1 Low rank tensor learning on synthetic data For empirical evaluation, we compare our method with multitask learning (MTL) algorithms, which also utilize the commonalities between different prediction tasks for better performance. We use the following baselines: (1) Trace norm regularized MTL (Trace), which seeks the low rank structure only on the task dimension; (2) Multilinear MTL [20], which adapts the convex relaxation of low rank tensor learning solved with Alternating Direction Methods of Multiplier (ADMM) [10] and Tucker decomposition to describe the low rankness in multiple dimensions; (3) MTL-L1 , MTL-L21 [19], and MTL-LDirty [14], which investigate joint sparsity of the tasks with Lp norm regularization. For MTL-L1 , MTL-L21 [19] and MTL-LDirty, we use MALSAR Version 1.1 [27]. We construct a model coefficient tensor W of size 20 × 20 × 10 with CP rank equals to 1. Then, we generate the observations Y and V according to multivariate regression model V:,:,m = W:,:,mY:,:,m +E:,:,m for m = 1, . . . , M, where E is tensor with zero mean Gaussian noise elements. We split the synthesized data into training and testing time series and vary the length of the training time series from 10 to 200. For each training length setting, we repeat the experiments for 10 times and select the model parameters via 5-fold cross validation. We measure the prediction performance via two criteria: parameter estimation accuracy and rank complexity. For accuracy, we calculate the RMSE of the estimation versus the true model coefficient tensor. For rank complexity, we calculate the mixture rank complexity [23] as MRC = 1 n PN n=1 rank(W(n)). The results are shown in Figure 1(a) and 1(b). We omit the Tucker decomposition as the results are not comparable. We can clearly see that the proposed greedy algorithm with orthogonal projections achieves the most accurate tensor estimation. In terms of rank complexity, we make two observations: (i) Given that the tensor CP rank is 1, greedy algorithm with orthogonal projections produces the estimate with the lowest rank complexity. This can be attributed to the fact that the orthogonal projections eliminate the redundant rank-1 components that fall in the same spanned space. (ii) The rank complexity of the forward greedy algorithm increases as we enlarge the sample size. We believe that when there is a limited number of observations, most of the new rank-1 elements added to the estimate are not accurate and the cross-validation steps prevent them from being added to the model. However, as the sample size grows, the rank-1 estimates become more accurate and they are preserved during the cross-validation. To showcase the scalability of our algorithm, we vary the number of variables and generate a series of tensor W ∈R20×20×M for M from 10 to 100 and record the running time (in seconds) for three tensor learning algorithms, i.e, forward greedy, greedy with orthogonal projections and ADMM. We measure the run time on a machine with a 6-core 12-thread Intel Xenon 2.67GHz processor and 12GB memory. The results are shown in Figure 1(c). The running time of ADMM increase rapidly with the data size while the greedy algorithm stays steady, which confirms the speedup advantage of the greedy algorithm. 6 Table 1: Cokriging RMSE of 6 methods averaged over 10 runs. In each run, 10% of the locations are assumed missing. DATASET ADMM FORWARD ORTHOGONAL SIMPLE ORDINARY MTGP USHCN 0.8051 0.7594 0.7210 0.8760 0.7803 1.0007 CCDS 0.8292 0.5555 0.4532 0.7634 0.7312 1.0296 YELP 0.7730 0.6993 0.6958 NA NA NA FOURSQUARE 0.1373 0.1338 0.1334 NA NA NA 4.2 Spatio-temporal analysis on real world data We conduct cokriging and forecasting experiments on four real-world datasets: USHCN The U.S. Historical Climatology Network Monthly (USHCN)3 dataset consists of monthly climatological data of 108 stations spanning from year 1915 to 2000. It has three climate variables: (1) daily maximum, (2) minimum temperature averaged over month, and (3) total monthly precipitation. CCDS The Comprehensive Climate Dataset (CCDS)4 is a collection of climate records of North America from [18]. The dataset was collected and pre-processed by five federal agencies. It contains monthly observations of 17 variables such as Carbon dioxide and temperature spanning from 1990 to 2001. The observations were interpolated on a 2.5×2.5 degree grid, with 125 observation locations. Yelp The Yelp dataset5 contains the user rating records for 22 categories of businesses on Yelp over ten years. The processed dataset includes the rating values (1-5) binned into 500 time intervals and the corresponding social graph for 137 active users. The dataset is used for the spatio-temporal recommendation task to predict the missing user ratings across all business categories. Foursquare The Foursquare dataset [17] contains the users’ check-in records in Pittsburgh area from Feb 24 to May 23, 2012, categorized by different venue types such as Art & Entertainment, College & University, and Food. The dataset records the number of check-ins by 121 users in each of the 15 category of venues over 1200 time intervals, as well as their friendship network. 4.2.1 Cokriging We compare the cokriging performance of our proposed method with the classical cokriging approaches including simple kriging and ordinary cokriging with nonbias condition [13] which are applied to each variables separately. We further compare with multitask Gaussian process (MTGP) [4] which also considers the correlation among variables. We also adapt ADMM for solving the nuclear norm relaxed formulation of the cokriging formulation as a baseline (see Appendix C for more details). For USHCN and CCDS, we construct a Laplacian matrix by calculating the pairwise Haversine distance of locations. For Foursquare and Yelp, we construct the graph Laplacian from the user friendship network. For each dataset, we first normalize it by removing the trend and diving by the standard deviation. Then we randomly pick 10% of locations (or users for Foursquare) and eliminate the measurements of all variables over the whole time span. Then, we produce the estimates for all variables of each timestamp. We repeat the procedure for 10 times and report the average prediction RMSE for all timestamps and 10 random sets of missing locations. We use the MATLAB Kriging Toolbox6 for the classical cokriging algorithms and the MTGP code provided by [4]. Table 1 shows the results for the cokriging task. The greedy algorithm with orthogonal projections is significantly more accurate in all three datasets. The baseline cokriging methods can only handle the two dimensional longitude and latitude information, thus are not applicable to the Foursquare and Yelp dataset with additional friendship information. The superior performance of the greedy algorithm can be attributed to two of its properties: (1) It can obtain low rank models and achieve global consistency; (2) It usually has lower estimation bias compared to nuclear norm relaxed methods. 3http://www.ncdc.noaa.gov/oa/climate/research/ushcn 4http://www-bcf.usc.edu/˜liu32/data/NA-1990-2002-Monthly.csv 5http://www.yelp.com/dataset_challenge 6http://globec.whoi.edu/software/kriging/V3/english.html 7 Table 2: Forecasting RMSE for VAR process with 3 lags, trained with 90% of the time series. DATASET TUCKER ADMM FORWARD ORTHO ORTHONL TRACE MTLl1 MTLl21 MTLdirty USHCN 0.8975 0.9227 0.9171 0.9069 0.9175 0.9273 0.9528 0.9543 0.9735 CCDS 0.9438 0.8448 0.8810 0.8325 0.8555 0.8632 0.9105 0.9171 1.0950 FSQ 0.1492 0.1407 0.1241 0.1223 0.1234 0.1245 0.1495 0.1495 0.1504 Table 3: Running time (in seconds) for cokriging and forecasting. COKRIGING FORECASTING DATASET USHCN CCDS YELP FSQ USHCN CCDS FSQ ORTHO 93.03 16.98 78.47 91.51 75.47 21.38 37.70 ADMM 791.25 320.77 2928.37 720.40 235.73 45.62 33.83 4.2.2 Forecasting We present the empirical evaluation on the forecasting task by comparing with multitask regression algorithms. We split the data along the temporal dimension into 90% training set and 10% testing set. We choose VAR(3) model and during the training phase, we use 5-fold cross-validation. As shown in Table 2, the greedy algorithm with orthogonal projections again achieves the best prediction accuracy. Different from the cokriging task, forecasting does not necessarily need the correlations of locations for prediction. One might raise the question as to whether the Laplacian regularizer helps. Therefore, we report the results for our formulation without Laplacian (ORTHONL) for comparison. For efficiency, we report the running time (in seconds) in Table 3 for both tasks of cokriging and forecasting. Compared with ADMM, which is a competitive baseline also capturing the commonalities among variables, space, and time, our greedy algorithm is much faster for most datasets. Figure 2: Map of most predictive regions analyzed by the greedy algorithm using 17 variables of the CCDS dataset. Red color means high predictiveness whereas blue denotes low predictiveness. As a qualitative study, we plot the map of most predictive regions analyzed by the greedy algorithm using CCDS dataset in Fig. 2. Based on the concept of how informative the past values of the climate measurements in a specific location are in predicting future values of other time series, we define the aggregate strength of predictiveness of each region as w(t) = PP p=1 PM m=1 |Wp,t,m|. We can see that two regions are identified as the most predictive regions: (1) The southwest region, which reflects the impact of the Pacific ocean and (2) The southeast region, which frequently experiences relative sea level rise, hurricanes, and storm surge in Gulf of Mexico. Another interesting region lies in the center of Colorado, where the Rocky mountain valleys act as a funnel for the winds from the west, providing locally divergent wind patterns. 5 Conclusion In this paper, we study the problem of multivariate spatio-temporal data analysis with an emphasis on two tasks: cokriging and forecasting. We formulate the problem into a general low rank tensor learning framework which captures both the global consistency and the local consistency principle. We develop a fast and accurate greedy solver with theoretical guarantees for its convergence. We validate the correctness and efficiency of our proposed method on both the synthetic dataset and realapplication datasets. For future work, we are interested in investigating different forms of shared structure and extending the framework to capture non-linear correlations in the data. Acknowledgment We thank the anonymous reviewers for their helpful feedback and comments. The research was sponsored by the NSF research grants IIS-1134990, IIS- 1254206 and Okawa Foundation Research Award. 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. 8 References [1] T. Anderson. Estimating linear restrictions on regression coefficients for multivariate normal distributions. The Annals of Mathematical Statistics, pages 327–351, 1951. [2] A. Barron, A. Cohen, W. Dahmen, and R. DeVore. Approximation and learning by greedy algorithms. The Annals of Statistics, 2008. [3] D. Bertsekas and J. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice Hall Inc, 1989. [4] E. Bonilla, K. Chai, and C. Williams. Multi-task Gaussian Process Prediction. In NIPS, 2007. [5] W. Chu, V. Sindhwani, Z. Ghahramani, and S. Keerthi. Relational learning with Gaussian processes. In NIPS, 2006. [6] N. Cressie and H. Huang. Classes of nonseparable, spatio-temporal stationary covariance functions. JASA, 1999. [7] N. Cressie and G. Johannesson. Fixed rank kriging for very large spatial data sets. JRSS B (Statistical Methodology), 70(1):209–226, 2008. [8] N. Cressie, T. Shi, and E. Kang. Fixed rank filtering for spatio-temporal data. J. Comp. Graph. Stat., 2010. [9] N. Cressie and C. Wikle. Statistics for spatio-temporal data. John Wiley & Sons, 2011. [10] D. Gabay and B. Mercier. A dual algorithm for the solution of nonlinear variational problems via finite element approximation. Computers & Mathematics with Applications, 2(1):17–40, 1976. [11] S. Gandy, B. Recht, and I. Yamada. Tensor completion and low-n-rank tensor recovery via convex optimization. Inverse Problems, 2011. [12] M. Gu, A. Ruhe, G. Sleijpen, H. van der Vorst, Z. Bai, and R. Li. 5. Generalized Hermitian Eigenvalue Problems. Society for Industrial and Applied Mathematics, 2000. [13] E. Isaaks and R. Srivastava. Applied geostatistics. London: Oxford University, 2011. [14] A. Jalali, S. Sanghavi, C. Ruan, and P. Ravikumar. A dirty model for multi-task learning. In NIPS, 2010. [15] T. Kolda and B. Bader. Tensor decompositions and applications. SIAM review, 2009. [16] W.-J. Li and D.-Y. Yeung. Relation regularized matrix factorization. In IJCAI, 2009. [17] X. Long, L. Jin, and J. Joshi. Exploring trajectory-driven local geographic topics in foursquare. In UbiComp, 2012. [18] A. Lozano, H. Li, A. Niculescu-Mizil, Y. Liu, C. Perlich, J. Hosking, and N. Abe. Spatialtemporal causal modeling for climate change attribution. In KDD, 2009. [19] F. Nie, H. Huang, X. Cai, and C. H. Ding. Efficient and robust feature selection via joint ℓ2,1-norms minimization. In NIPS, 2010. [20] B. Romera-Paredes, H. Aung, N. Bianchi-Berthouze, and M. Pontil. Multilinear multitask learning. In ICML, 2013. [21] S. Shalev-Shwartz, A. Gonen, and O. Shamir. Large-scale convex minimization with a lowrank constraint. In ICML, 2011. [22] S. Shalev-Shwartz, N. Srebro, and T. Zhang. Trading Accuracy for Sparsity in Optimization Problems with Sparsity Constraints. SIAM Journal on Optimization, 2010. [23] R. Tomioka, K. Hayashi, and H. Kashima. Convex Tensor Decomposition via Structured Schatten Norm Regularization. NIPS, 2013. [24] T. Zhang. Adaptive Forward-Backward Greedy Algorithm for Learning Sparse Representations. IEEE Trans Inf Theory, pages 4689–4708, 2011. [25] D. Zhou, O. Bousquet, T. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency. In NIPS, 2003. [26] H. Zhou, L. Li, and H. Zhu. Tensor regression with applications in neuroimaging data analysis. JASA, 2013. [27] J. Zhou, J. Chen, and J. Ye. MALSAR: Multi-tAsk Learning via StructurAl Regularization. http://www.public.asu.edu/˜jye02/Software/MALSAR/, 2011. 9
2014
279
5,379
Multi-View Perceptron: a Deep Model for Learning Face Identity and View Representations Zhenyao Zhu1,3 Ping Luo3,1 Xiaogang Wang2,3 Xiaoou Tang1,3 1Department of Information Engineering, The Chinese University of Hong Kong 2Department of Electronic Engineering, The Chinese University of Hong Kong 3Shenzhen Key Lab of CVPR, Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Shenzhen, China {zz012,lp011}@ie.cuhk.edu.hk xgwang@ee.cuhk.edu.hk xtang@ie.cuhk.edu.hk Abstract Various factors, such as identity, view, and illumination, are coupled in face images. Disentangling the identity and view representations is a major challenge in face recognition. Existing face recognition systems either use handcrafted features or learn features discriminatively to improve recognition accuracy. This is different from the behavior of primate brain. Recent studies [5, 19] discovered that primate brain has a face-processing network, where view and identity are processed by different neurons. Taking into account this instinct, this paper proposes a novel deep neural net, named multi-view perceptron (MVP), which can untangle the identity and view features, and in the meanwhile infer a full spectrum of multi-view images, given a single 2D face image. The identity features of MVP achieve superior performance on the MultiPIE dataset. MVP is also capable to interpolate and predict images under viewpoints that are unobserved in the training data. 1 Introduction The performance of face recognition systems depends heavily on facial representation, which is naturally coupled with many types of face variations, such as view, illumination, and expression. As face images are often observed in different views, a major challenge is to untangle the face identity and view representations. Substantial efforts have been dedicated to extract identity features by hand, such as LBP [1], Gabor [14], and SIFT [15]. The best practise of face recognition extracts the above features on the landmarks of face images with multiple scales and concatenates them into high dimensional feature vectors [4, 21]. Deep learning methods, such as Boltzmann machine [9], sum product network [17], and deep neural net [16, 25, 22, 23, 24, 26] have been applied to face recognition. For instance, Sun et al. [25, 22] employed deep neural net to learn identity features from raw pixels by predicting 10, 000 identities. Deep neural net is inspired by the understanding of hierarchical cortex in the primate brain and mimicking some aspects of its activities. Recent studies [5, 19] discovered that macaque monkeys have a face-processing network that was made of six interconnected face-selective regions, where neurons in some of these regions were view-specific, while some others were tuned to identity across views, making face recognition in brain of primate robust to view variation. This intriguing function of primate brain inspires us to develop a novel deep neural net, called multi-view perceptron (MVP), which can disentangle identity and view representations, and also reconstruct images under multiple views. Specifically, given a single face image of an identity under an arbitrary view, it can generate a sequence of output face images of the same identity, one at a time, under a full spectrum of viewpoints. Examples of the input images and the generated multi-view outputs of two identities are illustrated in Fig. 1. The images in the last two rows are from the same person. The extracted features of MVP with respect to identity and view are plotted correspondingly in blue and orange. 1 Figure 1: The inputs (first column) and the multi-view outputs (remaining columns) of two identities. The first input is from one identity and the last two inputs are from the other. Each reconstructed multi-view image (left) has its ground truth (right) for comparison. The extracted identity features of the inputs (the second column), and the view features of both the inputs and outputs are plotted in blue and orange, respectively. The identity features of the same identity are similar, even though the inputs are captured in diverse views, while the view features of the same viewpoint are similar, although they are from different identities. The two persons look similar in the frontal view, but can be better distinguished in other views. We can observe that the identity features of the same identity are similar, even though the inputs are captured in very different views, whilst the view features of images in the same view are similar, although they are across different identities. Unlike other deep networks that produce a deterministic output from an input, MVP employs the deterministic hidden neurons to learn the identity features, whilst using the random hidden neurons to capture the view representation. By sampling distinct values of the random neurons, output images in distinct views are generated. Moreover, to yield images of different viewpoints, we add regularization that images under similar viewpoints should have similar view representations on the random neurons. The two types of neurons are modeled in a probabilistic way. In the training stage, the parameters of MVP are updated by back-propagation, where the gradient is calculated by maximizing a variational lower bound of the complete data log-likelihood. With our proposed learning algorithm, the EM updates on the probabilistic model are converted to forward and backward propagation. In the testing stage, given an input image, MVP can extract its identity and view features. In addition, if an order of viewpoints is also provided, MVP can sequentially reconstruct multiple views of the input image by following this order. This paper has several key contributions. (i) We propose a multi-view perceptron (MVP) and its learning algorithm to factorize the identity and view representations with different sets of neurons, making the learned features more discriminative and robust. (ii) MVP can reconstruct a full spectrum of views given a single 2D image. The full spectrum of views can better distinguish identities, since different identities may look similar in a particular view but differently in others as illustrated in Fig. 1. (iii) MVP can interpolate and predict images under viewpoints that are unobserved in the training data, in some sense imitating the reasoning ability of human. Related Works. In the literature of computer vision, existing methods that deal with view (pose) variation can be divided into 2D- and 3D-based methods. For example, the 2D methods, such as [6], infer the deformation (e.g. thin plate splines) between 2D images across poses. The 3D methods, such as [2, 12], capture 3D face models in different parametric forms. The above methods have their inherent shortages. Extra cost and resources are necessitated to capture and process 3D data. Because of lacking one degree of freedom, inferring 3D deformation from 2D transformation is often ill-posed. More importantly, none of the existing approaches simulates how the primate brain encodes view representations. In our approach, instead of employing any geometric models, view information is encoded with a small number of neurons, which can recover the full spectrum of views together with identity neurons. This representation of encoding identity and view information into different neurons is closer to the face-processing system in the primate brain and new to the deep learning literature. Our previous work [28] learned identity features by using CNN to recover a single frontal view face image, which is a special case of MVP after removing the random neurons. [28] did not learn the view representation as we do. Experimental results show that our approach not only provides rich multi-view representation but also learns better identity features compared with 2 [28]. Fig. 1 shows examples that different persons may look similar in the front view, but are better distinguished in other views. Thus it improves the performance of face recognition significantly. More recently, Reed et al. [20] untangled factors of image variation by using a high-order Boltzmann machine, where all the neurons are stochastic and it is solved by gibbs sampling. MVP contains both stochastic and deterministic neurons and thus can be efficiently solved by back-propagation. 2 Multi-View Perceptron Figure 2: Network structure of MVP, which has six layers, including three layers with only the deterministic neurons (i.e. the layers parameterized by the weights of U0, U1, U4), and three layers with both the deterministic and random neurons (i.e. the weights of U2, V2, W2, U3, V3, U5, W5). This structure is used throughout the experiments. The training data is a set of image pairs, I = {xij, (yik, vik)}N,M,M i=1,j=1,k=1, where xij is the input image of the ith identity under the j-th view, yik denotes the output image of the same identity in the k-th view, and vik is the view label of the output. vik is a M dimensional binary vector, with the k-th element as 1 and the remaining zeros. MVP is learned from the training data such that given an input x, it can output images y of the same identity in different views and their view labels v. Then, the output v and y are generated as1, v = F(y, hv; Θ), y = F(x, hid, hv, hr; Θ) + ϵ, (1) where F is a non-linear function and Θ is a set of weights and biases to be learned. There are three types of hidden neurons, hid, hv, and hr, which respectively extract identity features, view features, and the features to reconstruct the output face image. ϵ signifies a noise variable. Fig. 2 shows the architecture2 of MVP, which is a directed graphical model with six layers, where the nodes with and without filling represent the observed and hidden variables, and the nodes in green and blue indicate the deterministic and random neurons, respectively. The generation process of y and v starts from x, flows through the neurons that extract identity feature hid, which combines with the hidden view representation hv to yield the feature hr for face recovery. Then, hr generates y. Meanwhile, both hv and y are united to generate v. hid and hr are the deterministic binary hidden neurons, while hv are random binary hidden neurons sampled from a distribution q(hv). Different sampled hv generates different y, making the perception of multi-view possible. hv usually has a low dimensionality, approximately ten, as ten binary neurons can ideally model 210 distinct views. For clarity of derivation, we take an example of MVP that contains only one hidden layer of hid and hv. More layers can be added and derived in a similar fashion. We consider a joint distribution, which marginalizes out the random hidden neurons, p(y, v |hid; Θ) = X hv p(y, v, hv|hid; Θ) = X hv p(v |y, hv; Θ)p(y|hid, hv; Θ)p(hv), (2) where Θ = {U0, U1, V1, U2, V2}, the identity feature is extracted from the input image, hid = f(U0x), and f is the sigmoid activation function, f(x) = 1/(1 + exp(−x)). Other activation functions, such as rectified linear function [18] and tangent [11], can be used as well. To model continuous values of the output, we assume y follows a conditional diagonal Gaussian distribution, p(y|hid, hv; Θ) = N(y|U1hid + V1hv, σ2 y). The probability of y belonging to the j-th view is modeled with the softmax function, p(vj = 1|y, hv; Θ) = exp(U2 j∗y+V2 j∗hv) PK k=1 exp(U2 k∗y+V2 k∗hv), where Uj∗ indicates the j-th row of the matrix. 1The subscripts i, j, k are omitted for clearness. 2For clarity, the biases are omitted. 3 2.1 Learning Procedure The weights and biases of MVP are learned by maximizing the data log-likelihood. The lower bound of the log-likelihood can be written as, log p(y, v |hid; Θ) = log X hv p(y, v, hv|hid; Θ) ≥ X hv q(hv) log p(y, v, hv|hid; Θ) q(hv) . (3) Eq.(3) is attained by decomposing the log-likelihood into two terms, log p(y, v |hid; Θ) = −P hv q(hv) log p(hv|y,v;Θ) q(hv) + P hv q(hv) log p(y,v,hv|hid;Θ) q(hv) , which can be easily verified by substituting the product, p(y, v, hv|hid) = p(y, v |hid)p(hv|y, v), into the right hand side of the decomposition. In particular, the first term is the KL-divergence [10] between the true posterior and the distribution q(hv). As KL-divergence is non-negative, the second term is regarded as the variational lower bound on the log-likelihood. The above lower bound can be maximized by using the Monte Carlo Expectation Maximization (MCEM) algorithm recently introduced by [27], which approximates the true posterior by using the importance sampling with the conditional prior as the proposal distribution. With the Bayes’ rule, the true posterior of MVP is p(hv|y, v) = p(y,v |hv)p(hv) p(y,v) , where p(y, v |hv) represents the multi-view perception error, p(hv) is the prior distribution over hv, and p(y, v) is a normalization constant. Since we do not assume any prior information on the view distribution, p(hv) is chosen as a uniform distribution between zero and one. To estimate the true posterior, we let q(hv) = p(hv|y, v; Θold). It is approximated by sampling hv from the uniform distribution, i.e. hv ∼U(0, 1), weighted by the importance weight p(y, v |hv; Θold). With the EM algorithm, the lower bound of the log-likelihood turns into L(Θ, Θold) = X hv p(hv|y, v; Θold) log p(y, v, hv|hid; Θ) ≃1 S S X s=1 ws log p(y, v, hv s|hid; Θ), (4) where ws = p(y, v |hv; Θold) is the importance weight. The E-step samples the random hidden neurons, i.e. hv s ∼U(0, 1), while the M-step calculates the gradient, ∂L ∂Θ ≃1 S S X s=1 ∂L(Θ, Θold) ∂Θ = 1 S S X s=1 ws ∂ ∂Θ{log p(v |y, hv s) + log p(y|hid, hv s)}, (5) where the gradient is computed by averaging over all the gradients with respect to the importance samples. The two steps have to be iterated. When more samples are needed to estimate the posterior, the space complexity will increase significantly, because we need to store a batch of data, the proposed samples, and their corresponding outputs at each layer of the deep network. When implementing the algorithm with GPU, one needs to make a tradeoff between the size of the data and the accurateness of the approximation, if the GPU memory is not sufficient for large scale training data. Our empirical study (Sec. 3.1) shows that the M-step of MVP can be computed by using only one sample, because the uniform prior typically leads to sparse weights during training. Therefore, the EM process develops into the conventional back-propagation. In the forward pass, we sample a number of hv s based on the current parameters Θ, such that only the sample with the largest weight need to be stored. We demonstrate in the experiment (Sec. 3.1) that a small number of times (e.g. < 20) are sufficient to find good proposal. In the backward pass, we seek to update the parameters by the gradient, ∂L(Θ) ∂Θ ≃∂ ∂Θ  ws log p(v |y, hv s) + log p(y|hid, hv s)  , (6) where hv s is the sample that has the largest weight ws. We need to optimize the following two terms, log p(y|hid, hv s) = −log σy −∥by−(U1hid+V1hv s)∥2 2 2σ2y and log p(v |y, hv s) = P j bvj log( exp(U2 j∗y+V2 j∗hv s) PK k=1 exp(U2 k∗y+V2 k∗hv s)), where by and bv are the ground truth. 4 • Continuous View In the previous discussion, v is assumed to be a binary vector. Note that v can also be modeled as a continuous variable with a Gaussian distribution, p(v |y, hv) = N(v |U2y + V2hv, σv), (7) where v is a scalar corresponding to different views from −90◦to +90◦. In this case, we can generate views not presented in the training data by interpolating v, as shown in Fig. 6. • Difference with multi-task learning Our model, which only has a single task, is also different from multi-task learning (MTL), where reconstruction of each view could be treated as a different task, although MTL has not been used for multi-view reconstruction in literature to the best of our knowledge. In MTL, the number of views to be reconstructed is predefined, equivalent to the number of tasks, and it encounters problems when the training data of different views are unbalanced; while our approach can sample views continuously and generate views not presented in the training data by interpolating v as described above. Moreover, the model complexity of MTL increases as the number of views and its training is more difficult since different tasks may have difference convergence rates. 2.2 Testing Procedure Given the view label v, and the input x, we generate the face image y under the viewpoint of v in the testing stage. A set of hv are first sampled, {hv s}S s=1 ∼U(0, 1), which corresponds to a set of outputs {ys}S s=1. For example, in a simple network with only one hidden layer, ys = U1hid+V1hv s and hid = f(U0x). Then, the desired face image in view v is the output ys that produces the largest probability of p(v |ys, hv s). A full spectrum of multi-view images are reconstructed for all the possible view labels v. 2.3 View Estimation Our model can also be used to estimate viewpoint of the input image x. First, given all possible values of viewpoint v, we can generate a set of corresponding output images {yz}, where z indicates the index of the values of view we generated (or interpolated). Then, to estimate viewpoint, we assign the view label of the z-th output yz to x, such that yz is the most similar image to x. The above procedure is formulated as below. If v is discrete, the problem is, arg minj,z ∥p(vj = 1|x, hv z) −p(vj = 1|yz, hv z) ∥2 2 = arg minj,z ∥ exp(U2 j∗x+V2 j∗hv z) PK k=1 exp(U2 k∗x+V2 k∗hvz) − exp(U2 j∗yz+V2 j∗hv z) PK k=1 exp(U2 k∗yz+V2 k∗hvz) ∥2 2. If v is continuous, the problem is defined as, arg minz ∥(U2x + V2hv z) −(U2yz + V2hv z) ∥2 2 = arg minz ∥x −yz ∥2 2. 3 Experiments Several experiments are designed for evaluation and comparison3. In Sec. 3.1, MVP is evaluated on a large face recognition dataset to demonstrate the effectiveness of the identity representation. Sec. 3.2 presents a quantitative evaluation, showing that the reconstructed face images are in good quality and the multi-view spectrum has retained discriminative information for face recognition. Sec. 3.3 shows that MVP can be used for view estimation and achieves comparable result as the discriminative methods specially designed for this task. An interesting experiment in Sec. 3.4 shows that by modeling the view as a continuous variable, MVP can analyze and reconstruct views not seen in the training data. 3.1 Multi-View Face Recognition MVP on multi-view face recognition is evaluated on the MultiPIE dataset [7], which contains 754, 204 images of 337 identities. Each identity was captured under 15 viewpoints from −90◦ to +90◦and 20 different illuminations. It is the largest and most challenging dataset for evaluating face recognition under view and lighting variations. We conduct the following three experiments to demonstrate the effectiveness of MVP. 3http://mmlab.ie.cuhk.edu.hk/projects/MVP.htm. For more technical details of this work, please contact the corresponding author Ping Luo (pluo.lhi@gmail.com). 5 • Face recognition across views This setting follows the existing methods, e.g. [2, 12, 28], which employs the same subset of MultiPIE that covers images from −45◦to +45◦and with neutral illumination. The first 200 identities are used for training and the remaining 137 identities for test. In the testing stage, the gallery is constructed by choosing one canonical view image (0◦) from each testing identity. The remaining images of the testing identities from −45◦to +45◦are selected as probes. The number of neurons in MVP can be expressed as 32 × 32 −512 −512(10) −512(10) − 1024−32×32[7], where the input and output images have the size of 32×32, [7] denotes the length of the view label vector (v), and (10) represents that the third and forth layers have ten random neurons. We examine the performance of using the identity features, i.e. hid 2 (denoted as MVPhid 2 ), and compare it with seven state-of-the-art methods in Table 1. The first three methods are based on 3D face models and the remaining ones are 2D feature extraction methods, including deep models, such as FIP [28] and RL [28], which employed the traditional convolutional network to recover the frontal view face image. As the existing methods did, LDA is applied to all the 2D methods to reduce the features’ dimension. The first and the second best results are highlighted for each viewpoint, as shown in Table 1. The two deep models (MVP and RL) outperform all the existing methods, including the 3D face models. RL achieves the best results on three viewpoints, whilst MVP is the best on four viewpoints. The extracted feature dimensions of MVP and RL are 512 and 9216, respectively. In summary, MVP obtains comparable averaged accuracy as RL under this setting, while the learned feature representation is more compact. Table 1: Face recognition accuracies across views. The first and the second best performances are in bold. Avg. −15◦ +15◦ −30◦ +30◦ −45◦ +45◦ VAAM [2] 86.9 95.7 95.7 89.5 91.0 74.1 74.8 FA-EGFC [12] 92.7 99.3 99.0 92.9 95.0 84.7 85.2 SA-EGFC [12] 97.2 99.7 99.7 98.3 98.7 93.0 93.6 LE [3]+LDA 93.2 99.9 99.7 95.5 95.5 86.9 81.8 CRBM [9]+LDA 87.6 94.9 96.4 88.3 90.5 80.3 75.2 FIP [28]+LDA 95.6 100.0 98.5 96.4 95.6 93.4 89.8 RL [28]+LDA 98.3 100.0 99.3 98.5 98.5 95.6 97.8 MVPhid 2 +LDA 98.1 100.0 100.0 100.0 99.3 93.4 95.6 Table 2: Face recognition accuracies across views and illuminations. The first and the second best performances are in bold. Avg. 0◦ −15◦+15◦−30◦+30◦−45◦+45◦−60◦+60◦ Raw Pixels+LDA 36.7 81.3 59.2 58.3 35.5 37.3 21.0 19.7 12.8 7.63 LBP [1]+LDA 50.2 89.1 77.4 79.1 56.8 55.9 35.2 29.7 16.2 14.6 Landmark LBP [4]+LDA 63.2 94.9 83.9 82.9 71.4 68.2 52.8 48.3 35.5 32.1 CNN+LDA 58.1 64.6 66.2 62.8 60.7 63.6 56.4 57.9 46.4 44.2 FIP [28]+LDA 72.9 94.3 91.4 90.0 78.9 82.5 66.1 62.0 49.3 42.5 RL [28]+LDA 70.8 94.3 90.5 89.8 77.5 80.0 63.6 59.5 44.6 38.9 MTL+RL+LDA 74.8 93.8 91.7 89.6 80.1 83.3 70.4 63.8 51.5 50.2 MVPhid 1 +LDA 61.5 92.5 85.4 84.9 64.3 67.0 51.6 45.4 35.1 28.3 MVPhid 2 +LDA 79.3 95.7 93.3 92.2 83.4 83.9 75.2 70.6 60.2 60.0 MVPhr 3 +LDA 72.6 91.0 86.7 84.1 74.6 74.2 68.5 63.8 55.7 56.0 MVPhr 4 +LDA 62.3 83.4 77.3 73.1 62.0 63.9 57.3 53.2 44.4 46.9 • Face recognition across views and illuminations To examine the robustness of different feature representations under more challenging conditions, we extend the first setting by employing a larger subset of MultiPIE, which contains images from −60◦to +60◦and 20 illuminations. Other experimental settings are the same as the above. In Table 2, feature representations of different layers in MVP are compared with seven existing features, including raw pixels, LBP [1] on image grid, LBP on facial landmarks [4], CNN features, FIP [28], RL [28], and MTL+RL. LDA is applied to all the feature representations. Note that the last four methods are built on the convolutional neural networks. The only distinction is that they adopted different objective functions to learn features. Specifically, CNN uses cross-entropy loss to classify face identity as in [26]. FIP and RL utilized least-square loss to recover the frontal view image. MTL+RL is an extension of RL. It employs multiple tasks, each of which is formulated as a least square loss, to recover multi-view images, and all the tasks share feature layers. To achieve fair comparisons, CNN, FIP, and MTL+RL adopt the same convolutional structure as RL [28], since RL achieves competitive results in our first experiment. 6 The first and second best results are emphasized in bold in Table 2. The identity feature hid 2 of MVP outperforms all the other methods on all the views with large margins. MTL+RL achieves the second best results except on ±60◦. These results demonstrate the superior of modeling multiview perception. For the features at different layers of MVP, the performance can be summarized as hid 2 > hr 3 > hid 1 > hr 4, which conforms our expectation. hid 2 performs the best because it is the highest level of identity features. hid 2 performs better than hid 1 because pose factors coupled in the input image x have be further removed, after one more forward mapping from hid 1 to hid 2 . hid 2 also outperforms hr 3 and hr 4, because some randomly generated view factors (hv 2 and hv 3) have been incorporated into these two layers during the construction of the full view spectrum. Please refer to Fig. 2 for a better understanding. • Effectiveness of the BP Procedure Figure 3: Analysis of MVP on the MultiPIE dataset. (a) Comparison of convergence, using different number of samples to estimate the true posterior. (b) Comparison of sparsity of the samples’ weights. (c) Comparison of convergence, using the largest weighted sample and using the weighted average over all the samples to compute gradient. Fig. 3 (a) compares the convergence rates during training, when using different number of samples to estimate the true posterior. We observe that a few number of samples, such as twenty, can lead to reasonably good convergence. Fig. 3 (b) empirically shows that uniform prior leads to sparse weights during training. In other words, if we seek to calculate the gradient of BP using only one sample, as did in Eq.(6). Fig. 3 (b) demonstrates that 20 samples are sufficient, since only 6 percent of the samples’ weights approximate one (all the others are zeros). Furthermore, as shown in Fig. 3 (c), the convergence rates of the one-sample gradient and the weighted summation are comparable. 3.2 Reconstruction Quality Figure 4: Face recognition accuracies. LDA is applied to the raw pixels of the original images and the reconstructed images. Another experiment is designed to quantitatively evaluate the multiview reconstruction result. The setting is the same as the first experiment in Sec. 3.1. The gallery images are all in the frontal view (0◦). Differently, LDA is applied to the raw pixels of the original images (OI) and the reconstructed images (RI) under the same view, respectively. Fig. 4 plots the accuracies of face recognition with respect to distinct viewpoints. Not surprisingly, under the viewpoints of +30◦and −45◦the accuracies of RI are decreased compared to OI. Nevertheless, this decrease is comparatively small (< 5%). It implies that the reconstructed images are in reasonably good quality. We notice that the reconstructed images in Fig. 1 lose some detailed textures, while well preserving the shapes of profile and the facial components. 3.3 Viewpoint Estimation 0 2 4 6 8 10 12 0° +15° −15° +30° −30° +45° −45° Viewpoint Error of view estimation (in degree) LR SVR MVP Figure 5: Errors of view estimation. This experiment is conducted to evaluate the performance of viewpoint estimation. MVP is compared to Linear Regression (LR) and Support Vector Regression (SVR), both of which have been used in viewpoint estimation, e.g. [8, 13]. Similarly, we employ the first setting as introduced in Sec. 3.1, implying that we train the models using images of a set of identities, and then estimate poses of the images of the remaining identities. For training LR and SVR, the features are obtained by applying PCA on the raw image pixels. Fig. 5 reports the view estimation errors, which are measured by the differences between the pose degrees 7 Figure 6: We adopt the images in 0◦, 30◦, and 60◦for training, and test whether MVP can analyze and reconstruct images under 15◦and 45◦. The reconstructed images (left) and the ground truths (right) are shown in (a). (b) visualizes the full spectrum of the reconstructed images, when the images in unobserved views are used as inputs (first column). of ground truth and the predicted degrees. The averaged errors of MVP, LR, and SVR are 5.03◦, 9.79◦, and 5.45◦, respectively. MVP achieves slightly better results compared to the discriminative model, i.e. SVR, demonstrating that it is also capable for view estimation, even though it is not designated for this task. 3.4 Viewpoint Interpolation When the viewpoint is modeled as a continuous variable as described in Sec. 2.1, MVP implicitly captures a 3D face model, such that it can analyze and reconstruct images under viewpoints that have not been seen before, while this cannot be achieved with MTL. In order to verify such capability, we conduct two tests. First, we adopt the images from MultiPIE in 0◦, 30◦, and 60◦for training, and test whether MVP can generate images under 15◦and 45◦. For each testing identity, the result is obtained by using the image in 0◦as input and reconstructing images in 15◦and 45◦. Several synthesized images (left) compared with the ground truth (right) are visualized in Fig. 6 (a). Although the interpolated images have noise and blurring effect, they have similar views as the ground truth and more importantly, the identity information is preserved. Second, under the same training setting as above, we further examine, when the images of the testing identities in 15◦and 45◦are employed as inputs, whether MVP can still generate a full spectrum of multi-view images and preserve identity information in the meanwhile. The results are illustrated in Fig. 6 (b), where the first image is the input and the remaining are the reconstructed images in 0◦, 30◦, and 60◦. These two experiments show that MVP essentially models a continuous space of multi-view images such that first, it can predict images in unobserved views, and second, given an image under an unseen viewpoint, it can correctly extract identity information and then produce a full spectrum of multi-view images. In some sense, it performs multi-view reasoning, which is an intriguing function of human brain. 4 Conclusions In this paper, we have presented a generative deep network, called Multi-View Perceptron (MVP), to mimic the ability of multi-view perception in primate brain. MVP can disentangle the identity and view representations from an input image, and also can generate a full spectrum of views of the input image. Experiments demonstrated that the identity features of MVP achieve better performance on face recognition compared to state-of-the-art methods. We also showed that modeling the view factor as a continuous variable enables MVP to interpolate and predict images under the viewpoints, which are not observed in training data, imitating the reasoning capacity of human. Acknowledgement This work is partly supported by Natural Science Foundation of China (91320101, 61472410), Shenzhen Basic Research Program (JCYJ20120903092050890, JCYJ20120617114614438, JCYJ20130402113127496), Guangdong Innovative Research Team Program (201001D0104648280). References [1] T. Ahonen, A. Hadid, and M. Pietikainen. Face description with local binary patterns: Application to face recognition. TPAMI, 28:2037–2041, 2006. [2] A. Asthana, T. K. Marks, M. J. Jones, K. H. Tieu, and M. Rohith. Fully automatic poseinvariant face recognition via 3d pose normalization. In ICCV, 2011. 8 [3] Z. Cao, Q. Yin, X. Tang, and J. Sun. Face recognition with learning-based descriptor. In CVPR, 2010. [4] D. Chen, X. Cao, F. Wen, and J. Sun. Blessing of dimensionality: High-dimensional feature and its efficient compression for face verification. In CVPR, 2013. [5] W. A. Freiwald and D. Y. Tsao. Functional compartmentalization and viewpoint generalization within the macaque face-processing system. Science, 330(6005):845–851, 2010. [6] D. Gonz´alez-Jim´enez and J. L. Alba-Castro. Toward pose-invariant 2-d face recognition through point distribution models and facial symmetry. IEEE Transactions on Information Forensics and Security, 2:413–429, 2007. [7] R. Gross, I. Matthews, J. F. Cohn, T. Kanade, and S. Baker. Multi-pie. In Image and Vision Computing, 2010. [8] Y. Hu, L. Chen, Y. Zhou, and H. Zhang. Estimating face pose by facial asymmetry and geometry. In AFGR, 2004. [9] G. B. Huang, H. Lee, and E. Learned-Miller. Learning hierarchical representations for face verification with convolutional deep belief networks. In CVPR, 2012. [10] S. Kullback and R. A. Leibler. On information and sufficiency. In Annals of Mathematical Statistics, 1951. [11] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient based learning applied to document recognition. Proceedings of IEEE, 86(11):2278–2324, 1998. [12] S. Li, X. Liu, X. Chai, H. Zhang, S. Lao, and S. Shan. Morphable displacement field based image matching for face recognition across pose. In ECCV, 2012. [13] Y. Li, S. Gong, and H. Liddell. Support vector regression and classification based multi-view face detection and recognition. In AFGR, 2000. [14] C. Liu and H. Wechsler. Gabor feature based classification using the enhanced fisher linear discriminant model for face recognition. TIP, 11:467–476, 2002. [15] D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60:91–110, 2004. [16] P. Luo, X. Wang, and X. Tang. Hierarchical face parsing via deep learning. In CVPR, 2012. [17] P. Luo, X. Wang, and X. Tang. A deep sum-product architecture for robust facial attributes analysis. In ICCV, 2013. [18] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. [19] S. Ohayon, W. A. Freiwald, and D. Y. Tsao. What makes a cell face selective? the importance of contrast. Neuron, 74:567–581, 2013. [20] S. Reed, K. Sohn, Y. Zhang, and H. Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014. [21] K. Simonyan, O. M. Parkhi, A. Vedaldi, and A. Zisserman. Fisher vector faces in the wild. In BMVC, 2013. [22] Y. Sun, X. Wang, and X. Tang. Hybrid deep learning for face verification. In ICCV, 2013. [23] Y. Sun, X. Wang, and X. Tang. Deep convolutional network cascade for facial point detection. In CVPR, 2013. [24] Y. Sun, Y. Chen, X. Wang, and X. Tang. Deep learning face representation by joint identification-verification. In NIPS, 2014. [25] Y. Sun, X. Wang, and X. Tang. Deep learning face representation from predicting 10,000 classes. In CVPR, 2014. [26] Y. Taigman, M. Yang, M. A. Ranzato, and L. Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014. [27] Y. Tang and R. Salakhutdinov. Learning stochastic feedforward neural networks. In NIPS, 2013. [28] Z. Zhu, P. Luo, X. Wang, and X. Tang. Deep learning identity preserving face space. In ICCV, 2013. 9
2014
28
5,380
Multi-scale Graphical Models for Spatio-Temporal Processes Firdaus Janoos∗ Huseyin Denli Niranjan Subrahmanya ExxonMobil Corporate Strategic Research Annandale, NJ 08801 Abstract Learning the dependency structure between spatially distributed observations of a spatio-temporal process is an important problem in many fields such as geology, geophysics, atmospheric sciences, oceanography, etc. . However, estimation of such systems is complicated by the fact that they exhibit dynamics at multiple scales of space and time arising due to a combination of diffusion and convection/advection [17]. As we show, time-series graphical models based on vector auto-regressive processes[18] are inefficient in capturing such multi-scale structure. In this paper, we present a hierarchical graphical model with physically derived priors that better represents the multi-scale character of these dynamical systems. We also propose algorithms to efficiently estimate the interaction structure from data. We demonstrate results on a general class of problems arising in exploration geophysics by discovering graphical structure that is physically meaningful and provide evidence of its advantages over alternative approaches. 1 Introduction Consider the problem of determining the connectivity structure of subsurface aquifers in a large ground-water system from time-series measurements of the concentration of tracers injected and measured at multiple spatial locations. This problem has the following features: (i) pressure gradients driving ground-water flow have unmeasured disturbances and changes; (ii) the data contains only concentration of the tracer, not flow direction or velocity; (iii) there are regions of high permeability where ground water flows at (relatively) high speeds and tracer concentration is conserved and transported over large distances (iv) there are regions of low permeability where ground water diffuses slowly into the bed-rock and the tracer is dispersed over small spatial scales and longer time-scales. Reconstructing the underlying network structure from spatio-temporal data occurring at multiple spatial and temporal scales arises in a large number of fields. An especially important set of applications arise in exploration geophysics, hydrology, petroleum engineering and mining where the aim is to determine the connectivity of a particular geological structure from sparsely distributed time-series readings [16]. Examples include exploration of ground-water systems and petroleum reservoirs from tracer concentrations at key locations, or use of electrical, induced-polarization and electro-magnetic surveys to determine networks of ore deposits, groundwater, petroleum, pollutants and other buried structures [24]. Other examples of multi-scale spatio-temporal phenomena with the network structure include: flow of information through neural/brain networks [15], traffic flow through traffic networks[3]; spread of memes through social networks [23]; diffusion of salinity, temperature, pressure and pollutants in atmospheric sciences and oceanography [9]; transmission networks for genes, populations and diseases in ecology and epidemiology; spread of tracers and drugs through biological networks [17] etc. . ∗Corresponding Author:firdaus@ieee.org 1 These systems typically exhibit the following features: (i) the physics are linear in the observed / state variables (e.g. pressure, temperature, concentration, current) but non-linear in the unknown parameter that determines interactions (e.g. permeability, permittivity, conductance); (ii) there may be unobserved / unknown disturbances to the system; (iv) (Multi-scale structure) there are interactions occurring over large spatial scales versus those primarily in local neighborhoods. Moreover, the large-scale and small-scale processes exhibit characteristic time-scales determined by the balance of convection velocity and diffusivity of the system. A physics-based approach to estimating the structure of such systems from observed data is by inverting the governing equations [1]. However, in most cases inversion is extremely ill-posed [21] due to non-linearity in model parameters and sparsity of data with respect to the size of the parameter space, necessitating strong priors on the solution which are rarely available. In contrast, there is a large body of literature on structure learning for time-series using data-driven methods, primarily developed for econometric and neuroscientific data1. The most common approach is to learn vector auto-regressive (VAR) models, either directly in the time domain[10] or in the frequency domain[4]. These implicitly assume that all dynamics and interactions occur at similar time-scales and are acquired at the same frequency [14], although VAR models for data at different sampling rates have also been proposed [2]. These models, however, do not address the problem of interactions occurring at multiple scales of space and time, and as we show, can be very inefficient for such systems. Multi-scale graphical models have been constructed as pyramids of latent variables, where higher levels aggregate interactions at progressively larger scales [25]. These techniques are designed for regular grids such as images, and are not directly applicable to unstructured grids, where spatial distance is not necessarily related to the dependence between variables. Also, they construct O(log N) deep trees thereby requiring an extremely large (O(N)) latent variable space. In this paper, we propose a new approach to learning the graphical structure of a multi-scale spatiotemporal system using a hierarchy of VAR models with one VAR system representing the largescale (global) system and one VAR-X model for the (small-scale) local interactions. The main contribution of this paper is to model the global system as a flow network in which the observed variable both convects and diffuses between sites. Convection-diffusion (C–D) processes naturally exhibit multi-scale dynamics [8] and although at small spatial scales their dynamics are varied and transient, at larger spatial scales these processes are smooth, stable and easy to approximate with coarse models [13]. Based on this property, we derive a regularization that replicates the large-scale dynamics of C–D processes. The hierarchial model along with this physically derived prior learns graphical structures that are not only extremely sparse and rich in their description of the data, but also physically meaningful. The multi-scale model both reduces the number of edges in the graph by clustering nodes and also has smaller order than an equivalent VAR model. Next in Section 3, model relaxations to simplify estimation along with efficient algorithms are developed. In Section 4, we present an application to learning the connectivity structure for a class of problems dealing with flow through a medium under a potential/pressure field and provide theoretical and empirical evidence of its advantages over alternative approaches. One similar approach is that of clustering variables while learning the VAR structure [12] using sampling-based inference. This method does not, however, model dynamical interactions between the clusters themselves. Alternative techniques such as independent process analysis [20] and ARPCA [7] have also been proposed where auto-regressive models are applied to latent variables obtained by ICA or PCA of the original variables. Again, because these are AR not VAR models, the interactions between the latent variables are not captured, and moreover, they do not model the dynamics of the original space. In contrast to these methods, the main aspects of our paper are a hierarchy of dynamical models where each level explicitly corresponds to a spatio-temporal scale along with efficient algorithms to estimate their parameters. Moreover, as we show in Section 4, the prior derived from the physics of C–D processes is critical to estimating meaningful multi-scale graphical structures. 2 Multi-scale Graphical Model Notation: Throughout the paper, upper case letters indicate matrices and lower-case boldface for vectors, subscript for vector components and [t] for time-indexing. 1http://clopinet.com/isabelle/Projects/NIPS2009+/ 2 Let y ∈RN×T , where y[t] = {y1[t] . . . yN[t]}; t = 1 . . . T, be the time-series data observed at N sites over T time-points. To capture the multi-scale structure of interactions at local and global scales, we introduce the K–dimensional (K ≪N) latent process x[t] = {x1[t] . . . xK[t]}; t = 1 . . . T to represent K global components that interact with each other. Each observed process yi is then a summation of local interactions along with a global interaction. Specifically: Global–process: x[t] = PP p=1 A[p]x[t −p] + u[t], Local–process: y[t] = PQ q=1 B[q]y[t −q] + Zx[t] + v[t]. (1) Here Zi,k, i = 1 . . . N, k = 1 . . . K are binary variables indicating if site yi belongs to global component xk. The N × N matrices B[1] . . . B[Q] capture the graphical structure and dynamics of the local interactions between all yi and yj, while the set of K × K matrices A = {A1 . . . A[P]} determines the large-scale graphical structure as well as the overall dynamical behavior of the system. The processes v ∼N(0, σ2 vI) and u ∼N(0, σ2 uI) are iid innovations injected into the system at the global and local scale respectively. Remark: From a graphical perspective, two latent components xk and xl are conditionally independent given all other components xm, ∀m ̸= k, l if and only if A[p]i,j = 0 for all p = 1 . . . P. Moreover, two nodes yi and yj are conditionally independent given all other nodes ym ̸= i, j and latent components xk, ∀k = 1 . . . K, if and only if B[q]i,j = 0 for all q = 1 . . . Q. To create the multi-scale hierarchy in the graphical structure, the following two conditions are imposed: (i) each yi belong to only one global component xk, i.e. Zi,kZi,l = δ[k, l], ∀i = 1 . . . N; and (ii) Bi,j be non-zero only for nodes within the same component, i.e. Bi,j = 0 if yi and yj belong to different global components xk and xk′. The advantages of this model over a VAR graphical model are two fold: (i) the hierarchical structure, the fact that K ≪N and that yi ↔yj only if they are in the same global component results in a very sparse graphical model with a rich multi-scale interpretation; and (ii) as per Theorem 1, the model of eqn. (1) is significantly more parsimonious than an equivalent VAR model for data that is inherently multi-scale. Theorem 1. The model of eqn. (1) is equivalent to a vector auto-regressive moving-average (VARMA) process y[t] = PR r=1 D[r]y[t −r] + PS s=0 E[s]ϵ[t −s] where P ≤R ≤P + Q and 0 ≤S ≤P, D[r] are N × N full-rank matrices and E[s] are N × N matrices with rank less than K. Moreover the upper bounds are tight if the model of eqn. (1) is minimal. The proof is given in Supplemental Appendix A. The multi-scale spatio-temporal dynamics are modeled as stable convection–diffusion (C–D) processes governed by hyperbolic–parabolic PDEs of the form ∂y/∂t + ∇· (⃗cy) = ∇· κ∇+ s, where y is the quantity corresponding to y, κ is the diffusivity and c is the convection velocity and s is an exogenous source. The balance between convection and diffusion is quantified by the P´eclet number2 of the system [8]. These processes are non-linear in diffusivity and velocity and a full-physics inversion involves estimating κ and ⃗c at each spatial location, which is a highly ill-posed and under-constrained[1]. However, because for systems with physically reasonable P´eclet numbers, dynamics at larger scales can be accurately approximated on increasingly coarse grids [13], we simplify the model by assuming that conditioned on the rest of the system, the large-scale dynamics between any two components xi ∼xj | xk ∀k ̸= i, j can be approximated by a 1-d C–D system with constant P´eclet number. This approximation allows us to use Proposition 2: Theorem 2. For the VAR system of eqn. (1), if the dynamics between any two variables xi ∼ xj | xk ∀k ̸= i, j are 1–d C–D with infinite boundary conditions and constant P´eclet number, then the VAR coefficients Ai,j[t] can be approximated by a Gaussian function Ai,j[t] ≈ exp  −0.5(t −µi,j)2σ−2 i,j / q 2πσ2 i,j where µi,j is equal to the distance between i and j and σ2 i,j is proportional to the product of the distance and the P´eclet number. Moreover, this approximation has a multiplicative-error exp(−O(t3)). Proof is given in Supplemental Appendix B. In effect, the dynamics of a multi-dimensional (i.e. 2-d or 3-d) continuous spatial system are approximated as a network of 1-dimensional point-to-point flows consisting of a combination of advection 2The P´eclet number Pe = Lc/κ is a dimensionless quantity which determines the ratio of advective to diffusive transfer, where L is the characteristic length, c is the advective velocity and κ is the diffusivity of the system 3 and diffusion. Although in general, the dynamics of higher-dimensional physical systems are not equivalent to super-position of lower-dimensional systems, as we show in this paper, the stability of C–D physics [13] allows replicating the large-scale graphical structure and dynamics, while avoiding the ill-conditioned and computationally expensive inversion of a full-physics model. Moreover, the stability of the C–D impulse response function ensures that the resulting VAR system is also stable. 3 Model Relaxation and Regularization As the model of eqn. (1) contains non-linear interactions of real-valued variables x, A and B with binary Z along with mixed constraints, direct estimation would require solving a mixed integer non-linear problem. Instead, in this section we present relaxations and regularizations that allow estimation of model parameters via convex optimization. The next theorem states that for a given assignment of measurement sites to global components, the interactions within a component do not affect the interactions between components, which enables replacing the mixed non-linearity due to the constraints on B[q] with a set of unconstrained diagonal matrices C[q], q = 1 . . . Q. Theorem 3. For a given global-component assignment Z, if A∗and x∗are local optima to the least-squares problem of eqn. (1), then they are also a local optimum to the least-squares problem for: x[t] = P X p=1 A[p]x[t −p] + u[t] and y[t] = Q X q=1 C[p]y[t −q] + Zx[t] + v[t], (2) where C[r], r = 1 . . . b are diagonal matrices. The proof is given in Supplemental Appendix C. Furthermore, a LASSO regularization term proportional ∥C∥1 = PN i=1 PQ q=1 |C[q][i, i] is added to reduce the number of non-zero coefficients and thereby the effective order of C . Next, the binary indicator variables Zi,k are relaxed to be real-valued. Also, an ℓ1 penalty, which promotes sparsity, combined with an ℓ2 term has been shown to estimate disjoint clusters[19]. Therefore, the spatial disjointedness constraint Zi,kZi,l = δk,l, ∀i = 1 . . . N, is relaxed by a penalty proportional to ∥Zi,·∥1 along with the constraint that for each yi, the indicator vector Zi,· should lie within the unit sphere, i.e. ∥Zi,·∥2 ≤1. This penalty, which also ensures that |Zi,k| ≤1, allows interpretation of Zi,· as a soft cluster membership. One way to regularize Ai,j according to Theorem 2 would be to directly parameterize it as a Gaussian function. Instead, observe that G(t) = exp  −0.5(t −µ)2/σ2 / √ 2πσ2 satisfies the equation [∂t + (t −µ)/σ] G = 0, subject to R G(t)dt = 1. Therefore, defining the discrete version of this operator as D(γi,j), a P × P diagonal matrix, the regularization A is as a penalty proportional to ∥D(γ)A∥2,1 = X i,j ∥D(γi,j)Ai,j∥2 where D (γi,j)p,p = b∂p + γi,j (p −µi,j) , (3) along with the relaxed constraint 0 ≤P p Ai,j[p] ≤1. Here, b∂p is an approximation to timedifferentiation, µi,j is equal to the distance between i and j which is known, and γi,j ≥Γ is inversely proportional to σi,j. Importantly, this formulation also admits 0 as a valid solution and has two advantages over direct parametrization: (i) it replaces a problem that is non-linear in σ2 i,j ; i, j = 1 . . . K with a penalty that is linear in Ai,j; and (ii) unlike Gaussian parametrization, it admits the sparse solution Ai,j = 0 for the case when xi does not directly affect xj. The constant Γ > 0 is a userspecified parameter which prevents γi,j from taking on very small values, thereby obviation solutions of Ai,j with extremely large variance i.e. with very small but non-zero value. This penalty, derived from considerations of the dynamics of multi-scale spatio-temporal systems, is the key difference of the proposed method as compared to sparse time-series graphical model via group LASSO [11]. Putting it all together, the multi-scale graphical model is obtained by optimizing: [x∗, A∗, C∗, Z∗, γ∗] = argmin x,A,C,Z,γ f(x, A, C, Z, γ) + g(x, A, C, Z) (4) subject to ∥Zi,·∥2 2 ≤1 for all i = 1 . . . N and 0 ≤P p Ai,j[p] ≤1 for all i, j = 1 . . . K, and γi,j ≥ Γ, ∀i, j = 1 . . . K. The objective function is split into a smooth portion : f(x, θ) = T X t=1 y[t] − Q X q=1 C[q]y[t −q] −Zx[t] 2 2 + λ0 x[t] − P X p=1 A[p]x[t −p] 2 2 4 and a non-smooth portion g(θ) = λ1 ∥D(γ)A∥2,1 + λ2 ∥C∥2,1 + λ3 ∥Z∥1 . After solving eqn. (4), the local graphical structure within each global component is obtained by solving: B∗ = argminB PT t=1 y[t] −PQ q=1 B[q]y[t −q] −Z∗x∗[t] 2 2 + λ4 ∥B∥2,1 , where the zeros of B[q] are predetermined from Z∗. 3.1 Optimization Given values of [A, Z, C], the problem of eqn. (4) is unconstrained and strictly convex in x and γ and given [x, γ], it is unconstrained and strictly convex in C and convex constrained in A and Z. Therefore, under these conditions block coordinate descent (BCD) is guaranteed to produce a sequence of solutions that converge to a stationary point [22]. To avoid saddle-points and achieve local-minima, a random feasible-direction heuristic is used at stationary points. Defining blocks of variables to be [x, γ], and [A, C, Z], BCD operates as follows: 1 Initialize x(0) and γ(0) 2 Set n = 0 and repeat until convergence: [A(n+1), Z(n+1), C(n+1)] ←min [A,Z,C] f(x(n), A, C, Z, γ(n)) + g(x(n), A, C, Z) [x(n+1), γ(n+1)] ←min [x,γ] f(x, A(n+1), C(n+1), Z(n+1), γ) + g(x, A(n+1), C(n+1), Z(n+1)). At each iteration x(n+1) is obtained by directly solving a T × T tri-diagonal Toeplitz system with blocks of size KP which has a have running time of O(T × KP 3) (§Supplemental Appendix D for details). Estimating γ(n+1) given A(n+1) is obtained by solving minγi,j PP p=1  b∂pAi,j[p] + γi,j (p −µi,j) Ai,j[p] 2 subject to γi,j > Γ for all i, j = 1 . . . K and i ̸= j. This gives γ(n+1) i,j = max  Γ, −P p ∂tAi,j (p −µi,j) Ai,j/ P p((p −µi,j) Ai,j)2 . Optimization with respect to A, Z, C is performed using proximal splitting with Nesterov acceleration [5] which produces ϵ–optimal solutions in O(1/√ϵ) time, where the constant factor depends on p L(∇θf), the Lipschitz constant of the gradient of the smooth portion f. Defining θ = [A, Z, C], the key step in the optimization are proximal-gradient-descent operations of the form: θ(m) = proxαmg  θ(m−1) −αm∇θf  x(n), γ(n), θ(m−1) , where m is the current gradient-descent iterate, αm is the step size and the proximal operator is defined as: proxg(θ) = minθ g(x(n), γ(n), θ)+ 1 2 ∥θ −Θ∥2. The gradients ∇Af, ∇Cf and ∇Zf are straightforward to compute. As shown in Supplemental Appendix E.1, the problem in Z is decomposable into a sum of problems over Zi,· for i = 1 . . . N, where the proximal operator for each Zi,· is proxg (Zi,·) = max 1, ∥Tλ(Zi,·)∥−1 2  Tλ(Zi,·). Here Tλ3(Zi,k) = sign(Zi,k) min(|Zi,k| −λ3, 0) is the element-wise shrinkage operator. Because A has linear constraints of the form 0 ≤P p Ai,j[p] ≤1, the proximal operator does not have a closed form solution and is instead computed using dual-ascent [6]. As it can be decomposed across Ai,j for all i, j = 1 . . . K, consider the computation of proxg (ˆa) where ˆa represents one Ai,j. Defining η as the dual variable, dual-ascent proceeds by iterating the following two steps until convergence: (i): a(n+1) = ( ˆa + η(n)1 −λ ˆa+η(n)1 ∥D−1ˆa+η(n)1∥2 if D−1ˆa + η(n)1 2 > λ 0 otherwise (ii): η(n+1) = ( η(n) −α(n)1⊤a(n+1) if 1⊤a(n+1) < 0 η(n) + α(n)  1⊤a(n+1) −1  if 1⊤a(n+1) > 1 . Here n indexes the dual-ascent inner loop and α(n) is an appropriately chosen step-size. Note that D(γi,j), the P × P matrix approximation to ∂t + γi,jt is full rank and therefore invertible. And finally, the proximal operator for Ci,i for all i = 1 . . . N is Ci,i −λ2Ci,i/ ∥Ci,i∥2 if ∥Ci,i∥2 > λ2 and 0 otherwise. 5 Remark: The hyper-parameters of the systems are multipliers λ0 . . . λ4 and threshold Γ. The term λ0, which is proportional to σu/σv, implements a trade-off between innovations in the local and global processes. The parameter λ1 penalizes deviation of Ai,j from expected C–D dynamics, while λ2, λ3 and λ4 control the sparsity of C, Z and B respectively. As explained earlier Γ > 0, the lower bound on γi,j, prohibits estimates of Ai,j with very high variance and thereby controls the spread / support of A. Hyper-parameter selection: Hyper-parameter values that minimize cross-validation error are obtained using grid-search. First, solutions over the full regularization path are computed with warmstarting. In our experience, for sufficiently small step sizes warm-starting leads to convergence in a few (< 5) iterations regardless of problem size. Moreover, as B is solved in a separate step, selection of λ4 is done independently of λ0 . . . λ3. Experimentally, we have observed that an upper limit on Γ = 1 and step-size of 0.1 is sufficient to explore the space of all solutions. The upper limit on λ3 is the smallest value for which any indicator vector Zi,· becomes all zero. Guidance about minimum and maximum values λ0 is obtained using the system identification technique of auto-correlation least squares. Initialization: To cold start the BCD, γ(0) i,j is initialized with the upper bound Γ = 1 for all i, j = 1 . . . K. The variables x(0) 1 . . . x(0) K are initialized as centroids of clusters obtained by K– means on the time-series data y1 . . . yN. Model order selection: Because of the sparsity penalties, the solutions are relatively insensitive to model order (P, Q). Therefore, these are typically set to high values and the effective model order is controlled through the sparsity hyper-parameters. 4 Results In this section we present an application to determining the connectivity structure of a medium from data of flow through it under a potential/pressure field. Such problems include flow of fluids through porous media under pressure gradients, or transmission of electric currents through resistive media due to potential gradients, and commonly arise in exploration geophysics in the study of sub-surface systems like aquifers, petroleum reservoirs, ore deposits and geologic bodies [16]. Specifically, these processes are defined by PDEs of the form: ⃗c + κ∇· p = 0 and ∂y ∂t + ∇(y⃗c) = sy, (5) where ∇· ⃗c = sq and ⃗n · ∇⃗c|∂Ω= 0, (6) where y is the state variable (e.g. concentration or current), p is the pressure or potential field driving the flow, ⃗c is the resulting velocity field, κ is the permeability / permittivity, sq is the pressure/potential forcing term, sy is the rate of state variable injection into the system. The domain boundary is denoted by ∂Ωand the outward normal by ⃗n. The initial condition for tracer is zero over the entire domain. In order to permit evaluation against ground truth, we used the permeability field in Fig. 1(a) based on a geologic model to study the flow of fluids through the earth subsurface under naturally and artificially induced pressure gradients. The data were generated by numerical simulation of eqn. (5) using a proprietary high-fidelity solver for T = 12500s with spatially varying pressure loadings between ±100 units and with random temporal fluctuations (SNR of 20dB). Random amounts of tracer varying between 0 and 5 units were injected and concentration measured at 1s intervals at the 275 sites marked in the image. A video of the simulation is provided as supplemental to the manuscript, and the data and model are available on request . These concentration profiles at the 275 locations are used as the time-series data y input to the multi-scale graphical model of eqn. (1). Estimation was done for K = 20, with multiple initializations and hyper-parameter selection as described above. The K-means step was initialized by distributing seed locations uniformly at random. The model orders P and Q were kept constant at 50 and 25 respectively. Labels and colors of the sites in Fig. 1(b) indicate the clusters identified by the K-means step for one initialization of the estimation procedure, while the estimated multi-scale graphical structure is shown in Figures 1(c)–(d). The global graphical structure (§Fig. 1(c)) correctly captures large-scale features in the ground truth. Furthermore, as seen in Fig. 1(d) the local graphical structure (given by the coefficients of B) are sparse and spatially compact. Importantly, the local graphs are spatially more contiguous than the initial K-means clusters and only approximately 40% of the labels are conserved between 6 0.5 0.0 0.5 1.0 1.5 2.0 2.5 0.5 0.0 0.5 1.0 1.5 2.0 2.5 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 (a) Ground truth 16 10 9 3 12 16 14 9 15 6 18 10 10 8 16 0 0 18 0 7 0 17 1 13 2 18 13 13 1 8 16 4 9 2 1 17 12 11 2 10 14 4 14 10 9 9 12 14 13 14 14 10 18 10 8 1 7 3 5 18 18 3 3 18 1 8 7 3 14 4 15 9 18 17 17 16 18 12 13 17 4 14 2 4 16 16 10 10 11 11 14 10 12 18 15 7 18 1 7 6 11 9 2 14 11 0 18 18 18 11 7 7 7 17 10 3 13 17 4 1 5 18 15 13 13 9 9 2 7 4 7 13 13 15 2 0 7 7 10 7 10 16 15 18 14 11 8 14 6 7 13 16 11 9 13 7 10 2 5 8 8 8 18 8 8 14 6 1 17 11 7 17 11 4 6 9 6 7 13 7 3 7 6 10 9 10 5 6 4 16 7 8 13 2 5 10 4 10 10 6 14 9 13 9 2 13 13 10 2 3 8 4 16 3 9 12 4 18 10 18 11 17 13 10 14 17 7 10 10 6 3 5 17 7 8 18 12 3 9 13 18 17 17 16 14 13 14 1 5 6 17 10 3 14 17 14 4 17 17 4 7 6 8 6 5 12 2 12 8 16 16 7 10 (b) Initialization after K-means 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (c) Global graphical structure 16 15 12 15 15 15 18 3 0 15 0 18 0 0 10 0 10 16 0 0 0 0 0 0 17 1 9 9 1 10 16 10 1 16 1 16 16 14 16 10 4 4 14 15 16 14 14 4 2 14 14 10 18 10 14 18 18 3 18 18 18 3 3 3 3 18 18 3 3 14 18 10 17 18 18 18 11 16 4 4 4 4 10 4 4 16 10 10 11 11 11 5 5 18 7 7 18 1 18 18 12 18 10 14 10 6 18 18 7 1 6 7 7 10 1 6 14 18 6 18 6 18 7 11 7 7 9 7 0 7 7 11 7 7 16 7 7 7 7 7 11 7 7 11 7 7 7 10 6 8 1 16 18 16 8 16 8 1 18 8 8 8 8 8 8 8 8 8 9 3 16 16 16 14 6 9 6 14 14 14 18 14 6 10 9 9 10 10 4 13 7 13 13 10 10 10 4 10 10 3 13 11 11 14 3 13 13 10 13 11 4 4 4 10 13 12 13 12 13 12 17 17 10 17 17 17 7 4 10 10 17 13 17 3 13 17 14 3 11 4 17 17 17 17 17 17 14 17 13 17 17 10 7 1 17 14 17 13 17 7 7 17 17 6 7 17 13 15 12 16 4 16 15 (d) Local graphical structure 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (e) Multi-scale structure with group LASSO (f) VAR graphical structure Figure 1: Fig.(a). Ground truth permeability (κ) map overlaid with locations where the tracer is injected and measured. Fig.(b). Results of K–means initialization step. Colors and labels both indicate cluster assignments of the sites. Fig.(c). The global graphical structure for latent variable x. The nodes are positioned at the centroids of the corresponding local graphs. Fig.(d). The local graphical structure. Again, colors and labels both indicate cluster (i.e. global component) assignments of the sites. Fig.(e). The multi-scale graphical structure obtained when the Gaussian function prior is replaced by group LASSO on A . Fig.(f). The graphical structure estimated using non-hierarchal VAR with group LASSO. 7 the K-means initialization and the final solution. Furthermore, as shown in Supplemental Appendix F, the estimated graphical structure is fairly robust to initialization, especially in recovering the global graph structure. For all initializations, estimation from a cold-start converged in 65–90 BCD iterations, while warm-starts converged in < 5 iterations. Figure 2: Response functions at node in cmpnt 17 to impulse in cmpnt 1 of Fig. 1(c). Plotted are the impulse responses for eqn. (5) along with 90% bands, the multiscale model with C–D prior, the multi-scale model with group LASSO prior, and the non-hierarchical VAR model with group LASSO prior. Fig. 1(e) shows the results of estimating the multi-scale model when the penalty term of eqn. (3) for the C–D process prior is replaced by group LASSO. This result highlights the importance of the physically derived prior to reconstruct the graphical structure of the problem. Fig. 1(f) shows the graphical structure estimated using a non-hierarchal VAR model with group LASSO on the coefficients [11] and auto-regressive order P = 10. Firstly, this is a significantly larger model with P × N 2 coefficients as compared O(P ×N)+O(Q×K2) for the hierarchical model, and is therefore much more expensive to compute. Furthermore, the estimated graph is denser and harder to interpret in the terms of the underlying problem, with many long range edges intermixed with short range ones. In all cases, model hyperparameters were selected via 10-fold cross-validation described in Supplemental Appendix G. Interestingly, in terms of misfit (i.e. training ) error P t ∥y[t] −ˆy[t]∥/ P t ∥y[t]∥  , the non-hierarchal VAR model performs best (≈%12.1 ± 4.4 relative error) while group LASSO and C–D penalized hierarchal models perform equivalently ( 18.3±5.7% and 17.6±6.2%) which can be attributed to the higher degrees of freedom available to non-hierarchical VAR. However, in terms of cross-validation (i.e. testing) error, the VAR model was the worst ( 94.5 ± 8.9%) followed by group LASSO hierarchal model (48.3 ± 3.7%). The model with the C–D prior performed the best, with a relative-error of 31.6 ± 4.5%. To characterize the dynamics estimated by the various approaches, we compared the impulse response functions (IRF) of the graphical models with that of the ground truth model (§eqn. (5)). The IRF for a node i is straightforward to generate for eqn. (5), while those for the graphical models are obtained by setting v0[i] = 1 and v0[j] = 0 for all j ̸= i and vt = 0 for t > 0 and then running their equations forward in time. The responses at a node in global component 17 of Fig. 1(c) to an impulse at a node in global component 1 is shown in Fig. 2. As the IRF for eqn. (5) depends on the driving pressure field which fluctuates over time, the mean IRF along with 90% bands are shown. It can be observed that the multi-scale model with the C–D prior is much better at replicating the dynamical properties of the original system as compared to the model with group LASSO, while a non-hierarchical VAR model with group LASSO fails to capture any relevant dynamics. The results of comparing IRFs for other pairs of sites were qualitatively similar and therefore omitted. 5 Conclusion In this paper, we proposed a new approach that combines machine-learning / data-driven techniques with physically derived priors to reconstruct the connectivity / network structure of multi-scale spatio-temporal systems encountered in multiple fields such as exploration geophysics, atmospheric and ocean sciences . Simple yet computationally efficient algorithms for estimating the model were developed through a set of relaxations and regularization. The method was applied to the problem of learning the connectivity structure for a general class of problems involving flow through a permeable medium under pressure/potential fields and the advantages of this method over alternative approaches were demonstrated. Current directions of investigation includes incorporating different types of physics such as hyperbolic (i.e. wave) equations into the model. We are also investigating applications of this technique to learning structure in other domains such as brain networks, traffic networks, and biological and social networks. 8 References [1] Akcelik, V., Biros, G., Draganescu, A., Ghattas, O., Hill, J., Bloemen Waanders, B.: Inversion of airborne contaminants in a regional model. In: Computational Science ICCS 2006, Lecture Notes in Computer Science, vol. 3993, pp. 481–488. Springer Berlin Heidelberg (2006) 2, 3 [2] Anderson, B., Deistler, M., Felsenstein, E., Funovits, B., Zadrozny, P., Eichler, M., Chen, W., Zamani, M.: Identifiability of regular and singular multivariate autoregressive models from mixed frequency data. In: Decision and Control (CDC), 2012 IEEE 51st Annual Conference on. pp. 184–189 (Dec 2012) 2 [3] Aw, A., Rascle, M.: Resurrection of “second order” models of traffic flow. SIAM J. Appl. Math. 60(3), 916–938 (2000) 1 [4] Bach, F.R., Jordan, M.I.: Learning graphical models for stationary time series. IEEE Trans. Sig. Proc. 52(8), 2189–2199 (2004) 2 [5] Beck, A., Teboulle, M.: Fast gradient-based algorithms for constrained total variation image denoising and deblurring problems. IEEE Trans. Image Proc, 18(11), 2419–2434 (Nov 2009) 5 [6] Bertsekas, D.P.: Nonlinear Programming. Athena Scientific, 2nd edn. (September 1999) 5 [7] Christmas, J., Everson, R.: Temporally coupled principal component analysis: A probabilistic autoregression method. In: Int. Joint Conf. Neural Networks (2010) 2 [8] Crank, J.: The mathematics of diffusion. Clarendon Press (1975) 2, 3 [9] Cressie, N., Wikle, C.K.: Statistics for Spatio-Temporal Data. Wiley, Hoboken (2011) 1 [10] Eichler, M.: Causal inference with multiple time series: principles and problems. Philosophical Transaction of The Royal Society A 371 (2013) 2 [11] Haufe, S., M¨uller, K.R., Nolte, G., Kr¨amer, N.: Sparse causal discovery in multivariate time series. In: Isabelle Guyon, D.J., Sch¨olkopf, B. (eds.) NIPS workshop on causality. vol. 1, pp. 1–16 (2008) 4, 8 [12] Huang, T., Schneider, J.: Learning bi-clustered vector autoregressive models. In: European Conf. Machine Learning (2012) 2 [13] Hughes, T.: Multiscale phenomena: Green’s functions, the Dirichlet-to-Neumann formulation, subgridscale models, bubbles and the origin of stabilized methods. Comput. Methods Appl. Mech. Engrg. 127, 387401 (1995) 2, 3, 4 [14] Hyv¨arinen, A., Zhang, K., Shimizu, S., Hoyer, P.O.: Estimation of a structural vector autoregression model using non-gaussianity. J. Machine Learning Res. 11, 1709–1731 (2010) 2 [15] Janoos, F., Li, W., Subrahmanya, N., Morocz, I.A., Wells, W.: Identification of recurrent patterns in the activation of brain networks. In: Adv. in Neural Info. Proc. Sys. (NIPS) (2012) 1 [16] Kearey, P., Brooks, M., Hill, I.: An Introduction to Geophysical Exploration. Black (2011) 1, 6 [17] Lloyd, C.D.: Exploring Spatial Scale in Geography. Wiley Blackwell (2014) 1 [18] Moneta, A.: Graphical causal models for time series econometrics: Some recent developments and applications. In: NIPS Mini Symp. Causality and Time Series Analysis (2009) 1 [19] Panagakis, Y., Kotropoulos, C.: Elastic net subspace clustering applied to pop/rock music structure analysis. Pattern Recognition Letters 38(0), 46 – 53 (2014) 4 [20] Szab´o, Z., L¨orincz, A.: Complex independent process analysis. Acta Cybernetica 19, 177–190 (2009) 2 [21] Tarantola, A.: Inverse Problem Theory and Methods for Model Parameter Estimation. SIAM (2005) 2 [22] Tseng, P.: Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications 109(3), 475–494 (2001) 5 [23] Wang, H., Wang, F., Xu, K.: Modeling information diffusion in online social networks with partial differential equations. CoRR abs/1310.0505 (2013) 1 [24] Wightman, W.E., Jalinoos, F., Sirles, P., Hanna, K.: Application of geophysical methods to highway related problems. Federal Highway Administration FHWA-IF-04-021 (2003) 1 [25] Willsky, A.: Multiresolution markov models for signal and image processing. Proceedings of the IEEE 90(8), 1396–1458 (Aug 2002) 2 9
2014
280
5,381
Bregman Alternating Direction Method of Multipliers Huahua Wang, Arindam Banerjee Dept of Computer Science & Engg, University of Minnesota, Twin Cities {huwang,banerjee}@cs.umn.edu Abstract The mirror descent algorithm (MDA) generalizes gradient descent by using a Bregman divergence to replace squared Euclidean distance. In this paper, we similarly generalize the alternating direction method of multipliers (ADMM) to Bregman ADMM (BADMM), which allows the choice of different Bregman divergences to exploit the structure of problems. BADMM provides a unified framework for ADMM and its variants, including generalized ADMM, inexact ADMM and Bethe ADMM. We establish the global convergence and the O(1/T) iteration complexity for BADMM. In some cases, BADMM can be faster than ADMM by a factor of O(n/ ln n) where n is the dimensionality. In solving the linear program of mass transportation problem, BADMM leads to massive parallelism and can easily run on GPU. BADMM is several times faster than highly optimized commercial software Gurobi. 1 Introduction In recent years, the alternating direction method of multipliers (ADMM) [4] has been successfully used in a broad spectrum of applications, ranging from image processing [11, 14] to applied statistics and machine learning [26, 25, 12]. ADMM considers the problem of minimizing composite objective functions subject to an equality constraint: min x∈X,z∈Z f(x) + g(z) s.t. Ax + Bz = c , (1) where f and g are convex functions, A ∈Rm×n1, B ∈Rm×n2, c ∈Rm×1, x ∈X ∈Rn1×1, z ∈ Z ∈Rn2×1, and X ⊆Rn1 and Z ⊆Rn2 are nonempty closed convex sets. f and g can be non-smooth functions, including indicator functions of convex sets. For further understanding of ADMM, we refer the readers to the comprehensive review by [4] and references therein. Many machine learning problems can be cast into the framework of minimizing a composite objective [22, 10], where f is a loss function such as hinge or logistic loss, and g is a regularizer, e.g., ℓ1 norm, ℓ2 norm, nuclear norm or total variation. The functions and constraints usually have different structures. Therefore, it is useful and sometimes necessary to split and solve them separately, which is exactly the forte of ADMM. In each iteration, ADMM updates splitting variables separately and alternatively by solving the partial augmented Lagrangian of (1), where only the equality constraint is considered: Lρ(x, z, y) = f(x) + g(z) + ⟨y, Ax + Bz −c⟩+ ρ 2∥Ax + Bz −c∥2 2, (2) where y ∈Rm is dual variable, ρ > 0 is penalty parameter, and the quadratic penalty term is to penalize the violation of the equality constraint. ADMM consists of the following three updates: xt+1 = argminx∈X f(x) + ⟨yt, Ax + Bzt −c⟩+ ρ 2∥Ax + Bzt −c∥2 2 , (3) zt+1 = argminz∈Z g(z) + ⟨yt, Axt+1 + Bz −c⟩+ ρ 2∥Axt+1 + Bz −c∥2 2 , (4) yt+1 = yt + ρ(Axt+1 + Bzt+1 −c) . (5) 1 Since the computational complexity of the y update (5) is trivial, the computational complexity of ADMM is determined by the x and z updates (3)-(4) which amount to solving proximal minimization problems using the quadratic penalty term. Inexact ADMM [26, 4] and generalized ADMM [8] have been proposed to solve the updates inexactly by linearizing the functions and adding additional quadratic terms. Recently, online ADMM [25] and Bethe-ADMM [12] add an additional Bregman divergence on the x update by keeping or linearizing the quadratic penalty term ∥Ax + Bz −c∥2 2. As far as we know, all existing ADMMs use quadratic penalty terms. A large amount of literature shows that replacing the quadratic term by Bregman divergence in gradient-type methods can greatly boost their performance in solving constrained optimization problem. First, the use of Bregman divergence could effectively exploit the structure of problems [6, 2, 10] , e.g., in computerized tomography [3], clustering problems and exponential family distributions [1]. Second, in some cases, the gradient descent method with Kullback-Leibler (KL) divergence can outperform the method with the quadratic term by a factor of O( √ n ln n) where n is the dimensionality of the problem [2, 3]. Mirror descent algorithm (MDA) and composite objective mirror descent (COMID) [10] use Bregman divergence to replace the quadratic term in gradient descent or proximal gradient [7]. Proximal point method with D-functions (PMD) [6, 5] and Bregman proximal minimization (BPM) [20] generalize proximal point method by using generalized Bregman divegence to replace the quadratic term. For ADMM, although the convergence of ADMM is well understood, it is still unknown whether the quadratic penalty term in ADMM can be replaced by Bregman divergence. The proof of global convergence of ADMM can be found in [13, 4]. Recently, it has been shown that ADMM converges at a rate of O(1/T) [25, 17], where T is the number of iterations. For strongly convex functions, the dual objective of an accelerated version of ADMM can converge at a rate of O(1/T 2) [15]. Under suitable assumptions like strongly convex functions or a sufficiently small step size for the dual variable update, ADMM can achieve a linear convergence rate [8, 19]. However, as pointed out by [4], “There is currently no proof of convergence known for ADMM with nonquadratic penalty terms.” In this paper, we propose Bregman ADMM (BADMM) which uses Bregman divergences to replace the quadratic penalty term in ADMM, answering the question raised in [4]. More specifically, the quadratic penalty term in the x and z updates (3)-(4) will be replaced by a Bregman divergence in BADMM. We also introduce a generalized version of BADMM where two additional Bregman divergences are added to the x and z updates. The generalized BADMM (BADMM for short) provides a unified framework for solving (1), which allows one to choose suitable Bregman divergence so that the x and z updates can be solved efficiently. BADMM includes ADMM and its variants as special cases. In particular, BADMM replaces all quadratic terms in generalized ADMM [8] with Bregman divergences. By choosing a proper Bregman divergence, we also show that inexact ADMM [26] and Bethe ADMM [12] can be considered as special cases of BADMM. BADMM generalizes ADMM similar to how MDA generalizes gradient descent and how PMD generalizes proximal methods. In BADMM, the x and z updates can take the form of MDA or PMD. We establish the global convergence and the O(1/T) iteration complexity for BADMM. In some cases, we show that BADMM can outperform ADMM by a factor O(n/ ln n). We evaluate the performance of BADMM in solving the linear program problem of mass transportation [18]. Since BADMM takes use of the structure of the problem, it leads to closed-form solutions which amounts to elementwise operations and can be done in parallel. BADMM is faster than ADMM and can even be orders of magnitude faster than highly optimized commercial software Gurobi when implemented on GPU. The rest of the paper is organized as follows. In Section 2, we propose Bregman ADMM and discuss several special cases of BADMM. In Section 3, we establish the convergence of BADMM. In Section 4, we consider illustrative applications of BADMM, and conclude in Section 5. 2 Bregman Alternating Direction Method of Multipliers Let φ : Ω→R be a continuously differentiable and strictly convex function on the relative interior of a convex set Ω. Denote ∇φ(y) as the gradient of φ at y. We define Bregman divergence Bφ : Ω× ri(Ω) →R+ induced by φ as Bφ(x, y) = φ(x) −φ(y) −⟨∇φ(y), x −y⟩. 2 Since φ is strictly convex, Bφ(x, y) ≥0 where the equality holds if and only if x = y. More details about Bregman divergence can be found in [6, 1]. Note the definition of Bregman divergence has been generalized for the nondifferentiable functions [20, 23]. In this paper, our discussion uses the definition of classical Bregman divergence. Two of the most commonly used examples are squared Euclidean distance Bφ(x, y) = 1 2∥x −y∥2 2 and KL divergence Bφ(x, y) = Pn i=1 xi log xi yi . Assuming Bφ(c −Ax, Bz) is well defined, we replace the quadratic penalty term in the partial augmented Lagrangian (2) by a Bregman divergence as follows: Lφ ρ(x, z, y) = f(x) + g(z) + ⟨y, Ax + Bz −c⟩+ ρBφ(c −Ax, Bz). (6) Unfortunately, we can not derive Bregman ADMM (BADMM) updates by simply solving Lφ ρ(x, z, y) alternatingly as ADMM does because Bregman divergences are not necessarily convex in the second argument. More specifically, given (zt, yt), xt+1 can be obtained by solving minx∈X Lφ ρ(x, zt, yt), where the quadratic penalty term 1 2∥Ax + Bzt −c∥2 2 for ADMM in (3) is replaced with Bφ(c−Ax, Bzt) in the x update of BADMM. However, given (xt+1, yt), we cannot obtain zt+1 by solving minz∈Z Lφ ρ(xt+1, z, yt), since the term Bφ(c −Axt+1, Bz) need not be convex in z. The observation motivates a closer look at the role of the quadratic term in ADMM. In standard ADMM, the quadratic augmentation term added to the Lagrangian is just a penalty term to ensure the new updates do not violate the equality constraint significantly. Staying with these goals, we propose the z update augmentation term of BADMM to be: Bφ(Bz, c −Axt+1), instead of the quadratic penalty term 1 2∥Axt+1 + Bz −c∥2 2 in (3). Then, we get the following updates for BADMM: xt+1 =argminx∈X f(x) + ⟨yt, Ax + Bzt −c⟩+ ρBφ(c −Ax, Bzt) , (7) zt+1 =argminz∈Z g(z) + ⟨yt, Axt+1 + Bz −c⟩+ ρBφ(Bz, c −Axt+1) , (8) yt+1 =yt + ρ(Axt+1 + Bzt+1 −c) . (9) Compared to ADMM (3)-(5), BADMM simply uses a Bregman divergence to replace the quadratic penalty term in the x and z updates. It is worth noting that the same Bregman divergence Bφ is used in the x and z updates. We consider a special case when A = −I, B = I, c = 0. (7) is reduced to xt+1 = argminx∈X f(x) + ⟨yt, −x + zt⟩+ ρBφ(x, zt) . (10) If φ is a quadratic function, the constrained problem (10) requires the projection onto the constraint set X. However, in some cases, by choosing a proper Bregman divergence, (10) can be solved efficiently or has a closed-form solution. For example, assuming f is a linear function and X is the unit simplex, choosing Bφ to be KL divergence leads to the exponentiated gradient [2, 3, 21]. Interestingly, if the z update is also the exponentiated gradient, we have alternating exponentiated gradients. In Section 4, we will show the mass transportation problem can be cast into this scenario. While the updates (7)-(8) use the same Bregman divergences, efficiently solving the x and z updates may not be feasible, especially when the structure of the original functions f, g, the function φ used for augmentation, and the constraint sets X, Z are rather different. For example, if f(x) is a logistic function in (10), it will not have a closed-form solution even Bφ is the KL divergence and X is the unit simplex. To address such concerns, we propose a generalized version of BADMM. 2.1 Generalized BADMM To allow the use of different Bregman divergences in the x and z updates (7)-(8) of BADMM, the generalized BADMM simply introduces an additional Bregman divergence for each update. The generalized BADMM has the following updates: xt+1 =argminx∈X f(x) + ⟨yt, Ax + Bzt −c⟩+ ρBφ(c −Ax, Bzt) + ρxBϕx(x, xt) , (11) zt+1 =argminz∈Z g(z) + ⟨yt, Axt+1 + Bz −c⟩+ ρBφ(Bz, c −Axt+1) + ρzBϕz(z, zt) , (12) yt+1 = yt + τ(Axt+1 + Bzt+1 −c) . (13) where ρ > 0, τ > 0, ρx ≥0, ρz ≥0. Note that we allow the use of a different step size τ in the dual variable update [8, 19]. There are three Bregman divergences in the generalized BADMM. While 3 the Bregman divergence Bφ is shared by the x and z updates, the x update has its own Bregman divergence Bϕx and the z update has its own Bregman divergence Bϕz. The two additional Bregman divergences in generalized BADMM are variable specific, and can be chosen to make sure that the xt+1, zt+1 updates are efficient. If all three Bregman divergences are quadratic functions, the generalized BADMM reduces to the generalized ADMM [8]. We prove convergence of generalized BADMM in Section 3, which yields the convergence of BADMM with ρx = ρz = 0. In the following, we illustrate how to choose a proper Bregman divergence Bϕx so that the x update can be solved efficiently, e.g., a closed-form solution, noting that the same arguments apply to the z-updates. Consider the first three terms in (11) as s(x) + h(x), where s(x) denotes a simple term and h(x) is the problematic term which needs to be linearized for an efficient x-update. We illustrate the idea with several examples later in the section. Now, we have xt+1 = minx∈X s(x) + h(x) + ρxBϕx(x, xt) . (14) where efficient updates are difficult due to the mismatch in structure between h and X. The goal is to ‘linearize’ the function h by using the fact that the Bregman divergence Bh(x, xt) captures all the higher-order (beyond linear) terms in h(x) so that: h(x) −Bh(x, xt) = h(xt) + ⟨x −xt, ∇h(xt)⟩ (15) is a linear function of x. Let ψ be another convex function such that one can efficiently solve minx∈X s(x) + ψ(x) + ⟨x, b⟩for any constant b. Assuming ϕx(x) = ψ(x) − 1 ρx h(x) is continuously differentiable and strictly convex, we construct a Bregman divergence based proximal term to the original problem so that: argminx∈X s(x)+h(x)+ρxBϕx(x,xt)=argminx∈X s(x)+⟨∇h(xt), x−xt⟩+ρxBψx(x,xt),(16) where the latter problem can be solved efficiently, by our assumption. To ensure ϕx is continuously differentiable and strictly convex, we need the following condition: Proposition 1 If h is smooth and has Lipschitz continuous gradients with constant ν under a pnorm, then ϕx is ν/ρx-strongly convex w.r.t. the p-norm. This condition has been widely used in gradient-type methods, including MDA and COMID. Note that the convergence analysis of generalized ADMM in Section 4 holds for any additional Bregman divergence based proximal terms, and does not rely on such specific choices. Using the above idea, one can ‘linearize’ different parts of the x update to yield an efficient update. We consider three special cases, respectively focusing on linearizing the function f(x), linearizing the Bregman divergence based augmentation term Bφ(c −Ax, Bzt), and linearizing both terms, along with examples for each case. Case 1: Linearization of smooth function f: Let h(x) = f(x) in (16), we have xt+1 = argminx∈X ⟨∇f(xt), x −xt⟩+ ⟨yt, Ax⟩+ ρBφ(c −Ax, Bzt) + ρxBψx(x, xt) . (17) where ∇f(xt) is the gradient of f(x) at xt. Example 1 Consider the following ADMM form for sparse logistic regression problem [16, 4]: minx h(x) + λ∥z∥1 , s.t. x = z , (18) where h(x) is the logistic function. If we use ADMM to solve (18), the x update is as follows [4]: xt+1 = argminx h(x) + ⟨yt, x −zt⟩+ ρ 2∥x −zt∥2 2 , (19) which is a ridge-regularized logistic regression problem and one needs an iterative algorithm like L-BFGS to solve it. Instead, if we linearize h(x) at xt and set Bψ to be a quadratic function, then xt+1 = argminx ⟨∇h(xt), x −xt⟩+ ⟨yt, x −zt⟩+ ρ 2∥x −zt∥2 2 + ρx 2 ∥x −xt∥2 2 , (20) the x update has a simple closed-form solution. 4 Case 2: Linearization of the quadratic penalty term: In ADMM, Bφ(c −Ax, Bzt) = 1 2∥Ax + Bzt −c∥2 2. Let h(x) = ρ 2∥Ax + Bzt −c∥2 2. Then ∇h(xt) = ρAT (Axt + Bzt −c), we have xt+1 = argminx∈X f(x) + ⟨yt + ρ(Axt + Bzt −c), Ax⟩+ ρxBψ(x, xt) . (21) The case mainly solves the problem due to the ∥Ax∥2 2 term which makes x updates nonseparable, whereas the linearized version can be solved with separable (parallel) updates. Several problems have been benefited from the linearization of quadratic term [8], e.g., when f is ℓ1 loss function [16], and projection onto the unit simplex or ℓ1 ball [9]. Case 3: Mirror Descent: In some settings, we want to linearize both the function f and the quadratic augmentation term Bφ(c −Ax, Bzt) = 1 2∥Ax + Bzt −c∥2 2. Let h(x) = f(x) + ⟨yt, Ax⟩+ ρ 2∥Ax + Bzt −c∥2 2, we have xt+1 = argminx∈X ⟨∇h(xt), x⟩+ ρxBψ(x, xt) . (22) Note that (22) is a MDA-type update. Further, one can do a similar exercise with a general Bregman divergence based augmentation term Bφ(c −Ax, Bzt), although there has to be a good motivation for going to this route. Example 2 [Bethe-ADMM [12]] Given an undirected graph G = (V, E), where V is the vertex set and E is the edge set. Assume a random discrete variable Xi associated with node i ∈V can take K values. In a pairwise MRF, the joint distribution of a set of discrete random variables X = {X1, · · · , Xn} (n is the number of nodes in the graph) is defined in terms of nodes and cliques [24]. Consider solving the following graph-structured linear program (LP) : min µ l(µ) s.t. µ ∈L(G) , (23) where l(µ) is a linear function of µ and L(G) is the so-called local polytope [24] determined by the marginalization and normalization (MN) constraints for each node and edge in the graph G: L(G) = {µ ≥0 , X xiµi(xi) = 1 , X xjµij(xi, xj) = µi(xi)} , (24) where µi, µij are pseudo-marginal distributions of node i and edge ij respectively. The LP in (23) contains O(nK + |E|K2) variables and that order of constraints. In particular, (23) serves as a LP relaxation of MAP inference probem in a pairwise MRF if l(µ) is defined as follows: l(µ) = X i X xi θi(xi)µi(xi) + X ij∈E X xij θij(xi, xj)µij(xi, xj), (25) where θi, θij are the potential functions of node i and edge ij respectively. For a grid graph (e.g., image) of size 1000×1000, (23) contains millions of variables and constraints, posing a challenge to LP solvers. An efficient way is to decompose the graph into trees such that min µτ X τcτlτ(µτ) s.t. µτ ∈Tτ, µτ = mτ , (26) where Tτ denotes the MN constraints (24) in the tree τ. µτ is a vector of pseudo-marginals of nodes and edges in the tree τ. m is a global variable which contains all trees and mτ corresponds to the tree τ in the global variable. cτ is the weight for sharing variables. The augmented Lagrangian is Lρ(µτ, m, λτ) = X τcτlτ(µτ) + ⟨λτ, µτ −mτ⟩+ ρ 2∥µτ −mτ∥2 2 . (27) which leads to the following update for µt+1 τ in ADMM: µt+1 τ = argminµτ ∈Tτ cτlτ(µτ) + ⟨λt τ, µτ⟩+ ρ 2∥µτ −mt τ∥2 2 (28) (28) is difficult to solve due to the MN constraints in the tree. Let h(µτ) be the objective of (28). Linearizing h(µτ) and adding a Bregman divergence in (28), we have: µt+1 τ = argminµτ ∈Tτ ⟨∇h(µt τ), µτ⟩+ ρxBψ(µτ, µt τ) = argminµτ ∈Tτ ⟨∇h(µt τ) −ρx∇ψ(µt τ), µτ⟩+ ρxψ(µτ) , If ψ(µτ) is the negative Bethe entropy of µτ, the update of µt+1 τ becomes the Bethe entropy problem [24] and can be solved exactly using the sum-product algorithm in linear time for any tree. 5 3 Convergence Analysis of BADMM We need the following assumption in establishing the convergence of BADMM: Assumption 1 (a) f : Rn17→R∪{+∞} and g : Rn27→R∪{+∞} are closed, proper and convex. (b) An optimal solution exists. (c) The Bregman divergence Bφ is defined on an α-strongly convex function φ with respect to a p-norm ∥· ∥2 p, i.e., Bφ(u, v) ≥α 2 ∥u −v∥2 p, where α > 0. Assume that {x∗, z∗, y∗} satisfies the KKT conditions of the Lagrangian of (1) (ρ = 0 in (2)), i.e., −AT y∗∈∂f(x∗) , −BT y∗∈∂g(z∗) , Ax∗+ Bz∗−c = 0 , (29) and x∗∈X, z∗∈Z. Note X and Z are always satisfied in (11) and (12). Let f ′(xt+1) ∈∂f(xt+1) and g′(zt+1) ∈∂g(zt+1). For x∗∈X, z∗∈Z, the optimality conditions of (11) and (12) are ⟨f ′(xt+1)+AT {yt+ρ(−∇φ(c−Axt+1)+∇φ(Bzt)}+ρx(∇ϕx(xt+1)−∇ϕx(xt)), xt+1−x∗⟩≤0 , ⟨g′(zt+1)+BT {yt+ρ(∇φ(Bzt+1)−∇φ(c−Axt+1)}+ρz(∇ϕz(zt+1)−∇ϕz(zt)), zt+1 −z∗⟩≤0 . If Axt+1 + Bzt+1 = c, then yt+1 = yt. Further, if Bϕx(xt+1, xt) = 0, Bϕz(zt+1, zt) = 0, then the KKT conditions in (29) will be satisfied. Therefore, we have the following sufficient conditions for the KKT conditions: Bϕx(xt+1, xt) = 0 , Bϕz(zt+1, zt) = 0 , (30a) Axt+1 + Bzt −c = 0 , Axt+1 + Bzt+1 −c = 0 . (30b) For the exact BADMM, ρx = ρz = 0 in (11) and (12), the optimality conditions are (30b), which is equivalent to the optimality conditions of ADMM [4], i.e., Bzt+1−Bzt = 0 , Axt+1+Bzt+1−c = 0. Define the residuals of optimality conditions (30) at (t + 1) as: R(t+1)= ρx ρ Bϕx(xt+1,xt)+ ρz ρ Bϕz(zt+1,zt)+Bφ(c−Axt+1,Bzt)+γ∥Axt+1+Bzt+1−c∥2 2 , (31) where γ > 0. If R(t + 1) = 0, the optimality conditions (30a) and (30b) are satisfied. It is sufficient to show the convergence of BADMM by showing R(t+1) converges to zero. The following theorem establishes the global convergence for BADMM. Theorem 1 Let the sequence {xt, zt, yt} be generated by BADMM (11)-(13), {x∗, z∗, y∗} satisfy (29) and x∗∈X, z∗∈Z. Let the Assumption 1 hold and τ ≤(ασ −2γ)ρ, where σ = min{1, m 2 p −1} and 0 < γ < ασ 2 . Then R(t + 1) converges to zero and {xt, zt, yt} converges to a KKT point {x∗, z∗, y∗}. Remark 1 (a) If 0 < p ≤2, then σ = 1 and τ ≤(α −2γ)ρ. The case that 0 < p ≤2 includes two widely used Bregman divergences, i.e., Euclidean distance and KL divergence. For KL divergence in the unit simplex, we have α = 1, p = 1 in the Assumption 1 (c), i.e., KL(u, v) ≥1 2∥u −v∥2 1 [2]. (b) Since we often set Bφ to be a quadratic function (p = 2), the three special cases in Section 2.1 could choose step size τ = (α −2γ)ρ. (c) If p > 2, σ will be small, leading to a small step size τ which may be not be necessary in practice. It would be interesting to see whether a large step size can be used for any p > 0. The following theorem establishes a O(1/T) iteration complexity for the objective and residual of constraints in an ergodic sense. Theorem 2 Let the sequences {xt, zt, yt} be generated by BADMM (11)-(13). Set τ ≤(ασ−2γ)ρ, where σ = min{1, m 2 p −1} and 0 < γ < ασ 2 . Let ¯xT = 1 T PT t=1 xt, ¯zT = 1 T PT t=1 zt and y0 = 0. For any x∗∈X, z∗∈Z and (x∗, z∗, y∗) satisfying KKT conditions (29), we have f(¯xT ) + g(¯zT ) −(f(x∗) + g(z∗)) ≤D1 T , (32) ∥A¯xT + B¯zT −c∥2 2 ≤D(w∗, w0) γT , (33) where D1 = ρBφ(Bz∗, Bz0) + ρxBϕx(x∗, x0) + ρzBϕz(z∗, z0) and D(w∗, w0) = 1 2τρ∥y∗− y0∥2 2 + Bφ(Bz∗, Bz0) + ρx ρ Bϕx(x∗, x0)+ ρz ρ Bϕz(z∗, z0). 6 We consider one special case of BADMM where B = I and X, Z are the unit simplex. Let Bφ be the KL divergence. For z∗∈Z ⊂Rn2×1, choosing z0 = e/n2, we have Bφ(z∗, z0) = Pn2 i=1 z∗ i ln z∗ i zi,0 = Pn2 i=1 z∗ i ln z∗ i + ln n2 ≤ln n2 . Similarly, if ρx > 0, by choosing x0 = e/n1, Bϕx(x∗, x0) ≤ln n1. Setting α = 1, σ = 1 and γ = 1 4 in Theorem 2 yields the following result: Corollary 1 Let the sequences {xt, zt, yt} be generated by Bregman ADMM (11),(12),(13) and y0 = 0. Assume B = I, and X and Z is the unit simplex. Let Bφ, Bϕx, Bϕz be KL divergence. Let ¯xT = 1 T PT t=1 xt, ¯zT = 1 T PT t=1 zt. Set τ = 3ρ 4 . For any x∗∈X, z∗∈Z and (x∗, z∗, y∗) satisfying KKT conditions (29), we have f(¯xT ) + g(¯zT ) −(f(x∗) + g(z∗)) ≤ρ ln n2 + ρx ln n1 + ρz ln n2 T , (34) ∥A¯xT + B¯zT −c∥2 2 ≤ 2 τρ∥y∗−y0∥2 2 + 4 ln n2 + 4ρx ρ ln n1+ 4ρz ρ ln n2 T , (35) Remark 2 (a) [2] shows that MDA yields a smilar O(ln n) bound where n is dimensionality of the problem. If the diminishing step size of MDA is propotional to √ ln n, the bound is O( √ ln n). Therefore, MDA is faster than the gradient descent method by a factor O((n/ ln n)1/2). (b) In ADMM, Bφ(z∗, z0) = 1 2∥z∗−z0∥2 2 = 1 2∥Pn i=1 z∗ i −zi,0∥2 2 ≤n 2 Pn i=1 ∥z∗ i −zi,0∥2 2 ≤n. Therefore, BADMM is faster than ADMM by a factor O(n/ ln n) in an ergodic sense. 4 Experimental Results In this section, we use BADMM to solve the mass transportation problem [18]: min ⟨C, X⟩ s.t. Xe = a, XT e = b, X ≥0 . (36) where ⟨C, X⟩denotes Tr(CT X), C ∈Rm×n is a cost matrix, X ∈Rm×n, a ∈Rm×1, b ∈Rm×1, e is a column vector of ones. The mass transportation problem (36) is a linear program and thus can be solved by the simplex method. We now show that (36) can be solved by ADMM and BADMM. We first introduce a variable Z to split the constraints into two simplex such that ∆x = {X|X ≥0, Xe = a} and ∆z = {Z|Z ≥ 0, ZT e = b}. (36) can be rewritten in the following ADMM form: min ⟨C, X⟩ s.t. X ∈∆x, Z ∈∆z, X = Z . (37) (37) can be solved by ADMM which requires the Euclidean projection onto the simplex ∆x and ∆z, although the projection can be done efficiently [9]. We use BADMM to solve (37): Xt+1 = argminX∈∆x⟨C, X⟩+ ⟨Yt, X⟩+ ρKL(X, Zt) , (38) Zt+1 = argminZ∈∆z⟨Yt, −Z⟩+ ρKL(Z, Xt+1) , (39) Yt+1 = Yt + ρ(Xt+1 −Zt+1) . (40) Both (38) and (39) have closed-form solutions, i.e., Xt+1 ij = Zt ij exp(− Cij+Y t ij ρ ) Pn j=1 Zt ij exp(− Cij+Y t ij ρ ) ai , Zt+1 ij = Xt+1 ij exp( Y t ij ρ ) Pm i=1 Xt+1 ij exp( Y t ij ρ ) bj (41) which are exponentiated graident updates and can be done in O(mn). Besides the sum operation (O(ln n) or O(ln m)), (41) amounts to elementwise operation and thus can be done in parallel. According to Corollary 1, BADMM can be faster than ADMM by a factor of O(n/ ln n). We compare BADMM with ADMM and a commercial LP solver Gurobi on the mass transportation problem (36) with m = n and a = b = e. C is randomly generated from the uniform distribution. We run the experiments 5 times and the average is reported. We choose the ‘best’parameter for BADMM (ρ = 0.001) and ADMM (ρ = 0.001). The stopping condition is either when the number of iterations exceeds 2000 or when the primal-dual residual is less than 10−4. BADMM vs ADMM: Figure 1 compares BADMM and ADMM with different dimensions n = {1000, 2000, 4000} running on a single CPU. Figure 1(a) plots the primal and dual residual against 7 0 100 200 300 400 500 600 0 0.2 0.4 0.6 0.8 1 x 10 −3 runtime (s) Primal and dual residual BADMM ADMM (a) m = n = 1000 0 500 1000 1500 2000 0 0.2 0.4 0.6 0.8 1 x 10 −3 Iteration Primal and dual residual BADMM ADMM (b) m = n = 2000 0 2000 4000 6000 8000 10000 0 5 10 15 20 runtime (s) Objective value BADMM ADMM (c) m = n = 4000 Figure 1: Comparison BADMM and ADMM. BADMM converges faster than ADMM. (a): the primal and dual residual agaist the runtime. (b): the primal and dual residual over iterations. (c): The convergence of objective value against the runtime. Table 1: Comparison of BADMM (GPU) with Gurobi in solving mass transportation problem number of variables Gurobi (Laptop) Gurobi (Server) BADMM (GPU) m × n time (s) objective time (s) objective time (s) objective (210)2 > 1 million 4.22 1.69 2.66 1.69 0.54 1.69 (5 × 210)2 > 25 million 377.14 1.61 92.89 1.61 22.15 1.61 (10 × 210)2 > 0.1 billion 1235.34 1.65 117.75 1.65 (15 × 210)2 > 0.2 billion 303.54 1.63 the runtime when n = 1000, and Figure 1(b) plots the convergence of primal and dual residual over iteration when n = 2000. BADMM converges faster than ADMM. Figure 1(c) plots the convergence of objective value against the runtime when n = 4000. BADMM converges faster than ADMM even when the initial point is further from the optimum. BADMM vs Gurobi: Gurobi (http://www.gurobi.com/) is a highly optimized commercial software where linear programming solvers have been efficiently implemented. We run Gurobi on two settings: a Mac laptop with 8G memory and a server with 86G memory, respectively. For comparison, BADMM is run in parallel on a Tesla M2070 GPU with 5G memory and 448 cores1. We experiment with large scale problems and use m = n = {1, 5, 10, 15} × 210. Table 1 shows the runtime and the objective values of BADMM and Gurobi, where a ‘-’ indicates the algorithm did not terminate. In spite of Gurobi being one of the most optimized LP solvers, BADMM running in parallel is several times faster than Gurobi. In fact, for larger values of n, Gurobi did not terminate even on the 86G server, whereas BADMM was efficient even with just 5G memory! The memory consumption of Gurobi increases rapidly with the increase of n, especially at the scales we consider. When n = 5 × 210, the memory required by Gurobi surpassed the memory in the laptop, leading to the rapid increase of time. A similar situation was also observed in the server with 86G when n = 10 × 210. In contrast, the memory required by BADMM is O(n2)—even when n = 15 × 210 (more than 0.2 billion parameters), BADMM can still run on a single GPU with only 5G memory. The results clearly illustrate the promise of BADMM. With more careful implementation and code optimization, BADMM has the potential to solve large scale problems efficiently in parallel with small memory foot-print. 5 Conclusions In this paper, we generalized the alternating direction method of multipliers (ADMM) to Bregman ADMM, similar to how mirror descent generalizes gradient descent. BADMM defines a unified framework for ADMM, generalized ADMM, inexact ADMM and Bethe ADMM. The global convergence and the O(1/T) iteration complexity of BADMM are also established. In some cases, BADMM is faster than ADMM by a factor of O(n/ ln n). BADMM is also faster than highly optimized commercial software in solving the linear program of mass transportation problem. Acknowledgment The research was supported by NSF grants IIS-1447566, IIS-1422557, CCF-1451986, CNS-1314560, IIS0953274, IIS-1029711, IIS-0916750, and by NASA grant NNX12AQ39A. H.W. and A.B. acknowledge the technical support from the University of Minnesota Supercomputing Institute. H.W. acknowledges the support of DDF (2013-2014) from the University of Minnesota. A.B. acknowledges support from IBM and Yahoo. 1GPU code is available on https://github.com/anteagle/GPU_BADMM_MT 8 References [1] A. Banerjee, S. Merugu, I. Dhillon, and J. Ghosh. Clustering with Bregman divergences. JMLR, 6:1705– 1749, 2005. [2] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31:167–175, 2003. [3] A. Ben-Tal, T. Margalit, and A. Nemirovski. The ordered subsets mirror descent optimization method with applications to tomography. SIAM Journal on Optimization, 12:79–108, 2001. [4] S. Boyd, E. Chu N. Parikh, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundation and Trends Machine Learning, 3(1):1–122, 2011. [5] Y. Censor and S. Zenios. Parallel Optimization: Theory, Algorithms, and Applications. Oxford University Press, 1998. [6] G. Chen and M. Teboulle. Convergence analysis of a proximal-like minimization algorithm using bremgan functions. SIAM Journal on Optimization, 3:538–543, 1993. [7] P. Combettes and J. Pesquet. Proximal splitting methods in signal processsing. Fixed-Point Algorithms for Inverse Problems in Science and Engineering Springer (Ed.), pages 185–212, 2011. [8] W. Deng and W. Yin. On the global and linear convergence of the generalized alternating direction method of multipliers. ArXiv, 2012. [9] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the l1-ball for learning in high dimensions. In ICML, pages 272–279, 2008. [10] J. Duchi, S. Shalev-Shwartz, Y. Singer, and A. Tewari. Composite objective mirror descent. In COLT, 2010. [11] M. A. T. Figueiredo and J. M. Bioucas-Dias. Restoration of Poissonian images using alternating direction optimization. IEEE Transactions on Image Processing, 19:3133–3145, 2010. [12] Q. Fu, H. Wang, and A. Banerjee. Bethe-ADMM for tree decomposition based parallel MAP inference. In UAI, 2013. [13] D. Gabay. Applications of the method of multipliers to variational inequalities. In Augmented Lagrangian Methods: Applications to the Solution of Boundary-Value Problems. M. Fortin and R. Glowinski, eds., North-Holland: Amsterdam, 1983. [14] T. Goldstein, X. Bresson, and S. Osher. Geometric applications of the split Bregman method: segmentation and surface reconstruction. Journal of Scientific Computing, 45(1):272–293, 2010. [15] T. Goldstein, B. Donoghue, and S. Setzer. Fast alternating direction optimization methods. CAM report 12-35, UCLA, 2012. [16] T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, 2009. [17] B. He and X. Yuan. On the O(1/n) convergence rate of the Douglas-Rachford alternating direction method. SIAM Journal on Numerical Analysis, 50:700–709, 2012. [18] F. L. Hitchcock. The distribution of a product from several sources to numerous localities. Journal of Mathematical Physics, 20:224–230, 1941. [19] M. Hong and Z. Luo. On the linear convergence of the alternating direction method of multipliers. ArXiv, 2012. [20] K. C. Kiwiel. Proximal minimization methods with generalized Bregman functions. SIAM Journal on Control and Optimization, 35:1142–1168, 1995. [21] A. Nemirovski and D. Yudin. Problem Complexity and Method Efficiency in Optimization. Wiley, 1983. [22] Y. Nesterov. Gradient methods for minimizing composite objective function. Technical Report 76, Center for Operation Research and Economics (CORE), Catholic University of Louvain (UCL), 2007. [23] M. Telgarsky and S. Dasgupta. Agglomerative Bregman clustering. In ICML, 2012. [24] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1:1–305, 2008. [25] H. Wang and A. Banerjee. Online alternating direction method. In ICML, 2012. [26] J. Yang and Y. Zhang. Alternating direction algorithms for L1-problems in compressive sensing. ArXiv, 2009. 9
2014
281
5,382
Bounded Regret for Finite-Armed Structured Bandits Tor Lattimore Department of Computing Science University of Alberta, Canada tlattimo@ualberta.ca R´emi Munos INRIA Lille, France1 remi.munos@inria.fr Abstract We study a new type of K-armed bandit problem where the expected return of one arm may depend on the returns of other arms. We present a new algorithm for this general class of problems and show that under certain circumstances it is possible to achieve finite expected cumulative regret. We also give problemdependent lower bounds on the cumulative regret showing that at least in special cases the new algorithm is nearly optimal. 1 Introduction The multi-armed bandit problem is a reinforcement learning problem with K actions. At each timestep a learner must choose an action i after which it receives a reward distributed with mean µi. The goal is to maximise the cumulative reward. This is perhaps the simplest setting in which the wellknown exploration/exploitation dilemma becomes apparent, with a learner being forced to choose between exploring arms about which she has little information, and exploiting by choosing the arm that currently appears optimal. (a) µ −1 0 1 −1 0 1 (b) −1 0 1 (c) −1 0 1 θ Figure 1: Examples We consider a general class of Karmed bandit problems where the expected return of each arm may be dependent on other arms. This model has already been considered when the dependencies are linear [18] and also in the general setting studied here [12, 1]. Let Θ ∋θ∗be an arbitrary parameter space and define the expected return of arm i by µi(θ∗) ∈R. The learner is permitted to know the functions µ1 · · · µK, but not the true parameter θ∗. The unknown parameter θ∗determines the mean reward for each arm. The performance of a learner is measured by the (expected) cumulative regret, which is the difference between the expected return of the optimal policy and the (expected) return of the learner’s policy. Rn := n maxi∈1···K µi(θ∗) −Pn t=1 µIt(θ∗) where It is the arm chosen at time-step t. A motivating example is as follows. Suppose a long-running company must decide each week whether or not to purchase some new form of advertising with unknown expected returns. The problem may be formulated using the new setting by letting K = 2 and Θ = [−∞, ∞]. We assume the base-line performance without purchasing the advertising is known and so define µ1(θ) = 0 for all θ. The expected return of choosing to advertise is µ2(θ) = θ (see Figure (b) above). Our main contribution is a new algorithm based on UCB [6] for the structured bandit problem with strong problem-dependent guarantees on the regret. The key improvement over UCB is that the new algorithm enjoys finite regret in many cases while UCB suffers logarithmic regret unless all arms have the same return. For example, in (a) and (c) above we show that finite regret is possible for all 1Current affiliation: Google DeepMind. 1 θ∗, while in the advertising problem finite regret is attainable if θ∗≥0. The improved algorithm exploits the known structure and so avoids the famous negative results by Lai and Robbins [17]. One insight from this work is that knowing the return of the optimal arm and a bound on the minimum gap is not the only information that leads to the possibility of finite regret. In the examples given above neither quantity is known, but the assumed structure is nevertheless sufficient for finite regret. Despite the enormous literature on bandits, as far as we are aware this is the first time this setting has been considered with the aim of achieving finite regret. There has been substantial work on exploiting various kinds of structure to reduce an otherwise impossible problem to one where sublinear (or even logarithmic) regret is possible [19, 4, 10, and references therein], but the focus is usually on efficiently dealing with large action spaces rather than sub-logarithmic/finite regret. The most comparable previous work studies the case where both the return of the best arm and a bound on the minimum gap between the best arm and some sub-optimal arm is known [11, 9], which extended the permutation bandits studied by Lai and Robbins [16] and more general results by the same authors [15]. Also relevant is the paper by Agrawal et. al. [1], which studied a similar setting, but where Θ was finite. Graves and Lai [12] extended the aforementioned contribution to continuous parameter spaces (and also to MDPs). Their work differs from ours in a number of ways. Most notably, their objective is to compute exactly the asymptotically optimal regret in the case where finite regret is not possible. In the case where finite regret is possible they prove only that the optimal regret is sub-logarithmic, and do not present any explicit bounds on the actual regret. Aside from this the results depend on the parameter space being a metric space and they assume that the optimal policy is locally constant about the true parameter. 2 Notation General. Most of our notation is common with [8]. The indicator function is denoted by 1{expr} and is 1 if expr is true and 0 otherwise. We use log for the natural logarithm. Logical and/or are denoted by ∧and ∨respectively. Define function ω(x) = min {y ∈N : z ≥x log z, ∀z ≥y}, which satisfies log ω(x) ∈O(log x). In fact, limx→∞log(ω(x))/ log(x) = 1. Bandits. Let Θ be a set. A K-armed structured bandit is characterised by a set of functions µk : Θ →R where µk(θ) is the expected return of arm k ∈A := {1, · · · , K} given unknown parameter θ. We define the mean of the optimal arm by the function µ∗: Θ →R with µ∗(θ) := maxi µi(θ). The true unknown parameter that determines the means is θ∗∈Θ. The best arm is i∗:= arg maxi µi(θ∗). The arm chosen at time-step t is denoted by It while Xi,s is the sth reward obtained when sampling from arm i. We denote the number of times arm i has been chosen at time-step t by Ti(t). The empiric estimate of the mean of arm i based on the first s samples is ˆµi,s. We define the gap between the means of the best arm and arm i by ∆i := µ∗(θ∗) −µi(θ∗). The set of sub-optimal arms is A′ := {i ∈A : ∆i > 0}. The minimum gap is ∆min := mini∈A′ ∆i while the maximum gap is ∆max := maxi∈A ∆i. The cumulative regret is defined Rn := n X t=1 µ∗(θ∗) − n X t=1 µIt = n X t=1 ∆It Note quantities like ∆i and i∗depend on θ∗, which is omitted from the notation. As is rather common we assume that the returns are sub-gaussian, which means that if X is the return sampled from some arm, then ln E exp(λ(X −EX)) ≤λ2σ2/2. As usual we assume that σ2 is known and does not depend on the arm. If X1 · · · Xn are sampled independently from some arm with mean µ and Sn = Pn t=1 Xt, then the following maximal concentration inequality is well-known. P  max 1≤t≤n |St −tµ| ≥ε  ≤2 exp  −ε2 2nσ2  . A straight-forward corollary is that P {|ˆµi,n −µi| ≥ε} ≤2 exp  −ε2n 2σ2  . It is an important point that Θ is completely arbitrary. The classic multi-armed bandit can be obtained by setting Θ = RK and µk(θ) = θk, which removes all dependencies between the arms. The setting where the optimal expected return is known to be zero and a bound on ∆i ≥ε is known can be regained by choosing Θ = (−∞, −ε]K ×{1, · · · , K} and µk(θ1, · · · , θK, i) = θk1{k ̸= i}. We do not demand that µk : Θ →R be continuous, or even that Θ be endowed with a topology. 2 3 Structured UCB We propose a new algorithm called UCB-S that is a straight-forward modification of UCB [6], but where the known structure of the problem is exploited. At each time-step it constructs a confidence interval about the mean of each arm. From this a subspace ˜Θt ⊆Θ is constructed, which contains the true parameter θ with high probability. The algorithm takes the optimistic action over all θ ∈˜Θt. Algorithm 1 UCB-S 1: Input: functions µ1, · · · , µk : Θ →[0, 1] 2: for t ∈1, . . . , ∞do 3: Define confidence set ˜Θt ← ( ˜θ : ∀i, µi(˜θ) −ˆµi,Ti(t−1) < s ασ2 log t Ti(t −1) ) 4: if ˜Θt = ∅then 5: Choose arm arbitrarily 6: else 7: Optimistic arm is i ←arg maxi sup˜θ∈˜Θt µi(˜θ) 8: Choose arm i Remark 1. The choice of arm when ˜Θt = ∅does not affect the regret bounds in this paper. In practice, it is possible to simply increase t without taking an action, but this complicates the analysis. In many cases the true parameter θ∗is never identified in the sense that we do not expect that ˜Θt →{θ∗}. The computational complexity of UCB-S depends on the difficulty of computing ˜Θt and computing the optimistic arm within this set. This is efficient in simple cases, like when µk is piecewise linear, but may be intractable for complex functions. 4 Theorems We present two main theorems bounding the regret of the UCB-S algorithm. The first is for arbitrary θ∗, which leads to a logarithmic bound on the regret comparable to that obtained for UCB by [6]. The analysis is slightly different because UCB-S maintains upper and lower confidence bounds and selects its actions optimistically from the model class, rather than by maximising the upper confidence bound as UCB does. Theorem 2. If α > 2 and θ ∈Θ, then the algorithm UCB-S suffers an expected regret of at most ERn ≤2∆maxK(α −1) α −2 + X i∈A′ 8ασ2 log n ∆i + X i ∆i If the samples from the optimal arm are sufficient to learn the optimal action, then finite regret is possible. In Section 6 we give something of a converse by showing that if knowing the mean of the optimal arm is insufficient to act optimally, then logarithmic regret is unavoidable. Theorem 3. Let α = 4 and assume there exists an ε > 0 such that (∀θ ∈Θ) |µi∗(θ∗) −µi∗(θ)| < ε =⇒∀i ̸= i∗, µi∗(θ) > µi(θ). (1) Then ERn ≤ X i∈A′ 32σ2 log ω∗ ∆i + ∆i  + 3∆maxK + ∆maxK3 ω∗ , with ω∗:= max  ω 8σ2αK ε2  , ω 8σ2αK ∆2 min  . Remark 4. For small ε and large n the expected regret looks like ERn ∈O K X i=1 log 1 ε  ∆i ! (for small n the regret is, of course, even smaller). The explanation of the bound is as follows. If at some time-step t it holds that all confidence intervals contain the truth and the width of the confidence interval about i∗drops below ε, then by the condition in Equation (1) it holds that i∗is the optimistic arm within ˜Θt. In this case UCB-S 3 suffers no regret at this time-step. Since the number of samples of each sub-optimal arm grows at most logarithmically by the proof of Theorem 2, the number of samples of the best arm must grow linearly. Therefore the number of time-steps before best arm has been pulled O(ε−2) times is also O(ε−2). After this point the algorithm suffers only a constant cumulative penalty for the possibility that the confidence intervals do not contain the truth, which is finite for suitably chosen values of α. Note that Agrawal et. al. [1] had essentially the same condition to achieve finite regret as (1), but specified to the case where Θ is finite. An interesting question is raised by comparing the bound in Theorem 3 to those given by Bubeck et. al. [11] where if the expected return of the best arm is known and ε is a known bound on the minimum gap, then a regret bound of O X i∈A′ log 2∆i ε  ∆i  1 + log log 1 ε !! (2) is achieved. If ε is close to ∆i, then this bound is an improvement over the bound given by Theorem 3, although our theorem is more general. The improved UCB algorithm [7] enjoys a bound on the expected regret of O(P i∈A′ 1 ∆i log n∆2 i ). If we follow the same reasoning as above we obtain a bound comparable to (2). Unfortunately though, the extension of the improved UCB algorithm to the structured setting is rather challenging with the main obstruction being the extreme growth of the phases used by improved UCB. Refining the phases leads to super-logarithmic regret, a problem we ultimately failed to resolve. Nevertheless we feel that there is some hope of obtaining a bound like (2) in this setting. Before the proofs of Theorems 2 and 3 we give some example structured bandits and indicate the regions where the conditions for Theorem 3 are (not) met. Areas where Theorem 3 can be applied to obtain finite regret are unshaded while those with logarithmic regret are shaded. µ −1 0 1 −1 0 1 (a) −1 0 1 (b) −1 0 1 (c) θ µ1 µ2 µ3 Key: a hidden message µ −1 0 1 −1 0 1 (d) (e) −1 0 1 θ (f) −1 1 2 3 4 5 6 Figure 2: Examples (a) The conditions for Theorem 3 are met for all θ ̸= 0, but for θ = 0 the regret strictly vanishes for all policies, which means that the regret is bounded by ERn ∈O(1{θ∗̸= 0} 1 |θ∗| log 1 |θ∗|). (b) Action 2 is uninformative and not globally optimal so Theorem 3 does not apply for θ < 1/2 where this action is optimal. For θ > 0 the optimal action is 1, when the conditions are met and finite regret is again achieved. ERn ∈O  1{θ∗< 0} log n |θ∗| + 1{θ∗> 0} log 1 θ∗ θ∗  . (c) The conditions for Theorem 3 are again met for all non-zero θ∗, which leads as in (a) to a regret of ERn ∈O(1{θ∗̸= 0} 1 |θ∗| log 1 |θ∗|). Examples (d) and (e) illustrate the potential complexity of the regions in which finite regret is possible. Note especially that in (e) the regret for θ∗= 1 2 is logarithmic in the horizon, but finite for θ∗ arbitrarily close. Example (f) is a permutation bandit with 3 arms where it can be clearly seen that the conditions of Theorem 3 are satisfied. 4 5 Proof of Theorems 2 and 3 We start by bounding the probability that some mean does not lie inside the confidence set. Lemma 5. P {Ft = 1} ≤2Kt exp(−α log(t)) where Ft = 1 ( ∃i : |ˆµi,Ti(t−1) −µi| ≥ s 2ασ2 log t Ti(t −1) ) . Proof. We use the concentration guarantees: P {Ft = 1} (a) = P ( ∃i : µi(θ∗) −ˆµi,Ti(t−1) ≥ s 2ασ2 log t Ti(t −1) ) (b) ≤ K X i=1 P ( µi(θ∗) −ˆµi,Ti(t−1) ≥ s 2ασ2 log t Ti(t −1) ) (c) ≤ K X i=1 t X s=1 P ( |µi(θ∗) −ˆµi,s| ≥ r 2ασ2 log t s ) (d) ≤ K X i=1 t X s=1 2 exp(−α log t) (e) = 2Kt1−α where (a) follows from the definition of Ft. (b) by the union bound. (c) also follows from the union bound and is the standard trick to deal with the random variable Ti(t −1). (d) follows from the concentration inequalities for sub-gaussian random variables. (e) is trivial. Proof of Theorem 2. Let i be an arm with ∆i > 0 and suppose that It = i. Then either Ft is true or Ti(t −1) < 8σ2α log n ∆2 i  =: ui(n) (3) Note that if Ft does not hold then the true parameter lies within the confidence set, θ∗∈˜Θt. Suppose on the contrary that Ft and (3) are both false. max ˜θ∈˜Θt µi∗(˜θ) (a) ≥µ∗(θ∗) (b) = µi(θ∗) + ∆i (c) > ∆i + ˆµi,Ti(t−1) − s 2σ2α log t Ti(t −1) (d) ≥ˆµi,Ti(t−1) + s 2ασ2 log t Ti(t −1) (e) ≥max ˜θ∈˜Θt µi(˜θ), where (a) follows since θ∗∈˜Θt. (b) is the definition of the gap. (c) since Ft is false. (d) is true because (3) is false. Therefore arm i is not taken. We now bound the expected number of times that arm i is played within the first n time-steps by ETi(n) (a) = E n X t=1 1{It = i} (b) ≤ui(n) + E n X t=ui+1 1{It = i ∧(3) is false} (c) ≤ui(n) + E n X t=ui+1 1{Ft = 1 ∧It = i} where (a) follows from the linearity of expectation and definition of Ti(n). (b) by Equation (3) and the definition of ui(n) and expectation. (c) is true by recalling that playing arm i at time-step t implies that either Ft or (3) must be true. Therefore ERn ≤ X i∈A′ ∆i ui(n) + E n X t=ui+1 1{Ft = 1 ∧It = i} ! ≤ X i∈A′ ∆iui(n) + ∆maxE n X t=1 1{Ft = 1} (4) Bounding the second summation E n X t=1 1{Ft = 1} (a) = n X t=1 P {Ft = 1} (b) ≤ n X t=1 2Kt1−α (c) ≤2K(α −1) α −2 5 where (a) follows by exchanging the expectation and sum and because the expectation of an indicator function can be written as the probability of the event. (b) by Lemma 5 and (c) is trivial. Substituting into (4) leads to ERn ≤2∆maxK(α −1) α −2 + X i∈A′ 8ασ2 log n ∆i + X i ∆i. Before the proof of Theorem 3 we need a high-probability bound on the number of times arm i is pulled, which is proven along the lines of similar results by [5]. Lemma 6. Let i ∈A′ be some sub-optimal arm. If z > ui(n), then P {Ti(n) > z} ≤2Kz2−α α −2 . Proof. As in the proof of Theorem 2, if t ≤n and Ft is false and Ti(t −1) > ui(n) ≥ui(t), then arm i is not chosen. Therefore P {Ti(n) > z} ≤ n X t=z+1 P {Ft = 1} (a) ≤ n X t=z+1 2Kt1−α (b) ≤2K Z n z t1−αdt (c) ≤2Kz2−α α −2 where (a) follows from Lemma 5 and (b) and (c) are trivial. Lemma 7. Assume the conditions of Theorem 3 and additionally that Ti∗(t−1) ≥ l 8ασ2 log t ε2 m and Ft is false. Then It = i∗. Proof. Since Ft is false, for ˜θ ∈˜Θt we have: |µi∗(˜θ) −µi∗(θ∗)| (a) ≤|µi∗(˜θ) −ˆµi∗,Ti(t−1)| + |ˆµi∗,Ti(t−1) −µi∗(θ∗)| (b) < 2 s 2σ2α log t Ti∗(t −1) (c) ≤ε where (a) is the triangle inequality. (b) follows by the definition of the confidence interval and because Ft is false. (c) by the assumed lower bound on Ti∗(t −1). Therefore by (1), for all ˜θ ∈˜Θt it holds that the best arm is i∗. Finally, since Ft is false, θ∗∈˜Θt, which means that ˜Θt ̸= ∅. Therefore It = i∗as required. Proof of Theorem 3. Let ω∗be some constant to be chosen later. Then the regret may be written as ERn ≤E ω∗ X t=1 K X i=1 ∆i1{It = i} + ∆maxE n X t=ω∗+1 1{It ̸= i∗} . (5) The first summation is bounded as in the proof of Theorem 2 by E ω∗ X t=1 X i∈A ∆i1{It = i} ≤ X i∈A′  ∆i + 8ασ2 log ω∗ ∆i  + ω∗ X t=1 P {Ft = 1} . (6) We now bound the second sum in (5) and choose ω∗. By Lemma 6, if n K > ui(n), then P n Ti(n) > n K o ≤ 2K α −2 K n α−2 . (7) Suppose t ≥ω∗:= max n ω  8σ2αK ε2  , ω  8σ2αK ∆2 min o . Then t K > ui(t) for all i ̸= i∗and t K ≥ 8σ2α log t ε2 . By the union bound P  Ti∗(t) < 8σ2α log t ε2  (a) ≤P  Ti∗(t) < t K  (b) ≤P  ∃i : Ti(t) > t K  (c) < 2K2 α −2 K t α−2 (8) 6 where (a) is true since t K ≥8σ2α log t ε2 . (b) since PK i=1 Ti(t) = t. (c) by the union bound and (7). Now if Ti(t) ≥8σ2α log t ε2 and Ft is false, then the chosen arm is i∗. Therefore E n X t=ω∗+1 1{It ̸= i∗} ≤ n X t=ω∗+1 P {Ft = 1} + n X t=ω∗+1 P  Ti(t −1) < 8σ2α log t ε2  (a) ≤ n X t=ω∗+1 P {Ft = 1} + 2K2 α −2 n X t=ω∗+1 K t α−2 (b) ≤ n X t=ω∗+1 P {Ft = 1} + 2K2 (α −2)(α −3)  K ω∗ α−3 (9) where (a) follows from (8) and (b) by straight-forward calculus. Therefore by combining (5), (6) and (9) we obtain ERn ≤ X i:∆i>0 ∆i 8σ2α log ω∗ ∆2 i  + 2∆maxK2 (α −2)(α −3)  K ω∗ α−3 + ∆max n X t=1 P {Ft = 1} ≤ X i:∆i>0 ∆i 8σ2α log ω∗ ∆2 i  + 2∆maxK2 (α −2)(α −3)  K ω∗ α−3 + 2∆maxK(α −1) α −2 Setting α = 4 leads to ERn ≤ K X i=1 32σ2 log ω∗ ∆i + ∆i  + 3∆maxK + ∆maxK3 ω∗ . 6 Lower Bounds and Ambiguous Examples We prove lower bounds for two illustrative examples of structured bandits. Some previous work is also relevant. The famous paper by Lai and Robbins [17] shows that the bound of Theorem 2 cannot in general be greatly improved. Many of the techniques here are borrowed from Bubeck et. al. [11]. Given a fixed algorithm and varying θ we denote the regret and expectation by Rn(θ) and Eθ respectively. Returns are assumed to be sampled from a normal distribution with unit variance, so that σ2 = 1. The proofs of the following theorems may be found in the supplementary material. (a) µ −1 0 1 −1 0 1 ∆ ∆ −1 0 1 (b) (c) −1 0 1 (d) −1 0 1 µ1 µ2 Key: a hidden message Figure 3: Counter-examples Theorem 8. Given the structured bandit depicted in Figure 3.(a) or Figure 2.(c), then for all θ > 0 and all algorithms the regret satisfies max {E−θRn(−θ), EθRn(θ)} ≥ 1 8θ for sufficiently large n. Theorem 9. Let Θ, {µ1, µ2} be a structured bandit where returns are sampled from a normal distribution with unit variance. Assume there exists a pair θ1, θ2 ∈Θ and constant ∆> 0 such that µ1(θ1) = µ1(θ2) and µ1(θ1) ≥µ2(θ1) + ∆and µ2(θ2) ≥µ1(θ2) + ∆. Then the following hold: (1) Eθ1Rn(θ1) ≥1+log 2n∆2 8∆ −1 2Eθ2Rn(θ2) (2) Eθ2Rn(θ2) ≥n∆ 2 exp (−4Eθ1Rn(θ1)∆) −Eθ1Rn(θ1) A natural example where the conditions are satisfied is depicted in Figure 3.(b) and by choosing θ1 = −1, θ2 = 1. We know from Theorem 3 that UCB-S enjoys finite regret of Eθ2Rn(θ2) ∈O( 1 ∆log 1 ∆) and logarithmic regret Eθ1Rn(θ1) ∈O( 1 ∆log n). Part 1 of Theorem 9 shows that if we demand finite regret Eθ2Rn(θ2) ∈O(1), then the regret Eθ1Rn(θ1) is necessarily logarithmic. On the other 7 hand, part 2 shows that if we demand Eθ1Rn(θ1) ∈o(log(n)), then the regret Eθ2Rn(θ2) ∈Ω(n). Therefore the trade-off made by UCB-S essentially cannot be improved. Discussion of Figure 3.(c/d). In both examples there is an ambiguous region for which the lower bound (Theorem 9) does not show that logarithmic regret is unavoidable, but where Theorem 3 cannot be applied to show that UCB-S achieves finite regret. We managed to show that finite regret is possible in both cases by using a different algorithm. For (c) we could construct a carefully tuned algorithm for which the regret was at most O(1) if θ ≤0 and O( 1 θ log log 1 θ) otherwise. This result contradicts a claim by Bubeck et. al. [11, Thm. 8]. Additional discussion of the ambiguous case in general, as well as this specific example, may be found in the supplementary material. One observation is that unbridled optimism is the cause of the failure of UCB-S in these cases. This is illustrated by Figure 3.(d) with θ ≤0. No matter how narrow the confidence interval about µ1, if the second action has not been taken sufficiently often, then there will still be some belief that θ > 0 is possible where the second action is optimistic, which leads to logarithmic regret. Adapting the algorithm to be slightly risk averse solves this problem. 7 Experiments We tested Algorithm 1 on a selection of structured bandits depicted in Figure 2 and compared to UCB [6, 8]. Rewards were sampled from normal distributions with unit variances. For UCB we chose α = 2, while we used the theoretically justified α = 4 for Algorithm 1. All code is available in the supplementary material. Each data-point is the average of 500 independent samples with the blue crosses and red squares indicating the regret of UCB-S and UCB respectively. −0.2 −0.1 0 0.1 0.2 0 100 200 θ ˆEθRn(θ) K = 2, µ1(θ) = θ, µ2(θ) = −θ, n = 50 000 (see Figure 2.(a)) 0 5e4 1e5 0 100 200 n ˆEθRn(θ) K = 2, µ1(θ) = θ, µ2(θ) = −θ, θ = 0.04 (see Figure 2.(a)) −1 0 1 0 200 400 θ ˆEθRn(θ) K = 2, µ1(θ) = 0, µ2(θ) = θ, n = 50 000 (see Figure 2.(b)) The results show that Algorithm 1 typically out-performs regular UCB. The exception is the top right experiment where UCB performs slightly better for θ < 0. This is not surprising, since in this case the structured version of UCB cannot exploit the additional structure and suffers due to worse constant factors. On the other hand, if θ > 0, then UCB endures logarithmic regret and performs significantly worse than its structured counterpart. The superiority of Algorithm 1 would be accentuated in the top left and bottom right experiments by increasing the horizon. −1 0 1 0 50 100 150 θ ˆEθRn(θ) K = 2, µ1(θ) = θ1{θ > 0}, µ2(θ) = −θ1{θ < 0}, n = 50 000 (see Figure 2.(c)) 8 Conclusion The limitation of the new approach is that the proof techniques and algorithm are most suited to the case where the number of actions is relatively small. Generalising the techniques to large action spaces is therefore an important open problem. There is still a small gap between the upper and lower bounds, and the lower bounds have only been proven for special examples. Proving a general problem-dependent lower bound is an interesting question, but probably extremely challenging given the flexibility of the setting. We are also curious to know if there exist problems for which the optimal regret is somewhere between finite and logarithmic. Another question is that of how to define Thompson sampling for structured bandits. Thompson sampling has recently attracted a great deal of attention [13, 2, 14, 3, 9], but so far we are unable even to define an algorithm resembling Thompson sampling for the general structured bandit problem. Acknowledgements. Tor Lattimore was supported by the Google Australia Fellowship for Machine Learning and the Alberta Innovates Technology Futures, NSERC. The majority of this work was completed while R´emi Munos was visiting Microsoft Research, New England. This research was partially supported by the European Community’s Seventh Framework Programme under grant agreements no. 270327 (project CompLACS). 8 References [1] Rajeev Agrawal, Demosthenis Teneketzis, and Venkatachalam Anantharam. Asymptotically efficient adaptive allocation schemes for controlled markov chains: Finite parameter space. Automatic Control, IEEE Transactions on, 34(12):1249–1259, 1989. [2] Shipra Agrawal and Navin Goyal. Analysis of Thompson sampling for the multi-armed bandit problem. In In Proceedings of the 25th Annual Conference on Learning Theory, 2012. [3] Shipra Agrawal and Navin Goyal. Further optimal regret bounds for thompson sampling. In In Proceedings of the 16th International Conference on Artificial Intelligence and Statistics, volume 31, pages 99–107, 2013. [4] Kareem Amin, Michael Kearns, and Umar Syed. Bandits, query learning, and the haystack dimension. Journal of Machine Learning Research-Proceedings Track, 19:87–106, 2011. [5] Jean-Yves Audibert, R´emi Munos, and Csaba Szepesv´ari. Variance estimates and exploration function in multi-armed bandit. Technical report, research report 07-31, Certis-Ecole des Ponts, 2007. [6] Peter Auer, Nicol´o Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47:235–256, 2002. [7] Peter Auer and Ronald Ortner. UCB revisited: Improved regret bounds for the stochastic multi-armed bandit problem. Periodica Mathematica Hungarica, 61(1-2):55–65, 2010. [8] S´ebastien Bubeck and Nicol`o Cesa-Bianchi. Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems. Foundations and Trends in Machine Learning. Now Publishers Incorporated, 2012. [9] S´ebastien Bubeck and Che-Yu Liu. Prior-free and prior-dependent regret bounds for thompson sampling. In Advances in Neural Information Processing Systems, pages 638–646, 2013. [10] S´ebastien Bubeck, R´emi Munos, Gilles Stoltz, and Csaba Szepesv´ari. Online optimization in X-armed bandits. In NIPS, pages 201–208, 2008. [11] S´ebastien Bubeck, Vianney Perchet, and Philippe Rigollet. Bounded regret in stochastic multiarmed bandits. In In Proceedings of the 26th Annual Conference on Learning Theory, 2013. [12] Todd L Graves and Tze Leung Lai. Asymptotically efficient adaptive choice of control laws in controlled Markov chains. SIAM journal on control and optimization, 35(3):715–743, 1997. [13] Emilie Kaufmann, Nathaniel Korda, and R´emi Munos. Thompson sampling: An asymptotically optimal finite-time analysis. In Algorithmic Learning Theory, pages 199–213. Springer, 2012. [14] Nathaniel Korda, Emilie Kaufmann, and R´emi Munos. Thompson sampling for 1-dimensional exponential family bandits. In Advances in Neural Information Processing Systems, pages 1448–1456, 2013. [15] Tze Leung Lai and Herbert Robbins. Asymptotically optimal allocation of treatments in sequential experiments. In T. J. Santner and A. C. Tamhane, editors, Design of Experiments: Ranking and Selection, pages 127–142. 1984. [16] Tze Leung Lai and Herbert Robbins. Optimal sequential sampling from two populations. Proceedings of the National Academy of Sciences, 81(4):1284–1286, 1984. [17] Tze Leung Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in applied mathematics, 6(1):4–22, 1985. [18] Adam J Mersereau, Paat Rusmevichientong, and John N Tsitsiklis. A structured multiarmed bandit problem and the greedy policy. Automatic Control, IEEE Transactions on, 54(12):2787– 2802, 2009. [19] Dan Russo and Benjamin Van Roy. Eluder dimension and the sample complexity of optimistic exploration. In Advances in Neural Information Processing Systems, pages 2256–2264, 2013. 9
2014
282
5,383
Exponential Concentration of a Density Functional Estimator Shashank Singh Statistics & Machine Learning Departments Carnegie Mellon University Pittsburgh, PA 15213 sss1@andrew.cmu.edu Barnab´as P´oczos Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 bapoczos@cs.cmu.edu Abstract We analyze a plug-in estimator for a large class of integral functionals of one or more continuous probability densities. This class includes important families of entropy, divergence, mutual information, and their conditional versions. For densities on the d-dimensional unit cube [0, 1]d that lie in a β-H¨older smoothness class, we prove our estimator converges at the rate O  n− β β+d  . Furthermore, we prove the estimator is exponentially concentrated about its mean, whereas most previous related results have proven only expected error bounds on estimators. 1 Introduction Many important quantities in machine learning and statistics can be viewed as integral functionals of one of more continuous probability densities; that is, quanitities of the form F(p1, · · · , pk) = Z X1×···×Xk f(p1(x1), . . . , pk(xk)) d(x1, . . . , xk), where p1, · · · , pk are probability densities of random variables taking values in X1, · · · , Xk, respectively, and f : Rk →R is some measurable function. For simplicity, we refer to such integral functionals of densities as ‘density functionals’. In this paper, we study the problem of estimating density functionals. In our framework, we assume that the underlying distributions are not given explicitly. Only samples of n independent and identically distributed (i.i.d.) points from each of the unknown, continuous, nonparametric distributions p1, · · · , pk are given. 1.1 Motivations and Goals One density functional of interest is Conditional Mutual Information (CMI), a measure of conditional dependence of random variables, which comes in several varieties including R´enyi-α and Tsallis-α CMI (of which Shannon CMI is the α →1 limit case). Estimating conditional dependence in a consistent manner is a crucial problem in machine learning and statistics; for many applications, it is important to determine how the relationship between two variables changes when we observe additional variables. For example, upon observing a third variable, two correlated variables may become independent, and, similarly, two independent variables may become dependent. Hence, CMI estimators can be used in many scientific areas to detect confounding variables and avoid infering causation from apparent correlation [19, 16]. Conditional dependencies are also central to Bayesian network learning [7, 34], where CMI estimation can be used to verify compatibility of a particular Bayes net with observed data under a local Markov assumption. Other important density functionals are divergences between probability distributions, including R´enyi-α [24] and Tsallis-α [31] divergences (of which Kullback-Leibler (KL) divergence [9] is the 1 α →1 limit case), and Lp divergence. Divergence estimators can be used to extend machine learning algorithms for regression, classification, and clustering from the standard setting where inputs are finite-dimensional feature vectors to settings where inputs are sets or distributions [22, 18]. Entropy and mutual information (MI) can be estimated as special cases of divergences. Entropy estimators are used in goodness-of-fit testing [5], parameter estimation in semi-parametric models [33], and texture classification [6], and MI estimators are used in feature selection [20], clustering [1], optimal experimental design [13], and boosting and facial expression recognition [25]. Both entropy and mutual information estimators are used in independent component and subspace analysis [10, 29] and image registration [6]. Further applications of divergence estimation are in [11]. Despite the practical utility of density functional estimators, little is known about their statistical performance, especially for functionals of more than one density. In particular, few density functional estimators have known convergence rates, and, to the best of our knowledge, no finite sample exponential concentration bounds have been derived for general density functional estimators. One consequence of this exponential bound is that, using a union bound, we can guarantee accuracy of multiple estimates simultaneously. For example, [14] shows how this can be applied to optimally analyze forest density estimation algorithms. Because the CMI of variables X and Y given a third variable Z is zero if and only X and Y are conditionally independent given Z, by estimating CMI with a confidence interval, we can test for conditional independence with bounded type I error probabilty. Our main contribution is to derive convergence rates and an exponential concentration inequality for a particular, consistent, nonparametric estimator for large class of density functionals, including conditional density functionals. We also apply our concentration inequality to the important case of R´enyi-α CMI. 1.2 Related Work Although lower bounds are not known for estimation of general density functionals (of arbitrarily many densities), [2] lower bounded the convergence rate for estimators of functionals of a single density (e.g., entropy functionals) by O n−4β/(4β+d) . [8] extended this lower bound to the twodensity cases of L2, R´enyi-α, and Tsallis-α divergences and gave plug-in estimators which achieve this rate. These estimators enjoy the parametric rate of O n−1/2 when β > d/4, and work by optimally estimating the density and then applying a correction to the plug-in estimate. In contrast, our estimator undersmooths the density, and converges at a slower rate of O n−β/(β+d) when β < d (and the parametric rate O n−1/2 when β ≥d), but obeys an exponential concentration inequality, which is not known for the estimators of [8]. Another exception for f-divergences is provided by [17], using empirical risk minimization. This approach involves solving an ∞-dimensional convex minimization problem which be reduced to an n-dimensional problem for certain function classes defined by reproducing kernel Hilbert spaces (n is the sample size). When n is large, these optimization problems can still be very demanding. They studied the estimator’s convergence rate, but did not derive concentration bounds. A number of papers have studied k-nearest-neighbors estimators, primarily for R´enyiα density functionals including entropy [12], divergence [32] and conditional divergence and MI [21]. These estimators work directly, without the intermediate density estimation step, and generally have proofs of consistency, but their convergence rates and dependence on k, α, and the dimension are unknown. One exception for the entropy case is a k-nearest-neighbors based estimator that converges at the parametric rate when β > d, using an ensemble of weak estimators [27]. Although the literature on dependence measures is huge, few estimators have been generalized to the conditional case [4, 23]. There is some work on testing conditional dependence [28, 3], but, unlike CMI estimation, these tests are intended to simply accept or reject the hypothesis that variables are conditionally independent, rather than to measure conditional dependence. Our exponential concentration inequality also suggests a new test for conditional independence. This paper continues a line of work begin in [14] and continued in [26]. [14] proved an exponential concentration inequality for an estimator of Shannon entropy and MI in the 2-dimensional case. [26] used similar techniques to derive an exponential concentration inequality for an estimator of R´enyi-α divergence in d dimensions, for a larger family of densities. Both used plug-in estimators 2 based on a mirrored kernel density estimator (KDE) on [0, 1]d. Our work generalizes these results to a much larger class of density functionals, as well as to conditional density functionals (see Section 6). In particular, we use a plug-in estimator for general density functionals based on the same mirrored KDE, and also use some lemmas regarding this KDE proven in [26]. By considering the more general density functional case, we are also able to significantly simplify the proofs of the convergence rate and exponential concentration inequality. Organization In Section 2, we establish the theoretical context of our work, including notation, the precise problem statement, and our estimator. In Section 3, we outline our main theoretical results and state some consequences. Sections 4 and 5 give precise statements and proofs of the results in Section 3. Finally, in Section 6, we extend our results to conditional density functionals, and state the consequences in the particular case of R´enyi-α CMI. 2 Density Functional Estimator 2.1 Notation For an integer k, [k] = {1, · · · , k} denotes the set of positive integers at most k. Using the notation of multi-indices common in multivariable calculus, Nd denotes the set of d-tuples of non-negative integers, which we denote with a vector symbol⃗·, and, for⃗i ∈Nd, D ⃗i := ∂|⃗i| ∂i1x1 · · · ∂idxd and |⃗i| = d X k=1 ik. For fixed β, L > 0, r ≥1, and a positive integer d, we will work with densities in the following bounded subset of a β-H¨older space: Cβ L,r([0, 1]d) :=      p : [0, 1]d →R sup x̸=y∈D |⃗i|=ℓ |D⃗ip(x) −D⃗ip(y)| ∥x −y∥(β−ℓ)      , (1) where ℓ= ⌊β⌋is the greatest integer strictly less than β, and ∥· ∥r : Rd →R is the usual r-norm. To correct for boundary bias, we will require the densities to be nearly constant near the boundary of [0, 1]d, in that their derivatives vanish at the boundary. Hence, we work with densities in Σ(β, L, r, d) := ( p ∈Cβ L,r([0, 1]d) max 1≤|⃗i|≤ℓ |D ⃗ip(x)| →0 as dist(x, ∂[0, 1]d) →0 ) , (2) where ∂[0, 1]d = {x ∈[0, 1]d : xj ∈{0, 1} for some j ∈[d]}. 2.2 Problem Statement For each i ∈[k] let Xi be a di-dimensional random vector taking values in Xi := [0, 1]di, distributed according to a density pi : X →R. For an appropriately smooth function f : Rk →R, we are interested in a using random sample of n i.i.d. points from the distribution of each Xi to estimate F(p1, . . . , pk) := Z X1×···×Xk f(p1(x1), . . . , pk(xk)) d(x1, . . . , xk). (3) 2.3 Estimator For a fixed bandwidth h, we first use the mirrored kernel density estimator (KDE) ˆpi described in [26] to estimate each density pi. We then use a plug-in estimate of F(p1, . . . , pk). F(ˆp1, . . . , ˆpk) := Z X1×···×Xk f(ˆp1(x1), . . . , ˆpk(xk)) d(x1, . . . , xk). Our main results generalize those of [26] to a broader class of density functionals. 3 3 Main Results In this section, we outline our main theoretical results, proven in Sections 4 and 5, and also discuss some important corollaries. We decompose the estimatator’s error into bias and a variance-like terms via the triangle inequality: |F(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ≤|F(ˆp1, . . . , ˆpk) −EF(ˆp1, . . . , ˆpk)| | {z } variance-like term + |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| | {z } bias term . We will prove the “variance” bound P (|F(ˆp1, . . . , ˆpk) −EF(ˆp1, . . . , ˆpk)| > ε) ≤2 exp  −2ε2n C2 V  (4) for all ε > 0 and the bias bound |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ≤CB  hβ + h2β + 1 nhd  , (5) where d := maxi di, and CV and CB are constant in the sample size n and bandwidth h for exact values. To the best of our knowledge, this is the first time an exponential inequality like (4) has been established for general density functional estimation. This variance bound does not depend on h and the bias bound is minimized by h ≍n− 1 β+d , we have the convergence rate |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ∈O  n− β β+d  . It is interesting to note that, in optimizing the bandwidth for our density functional estimate, we use a smaller bandwidth than is optimal for minimizing the bias of the KDE. Intuitively, this reflects the fact that the plug-in estimator, as an integral functional, performs some additional smoothing. We can use our exponential concentration bound to obtain a bound on the true variance of F(ˆp1, . . . , ˆpk). If G : [0, ∞) →R denotes the cumulative distribution function of the squared deviation of F(ˆp1, . . . , ˆpk) from its mean, then 1 −G(ε) = P  (F(ˆp1, . . . , ˆpk) −EF(ˆp1, . . . , ˆpk))2 > ε  ≤2 exp  −2εn C2 V  . Thus, V[F(ˆp1, . . . , ˆpk)] = E h (F(ˆp1, . . . , ˆpk) −EF(ˆp1, . . . , ˆpk))2i = Z ∞ 0 1 −G(ε) dε ≤2 Z ∞ 0 exp  −2εn C2 V  = C2 V n−1. We then have a mean squared error of E h (F(ˆp1, . . . , ˆpk) −F(p1, . . . , pk))2i ∈O  n−1 + n−2β β+d  , which is in O(n−1) if β ≥d and O  n−2β β+d  otherwise. It should be noted that the constants in both the bias bound and the variance bound depend exponentially on the dimension d. Lower bounds in terms of d are unknown for estimating most density functionals of interest, and an important open problem is whether this dependence can be made asymptotically better than exponential. 4 Bias Bound In this section, we precisely state and prove the bound on the bias of our density functional estimator, as introduced in Section 3. 4 Assume each pi ∈Σ(β, L, r, d) (for i ∈[k]), assume f : Rk →R is twice continuously differentiable, with first and second derivatives all bounded in magnitude by some Cf ∈R, 1 and assume the kernel K : R →R has bounded support [−1, 1] and satisfies Z 1 −1 K(u) du = 1 and Z 1 −1 ujK(u) du = 0 for all j ∈{1, . . . , ℓ}. Then, there exists a constant CB ∈R such that |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ≤CB  hβ + h2β + 1 nhd  . 4.1 Proof of Bias Bound By Taylor’s Theorem, ∀x = (x1, . . . , xk) ∈X1 × · · · × Xk, for some ξ ∈Rk on the line segment between ˆp(x) := (ˆp1(x1), . . . , ˆpk(xk)) and p(x) := (p1(x1), . . . , pk(xk)), letting Hf denote the Hessian of f |Ef(ˆp(x)) −f(p(x))| = E(∇f)(p(x)) · (ˆp(x) −p(x)) + 1 2(ˆp(x) −p(x))T Hf(ξ)(ˆp(x) −p(x)) ≤Cf   k X i=1 |Bpi(xi)| + X i<j≤k |Bpi(xi)Bpj(xj)| + k X i=1 E[ˆpi(xi) −pi(xi)]2   where we used that ˆpi and ˆpj are independent for i ̸= j. Applying H¨older’s Inequality, |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ≤ Z X1×···×Xk |Ef(ˆp(x)) −f(p(x))| dx ≤Cf   k X i=1 Z Xi |Bpi(xi)| + E[ˆpi(xi) −pi(xi)]2 dxi + X i<j≤k Z Xi |Bpi(xi)| dxi Z Xj |Bpj(xj)| dxj   ≤Cf k X i=1 sZ Xi B2pi(xi) dxi + Z Xi E[ˆpi(xi) −pi(xi)]2 dxi + X i<j≤k sZ Xi B2pi(xi) dxi Z Xj B2pj(xj) dxj ! . We now make use of the so-called Bias Lemma proven by [26], which bounds the integrated squared bias of the mirrored KDE ˆp on [0, 1]d for an arbitrary p ∈Σ(β, L, r, d). Writing the bias of ˆp at x ∈[0, 1]d as Bp(x) = Eˆp(x) −p(x), [26] showed that there exists C > 0 constant in n and h such that Z [0,1]d B2 p(x) dx ≤Ch2β. (6) Applying the Bias Lemma and certain standard results in kernel density estimation (see, for example, Propositions 1.1 and 1.2 of [30]) gives |EF(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| ≤C k2hβ + kh2β + ∥K∥d 1 nhd ≤CB  hβ + h2β + 1 nhd  , where ∥K∥1 denotes the 1-norm of the kernel. ■ 1If p1(X1) × · · · × pk(Xk) is known to lie within some cube [κ1, κ2]k, then it suffices for f to be twice continuously differentiable on [κ1, κ2]k (and the boundedness condition follows immediately). This will be important for our application to R´enyi-α Conditional Mutual Information. 5 5 Variance Bound In this section, we precisely state and prove the exponential concentration inequality for our density functional estimator, as introduced in Section 3. Assume that f is Lipschitz continuous with constant Cf in the 1-norm on p1(X1) × · · · × pk(Xk) (i.e., |f(x) −f(y)| ≤Cf ∞ X k=1 |xi −yi|, ∀x, y ∈p1(X1) × · · · × pk(Xk)). (7) and assume the kernel K ∈L1(R) (i.e., it has finite 1-norm). Then, there exists a constant CV ∈R such that ∀ε > 0, P (|F(ˆp1, . . . , ˆpk) −EF(ˆp1, . . . , ˆpk)|) ≤2 exp  −2ε2n C2 V  . Note that, while we require no assumptions on the densities here, in certain specific applications, such us for some R´enyi-α quantities, where f = log, assumptions such as lower bounds on the density may be needed to ensure f is Lipschitz on its domain. 5.1 Proof of Variance Bound Consider i.i.d. samples (x1 1, . . . , xn k) ∈X1 × · · · × Xk drawn according to the product distribution p = p1 ×· · · pk. In anticipation of using McDiarmid’s Inequality [15], let ˆp′ j denote the jth mirrored KDE when the sample xi j is replaced by new sample (xi j)′. Then, applying the Lipschitz condition (7) on f, |F(ˆp1, . . . , ˆpk) −F(ˆp1, . . . , ˆp′ j, . . . , ˆpk)| ≤Cf Z Xj |pj(x) −p′ j(x)| dx, since most terms of the sum in (7) are zero. Expanding the definition of the kernel density estimates ˆpj and ˆp′ j and noting that most terms of the mirrored KDEs ˆpj and ˆp′ j are identical gives |F(ˆp1, . . . , ˆpk) −F(ˆp1, . . . , ˆp′ j, . . . , ˆpk)| = Cf nhdj Z Xj Kdj x −xi j h ! −Kdj x −(xi j)′ h ! dx where Kdj denotes the dj-dimensional mirrored product kernel based on K. Performing a change of variables to remove h and applying the triangle inequality followed by the bound on the integral of the mirrored kernel proven in [26], |F(ˆp1, . . . , ˆpk) −F(ˆp1, . . . , ˆp′ j, . . . , ˆpk)| ≤Cf n Z hXj Kdj(x −xi j) −Kdj(x −(xi j)′) dx ≤2Cf n Z [−1,1]dj |Kdj(x)| dx ≤2Cf n ∥K∥dj 1 = CV n , (8) for CV = 2Cf maxj ∥K∥dj 1 . Since F(ˆp1, . . . , ˆpk) depends on kn independent variables, McDiarmid’s Inequality then gives, for any ε > 0, P (|F(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| > ε) ≤2 exp  − 2ε2 knC2 V /n2  = 2 exp  −2ε2n kC2 V  . ■ 6 Extension to Conditional Density Functionals Our convergence result and concentration bound can be fairly easily adapted to to KDE-based plugin estimators for many functionals of interest, including R´enyi-α and Tsallis-α entropy, divergence, and MI, and Lp norms and distances, which have either the same or analytically similar forms as as the functional (3). As long as the density of the variable being conditioned on is lower bounded on its domain, our results also extend to conditional density functionals of the form 2 F(P) = Z Z P(z)f Z X1×···×Xk g P(x1, z) P(z) , P(x2, z) P(z) , . . . , P(xk, z) P(z)  d(x1, . . . , xk)  dz (9) 2We abuse notation slightly and also use P to denote all of its marginal densities. 6 including, for example, R´enyi-α conditional entropy, divergence, and mutual information, where f is the function x 7→ 1 1−α log(x). The proof of this extension for general k is essentially the same as for the case k = 1, and so, for notational simplicity, we demonstrate the latter. 6.1 Problem Statement, Assumptions, and Estimator For given dimensions dx, dz ≥1, consider random vectors X and Z distributed on unit cubes X := [0, 1]dx and Z := [0, 1]dz according to a joint density P : X × Z →R. We use a random sample of 2n i.i.d. points from P to estimate a conditional density functional F(P), where F has the form (9). Suppose that P is in the H¨older class Σ(β, L, r, dx + dz), noting that this implies an analogous condition on each marginal of P, and suppose that P bounded below and above, i.e., 0 < κ1 := infx∈X,z∈Z P(z) and ∞> κ2 := infx∈X,z∈Z P(x, z). Suppose also that f and g are continuously differentiable, with Cf := sup x∈[cg,Cg] |f(x)| and Cf ′ := sup x∈[cg,Cg] |f ′(x)|, (10) where cg := inf g  0, κ2 κ1  and Cg := sup g  0, κ2 κ1  . After estimating the densities P(z) and P(x, z) by their mirrored KDEs, using n independent data samples for each, we clip the estimates of P(x, z) and P(z) below by κ1 and above by κ2 and denote the resulting density estimates by ˆP. Our estimate F( ˆP) for F(P) is simply the result of plugging ˆP into equation (9). 6.2 Proof of Bounds for Conditional Density Functionals We bound the error of F( ˆP) in terms of the error of estimating the corresponding unconditional density functional using our previous estimator, and then apply our previous results. Suppose P1 is either the true density P or a plug-in estimate of P computed as described above, and P2 is a plug-in estimate of P computed in the same manner but using a different data sample. Applying the triangle inequality twice, |F(P1) −F(P2)| ≤ Z Z P1(z)f Z X g P1(x, z) P1(z)  dx  −P2(z)f Z X g P1(x, z) P1(z)  dx  + P2(z)f Z X g P1(x, z) P1(z)  dx  −P2(z)f Z X g P2(x, z) P2(z)  dx  dz ≤ Z Z |P1(z) −P2(z)| f Z X g P1(x, z) P1(z)  dx  + P2(z) f Z X g P1(x, z) P1(z)  dx  −f Z X g P2(x, z) P2(z)  dx  dz Applying the Mean Value Theorem and the bounds in (10) gives |F(P1) −F(P2)| ≤ Z Z Cf|P1(z) −P2(z)| + κ2Cf ′ Z X g P1(x, z) P1(z)  −g P2(x, z) P2(z)  dx dz = Z Z Cf|P1(z) −P2(z)| + κ2Cf ′ GP1(z)(P1(·, z)) −GP2(z)(P2(·, z)) dz, where Gz is the density functional GP (z)(Q) = Z X g Q(x) P(z)  dx. Note that, since the data are split to estimate P(z) and P(x, z), G ˆ P (z)( ˆP(·, z)) depends on each data point through only one of these KDEs. In the case that P1 is the true density P, taking the 7 expectation and using Fubini’s Theorem gives E|F(P) −F( ˆP)| ≤ Z Z CfE|P(z) −ˆP(z)| + κ2Cf ′E GP (z)(P(·, z)) −G ˆ P (z)( ˆP(·, z)) dz, ≤Cf sZ Z E(P(z) −ˆP(z))2dz + 2κ2Cf ′CB  hβ + h2β + 1 nhd  ≤(2κ2Cf ′CB + CfC)  hβ + h2β + 1 nhd  applying H¨older’s Inequality and our bias bound (5), followed by the bias lemma (6). This extends our bias bound to conditional density functionals. For the variance bound, consider the case where P1 and P2 are each mirrored KDE estimates of P, but with one data point resampled (as in the proof of the variance bound, setting up to use McDiarmid’s Inequality). By the same sequence of steps used to show (8), Z Z |P1(z) −P2(z)| dz ≤2∥K∥dz 1 n , and Z Z GP (z)(P(·, z)) −G ˆ P (z)( ˆP(·, z)) dz ≤CV n . (by casing on whether the resampled data point was used to estimate P(x, z) or P(z)), for an appropriate CV depending on supx∈[κ1/κ2,κ2/κ1] |g′(x)|. Then, by McDiarmid’s Inequality, P (|F(ˆp1, . . . , ˆpk) −F(p1, . . . , pk)| > ε) = 2 exp  −ε2n 4C2 V  . ■ 6.3 Application to R´enyi-α Conditional Mutual Information As an example, we demonstrate our concentration inequality to the R´enyi-α Conditional Mutual Information (CMI). Consider random vectors X, Y , and Z on X = [0, 1]dx, Y = [0, 1]dy, Z = [0, 1]dz, respectively. α ∈(0, 1) ∪(1, ∞), the R´enyi-α CMI of X and Y given Z is I(X; Y |Z) = 1 1 −α Z Z P(z) log Z X×Y P(x, y, z) P(z) α P(x, z)P(y, z) P(z)2 1−α d(x, y) dz. (11) In this case, the estimator which plugs mirrored KDEs for P(x, y, z), P(x, z), P(y, z), and P(z) into (11) obeys the concentration inequality (4) with CV = κ∗∥K∥dx+dy+dz 1 , where κ∗depends only on α, κ1, and κ2. References [1] M. Aghagolzadeh, H. Soltanian-Zadeh, B. Araabi, and A. Aghagolzadeh. A hierarchical clustering based on mutual information maximization. In in Proc. of IEEE International Conference on Image Processing, pages 277–280, 2007. [2] L. Birge and P. Massart. Estimation of integral functions of a density. A. Statistics, 23:11–29, 1995. [3] T. Bouezmarni, J. Rombouts, and A. Taamouti. A nonparametric copula based test for conditional independence with applications to granger causality, 2009. Technical report, Universidad Carlos III, Departamento de Economia. [4] K. Fukumizu, A. Gretton, X. Sun, and B. Schoelkopf. Kernel measures of conditional dependence. In Neural Information Processing Systems (NIPS), 2008. [5] M. N. Goria, N. N. Leonenko, V. V. Mergel, and P. L. Novi Inverardi. A new class of random vector entropy estimators and its applications in testing statistical hypotheses. J. Nonparametric Statistics, 17:277–297, 2005. [6] A. O. Hero, B. Ma, O. J. J. Michel, and J. Gorman. Applications of entropic spanning graphs. IEEE Signal Processing Magazine, 19(5):85–95, 2002. [7] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, Cambridge, MA, 2009. 8 [8] A. Krishnamurthy, K. Kandasamy, B. Poczos, and L. Wasserman. Nonparametric estimation of renyi divergence and friends. In International Conference on Machine Learning (ICML), 2014. [9] S. Kullback and R.A. Leibler. On information and sufficiency. Annals of Mathematical Statistics, 22:79–86, 1951. [10] E. G. Learned-Miller and J. W. Fisher. ICA using spacings estimates of entropy. J. Machine Learning Research, 4:1271–1295, 2003. [11] N. Leonenko, L. Pronzato, and V. Savani. A class of R´enyi information estimators for multidimensional densities. Annals of Statistics, 36(5):2153–2182, 2008. [12] N. Leonenko, L. Pronzato, and V. Savani. Estimation of entropies and divergences via nearest neighbours. Tatra Mt. Mathematical Publications, 39, 2008. [13] J. Lewi, R. Butera, and L. Paninski. Real-time adaptive information-theoretic optimization of neurophysiology experiments. In Advances in Neural Information Processing Systems, volume 19, 2007. [14] H. Liu, J. Lafferty, and L. Wasserman. Exponential concentration inequality for mutual information estimation. In Neural Information Processing Systems (NIPS), 2012. [15] C. McDiarmid. On the method of bounded differences. Surveys in Combinatorics, 141:148– 188, 1989. [16] D. Montgomery. Design and Analysis of Experiments. John Wiley and Sons, 2005. [17] X. Nguyen, M.J. Wainwright, and M.I. Jordan. Estimating divergence functionals and the likelihood ratio by convex risk minimization. IEEE Transactions on Information Theory, To appear., 2010. [18] J. Oliva, B. Poczos, and J. Schneider. Distribution to distribution regression. In International Conference on Machine Learning (ICML), 2013. [19] J. Pearl. Why there is no statistical test for confounding, why many think there is, and why they are almost right, 1998. UCLA Computer Science Department Technical Report R-256. [20] H. Peng and C. Dind. Feature selection based on mutual information: Criteria of maxdependency, max-relevance, and min-redundancy. IEEE Trans On Pattern Analysis and Machine Intelligence, 27, 2005. [21] B. Poczos and J. Schneider. Nonparametric estimation of conditional information and divergences. In International Conference on AI and Statistics (AISTATS), volume 20 of JMLR Workshop and Conference Proceedings, 2012. [22] B. Poczos, L. Xiong, D. Sutherland, and J. Schneider. Nonparametric kernel estimators for image classification. In 25th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. [23] S. J. Reddi and B. Poczos. Scale invariant conditional dependence measures. In International Conference on Machine Learning (ICML), 2013. [24] A. R´enyi. Probability Theory. North-Holland Publishing Company, Amsterdam, 1970. [25] C. Shan, S. Gong, and P. W. Mcowan. Conditional mutual information based boosting for facial expression recognition. In British Machine Vision Conference (BMVC), 2005. [26] S. Singh and B. Poczos. Generalized exponential concentration inequality for r´enyi divergence estimation. In International Conference on Machine Learning (ICML), 2014. [27] K. Sricharan, D. Wei, and A. Hero. Ensemble estimators for multivariate entropy estimation, 2013. [28] L. Su and H. White. A nonparametric Hellinger metric test for conditional independence. Econometric Theory, 24:829–864, 2008. [29] Z. Szab´o, B. P´oczos, and A. L˝orincz. Undercomplete blind subspace deconvolution. J. Machine Learning Research, 8:1063–1095, 2007. [30] A.B. Tsybakov. Introduction to Nonparametric Estimation. Springer Publishing Company, Incorporated, 1st edition, 2008. [31] T. Villmann and S. Haase. Mathematical aspects of divergence based vector quantization using Frechet-derivatives, 2010. University of Applied Sciences Mittweida. [32] Q. Wang, S.R. Kulkarni, and S. Verd´u. Divergence estimation for multidimensional densities via k-nearest-neighbor distances. IEEE Transactions on Information Theory, 55(5), 2009. [33] E. Wolsztynski, E. Thierry, and L. Pronzato. Minimum-entropy estimation in semi-parametric models. Signal Process., 85(5):937–949, 2005. [34] K. Zhang, J. Peters, D. Janzing, and B. Scholkopf. Kernel-based conditional independence test and application in causal discovery. In Uncertainty in Artificial Intelligence (UAI), 2011. 9
2014
283
5,384
Decomposing Parameter Estimation Problems Khaled S. Refaat, Arthur Choi, Adnan Darwiche Computer Science Department University of California, Los Angeles {krefaat,aychoi,darwiche}@cs.ucla.edu Abstract We propose a technique for decomposing the parameter learning problem in Bayesian networks into independent learning problems. Our technique applies to incomplete datasets and exploits variables that are either hidden or observed in the given dataset. We show empirically that the proposed technique can lead to orders-of-magnitude savings in learning time. We explain, analytically and empirically, the reasons behind our reported savings, and compare the proposed technique to related ones that are sometimes used by inference algorithms. 1 Introduction Learning Bayesian network parameters is the problem of estimating the parameters of a known structure given a dataset. This learning task is usually formulated as an optimization problem that seeks maximum likelihood parameters: ones that maximize the probability of a dataset. A key distinction is commonly drawn between complete and incomplete datasets. In a complete dataset, the value of each variable is known in every example. In this case, maximum likelihood parameters are unique and can be easily estimated using a single pass on the dataset. However, when the data is incomplete, the optimization problem is generally non-convex, has multiple local optima, and is commonly solved by iterative methods, such as EM [5, 7], gradient descent [13] and, more recently, EDML [2, 11, 12]. Incomplete datasets may still exhibit a certain structure. In particular, certain variables may always be observed in the dataset, while others may always be unobserved (hidden). We exploit this structure by decomposing the parameter learning problem into smaller learning problems that can be solved independently. In particular, we show that the stationary points of the likelihood function can be characterized by the ones of the smaller problems. This implies that algorithms such as EM and gradient descent can be applied to the smaller problems while preserving their guarantees. Empirically, we show that the proposed decomposition technique can lead to orders-of-magnitude savings. Moreover, we show that the savings are amplified when the dataset grows in size. Finally, we explain these significant savings analytically by examining the impact of our decomposition technique on the dynamics of the used convergence test, and on the properties of the datasets associated with the smaller learning problems. The paper is organized as follows. In Section 2, we provide some background on learning Bayesian network parameters. In Section 3, we present the decomposition technique and then prove its soundness in Section 4. Section 5 is dedicated to empirical results and to analyzing the reported savings. We discuss related work in Section 6 and finally close with some concluding remarks in Section 7. The proofs are moved to the appendix in the supplementary material. 1 2 Learning Bayesian Network Parameters We use upper case letters (X) to denote variables and lower case letters (x) to denote their values. Variable sets are denoted by bold-face upper case letters (X) and their instantiations by bold-face lower case letters (x). Generally, we will use X to denote a variable in a Bayesian network and U to denote its parents. A Bayesian network is a directed acyclic graph with a conditional probability table (CPT) associated with each node X and its parents U. For every variable instantiation x and parent instantiation u, the CPT of X includes a parameter θx|u that represents the probability Pr(X =x|U=u). We will use θ to denote the set of all network parameters. Parameter learning in Bayesian networks is the process of estimating these parameters θ from a given dataset. A dataset is a multi-set of examples. Each example is an instantiation of some network variables. We will use D to denote a dataset and d1, . . . , dN to denote its N examples. The following is a dataset over four binary variables (“?” indicates a missing value of a variable in an example): example E B A C d1 e b a ? d2 ? b a ? d3 e b a ? A variable X is observed in a dataset iff the value of X is known in each example of the dataset (i.e., “?” cannot appear in the column corresponding to variable X). Variables A and B are observed in the above dataset. Moreover, a variable X is hidden in a dataset iff its value is unknown in every example of the dataset (i.e., only “?” appears in the column of variable X). Variable C is hidden in the above dataset. When all variables are observed in a dataset, the dataset is said to be complete. Otherwise, the dataset is incomplete. The above dataset is incomplete. Given a dataset D with examples d1, . . . , dN, the likelihood of parameter estimates θ is defined as: L(θ|D) = QN i=1 Pr θ(di). Here, Pr θ is the distribution induced by the network structure and parameters θ. One typically seeks maximum likelihood parameters θ⋆= argmax θ L(θ|D). When the dataset is complete, maximum likelihood estimates are unique and easily obtainable using a single pass over the dataset (e.g., [3, 6]). For incomplete datasets, the problem is generally nonconvex and has multiple local optima. Iterative algorithms are usually used in this case to try to obtain maximum likelihood estimates. This includes EM [5, 7], gradient descent [13], and the more recent EDML algorithm [2, 11, 12]. The fixed points of these algorithms correspond to the stationary points of the likelihood function. Hence, these algorithms are not guaranteed to converge to global optima. As such, they are typically applied to multiple seeds (initial parameter estimates), while retaining the best estimates obtained across all seeds. 3 Decomposing the Learning Problem We now show how the problem of learning Bayesian network parameters can be decomposed into independent learning problems. The proposed technique exploits two aspects of a dataset: hidden and observed variables. Proposition 1 The likelihood function L(θ|D) does not depend on the parameters of variable X if X is hidden in dataset D and is a leaf of the network structure. If a hidden variable appears as a leaf in the network structure, it can be removed from the structure while setting its parameters arbitrarily (assuming no prior). This process can be repeated until there are no leaf variables that are also hidden. The soundness of this technique follows from [14, 15]. 2                                V X Y Z                                V X Y Z Figure 1: Identifying components of network G given O = {V, X, Z}. Our second decomposition technique will exploit the observed variables of a dataset. In a nutshell, we will (a) decompose the Bayesian network into a number of sub-networks, (b) learn the parameters of each sub-network independently, and then (c) assemble parameter estimates for the original network from the estimates obtained in each sub-network. Definition 1 (Component) Let G be a network, O be some observed variables in G and let G|O be the network which results from deleting all edges from G which are outgoing from O. A component of G|O is a maximal set of nodes that are connected in G|O. Consider the network G in Figure 1, with observed variables O = {V, X, Z}. Then G|O has three components in this case: S1 = {V }, S2 = {X}, and S3 = {Y, Z}. The components of a network partition its parameters into groups, one group per component. In the above example, the network parameters are partitioned into the following groups: S1 : {θv, θv} S2 : {θx|v, θx|v, θx|v, θx|v} S3 : {θy|x, θy|x, θy|x, θy|x, θz|y, θz|y, θz|y, θz|y}. We will later show that the learning problem can be decomposed into independent learning problems, each induced by one component. To define these independent problems, we need some definitions. Definition 2 (Boundary Node) Let S be a component of G|O. If edge B →S appears in G, B ̸∈S and S ∈S, then B is called a boundary for component S. Considering Figure 1, node X is the only boundary for component S3 = {Y, Z}. Moreover, node V is the only boundary for component S2 = {X}. Component S1 = {V } has no boundary nodes. The independent learning problems are based on the following sub-networks. Definition 3 (Sub-Network) Let S be a component of G|O with boundary variables B. The sub-network of component S is the subset of network G induced by variables S ∪B. Figure 2 depicts the three sub-networks which correspond to our running example.        V                V X                         X Y Z Figure 2: The sub-networks induced by adding boundary variables to components. The parameters of a sub-network will be learned using projected datasets. Definition 4 Let D = d1, . . . , dN be a dataset over variables X and let Y be a subset of variables X. The projection of dataset D on variables Y is the set of examples e1, . . . , eN, where each ei is the subset of example di which pertains to variables Y. We show below a dataset for the full Bayesian network in Figure 1, followed by three projected datasets, one for each of the sub-networks in Figure 2. V X Y Z d1 v x ? z d2 v x ? z d3 v x ? z V count e1 v 1 e2 v 2 V X count e1 v x 1 e2 v x 1 e3 v x 1 X Y Z count e1 x ? z 2 e2 x ? z 1 The projected datasets are “compressed” as we only represent unique examples, together with a count of how many times each example appears in a dataset. Using compressed datasets is crucial to realizing the full potential of decomposition, as it ensures that the size of a projected dataset is at most exponential in the number of variables appearing in its sub-network (more on this later). 3 We are now ready to describe our decomposition technique. Given a Bayesian network structure G and a dataset D that observes variables O, we can get the stationary points of the likelihood function for network G as follows: 1. Identify the components S1, . . . , SM of G|O (Definition 1). 2. Construct a sub-network for each component Si and its boundary variables Bi (Definition 3). 3. Project the dataset D on the variables of each sub-network (Definition 4). 4. Identify a stationary point for each sub-network and its projected dataset (using, e.g., EM, EDML or gradient descent). 5. Recover the learned parameters of non-boundary variables from each sub-network. We will next prove that (a) these parameters are a stationary point of the likelihood function for network G, and (b) every stationary point of the likelihood function can be generated this way (using an appropriate seed). 4 Soundness The soundness of our decomposition technique is based on three steps. We first introduce the notion of a parameter term, on which our proof rests. We then show how the likelihood function for the Bayesian network can be decomposed into component likelihood functions, one for each subnetwork. We finally show that the stationary points of the likelihood function (network) can be characterized by the stationary points of component likelihood functions (sub-networks). Two parameters are compatible iff they agree on the state of their common variables. For example, parameters θz|y and θy|x are compatible, but parameters θz|y and θy|x are not compatible, as y ̸= y. Moreover, a parameter is compatible with an example iff they agree on the state of their common variables. Parameter θy|x is compatible with example x, y, z, but not with example x, y, z. Definition 5 (Parameter Term) Let S be network variables and let d be an example. A parameter term for S and d, denoted Θd S, is a product of compatible network parameters, one for each variable in S, that are also compatible with example d. Consider the network X →Y →Z. If S = {Y, Z} and d = x, z, then Θd S will denote either θy|xθz|y or θy|xθz|y. Moreover, if S = {X, Y, Z}, then Θd S will denote either θxθy|xθz|y or θxθy|xθz|y. In this case, Pr(d) = P Θd S Θd S. This holds more generally, whenever S is the set of all network variables. We will now use parameter terms to show how the likelihood function can be decomposed into component likelihood functions. Theorem 1 Let S be a component of G|O and let R be the remaining variables of network G. If variables O are observed in example d, we have Pr θ(d) =  X Θd S Θd S    X Θd R Θd R  . If θ denotes all network parameters, and S is a set of network variables, then θ:S will denote the subset of network parameters which pertain to the variables in S. Each component S of a Bayesian network induces its own likelihood function over parameters θ:S. Definition 6 (Component Likelihood) Let S be a component of G|O. For dataset D = d1, . . . , dN, the component likelihood for S is defined as L(θ:S|D) = N Y i=1 X Θ di S Θdi S . 4 In our running example, the components are S1 = {V }, S2 = {X} and S3 = {Y, Z}. Moreover, the observed variables are O = {V, X, Z}. Hence, the component likelihoods are L(θ:S1|D) = [θv] [θv] [θv] L(θ:S2|D) =  θx|v   θx|v   θx|v  L(θ:S3|D) =  θy|xθz|y + θy|xθz|y   θy|xθz|y + θy|xθz|y   θy|xθz|y + θy|xθz|y  The parameters of component likelihoods partition the network parameters. That is, the parameters of two component likelihoods are always non-overlapping. Moreover, the parameters of component likelihoods account for all network parameters.1 We can now state our main decomposition result, which is a direct corollary of Theorem 1. Corollary 1 Let S1, . . . , SM be the components of G|O. If variables O are observed in dataset D, L(θ|D) = M Y i=1 L(θ:Si|D). Hence, the network likelihood decomposes into a product of component likelihoods. This leads to another important corollary (see Lemma 1 in the Appendix): Corollary 2 Let S1, . . . , SM be the components of G|O. If variables O are observed in dataset D, then θ⋆is a stationary point of the likelihood L(θ|D) iff, for each i, θ⋆:Si is a stationary point for the component likelihood L(θ:Si|D). The search for stationary points of the network likelihood is now decomposed into independent searches for stationary points of component likelihoods. We will now show that the stationary points of a component likelihood can be identified using any algorithm that identifies such points for the network likelihood. Theorem 2 Consider a sub-network G which is induced by component S and boundary variables B. Let θ be the parameters of sub-network G, and let D be a dataset for G that observes boundary variables B. Then θ⋆is a stationary point for the sub-network likelihood, L(θ|D), only if θ⋆:S is a stationary point for the component likelihood L(θ:S|D). Moreover, every stationary point for L(θ:S|D) is part of some stationary point for L(θ|D). Given an algorithm that identifies stationary points of the likelihood function of Bayesian networks (e.g., EM), we can now identify all stationary points of a component likelihood. That is, we just apply this algorithm to the sub-network of each component S, and then extract the parameter estimates of variables in S while ignoring the parameters of boundary variables. This proves the soundness of our proposed decomposition technique. 5 The Computational Benefit of Decomposition We will now illustrate the computational benefits of the proposed decomposition technique, showing orders-of-magnitude reductions in learning time. Our experiments are structured as follows. Given a Bayesian network G, we generate a dataset D while ensuring that a certain percentage of variables are observed, with all others hidden. Using dataset D, we estimate the parameters of network G using two methods. The first uses the classical EM on network G and dataset D. The second decomposes network G into its sub-networks G1, . . . , GM, projects the dataset D on each subnetwork, and then applies EM to each sub-network and its projected dataset. This method is called D-EM (for Decomposed EM). We use the same seed for both EM and D-EM. Before we present our results, we have the following observations on our data generation model. First, we made all unobserved variables hidden (as opposed to missing at random) as this leads to a more difficult learning problem, especially for EM (even with the pruning of hidden leaf nodes). 1The sum-to-one constraints that underlie each component likelihood also partition the sum-to-one constraints of the likelihood function. 5 50 60 70 80 9095 0 500 1000 Observed % Speed−up 50 60 70 80 9095 0 500 1000 Observed % Speed−up Figure 3: Speed-up of D-EM over EM on chain networks: three chains (180, 380, and 500 variables) (left), and tree networks (63, 127, 255, and 511 variables) (right), with three random datasets per network/observed percentage, and 210 examples per dataset. Observed % Network Speed-up Network Speed-up Network Speed-up D-EM D-EM D-EM 95.0% alarm 267.67x diagnose 43.03x andes 155.54x 90.0% alarm 173.47x diagnose 17.16x andes 52.63x 80.0% alarm 115.4x diagnose 11.86x andes 14.27x 70.0% alarm 87.67x diagnose 3.25x andes 2.96x 60.0% alarm 92.65x diagnose 3.48x andes 0.77x 50.0% alarm 12.09x diagnose 3.73x andes 1.01x 95.0% win95pts 591.38x water 811.48x pigs 235.63x 90.0% win95pts 112.57x water 110.27x pigs 37.61x 80.0% win95pts 22.41x water 7.23x pigs 34.19x 70.0% win95pts 17.92x water 1.5x pigs 16.23x 60.0% win95pts 4.8x water 2.03x pigs 4.1x 50.0% win95pts 7.99x water 4.4x pigs 3.16x Table 1: Speed-up of D-EM over EM on UAI networks. Three random datasets per network/observed percentage with 210 examples per dataset. Second, it is not uncommon to have a significant number of variables that are always observed in real-world datasets. For example, in the UCI repository: the internet advertisements dataset has 1558 variables, only 3 of which have missing values; the automobile dataset has 26 variables, where 7 have missing values; the dermatology dataset has 34 variables, where only age can be missing; and the mushroom dataset has 22 variables, where only one variable has missing values [1]. We performed our experiments on three sets of networks: synthesized chains, synthesized complete binary trees, and some benchmarks from the UAI 2008 evaluation with other standard benchmarks (called UAI networks): alarm, win95pts, andes, diagnose, water, and pigs. Figure 3 and Table 1 depict the obtained time savings. As can be seen from these results, decomposing chains and trees lead to two orders-of-magnitude speed-ups for almost all observed percentages. For UAI networks, when observing 70% of the variables or more, one obtains one-to-two orders-of-magnitude speedups. We note here that the time used for D-EM includes the time needed for decomposition (i.e., identifying the sub-networks and their projected datasets). Similar results for EDML are shown in the supplementary material. The reported computational savings appear quite surprising. We now shed some light on the culprit behind these savings. We also argue that some of the most prominent tools for Bayesian networks do not appear to employ the proposed decomposition technique when learning network parameters. Our first analytic explanation for the obtained savings is based on understanding the role of data projection, which can be illustrated by the following example. Consider a chain network over binary variables X1, . . . , Xn, where n is even. Consider also a dataset D in which variable Xi is observed for all odd i. There are n/2 sub-networks in this case. The first sub-network is X1. The remaining sub-networks are in the form Xi−1 →Xi →Xi+1 for i = 2, 4, . . . , n −2 (node Xn will be pruned). The dataset D can have up to 2n/2 distinct examples. If one learns parameters without decomposition, one would need to call the inference engine once for each distinct example, in each iteration of the learning algorithm. With m iterations, the inference engine may be called up to m2n/2 times. When learning with decomposition, however, each projected dataset will have 6 8 10 12 14 16 0 1000 2000 Dataset Size Speed−up 0 200 400 0 2000 4000 Sub−network # iterations 0 200 400 0 1000 2000 Sub−network # iterations Figure 4: Left: Speed-up of D-EM over EM as a function of dataset size. This is for a chain network with 180 variables, while observing 50% of the variables. Right Pair: Graphs showing the number of iterations required by each sub-network, sorted descendingly. The problem is for learning Network Pigs while observing 90% of the variables, with convergence based on parameters (left), and on likelihood (right). at most 2 distinct examples for sub-network X1, and at most 4 distinct examples for sub-network Xi−1 →Xi →Xi+1 (variable Xi is hidden, while variables Xi−1 and Xi+1 are observed). Hence, if sub-network i takes mi iterations to converge, then the inference engine would need to be called at most 2m1+4(m2+m4+. . .+mn−2) times. We will later show that mi is generally significantly smaller than m. Hence, with decomposed learning, the number of calls to the inference engine can be significantly smaller, which can contribute significantly to the obtained savings. 2 8 10 12 14 10 0 10 1 10 2 10 3 Dataset Size Time SMILE SAMIAM D−EM Figure 5: Effect of dataset size (log-scale) on learning time in seconds. Our analysis suggests that the savings obtained from decomposing the learning problem would amplify as the dataset gets larger. This can be seen clearly in Figure 4 (left), which shows that the speed-up of D-EM over EM grows linearly with the dataset size. Hence, decomposition can be critical when learning with very large datasets. Interestingly, two of the most prominent (noncommercial) tools for Bayesian networks do not exhibit this behavior on the chain network discussed above. This is shown in Figure 5, which compares D-EM to the EM implementations of the GENIE/SMILE and SAMIAM systems,3 both of which were represented in previous inference evaluations [4]. In particular, we ran these systems on a chain network X0 →· · · →X100, where each variable has 10 states, and using datasets with alternating observed and hidden variables. Each plot point represents an average over 20 simulated datasets, where we recorded the time to execute each EM algorithm (excluding the time to read networks and datasets from file, which was negligible compared to learning time). Clearly, D-EM scales better in terms of time than both SMILE and SAMIAM, as the size of the dataset increases. As explained in the above analysis, the number of calls to the inference engine by D-EM is not necessarily linear in the dataset size. Note here that D-EM used a stricter convergence threshold and obtained better likelihoods, than both SMILE and SAMIAM, in all cases. Yet, D-EM was able to achieve one-to-two orders-of-magnitude speed-ups as the dataset grows in size. On the other hand, SAMIAM was more efficient than SMILE, but got worse likelihoods in all cases, using their default settings (the same seed was used for all algorithms). Our second analytic explanation for the obtained savings is based on understanding the dynamics of the convergence test, used by iterative algorithms such as EM. Such algorithms employ a convergence test based on either parameter or likelihood change. According to the first test, one compares the parameter estimates obtained at iteration i of the algorithm to those obtained at itera2The analysis in this section was restricted to chains to make the discussion concrete. This analysis, however, can be generalized to arbitrary networks if enough variables are observed in the corresponding dataset. 3Available at http://genie.sis.pitt.edu/ and http://reasoning.cs.ucla.edu/samiam/. SMILE’s C++ API was used to run EM, using default options, except we suppressed the randomized parameters option. SAMIAM’s Java API was used to run EM (via the CodeBandit feature), also using default options, and the Hugin algorithm as the underlying inference engine. 7 tion i −1. If the estimates are close enough, the algorithm converges. The likelihood test is similar, except that the likelihood of estimates is compared across iterations. In our experiments, we used a convergence test based on parameter change. In particular, when the absolute change in every parameter falls below the set threshold of 10−4, convergence is declared by EM. When learning with decomposition, each sub-network is allowed to converge independently, which can contribute significantly to the obtained savings. In particular, with enough observed variables, we have realized that the vast majority of sub-networks converge very quickly, sometimes in one iteration (when the projected dataset is complete). In fact, due to this phenomenon, the convergence threshold for sub-networks can be further tightened without adversely affecting the total running time. In our experiments, we used a threshold of 10−5 for D-EM, which is tighter than the threshold used for EM. Figure 4 (right pair) illustrates decomposed convergence, by showing the number of iterations required by each sub-network to converge, sorted decreasingly, with convergence test based on parameters (left) and likelihood (right). The vast majority of sub-networks converged very quickly. Here, convergence was declared when the change in parameters or log-likelihood, respectively, fell below the set threshold of 10−5. 6 Related Work The decomposition techniques we discussed in this paper have long been utilized in the context of inference, but apparently not in learning. In particular, leaf nodes that do not appear in evidence e have been called Barren nodes in [14], which showed the soundness of their removal during inference with evidence e. Similarly, deleting edges outgoing from evidence nodes has been called evidence absorption and its soundness was shown in [15]. Interestingly enough, both of these techniques are employed by the inference engines of SAMIAM and SMILE,4 even though neither seem to employ them when learning network parameters as we propose here (see earlier experiments). When employed during inference, these techniques simplify the network to reduce the time needed to compute queries (e.g., conditional marginals which are needed by learning algorithms). However, when employed in the context of learning, these techniques reduce the number of calls that need to be made to an inference engine. The difference is therefore fundamental, and the effects of the techniques are orthogonal. In fact, the inference engine we used in our experiments does employ decomposition techniques. Yet, we were still able to obtain orders-of-magnitude speed-ups when decomposing the learning problem. On the other hand, our proposed decomposition techniques do not apply fully to Markov random fields (MRFs) as the partition function cannot be decomposed, even when the data is complete (evaluating the partition function is independent of the data). However, distributed learning algorithms have been proposed in the literature. For example, the recently proposed LAP algorithm is a consistent estimator for MRFs under complete data [10]. A similar method to LAP was independently introduced by [9] in the context of Gaussian graphical models. 7 Conclusion We proposed a technique for decomposing the problem of learning Bayesian network parameters into independent learning problems. The technique applies to incomplete datasets and is based on exploiting variables that are either hidden or observed. Our empirical results suggest that orders-ofmagnitude speed-up can be obtained from this decomposition technique, when enough or particular variables are hidden or observed in the dataset. The proposed decomposition technique is orthogonal to the one used for optimizing inference as one reduces the time of inference queries, while the other reduces the number of such queries. The latter effect is due to decomposing the dataset and the convergence test. The decomposition process incurs little overhead as it can be performed in time that is linear in the structure size and dataset size. Hence, given the potential savings it may lead to, it appears that one must always try to decompose before learning network parameters. Acknowledgments This work has been partially supported by ONR grant #N00014-12-1-0423 and NSF grant #IIS1118122. 4SMILE actually employs a more advanced technique known as relevance reasoning [8]. 8 References [1] K. Bache and M. Lichman. UCI machine learning repository. Technical report, Irvine, CA: University of California, School of Information and Computer Science, 2013. [2] Arthur Choi, Khaled S. Refaat, and Adnan Darwiche. EDML: A method for learning parameters in Bayesian networks. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2011. [3] Adnan Darwiche. Modeling and Reasoning with Bayesian Networks. Cambridge University Press, 2009. [4] Adnan Darwiche, Rina Dechter, Arthur Choi, Vibhav Gogate, and Lars Otten. Results from the probabilistic inference evaluation of uncertainty in artificial intelligence UAI-08. http://graphmod.ics.uci.edu/uai08/Evaluation/Report, 2008. [5] A.P. Dempster, N.M. Laird, and D.B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society B, 39:1–38, 1977. [6] Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [7] S. L. Lauritzen. The EM algorithm for graphical association models with missing data. Computational Statistics and Data Analysis, 19:191–201, 1995. [8] Yan Lin and Marek Druzdzel. Computational advantages of relevance reasoning in Bayesian belief networks. In Proceedings of the Thirteenth Conference on Uncertainty in Artificial Intelligence, 1997. [9] Z. Meng, D. Wei, A. Wiesel, and A. O. Hero III. Distributed learning of Gaussian graphical models via marginal likelihoods. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2013. [10] Yariv Dror Mizrahi, Misha Denil, and Nando de Freitas. Linear and parallel learning of Markov random fields. In International Conference on Machine Learning (ICML), 2014. [11] Khaled S. Refaat, Arthur Choi, and Adnan Darwiche. New advances and theoretical insights into EDML. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, pages 705–714, 2012. [12] Khaled S. Refaat, Arthur Choi, and Adnan Darwiche. EDML for learning parameters in directed and undirected graphical models. In Neural Information Processing Systems, 2013. [13] S. Russel, J. Binder, D. Koller, and K. Kanazawa. Local learning in probabilistic networks with hidden variables. In Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence, 1995. [14] R. Shachter. Evaluating influence diagrams. Operations Research, 1986. [15] R. Shachter. Evidence absorption and propagation through evidence reversals. In Proceedings of the Fifth Conference on Uncertainty in Artificial Intelligence, 1989. 9
2014
284
5,385
Convex Optimization Procedure for Clustering: Theoretical Revisit Changbo Zhu Department of Electrical and Computer Engineering Department of Mathematics National University of Singapore elezhuc@nus.edu.sg Huan Xu Department of Mechanical Engineering National University of Singapore mpexuh@nus.edu.sg Chenlei Leng Department of Statistics University of Warwick c.leng@warwick.ac.uk Shuicheng Yan Department of Electrical and Computer Engineering National University of Singapore eleyans@nus.edu.sg Abstract In this paper, we present theoretical analysis of SON – a convex optimization procedure for clustering using a sum-of-norms (SON) regularization recently proposed in [8, 10, 11, 17]. In particular, we show if the samples are drawn from two cubes, each being one cluster, then SON can provably identify the cluster membership provided that the distance between the two cubes is larger than a threshold which (linearly) depends on the size of the cube and the ratio of numbers of samples in each cluster. To the best of our knowledge, this paper is the first to provide a rigorous analysis to understand why and when SON works. We believe this may provide important insights to develop novel convex optimization based algorithms for clustering. 1 Introduction Clustering is an important problem in unsupervised learning that deals with grouping observations (data points) appropriately based on their similarities or distances [20]. Many clustering algorithms have been proposed in literature, including K-means, spectral clustering, Gaussian mixture models and hierarchical clustering, to solve problems with respect to a wide range of cluster shapes. However, much research has pointed out that these methods all suffer from instabilities [3, 20, 16, 15, 13, 19]. Taking K-means as an example, the formulation of K-means is NP-hard and the typical way to solve it is the Lloyd’s method, which requires randomly initializing the clusters. However, different initialization may lead to significantly different final cluster results. 1.1 A Convex Optimization Procedure for Clustering Recently, Lindsten et al. [10, 11], Hocking et al. [8] and Pelckmans et al. [17] proposed the following convex optimization procedure for clustering, which is termed as SON by Lindsten et al. [11] (Also called Clusterpath by Hocking et al. [8]), ˆX = arg min X∈Rn×p ∥A −X∥2 F + α X i<j ∥Xi· −Xj·∥2. (1) Here A is a given data matrix of dimension n × p where each row is a data point, α is a tunable parameter to determine the number of clusters, ∥· ∥F denotes the Frobenius norm and Xi· denotes the ith row of X. 1 The main idea of the algorithm is that if the i-th sample and the j-th sample belong to the same cluster, then ˆXi· and ˆXj· should be equal. Intuitively, this is due to the fact that the second term is a regularization term that enforces the rows of ˆX to be the same, and can be seen as a generalization of the fused Lasso penalty [18]. In particular, this penalty seeks to fuse the rows of ˆX. From another point of view, the regularization term can be seen as an ℓ1,2 norm, i.e., the sum of ℓ2 norm. Such a norm is known to encourage block sparse (in this case row-sparse) solutions [1]. Thus, it is expected that for many (i, j) pairs, ˆXi· −ˆXj· = 0. Mathematically, given c disjoint clusters {C1, C2, · · · , Cc} with Ci ⊆Rp for i = 1, 2, · · · , c, we define the Cluster Membership Matrix of a given data matrix A as the following. Definition 1. Given a data matrix A of dimension n × p, for j = 1, 2, · · · , c, set Ij = {i | Ai· ∈ Cj, 1 ≤i ≤n}. We say that a matrix X of dimension n × p is a Cluster Membership Matrix of A if  Xi· = Xj· if i ∈Ik, j ∈Ik and 1 ≤k ≤c Xi· ̸= Xj· if i ∈Im, j ∈Il, 1 ≤m ≤c, 1 ≤l ≤c and m ̸= l. Given a data matrix A, if the optimal solution ˆX of Problem (1) is a Cluster Membership Matrix of A, then we can determine the cluster membership by simply grouping the identical rows of ˆX together. We say that SON successfully recovers the cluster membership of A in this case. Notice that unlike previous approaches, SON does not suffer from the instability issue since it is a strictly convex optimization problem and the solution is fixed once a data matrix A is given. Moreover, SON can easily be adapted to incorporate a priori knowledge of the clustering membership. For example, if we have prior knowledge about which points are more likely to be in the same cluster, we can appropriately weight the regularization term, i.e., change the regularization term to α P i<j γij∥Xi· −Xj·∥2 for some γij > 0. The main contribution of this paper is to provide theoretic analysis of SON, in particular to derive sufficient conditions when SON successfully recovers the clustering membership. We show that if there are two clusters, each of which is a cube, then SON succeeds provided that the distance between the cubes is larger than a threshold value that depends on the cube size and the ratio of number of samples drawn in each cluster. Thus, the intuitive argument about why SON works is made rigorous and mathematically solid. To the best of our knowledge, this is the first attempt to theoretically quantify why and when SON succeeds. Related Work: we briefly review the related works on SON. Hocking et al. [8] proposed SON, arguing that it can be seen as a generalization of hierarchical clustering, and presented via numerical simulations several situations in which SON works while K-means and average linkage hierarchical clustering fail. They also developed R package called “clusterpath” which can be used to solve Problem (1). Independently, Lindsten et al. [10, 11] derived SON as a convex relaxation of Kmeans clustering. In the algorithmic aspect, Chi et al. [6] developed two methods to solve Problem (1), namely, Alternating Direction Method of Multipliers (ADMM) and alternating minimization algorithm (AMA). Marchetti et al. [14] generalized SON to the high-dimensional and noisy cases. Yet, in all these works, no attempt has been made to study rigorously why and when SON succeeds. Notation: in this paper, matrices are denoted by upper case boldface letters (e.g. A, B), sets are denoted by blackboard bold characters (e.g. R, I, C) and operators are denoted by Fraktur characters (e.g. D, M). Given a matrix A, we use Ai· to denote its ith row, and A·j to denote its jth column. Its (i, j)th entry is denoted by Ai,j. Two norms are used: we use ∥· ∥F to denote the Frobenius norm and ∥· ∥2 to denote the l2 norm of a vector. The space spanned by the rows of A is denoted by Row(A). Moreover, given a matrix A of dimension n × p and a function f : Rp 7→Rq, we use the notation f(A) to denote the matrix whose ith row is f(Ai·). 2 Main Result In this section we present our main theoretic result – a provable guarantee when SON succeeds in identifying cluster membership. 2 2.1 Preliminaries We first define some operators that will be frequently used in the remainder of the paper. Definition 2. Given any two matrices E of dimension n1 × p and F of dimension n2 × p, define the difference operator D1 on E, D2 on the two matrices E, F and D on the matrix constructed by concatenating E and F vertically as D1(E) =                 E1· −E2· E1· −E3· ... E1· −En1· E2· −E3· ... E2· −En1· ... E(n1−1)· −En1·                 , D2(E, F) =                 E1· −F1· E1· −F2· ... E1· −Fn2· E2· −F1· ... E2· −Fn2· ... En1· −Fn2·                 and D( E F  ) = D1(E) D1(F) D2(E, F) ! . In words, the operator D1 calculates the difference between every two rows of a matrix and lists the results in the order indicated in the definition. Similarly, given two matrices E and F, the operator D2(E, F) calculates the difference of any two rows between E and F, one from E and the other from F. We also define the following average operation which calculates the mean of the row vectors. Definition 3. Given any matrix E of dimension n × p, define the average operator on E as M(E) = 1 n( n X i=1 Ei·). Definition 4. A matrix E is called column centered if M(E) = 0. 2.2 Theoretical Guarantees Our main result essentially says that when there are two clusters, each of which is a cube, and they are reasonably separated away from each other, then SON successfully recovers the cluster membership. We now make this formal. For i = 1, 2, suppose Ci ⊆Rp is a cube with center (µi1, µi2, · · · , µip) and edge length si = 2(σi1, σi2, · · · , σip) , i.e., Ci = [µi1 −σi1, µi1 + σi1] × · · · × [µip −σip, µip + σip]. Definition 5. The distance d1,2 between cubes C1 and C2 is d1,2 ≜inf{∥x −y∥2 | x ∈C1, y ∈C2}. Definition 6. The weighted size w1,2 with respect to C1, C2, n1 and n2 is defined as w1,2 = max 2n2(n1 −1) n2 1 + 1  ∥s1∥2, 2n1(n2 −1) n2 2 + 1  ∥s2∥2  . Theorem 1. Given a column centered data matrix A of dimension n × p, where each row is arbitrarily picked from either cube C1 or cube C2 and there are totally ni rows chosen from Ci for i = 1, 2, if w1,2 < d1,2, then by choosing the parameter α ∈R such that w1,2 < n 2 α < d1,2, we have the following: 1. SON can correctly determine the cluster membership of A; 2. Rearrange the rows of A such that A =  A1 A2  and Ai =      Ai 1· Ai 2· ... Ai ni·     , (2) 3 where for i = 1, 2 and j = 1, 2, · · · , ni, Ai j· = (Ai j,1, Ai j,2, · · · , Ai j,p) ∈Ci. Then, the optimal solution ˆX of Problem (1) is given by ˆXi· =    n2 n1+n2  1 − nα 2∥M(D2(A1,A2))∥2  M D2(A1, A2)  , if Ai· ∈C1; − n1 n1+n2  1 − nα 2∥M(D2(A1,A2))∥2  M D2(A1, A2)  , if Ai· ∈C2. The theorem essentially states that we need d1,2 to be large and w1,2 to be small for correct determination of the cluster membership of A. This is indeed intuitive. Notice that d1,2 is the distance between the cubes and w1,2 is a constant that depends on the size of the cube as well as the ratio between the samples in each cube. Obviously, if the cubes are too close with each other, i.e., d1,2 is small, or if the sizes of the clusters are too big compared to their distance, it is difficult to determine the cluster membership correctly. Moreover, when n1 ≪n2 or n1 ≫n2, w1,2 is large, and the theorem states that it is difficult to determine the cluster membership. This is also well expected, since in this case one cluster will be overwhelmed by the other, and hence determining where the data points are chosen from becomes problematic. The assumption in Theorem 1 that the data matrix A is column centered can be easily relaxed, using the following proposition which states that the result of SON is invariant to any isometry operation. Definition 7. An isometry of Rn is a function f : Rn →Rn that preserves the distance between vectors, i.e., ∥f(u) −f(w)∥2 = ∥u −w∥2, ∀u, w ∈Rn. Proposition 1. (Isometry Invariance) Given a data matrix A of dimension n × p where each row is chosen from some cluster Ci, i = 1, 2, · · · , c, and f(·) an isometry of Rp, we have ˆX = arg min X∈Rn×p ∥A −X∥2 F + α X i<j ∥Xi· −Xj·∥2 ⇐⇒f( ˆX) = arg min X∈Rn×p ∥f(A) −X∥2 F + α X i<j ∥Xi· −Xj·∥2. This further implies that if SON successfully determines the cluster membership of A, then it also successfully determines the cluster membership of f(A). 3 Kernelization SON can be easily kernelized as we show in this section. In the kernel clustering setup, instead of clustering {Ai·} such that points within a cluster are closer in the original space, we want to cluster {Ai·} such that points within a cluster are closer in the feature space. Mathematically, this means we map Ai· to a Hilbert space H (the feature space) by the feature mapping function φ(·) and perform clustering on {φ(Ai·)}. Notice that we can write Problem (1) in terms of the inner product ⟨Ai·, Aj·⟩, ⟨Ai·, Xj·⟩and ⟨Xi·, Xj·⟩. Thus, for SON in the feature space, we only need to replace all these inner products by ⟨φ(Ai·), φ(Aj·)⟩, ⟨φ(Ai·), Xj·⟩and ⟨Xi·, Xj·⟩. Thus, SON in the feature space can be formulated as ˆX = arg min X∈Rn×q n X i=1 (⟨φ(Ai·), φ(Ai·)⟩−2 ⟨φ(Ai·), Xi·⟩+ ⟨Xi·, Xi·⟩) +α X i<j q ⟨Xi·, Xi·⟩−2 ⟨Xi·, Xj·⟩+ ⟨Xj·, Xj·⟩. (3) We have the following representation theorem about the optimal solution of (3). Theorem 2. (Representation Theorem) Each row of the optimal solution of Problem (3) can be written as a linear combination of rows of A, i.e., ˆXi· = n X j=1 aijφ(Aj·). 4 Thus, to solve SON in the feature space reduces to finding the optimal weight {aij}. Define the kernel function as K(x, y) = ⟨φ(x), φ(y)⟩. Then Problem (3) is equivalent to min {aij} n X i=1 K(Ai·, Ai·) −2 n X k=1 aikK(Ai·, Ak·) + n X k=1 n X l=1 aikailK(Ak·, Al·) ! +α X i<j v u u t n X k=1 n X l=1 K(Ak·, Al·)(aikail −2aikajl + ajkajl), (4) which is a second order cone program since the kernel is positive semi-definite. Notice that this implies that solving SON in the feature space only requires knowing the kernel function rather than the feature mapping φ(·). 4 Proof We sketch the proof of Theorem 1 here. The detailed proof is given in the supplementary material. 4.1 Preliminaries We first introduce some notations useful in the proof. We use In to denote an identity matrix of dimension n × n and use 1m×nto denote a matrix of dimension m × n with all entries being 1. Similarly, we use 0m×n to denote a matrix of dimension m × n with all entries being 0. We now define some special matrices. Let Hn denote a matrix of dimension (n −1) × n which is constructed by concatenating 1(n−1)×1 and −In−1 horizontally, i.e., Hn = (1(n−1)×1 − In−1). For i = 1, 2, · · · , n −2, we first concatenate matrices Hn−i and 0(n−1−i)×i horizontally to form a matrix (0(n−1−i)×i Hn−i). Then, we construct Rn by concatenating {Hn, (0(n−2)×1 Hn−1), · · · , (01×(n−2) H2)} vertically, i.e., Rn ≜       Hn 0(n−2)×1 Hn−1 0(n−3)×2 Hn−2 ... 01×(n−2) H2       . We concatenate m copies of −In vertically to form a new matrix and denote it by Wmn×n. Let Gm,n,i denote an m × n dimensional matrix where the entries of the ith column all equal 1 and all the other entries equal 0, i.e., Gm,n,i ≜(0m×(i−1) 1m×1 0m×(n−i)). Then, we concatenate {Gm,n,1, Gm,n,2, · · · , Gm,n,n} vertically and denote it by Smn×n, i.e., Wmn×n ≜     −In −In ... −In    , Smn×n ≜     Gm,n,1 Gm,n,2 ... Gm,n,n    . Finally, set Ω≜    Rn1−1 I( n1−1 2 ) 0( n1−1 2 )×( n2 2 ) 0( n1−1 2 )×n2 0( n1−1 2 )×(n1−1)n2 0( n2 2 )×(n1−1) 0( n2 2 )×( n1−1 2 ) I( n2 2 ) Rn2 0( n2 2 )×(n1−1)n2 S(n1−1)n2×(n1−1) 0(n1−1)n2×( n1−1 2 ) 0(n1−1)n2×( n2 2 ) W(n1−1)n2×n2 I(n1−1)n2   . 4.2 Proof sketch of Theorem 1 The proof of Theorem 1 is based on the idea of “lifting”. That is, we project Problem (1) into a higher dimensional space (in particular, from n rows to n(n −1)/2 rows), which then allows us to separate the regularization term into the sum of l2 norm of each row. Although this brings additional 5 linear constraints to the formulation, it facilitates the analysis. In the following, we divide the proof into 3 steps and explain the main idea of each step. Step 1: In this step, we derive an equivalent form of Problem (1) and give optimality conditions. For convenience, set B(1,2) = D2(A1, A2), B1 = D1(A1), B2 = D1(A2) and V = {y ∈ R( n 2) | Ωy = 0}. The following lemmas show that we can lift the original problem into an equivalent problem that is easier to analyze. Lemma 1. If the data matrix A is column centered, then the optimal solution ˆX of problem (1) is also column centered. Further more, set B = D(A) and ˆY = D( ˆX), we have ∥A −ˆX∥2 F = n(n−1) 2 X i=1 1 n∥Bi· −ˆYi·∥2 2. Lemma 2. Given a column centered data matrix A, set B = D(A) and S = {Z ∈ R( n 2)×p | ΩZ·j = 0, 1 ≤j ≤p}. Then, ˆX is the optimal solution to Problem (1) iff D( ˆX) = arg min Y∈S n(n−1) 2 X i=1 ( 1 n∥Bi· −Yi·∥2 2 + α ∥Yi·∥2). (5) Thus, we can determine whether ˆX is the membership matrix of A by solving Problem (5). Compared to Problem (1), Problem (5) is more amenable to analyze as it is the sum of separable equations. That is, for i = 1, 2, · · · , n(n−1) 2 , we can minimize each 1 n∥Bi· −Yi·∥2 2 + α ∥Yi·∥2 individually with the additional constraint ΩY = 0. Following standard convex analysis (Page 303 of [2]), ˆY and ˆΛ are an optimal primal and dual solution pair of Problem (5) if and only if ˆY·j ∈V, ( ˆΛ·j)T ∈V⊥, j = 1, 2, · · · , p, (6) and ˆYi· ∈arg min y∈Rp( 1 n∥Bi· −y∥2 2 + α∥y∥2 −y ˆΛT i·), i = 1, 2, · · · , n 2  . (7) Step 2: In this step, we construct ˆΛ. Since A is constructed by concatenating matrices A1 and A2 vertically, we also expect ˆX to be concatenated by two matrices vertically. Due to the fact that ˆY = D( ˆX), for 1 ≤l ≤p, we write ˆY and ˆΛ as the following ˆΛ·l =   ˆΛ1 ·l ˆΛ2 ·l ˆΛ(1,2) ·l  and ˆY·l =   ˆY1 ·l ˆY2 ·l ˆY(1,2) ·l   where ˆΛi ·l, ˆYi ·l ∈R( ni 2 ) for i = 1, 2 and ˆΛ(1,2) ·l , ˆY(1,2) ·l ∈Rn1n2, which are determined below. By the structure of Ω, after some algebraic operations, it can be shown that ( ˆΛ·l)T ∈V⊥is equivalent to the following equalities that hold, RT n1 ˆΛ1 ·l = −ST n1n2×n1 ˆΛ(1,2) ·l , RT n2 ˆΛ2 ·l = −WT n1n2×n2 ˆΛ(1,2) ·l . (8) We now construct ˆΛ(1,2). Set ˆΛ(1,2) m· = 2 n  M  B(1,2) −B(1,2) m·  , 1 ≤m ≤n1n2. (9) Since ˆΛ(1,2) is now fixed, we can bound the right hand sides of the two equalities in (8). In order to bound the entries of ˆΛ1 ·l and ˆΛ2 ·l, we need the following lemma. Lemma 3. Given cn ∈Rn, i.e., cn = (c1, c2, · · · , cn)T , such that nP i=1 ci = 0 and ∃b ∈R, |ci| ≤b, then ∃x ∈R n(n−1) 2 , such that ∥x∥∞≤2 nb and RT nx = cn. 6 2 4 6 8 10 0 10 20 30 ∥s∥2 n1 = n2 = 25 Theoretical bounds w1,2 Empirical performance ¯d1,2 2 4 6 8 10 0 10 20 30 40 ∥s∥2 n1 = 25 & n2 = 50 Theoretical bounds w1,2 Empirical performance ¯d1,2 2 4 6 8 10 0 20 40 60 ∥s∥2 n1 = 25 & n2 = 75 Theoretical bounds w1,2 Empirical performance ¯d1,2 Figure 1: Theoretical bounds and empirical performance. This figure illustrates the case in which n1, n2 are constants and ∥s∥2 is increasing. Then, because we can bound the right hand sides of the two equalities of (8), by using Lemma 3, we can show that there exist ˆΛ1 ·l, ˆΛ2 ·l satisfying (8) such that the following holds ∥ˆΛ1 ·l∥∞≤2 n(n2)(n1 −1) n2 1 (4σ1l) and ∥ˆΛ2 ·l∥∞≤2 n(n1)(n2 −1) n2 2 (4σ2l). (10) To summarize this step, we have constructed ˆΛ of dimension n 2  × p such that    ˆΛ1 ·l, ˆΛ2 ·l satisfies (10), 1 ≤l ≤p, ˆΛ(1,2) m· = 2 n  M  B(1,2) −B(1,2) m·  , 1 ≤m ≤n1n2. Step 3: Finally, we construct ˆY. Set        ˆY1 ·l = ˆY2 ·l = 0, 1 ≤l ≤p, ˆY(1,2) m· = 1 − nα 2∥M B(1,2) ∥2 !  M  B(1,2) , 1 ≤m ≤n1n2. Choosing w1,2 < n 2 α < d1,2, according to ˆΛ and ˆY constructed, it is easy to checked that conditions (6) and (7) are satisfied. So ˆΛ and ˆY are an optimal primal and dual solution pair of Problem (5). 5 Experiments We now report some numerical experimental results. The empirical performance of SON has been reported in numerous works [8, 10, 11]. It has been shown that SON outperforms traditional clustering methods like K-means in many situations. As such, we do not reproduce such results. Instead, we conduct experiments to validate our theoretic results. Recall that Theorem 1 states that when samples are drawn from two cubes, SON guarantees to successfully recover the cluster membership if the distance between cubes is larger than a threshold which is linear to the cube size ∥si∥and the ratio between n1 and n2. To validate this, we randomly draw a data matrix A where each row belongs to one of the two cubes, and find numerically the largest distance ¯d1,2 between the cubes where the cluster membership is not correctly recovered. Clearly, ¯d1,2 provides an empirical estimator of the minimal distance needed to successfully recover the cluster membership. We compare the theoretic bound w1,2 with the empirical performance ¯d1,2 to validate our theorem. The specific procedures of the experiments are as follows. 1. Choose two cubes C1 and C2 from space Rp with size s1 = 2(σ11, σ12, · · · , σ1p) and s2 = 2(σ21, σ22, · · · , σ2p), and the distance between C1 and C2 is d. 2. Choose arbitrarily n1 points from C1 and n2 points from C2 and form the data matrix Ad of dimension n × p. Repeat and sample m data matrices {Ad 1, Ad 2, · · · , Ad m}. 7 2 4 6 8 0 5 10 15 20 n2 n1 ∥s1∥2 = ∥s2∥2 = 1 Theoretical bounds w1,2 Empirical performance ¯d1,2 2 4 6 8 0 10 20 30 n2 n1 ∥s1∥2 = ∥s2∥2 = 2 Theoretical bounds w1,2 Empirical performance ¯d1,2 2 4 6 8 0 10 20 30 40 50 n2 n1 ∥s1∥2 = ∥s2∥2 = 3 Theoretical bounds w1,2 Empirical performance ¯d1,2 Figure 2: Theoretical bounds and empirical performance. This figure illustrates the case in which ∥s1∥2,∥s2∥2 are constants and the ratio n2 n1 is increasing. 3. Repeat for different d. Set ¯d1,2 = max{d|∃1 ≤j ≤m s.t. SON fails to determine the cluster membership of Ad j}. 4. Repeat for different cube sizes ∥s1∥2 and ∥s2∥2. 5. Repeat for different sample numbers n1 and n2. In the experiments, we focus on the samples chosen from R2, i.e., p = 2, and use synthetic data to obtain the empirical performance. The results are shown in Figure 1 and 2. Figure 1 presents the situation where n1 and n2 are fixed and the cube sizes are increasing. In particular, the two cubes are both of size l × l, i.e., both with edge length (l, l). Thus we have ∥s∥2 = √ 2l. Clearly, we can see that the empirical performance and the theoretical bounds are both linearly increasing with respect to ∥s∥2, which implies that our theoretical results correctly predict how the performance of SON depends on ∥s∥2. Figure 2 presents the situation in which ∥s∥1 and ∥s∥2 are fixed, while the ratio n2 n1 is changing. Again, we observe that both the empirical performance and the theoretical bounds are linearly increasing with respect to n2 n1 , which implies that our theoretical bounds w1,2 predict the correct relation between the performance of SON and n2 n1 . 6 Conclusion In this paper, we provided theoretical analysis for the recently presented convex optimization procedure for clustering, which we term as SON. We showed that if all samples are drawn from two clusters, each being a cube, then SON is guaranteed to successfully recover the cluster membership provided that the distance between the two cubes is greater than the “weighted size” – a term that linearly depends on the cube size and the ratio between the numbers of the samples in each cluster. Such linear dependence is also observed in our numerical experiment, which demonstrates (at least qualitatively) the validity of our results. The main thrust of this paper is to explore using techniques from high-dimensional statistics, in particular regularization methods that extract low-dimensional structures such as sparsity or lowrankness, to tackle clustering problems. These techniques have recently been successfully applied to graph clustering and subspace clustering [4, 7, 12, 5, 9], but not so much to distance-based clustering tasks with the only exception of SON, to the best of our knowledge. This paper is the first attempt to provide a rigorous analysis to derive sufficient conditions when SON succeeds. We believe this not only helps to understand why SON works in practice as shown in previous works [8, 10, 11], but also provides important insights to develop novel algorithms based on high-dimensional statistics tools for clustering tasks. Acknowledgments The work of H. Xu was partially supported by the Ministry of Education of Singapore through AcRF Tier Two grant R-265-000-443-112. This work is also partially supported by the grant from Microsoft Research Asia with grant number R-263-000-B13-597. 8 References [1] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. 2 [2] Dimitri P Bertsekas. Convex Optimization Theory. Universities Press. 6 [3] S´ebastien Bubeck, Marina Meila, and Ulrike von Luxburg. How the initialization affects the stability of the k-means algorithm. arXiv preprint arXiv:0907.5494, 2009. 1 [4] Yudong Chen, Shiau Hong Lim, and Huan Xu. Weighted graph clustering with non-uniform uncertainties. In Proceedings of The 31st International Conference on Machine Learning, 2014. 8 [5] Yudong Chen, Sujay Sanghavi, and Huan Xu. Clustering sparse graphs. In NIPS, pages 2213– 2221, 2012. 8 [6] E. C. Chi and K. Lange. Splitting Methods for Convex Clustering. ArXiv e-prints, April 2013. 2 [7] Ehsan Elhamifar and Ren´e Vidal. Sparse subspace clustering. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 2790–2797. IEEE, 2009. 8 [8] Toby Hocking, Jean-Philippe Vert, Francis Bach, and Armand Joulin. Clusterpath: an algorithm for clustering using convex fusion penalties. In Lise Getoor and Tobias Scheffer, editors, Proceedings of the 28th International Conference on Machine Learning (ICML-11), ICML ’11, pages 745–752, New York, NY, USA, June 2011. ACM. 1, 2, 7, 8 [9] Ali Jalali, Yudong Chen, Sujay Sanghavi, and Huan Xu. Clustering partially observed graphs via convex optimization. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 1001–1008, 2011. 8 [10] F. Lindsten, H. Ohlsson, and L. Ljung. Clustering using sum-of-norms regularization: With application to particle filter output computation. In Statistical Signal Processing Workshop (SSP), 2011 IEEE, pages 201–204, 2011. 1, 2, 7, 8 [11] Fredrik Lindsten, Henrik Ohlsson, and Lennart Ljung. Just relax and come clustering! : A convexification of k-means clustering. Technical Report 2992, Linkping University, Automatic Control, 2011. 1, 2, 7, 8 [12] Guangcan Liu, Zhouchen Lin, and Yong Yu. Robust subspace segmentation by low-rank representation. In Proceedings of the 27th International Conference on Machine Learning (ICML10), pages 663–670, 2010. 8 [13] Ulrike Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, dec 2007. 1 [14] Yuliya Marchetti and Qing Zhou. Solution path clustering with adaptive concave penalty. arXiv preprint arXiv:1404.6289, 2014. 2 [15] Geoffrey McLachlan and Thriyambakam Krishnan. The EM algorithm and extensions, volume 382. John Wiley & Sons, 2007. 1 [16] Geoffrey J McLachlan, Thriyambakam Krishnan, and See Ket Ng. The em algorithm. Technical report, Papers/Humboldt-Universit¨at Berlin, Center for Applied Statistics and Economics (CASE), 2004. 1 [17] Kristiaan Pelckmans, Joseph De Brabanter, JAK Suykens, and B De Moor. Convex clustering shrinkage. In PASCAL Workshop on Statistics and Optimization of Clustering Workshop, 2005. 1 [18] Robert Tibshirani, Michael Saunders, Saharon Rosset, Ji Zhu, and Keith Knight. Sparsity and smoothness via the fused lasso. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(1):91–108, 2005. 2 [19] Spaans Alexander M. J. Heiser van der Kloot, Willem A. and Willem J. Instability of hierarchical cluster analysis due to input order of the data: The permucluster solution. Psychological Methods, 10(4):468–476, 2005. 1 [20] Rui Xu and II Wunsch, D. Survey of clustering algorithms. Neural Networks, IEEE Transactions on, 16(3):645–678, May 2005. 1 9
2014
285
5,386
Submodular Attribute Selection for Action Recognition in Video Jinging Zheng UMIACS, University of Maryland College Park, MD, USA zjngjng@umiacs.umd.edu Zhuolin Jiang Noah’s Ark Lab Huawei Technologies zhuolin.jiang@huawei.com Rama Chellappa UMIACS, University of Maryland College Park, MD, USA rama@umiacs.umd.edu P. Jonathon Phillips National Institute of Standards and Technology Gaithersburg, MD, USA jonathon.phillips@nist.gov Abstract In real-world action recognition problems, low-level features cannot adequately characterize the rich spatial-temporal structures in action videos. In this work, we encode actions based on attributes that describes actions as high-level concepts e.g., jump forward or motion in the air. We base our analysis on two types of action attributes. One type of action attributes is generated by humans. The second type is data-driven attributes, which are learned from data using dictionary learning methods. Attribute-based representation may exhibit high variance due to noisy and redundant attributes. We propose a discriminative and compact attribute-based representation by selecting a subset of discriminative attributes from a large attribute set. Three attribute selection criteria are proposed and formulated as a submodular optimization problem. A greedy optimization algorithm is presented and guaranteed to be at least (1-1/e)-approximation to the optimum. Experimental results on the Olympic Sports and UCF101 datasets demonstrate that the proposed attribute-based representation can significantly boost the performance of action recognition algorithms and outperform most recently proposed recognition approaches. 1 Introduction Action recognition in real-world videos has many potential applications in multimedia retrieval, video surveillance and human computer interaction. In order to accurately recognize human actions from videos, most existing approaches developed various discriminative low-level features, including spatio-temporal interest point (STIP) based features [8, 15], shape and optical flow-based features [19, 5], and trajectory-based representations [28, 33]. Because of large variations in viewpoints, complicated backgrounds, and people performing the actions differently, videos of an action vary greatly. A result of this variability is that conventional low-level features are not able to characterize the rich spatio-temporal structures in real-world action videos. Inspired by recent progress on object recognition [6, 14], multiple high-level semantic concepts called action attributes were introduced in [20, 17] to describe the spatio-temporal evolution of the action, object shapes and human poses, and contextual scenes. Since these action attributes are relatively robust to changes in viewpoints and scenes, they bridge the gap between low-level features and class labels. In this work, we focus on improving action recognition performance of attribute-based representations. Even though attribute-based representation appear effective for action recognition, they require humans to generate a list of attributes that may adequately describe a set of actions. From this list, humans then need to assign the action attributes to each class. Previous approaches [20, 17] simply used all the given attributes and ignored the difference in discriminative capability among attributes. This caused two major problems. First, a set of human-labeled attributes may be not be able to 1 (a) ApplyEyeMakeup (b) ApplyLipStick Indoor =Yes One_hand_visible =Yes Stick_like =Yes Sharp_like =Yes One_arm_bent =Yes Facing_front =Yes (c) Attribute set Figure 1: Key frames from two actions “ApplyEyeMakeup” and “ApplyLipStick” and the associated attribute set that the two actions share. represent and distinguish a set of action classes. This is because humans subjectively annotate action videos with arbitrary attributes. For example, consider the two classes “ApplyEyeMakeup” and “ApplyLipStick” in UCF101 action dataset [30] shown in Figure 1. They have the same humanlabeled attribute set and cannot be distinguished from one another. Second, some manually labeled attributes may be noisy or redundant which leads to degradation in action recognition performance. In addition, their inclusion also increases the feature extraction time. Thus, it would be beneficial to use a smaller subset of attributes while achieving comparable or even improved performance. To overcome the first problem, we propose another type of attributes that we call data-driven attributes. We show that data data-driven attributes are complementary to human-labeled attributes. Instead of using clustering-based algorithms to discover data-driven attributes as in [20], we propose a dictionary-based sparse representation method to discover a large data-driven attribute set. Our learned attributes are more suited to represent all the input data points because our method avoids the problem of hard assignment of data points to clusters. To address the attribute selection problem, we propose to select a compact and discriminative set of attributes from a large set of attributes. Three attribute selection criteria are proposed and then combined to form a submodular objective function. Our method encourages the selected attributes to have strong and similar discrimination capability for all pairs of actions. Furthermore, our method maximizes the sum of maximum coverage that each pairwise class can obtain from the selected attributes. 2 Related Work Attribute-based representation for action recognition: Recently, several attribute-based representations have been proposed for improving action recognition performance. Liu et al. [20] modeled attributes as latent variables and searched for the best configuration of attributes for each action using latent SVMs. However, the performance may drop drastically when some attributes are too noisy or redundant. This is because pretrained attribute classifiers from these noisy attributes perform poorly. Li et al. [17] decomposed a video sequence into short-term segments and characterized segments by the dynamics of their attributes. However, since attributes are defined over the entire action video instead of short-term segments, different decomposition of video segments may obtain different attribute dynamics. Another line of work similar to attribute-based methods is based on learning different types of midlevel representations. These mid-level representations usually identify the occurrence of semantic concepts of interest, such as scene types, actions and objects. Fathi et al. [7] proposed to construct mid-level motion features from low-level optical flow features using AdaBoost. Wang et al. [35] modeled a human action as a global root template and a constellation of several parts. Raptis et al. [27] used trajectory clusters as candidates for the parts of an action and assembled these clusters into an action class by graphical modeling. Jain et al. [10] presented a new mid-level representation for videos based on discriminative spatio-temporal patches, which are automatically mined from videos using an exemplar-based clustering approach. Submodularity: Submodular functions are a class of set functions that have the the property of diminishing returns [24]. Given a set E, a set function F : 2E →R is submodular if F(A ∪v) −F(A) ≥f(B ∪v) −F(B) holds for all A ⊆B ⊆E and v ∈E \ B. The diminishing returns mean that the marginal value of the element v decreases if used in a later stage. Recently, submodular functions have been widely exploited in various applications, such as sensor placements [13], superpixel segmentation [22], document summarization [18], and feature selection [3, 23]. Liu et al. [23] presented a submodular feature selection method for acoustic score spaces based on existing facility location and saturated coverage functions. Krause et al. [12] de2 veloped a submodular method for selecting dictionary columns from multiple candidates for sparse representation. Iyer et al. [9] designed a new framework for both unconstrained and constrained submodular function optimization. Streeter et al. [31] proposed an online algorithm for maximizing submodular functions. Different from these approaches, we define a novel submodular objective function for attribute selection. Although we only evaluate our approach for action recognition, it can be applied to other recognition tasks that use attribute descriptions. 3 Submodular Attribute Selection In this section, we first propose three attribute selection criteria. In order to satisfy these criteria, we define a submodular function based on entropy rate of a random walk and a weighted maximum coverage function. Then we introduce algorithms for the detection of human-labeled attributes and extraction of data-driven attributes. 3.1 Attribute Selection Criteria Assume that we have C classes and a large attribute set P = {a1, a2, .., aM} which contains M attributes. The set that includes all combinations of pairwise classes is represented by U = {u1(1, 1), u2(1, 2), ..., ul(i, j), ..., uL(C −1, C)} where ul(i, j), i < j denotes the pairwise combination of classes i and j, l is the index of this combination in U, and L = C × (C −1)/2 is the total number of all possible pairwise classes. Here we propose to use the Fisher score to construct an attribute contribution matrix A ∈RM×L, where an entry Ad,l represents the discrimination capability of attribute ad for differentiating the class pair (i, j) indexed by ul(i, j). Specifically, given the attribute ad and class pair (i, j), let µd k and σd k be the mean and standard deviation of k-th class and µd be the mean of samples from both classes i and j corresponding to d-th attribute. The Fisher score of attribute ad for differentiating the class pair (i, j) is computed as follows: Ad,l(i,j) = P k=i,j nk(µd k−µd)2 P k=i,j nkσ2 k where l is the index of pairwise classes (i, j) in U, and nk is the number of points from class k. Note that different methods can be used to measure the discrimination capability of ad, such as mutual information and T-test. Given A, we can obtain a row vector r by summing up its elements from each column that are in rows corresponding to selected attributes S. An example of vector r is shown in Figure 2a. We would like to have r satisfy two selection criteria: (1) each entry of r should be as large as possible; and (2) the variance of all entries of r should be small. The first criterion encourages S to provide as much discrimination capability as possible for each pairwise classes. The second criterion makes S have similar discrimination capability for each pairwise classes. These two criteria can be satisfied by maximizing the entropy rate of a random walk on the proposed graphs. Meanwhile, since some attributes may well differentiate the same collection of pairwise classes, it would be redundant to select all these attributes. In other words, one combination of pairwise classes may be repeatedly “covered” (differentiated) by multiple attributes. It is better to select other attributes which can differentiate “uncovered” combinations of pairwise classes. Therefore, we propose the third criterion: the sum of maximum discrimination capability that each pairwise classes can obtain from the selected attributes should be maximized. We will model it as a weighted maximum coverage problem and encourage S to have a maximum coverage of all pairwise classes. 3.2 Entropy Rate-based Attribute Selection In order to achieve the first two criteria, we need to construct an undirected graph and maximize the entropy rate of a random walk on this graph. We aim to obtain a subset S so that the attribute-based representation has good discrimination power. Graph Construction: We use G = (V, E) to denote an undirected graph where V is the vertex set, and E is the edge set. The vertex vi represents class i and the edge ei,j connecting class i and j represents that class i and j can be differentiated by the selected attribute subset S to some extent. The edge weight for ei,j is defined as wi,j = P d∈S Ad,l, which represents the discrimination capability of S for differentiating class i from class j. The edge weights are symmetric, i.e. wi,j = wj,i. In addition, we add a self-loop ei,i for each vertex vi of G. And the weight for self-loop ei,i is defined as wi,i = P d∈P\S Ad,l. The total incident weight for each vertex is kept constant so that it produces a stationary distribution for the later proposed random walk on this graph. Note that the addition of these self-loops do not affect the selection of attributes and the graph will change with the selected subset S. Figure 2 gives an example to illustrate the benefits of the entropy rate. 3 Subsetc1/c2 c1/c3 c1/c4 c2/c3 c2/c4 c3/c4 S1 1 1 1 1 1 1 S2 2 2 2 2 2 2 S3 2 1 3 3 1 2 (a) Vector r corresponding to different subsets. 1 2 4 3 1 1 1 1 1 1 (b) S1 1 2 4 3 2 2 2 2 2 2 (c) S2 1 2 4 3 2 3 3 1 1 2 (d) S3 Figure 2: The summations of different rows in the contribution matrix corresponding to three different selected subsets are provided in the left table and the corresponding undirected graphs are in the right figure. We show the role of the entropy rate in selecting attributes which have large and similar discrimination capability for each pair of classes. The circles with numbers denote the corresponding class vertices and the numbers next to the edge denote the edge weights, which is a measure of the discrimination capability of selected attribute subset. The self-loops are not displayed. The entropy rate of the graph with large edge weights in (c) has a higher objective value than that of a graph with smaller edge weights in (b). The entropy rate of graph with equal edge weights in (c) has a higher objective value than that of the graph with different edge weights in (d). Entropy Rate: Let X = {Xt|t ∈T, Xt ∈V } be a random walk on the graph G = (V, E) with nonnegative discrimination measure w. We use the random walk model from [2] with a transition probability defined as below: pi,j(S) =  wi,j wi = P d∈S Ad,l wi if i ̸= j 1 − P k:k̸=i wi,k wi = P d∈P\S Ad,l wi if i = j (1) where S is the selected attribute subset and wi = P m:ei,m∈E wi,m is the sum of incident weights of the vertex vi including the self-loop. The stationary distribution for this random walk is given by µ = (µ1, µ2, ..., µC)T = ( w1 w0 , w2 w0 , ..., wC w0 ) where w0 = PC i=1 wi is the sum of the total weights incident on all vertices. For a stationary 1st-order Markov chain, the entropy rate which measures the uncertainty of the stochastic process X is given by: H(X) = limt→∞H(Xt|Xt−1, Xt−2, ..., X1) = limt→∞H(Xt|Xt−1) = H(X2|X1). More details can be found in [2]. Consequently, the entropy rate of the random walk X on our proposed graph G = (V, E) can be written as a set function: H(S) = X i uiH(X2|X1 = vi) = − X i ui X j pi,j(S)log(pi,j(S)) (2) Intuitively, the maximization of the entropy rate will have two properties. First, it encourages the maximization of pi,j(S) where i = 1, ..., C and i ̸= j. This can make edge weights wi,j, i ̸= j as large as possible, so class i can be easily differentiated from other classes j (i.e., satisfying the first criteria). Second, it makes all class vertices have transition probabilities similar to other connected class vertices, so the discrimination capabilities of class i from other classes are very similar (i.e., satisfying the second criteria). Maximizing the entropy rate of the random walk on the proposed graph can select a subset of attributes that are compact and discriminative for differentiating all pairwise classes. Proposition 3.1. The entropy rate of the random walk H : 2M →R is a submodular function under the proposed graph construction. The observation that adding an attribute in a later stage has a lower increase in the uncertainty establishes the submodularity of the entropy rate. This is because at a later stage, the increased edge weights from the added attribute will be shared with attributes which contribute to the differentiation of the same pair of classes. A detailed proof based on [22] is given in the supplementary section. 3.3 Weighted Maximum Coverage-based Attribute Selection We consider a weighted maximum coverage function to achieve the last criteria that the selected subset S should maximize the coverage of all combinations of pairwise classes. For each attribute ad, we define a coverage set Ud ⊆U which covers all the combinations of pairwise classes that attribute ad can differentiate. Meanwhile, for each element (combination) ul ∈U that is covered by Ud, we define a coverage weight w(Ud, ul) = Ad,l. Given the universe set U and these coverage sets Ud, d = 1, ..., M, the weighted maximum coverage problem is to select at most K coverage sets, such that the sum of maximum coverage weight each element can obtain from S is maximized. The weighted maximum coverage function is defined as follows: Q(S) = X ul∈U max d∈S w(Ud, ul) = X ul∈U max d∈S Ad,l, s.t. NS ≤K (3) 4 Attrs.c1/c2c1/c3c1/c4c2/c3c2/c4c3/c4 a1 2 2 0 1 1 0 a2 1 1 0 0 0 0 a3 0 0 1 0 0 2 a4 0 0 0 2 2 0 (a) Attribute contribution matrix A. a1 a2 a3 1/2 1/3 1/4 2/3 2/4 3/4 1 1 2 2 1 1 1 2 2 2 a4 (b) Coverage graph Figure 3: An example of attribute contribution matrix is given in the left table and the corresponding coverage graph is in the right figure. We show the role of weighted maximum coverage term in selecting attributes which have large coverage weights. Two numbers separated by a backslash in the top circles denote a pair of classes, while the bottom circles denote different attributes. The number next to one edge is the coverage weight associated with the class pair when covered by the corresponding attribute. The edge which provides maximum coverage weight for each class pair is in red color. We consider three attribute subsets S1 = {a1, a2}, S2 = {a1, a3}, S3 = {a1, a4}. S2 has a higher objective value than S1 and S3 because the sum of maximum coverage weights for all class pairs obtained using attributes from subset S2 is largest. where NS is the number of attributes in S. Note that the weighted maximum coverage problem is reduced to the well studied set-cover problem when all the coverage weights are equal to be ones. Proposition 3.2. The weighted maximum coverage function Q : 2M →R is a monotonically increasing submodular function under the proposed set representation. For the weighted maximum coverage term, monotonicity is obvious because the addition of any attribute will increase the number of covered elements in U. Submodularity results from the observation that the coverage weights of increased covered elements will be less from adding an attribute in a later stage because some elements may be already covered by previously selected attributes. The proof is given in the supplementary section. 3.4 Objective Function and Optimization Combing the entropy rate term and the weighted maximum coverage term, the overall objective function for attribute selection is formulated as follows: max F(S) = max S H(S) + λQ(S) s.t. NS ≤K (4) where λ controls the relative contribution between entropy rate and the weighted maximum coverage term. The objective function is submodular because linear combination of two submodular functions with nonnegative coefficients preserves submodularity [24]. Direct maximization of a submodular Algorithm 1 Submodular Attribute Selection 1: Input: G = (V, E), A and λ 2: Output: S 3: Initialization: S ←∅ 4: for NS < K and F(S ∪a) −F(S) ≥0 do 5: am = argmaxS∪amF(S ∪{am}) −F(S) 6: S ←am 7: end for function is an NP-hard problem. However, a greedy algorithm from [24] gives a near-optimal solution with a (1 −1/e)-approximation bound. The greedy algorithm starts from an empty attribute set S = ∅; and iteratively adds one attribute that provides the largest gain for F at each iteration. The iteration stops when the maximum number of selected attributes is obtained or F(S) decreases. Algorithm 1 presents the pseudo code of our algorithm. A naive implementation of this algorithm has the complexity of O(|M|2), because it needs to loop O(|M|) times to add a new attribute and scan through the whole attribute list in each loop. By exploiting the submodularity of the objective function, we use the lazy greedy approach presented in [16] to speed up the optimization process. 3.5 Human-labeled Attribute and Data-driven Attribute Extraction Action videos can be characterized by a collection of human-labeled attributes [20]. For example, the action “long-jump” in Olympic Sports Dataset [25] is associated with either the motion attributes (jump forward, motion in the air), or with the scene attributes (e.g., outdoor, track). Given an action 5 video x, an attribute classifier fa : x →{0, 1} predicts the confidence score of the presence of attribute a in the video. This classifier fa is learned using the training samples of all action classes which have this attribute as positive and the rest as negative. Given a set of attribute classifiers S = {fai(x)}m i=1, an action video x ∈Rd is mapped to the semantic space O: h : Rd →O = [0, 1]m where h(x) = (h1(x), ..., hm(x))T is a m-dimensional attribute score vector. Previous works [21, 20] on data-driven attribute discovery used k-means or information theoretic clustering algorithms to obtain the clusters as the learned attributes. In this paper, we propose to discover a large initial set of data-driven attributes using a dictionary learning method. Specifically, assume that we have a set of N videos in a n-dimensional feature space X = [x1, ..., xN], xi ∈Rn, then a data-driven dictionary is learned by solving the following problem: arg min D,Z ||X −DZ||2 2 s.t. ∀i, ||zi||0 ≤T (5) where D = [d1...dK], di ∈Rn is the learned attribute dictionary of size K, Z = [zi...zN], zi ∈RK are the sparse codes of X, and T specifies the sparsity that each video has fewer than T items in its decomposition. Compared to k-means clustering, this dictionary-based learning scheme avoids the hard assignment of cluster centers to data points. Meanwhile, it doesn’t require the estimation of the probability density function of clusters in information theoretic clustering. Note that our attribute selection framework is very general and different initial attribute extraction methods can be used here. 4 Experiments In this section, we validate our method for action recognition on two public datasets: Sports dataset [25] and UCF101 [20] dataset. Specifically, we consider three sets of attributes: humanlabeled attribute set (HLA set), data-driven attribute set (DDA set) and the set mixing both types of attributes (Mixed set). To demonstrate the effectiveness of our selection framework, we compare the result using the selected subset with the result based on the initial set. We also compare our method with other two submodular approaches based on the facility location function (FL) and saturated coverage function (SC) respectively in [23]. These objective functions are defined as follows: Ffa(S) = P i∈V maxj∈S wi,j, Fsa(S) = P i∈V min{Ci(S), αCi(V)} where wi,j is a similarity between attribute i and j, Ci(S) = P j∈S wi,j measures the degree that attribute i is “covered” by S and α is a hyperparameter that determines a global saturation threshold. For the two approaches compared against, we consider an undirected k-nearest neighbor graph and use a Gaussian kernel to compute pairwise similarities wi,j = exp(−βd2 i,j) where di,j is the distance between attribute i and j, β = (2⟨d2 i,j⟩)−1 and ⟨·⟩denotes expectation over all pairwise distances. Finally, we compare the performance of attribute-based representation with several state-of-the-art approaches on the two datasets. 4.1 Olympic Sports Dataset The Olympic Sports dataset contains 783 YouTube video clips of 16 sports activities. We followed the protocol in [20] to extract STIP features [4]. Each action video is finally represented by a 2000dimensional histogram. We use 40 human-labeled attributes provided by [20]. Three attribute-based representations are constructed as follows: (1) HLA set: For each human-labeled attribute, we train a binary SVM with a histogram intersection kernel. We concatenate confidence scores from all these attribute classifiers into a 40-dimensional vector to represent this video. (2) DDA set: For data-driven attributes, we learn a dictionary of size 457 from all video features using KSVD [1] and each video is represented by a 457-dimensional sparse coefficient vector. (3) Mixed set: This attribute set is obtained by combining HLA set and DDA set. We compare the performance of features based on selected attributes with those based on the initial attribute set. For all the different attribute-based features, we use an SVM with Gaussian kernel for classification. Table 1 shows classification accuracies of different attribute-based representations. Compared with the initial attribute set, the selected attributes have greatly improved the classification accuracy, which demonstrates the effectiveness of our method for selecting a subset of discriminative attributes. Moreover, features based on the Mixed set outperform features based on either HLA set or DDA set. This shows that data-driven attributes are complementary to human-labeled attributes and together they offer a better description of actions. Table 2 shows the per-category average precision (AP) and mean AP of different approaches. It can be seen that our method achieves 6 dataset HLA DDA Mixed All Subset All Subset All Subset Olympic 61.8 64.1 49.0 53.8 63.1 66.7 UCF101 81.7 83.4 79.0 81.6 82.3 85.2 Table 1: Recognition results of different attribute-based representations. “All” denotes the original attribute sets and “Subset” denote the selected subsets. 20 25 30 35 40 40 50 60 Attribute subset size Accuracy Our method FL [23] SC [23] (a) HLA set 100 200 300 400 30 40 50 Attribute subset size Accuracy Our method FL [23] SC [23] (b) DDA set 200 300 400 500 58 60 62 64 66 68 Attribute subset size Accuracy Our method FL [23] SC [23] (c) Mixed set 100 300 500 56 58 60 62 64 66 68 Attribute subset size Accuracy Entropy rate Maximum Coverage λ =0.01 λ =0.1 λ = 1 (d) Effect of λ in Mixed set Figure 4: Recognition results by different submodular methods on the Olympic Sports dataset. Activity [15] [25] [32] [20] [17] HLA DDA Mixed high-jump 52.4 68.9 18.4 93.2 82.2 80.4 66.4 83.1 long-jump 66.8 74.8 81.8 82.6 92.5 88.8 85.3 93.9 triple-jump 36.1 52.3 16.1 48.3 52.1 61.4 60.7 73.6 pole-vault 47.8 82.0 84.9 74.4 79.4 55.1 45.5 56.8 gym. vault 88.6 86.1 85.7 86.7 83.4 98.2 84.2 98.4 short-put 56.2 62.1 43.3 76.2 70.3 63.7 39.5 72.2 snatch 41.8 69.2 88.6 71.6 72.7 74.5 34.2 79.8 clean-jerk 83.2 84.1 78.2 79.4 85.1 73.8 57.9 82.6 javelin throw 61.1 74.6 79.5 62.1 87.5 36.0 26.4 36.5 hammer throw 65.1 77.5 70.5 65.5 74.0 76.9 77.2 80.4 discuss throw 37.4 58.5 48.9 68.9 57.0 53.9 45.6 56.0 diving-plat. 91.5 87.2 93.7 77.5 86.0 94.8 55.3 99.2 diving-sp. bd. 80.7 77.2 79.3 65.2 78.3 79.7 59.7 90.4 bask. layup 75.8 77.9 85.5 66.7 78.1 88.7 89.7 90.7 bowling 66.7 72.7 64.3 72.0 52.5 43.0 55.3 55.4 tennis-serve 39.6 49.1 49.6 55.2 38.7 78.8 35.3 83.7 mean-AP 62.0 72.1 66.8 71.6 73.2 72.1 57.2 77.0 Table 2: Average precisions for activity recognition on the Olympic Sporst dataset. the best performance. This illustrates the benefits of selecting discriminative attributes and removing noisy and redundant attributes. Note that our method outperforms the method that is most similar to ours [20] which uses complex latent SVMs to combine low-level features, human-labeled attributes and data-driven attributes. Moreover, compared with other dynamic classifiers [25, 17] which account for the dynamics of bag-of-features or action attributes, our method still obtains comparable results. This is because the provided human-labeled attributes are very noisy and they can greatly affect the training of latent SVM and representation of the attribute dynamics. Figures 4a 4b 4c show classification accuracies of attribute subsets selected by different submodular selection methods. It can be seen that our method outperforms the other two submodular selection methods for the three different attribute sets. This is because our method prefers attributes with large and similar discrimination capability for differentiating pairwise classes, while the other two methods prefer attributes with large similarity to other attributes (i.e. representative), without explicitly considering the discrimination capabilities of selected attributes. Figure 4d shows the performance curves for a range of λ. We observe that the combination of entropy rate term and maximum coverage term obtains a higher classification accuracy than when only one of them is used. In addition, our approach is insensitive to the selection of λ. Hence we use λ = 0.1 throughout the experiments. 4.2 UCF101 Dataset UCF101 dataset contains over 10,000 video clips from 101 different human action categories. We compute the improved version of dense trajectories in [34] and extract three types of descriptors: histogram of oriented gradients (HOG), histogram of optical flow (HOF) and motion boundary his7 splits [34] [36] [37] [11] [29] HLA DDA Mixed 1 83.03 83.11 79.41 65.22 63.41 82.45 80.35 84.19 2 84.22 84.60 81.25 65.39 65.37 83.27 82.16 85.51 3 84.80 84.23 82.03 67.24 64.12 84.60 82.42 86.30 Avg 84.02 83.98 80.90 65.95 64.30 83.44 81.64 85.24 Table 3: Recognition results of different approaches on UCF101 dataset. 40 60 80 100 120 70 75 80 85 Attribute subset size Accuracy Our method FL [23] SC [23] (a) HLA set 1000 2000 3000 60 70 80 Attribute subset size Accuracy Our method FL [23] SC [23] (b) DDA set 1000 2000 3000 70 75 80 85 Attribute subset size Accuracy Our method FL [23] SC [23] (c) Mixed set Figure 5: Recognition results by different submodular methods on UCF101 dataset. togram (MBH). We use Fisher vector encoding [26] and obtain 101,376-dimensional histogram to represent each action video. Three different attribute sets and corresponding attribute-based representations are constructed as follows: (1) HLA set: Due to the high dimensionality of features and large number of samples, the linear SVM is trained for the detection of each human-labeled attribute. We concatenate confidence scores from all these attribute classifiers into a 115-dimensional vector to represent a video. (2) DDA set: For data-driven attributes, we first apply PCA to reduce the dimension of histogram descriptors to be 3300 and then learn a dictionary of size 3030. The features based on data-driven attributes are 3030-dimensional sparse coefficient vectors. (3) Mixed set: HLA set plus DDA set. Following the training and testing dataset partitions proposed in [30], we train a linear SVM and report classification accuracies of different attribute-based representations in Table 1. The selected attribute subset outperforms the initial attribute set again which demonstrates the effectiveness of our proposed attribute selection method. Figure 5 shows the results of attribute subsets selected by different submodular selection methods. Note that this dataset is highly challenging because the training and test videos of the same action have different backgrounds and actors. You can see that our method still substantially outperforms the other two submodular methods. This is because some redundant attributes dominated the selection process and the attributes selected by comparing approaches had very unbalanced discrimination capability for different classes. However, the attributes selected by our method have strong and similar discrimination capability for each class. Table 3 presents the classification accuracies of several state-of-the-art approaches on this dataset. Our method achieves comparable results to the best result 85.9% from [34] which uses complex spatio-temporal pyramids to embed structure information in features. Note that our method also outperforms other methods which make use of complicated and advanced feature extraction and encoding techniques. 5 Conclusion We exploited human-labeled attributes and data-driven attributes for improving the performance of action recognition algorithms. We first presented three attribute selection criteria for the selection of discriminative and compact attributes. Then we formulated the selection procedure as one of optimizing a submodular function based on the entropy rate of a random walk and weighted maximum coverage function. Our selected attributes not only have strong and similar discrimination capability for all pairwise classes, but also maximize the sum of largest discrimination capability that each pairwise classes can obtain from the selected attributes. Experimental results on two challenging dataset show that the proposed method significantly outperforms many state-of-the art approaches. 6 Acknowledgements The identification of any commercial product or trade name does not imply endorsement or recommendation by NIST. This research was partially supported by a MURI from the Office of Naval research under the Grant 1141221258513. 8 References [1] M. Aharon, M. Elad, and A. Bruckstein. KSVD: An algorithm for designing overcomplete dictionaries for sparse representation. In IEEE Transactions on Signal Processing, 2006. [2] T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley-Interscience, 2006. [3] A. Das, A. Dasgupta, and R. Kumar. Selecting diverse features via spectral regularization. In NIPS, 2012. [4] P. Dollar, V. Rabaud, G. Cottrell, and S. Belongie. Behavior recognition via sparse spatio-temporal features. In VS-PETS, 2005. [5] A. A. Efros, A. C. Berg, E. C. Berg, G. Mori, and J. Malik. Recognizing action at a distance. In ICCV, 2003. [6] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In CVPR, 2009. [7] A. Fathi and G. Mori. Action recognition by learning mid-level motion features. In CVPR, 2008. [8] L. Gorelick, M. Blank, E. Shechtman, M. Irani, and R. Basri. Actions as space-time shapes. In ICCV, 2005. [9] R. Iyer, S. Jegelka, and J. Bilmes. Fast semidifferential-based submodular function optimization. In ICML, 2013. [10] A. Jain, A. Gupta, M. Rodriguez, and L. Davis. Representing videos using mid-level discriminative patches. In CVPR, 2013. [11] Z. Jiang, Z. Lin, and L. S. Davis. Label consistent K-SVD: Learning a discriminative dictionary for recognition. In PAMI, 2013. [12] A. Krause and V. Cevher. Submodular dictionary selection for sparse representation. In ICML, 2010. [13] A. Krause, A. Singh, C. Guestrin, and C. Williams. Near-optimal sensor placements in gaussian processes. In ICML, 2005. [14] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In CVPR, 2009. [15] I. Laptev and T. Lindeberg. Space-time interest points. In ICCV, 2003. [16] J. Leskovec, A. Krause, C. Guestrin, C. Faloutsos, J. VanBriesen, and N. Glance. Cost-effective outbreak detection in networks. In KDD, 2007. [17] W. Li and N. Vasconcelos. Recognizing activities by attribute dynamics. In NIPS, 2012. [18] H. Lin and J. Bilmes. A class of submodular functions for document summarization. In Proceedings of ACL, 2011. [19] Z. Lin, Z. Jiang, and L. S. Davis. Recognizing actions by shape-motion prototype trees. In CVPR, 2009. [20] J. Liu, B. Kuipers, and S. Savarese. Recognizing human actions by attributes. In CVPR, 2011. [21] J. Liu, Y. Yang, and M. Shah. Learning semantic visual vocabularies using diffusion distance. In CVPR, 2009. [22] M.-Y. Liu, O. Tuzel, S. Ramalingam, and R. Chellappa. Entropy-rate clustering: Cluster analysis via maximizing a submodular function subject to a matroid constraint. In PAMI, 2014. [23] Y. Liu, K. Wei, K. Kirchhoff, Y. Song, and J. Bilmes. Submodular feature selection for high-dimensional acoustic score spaces. In ICASSP, 2013. [24] G. L. Nemhauser, L. A. Wolsey, and M. L. Fisher. An analysis of approximations for maximizing submodular set functionsi. Mathematical Programming, 1978. [25] J. C. Niebles, C. wei Chen, and L. Fei-fei. Modeling temporal structure of decomposable motion segments for activity classification. In ECCV, 2010. [26] F. Perronnin, J. S´anchez, and T. Mensink. Improving the fisher kernel for large-scale image classification. In ECCV, 2010. [27] M. Raptis, I. Kokkinos, and S. Soatto. Discovering discriminative action parts from mid-level video representations. In CVPR, 2012. [28] M. Raptis and S. Soatto. Tracklet descriptors for action modeling and video analysis. In ECCV, 2010. [29] S. Sadanand and J. Corso. Action bank: A high-level representation of activity in video. In CVPR, 2012. [30] K. Soomro, A. R. Zamir, and M. Shah. UCF101: A dataset of 101 human action classes from videos in the wild. In CRCV-TR-12-01, 2012. [31] M. Streeter and D. Golovin. An online algorithm for maximizing submodular functions. In NIPS, 2008. [32] K. D. Tang, F.-F. Li, and D. Koller. Learning latent temporal structure for complex event detection. In CVPR, 2012. [33] H. Wang, A. Kl¨aser, C. Schmid, and C.-L. Liu. Dense trajectories and motion boundary descriptors for action recognition. International Journal of Computer Vision, 2013. [34] H. Wang and C. Schmid. Action recognition with improved trajectories. In ICCV, 2013. [35] Y. Wang and G. Mori. Max-margin hidden conditional random fields for human action recognition. In CVPR, 2009. [36] J. Wu, Y. Zhang, and W. Lin. Towards good practices for action video encoding. In ICCV, 2013. [37] J. Zhu, B. Wang, X. Yang, W. Zhang, and Z. Tu. Action recognition with actons. In ICCV, 2013. 9
2014
286
5,387
Quantized Estimation of Gaussian Sequence Models in Euclidean Balls Yuancheng Zhu John Lafferty Department of Statistics University of Chicago Abstract A central result in statistical theory is Pinsker’s theorem, which characterizes the minimax rate in the normal means model of nonparametric estimation. In this paper, we present an extension to Pinsker’s theorem where estimation is carried out under storage or communication constraints. In particular, we place limits on the number of bits used to encode an estimator, and analyze the excess risk in terms of this constraint, the signal size, and the noise level. We give sharp upper and lower bounds for the case of a Euclidean ball, which establishes the Pareto-optimal minimax tradeoff between storage and risk in this setting. 1 Introduction Classical statistical theory studies the rate at which the error in an estimation problem decreases as the sample size increases. Methodology for a particular problem is developed to make estimation efficient, and lower bounds establish how quickly the error can decrease in principle. Asymptotically matching upper and lower bounds together yield the minimax rate of convergence Rn(F) = inf b f sup f∈F R( bf, f). This is the worst-case error in estimating an element of a model class F, where R( bf, f) is the risk or expected loss, and bf is an estimator constructed on a data sample of size n. The corresponding sample complexity of the estimation problem is n(ϵ, F) = min{n : Rn(F) < ϵ}. In the classical setting, the infimum is over all estimators. In contemporary settings, it is increasingly of interest to understand how error depends on computation. For instance, when the data are high dimensional and the sample size is large, constructing the estimator using standard methods may be computationally prohibitive. The use of heuristics and approximation algorithms may make computation more efficient, but it is important to understand the loss in statistical efficiency that this incurs. In the minimax framework, this can be formulated by placing computational constraints on the estimator: Rn(F, Bn) = inf b f:C( b f)≤Bn sup f∈F R( bf, f). Here C( bf) ≤Bn indicates that the computation C( bf) used to construct bf is required to fall within a “computational budget” Bn. Minimax lower bounds on the risk as a function of the computational budget thus determine a feasible region for computation-constrained estimation, and a Paretooptimal tradeoff for error versus computation. One important measure of computation is the number of floating point operations, or the running time of an algorithm. Chandrasekaran and Jordan [3] have studied upper bounds for statistical estimation with computational constraints of this form in the normal means model. However, useful lower bounds are elusive. This is due to the difficult nature of establishing tight lower bounds for 1 this model of computation in the polynomial hierarchy, apart from any statistical concerns. Another important measure of computation is storage, or the space used by a procedure. In particular, we may wish to limit the number of bits used to represent our estimator bf. The question then becomes, how does the excess risk depend on the budget Bn imposed on the number of bits C( bf) used to encode the estimator? This problem is naturally motivated by certain applications. For instance, the Kepler telescope collects flux data for approximately 150,000 stars [6]. The central statistical task is to estimate the lightcurve of each star nonparametrically, in order to denoise and detect planet transits. If this estimation is done on board the telescope, the estimated function values may need to be sent back to earth for further analysis. To limit communication costs, the estimates can be quantized. The fundamental question is, what is lost in terms of statistical risk in quantizing the estimates? Or, in a cloud computing environment (such as Amazon EC2), a large number of nonparametric estimates might be constructed over a cluster of compute nodes and then stored (for example in Amazon S3) for later analysis. To limit the storage costs, which could dominate the compute costs in many scenarios, it is of interest to quantize the estimates. How much is lost in terms of risk, in principle, by using different levels of quantization? With such applications as motivation, we address in this paper the problem of risk-storage tradeoffs in the normal means model of nonparametric estimation. The normal means model is a centerpiece of nonparametric estimation. It arises naturally when representing an estimator in terms of an orthogonal basis [8, 11]. Our main result is a sharp characterization of the Pareto-optimal tradeoff curve for quantized estimation of a normal means vector, in the minimax sense. We consider the case of a Euclidean ball of unknown radius in Rn. This case exhibits many of the key technical challenges that arise in nonparametric estimation over richer spaces, including the Stein phenomenon and the problem of adaptivity. As will be apparent to the reader, the problem we consider is intimately related to classical rate distortion theory [7]. Indeed, our results require a marriage of minimax theory and rate distortion ideas. We thus build on the fundamental connection between function estimation and lossy source coding that was elucidated in Donoho’s 1998 Wald Lectures [4]. This connection can also be used to advantage for practical estimation schemes. As we discuss further below, recent advances on computationally efficient, near-optimal lossy compression using sparse regression algorithms [12] can perhaps be leveraged for quantized nonparametric estimation. In the following section, we present relevant background and give a detailed statement of our results. In Section 3 we sketch a proof of our main result on the excess risk for the Euclidean ball case. Section 4 presents simulations to illustrate our theoretical analyses. Section 5 discusses related work, and outlines future directions that our results suggest. 2 Background and problem formulation In this section we briefly review the essential elements of rate-distortion theory and minimax theory, to establish notation. We then state our main result, which bridges these classical theories. In the rate-distortion setting we have a source that produces a sequence Xn = (X1, X2, . . . , Xn), each component of which is independent and identically distributed as N(0, σ2). The goal is to transmit a realization from this sequence of random variables using a fixed number of bits, in such a way that results in the minimal expected distortion with respect to the original data Xn. Suppose that we are allowed to use a total budget of nB bits, so that the average number of bits per variable is B, which is referred to as the rate. To transmit or store the data, the encoder describes the source sequence Xn by an index φn(Xn), where φn : Rn →{1, 2, . . . , 2nB} ≡C(B) is the encoding function. The nB-bit index is then transmitted or stored without loss. A decoder, when receiving or retrieving the data, represents Xn by an estimate ˇXn based on the index using a decoding function ψn : {1, 2, . . . , 2nB} →Rn. The image of the decoding function ψn is called the codebook, which is a discrete set in Rn with cardinality no larger than 2nB. The process is illustrated in Figure 1, and variously referred to as 2 Xn Encoder φn Decoder ψn ˇXn = ψn (φn(Xn)) φn(Xn) ∈C(B) θn Xn Encoder φn Decoder ψn ˇθn = ψn (φn(Xn)) φn(Xn) ∈C(B) Figure 1: Encoding and decoding process for lossy compression (top) and quantized estimation (bottom). For quantized estimation, the model (mean vector) θn is deterministic, not random. source coding, lossy compression, or quantization. We call the pair of encoding and decoding functions Qn = (φn, ψn) an (n, B)-rate distortion code. We will also use Qn to denote the composition of the two functions, i.e., Qn(·) = ψn(φn(·)). A distortion measure, or a loss function, d : R × R →R+ is used to evaluate the performance of the above coding and transmission process. In this paper, we will use the squared loss d(Xi, ˇXi) = (Xi −ˇXi)2. The distortion between two sequences Xn and ˇXn is then defined by dn(Xn, ˇXn) = 1 n Pn i=1(Xi−ˇXi)2, the average of the per observation distortions. We drop the subscript n in d when it is clear from the context. The distortion, or risk, for a (n, B)-rate distortion code Qn is defined as the expected loss E d (Xn, Qn(Xn)). Denoting by Qn,B the set of all (n, B)-rate distortion codes, the distortion rate function is defined as R(B, σ) = lim inf n→∞ inf Qn∈Qn,B E d (Xn, Qn(Xn)) . This distortion rate function depends on the rate B as well as the source distribution. For the i.i.d. N(0, σ2) source, according to the well-known rate distortion theorem [7], R(B, σ) = σ22−2B. When B is zero, meaning no information gets encoded at all, this bound becomes σ2, which is the expected loss when each random variable is represented by its mean. As B approaches infinity, the distortion goes to zero. The previous discussion assumes the source random variables are independent and follow a common distribution N(0, σ2). The goal is to minimize the expected distortion in the reconstruction of Xn after transmitting or storing the data under a communication constraint. Now suppose that Xi ind. ∼N(θi, σ2) for i = 1, 2, . . . , n. We assume the variance σ2 is known and the means θn = (θ1, . . . , θn) are unknown. Suppose, furthermore, that instead of trying to minimize the recovery distortion d(Xn, ˇXn), we want to estimate the means with a risk as small as possible, but again using a budget of B bits per index. Without the communication constraint, this problem has been very well studied [10, 9]. Let bθ(Xn) ≡bθn = (bθ1, . . . , bθn) denote an estimator of the true mean θn. For a parameter space Θn ⊂Rn, the minimax risk over Θn is defined as inf bθn sup θn∈Θn E d(θn, bθn) = inf bθn sup θn∈Θn E 1 n n X i=1 (θi −bθi)2. For the L2 ball of radius c, Θn(c) = n (θ1, . . . , θn) : 1 n n X i=1 θ2 i ≤c2o , (1) Pinsker’s theorem gives the exact, limiting form of the minimax risk lim inf n→∞inf bθn sup θn∈Θn(c) E d(θn, bθn) = σ2c2 σ2 + c2 . To impose a communication constraint, we incorporate a variant of the source coding scheme described above into this minimax framework of estimation. Define a (n, B)-rate estimation code 3 2 4 6 0 1 2 3 4 5 Bits per symbol B Risk R Figure 2. Our result establishes the Pareto-optimal tradeoff in the nonparametric normal means problem for risk versus number of bits: R(σ2, c2, B) = c2σ2 σ2 + c2 + c42−2B σ2 + c2 Curves for five signal sizes are shown, c2 = 2, 3, 4, 5, 6. The noise level is σ2 = 1. With zero bits, the rate is c2, the highest point on the risk curve. The rate for large B approaches the Pinsker bound σ2c2/(σ2 + c2). Mn = (φn, ψn), as a pair of encoding and decoding functions, as before. The encoding function φn : Rn →{1, 2, . . . , 2nB} is a mapping from observations Xn to an index set. The decoding function is a mapping from indices to models ˇθn ∈Rn. We write the composition of the encoder and decoder as Mn(Xn) = ψn(φn(Xn)) = ˇθn, which we call a quantized estimator. Denoting by Mn,B the set of all (n, B)-rate estimation codes, we then define the quantized minimax risk as Rn(B, σ, Θn) = inf Mn∈Mn,B sup θn∈Θn E d(θn, Mn(Xn)). We will focus on the case where our parameter space is the L2 ball defined in (1), and write Rn(B, σ, c) = Rn(B, σ, Θn(c)). In this setting, we let n go to infinity and define the asymptotic quantized minimax risk as R(B, σ, c) = lim inf n→∞Rn(B, σ, c) = lim inf n→∞ inf Mn∈Mn,B sup θn∈Θn(c) E d(θn, Mn(Xn)). (2) Note that we could estimate θn based on the quantized data ˇXn = Qn(Xn). Once again denoting by Qn,B the set of all (n, B)-rate distortion codes, such an estimator is written ˇθn = ˇθn(Qn(Xn)). Clearly, if the decoding functions ψn of Qn are injective, then this formulation is equivalent. The quantized minimax risk is then expressed as Rn(B, σ, Θn) = inf ˇθn inf Qn∈Qn,B sup θn∈Θn E d(θn, ˇθn). The many normal means problem exhibits much of the complexity and subtlety of general nonparametric regression and density estimation problems. It arises naturally in the estimation of a function expressed in terms of an orthogonal function basis [8, 13]. Our main result sharply characterizes the excess risk that communication constraints impose on minimax estimation for Θ(c). 3 Main results Our first result gives a lower bound on the exact quantized asymptotic risk in terms of B, σ, and c. Theorem 1. For B ≥0, σ > 0 and c > 0, the asymptotic minimax risk defined in (2) satisfies R(B, σ, c) ≥ σ2c2 σ2 + c2 + c4 σ2 + c2 2−2B. (3) This lower bound on the limiting minimax risk can be viewed as the usual minimax risk without quantization, plus an excess risk term due to quantization. If we take B to be zero, the risk becomes c2, which is obtained by estimating all of the means simply by zero. On the other hand, letting B →∞, we recover the minimax risk in Pinsker’s theorem. This tradeoff is illustrated in Figure 2. The proof of the theorem is technical and we defer it to the supplementary material. Here we sketch the basic idea of the proof. Suppose we are able to find a prior distribution πn on θn and a random 4 vector eθn such that for any (n, B)-rate estimation code Mn the following holds: σ2c2 σ2 + c2 + c4 σ2 + c2 2−2B (I) = Z EXnd(θn, eθn)dπn(θn) (II) ≤ Z EXnd(θn, Mn(Xn))dπn(θn) (III) ≤ sup θn∈Θn(c) EXnd(θn, Mn(Xn)). Then taking an infimum over Mn ∈Mn,B gives us the desired result. In fact, we can take πn, the prior on θn, to be N(0, c2In), and the model becomes θi ∼N(0, c2) and Xi | θi ∼N(θi, σ2). Then according to Lemma 1, inequality (II) holds with eθn being the minimizer to the optimization problem min p(eθn | Xn,θn) E d(θn, eθn) subject to I(Xn; eθn) ≤nB, p(eθn | Xn, θn) = p(eθn | Xn). The equality (I) holds due to Lemma 2. The inequality (III) can be shown by a limiting concentration argument on the prior distribution, which is included in the supplementary material. Lemma 1. Suppose that X1, . . . , Xn are independent and generated by θi ∼π(θi) and Xi | θi ∼ p(xi | θi). Suppose Mn is an (n, B)-rate estimation code with risk E d(θn, Mn(Xn)) ≤D. Then the rate B is lower bounded by the solution to the following problem: min p(eθn | Xn,θn) I(Xn; eθn) subject to E d(θn, eθn) ≤D, (4) p(eθn | Xn, θn) = p(eθn | Xn). The next lemma gives the solution to problem (4) when we have θi ∼N(0, c2) and Xi | θi ∼ N(θi, σ2) Lemma 2. Suppose θi ∼N(0, c2) and Xi | θi ∼N(θi, σ2) for i = 1, . . . , n. For any random vector eθn satisfying E d(θn, eθn) ≤D and p(eθn | Xn, θn) = p(eθn | Xn) we have I(Xn; eθn) ≥n 2 log c4 (σ2 + c2)(D − σ2c2 σ2+c2 ) . Combining the above two lemmas, we obtain a lower bound of the risk assuming that θn follows the prior distribution πn: Corollary 1. Suppose Mn is a (n, B)-rate estimation code for the source θi ∼N(0, c2) and Xi | θi ∼N(θi, σ2), then E d(θn, Mn(Xn)) ≥ σ2c2 σ2 + c2 + c4 σ2 + c2 2−2B. (5) 3.1 An adaptive source coding method We now present a source coding method, which we will show attains the minimax lower bound asymptotically with high probability. Suppose that the encoder is given a sequence of observations (X1, . . . , Xn), and both the encoder and the decoder know the radius c of the L2 ball in which the mean vector lies. The steps of the source coding method are outlined below: Step 1. Generating codebooks. The codebooks are distributed to both the encoder and the decoder. 5 (a) Generate codebook B = {1/√n, 2/√n, . . . , ⌈c2√n⌉/√n}. (b) Generate codebook X which consists of 2nB i.i.d. random vectors from the uniform distribution on the n-dimensional unit sphere Sn−1. Step 2. Encoding. (a) Encode bb2 = 1 n∥X∥2 −σ2 by ˇb2 = arg min{|b2 −bb2| : b2 ∈B}. (b) Encode Xn by ˇXn = arg max{⟨Xn, xn⟩: xn ∈X}. Step 3. Transmit or store (ˇb2, ˇXn) by their corresponding indices using log c2 + 1 2 log n + nB bits. Step 4. Decoding. (a) Recover (ˇb2, ˇXn) by the transmitted or stored indices. (b) Estimate θ by ˇθn = s nˇb4(1 −2−2B) ˇb2 + σ2 · ˇXn. We make several remarks on this quantized estimation method. Remark 1. The rate of this coding method is B + log c2 n + log n 2n , which is asymptotically B bits. Remark 2. The method is probabilistic; the randomness comes from the construction of the codebook X. Denoting by M∗ n,B,σ,c the ensemble of such random quantizers, there is then a natural oneto-one mapping between M∗ n,B,σ,c and (Sn−1)2nB and we attach probability measure to M∗ n,B,σ,c corresponding to the product uniform distribution on (Sn−1)2nB. Remark 3. The main idea behind this coding scheme is to encode the magnitude and the direction of the observation vector separately, in such a way that the procedure adapts to sources with different norms of the mean vectors. Remark 4. The computational complexity of this source coding method is exponential in n. Therefore, like the Shannon random codebook, this is a demonstration of the asymptotic achievability of the lower bound (3), rather than a practical scheme to be implemented. We discuss possible computationally efficient algorithms in Section 5. The following shows that with high probability this procedure will attain the desired lower bound asymptotically. Theorem 2. For a sequence of vectors {θn}∞ n=1 satisfying θn ∈Rn and ∥θn∥2/n = b2 ≤c2, as n →∞ P d(θn, Mn(Xn)) > σ2b2 σ2 + b2 + b4 σ2 + b2 2−2B + C r log n n ! −→0 (6) for some constant C that does not depend on n (but could possibly depend on b, σ and B). The probability measure is with respect to both Mn ∈M∗ n,B,σ,c and Xn ∈Rn. This theorem shows that the source coding method not only achieves the desired minimax lower bound for the L2 ball with high probability with respect to the random codebook and source distribution, but also adapts to the true magnitude of the mean vector θn. It agrees with the intuition that the hardest mean vector to estimate lies on the boundary of the L2 ball. Based on Theorem 2 we can obtain a uniform high probability bound for mean vectors in the L2 ball. Corollary 2. For any sequence of vectors {θn}∞ n=1 satisfying θn ∈Rn and ∥θn∥2/n ≤c2, as n →∞ P d(θn, Mn(Xn)) > σ2c2 σ2 + c2 + c4 σ2 + c2 2−2B + C′ r log n n ! −→0 for some constant C′ that does not depend on n. We include the details of the proof of Theorem 2 in the supplementary material, which carefully analyzes the three terms in the following decomposition of the loss function: 6 −4 −2 0 2 4 Index Estimate B=0.1 B=0.2 B=0.5 B=1 James−Stein Figure 3: Comparison of the quantized estimates with different rates B, the James-Stein estimator, and the true mean vector. The heights of the bars are the averaged estimates based on 100 replicates. Each large background rectangle indicates the original mean component θj. d(θn, ˇθn) = 1 n ˇθn −θn 2 = 1 n ˇθn −bγXn + bγXn −θn 2 = 1 n ˇθn −bγXn 2 | {z } A1 + 1 n ∥bγXn −θn∥2 | {z } A2 + 2 n⟨ˇθn −bγXn, bγXn −θn⟩ | {z } A3 where bγ = bb2 bb2+σ2 with bb2 = ∥Xn∥2/n −σ2. Term A1 characterizes the quantization error. Term A2 does not involve the random codebook, and is the loss of a type of James-Stein estimator. The cross term A3 vanishes as n →∞. 4 Simulations In this section we present a set of simulation results showing the empirical performance of the proposed quantized estimation method. Throughout the simulation, we fix the noise level σ2 = 1, while varying the other parameters c and B. First we show in Figure 3 the effect of quantized estimation and compare it with the James-Stein estimator. Setting n = 15 and c = 2, we randomly generate a mean vector θn ∈Rn with ∥θ∥2/n = c2. A random vector X is then drawn from N(θn, In) and quantized estimates with rates B ∈ {0.1, 0.2, 0.5, 1} are calculated; for comparison we also compute the James-Stein estimator, given by bθn JS =  1 −(n−2)σ2 ∥Xn∥2  Xn. We repeat this sampling and estimation procedure 100 times and report the averaged risk estimates in Figure 3. We see that the quantized estimator essentially shrinks the random vector towards zero. With small rates, the shrinkage is strong, with all the estimates close to zero. Estimates with larger rates approach the James-Stein estimator. In our second set of simulations, we choose c from {0.1, 0.5, 1, 5, 10} to reflect different signal-tonoise ratios, and choose B from {0.1, 0.2, 0.5, 1}. For each combination of the values of c and B, we vary n, the dimension of the mean vector, which is also the number of observations. Given a set of parameters c, B and n, a mean vector θn is generated uniformly on the sphere ∥θn∥2/n = c2 and data Xn are generated following the distribution N(θn, σ2In). We quantize the data using the source coding method, and compute the mean squared error between the estimator and the true mean vector. The procedure is repeated 100 times for each of the parameter combinations, and the average and standard deviation of the mean squared errors are recorded. The results are shown in Figure 4. We see that as n increases, the average error decreases and approaches the theoretic lower bound in Theorem 1. Moreover, the standard deviation of the mean squared errors also decreases, confirming the result of Theorem 2 that the convergence is with high probability. 5 Discussion and future work In this paper, we establish a sharp lower bound on the asymptotic minimax risk for quantized estimators of nonparametric normal means for the case of a Euclidean ball. Similar techniques can be 7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 1 100 4 8 12 n MSE B=0.1 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 1 100 4 8 12 n B=0.2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 1 100 4 8 12 n B=0.5 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 1 100 4 8 12 n B=1 G G G G c=0.5 c=1 c=5 c=10 Figure 4: Mean squared errors and standard deviations of the quantized estimator versus n for different values of (B, c). The horizontal dashed lines indicate the lower bounds. applied to the setting where the parameter space is an ellipsoid Θ = {θ : P∞ j=1 a2 jθ2 j ≤c2}. A principal case of interest is the Sobolev ellipsoid of order m where a2 j ∼(πj)2m as j →∞. The Sobolev ellipsoid arises naturally in nonparametric function estimation and is thus of great importance. We leave this to future work. Donoho discusses the parallel between rate distortion theory and Pinsker’s work in his Wald Lectures [4]. Focusing on the case of the Sobolev space of order m, which we denote by Fm, it is shown that the Kolmogorov entropy Hϵ(Fm) and the rate distortion function R(D, X) satisfy Hϵ(Fm) ≍sup{R(ϵ2, X) : P(X ∈Fm) = 1} as ϵ →0. This connects the worst-case minimax analysis and least-favorable rate distortion function for the function class. Another informationtheoretic formulation of minimax rates lies in the so-called “le Cam equation” Hϵ(F) = nϵ2 [14, 15]. However, both are different from the direction we pursue in this paper, which is to impose communication constraints in minimax analysis. In other related work, researchers in communications theory have studied estimation problems in sensor networks under communication constraints. Draper and Wornell [5] obtain a result on the so-called “one-step problem” for the quadratic-Gaussian case, which is essentially the same as the statement in our Corollary 1. In fact, they consider a similar setting, but treat the mean vector as random and generated independently from a known normal distribution. In contrast, we assume a fixed but unknown mean vector and establish a minimax lower bound as well as an adaptive source coding method that adapts to the fixed mean vector within the parameter space. Zhang et al. [16] also consider minimax bounds with communication constraints. However, the analysis in [16] is focused on distributed parametric estimation, where the data are distributed between several machines. Information is shared between the machines in order to construct a parameter estimate, and constraints are placed on the amount of communication that is allowed. In addition to treating more general ellipsoids, an important direction for future work is to design computationally efficient quantized nonparametric estimators. One possible method is to divide the variables into smaller blocks and quantize them separately. A more interesting and promising approach is to adapt the recent work of Venkataramanan et al. [12] that uses sparse regression for lossy compression. We anticipate that with appropriate modifications, this scheme can be applied to quantized nonparametric estimation to yield practical algorithms, trading off a worse error exponent in the convergence rate to the optimal quantized minimax risk for reduced complexity encoders and decoders. Acknowledgements Research supported in part by NSF grant IIS-1116730, AFOSR grant FA9550-09-1-0373, ONR grant N000141210762, and an Amazon AWS in Education Machine Learning Research grant. The authors thank Andrew Barron, John Duchi, and Alfred Hero for valuable comments on this work. 8 References [1] T. Tony Cai, Jianqing Fan, and Tiefeng Jiang. Distributions of angles in random packing on spheres. The Journal of Machine Learning Research, 14(1):1837–1864, 2013. [2] T. Tony Cai and Tiefeng Jiang. Phase transition in limiting distributions of coherence of highdimensional random matrices. Journal of Multivariate Analysis, 107:24–39, 2012. [3] Venkat Chandrasekarana and Michael I. Jordan. Computational and statistical tradeoffs via convex relaxation. PNAS, 110(13):E1181–E1190, March 2013. [4] David L. Donoho. Wald lecture I: Counting bits with Kolmogorov and Shannon. 2000. [5] Stark C. Draper and Gregory W. Wornell. Side information aware coding strategies for sensor networks. Selected Areas in Communications, IEEE Journal on, 22(6):966–976, 2004. [6] Jon M. Jenkins et al. Overview of the Kepler science processing pipeline. The Astrophysical Journal Letters, 713(2):L87, 2010. [7] Robert G. Gallager. Information Theory and Reliable Communication. John Wiley & Sons, 1968. [8] Iain M. Johnstone. Function estimation and Gaussian sequence models. 2002. Unpublished manuscript. [9] Michael Nussbaum. Minimax risk: Pinsker bound. Encyclopedia of Statistical Sciences, 3:451–460, 1999. [10] Mark Semenovich Pinsker. Optimal filtering of square-integrable signals in Gaussian noise. Problemy Peredachi Informatsii, 16(2):52–68, 1980. [11] Alexandre B. Tsybakov. Introduction to Nonparametric Estimation. Springer Series in Statistics, 1st edition, 2008. [12] Ramji Venkataramanan, Tuhin Sarkar, and Sekhar Tatikonda. Lossy compression via sparse linear regression: Computationally efficient encoding and decoding. In IEEE International Symposium on Information Theory (ISIT), pages 1182–1186. IEEE, 2013. [13] Larry Wasserman. All of Nonparametric Statistics. Springer-Verlag, 2006. [14] Wing Hung Wong and Xiaotong Shen. Probability inequalities for likelihood ratios and convergence rates of sieve MLEs. The Annals of Statistics, 23:339–362, 1995. [15] Yuhong Yang and Andrew Barron. Information-theoretic determination of minimax rates of convergence. The Annals of Statistics, 27(5):1564–1599, 1999. [16] Yuchen Zhang, John Duchi, Michael Jordan, and Martin J. Wainwright. Information-theoretic lower bounds for distributed statistical estimation with communication constraints. In Advances in Neural Information Processing Systems, pages 2328–2336, 2013. 9
2014
287
5,388
Large-Margin Convex Polytope Machine Alex Kantchelian Michael Carl Tschantz Ling Huang† Peter L. Bartlett Anthony D. Joseph J. D. Tygar UC Berkeley – {akant|mct|bartlett|adj|tygar}@cs.berkeley.edu †Datavisor – ling.huang@datavisor.com Abstract We present the Convex Polytope Machine (CPM), a novel non-linear learning algorithm for large-scale binary classification tasks. The CPM finds a large margin convex polytope separator which encloses one class. We develop a stochastic gradient descent based algorithm that is amenable to massive datasets, and augment it with a heuristic procedure to avoid sub-optimal local minima. Our experimental evaluations of the CPM on large-scale datasets from distinct domains (MNIST handwritten digit recognition, text topic, and web security) demonstrate that the CPM trains models faster, sometimes several orders of magnitude, than state-ofthe-art similar approaches and kernel-SVM methods while achieving comparable or better classification performance. Our empirical results suggest that, unlike prior similar approaches, we do not need to control the number of sub-classifiers (sides of the polytope) to avoid overfitting. 1 Introduction Many application domains of machine learning use massive data sets in dense medium-dimensional or sparse high-dimensional spaces. These domains also require near real-time responses in both the prediction and the model training phases. These applications often deal with inherent nonstationarity, thus the models need to be constantly updated in order to catch up with drift. Today, the de facto algorithm for binary classification tasks at these scales is linear SVM. Indeed, since Shalev-Shwartz et al. demonstrated both theoretically and experimentally that large margin linear classifiers can be efficiently trained at scale using stochastic gradient descent (SGD), the Pegasos [1] algorithm has become a standard building tool for the machine learning practitioner. We propose a novel algorithm for Convex Polytope Machine (CPM) separation exhibiting superior empirical performance to existing algorithms, with running times on a large dataset that are up to five orders of magnitude faster. We conjecture that worst case bounds are independent of the number K of faces of the convex polytope and state a theorem of loose upper bounds in terms of √ K. In theory, as the VC dimension of d-dimensional linear separators is d + 1, a linear classifier in very high dimension d is expected to have a considerable expressiveness power. This argument is often understood as “everything is separable in high dimensional spaces; hence linear separation is good enough”. However, in practice, deployed systems rarely use a single naked linear separator. One explanation for this gap between theory and practice is that while the probability of a single hyperplane perfectly separating both classes in very high dimensions is high, the resulting classifier margin might be very small. Since the classifier margin also accounts for the generalization power, we might experience poor future classification performance in this scenario. Figure 1a provides a two-dimensional example of a data set that has a small margin when using a single separator (solid line) despite being linearly separable and intuitively easily classified. The intuition that the data is easily classified comes from the data naturally separating into three clusters 1 with two of them in the positive class. Such clusters can form due to the positive instances being generated by a collection of different processes. + A B ++ (a) Instances are perfectly linearly separable (solid line), although with small margin due to positive instances (A & B) having conflicting patterns. We can obtain higher margin by separately training two linear sub-classifiers (dashed lines) on left and right clusters of positive instances, each against all the negative instances, yielding a prediction value of the maximum of the sub-classifiers. 2 1 1’ (b) The worst-case margin is insensitive to wiggling of sub-classifiers having non-minimal margin. Sub-classifier 2 has the smallest margin, and sub-classifier 1 is allowed to freely move without affecting δWC. For comparison, the largest-margin solution 1′ is shown (dashed lines). Figure 1: Positive (•) and negative (◦) instances in continuous two dimensional feature space. As Figure 1a shows, a way of increasing the margins is to introduce two linear separators (dashed lines), one for each positive cluster. We take advantage of this intuition to design a novel machine learning algorithm that will provide larger margins than a single linear classifier while still enjoying much of the computational effectiveness of a simple linear separator. Our algorithm learns a bounded number of linear classifiers simultaneously. The global classifier will aggregate all the sub-classifiers decisions by taking the maximum sub-classifier score. The maximum aggregation has the effect of assigning a positive point to a unique sub-classifier. The model class we have intuitively described above corresponds to convex polytope separators. In Section 2, we present related work in convex polytope classifiers and in Section 3, we define the CPM optimization problem and derive loose upper bounds. In Section 4, we discuss a Stochastic Gradient Descent-based algorithm for the CPM and perform a comparative evaluation in Section 5. 2 Related Work Fischer focuses on finding the optimal polygon in terms of the number of misclassified points drawn independently from an unknown distribution using an algorithm with a running time of more than O(n12) where n is the number of sample points [2]. We instead focus on finding good, not optimal, polygons that generalize well in practice despite having fast running times. Our focus on generalization leads us to maximize the margin, unlike this work, which actually minimizes it to make their proofs easier. Takacs proposes algorithms for training convex polytope classifiers based on the smooth approximation of the maximum function [3]. While his algorithms use smooth approximation during training, it uses the original formula during prediction, which introduces a gap that could deteriorate the accuracy. The proposed algorithms achieve similar classification accuracy to several nonlinear classifiers, including KNN, decision tree and kernel SVM. However, the training time of the algorithms is often much longer than those nonlinear classifiers (e.g., an order of magnitude longer than ID3 algorithm and eight times longer than kernel SVM on CHESS DATASET), diminishing the motivation to use the proposed algorithms in realistic setting. Zhang et al. propose an Adaptive Multi-hyperplane Machine (AMM) algorithm that is fast during both training and prediction, and capable of handling nonlinear classification problems [4]. They develop an iterative algorithm based on the SGD method to search for the number of hyperplanes and train the model. Their experiments on several large data sets show that AMM is nearly as fast as the state-of-theart linear SVM solver, and achieves classification accuracy somewhere between linear and kernel 2 SVMs. Manwani and Sastry propose two methods for learning polytope classifiers, one based on logistic function [5], and another based on perceptron method [6], and propose alternating optimization algorithms to train the classifiers. However, they only evaluate the proposed methods with a few small datasets (with no more than 1000 samples in each), and do not compare them to other widely used (nonlinear) classifiers (e.g., KNN, decision tree, SVM). It is unclear how applicable these algorithms are to large-scale data. Our work makes three significant contributions over their work, including 1) deriving the formulation from a large-margin argument and obtaining a regularization term which is missing in [6], 2) safely restricting the choice of assignments to only positive instances, leading to a training time optimization heuristic and 3) demonstrating higher performance on non-synthetic, large scale datasets, when using two CPMs together. 3 Large-Margin Convex Polytopes In this section, we derive and discuss several alternative optimization problems for finding a largemargin convex polytope which separates binary labeled points of Rd. 3.1 Problem Setup and Model Space Let D = {(xi, yi)}1≤i≤n be a binary labeled dataset of n instances, where x ∈Rd and y ∈{−1, 1}. For the sake of notational brevity, we assume that the xi include a constant unitary component corresponding to a bias term. Our prediction problem is to find a classifier c : Rd →{−1, 1} such that c(xi) is a good estimator of yi. To do so, we consider classifiers constructed from convex K-faced polytope separators for a fixed positive integer K. Let PK be the model space of convex K-faced polytope separators: PK =  f : Rd →R f(x) = max 1≤k≤K(Wx)k, W ∈RK×d  For each such function f in PK, we can get a classifier cf such that cf(x) is 1 if f(x) > 0 and −1 otherwise. This model space corresponds to a shallow single hidden layer neural network with a max aggregator. Note that when K = 1, P1 is simply the space of all linear classifiers. Importantly, when K ≥2, elements of PK are not guaranteed to have additive inverses in PK. As a consequence, the labels y = −1 and y = +1 are not interchangeable. Geometrically, the negative class remains enclosed within the convex polytope while the positive class lives outside of it, hence the label asymmetry. To construct a classifier without label asymmetry, we can use two polytopes, one with the negative instances on the inside the polytope to get a classification function f−and one with the positive instances on the inside to get f+. From these two polytopes, we construct the classifier cf−,f+ where cf−,f+(x) is 1 if f−(x) −f+(x) > 0 and −1 otherwise. To better understand the nature of the faces of a single polytope, for a given polytope W and a data point x, we denote by zW(x) the index of the maximum sub-classifier for x: zW(x) = argmax 1≤k≤K (Wx)k We call zW(x) the assigned sub-classifier for instance x. When clear from context, we drop W from zW. We also use the notation Wk to designate the k-th row of W, which corresponds to the k-th face of the polytope, or the k-th sub-classifier. Hence, Wz(x) identifies the separator assigned to x. We now pursue a geometric large-margin based approach for formulating the concrete optimization problem. To simplify the notations and without loss of generality, we suppose that W is rownormalized such that ||Wk|| = 1 for all k. We also initially suppose our dataset is perfectly separable by a K-faced convex polytope. 3.2 Margins for Convex Polytopes When K = 1, the problem reduces to finding a good linear classifier and only a single natural margin δ of the separator exists [7]: δW = min 1≤i≤n yiW1xi 3 Maximizing δW yields the well known (linear) Support Vector Machine. However, multiple notions of margin for a K-faced convex polytope with K ≥2 exist. We consider two. Let the worst case margin δWC W be the smallest margin of any point to the polytope. Over all the K sub-classifiers, we find the one with the minimal margin to the closest point assigned to it: δWC W = min 1≤i≤n yiWz(xi)xi = min 1≤k≤K min i:z(xi)=k yiWkxi The worst case margin is very similar to the linear classifier margin but suffers from an important drawback. Maximizing δWC leaves K −1 sub-classifiers wiggling while over-focusing on the subclassifier with the smallest margin. See Figure 1b for a geometrical intuition. Thus, we instead focus on the total margin, which measures each sub-classifier’s margin with respect to just its assigned points. The total margin δT W is the sum of the K sub-classifiers margins: δT W = K X k=1 min i:z(xi)=k yiWkxi The total margin gives the same importance to the K sub-classifier margins. 3.3 Maximizing the Margin We now turn to the question of maximizing the margin. Here, we provide an overview of a smoothed but non-convex optimization problem for maximizing the total margin. The appendix provides a step-by-step derivation. We would like to optimize the margin by solving the optimization problem max W δT W subject to ∥W1∥= · · · = ∥WK∥= 1 (1) Introducing one additional variable ζk per classifier, problem (1) is equivalent to: max W,ζ K X k=1 ζk subject to ∀i, ζz(xi) ≤yiWz(xi)xi (2) ζ1 > 0, . . . , ζK > 0 ∥W1∥= · · · = ∥WK∥= 1 Considering the unnormalized rows Wk/ζk, we obtain the following equivalent formulation: max W K X k=1 1 ∥Wk∥ subject to ∀i, 1 ≤yiWz(xi)xi (3) When y = −1 and z(xi) satisfy the margin constraint in (3), we have that the constraint holds for every sub-classifier k since yiWkxi is minimal at k = z(xi). Thus, when y = −1, we can enforce the constraint for all k. We can also smooth the objective into a convex, defined everywhere one by minimizing the sum of the inverse squares of the terms instead of maximizing the sum of the terms. We obtain the following smoothed problem: min W K X k=1 ∥Wk∥2 subject to ∀i : yi = −1, ∀k ∈{1, . . . , K}, 1 + Wkxi ≤0 (4) ∀i : yi = +1, 1 −Wz(xi)xi ≤0 (5) The objective of the above program is now the familiar L2 regularization term ∥W∥2. The negative instances constraints (4) are convex (linear functions), but the positive terms (5) result in non-convex constraints because of the instance-dependent assignment z. As for the Support Vector Machine, we can introduce n slack variables ξi and a regularization factor C > 0 for the common case of noisy, non-separable data. Hence, the practical problem becomes: min W,ξ ∥W∥2 + C n X i=1 ξi subject to ∀i : yi = −1, ∀k ∈{1, . . . , K}, 1 + Wkxi ≤ξi ≥0 (6) ∀i : yi = +1, 1 −Wz(xi)xi ≤ξi ≥0 Following the same steps, we obtain the following problem for maximizing the worst-case margin. The only difference is the regularization term in the objective function which becomes maxk ∥Wk∥2 instead of ∥W∥2. 4 Discussion. The goal of our relaxation is to demonstrate that our solution involves two intuitive steps, including (1) assigning positive instances to sub-classifiers, and (2) solving a collection of SVM-like sub-problems. While our solution taken as a whole remains non-convex, this decomposition isolates the non-convexity to a single intuitive assignment problem that is similar to clustering. This isolation enables us to use intuitive heuristics or clustering-like algorithms to handle the nonconvexity. Indeed, in our final form of Eq. (6), if the optimal assignment function z(xi) of positive instances to sub-classifiers were known and fixed, the problem would be reduced to a collection of perfectly independent convex minimization problems. Each such sub-problem corresponds to a classical SVM defined on all negative instances and the subset of positive instances assigned by z(xi). It is in this sense that our approach optimizes the total margin. 3.4 Choice of K, Generalization Bound for CPM Assuming we can efficiently solve this optimization problem, we would need to adjust the number K of faces and the degree C of regulation. The following result gives a preliminary generalization bound for the CPM. For B1, . . . , Bk ≥0, let FK,B be the following subset of the set PK of convex polytope separators: FK,B =  f : Rd →R f(x) = max 1≤k≤K(Wx)k, W ∈RK×d, ∀k, ∥Wk∥≤Bk  Theorem 1. There exists some constant A > 0 such that for all distributions P over X × {−1, 1}, K in {1, 2, 3, . . .}, B1, . . . , Bk ≥0, and δ > 0, with probability at least 1 −δ over the training set (x1, y1), . . . , (xn, yn) ∼P, any f in FK,B is such that: P(yf(x) ≤0) ≤1 n n X i=1 max(0, 1 −yif(xi)) + A P k Bk √n + r ln (2/δ) 2n This is a uniform bound on the 0-1 risk of classifiers in FK,B. It shows that with high probability, the risk is bounded by the empirical hinge loss plus a capacity term that decreases in n−1/2 and is proportional to the sum of the sub-classifier norms. Note that as we have P k ∥Wk∥≤ √ K∥W∥, the capacity term is essentially equivalent to √ K∥W∥. As a comparison, the generalization error has been previously shown to be proportional to K∥W∥in [4, Thm. 2]. In practice, this bound is very loose as it does not explain the observed absence of over fitting as K gets large. We experimentally demonstrate this phenomenon in Section 5. We conjecture that there exists a bound that must be independent of K altogether. The proof of Theorem 1 relies on a result due to Bartlett et al. on Rademacher complexities. We first prove that the Rademacher complexity of FK,B is in O(P k Bk/√n). We then invoke Theorem 7 of [8] to show our result. The appendix contains the full proof. 4 SGD-based Learning In this section, we present a Stochastic Gradient Descent (SGD) based learning algorithm for approximately solving the total margin maximization problem (6). The choice of SGD is motivated by two factors. First, we would like our learning technique to efficiently scale to several million instances of sparse high dimensional space. The sample-iterative nature of SGD makes it a very suitable candidate to this end [9]. Second, the optimization problem we are solving is non-convex. Hence, there are potentially many local optima which might not result in an acceptable solution. SGD has recently been shown to work well for such learning problems [10] where we might not be interested in a global optimum but only a good enough local optimum from the point of view of the learning problem. Problem (6) can be expressed as an unconstrained minimization problem as follow: min W X i:yi=−1 K X k=1 [1 + Wkxi]+ + X i:yi=+1 [1 −Wz(xi)xi]+ + λ∥W∥2 where [x]+ = max(0, x) and λ > 0. This form reveals the strong similarity with optimizing K unconstrained linear SVMs [1]. The difference is that although each sub-classifier is trained on 5 all the negative instances, positive instances are associated to a unique sub-classifier. From the unconstrained form, we can derive the stochastic gradient descent Algorithm 1. For the positive instances, we isolate the task of finding the assigned sub-classifier z to a separate procedure ASSIGN. We use the Pegasos inverse schedule ηt = 1/(λt). Algorithm 1 Stochastic gradient descent algorithm for solving problem (6). function SGDTRAIN(D, λ, T, (ηt), h) Initialize W ∈RK×d, W ←0 for t ←1, . . . , T do Pick (x, y) ∈D if y = −1 then for k ←1, . . . , K do if Wkx > −1 then Wk ←Wk −ηtx else if y = +1 then z ←argmaxk Wkx if Wzx < 1 then z ←ASSIGN(W, x, h) Wz ←Wz + ηtx W ←(1 −ηtλ)W return W Because the optimization problem (6) is nonconvex, a pure SGD approach could get stuck in a local optimum. We found that pure SGD gets stuck in low-quality local optima in practice. These optima are characterized by assigning most of the positive instances to a small number of sub-classifiers. In this configuration, the remaining sub-classifiers serve no purpose. Intuitively, the algorithm clustered the data into large “super-clusters” ignoring the more subtle sub-clusters comprising the larger super-clusters. The large clusters represent an appealing local optima since breaking one down into sub-clusters often requires transitioning through a patch of lower accuracy as the sub-classifiers realign themselves to the new cluster boundaries. We may view the local optima as the algorithm underfitting the data by using too simple of a model. In this case, the algorithm needs encouragement to explore more complex clusterings. With this intuition in mind, we add a term encouraging the algorithm to explore higher entropy configurations of the sub-classifiers. To do so, we use the entropy of the random variable Z = argmaxk Wkx where x ∼D+, a distribution defined on the set of all positive instances as follows. Let nk be the number of positive instances assigned to sub-classifier k, and n be the total number of positive instances. We define D+ as the empirical distribution on n1 n , n2 n , . . . , nk n  . The entropy is zero when the same classifier fires for all positive instances, and maximal at log2 K when every classifier fires on a K−1 fraction of the positive instances. Thus, maximizing the entropy encourages the algorithm to break down large clusters into smaller clusters of near equal size. We use this notion of entropy in our heuristic procedure for assignment, described in Algorithm 2. ASSIGN takes a predefined minimum entropy level h ≥0 and compensates for disparities in how positive instances are assigned to sub-classifiers, where the disparity is measured by entropy. When the entropy is above h, there is no need to change the natural argmaxk Wkx assignment. Conversely, if the current entropy is below h, then we pick an assignment which is guaranteed to increase the entropy. Thus, when h = 0, there is no adjustment made. It keeps a dictionary UNADJ mapping the previous points it has encountered to the unadjusted assignment that the natural argmax assignment would had made at the time of encountering the point. We write UNADJ + (x, k) to denote the new dictionary U such that U[v] is equal to k if v = x and to UNADJ[v] otherwise. Dictionary UNADJ keeps track of the assigned positives per sub-classifiers, and serves to estimate the current entropy in the configuration without needing to recompute every prior point’s assignment. 5 Evaluation We use four data sets to evaluate the CPM: (1) an MNIST dataset consisting of labeled handwritten digits encoded in 28×28 gray scale pictures [11, 12] (60,000 training and 10,000 testing instances); (2) an MNIST8m dataset consisting of 8,100,000 pictures obtained by applying various random deformations to MNIST training instances MNIST [13]; (3) a URL dataset [12] used for malicious URL detection [14] (1.1 million training and 1.1 million testing instances in a very large dimensional space of more than 2.3 million features); and (4) the RCV1-bin dataset [12] corresponding to a binary classification task (separating corporate and economics categories from government and markets categories [15]) defined over the RCV1 dataset of news articles (20,242 training and 677,399 testing instances). Since our main focus is on binary classification, for the two MNIST datasets we evaluate 6 distinguishing 2’s from any other digit, which we call MNIST-2 and MNIST8m-2. With thirty times more testing than training data, the RCV1-bin dataset is a good benchmark for over fitting issues. 5.1 Parameter Tuning Algorithm 2 Heuristic maximum assignment algorithm. The input is the current weight matrix W, positive instance x, and the desired assignment entropy h ≥0. Initialize UNADJ←{} function ASSIGN(W, x, h) kunadj ←argmaxk Wkx if ENTROPY(UNADJ + (x, kunadj)) ≥h then kadj ←kunadj else hcur ←ENTROPY(UNADJ) Kinc ←{k: ENTROPY(UNADJ+(x, k)) > hcur} kadj ←argmax k∈Kinc Wkx UNADJ ←UNADJ + (x, kunadj) return kadj All four datasets have well defined training and testing subsets and to tune each algorithms meta-parameters (λ and h for the CPM, C and γ for RBF-SVM, and λ for AMM), we randomly select a fixed validation subset from the training set (10,000 instances for MNIST-2/MNIST8m-2; 1,000 instances for RCV1-bin/URL). For the CPM, we use a double-sided CPM as described in section 3.1, where both CPMs share the same metaparameters. We start by fixing a number of iterations T and a number of hyperplanes K which will result in a reasonable execution time, effectively treating these parameters as a computational budget, and we experimentally demonstrate that increasing either K or T always results in a decrease of the testing error. Once these are selected, we let h = 0 and select the best λ in {T −1, 10 × T −1, . . . , 104 × T −1}. We then choose h from {0, log K/10, log 2K/10, . . . , log 9K/10}, effectively performing a one-round coordinate descent on λ, h. To test the effectiveness of our empirical entropy-driven assignment procedure, we mute the mechanism by also testing with h = 0. The AMM has three parameters to adjust (excluding T and the equivalent of K), two of which control the weight pruning mechanism and are left set at default values. We only adjust λ. Contrary to the CPM, we do not observe AMM testing error to strictly decrease with the number of iterations T. We observe erratic behavior and thus we manually select the smallest T for which the mean validation error appears to reach a minimum. For RBF-SVM, we use the LibSVM [16] implementation and perform the usual grid search on the parameter space. 5.2 Performance Unless stated otherwise, we used one core of an Intel Xeon E5 (3.2Ghz, 64GB RAM) for experiments. Table 1 presents the results of experiments and shows that the CPM achieves comparable, and at times better, classification accuracy than the RBF-SVM, while working at a relatively small and constant computational budget. For the CPM, T was up to 32 million and K ranged from 10 to 100. For AMM, T ranged from 500,000 to 36 million. Across methods, the worst execution time is for the MNIST8m-2 task, where a 512 core parallel implementation of RBF-SVM runs in 2 days [17], and our sequential single-core algorithm runs in less than 5 minutes. The AMM has significantly larger errors and/or execution times. For small training sets such as MNIST-2 and RCV1-bin, we were not able to achieve consistent results, regardless of how we set T and λ, and we conjecture that this is a consequence of the weight pruning mechanism. The results show that our empirical entropydriven assignment procedure for the CPM leads to better solutions for all tasks. In the RCV1-bin and MNIST-2 tasks, the improvement in accuracy from using a tuned entropy parameter is 31% and 21%, respectively, which is statistically significant. We use the MNIST8m-2 task to the study the effects of tuning T and K on the CPM. We first choose a grid of values for T, K and for a fixed regularization factor C and h = 0, we train a model for each point of the parameter grid, and evaluate its performance on the testing set. Note that for C to remain constant, we adjust λ = 1 CT . We run each experiment 5 times and only report the mean accuracy. Figure 2 shows how this mean error rate evolves as a function of both T and K. We observe two phenomena. First, for any value K > 1, the error rate decreases with T. Second, for large enough values of T, the error rate decreases when K increases. These two experimental 7 MNIST-2 MNIST8m-2 URL RCV1-bin Error Time Error Time Error Time Error Time CPM 0.38 ± 0.028 2m 0.30 ± 0.023 4m 1.32 ± 0.012 3m 2.82 ± 0.059 2m CPM h=0 0.46 ± 0.026 2m 0.35 ± 0.034 4m 1.35 ± 0.029 3m 3.69 ± 0.156 2m RBF-SVM 0.35 7m 0.43∗ 2d∗∗ Timed out in 2 weeks 3.7 46m AMM 2.83 ± 1.090 1m 0.38 ± 0.024 1hr 2.20 ± 0.067 5m 15.40 ± 6.420 1m * for unadjusted parameters [17] ** running on 512 processors [17] Table 1: Error rates and running times (include both training and testing periods) for binary tasks. Means and standard deviations for 5 runs with random shuffling of the training set. observations validate our treatment of both K and T as budgeting parameters. The observation about K also provides empirical evidence of our conjecture that large values of K do not lead to overfitting. 5.3 Multi-class Classification Figure 2: Error rate on MNIST8m-2 as a function of K, T. C = 0.01 and h = 0 are fixed. We performed a preliminary multiclass classification experiment using the MNIST/MNIST8m datasets. There are several approaches for building a multi-class classifier from a binary classifier [18, 19, 20]. We used a one-vs-one approach where we train 10 2  = 45 one-vs-one classifiers and classify by a majority vote rule with random tie breaking. While this approach is not optimal, it provides an approximation of achievable performance. For MNIST, comparing CPM to RBF-SVM, we achieve a testing error of 1.61 ± 0.019 and for the CPM and of 1.47 for RBF-SVM, with running times of 7m20s and 6m43s, respectively. On MNIST8m we achieve an error of 1.03 ± 0.074 for CPM (2h3m) and of 0.67 (8 days) for RBF-SVM as reported by [13]. 6 Conclusion We propose a novel algorithm for Convex Polytope Machine (CPM) separation that provides larger margins than a single linear classifier, while still enjoying the computational effectiveness of a simple linear separator. Our algorithm learns a bounded number of linear classifiers simultaneously. On large datasets, the CPM outperforms RBF-SVM and AMM, both in terms of running times and error rates. Furthermore, by not pruning the number of sub-classifiers used, CPM is algorithmically simpler than AMM. CPM avoids such complications by having little tendency to overfit the data as the number K of sub-classifiers increases, shown empirically in Section 5.2. References [1] Shai Shalev-Shwartz, Yoram Singer, and Nathan Srebro. Pegasos: Primal Estimated subGrAdient SOlver for SVM. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, pages 807–814, New York, NY, USA, 2007. ACM. [2] Paul Fischer. More or less efficient agnostic learning of convex polygons. In Proceedings of the Eighth Annual Conference on Computational Learning Theory, COLT ’95, pages 337–344, New York, NY, USA, 1995. ACM. [3] Gabor Takacs. Smooth maximum based algorithms for classification, regression, and collaborative filtering. Acta Technica Jaurinensis, 3(1), 2010. [4] Zhuang Wang, Nemanja Djuric, Koby Crammer, and Slobodan Vucetic. Trading representability for scalability: adaptive multi-hyperplane machine for nonlinear classification. In Proceed8 ing of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining (KDD 2011), 2011. [5] Naresh Manwani and P. S. Sastry. Learning polyhedral classifiers using logistic function. In Proceedings of the 2nd Asian Conference on Machine Learning (ACML 2010), Tokyo, Japan, 2010. [6] Naresh Manwani and P. S. Sastry. Polyceptron: A polyhedral learning algorithm. arXiv:1107.1564, 2013. [7] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3):273– 297, 1995. [8] Peter L. Bartlett and Shahar Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. J. Mach. Learn. Res., 3:463–482, March 2003. [9] L´eon Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pages 177–186. Springer, 2010. [10] Geoffrey E Hinton. A practical guide to training restricted Boltzmann machines. In Neural Networks: Tricks of the Trade, pages 599–619. Springer, 2012. [11] Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. MNIST dataset, 1998. [12] LibSVM datasets. http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/ datasets/. [13] St´ephane Canu and Leon Bottou. Training invariant support vector machines using selective sampling. In Large Scale Kernel Machines, pages 301–320. MIT, 2007. [14] Justin Ma, Lawrence K. Saul, Stefan Savage, and Geoffrey M. Voelker. Beyond blacklists: Learning to detect malicious web sites from suspicious URLs. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’09, pages 1245–1254, New York, NY, USA, 2009. ACM. [15] David D. Lewis, Yiming Yang, Tony G. Rose, and Fan Li. RCV1: A new benchmark collection for text categorization research. J. Mach. Learn. Res., 5:361–397, December 2004. [16] Chih-Chung Chang and Chih-Jen Lin. Libsvm: A library for support vector machines. ACM Trans. Intell. Syst. Technol., 2(3):27:1–27:27, May 2011. [17] Zeyuan Allen Zhu, Weizhu Chen, Gang Wang, Chenguang Zhu, and Zheng Chen. P-packSVM: Parallel primal gradient descent kernel SVM. In Data Mining, 2009. ICDM’09. Ninth IEEE International Conference on, pages 677–686. IEEE, 2009. [18] Alina Beygelzimer, John Langford, Yuri Lifshits, Gregory Sorkin, and Alex Strehl. Conditional probability tree estimation analysis and algorithms. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI ’09, pages 51–58, Arlington, Virginia, United States, 2009. AUAI Press. [19] Alina Beygelzimer, John Langford, and Bianca Zadrozny. Weighted one-against-all. In Proceedings of the 20th National Conference on Artificial Intelligence - Volume 2, AAAI’05, pages 720–725. AAAI Press, 2005. [20] Thomas G. Dietterich and Ghulum Bakiri. Solving multiclass learning problems via errorcorrecting output codes. J. Artif. Int. Res., 2(1):263–286, January 1995. 9
2014
288
5,389
A provable SVD-based algorithm for learning topics in dominant admixture corpus Trapit Bansal†, C. Bhattacharyya‡∗ Department of Computer Science and Automation Indian Institute of Science Bangalore -560012, India †trapitbansal@gmail.com ‡chiru@csa.iisc.ernet.in Ravindran Kannan Microsoft Research India kannan@microsoft.com Abstract Topic models, such as Latent Dirichlet Allocation (LDA), posit that documents are drawn from admixtures of distributions over words, known as topics. The inference problem of recovering topics from such a collection of documents drawn from admixtures, is NP-hard. Making a strong assumption called separability, [4] gave the first provable algorithm for inference. For the widely used LDA model, [6] gave a provable algorithm using clever tensor-methods. But [4, 6] do not learn topic vectors with bounded l1 error (a natural measure for probability vectors). Our aim is to develop a model which makes intuitive and empirically supported assumptions and to design an algorithm with natural, simple components such as SVD, which provably solves the inference problem for the model with bounded l1 error. A topic in LDA and other models is essentially characterized by a group of co-occurring words. Motivated by this, we introduce topic specific Catchwords, a group of words which occur with strictly greater frequency in a topic than any other topic individually and are required to have high frequency together rather than individually. A major contribution of the paper is to show that under this more realistic assumption, which is empirically verified on real corpora, a singular value decomposition (SVD) based algorithm with a crucial pre-processing step of thresholding, can provably recover the topics from a collection of documents drawn from Dominant admixtures. Dominant admixtures are convex combination of distributions in which one distribution has a significantly higher contribution than the others. Apart from the simplicity of the algorithm, the sample complexity has near optimal dependence on w0, the lowest probability that a topic is dominant, and is better than [4]. Empirical evidence shows that on several real world corpora, both Catchwords and Dominant admixture assumptions hold and the proposed algorithm substantially outperforms the state of the art [5]. 1 Introduction Topic models [1] assume that each document in a text corpus is generated from an ad-mixture of topics, where, each topic is a distribution over words in a Vocabulary. An admixture is a convex combination of distributions. Words in the document are then picked in i.i.d. trials, each trial has a multinomial distribution over words given by the weighted combination of topic distributions. The problem of inference, recovering the topic distributions from such a collection of documents, is provably NP-hard. Existing literature pursues techniques such as variational methods [2] or MCMC procedures [3] for approximating the maximum likelihood estimates. ∗http://mllab.csa.iisc.ernet.in/tsvd 1 Given the intractability of the problem one needs further assumptions on topics to derive polynomial time algorithms which can provably recover topics. A possible (strong) assumption is that each document has only one topic but the collection can have many topics. A document with only one topic is sometimes referred as a pure topic document. [7] proved that a natural algorithm, based on SVD, recovers topics when each document is pure and in addition, for each topic, there is a set of words, called primary words, whose total frequency in that topic is close to 1. More recently, [6] show using tensor methods that if the topic weights have Dirichlet distribution, we can learn the topic matrix. Note that while this allows non-pure documents, the Dirichlet distribution gives essentially uncorrelated topic weights. In an interesting recent development [4, 5] gave the first provable algorithm which can recover topics from a corpus of documents drawn from admixtures, assuming separability. Topics are said to be separable if in every topic there exists at least one Anchor word. A word in a topic is said to be an Anchor word for that topic if it has a high probability in that topic and zero probability in remaining topics. The requirement of high probability in a topic for a single word is unrealistic. Our Contributions: Topic distributions, such as those learnt in LDA, try to model the cooccurrence of a group of words which describes a theme. Keeping this in mind we introduce the notion of Catchwords. A group of words are called Catchwords of a topic, if each word occurs strictly more frequently in the topic than other topics and together they have high frequency. This is a much weaker assumption than separability. Furthermore we observe, empirically, that posterior topic weights assigned by LDA to a document often have the property that one of the weights is significantly higher than the rest. Motivated by this observation, which has not been exploited by topic modeling literature, we suggest a new assumption. It is natural to assume that in a text corpus, a document, even if it has multiple themes, will have an overarching dominant theme. In this paper we focus on document collections drawn from dominant admixtures. A document collection is said to be drawn from a dominant admixture if for every document, there is one topic whose weight is significantly higher than the other topics and in addition, for every topic, there is a small fraction of documents which are nearly purely on that topic. The main contribution of the paper is to show that under these assumptions, our algorithm, which we call TSVD, indeed provably finds a good approximation in total l1 error to the topic matrix. We prove a bound on the error of our approximation which does not grow with dictionary size d, unlike [5] where the error grows linearly with d. Empirical evidence shows that on semi-synthetic corpora constructed from several real world datasets, as suggested by [5], TSVD substantially outperforms the state of the art [5]. In particular it is seen that compared to [5] TSVD gives 27% lower error in terms of l1 recovery on 90% of the topics. Problem Definition: d, k, s will denote respectively, the number of words in the dictionary, number of topics and number of documents. d, s are large, whereas, k is to be thought of as much smaller. Let Sk = {x = (x1, x2, . . . , xk) : xl ≥0; P l xl = 1}. For each topic, there is a fixed vector in Sk giving the probability of each word in that topic. Let M be the d × k matrix with these vectors as its columns. Documents are picked in i.i.d. trials. To pick document j, one first picks a k-vector W1j, W2j, . . . , Wkj of topic weights according to a fixed distribution on Sk. Let P·,j = MW·,j be the weighted combination of the topic vectors. Then the m words of the document are picked in i.i.d. trials; each trial picks a word according to the multinomial distribution with P·,j as the probabilities. All that is given as data is the frequency of words in each document, namely, we are given the d × s matrix A, where Aij = Number of occurrences of word i in Document j m . Note that E(A|W) = P, where, the expectation is taken entry-wise. In this paper we consider the problem of finding M given A. 2 Previous Results In this section we review literature related to designing provable algorithms for topic models. For an overview of topic models we refer the reader to the excellent survey of [1]. Provable algorithms for recovering topic models was started by [7]. Latent Semantic Indexing (LSI) [8] remains a successful method for retrieving similar documents by using SVD. [7] showed that one can recover M from a 2 collection of documents, with pure topics, by using SVD based procedure under the additional Primary Words assumption. [6] showed that in the admixture case, if one assumes Dirichlet distribution for the topic weights, then, indeed, using tensor methods, one can learn M to l2 error provided some added assumptions on numerical parameters like condition number are satisfied. The first provably polynomial time algorithm for admixture corpus was given in [4, 5]. For a topic l, a word i is an anchor word if: Mi,l ≥p0 and Mi,l′ = 0 ∀l′ ̸= l. Theorem 2.1 [4] If every topic has an anchor word, there is a polynomial time algorithm that returns an ˆ M such that with high probability, k X l=1 d X i=1 | ˆ Mil −Mil| ≤dε provided s ≥Max  O  k6 log d a4ε2p6 0γ2m  , O  k4 γ2a2  , where, γ is the condition number of E(WW T ), a is the minimum expected weight of a topic and m is the number of words in each document. Note that the error grows linearly in the dictionary size d, which is often large. Note also the dependence of s on parameters p0, which is, 1/p6 0 and on a, which is 1/a4. If, say, the word “run” is an anchor word for the topic “baseball” and p0 = 0.1, then the requirement is that every 10 th word in a document on this topic is “run”. This seems too strong to be realistic. It would be more realistic to ask that a set of words like - “run”, “hit”, “score”, etc. together have frequency at least 0.1 which is what our catchwords assumption does. 3 Learning Topics from Dominant Admixtures Informally, a document is said to be drawn from a Dominant Admixture if the document has one dominant topic. Besides its simplicity, we show empirical evidence from real corpora to demonstrate that topic dominance is a reasonable assumption. The Dominant Topic assumption is weaker than the Pure Topic assumption. More importantly, SVD based procedures proposed by [7] will not apply. Inspired by the Primary Words assumption we introduce the assumption that each topic has a set of Catchwords which individually occur more frequently in that topic than others. This is again a much weaker assumption than both Primary Words and Anchor Words assumptions and can be verified experimentally. In this section we establish that by applying SVD on a matrix, obtained by thresholding the word-document matrix, and subsequent k-means clustering can learn topics having Catchwords from a Dominant Admixture corpus. 3.1 Assumptions: Catchwords and Dominant admixtures Let α, β, ρ, δ, ε0 be non-negative reals satisfying: β + ρ ≤(1 −δ)α, α + 2δ ≤0.5, δ ≤0.08 Dominant topic Assumption (a) For j = 1, 2, . . . , s, document j has a dominant topic l(j) such that Wl(j),j ≥α and Wl′j ≤β, ∀l′ ̸= l(j). (b) For each topic l, there are at least ε0w0s documents in each of which topic l has weight at least 1 −δ. Catchwords Assumption: There are k disjoint sets of words - S1, S2, . . . , Sk such that with ε defined in (5), ∀i ∈Sl, ∀l′ ̸= l, Mil′ ≤ρMil, P i∈Sl Mil ≥p0, ∀i ∈Sl, mδ2αMil ≥8 ln  20 εw0  . (1) Part (b) of the Dominant Topic Assumption is in a sense necessary for “identifiability” - namely for the model to have a set of k document vectors so that every document vector is in the convex hull of these vectors. The Catchwords assumption is natural to describe a theme as it tries to model a unique group of words which is likely to co-occur when a theme is expressed. This assumption is close to topics discovered by LDA like models, which try to model co-occurence of words. If α, δ ∈Ω(1), then, the assumption (1) says Mil ∈Ω∗(1/m). In fact if Mil ∈o(1/m), we do not expect to see word i (in topic l), so it cannot be called a catchword at all. 3 A slightly different (but equivalent) description of the model will be useful to keep in mind. What is fixed (not stochastic) are the matrices M and the distribution of the weight matrix W. To pick document j, we can first pick the dominant topic l in document j and condition the distribution of W·,j on this being the dominant topic. One could instead also think of W·,j being picked from a mixture of k distributions. Then, we let Pij = Pk l=1 MilWlj and pick the m words of the document in i.i.d multinomial trials as before. We will assume that Tl = {j : l is the dominant topic in document j} satisfies |Tl| = wls, where, wl is the probability of topic l being dominant. This is only approximately valid, but the error is small enough that we can disregard it. For ζ ∈{0, 1, 2, . . . , m}, let pi(ζ, l) be the probability that j ∈Tl and Aij = ζ/m and qi(ζ, l) the corresponding “empirical probability”: pi(ζ, l) = Z W·,j m ζ  P ζ ij(1 −Pij)m−ζProb(W·,j | j ∈Tl) Prob(j ∈Tl), where, P·,j = MW·,j. (2) qi(ζ, l) = 1 s |{j ∈Tl : Aij = ζ/m}| . (3) Note that pi(ζ, l) is a real number, whereas, qi(ζ, l) is a random variable with E(qi(ζ, l)) = pi(ζ, l). We need a technical assumption on the pi(ζ, l) (which is weaker than unimodality). No-Local-Min Assumption: We assume that pi(ζ, l) does not have a local minimum, in the sense: pi(ζ, l) > Min(pi(ζ −1, l), pi(ζ + 1, l)) ∀ζ ∈{1, 2, . . . , m −1}. (4) The justification for this assumption is two-fold. First, generally, Zipf’s law kind of behaviour where the number of words plotted against relative frequencies declines as a power function has often been observed. Such a plot is monotonically decreasing and indeed satisfies our assumption. But for Catchwords, we do not expect this behaviour - indeed, we expect the curve to go up initially as the relative frequency increases, then reach a maximum and then decline. This is a unimodal function and also satisfies our assumption. Relative sizes of parameters: Before we close this section, a discussion on the values of the parameters is in order. Here, s is large. For asymptotic analysis, we can think of it as going to infinity. 1/w0 is also large and can be thought of as going to infinity. [In fact, if 1/w0 ∈O(1), then, intuitively, we see that there is no use of a corpus of more than constant size - since our model has i.i.d. documents, intuitively, the number of samples we need should depend mainly on 1/w0]. m is (much) smaller, but need not be constant. c refers to a generic constant independent of m, s, 1/w0, ε, δ; its value may be different in different contexts. 3.2 The TSVD Algorithm Existing SVD based procedures for clustering on raw word-document matrices fail because the spread of frequencies of a word within a topic is often more (at least not significantly less) than the gap between the word’s frequencies in two different topics. Hypothetically, the frequency for the word run, in the topic Sports, may range upwards of 0.01, say. But in other topics, it may range from, say, 0 to 0.005. The success of the algorithm will lie on correctly identifying the dominant topics such as sports by identifying that the word run has occurred with high frequency. In this example, the gap (0.01-0.005) between Sports and other topics is less than the spread within Sports (1.0-0.01), so a 2-clustering approach (based on SVD) will split the topic Sports into two. While this is a toy example, note that if we threshold the frequencies at say 0.01, ideally, sports will be all above and the rest all below the threshold, making the succeeding job of clustering easy. There are several issues in extending beyond the toy case. Data is not one-dimensional. We will use different thresholds for each word; word i will have a threshold ζi/m. Also, we have to compute ζi/m. Ideally we would not like to split any Tl, namely, we would like that for each l and and each i, either most j ∈Tl have Aij > ζi/m or most j ∈Tl have Aij ≤ζi/m. We will show that 4 our threshold procedure indeed achieves this. One other nuance: to avoid conditioning, we split the data A into two parts A(1) and A(2), compute the thresholds using A(1) and actually do the thresholding on A(2). We will assume that the intial A had 2s columns, so each part now has s columns. Also, T1, T2, . . . , Tk partitions the columns of A(1) as well as those of A(2). The columns of thresholded matrix B are then clustered, by a technique we call Project and Cluster, namely, we project the columns of B to its k−dimensional SVD subspace and cluster in the projection. The projection before clustering has recently been proven [9] (see also [10]) to yield good starting cluster centers. The clustering so found is not yet satisfactory. We use the classic Lloyd’s k-means algorithm proposed by [12]. As we will show, the partition produced after clustering, {R1, . . . , Rk} of A(2) is close to the partition induced by the Dominant Topics, {T1, . . . , Tk}. Catchwords of topic l are now (approximately) identified as the most frequently occurring words in documents in Rl. Finally, we identify nearly pure documents in Tl (approximately) as the documents in which the catchwords occur the most. Then we get an approximation to M·,l by averaging these nearly pure documents. We now describe the precise algorithm. 3.3 Topic recovery using Thresholded SVD Threshold SVD based K-means (TSVD) ε = Min  1 900c2 0 αp0 k3m , ε0√αp0δ 640m √ k ,  . (5) 1. Randomly partition the columns of A into two matrices A(1) and A(2) of s columns each. 2. Thresholding (a) Compute Thresholds on A(1) For each i, let ζi be the highest value of ζ ∈ {0, 1, 2, . . . , m} such that |{j : A(1) ij > ζ m}| ≥w0 2 s; |{j : A(1) ij = ζ m}| ≤3εw0s. (b) Do the thresholding on A(2): Bij = (√ζi if A(2) ij > ζi/m and ζi ≥8 ln(20/εw0) 0 otherwise . 3. SVD Find the best rank k approximation B(k) to B. 4. Identify Dominant Topics (a) Project and Cluster Find (approximately) optimal k-means clustering of the columns of B(k). (b) Lloyd’s Algorithm Using the clustering found in Step 4(a) as the starting clustering, apply Lloyd’s k-means algorithm to the columns of B (B, not B(k)). (c) Let R1, R2, . . . , Rk be the k−partition of [s] corresponding to the clustering after Lloyd’s. //*Will prove that Rl ≈Tl*// 5. Identify Catchwords (a) For each i, l, compute g(i, l) = the (⌊ε0w0s/2⌋)th highest element of {A(2) ij : j ∈Rl}. (b) Let Jl =  i : g(i, l) > Max 4 mδ2 ln(20/εw0), Maxl′̸=lγ g(i, l′)  , where, γ = 1−2δ (1+δ)(β+ρ). 6. Find Topic Vectors Find the ⌊ε0w0s/2⌋highest P i∈Jl A(2) ij among all j ∈[s] and return the average of these A·,j as our approximation ˆ M·,l to M·,l. Theorem 3.1 Main Theorem Under the Dominant Topic, Catchwords and No-Local-Min assumptions, the algorithm succeeds with high probability in finding an ˆ M so that X i,l |Mil −ˆ Mil| ∈O(kδ), provided 1s ∈Ω∗  1 w0 k6m2 α2p2 0 + m2k ε2 0δ2αp0 + d ε0δ2  . 1The superscript ∗hides a logarithmic factor in dsk/δfail, where, δfail > 0 is the desired upper bound on the probability of failure. 5 A note on the sample complexity is in order. Notably, the dependence of s on w0 is best possible (namely s ∈Ω∗(1/w0)) within logarithmic factors, since, if we had fewer than 1/w0 documents, a topic which is dominant with probability only w0 may have none of the documents in the collection. The dependence of s on d needs to be at least d/ε0w0δ2: to see this, note that we only assume that there are r = O(ε0w0s) nearly pure documents on each topic. Assuming we can find this set (the algorithm approximately does), their average has standard deviation of about √Mil/√r in coordinate i. If topic vector M·,l has O(d) entries, each of size O(1/d), to get an approximation of M·,l to l1 error δ, we need the per coordinate error 1/ √ dr to be at most δ/d which implies s ≥d/ε0w0δ2. Note that to get comparable error in [4], we need a quadratic dependence on d. There is a long sequence of Lemmas to prove the theorem. To improve the readability of the paper we relegate the proofs to supplementary material [14]. The essence of the proof lies in proving that the clustering step correctly identifies the partition induced by the dominant topics. For this, we take advantage of a recent development on the k−means algorithm from [9] [see also [10]], where, it is shown that under a condition called the Proximity Condition, Lloyd’s k means algorithm starting with the centers provided by the SVD-based algorithm, correctly identifies almost all the documents’ dominant topics. We prove that indeed the Proximity Condition holds. This calls for machinery from Random Matrix theory (in particular bounds on singular values). We prove that the singular values of the thresholded word-document matrix are nicely bounded. Once the dominant topic of each document is identified, we are able to find the Catchwords for each topic. Now, we rely upon part (b.) of the Dominant Topic assumption : that is there is a small fraction of nearly Pure Topic-documents for each topic. The Catchwords help isolate the nearly pure-topic documents and hence find the topic vectors. The proofs are complicated by the fact that each step of the algorithm induces conditioning on the data – for example, after clustering, the document vectors in one cluster are not independent anymore. 4 Experimental Results We compare the thresholded SVD based k-means (TSVD2) algorithm 3.3 with the algorithms of [5], Recover-KL and Recover-L2, using the code made available by the authors3. We observed the results of Recover-KL to be better than Recover-L2, and report here the results of Recover-KL (abbreviated R-KL), full set of results can be found in supplementary section 5. We first provide empirical support for the algorithm assumptions in Section 3.1, namely the dominant topic and the catchwords assumption. Then we show on 4 different semi-synthetic data that TSVD provides as good or better recovery of topics than the Recover algorithms. Finally on real-life datasets, we show that the algorithm performs as well as [5] in terms of perplexity and topic coherence. Implementation Details: TSVD parameters (w0, ε, ε0, γ) are not known in advance for real corpus. We tested empirically for multiple settings and the following values gave the best performance. Thresholding parameters used were: w0 = 1 k, ε = 1 6. For finding the catchwords, γ = 1.1, ε0 = 1 3 in step 5. For finding the topic vectors (step 6), taking the top 50% (ε0w0 = 1 k) gave empirically better results. The same values were used on all the datasets tested. The new algorithm is sensitive to the initialization of the first k-means step in the projected SVD space. To remedy this, we run 10 independent random initializations of the algorithm with K-Means++ [13] and report the best result. Datasets: We use four real word datasets in the experiments. As pre-processing steps we removed standard stop-words, selected the vocabulary size by term-frequency and removed documents with less than 20 words. Datasets used are: (1) NIPS4: Consists of 1,500 NIPS full papers, vocabulary of 2,000 words and mean document length 1023. (2) NYT4: Consists of a random subset of 30,000 documents from the New York Times dataset, vocabulary of 5,000 words and mean document length 238. (3) Pubmed4: Consists of a random subset of 30,000 documents from the Pubmed abstracts dataset, vocabulary of 5,030 words and mean document length 58. (4) 20NewsGroup5 (20NG): Consist of 13,389 documents, vocabulary of 7,118 words and mean document length 160. 2Resources available at: http://mllab.csa.iisc.ernet.in/tsvd 3http://www.cs.nyu.edu/˜halpern/files/anchor-word-recovery.zip 4http://archive.ics.uci.edu/ml/datasets/Bag+of+Words 5http://qwone.com/˜jason/20Newsgroups 6 Corpus s k % s with Dominant % s with Pure % Topics CW Mean Topics (α = 0.4) Topics (δ = 0.05) with CW Frequency NIPS 1500 50 56.6% 2.3% 96% 0.05 NYT 30000 50 63.7% 8.5% 98% 0.07 Pubmed 30000 50 62.2% 5.1% 78% 0.05 20NG 13389 20 74.1% 39.5% 85% 0.06 Table 1: Algorithm Assumptions. For dominant topic assumption, fraction of documents with satisfy the assumption for (α, β) = (0.4, 0.3) are shown. % documents with almost pure topics (δ = 0.05, i.e. 95% pure) are also shown. Last two columns show results for catchwords (CW) assumption. 4.1 Algorithm Assumptions To check the dominant topic and catchwords assumptions, we first run 1000 iterations of Gibbs sampling on the real corpus and learn the posterior document-topic distribution ({W.,j}) for each document in the corpus (by averaging over 10 saved-states separated by 50 iterations after the 500 burn-in iterations). We will use this posterior document-topic distribution as the document generating distribution to check the two assumptions. Dominant topic assumption: Table 1 shows the fraction of the documents in each corpus which satisfy this assumption with α = 0.4 (minimum probability of dominant topic) and β = 0.3 (maximum probability of non-dominant topics). The fraction of documents which have almost pure topics with highest topic weight at least 0.95 (δ = 0.05) is also shown. The results indicate that the dominant topic assumption is well justified (on average 64% documents satisfy the assumption) and there is also a substantial fraction of documents satisfying almost pure topic assumption. Catchwords assumption: We first find a k-clustering of the documents {T1, . . . , Tk} by assigning all documents which have highest posterior probability for the same topic into one cluster. Then we use step 5 of TSVD (Algorithm 3.3) to find the set of catchwords for each topic-cluster, i.e. {S1, . . . , Sk}, with the parameters: ϵ0w0 = 1 3k, γ = 2.3 (taking into account constraints in Section 3.1, α = 0.4, β = 0.3, δ = 0.05, ρ = 0.07). Table 1 reports the fraction of topics with non-empty set of catchwords and the average per topic frequency of the catchwords6. Results indicate that most topics on real data contain catchwords (Table 1, second-last column). Moreover, the average per-topic frequency of the group of catchwords for that topic is also quite high (Table 1, last column). 4.2 Empirical Results Semi-synthetic Data: Following [5], we generate semi-synthetic corpora from LDA model trained by MCMC, to ensure that the synthetic corpora retain the characteristics of real data. Gibbs sampling7 is run for 1000 iterations on all the four datasets and the final word-topic distribution is used to generate varying number of synthetic documents with document-topic distribution drawn from a symmetric Dirichlet with hyper-parameter 0.01. For NIPS, NYT and Pubmed we use k = 50 topics, for 20NewsGroup k = 20, and mean document lengths of 1000, 300, 100 and 200 respectively. Note that the synthetic data is not guaranteed to satisfy dominant topic assumption for every document (on average about 80% documents satisfy the assumption for value of (α, β) tested in Section 4.1). Topic Recovery on Semi-synthetic Data: We learn the word-topic distribution ( ˆ M) for the semisynthetic corpora using TSVD and the Recover algorithms of [5]. Given these learned topic distributions and the original data-generating distribution (M), we align the topics of M and ˆ M by bipartite matching and evaluate the l1 distance between each pair of topics. We report the average of l1 error across topics (called l1 reconstruction-error [5]) in Table 2 for TSVD and Recover-KL (R-KL). TSVD has smaller error on most datasets than the R-KL algorithm. We observed performance of TSVD to be always better than Recover-L2 (see supplement Table 1 for full results). Best performance is observed on NIPS which has largest mean document length, indicating that larger m leads to better recovery. Results on 20NG are slightly worse than R-KL for smaller sample size, but performance improves for larger number of documents. While the error-values in Table 2 are 6 1 k Pk l=1 1 |Tl| P i∈Sl P j∈Tl Aij  7Dirichlet hyperparameters used: document-topic = 0.03 and topic-word = 1 7 0 10 20 30 40 0.00 0.15 0.30 0.45 0.60 0.75 0.90 1.05 1.20 NIPS 0 10 20 30 40 0.00 0.15 0.30 0.45 0.60 0.75 0.90 1.05 1.20 NYT L1 Reconstruction Error Algorithm R−KL TSVD Number of Topics Figure 1: Histogram of l1 error across topics (40,000 documents). TSVD(blue, solid border) gets smaller error on most topics than R-KL(green, dashed border). Corpus Documents R-KL TSVD NIPS 40,000 0.308 0.115 (62.7%) 50,000 0.308 0.145 (52.9%) 60,000 0.311 0.131 (57.9%) Pubmed 40,000 0.332 0.288 (13.3%) 50,000 0.326 0.280 (14.1%) 60,000 0.328 0.284 (13.4%) 20NG 40,000 0.120 0.124 (-3.3%) 50,000 0.114 0.113 (0.9%) 60,000 0.110 0.106 (3.6%) NYT 40,000 0.208 0.195 (6.3%) 50,000 0.206 0.185 (10.2%) 60,000 0.200 0.194 (3.0%) Table 2: l1 reconstruction error on various semi-synthetic datasets. Brackets in the last column give percent improvement over R-KL (best performing Recover algorithm). Full results in supplementary. averaged values across topics, Figure 1 shows that TSVD algorithm achieves much better topic recovery for majority of the topics (>90%) on most datasets (overall average improvement of 27%, full results in supplement Figure 1). Topic Recovery on Real Data: To evaluate perplexity [2] on real data, the held-out sets consist of 350 documents for NIPS, 10000 documents for NYT and Pubmed, and 6780 documents for 20NewsGroup. TSVD achieved perplexity measure of 835 (NIPS), 1307 (Pubmed), 1555 (NYT), 2390 (20NG) while Recover-KL achieved 754 (NIPS), 1188 (Pubmed), 1579 (NYT), 2431 (20NG) (refer to supplement Table 2 for complete results). TSVD gives comparable perplexity with RecoverKL, results being slightly better on NYT and 20NewsGroup which are larger datasets with moderately high mean document lengths. We also find comparable results on Topic Coherence [11] (see Table 2 in supplementary for topic coherence results and Table 3 for list of top words of topics). Summary: We evaluated the proposed algorithm, TSVD, rigorously on multiple datasets with respect to the state of the art [5] (Recover-KL and Recover-L2), following the evaluation methodology of [5]. In Table 2 we show that the l1 reconstruction error for the new algorithm is small and on average 19.6% better than the best results of the Recover algorithms [5]. In Figure 1, we show that TSVD achieves significantly better recover on majority of the topics. We also demonstrate that on real datasets the algorithm achieves comparable perplexity and topic coherence to Recover algorithms. Moreover, we show on multiple real world datasets that the algorithm assumptions are well justified in practice. Conclusion Real world corpora often exhibits the property that in every document there is one topic dominantly present. A standard SVD based procedure will not be able to detect these topics, however TSVD, a thresholded SVD based procedure, as suggested in this paper, discovers these topics. While SVD is time-consuming, there have been a host of recent sampling-based approaches which make SVD easier to apply to massive corpora which may be distributed among many servers. We believe that apart from topic recovery, thresholded SVD can be applied even more broadly to similar problems, such as matrix factorization, and will be the basis for future research. Acknowledgements TB was supported by a Department of Science and Technology (DST) grant. References [1] Blei, D. Introduction to probabilistic topic models. Communications of the ACM, pp. 77–84, 2012. 8 [2] Blei, D., Ng, A., and Jordan, M. Latent Dirichlet allocation. Journal of Machine Learning Research, pp. 3:993–1022, 2003. Preliminary version in Neural Information Processing Systems 2001. [3] Griffiths, T. L. and Steyvers, M. Finding scientific topics. Proceedings of the National Academy of Sciences, 101:5228–5235, 2004. [4] Arora, S., Ge, R., and Moitra, A. Learning topic models – going beyond SVD. In Foundations of Computer Science, 2012b. [5] Arora, S., Ge, R., Halpern, Y., Mimno, D., Moitra, A., Sontag, D., Wu, Y., and Zhu M. A practical algorithm for topic modeling with provable guarantees. In Internation Conference on Machine Learning, 2013 [6] Anandkumar, A., Foster, D., Hsu, D., Kakade, S., and Liu, Y. A Spectral Algorithm for Latent Dirichlet Allocation In Neural Information Processing Systems, 2012. [7] Papadimitriou, C., Raghavan, P., Tamaki H., and Vempala S. Latent semantic indexing: a probabilistic analysis. Journal of Computer and System Sciences, pp. 217–235, 2000. Preliminary version in PODS 1998. [8] Deerwester, S., Dumais, S., Landauer, T., Furnas, G., and Harshman, R. Indexing by latent semantic analysis. Journal of the American Society for Information Science, pp. 391–407, 1990. [9] Kumar, A., and Kannan, R. Clustering with spectral norm and the k-means algorithm. In Foundations of Computer Science, 2010 [10] Awashti, P., and Sheffet, O. Improved spectral-norm bounds for clustering. In Proceedings of Approx/Random, 2012. [11] Mimno, D., Wallach, H., Talley, E., Leenders, M. and McCallum, A. Optimizing semantic coherence in topic models. In Empirical Methods in Natural Language Processing, pp. 262– 272, 2011. [12] Lloyd, Stuart P. Least squares quantization in PCM, IEEE Transactions on Information Theory 28 (2): 129137,1982. [13] Arthur, D., and Vassilvitskii, S. K-means++: The advantages of careful seeding. In Proceedings of ACM-SIAM symposium on Discrete algorithms, pp. 1027–1035, 2007 [14] Supplementary material 9
2014
289
5,390
Global Belief Recursive Neural Networks Romain Paulus, Richard Socher∗ MetaMind Palo Alto, CA {romain,richard}@metamind.io Christopher D. Manning Stanford University 353 Serra Mall Stanford, CA 94305 manning@stanford.edu Abstract Recursive Neural Networks have recently obtained state of the art performance on several natural language processing tasks. However, because of their feedforward architecture they cannot correctly predict phrase or word labels that are determined by context. This is a problem in tasks such as aspect-specific sentiment classification which tries to, for instance, predict that the word Android is positive in the sentence Android beats iOS. We introduce global belief recursive neural networks (GB-RNNs) which are based on the idea of extending purely feedforward neural networks to include one feedbackward step during inference. This allows phrase level predictions and representations to give feedback to words. We show the effectiveness of this model on the task of contextual sentiment analysis. We also show that dropout can improve RNN training and that a combination of unsupervised and supervised word vector representations performs better than either alone. The feedbackward step improves F1 performance by 3% over the standard RNN on this task, obtains state-of-the-art performance on the SemEval 2013 challenge and can accurately predict the sentiment of specific entities. 1 Introduction Models of natural language need the ability to compose the meaning of words and phrases in order to understand complex utterances such as facts, multi-word entities, sentences or stories. There has recently been a lot of work extending single word semantic vector spaces [27, 11, 15] to compositional models of bigrams [16, 29] or phrases of arbitrary length [25, 28, 24, 10]. Work in this area so far has focused on computing the meaning of longer phrases in purely feedforward types of architectures in which the meaning of the shorter constituents that are being composed is not altered. However, a full treatment of semantic interpretation cannot be achieved without taking into consideration that the meaning of words and phrases can also change once the sentence context is observed. Take for instance the sentence in Fig. 1: The Android’s screen is better than the iPhone’s. All current recursive deep learning sentiment models [26] would attempt to classify the phrase The Android’s screen or than the iPhone’s, both of which are simply neutral. The sentiment of the overall sentence is undefined; it depends on which of the entities the user of the sentiment analysis cares about. Generally, for many analyses of social media text, users are indeed most interested in the sentiment directed towards a specific entity or phrase. In order to solve the contextual classification problem in general and aspect-specific sentiment classification in particular, we introduce global belief recursive neural networks (GB-RNN). These models generalize purely feedforward recursive neural networks (RNNs) by including a feedbackward step at inference time. The backward computation uses the representations from both steps in its recursion and allows all phrases, to update their prediction based on the global context of the sentence. Unlike recurrent neural networks or window-based methods [5] the important context can be many ∗Part of this research was performed while the author was at Stanford University. 1 ? 0 Android 0 beats 0 iOS Figure 1: Illustration of the problem of sentiment classification that uses only the phrase to be labeled and ignores the context. The word Android is neutral in isolation but becomes positive in context. words away from the phrase that is to be labeled. This will allow models to correctly classify that in the sentence of Fig. 1, Android is described with positive sentiment and iOS was not. Neither was possible to determine only from their respective phrases in isolation. In order to validate the GB-RNN’s ability to contextually disambiguate sentiment on real text, we use the Twitter dataset and annotations from Semeval Challenge 2013 Task 2.1 The GB-RNN outperforms both the standard RNN and all other baselines, as well the winner of the Sentiment competition of SemEval 2013, showing that it can successfully make use of surrounding context. 2 Related Work Neural word vectors One common way to represent words is to use distributional word vectors [27] learned via dimensionality reduction of large co-occurrence matrices over documents (as in latent semantic analysis [13]), local context windows [15, 18] or combinations of both [11]. Words with similar meanings are close to each other in the vector space. Since unsupervised word vectors computed from local context windows do not always encode task-specific information, such as sentiment, word vectors can also be fine-tuned to such specific tasks [5, 24]. We introduce a hybrid approach where some dimensions are obtained from an unsupervised model and others are learned for the supervised task. We show that this performs better than both the purely supervised and unsupervised semantic word vectors. Recursive Neural Networks The idea of recursive neural networks (RNNs) for natural language processing (NLP) is to train a deep learning model that can be applied to inputs of any length. Unlike computer vision tasks, where it is easy to resize an image to a fixed number of pixels, natural sentences do not have a fixed size input. However, phrases and sentences have a grammatical structure that can be parsed as a binary tree [22]. Following this tree structure, we can assign a fixed-length vector to each word at the leaves of the tree, and combine word and phrase pairs recursively to create intermediate node vectors of the same length, eventually having one final vector representing the whole sentence [19, 25]. Multiple recursive combination functions have been explored, from linear transformation matrices to tensor products [26]. In this work, we use the simple single matrix RNN to combine node vectors at each recursive step. Bidirectional-recurrent and bidirectional-recursive neural networks. Recurrent neural networks are a special case of recursive neural networks that operate on chains and not trees. Unlike recursive neural networks, they don’t require a tree structure and are usually applied to time series. In a recurrent neural network, every node is combined with a summarized representation of the past nodes [8], and then the resulting combination will be forwarded to the next node. Bidirectional recurrent neural network architectures have also been explored [21] and usually compute representations independently from both ends of a time series. Bidirectional recursive models [12, 14], developed in parallel with ours, extend the definition of the recursive neural netword by adding a backward propagation step, where information also flows from the tree root back to the leaves. We compare our model to theirs theoretically in the model section, and empirically in the experiments. 1http://www.cs.york.ac.uk/semeval-2013/task2/ 2 Figure 2: Propagation steps of the GB-RNN. Step 1 describes the standard RNN feedforward process, showing that the vector representation of “Android” is independent of the rest of the document. Step 2 computes additional vectors at each node (in red), using information from the higher level nodes in the tree (in blue), allowing “Android” and “iOS” to have different representations given the context. [20] unfold the same autoencoder multiple times which gives it more representational power with the same number of parameters. Our model is different in that it takes into consideration more information at each step and can eventually make better local predictions by using global context. Sentiment analysis. Sentiment analysis has been the subject of research for some time [4, 2, 3, 6, 1, 23]. Most approaches in sentiment analysis use “bag of words” representations that do not take the phrase structure into account but learn from word-level features. We explore our model’s ability to determine contextual sentiment on Twitter, a social media platform. 3 Global Belief Recursive Neural Networks In this section, we introduce a new model to compute context-dependent compositional vector representations of variable length phrases. These vectors are trained to be useful as features to classify each phrase and word. Fig. 2 shows an example phrase computation that we will describe in detail below. This section begins by motivating compositionality and context-dependence, followed by a definition of standard recursive neural networks. Next, we introduce our novel global belief model and hybrid unsupervised-supervised word vectors. 3.1 Context-Dependence as Motivation for Global Belief A common simplifying assumption when mapping sentences into a feature vector is that word order does not matter (“bag of words”). However, this will prevent any detailed understanding of language as exemplified in Fig. 1, where the overall sentiment of the phrase “Android beats iOS”, is unclear. Instead, we need an understanding of each phrase which leads us to deep recursive models. The first step for mapping a sentence into a vector space is to parse them into a binary tree structure that captures the grammatical relationships between words. Such an input dependent binary tree then determines the architecture of a recursive neural network which will compute the hidden vectors in a bottom-up fashion starting with the word vectors. The resulting phrase vectors are given as features to a classifier. This standard RDL architecture works well for classifying the inherent or contextindependent label of a phrase. For instance, it can correctly classify that a not so beautiful day is negative in sentiment. However, not all phrases have an inherent sentiment as shown in Fig. 1. The GB-RNN addresses this issue by propagating information from the root node back to the leaf nodes as described below. There are other ways context can be incorporated such as with bi-directional recurrent neural networks or with window-based methods. Both of these methods, however, cannot incorporate information from words further away from the phrase to be labeled. 3.2 Standard Recursive Neural Networks We first describe a simple recursive neural network that can be used for context-independent phraselevel classification. It can also be seen as the first step of a GB-RNN. 3 Assume, for now, that each word vector a ∈Rn is obtained by sampling each element from a uniform distribution: ai ∼U(−0.001, 0.001). All these vectors are columns of a large embedding matrix L ∈Rn×|V |, where |V | is the size of the vocabulary. All word vectors are learned together with the model. For the example word vector sequence (abc) of Fig. 2, the RNN equations become: p1 = f  W  b c  , p2 = f  W  a p1  , (1) where W ∈Rn×2n is the matrix governing the composition and f the non-linear activation function. Each node vector is the given as input to a softmax classifier for a classification task such as sentiment analysis. 3.3 GB-RNN: Global Belief Recursive Neural Networks Our goal is to include contextual information in the recursive node vector representations. One simple solution would be to just include the k context words to the left and right of each pair as in [25]. However, this will only work if the necessary context is at most k words away. Furthermore, in order to capture more complex linguistic phenomena it may be necessary to allow for multiple words to compose the contextual shift in meaning. Instead, we will use the feedforward nodes from a standard RNN architecture and simply move back down the tree. This can also be interpreted as unfolding the tree and moving up its branches. Hence, we keep the same Eq. 1 for computing the forward node vectors, but we introduce new feedbackward vectors, denoted with a down arrow ↓, at every level of the parse tree. Unlike the feedforward vectors, which were computed with a bottom-up recursive function, feedbackward vectors are computed with a top-down recursive function. The backwards pass starts at the root node and propagates all the way down to the single word vectors. At the root note, in our example the node p2, we have: p↓ 2 = f (V p2) , (2) where V ∈Vnd×n so that all ↓-node vectors are nd-dimensional. Starting from p↓ 2, we recursively get ↓-node vectors for every node as we go down the tree:  a↓ p↓ 1  = f  W ↓  p2 p↓ 2  ,  b↓ c↓  = f  W ↓  p1 p↓ 1  (3) where all ↓-vectors, are nd-dimensional and hence W ↓∈R(n+nd)×(n+nd) is a new de-composition matrix. Figure 2 step 2 illustrates this top-down recursive computation on our example. Once we have both feedforward and feedbackward vectors for a given node, we concatenate them and employ the standard softmax classifier to make the final prediction. For instance, the classification for word a becomes: ya = softmax  Wc  a a↓  , where we fold the bias into the C-class classifier weights Wc ∈RC×(n+1). At the root node, the equation for x↓ root could be replaced by simply copying x↓ root = xroot. But there are two advantages of introducing a transform matrix V . First, it helps clearly differentiating features computed during the forward step and the backward step in multiplication with W ↓. Second, it allows to use a different dimension for the x↓vectors, which reduces the number of parameters in the W ↓and Wclass matrices, and adds more flexibility to the model. It also performs better empirically. 3.4 Hybrid Word Vector Representations There are two ways to initialize the word vectors that are given as inputs to the RNN models. The simplest one is to initialize them to small random numbers as mentioned above and backpropagate error signals into them in order to have them capture the necessary information for the task at hand. This has the advantage of not requiring any other pre-training method and the vectors are sure to capture domain knowledge. However, the vectors are more likely to overfit and less likely to generalize well to words that have not been in the (usually smaller) labeled training set. Another approach 4 Figure 3: Hybrid unsupervised-supervised vector representations for the most frequent 50 words of the dataset. For each horizontal vector, the first 100 dimensions are trained on unlabeled twitter messages, and the last dimensions are trained on labeled contextual sentiment examples. is to use unsupervised methods that learn semantic word vectors such as [18]. One then has the option to backpropagate task specific errors into these vectors or keep them at their initialization. Backpropagating into them still has the potential disadvantage of hurting generalization apart from slowing down training since it increases the number of parameters by a large amount (there are usually 100, 000 × 50 many parameters in the embedding matrix L). Without propagating information however one has to hope that the unsupervised method really captures all the necessary semantic information which is often not the case for sentiment (which suffers from the antonym problem). In this paper we propose to combine both ideas by representing each word as a concatenation of both unsupervised vectors that are kept at their initialization during training and adding a small additional vector into which we propagate the task specific error signal. This vector representation applies only to the feedforward word vectors and shold not be confused with the combination of the feedwordard and feedbackward node vectors in the softmax. Figure 3.4 shows the resulting word vectors trained on unlabeled documents on one part (the first 100 dimensions), and trained on labeled examples on the other part (the remaining dimensions). 3.5 Training The GB-RNN is trained by using backpropagation through structure [9]. We train the parameters by optimizing the regularized cross-entropy error for labeled node vectors with mini-batched AdaGrad [7]. Since we don’t have labels for every node of the training trees, we decided that unlabeled nodes do not add an additional error during training. For all models, we use a development set to cross-validate over regularization of the different weights, word vector size, mini-batch size, dropout probability and activation function (rectified linear or logistic function). We also applied the dropout technique to improve training with high dimensional word vectors. Node vector units are randomly set to zero with a probability of 0.5 at each training step. Our experiments show that applying dropout in this way helps differentiating word vector units and hidden units, and leads to better performance. The high-dimensional hybrid word vectors that we introduced previously have obtained a higher accuracy than other word vectors with the use of dropout. 3.6 Comparison to Other Models The idea of unfolding of neural networks is commonly used in autoencoders as well as in a recursive setting [23], in this setting the unfolding is only used during training and not at inference time to update the beliefs about the inputs. Irsoy and Cardie [12] introduced a bidirectional RNN similar to ours. It employs the same standard feedforward RNN, but a different computation for the backward ↓vectors. In practice, their model is defined by the same forward equations as ours. However, equation 3 which computes the backward vectors is instead:  b↓ c↓  = f  V b + W ↓ lbp↓ 1 V c + W ↓ rbp↓ 1  (4) 5 Correct FUSION’s 5th General Meeting is tonight at 7 in ICS 213! Come out and carve pumpkins mid-quarter with us! Correct I would rather eat my left foot then to be taking the SATs tomorrow Correct Special THANKS to EVERYONE for coming out to Taboo Tuesday With DST tonight! It was FUN&educational!!! :) @XiEtaDST Correct Tough loss for @statebaseball today. Good luck on Monday with selection Sunday Correct I got the job at Claytons!(: I start Monday doing Sheetrock(: #MoneyMakin Correct St Pattys is no big deal for me, no fucks are given, but Cinco De Mayo on the other hand .. thats my 2nd bday . Incorrect “@Hannah Sunder: The Walking Dead is just a great tv show” its bad ass just started to watch the 2nd season to catch up with the 3rd Figure 4: Examples of predictions made by the GB-RNN for twitter documents. In this example, red phrases are negative and blue phrases are positive. On the last example, the model predicted incorrectly “bad ass” as negative. Where W ↓ lb and W ↓ rb are two matrices with dimensions nd × nd. For a better comparison with our model we rewrite Eq. 3 and make explicit the 4 blocks of W ↓: Let W ↓= " W ↓ lf W ↓ lb W ↓ rf W ↓ rb # , then  b↓ c↓  = f " W ↓ lfp1 + W ↓ lbp↓ 1 W ↓ rfp1 + W ↓ rbp↓ 1 #! , (5) where the dimensions of W ↓ lf and W ↓ rf are nd ×n, and the dimensions of W ↓ ld and W ↓ rd are nd ×nd. A closer comparison between Eqs. 4 and 5 reveals that both use a left and right forward transformation W ↓ lfp1 and W ↓ rfp1, but the other parts of the sums differ. In the bidirectional-RNN, the transformation of any children is defined by the forward parent and independent on its position (left or right node). Whereas our GB-RNN makes uses of both the forward and backward parent node. The intuition behind our choice is that using both nodes helps to push the model to disentangled the children from their backward parent vector. We also note that our model does not use the forward node vector for computing the backward node vector, but we find this not necessary since the softmax function already combines the two vectors. Our model also has n · nd more parameters to compute the feedbackward vectors than the bidirectional-RNN. The W ↓matrix of our model has 2n2 d + 2n · nd parameters, while the other model has a total of 2n2 d + n · nd parameters with the W ↓ lf, W ↓ rf and V matrices. We show in the next section that GB-RNN outperforms the bidirectional RNN in our experiments. 4 Experiments We present a qualitative and quantitative analysis of the GB-RNN on a contextual sentiment classification task. The main dataset is provided by the SemEval 2013, Task 2 competition [17]. We outperform the winners of the 2013 challenge, as well as several baseline and model ablations. 4.1 Evaluation Dataset The SemEval competition dataset is composed of tweets labeled for 3 different sentiment classes: positive, neutral and negative. The tweets in this dataset were split into a train (7862 labeled phrases), development (7862) and development-test (7862) set. The final test set is composed of 10681 examples. Fig. 4 shows example GB-RNN predictions on phrases marked for classification in this dataset. The development dataset consists only of tweets whereas the final evaluation dataset included also short text messages (SMS in the tables below). Tweets were parsed using the Stanford Parser [22] which includes tokenizing of negations (e.g., don’t becomes two tokens do and n’t). We constrained the parser to keep each phrase labeled by the dataset inside its own subtree, so that each labeled example is represented by a single node and can be classified easily. 6 Classifier Feature Sets Twitter 2013 (F1) SMS 2013 (F1) SVM stemming, word cluster, SentiWordNet score, negation 85.19 88.37 SVM POS, lexicon, negations, emoticons, elongated words, scores, syntactic dependency, PMI 87.38 85.79 SVM punctuation, word n-grams, emoticons, character n-grams, elongated words, upper case, stopwords, phrase length, negation, phrase position, large sentiment lexicons, microblogging features 88.93 88.00 GB-RNN parser, unsupervised word vectors (ensemble) 89.41 88.40 Table 1: Comparison to the best Semeval 2013 Task 2 systems, their feature sets and F1 results on each dataset for predicting sentiment of phrases in context. The GB-RNN obtains state of the art performance on both datasets. Model Twitter 2013 SMS 2013 Bigram Naive Bayes 80.45 78.53 Logistic Regression 80.91 80.37 SVM 81.87 81.91 RNN 82.11 84.07 Bidirectional-RNN (Irsoy and Cardie) 85.77 84.77 GB-RNN (best single model) 86.80 87.15 Table 2: Comparison with baselines: F1 scores on the SemEval 2013 test datasets. 4.2 Comparison with Competition Systems The first comparison is with several highly tuned systems from the SemEval 2013, Task 2 competition. The competition was scored by an average of positive and negative class F1 scores. Table 1 lists results for several methods, together with the resources and features used by each method. Most systems used a considerable amount of hand-crafted features. In contrast, the GB-RNN only needs a parser for the tree structure, unsupervised word vectors and training data. Since the competition allowed for external data we outline below the additional training data we use. Our best model is an ensemble of the top 5 GB-RNN models trained independently. Their predictions were then averaged to produce the final output. 4.3 Comparison with Baselines Next we compare our single best model to several baselines and model ablations. We used the same hybrid word vectors with dropout training for the RNN, the bidirectional RNN and the GB-RNN. The best models were selected by cross-validating on the dev set for several hyper-parameters (word vectors dimension, hidden node vector dimension, number of training epochs, regularization parameters, activation function, training batch size and dropout probability) and we kept the models with the highest cross-validation accuracy. Table 2 shows these results. The most important comparison is against the purely feedforward RNN which does not take backward sentence context into account. This model performs over 5% worse than the GB-RNN. For the logistic regression and Bigram Naive Bayes classification, each labeled phrase was taken as a separate example, removing the surrounding context. Another set of baselines used a context window for classification as well as the entire tweet as input to the classifier. Optimal performance for the single best GB-RNN was achieved by using vector sizes of 130 dimensions (100 pre-trained, fixed word vectors and 30 trained on sentiment data), a mini-batch size of 30, dropout with p = 0.5 and sigmoid non-linearity. In table 3, we show that the concatenation of fixed, unsupervised vectors with additional randomly initialized, supervised vectors performs better than both methods. 4.4 Model Analysis: Additional Training Data Because the competition allowed the usage of arbitrary resources we included as training data labeled unigrams and bigrams extracted from the NRC-Canada system’s sentiment lexicon. Adding these additional training examples increased accuracy by 2%. Although this lexicon helps reduc7 Word vectors dimension Twitter 2013 SMS 2013 supervised word vectors 15 85.15 85.66 semantic word vectors 100 85.67 84.70 hybrid word vectors 100 + 34 86.80 87.15 Table 3: F1 score comparison of word vectors on the SemEval 2013 Task 2 test dataset. Chelski + want this so bad + that + it + + makes + me + + even + happier + thinking + we + may + + + + beat them twice in + + 4 days at + SB Chelski + + + want + + this + so bad + + that + + it + + makes + + me + + + even + happier + + thinking + + we + + may + + + + beat + them + twice + + in + + + 4 + days + + at + SB Figure 5: Change in sentiment predictions in the tweet chelski want this so bad that it makes me even happier thinking we may beat them twice in 4 days at SB between the RNN (left) and the GB-RNN (right). In particular, we can see the change for the phrase want this so bad where it is correctly predicted as positive with context. ing the number of unknown tokens, it does not do a good job for training recursive composition functions, because each example is short. We also included our own dataset composed 176,311 noisily labeled tweets (using heuristics such as smiley faces) as well as the movie reviews dataset from [26]. In both datasets the labels only denote the context-independent sentiment of a phrase or full sentence. Hence, we trained the final model in two steps: train the standard RNN, then train the full GB-RNN model on the smaller context-specific competition data. Training the GB-RNN jointly in this fashion gave a 1% accuracy improvement. 5 Conclusion We introduced global belief recursive neural networks, applied to the task of contextual sentiment analysis. The idea of propagating beliefs through neural networks is a powerful and important piece for interpreting natural language. The applicability of this idea is more general than RNNs and can be helpful for a variety of NLP tasks such as word-sense disambiguation. Acknowledgments We thank the anonymous reviewers for their valuable comments. References [1] B.R. Routledge B. O’Connor, R. Balasubramanyan and N.A. Smith. From tweets to polls: Linking text sentiment to public opinion time series. International AAAI Conference on Weblogs and Social Media, 2010. [2] L. Barbosa and J. Feng. Robust sentiment detection on twitter from biased and noisy data. COLING ’10 Proceedings of the 23rd International Conference on Computational Linguistics: Posters, pages 36–44, 2010. [3] A. Bifet and E. Frank. Sentiment knowledge discovery in twitter streaming data. Proceedings of the 13th international conference on Discovery science, 2010. [4] K. Sobel B.J. Jansen, M. Zhang and A. Chowdury. Twitter power: Tweets as electronic word of mouth. Journal of the American Society for Information Science and Technology, 2009. [5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural Language Processing (Almost) from Scratch. JMLR, 12:2493–2537, 2011. 8 [6] O. Tsur D. Davidov and A. Rappoport. Enhanced sentiment learning using twitter hashtags and smileys. Association for Computational Linguistics, 2010. [7] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. JMLR, 12, July 2011. [8] J. L. Elman. Distributed representations, simple recurrent networks, and grammatical structure. Machine Learning, 7(2-3):195–225, 1991. [9] C. Goller and A. K¨uchler. Learning task-dependent distributed representations by backpropagation through structure. In Proceedings of the International Conference on Neural Networks, 1996. [10] E. Grefenstette, G. Dinu, Y.-Z. Zhang, M. Sadrzadeh, and M. Baroni. Multi-step regression learning for compositional distributional semantics. In IWCS, 2013. [11] E. H. Huang, R. Socher, C. D. Manning, and A. Y. Ng. Improving Word Representations via Global Context and Multiple Word Prototypes. In ACL, 2012. [12] O. Irsoy and C. Cardie. Bidirectional recursive neural networks for token-level labeling with structure. NIPS Deep Learning Workshop, 2013. [13] T. K. Landauer and S. T. Dumais. A solution to Plato’s problem: the Latent Semantic Analysis theory of acquisition, induction and representation of knowledge. Psychological Review, 104(2):211–240, 1997. [14] P. Le and W. Zuidema. The inside-outside recursive neural network model for dependency parsing. EMNLP, 2014. [15] T. Mikolov, W. Yih, and G. Zweig. Linguistic regularities in continuous spaceword representations. In HLT-NAACL, 2013. [16] J. Mitchell and M. Lapata. Composition in distributional models of semantics. Cognitive Science, 34(8):1388–1429, 2010. [17] Z. Kozareva P. Nakov. Semeval-2013 task 2: Sentiment analysis in twitter. Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), 2013. [18] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. EMNLP, 2014. [19] J. B. Pollack. Recursive distributed representations. Artificial Intelligence, 46, November 1990. [20] J.T. Rolfe and Y. LeCun. Discriminative recurrent sparse auto-encoders. arXiv:1301.3775v4, 2013. [21] M. Schuster and K.K. Paliwal. Bidirectional recurrent neural networks. Signal Processing, IEEE Transactions, 1997. [22] R. Socher, J. Bauer, C. D. Manning, and A. Y. Ng. Parsing With Compositional Vector Grammars. In ACL, 2013. [23] R. Socher, E. H. Huang, J. Pennington, A. Y. Ng, and C. D. Manning. Dynamic Pooling and Unfolding Recursive Autoencoders for Paraphrase Detection. In NIPS, 2011. [24] R. Socher, B. Huval, C. D. Manning, and A. Y. Ng. Semantic Compositionality Through Recursive Matrix-Vector Spaces. In EMNLP, 2012. [25] R. Socher, C. D. Manning, and A. Y. Ng. Learning continuous phrase representations and syntactic parsing with recursive neural networks. In Proceedings of the NIPS-2010 Deep Learning and Unsupervised Feature Learning Workshop, 2010. [26] R. Socher, A. Perelygin, J. Wu, J. Chuang, C. Manning, A. Ng, and C. Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, 2013. [27] P. D. Turney and P. Pantel. From frequency to meaning: Vector space models of semantics. Journal of Artificial Intelligence Research, 37:141–188, 2010. [28] A. Yessenalina and C. Cardie. Compositional matrix-space models for sentiment analysis. In EMNLP, 2011. [29] F.M. Zanzotto, I. Korkontzelos, F. Fallucchi, and S. Manandhar. Estimating linear models for compositional distributional semantics. In COLING, 2010. 9
2014
29
5,391
Divide-and-Conquer Learning by Anchoring a Conical Hull Tianyi Zhou†, Jeff Bilmes‡, Carlos Guestrin† †Computer Science & Engineering, ‡Electrical Engineering, University of Washington, Seattle {tianyizh, bilmes, guestrin}@u.washington.edu Abstract We reduce a broad class of fundamental machine learning problems, usually addressed by EM or sampling, to the problem of finding the k extreme rays spanning the conical hull of a1 data point set. These k “anchors” lead to a global solution and a more interpretable model that can even outperform EM and sampling on generalization error. To find the k anchors, we propose a novel divide-andconquer learning scheme “DCA” that distributes the problem to O(k log k) sametype sub-problems on different low-D random hyperplanes, each can be solved independently by any existing solver. For the 2D sub-problem, we instead present a non-iterative solver that only needs to compute an array of cosine values and its max/min entries. DCA also provides a faster subroutine inside other algorithms to check whether a point is covered in a conical hull, and thus improves these algorithms by providing significant speedups. We apply our method to GMM, HMM, LDA, NMF and subspace clustering, then show its competitive performance and scalability over other methods on large datasets. 1 Introduction Expectation-maximization (EM) [10], sampling methods [13], and matrix factorization [20, 25] are three algorithms commonly used to produce maximum likelihood (or maximum a posteriori (MAP)) estimates of models with latent variables/factors, and thus are used in a wide range of applications such as clustering, topic modeling, collaborative filtering, structured prediction, feature engineering, and time series analysis. However, their learning procedures rely on alternating optimization/updates between parameters and latent variables, a process that suffers from local optima. Hence, their quality greatly depends on initialization and on using a large number of iterations for proper convergence [24]. The method of moments [22, 6, 17], by contrast, solves m equations by relating the first m moments of observation x ∈Rp to the m model parameters, and thus yields a consistent estimator with a global solution. In practice, however, sample moments usually suffer from unbearably large variance, which easily leads to the failure of final estimation, especially when m or p is large. Although recent spectral methods [8, 18, 15, 1] reduces m to 2 or 3 when estimating O(p) ≫m parameters [2] by relating the eigenspace of lower-order moments to parameters in a matrix form up to column scale, the variance of sample moments is still sensitive to large p or data noise, which may result in poor estimation. Moreover, although spectral methods using SVDs or tensor decomposition evidently simplifies learning, the computation can still be expensive for big data. In addition, recovering a parameter matrix with uncertain column scale might not be feasible for some applications. In this paper, we reduce the learning in a rich class of models (e.g., matrix factorization and latent variable model) to finding the extreme rays of a conical hull from a finite set of real data points. This is obtained by applying a general separability assumption to either the data matrix in matrix factorization or the 2nd/3rd order moments in latent variable models. Separability posits that a ground set of n points, as rows of matrix X, can be represented by X = FXA, where the rows (bases) in XA are a subset A ⊂V = [n] of rows in X, which are called “anchors” and are interesting to various 1 models when |A| = k ≪n. This property was introduced in [11] to establish the uniqueness of non-negative matrix factorization (NMF) under simplex constraints, and was later [19, 14] extended to non-negative constraints. We generalize it further to the model X = FYA for two (possibly distinct) finite sets of points X and Y , and build a new theory for the identifiability of A. This generalization enables us to apply it to more general models (ref. Table 1) besides NMF. More interestingly, it leads to a learning method with much higher tolerance to the variance of sample moments or data noise, a unique global solution, and a more interpretable model. O X = { } Y = { } YA = { } Cone(YA) cone(YÃ Φ) H XΦ = { } YΦ = { } YÃ Φ = { } Figure 1: Geometry of general minimum conical hull problem and basic idea of divide-and-conquer anchoring (DCA). Another primary contribution of this paper is a distributed learning scheme “divide-and-conquer anchoring” (DCA), for finding an anchor set A such that X = FYA by solving same-type sub-problems on only O(k log k) randomly drawn low-dimensional (low-D) hyperplanes. Each sub-problem is of the form of (XΦ) = F · (Y Φ)A with random projection matrix Φ, and can easily be handled by most solvers due to the low dimension. This is based on the observation that the geometry of the original conical hull is partially preserved after a random projection. We analyze the probability of success for each sub-problem to recover part of A, and then study the number of sub-problems for recovering the whole A with high probability (w.h.p.). In particular, we propose an very fast non-iterative solver for sub-problems on the 2D plane, which requires computing an array of cosines and its max/min values, and thus results in learning algorithms with speedups of tens to hundreds of times. DCA improves multiple aspects of algorithm design since: 1) its idea of divide-and-conquer randomization gives rise to distributed learning that can reduce the original problem to multiple extremely low-D sub-problems that are much easier and faster to solve, and 2) it provides a fast subroutine, checking if a point is covered by a conical hull, which can be embedded into other solvers. We apply both the conical hull anchoring model and DCA to five learning models: Gaussian mixture models (GMM) [27], hidden Markov models (HMM) [5], latent Dirichlet allocation (LDA) [7], NMF [20], and subspace clustering (SC) [12]. The resulting models and algorithms show significant improvement in efficiency. On generalization performance, they consistently outperform spectral methods and matrix factorization, and are comparable to or even better than EM and sampling. In the following, we will first generalize the separability assumption and minimum conical hull problem risen from NMF in §2, and then show how to reduce more general learning models to a (general) minimum conical hull problem in §3. §4 presents a divide-and-conquer learning scheme that can quickly locate the anchors of the conical hull by solving the same problem in multiple extremely low-D spaces. Comprehensive experiments and comparison can be found in §5. 2 General Separability Assumption and Minimum Conical Hull Problem The original separability property [11] is defined on the convex hull of a set of data points, namely that each point can be represented as a convex combination of certain subsets of vertices that define the convex hull. Later works on separable NMF [19, 14] extend it to the conical hull case, which replaced convex with conical combinations. Given the definition of (convex) cone and conical hull, the separability assumption can be defined both geometrically and algebraically. Definition 1 (Cone & conical hull). A (convex) cone is a non-empty convex set that is closed with respect to conical combinations of its elements. In particular, cone(R) can be defined by its k generators (or rays) R = {ri}k i=1 such that cone(R) = Xk i=1 αiri | ri ∈R, αi ∈R+ ∀i  . (1) See [29] for the original separability assumption, the equivalence between separable NMF and the minimum conical hull problem, which is defined as a submodular set cover problem. 2.1 General Separability Assumption and General Minimum Conical Hull Problem By generalizing the separability assumption, we obtain a general minimum conical hull problem that can reduce more general learning models besides NMF, e.g., latent variable models and matrix factorization, to finding a set of “anchors” on the extreme rays of a conical hull. 2 Definition 2 (General separability assumption). All the n data points(rows) in X are covered in a finitely generated and pointed cone (i.e., if x ∈cone(YA) then −x ̸∈cone(YA)) whose generators form a subset A ⊆[m] of data points in Y such that ∄i ̸= j, YAi = a · YAj. Geometrically, it says ∀i ∈[n], Xi ∈cone (YA) , YA = {yi}i∈A. (2) An equivalent algebraic form is X = FYA, where |A| = k, F ′ ∈S ⊆R(n−k)×k + . When X = Y and S = R(n−k)×k + , it degenerates to the original separability assumption given in [29]. We generalize the minimum conical hull problem from [29]. Under the general separability assumption, it aims to find the anchor set A from the points in Y rather than X. Definition 3 (General Minimum Conical Hull Problem). Given a finite set of points X and a set Y having an index set V = [m] of its rows, the general minimum conical hull problem finds the subset of rows in Y that define a super-cone for all the rows in X. That is, find A ∈2V that solves: min A⊂V |A|, s.t., cone(YA) ⊇cone(X). (3) where cone(YA) is the cone induced by the rows A of Y . When X = Y , this also degenerates to the original minimum conical hull problem defined in [29]. A critical question is whether/when the solution A is unique. When X = Y and X = FXA, by following the analysis of the separability assumption in [29],we can prove that A is unique and identifiable given X. However, when X ̸= Y and X = FYA, it is clear that there could be multiple legal choices of A (e.g., there could be multiple layers of conical hulls containing a conical hull covering all points in X). Fortunately, when the rows of Y are rank-one matrices after vectorization (concatenating all columns to a long vector), which is the common case in most latent variable models in §3.2, A can be uniquely determined if the number of rows in X exceeds 2. Lemma 1 (Identifiability). If X = FYA with the additional structure Ys = vec(Os i ⊗Os j) where Oi is a pi × k matrix and Os i is its sth column, under the general separability assumption in Definition 2, two (non-identical) rows in X are sufficient to exactly recover the unique A, Oi and Oj. See [29] for proof and additional uniqueness conditions when applied to latent variable models. 3 Minimum Conical Hull Problem for General Learning Models Table 1: Summary of reducing NMF, SC, GMM, HMM and LDA to a conical hull anchoring model X = F YA in §3, and their learning algorithms achieved by A = DCA(X, Y, k, M) in Algorithm 1 . Minimal conical hull A = MCH(X, Y ) is defined in Definition 4. vec(·) denotes the vectorization of a matrix. For GMM and HMM, Xi ∈Rn×pi is the data matrix for view i (i.e., a subset of features) and the ith observation of all triples of sequential observations, respectively. Xt,i is the tth row of Xi and associates with point/triple t. ηt is a vector uniformly drawn from the unit sphere. More details are given in [29]. Model X in conical hull problem Y in conical hull problem k in conical hull problem NMF data matrix X ∈Rn×p + Y := X # of factors SC data matrix X ∈Rn×p Y := X # of basis from all clusters GMM [vec[XT 1 X2]; vec[XT 1 Diag(X3ηt)X2]t∈[q]]/n [vec(Xt,1 ⊗Xt,2)]t∈[n] # of components/clusters HMM [vec[XT 2 X3]; vec[XT 2 Diag(X1ηt)X3]t∈[q]]/n [vec(Xt,2 ⊗Xt,3)]t∈[n] # of hidden states LDA word-word co-occurrence matrix X ∈Rp×p + Y := X # of topics Algo Each sub-problem in DCA Post-processing after A := S i ˜ Ai Interpretation of anchors indexed by A NMF ˜ A = MCH(XΦ, XΦ), can be solved by (10) solving F in X = F XA basis XA are real data points SC ˜ A =anchors of clusters achieved by meanshift( \ (XΦ)ϕ) clustering anchors XA cluster i is a cone cone(XAi ) GMM ˜ A = MCH(XΦ, Y Φ), can be solved by (10) N/A centers [XA,i]i∈[3] from real data HMM ˜ A = MCH(XΦ, Y Φ), can be solved by (10) solving T in OT = XA,3 emission matrix O = XA,2 LDA ˜ A = MCH(XΦ, XΦ), can be solved by (10) col-normalize {F : X = F XA} anchor word for topic i (topic prob. Fi) In this section, we discuss how to reduce the learning of general models such as matrix factorization and latent variable models to the (general) minimum conical hull problem. Five examples are given in Table 1 to show how this general technique can be applied to specific models. 3.1 Matrix Factorization Besides NMF, we consider more general matrix factorization (MF) models that can operate on negative features and specify a complicated structure of F. The MF X = FW is a deterministic latent variable model where F and W are deterministic latent factors. By assigning a likelihood p(Xi,j|Fi, (W T )j) and priors p(F) and p(W), its optimization model can be derived from maximum 3 likelihood or MAP estimate. The resulting objective is usually a loss function ℓ(·) of X −FW plus regularization terms for F and W, i.e., min ℓ(X, FW) + RF (F) + RW (W). Similar to separable NMF, minimizing the objective of general MF can be reduced to a minimum conical hull problem that selects the subset A with X = FXA. In this setting, RW (W) = Pk i=1 g(Wi) where g(w) = 0 if w = Xi for some i and g(w) = ∞otherwise. This is equivalent to applying a prior p(Wi) with finite support set on the rows of X to each row of W. In addition, the regularization of F can be transformed to geometric constraints between points in X and in XA. Since Fi,j is the conical combination weight of XAj in recovering Xi, a large Fi,j intuitively indicates a small angle between XAj and Xi, and vice verse. For example, the sparse and graph Laplacian prior for rows of F in subspace clustering can be reduced to “cone clustering” for finding A. See [29] for an example of reducing the subspace clustering to general minimum conical hull problem. 3.2 Latent Variable Model Different from deterministic MF, we build a system of equations from the moments of probabilistic latent variable models, and then formulate it as a general minimum conical hull problem, rather than directly solve it. Let the generalization model be h ∼p(h; α) and x ∼p(x|h; θ), where h is a latent variable, x stands for observation, and {α, θ} are parameters. In a variety of graphical models such as GMMs and HMMs, we need to model conditional independence between groups of features. This is also known as the multi-view assumption. W.l.o.g., we assume that x is composed of three groups(views) of features {xi}i∈[3] such that ∀i ̸= j, xi ⊥⊥xj|h. We further assume the dimension k of h is smaller than pi, the dimension of xi. Since the goal is learning {α, θ}, decomposing the moments of x rather than the data matrix X can help us get rid of the latent variable h and thus avoid alternating minimization between {α, θ} and h. When E(xi|h) = hT OT i (linearity assumption), the second and third order moments can be written in the form of matrix operator.  E (xi ⊗xj) = E[E(xi|h) ⊗E(xj|h)] = OiE(h ⊗h)OT j , E (xi ⊗xj · ⟨η, xl⟩) = Oi [E(h ⊗h ⊗h) ×3 (Olη)] OT j , (4) where A ×n U denotes the n-mode product of a tensor A by a matrix U, ⊗is the outer product, and the operator parameter η can be any vector. We will mainly focus on the models in which {α, θ} can be exactly recovered from conditional mean vectors {Oi}i∈[3] and E(h ⊗h)1, because they cover most popular models such as GMMs and HMMs in real applications. The left hand sides (LHS) of both equations in (4) can be directly estimated from training data, while their right hand sides (RHS) can be written in a unified matrix form OiDOT j with Oi ∈Rpi×k and D ∈Rk×k. By using different η, we can obtain 2 ≤q ≤pl + 1 independent equations, which compose a system of equations for Oi and Oj. Given the LHS, we can obtain the column spaces of Oi and Oj, which respectively equal to the column and row space of OiDOT j , a low-rank matrix when pi > k. In order to further determine Oi and Oj, our discussion falls into two types of D. When D is a diagonal matrix. This happens when ∀i ̸= j, E(hihj) = 0. A common example is that h is a label/state indicator such that h = ei for class/state i, e.g., h in GMM and HMM. In this case, the two D matrices in the RHS of (4) are ( E(h ⊗h) = Diag( −−−→ E(h2 i )), E(h ⊗h ⊗h) ×3 (Olη) = Diag( −−−→ E(h3 i ) · Olη), (5) where −−−→ E(ht i) = [E(ht 1), . . . , E(ht k)]. So either matrix in the LHS of (4) can be written as a sum of k rank-one matrices, i.e., Pk s=1 σ(s)Os i ⊗Os j, where Os i is the sth column of Oi. The general separability assumption posits that the set of k rank-one basis matrices constructing the RHS of (4) is a unique subset A ⊆[n] of the n samples of xi ⊗xj constructing the left hand sides, i.e., Os i ⊗Os j = [xi ⊗xj]As = XAs,i ⊗XAs,j, the outer product of xi and xj in (As)th data point. 1Note our method can also handle more complex models that violate the linearity assumption and need higher order moments for parameter estimation. By replacing xi in (4) with vec(xi⊗n), the vectorization of the nth tensor power of xi, Oi can contain nth order moments for p(xi|h; θ). However, since higher order moments are either not necessary or difficult to estimate due to high sample complexity, we will not study them in this paper. 4 Therefore, by applying q −1 different η to (4), we obtain the system of q equations in the following form, where Y t is the estimate of the LHS of tth equation from training data. ∀t ∈[q], Y (t) = k X s=1 σt,s[xi ⊗xj]As ⇔[vec(Y (t))]t∈[q] = σ[vec(Xt,i ⊗Xt,j)]t∈A. (6) The right equation in (6) is an equivalent matrix representation of the left one. Its LHS is a q × pipj matrix, and its RHS is the product of a q × k matrix σ and a k × pipj matrix. By letting X ← [vec(Y (t))]t∈[q], F ←σ and Y ←[vec(Xt,i ⊗Xt,j)]t∈[n], we can fit (6) to X = FYA in Definition 2. Therefore, learning {Oi}i∈[3] is reduced to selecting k rank-one matrices from {Xt,i ⊗Xt,j}t∈[n] indexed by A whose conical hull covers the q matrices {Y (t)}t∈[q]. Given the anchor set A, we have ˆOi = XA,i and ˆOj = XA,j by assigning real data points indexed by A to the columns of Oi and Oj. Given Oi and Oj, σ can be estimated by solving (6). In many models, a few rows of σ are sufficient to recover α. See [29] for a practical acceleration trick based on matrix completion. When D is a symmetric matrix with nonzero off-diagonal entries. This happens in “admixture” models, e.g., h can be a general binary vector h ∈{0, 1}k or a vector on the probability simplex, and the conditional mean E(xi|h) is a mixture of columns in Oi. The most well known example is LDA, in which each document is generated by multiple topics. We apply the general separability assumption by only using the first equation in (4), and treating the matrix in its LHS as X in X = FXA. When the data are extremely sparse, which is common in text data, selecting the rows of the denser second order moment as bases is a more reasonable and effective assumption compared to sparse data points. In this case, the p rows of F contain k unit vectors {ei}i∈[k]. This leads to a natural assumption of “anchor word” for LDA [3]. See [29] for the example of reducing multi-view mixture model, HMM, and LDA to general minimum conical hull problem. It is also worth noting that we can show our method, when applied to LDA, yields equal results but is faster than a Bayesian inference method [3], see Theorem 4 in [29]. 4 Algorithms for Minimum Conical Hull Problem 4.1 Divide-and-Conquer Anchoring (DCA) for General Minimum Conical Hull Problems The key insights of DCA come from two observations on the geometry of the convex cone. First, projecting a conical hull to a lower-D hyperplane partially preserves its geometry. This enables us to distribute the original problem to a few much smaller sub-problems, each handled by a solver to the minimum conical hull problem. Secondly, there exists a very fast anchoring algorithm for a sub-problem on 2D plane, which only picks two anchor points based on their angles to an axis without iterative optimization or greedy pursuit. This results in a significantly efficient DCA algorithm that can be solely used, or embedded as a subroutine, checking if a point is covered in a conical hull. 4.2 Distributing Conical Hull Problem to Sub-problems in Low Dimensions Due to the convexity of cones, a low-D projection of a conical hull is still a conical hull that covers the projections of the same points covered in the original conical hull, and generated by the projections of a subset of anchors on the extreme rays of the original conical hull. Lemma 2. For an arbitrary point x ∈cone(YA) ⊂Rp, where A is the index set of the k anchors (generators) selected from Y , for any Φ ∈Rp×d with d ≤p, we have ∃˜A ⊆A : xΦ ∈cone(Y ˜ AΦ), (7) Since only a subset of A remains as anchors after projection, solving a minimum conical hull problem on a single low-D hyperplane rarely returns all the anchors in A. However, the whole set A can be recovered from the anchors detected on multiple low-D hyperplanes. By sampling the projection matrix Φ from a random ensemble M, it can be proved that w.h.p. solving only s = O(ck log k) sub-problems are sufficient to find all anchors in A. Note c/k is the lower bound of angle α −2β in Theorem 1, so large c indicates a less flat conical hull. See [29] for our method’s robustness to the failure in identifying “flat” anchors. For the special case of NMF when X = FXA, the above result is proven in [28]. However, the analysis cannot be trivially extended to the general conical hull problem when X = FYA (see Figure 1). A critical reason is that the converse of Lemma 2 does not hold: the uniqueness of the anchor set ˜A 5 Algorithm 1 DCA(X, Y, k, M) Input: Two sets of points (rows) X ∈Rn×p and Y ∈Rm×p in matrix forms (ref. Table 1 to see X and Y for different models), number of latent factors/variables k, random matrix ensemble M; Output: Anchor set A ⊆[m] such that ∀i ∈[n], Xi ∈cone(YA); Divide Step (in parallel): for i = 1 →s := O(k log k) do Randomly draw a matrix Φ ∈Rp×d from M; Solve sub-problem such as ˜At = MCH(XΦ, Y Φ) by any solver, e.g., (10); end for Conquer Step: ∀i ∈[m], compute ˆg(Yi) = (1/s) Ps t=1 1 ˜ At(Yi); Return A as index set of the k points with the largest ˆg(Yi). on low-D hyperplane could be violated, because non-anchors in Y may have non-zero probability to be projected as low-D anchors. Fortunately, we can achieve a unique ˜A by defining a “minimal conical hull” on a low-D hyperplane. Then Proposition 1 reveals when w.h.p. such an ˜A is a subset of A. Definition 4 (Minimal conical hull). Given two sets of points (rows) X and Y , the conical hull spanned by anchors (generators) YA is the minimal conical hull covering all points in X iff ∀{i, j, s} ∈  i, j, s | i ∈AC = [m] \ A, j ∈A, s ∈[n], Xs ∈cone(YA) ∩cone(Yi∪(A\j)) (8) we have [ XsYi > [ XsYj, where c xy denotes the angle between two vectors x and y. The solution of minimal conical hull is denoted by A = MCH(X, Y ). H1 A’1 A’2 A’3$ C’2 C1 B’1 H2 H3 H4 α" β" O$ A1 A3$ A2 C’1 C2 … … Figure 2: Proposition 1. It is easy to verify that the minimal conical hull is unique, and the general minimum conical hull problem X = FYA under the general separability assumption (which leads to the identifiability of A) is a special case of A = MCH(X, Y ). In DCA, on each low-D hyperplane Hi, the associated sub-problem aims to find the anchor set ˜Ai = MCH(XΦi, Y Φi). The following proposition gives the probability of ˜Ai ⊆A in a sub-problem solution. Proposition 1 (Probability of success in sub-problem). As defined in Figure 2, Ai ∈A signifies an anchor point in YA, Ci ∈X signifies a point in X ∈Rn×p, Bi ∈AC signifies a non-anchor point in Y ∈Rm×p, the green ellipse marks the intersection hyperplane between cone(YA) and the unit sphere Sp−1, the superscript ·′ denotes the projection of a point on the intersection hyperplane. Define d-dim (d ≤p) hyperplanes {Hi}i∈[4] such that A′ 3A′ 2 ⊥H1, A′ 1A′ 2 ⊥H2, B′ 1A′ 2 ⊥H3, B′ 1C′ 1 ⊥H4, let α = \ H1H2 be the angle between hyperplanes H1 and H2, β = \ H3H4 be the angle between H3 and H4. If H with associated projection matrix Φ ∈Rp×d is a d-dim hyperplane uniformly drawn from the Grassmannian manifold Gr(d, p), and ˜A = MCH(XΦ, Y Φ) is the solution to the minimal conical hull problem, we have Pr(B1 ∈˜A) = β 2π , Pr(A2 ∈˜A) = α −β 2π . (9) See [29] for proof, discussion and analysis of robustness to unimportant “flat” anchors and data noise. Theorem 1 (Probability bound). Following the same notations in Proposition 1, suppose p∗∗= min{A1,A2,A3,B1,C1}(α −2β) ≥c/k > 0. It holds with probability at least 1 −k exp −cs 3k  that DCA successfully identifies all the k anchors in A, where s is the number of sub-problems solved. See [29] for proof. Given Theorem 1, we can immediately achieve the following corollary about the number of sub-problems that guarantee success of DCA in finding A. Corollary 1 (Number of sub-problems). With probability 1 −δ, DCA can correctly recover the anchor set A by solving Ω( 3k c log k δ ) sub-problems. See [29] for the idea of divide-and-conquer randomization in DCA, and its advantage over JohnsonLindenstrauss (JL) Lemma based methods. 6 4.3 Anchoring on 2D Plane Although DCA can invoke any solver for the sub-problem on any low-D hyperplane, a very fast solver for the 2D sub-problem always shows high accuracy in locating anchors when embedded into DCA. Its motivation comes from the geometry of conical hull on a 2D plane, which is a special case of a d-dim hyperplane H in the sub-problem of DCA. It leads to a non-iterative algorithm for A = MCH(X, Y ) on the 2D plane. It only requires computing n + m cosine values, finding the min/max of the n values, and comparing the remaining m ones with the min/max value. According to Figure 1, the two anchors Y ˜ AΦ on a 2D plane have the min/max (among points in Y Φ ) angle (to either axis) that is larger/smaller than all angles of points in XΦ, respectively. This leads to the following closed form of ˜A. ˜A = {arg min i∈[m]( \ (YiΦ)ϕ −max j∈[n] \ (XjΦ)ϕ)+, arg min i∈[m](min j∈[n] \ (XjΦ)ϕ −\ (YiΦ)ϕ)+}, (10) where (x)+ = x if x ≥0 and ∞otherwise, and ϕ can be either the vertical or horizontal axis on a 2D plane. By plugging (10) in DCA as the solver for s sub-problems on random 2D planes, we can obtain an extremely fast learning algorithm. Note for the special case when X = Y , (10) degenerates to finding the two points in XΦ with the smallest and largest angles to an axis ϕ, i.e., ˜A = {arg mini∈[n] \ (XiΦ)ϕ, arg maxi∈[n] \ (XiΦ)ϕ}. This is used in matrix factorization and the latent variable model with nonzero off-diagonal D. See [29] for embedding DCA as a fast subroutine into other methods, and detailed off-the-shelf DCA algorithms of NMF, SC, GMM, HMM and LDA. A brief summary is in Table 1. 5 Experiments See [29] for a complete experimental section with results of DCA for NMF, SC, GMM, HMM, and LDA, and comparison to other methods on more synthetic and real datasets. 10 −2 10 −1 10 0 10 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 noise level anchor index recovery rate SPA XRAY DCA(s=50) DCA(s=92) DCA(s=133) DCA(s=175) SFO LP−test 10 −2 10 −1 10 0 10 1 −1 −0.9 −0.8 −0.7 −0.6 −0.5 −0.4 −0.3 −0.2 −0.1 0 noise level −anchor recovery error SPA XRAY DCA(s=50) DCA(s=92) DCA(s=133) DCA(s=175) SFO LP−test 10 −2 10 −1 10 0 10 1 10 −5 10 −4 10 −3 10 −2 10 −1 10 0 10 1 noise level CPU seconds SPA XRAY DCA(s=50) DCA(s=92) DCA(s=133) DCA(s=175) SFO LP−test Figure 3: Separable NMF on a randomly generated 300 × 500 matrix, each point on each curve is the result by averaging 10 independent random trials. SFO-greedy algorithm for submodular set cover problem. LP-test is the backward removal algorithm from [4]. LEFT: Accuracy of anchor detection (higher is better). Middle: Negative relative ℓ2 recovery error of anchors (higher is better). Right: CPU seconds. 30 60 90 120 150 180 210 240 270 300 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 Number of Clusters/Mixture Components Clustering Accuracy cmu−pie DCA GMM(s=171) DCA GMM(s=341) DCA GMM(s=682) DCA GMM(s=1023) k−means Spectral GMM EM for GMM 30 60 90 120 150 180 210 240 270 300 10 −1 10 0 10 1 10 2 10 3 Number of Clusters/Mixture Components CPU seconds cmu−pie DCA GMM(s=171) DCA GMM(s=341) DCA GMM(s=682) DCA GMM(s=1023) k−means Spectral GMM EM for GMM 19 38 57 76 95 114 133 152 171 190 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Number of Clusters/Mixture Components Clustering Accuracy yale DCA GMM(s=171) DCA GMM(s=341) DCA GMM(s=682) DCA GMM(s=853) k−means Spectral GMM EM for GMM 19 38 57 76 95 114 133 152 171 190 10 −2 10 −1 10 0 10 1 10 2 Number of Clusters/Mixture Components CPU seconds yale DCA GMM(s=171) DCA GMM(s=341) DCA GMM(s=682) DCA GMM(s=853) k−means Spectral GMM EM for GMM Figure 4: Clustering accuracy (higher is better) and CPU seconds vs. Number of clusters for Gaussian mixture model on CMU-PIE (left) and YALE (right) human face dataset. We randomly split the raw pixel features into 3 groups, each associates to a view in our multi-view model. 3 4 5 6 7 8 9 10 28.5 29 29.5 30 30.5 31 31.5 32 32.5 33 33.5 Number of States loglikelihood Barclays DCA HMM(s=32) DCA HMM(s=64) DCA HMM(s=96) DCA HMM(s=160) Baum−Welch(EM) Spectral method 3 4 5 6 7 8 9 10 10 −3 10 −2 10 −1 10 0 10 1 Number of States CPU seconds Barclays DCA HMM(s=32) DCA HMM(s=64) DCA HMM(s=96) DCA HMM(s=160) Baum−Welch(EM) Spectral method 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 Number of States loglikelihood JP−Morgan DCA HMM(s=32) DCA HMM(s=96) DCA HMM(s=160) DCA HMM(s=256) Baum−Welch(EM) Spectral method 3 4 5 6 7 8 9 10 10 −3 10 −2 10 −1 10 0 10 1 Number of States CPU seconds JP−Morgan DCA HMM(s=32) DCA HMM(s=96) DCA HMM(s=160) DCA HMM(s=256) Baum−Welch(EM) Spectral method Figure 5: Likelihood (higher is better) and CPU seconds vs. Number of states for using an HMM to model the stock price of 2 companies from 01/01/1995-05/18/2014 collected by Yahoo Finance. Since no ground truth label is given, we measure likelihood on training data. DCA for Non-negative Matrix Factorization on Synthetic Data. The experimental comparison results are shown in Figure 3. Greedy algorithms SPA [14], XRAY [19] and SFO achieves the best 7 accuracy and smallest recovery error when noise level is above 0.2, but XRAY and SFO are the slowest two. SPA is slightly faster but still much slower than DCA. DCA with different number of sub-problems shows slightly less accuracy than greedy algorithms, but the difference is acceptable. Considering its significant acceleration, DCA offers an advantageous trade-off. LP-test [4] has the exact solution guarantee, but it is not robust to noise, and too slow. Therefore, DCA provides a much faster and more practical NMF algorithm with comparable performance to the best ones. DCA for Gaussian Mixture Model on CMU-PIE and YALE Face Dataset. The experimental comparison results are shown in Figure 4. DCA consistently outperforms other methods (k-means, EM, spectral method [1]) on accuracy, and shows speedups in the range 20-2000. By increasing the number of sub-problems, the accuracy of DCA improves. Note the pixels of face images always exceed 1000, and thus results in slow computation of pairwise distances required by other clustering methods. DCA exhibits the fastest speed because the number of sub-problems s = O(k log k) does not depend on the feature dimension, and thus merely 171 2D random projections are sufficient for obtaining a promising clustering result. The spectral method performs poorer than DCA due to the large variance of sample moments. DCA uses the separability assumption in estimating the eigenspace of the moment, and thus effectively reduces the variance. Table 2: Motion prediction accuracy (higher is better) of the test set for 6 motion capture sequences from CMU-mocap dataset. The motion for each frame is manually labeled by the authors of [16]. In the table, s13s29(39/63) means that we split sequence 29 of subject 13 into sub-sequences, each has 63 frames, in which the first 39 ones are for training and the rest are for test. Time is measured in ms. Sequence s13s29(39/63) s13s30(25/51) s13s31(25/50) s14s06(24/40) s14s14(29/43) s14s20(29/43) Measure Acc Time Acc Time Acc Time Acc Time Acc Time Acc Time Baum-Welch (EM) 0.50 383 0.50 140 0.46 148 0.34 368 0.62 529 0.77 345 Spectral Method 0.20 80 0.25 43 0.13 58 0.29 66 0.63 134 0.59 70 DCA-HMM (s=9) 0.33 3.3 0.92 1 0.19 1.5 0.29 4.8 0.79 3 0.28 3 DCA-HMM (s=26) 0.50 3.3 1.00 1 0.65 1.6 0.60 4.8 0.45 3 0.89 3 DCA-HMM (s=52) 0.50 3.4 0.50 1.1 0.43 1.6 0.48 4.9 0.80 3.2 0.78 3.1 DCA-HMM (s=78) 0.66 3.4 0.93 1.1 0.41 1.6 0.51 4.9 0.80 6.7 0.83 3.2 5 13 22 30 38 47 55 63 72 80 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800 Number of Topics Perplexity DCA LDA(s=801) DCA LDA(s=2001) DCA LDA(s=3336) DCA LDA(s=5070) EM variational Gibbs sampling Spectral method 5 13 22 30 38 47 55 63 72 80 10 −1 10 0 10 1 10 2 10 3 10 4 Number of Topics CPU seconds DCA LDA(s=801) DCA LDA(s=2001) DCA LDA(s=3336) DCA LDA(s=5070) EM variational Gibbs sampling Spectral method 20 40 60 80 100 120 140 160 180 200 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Number of Clusters/Mixture Components Mutual Information DCA SC(s=307) DCA SC(s=819) DCA SC(s=1229) DCA SC(s=1843) SSC SCC LRR RSC 20 40 60 80 100 120 140 160 180 200 10 −1 10 0 10 1 10 2 10 3 10 4 10 5 Number of Clusters/Mixture Components CPU seconds DCA SC(s=307) DCA SC(s=819) DCA SC(s=1229) DCA SC(s=1843) SSC SCC LRR RSC Figure 6: LEFT: Perplexity (smaller is better) on test set and CPU seconds vs. Number of topics for LDA on NIPS1-17 Dataset, we randomly selected 70% documents for training and the rest 30% is used for test. RIGHT: Mutual Information (higher is better) and CPU seconds vs. Number of clusters for subspace clustering on COIL-100 Dataset. DCA for Hidden Markov Model on Stock Price and Motion Capture Data. The experimental comparison results for stock price modeling and motion segmentation are shown in Figure 5 and Table 2, respectively. In the former one, DCA always achieves slightly lower but comparable likelihood compared to Baum-Welch (EM) method [5], while the spectral method [2] performs worse and unstably. DCA shows a significant speed advantage compared to others, and thus is more preferable in practice. In the latter one, we evaluate the prediction accuracy on the test set, so the regularization caused by separability assumption leads to the highest accuracy and fastest speed of DCA. DCA for Latent Dirichlet Allocation on NIPS1-17 Dataset. The experimental comparison results for topic modeling are shown in Figure 6. Compared to both traditional EM and the Gibbs sampling [23], DCA not only achieves both the smallest perplexity (highest likelihood) on the test set and the highest speed, but also the most stable performance when increasing the number of topics. In addition, the “anchor word” achieved by DCA provides more interpretable topics than other methods. DCA for Subspace Clustering on COIL-100 Dataset. The experimental comparison results for subspace clustering are shown in Figure 6. DCA provides a much more practical algorithm that can achieve comparable mutual information but at a more than 1000 times speedup over the state-of-the-art SC algorithms such as SCC [9], SSC [12], LRR [21], and RSC [26]. Acknowledgments: We would like to thank MELODI lab members for proof-reading and the anonymous reviewers for their helpful comments. This work is supported by TerraSwarm research center administered by the STARnet phase of the Focus Center Research Program (FCRP) sponsored by MARCO and DARPA, by the National Science Foundation under Grant No. (IIS-1162606), and by Google, Microsoft, and Intel research awards, and by the Intel Science and Technology Center for Pervasive Computing. 8 References [1] A. Anandkumar, D. P. Foster, D. Hsu, S. Kakade, and Y. Liu. A spectral algorithm for latent dirichlet allocation. In NIPS, 2012. [2] A. Anandkumar, D. Hsu, and S. M. Kakade. A method of moments for mixture models and hidden markov models. In COLT, 2012. [3] S. Arora, R. Ge, Y. Halpern, D. M. Mimno, A. Moitra, D. Sontag, Y. Wu, and M. Zhu. A practical algorithm for topic modeling with provable guarantees. In ICML, 2013. [4] S. Arora, R. Ge, R. Kannan, and A. Moitra. Computing a nonnegative matrix factorization - provably. In STOC, 2012. [5] L. E. Baum and T. Petrie. Statistical inference for probabilistic functions of finite state Markov chains. Annals of Mathematical Statistics, 37:1554–1563, 1966. [6] M. Belkin and K. Sinha. Polynomial learning of distribution families. In FOCS, 2010. [7] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent dirichlet allocation. Journal of Maching Learning Research (JMLR), 3:993–1022, 2003. [8] J. T. Chang. Full reconstruction of markov models on evolutionary trees: Identifiability and consistency. Mathematical Biosciences, 137(1):51–73, 1996. [9] G. Chen and G. Lerman. Spectral curvature clustering (scc). International Journal of Computer Vision (IJCV), 81(3):317–330, 2009. [10] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society, Series B, 39(1):1–38, 1977. [11] D. Donoho and V. Stodden. When does non-negative matrix factorization give a correct decomposition into parts? In NIPS, 2003. [12] E. Elhamifar and R. Vidal. Sparse subspace clustering. In CVPR, 2009. [13] S. Geman and D. Geman. Stochastic relaxation, gibbs distributions, and the bayesian restoration of images. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 6(6):721–741, 1984. [14] N. Gillis and S. A. Vavasis. Fast and robust recursive algorithmsfor separable nonnegative matrix factorization. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 36(4):698–714, 2014. [15] D. Hsu, S. M. Kakade, and T. Zhang. A spectral algorithm for learning hidden markov models. In COLT, 2009. [16] M. C. Hughes, E. B. Fox, and E. B. Sudderth. Effective split-merge monte carlo methods for nonparametric models of sequential data. In NIPS, 2012. [17] A. T. Kalai, A. Moitra, and G. Valiant. Efficiently learning mixtures of two gaussians. In STOC, 2010. [18] R. Kannan, H. Salmasian, and S. Vempala. The spectral method for general mixture models. In COLT, 2005. [19] A. Kumar, V. Sindhwani, and P. Kambadur. Fast conical hull algorithms for near-separable nonnegative matrix factorization. In ICML, 2013. [20] D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401:788–791, 1999. [21] G. Liu, Z. Lin, and Y. Yu. Robust subspace segmentation by low-rank representation. In ICML, 2010. [22] K. Pearson. Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 185:71–110, 1894. [23] I. Porteous, D. Newman, A. Ihler, A. Asuncion, P. Smyth, and M. Welling. Fast collapsed gibbs sampling for latent dirichlet allocation. In SIGKDD, pages 569–577, 2008. [24] R. A. Redner and H. F. Walker. Mixture Densities, Maximum Likelihood and the Em Algorithm. SIAM Review, 26(2):195–239, 1984. [25] R. Salakhutdinov and A. Mnih. Probabilistic matrix factorization. In NIPS, 2008. [26] M. Soltanolkotabi, E. Elhamifar, and E. J. Cand`es. Robust subspace clustering. arXiv:1301.2603, 2013. [27] D. Titterington, A. Smith, and U. Makov. Statistical Analysis of Finite Mixture Distributions. Wiley, New York, 1985. [28] T. Zhou, W. Bian, and D. Tao. Divide-and-conquer anchoring for near-separable nonnegative matrix factorization and completion in high dimensions. In ICDM, 2013. [29] T. Zhou, J. Bilmes, and C. Guestrin. Extended version of “divide-and-conquer learning by anchoring a conical hull”. In Extended version of a accepted NIPS-2014 paper, 2014. 9
2014
290
5,392
Discriminative Metric Learning by Neighborhood Gerrymandering Shubhendu Trivedi, David McAllester, Gregory Shakhnarovich Toyota Technological Institute Chicago, IL - 60637 {shubhendu,mcallester,greg}@ttic.edu Abstract We formulate the problem of metric learning for k nearest neighbor classification as a large margin structured prediction problem, with a latent variable representing the choice of neighbors and the task loss directly corresponding to classification error. We describe an efficient algorithm for exact loss augmented inference, and a fast gradient descent algorithm for learning in this model. The objective drives the metric to establish neighborhood boundaries that benefit the true class labels for the training points. Our approach, reminiscent of gerrymandering (redrawing of political boundaries to provide advantage to certain parties), is more direct in its handling of optimizing classification accuracy than those previously proposed. In experiments on a variety of data sets our method is shown to achieve excellent results compared to current state of the art in metric learning. 1 Introduction Nearest neighbor classifiers are among the oldest and the most widely used tools in machine learning. Although nearest neighor rules are often successful, their performance tends to be limited by two factors: the computational cost of searching for nearest neighbors and the choice of the metric (distance measure) defining “nearest”. The cost of searching for neighbors can be reduced with efficient indexing, e.g., [1, 4, 2] or learning compact representations, e.g., [13, 19, 16, 9]. We will not address this issue here. Here we focus on the choice of the metric. The metric is often taken to be Euclidean, Manhattan or χ2 distance. However, it is well known that in many cases these choices are suboptimal in that they do not exploit statistical regularities that can be leveraged from labeled data. This paper focuses on supervised metric learning. In particular, we present a method of learning a metric so as to optimize the accuracy of the resulting nearest neighbor classifier. Existing works on metric learning formulate learning as an optimization task with various constraints driven by considerations of computational feasibility and reasonable, but often vaguely justified principles [23, 8, 7, 22, 21, 14, 11, 18]. A fundamental intuition is shared by most of the work in this area: an ideal distance for prediction is distance in the label space. Of course, that can not be measured, since prediction of a test example’s label is what we want to use the similarities to begin with. Instead, one could learn a similarity measure with the goal for it to be a good proxy for the label similarity. Since the performance of kNN prediction often is the real motivation for similarity learning, the constraints typically involve “pulling” good neighbors (from the correct class for a given point) closer while “pushing” the bad neighbors farther away. The exact formulation of “good” and “bad” varies but is defined as a combination of proximity and agreement between labels. We give a formulation that facilitates a more direct attempt to optimize for the kNN accuracy as compared to previous work as far as we are aware. We discuss existing methods in more detail in section 2, where we also place our work in context. 1 In the kNN prediction problem, given a point and a chosen metric, there is an implicit hidden variable: the choice of k “neighbors”. The inference of the predicted label from these k examples is trivial, by simple majority vote among the associated labels. Given a query point, there can possibly exist a very large number of choices of k points that might correspond to zero loss: any set of k points with the majority of correct class will do. We would like a metric to “prefer” one of these “good” example sets over any set of k neighbors which would vote for a wrong class. Note that to win, it is not necessary for the right class to account for all the k neighbors – it just needs to get more votes than any other class. As the number of classes and the value of k grow, so does the space of available good (and bad) example sets. These considerations motivate our approach to metric learning. It is akin to the common, albeit negatively viewed, practice of gerrymandering in drawing up borders of election districts so as to provide advantages to desired political parties, e.g., by concentrating voters from that party or by spreading voters of opposing parties. In our case, the “districts” are the cells in the Voronoi diagram defined by the Mahalanobis metric, the “parties” are the class labels voted for by the neighbors falling in each cell, and the “desired winner” is the true label of the training points associated with the cell. This intuition is why we refer to our method as neighborhood gerrymandering in the title. Technically, we write kNN prediction as an inference problem with a structured latent variable being the choice of k neighbors. Thus learning involves minimizing a sum of a structural latent hinge loss and a regularizer [3]. Computing structural latent hinge loss involves loss-adjusted inference — one must compute loss-adjusted values of both the output value (the label) and the latent items (the set of nearest neighbors). The loss augmented inference corresponds to a choice of worst k neighbors in the sense that while having a high average similarity they also correspond to a high loss (“worst offending set of k neighbors”). Given the inherent combinatorial considerations, the key to such a model is efficient inference and loss augmented inference. We give an efficient algorithm for exact inference. We also design an optimization algorithm based on stochastic gradient descent on the surrogate loss. Our approach achieves kNN accuracy higher than state of the art for most of the data sets we tested on, including some methods specialized for the relevant input domains. Although the experiments reported here are restricted to learning a Mahalanobis distance in an explicit feature space, the formulation allows for nonlinear similarity measures, such as those defined by nonlinear kernels, provided computing the gradients of similarities with respect to metric parameters is feasible. Our formulation can also naturally handle a user-defined loss matrix on labels. 2 Related Work and Discussion There is a large body of work on similarity learning done with the stated goal of improving kNN performance. In much of the recent work, the objective can be written as a combination of some sort of regularizer on the parameters of similarity, with loss reflecting the desired “purity” of the neighbors under learned similarity. Optimization then balances violation of these constraints with regularization. The main contrast between this body of work and our approach here is in the form of the loss. A well known family of methods of this type is based on the Large Margin Nearest Neighbor (LMNN) algorithm [22] . In LMNN, the constraints for each training point involve a set of predefined “target neighbors” from correct class, and “impostors” from other classes. The set of target neighbors here plays a similar role to our “best correct set of k neighbors” (h∗in Section 4). However the set of target neighbors are chosen at the onset based on the euclidean distance (in absence of a priori knowledge). Moreover as the metric is optimized, the set of “target neighbors” is not dynamically updated. There is no reason to believe that the original choice of neighbors based on the euclidean distance is optimal while the metric is updated. Also h∗represents the closest neighbors that have zero loss but they are not necessarily of the same class. In LMNN the target neighbors are forced to be of the same class. In doing so it does not fully leverage the power of the kNN objective. The role of imposters is somewhat similar to the role of the “worst offending set of k neighbors” in our method (bh in Section 4). See Figure 2 for an illustration. Extensions of LMNN [21, 11] allow for non-linear metrics, but retain the same general flavor of constraints. There is another extension to LMNN that is more aligned to our work [20], in that they lift the constraint of having a static set of neighbors chosen based on the euclidean distance and instead learn the neighborhood. 2 x a b c d e f g h i j x a b c d e f g h i j Figure 1: Illustration of objectives of LMNN (left) and our structured approach (right) for k = 3. The point x of class blue is the query point. In LMNN, the target points are the nearest neighbors of the same class, which are points a, b and c (the circle centered at x has radius equal to the farthest of the target points i.e. point b). The LMNN objective will push all the points of the wrong class that lie inside this circle out (points e, f, h, i, andj), while pulling in the target points to enforce the margin. For our structured approach (right), the circle around x has radius equal to the distance of the farthest of the three nearest neighbors irrespective of class. Our objective only needs to ensure zero loss which is achieved by pushing in point a of the correct class (blue) while pushing out the point having the incorrect class (point f). Note that two points of the incorrect class lie inside the circle (e, andf), both being of class red. However f is pushed out and not e since it is farther from x. Also see section 2. The above family of methods may be contrasted with methods of the flavor as proposed in [23]. Here “good” neighbors are defined as all similarly labeled points and each class is mapped into a ball of a fixed radius, but no separation is enforced between the classes. The kNN objective does not require that similarly labeled points be clustered together and consequently such methods try to optimize a much harder objective for learning the metric. In Neighborhood Component Analysis (NCA) [8], the piecewise-constant error of the kNN rule is replaced by a soft version. This leads to a non-convex objective that is optimized via gradient descent. This is similar to our method in the sense that it also attempts to directly optimize for the choice of the nearest neighbor at the price of losing convexity. This issue of non-convexity was partly remedied in [7], by optimization of a similar stochastic rule while attempting to collapse each class to one point. While this makes the optimization convex, collapsing classes to distinct points is unrealistic in practice. Another recent extension of NCA [18] generalizes the stochastic classification idea to kNN classification with k > 1. In Metric Learning to Rank (MLR)[14], the constraints involve all the points: the goal is to push all the correct matches in front of all the incorrect ones. This again is not the same as requiring correct classification. In addition to global optimization constraints on the rankings (such as mean average precision for target class), the authors allow localized evaluation criteria such as Precision at k, which can be used as a surrogate for classification accuracy for binary classification, but is a poor surrogate for multi-way classification. Direct use of kNN accuracy in optimization objective is briefly mentioned in [14], but not pursued due to the difficulty in loss-augmented inference. This is because the interleaving technique of [10] that is used to perform inference with other losses based inherently on contingency tables, fails for the multiclass case (since the number of data interleavings could be exponential). We take a very different approach to loss augmented inference, using targeted inference and the classification loss matrix, and can easily extend it to arbitrary number of classes. A similar approach is taking in [15], where the constraints are derived from triplets of points formed by a sample, correct and incorrect neighbors. Again, these are assumed to be set statically as an input to the algorithm, and the optimization focuses on the distance ordering (ranking) rather than accuracy of classification. 3 Problem setup We are given N training examples X = {x1, . . . , xN}, represented by a “native” feature map, xi ∈Rd, and their class labels y = [y1, . . . , yN]T , with yi ∈[R], where [R] stands for the set 3 {1, . . . , R}. We are also given the loss matrix Λ with Λ(r, r′) being the loss incurred by predicting r′ when the correct class is r. We assume Λ(r, r) = 0, and ∀(r, r′), Λ(r, r′) ≥0. We are interested in Mahalanobis metrics DW (x, xi) = (x −xi)T W (x −xi) , (1) parameterized by positive semidefinite d × d matrices W. Let h ⊂X be a set of examples in X. For a given W we define the distance score of h w.r.t. a point x as SW(x, h) = − X xj∈h DW (x, xj) (2) Hence, the set of k nearest neighbors of x in X is hW(x) = argmax |h|=k SW(x, h). (3) For the remainder we will assume that k is known and fixed. From any set h of k examples from X, we can predict the label of x by (simple) majority vote: by (h) = majority{yj : xj ∈h}, with ties resolved by a heuristic, e.g., according to 1NN vote. In particular, the kNN classifier predicts by(hW(x)). Due to this deterministic dependence between by and h, we can define the classification loss incured by a voting classifier when using the set h as ∆(y, h) = Λ (y, by(h)) . (4) 4 Learning and inference One might want to learn W to minimize training loss P i ∆(yi, hW(xi)). However, this fails due to the intractable nature of classification loss ∆. We will follow the usual remedy: define a tractable surrogate loss. Here we note that in our formulation, the output of the prediction is a structured object hW, for which we eventually report the deterministically computed by. Structured prediction problems usually involve loss which is a generalization of the hinge loss; intuitively, it penalizes the gap between score of the correct structured output and the score of the “worst offending” incorrect output (the one with the highest score and highest ∆). However, in our case there is no single correct output h, since in general many choices of h would lead to correct by and zero classification loss: any h in which the majority votes for the right class. Ideally, we want SW to prefer at least one of these correct hs over all incorrect hs. This intuition leads to the following surrogate loss definition: L(x, y, W) = max h [SW(x, h) + ∆(y, h)] (5) − max h:∆(y,h)=0 SW(x, h). (6) This is a bit different in spirit from the notion of margin sometimes encountered in ranking problems where we want all the correct answers to be placed ahead of all the wrong ones. Here, we only care to put one correct answer on top; it does not matter which one, hence the max in (6). 5 Structured Formulation Although we have motivated this choice of L by intuitive arguments, it turns out that our problem is an instance of a familiar type of problems: latent structured prediction [24], and thus our choice of loss can be shown to form an upper bound on the empirical task loss ∆. First, we note that the score SW can be written as SW(x, h) = * W, − X xj∈h (x −xj)(x −xj)T + , (7) 4 where ⟨·, ·⟩stands for the Frobenius inner product. Defining the feature map Ψ(x, h) ≜− X xj∈h (x −xj)(x −xj)T , (8) we get a more compact expression ⟨W, Ψ(x, h)⟩for (7). Furthermore, we can encode the deterministic dependence between y and h by a “compatibility” function A(y, h) = 0 if y = by(h) and A(y, h) = −∞otherwise. This allows us to write the joint inference of y and (hidden) h performed by kNN classifier as byW(x),bhW(x) = argmax h,y [A(y, h) + ⟨W, Ψ(x, h)⟩] . (9) This is the familiar form of inference in a latent structured model [24, 6] with latent variable h. So, despite our model’s somewhat unusual property that the latent h completely determines the inferred y, we can show the equivalence to the “normal” latent structured prediction. 5.1 Learning by gradient descent We define the objective in learning W as min W ∥W∥2 F + C X i L (xi, yi, W) , (10) where ∥· ∥2 F stands for Frobenius norm of a matrix.1 The regularizer is convex, but as in other latent structured models, the loss L is non-convex due to the subtraction of the max in (6). To optimize (10), one can use the convex-concave procedure (CCCP) [25] which has been proposed specifically for latent SVM learning [24]. However, CCCP tends to be slow on large problems. Furthermore, its use is complicated here due to the requirement that W be positive semidefinite (PSD). This means that the inner loop of CCCP includes solving a semidefinite program, making the algorithm slower still. Instead, we opt for a simpler choice, often faster in practice: stochastic gradient descent (SGD), described in Algorithm 1. Algorithm 1: Stochastic gradient descent Input: labeled data set (X, Y ), regularization parameter C, learning rate η(·) initialize W(0) = 0 for t = 0, . . ., while not converged do sample i ∼[N] bhi = argmaxh [SW(t)(xi, h) + ∆(yi, h)] h∗ i = argmaxh:∆(yi,h)=0 SW(t)(xi, h) δW = " ∂SW(xi,bhi) ∂W −∂SW(xi, h∗ i ) ∂W # W(t) W(t+1) = (1 −η(t))W(t) −CδW project W(t+1) to PSD cone The SGD algorithm requires solving two inference problems (bh and h∗), and computing the gradient of SW which we address below.2 5.1.1 Targeted inference of h∗ i Here we are concerned with finding the highest-scoring h constrained to be compatible with a given target class y. We give an O(N log N) algorithm in Algorithm 2. Proof of its correctness and complexity analysis is in Appendix. 1We discuss other choices of regularizer in Section 7. 2We note that both inference problems over h are done in leave one out settings, i.e., we impose an additional constraint i /∈h under the argmax, not listed in the algorithm explicitly. 5 Algorithm 2: Targeted inference Input: x, W, target class y, τ ≜Jties forbiddenK Output: argmaxh:by(h)=y SW(x) Let n∗= ⌈k+τ(R−1) R ⌉ // min. required number of neighbors from y h := ∅ for j = 1, . . . , n∗do h := h ∩ argmin xi: yi=y,i/∈h DW (x, xi) for l = n∗+ 1, . . . , k do define #(r) ≜|{i : xi ∈h, yi = r}| // count selected neighbors from class r h := h ∩ argmin xi: yi=y, or #(yi)<#(y)−τ, i/∈h DW (x, xi) return h The intuition behind Algorithm 2 is as follows. For a given combination of R (number of classes) and k (number of neighbors), the minimum number of neighbors from the target class y required to allow (although not guarantee) zero loss, is n∗(see Proposition 1 in the App. The algorithm first includes n∗highest scoring neighbors from the target class. The remaining k −n∗neighbors are picked by a greedy procedure that selects the highest scoring neighbors (which might or might not be from the target class) while making sure that no non-target class ends up in a majority. When using Alg. 2 to find an element in H∗, we forbid ties, i.e. set τ = 1. 5.1.2 Loss augmented inference bhi Calculating the max term in (5) is known as loss augmented inference. We note that max h′ ⟨W, Ψ(x, h′)⟩+ ∆(y, h′) = max y′ n max h′∈H∗(y′) ⟨W, Ψ(x, h′)⟩ = ⟨W,Ψ(x,h∗(x,y′))⟩ + Λ(y, y′) o (11) which immediately leads to Algorithm 3, relying on Algorithm 2. The intuition: perform targeted inference for each class (as if that were the target class), and the choose the set of neighbors for the class for which the loss-augmented score is the highest. In this case, in each call to Alg. 2 we set τ = 0, i.e., we allow ties, to make sure the argmax is over all possible h’s. Algorithm 3: Loss augmented inference Input: x, W,target class y Output: argmaxh [SW(x, h) + ∆(y, h)] for r ∈{1, . . . , R} do h(r) := h∗(x, W, r, 1) // using Alg. 2 Let Value (r) := SW(x, h(r)), + Λ(y, r) Let r∗= argmaxrValue (r) return h(r∗) 5.1.3 Gradient update Finally, we need to compute the gradient of the distance score. From (7), we have ∂SW(x, h) ∂W = Ψ(x, h) = − X xj∈h (x −xj)(x −xj)T . (12) Thus, the update in Alg 1 has a simple interpretation, illustrated in Fig 2 on the right. For every xi ∈h∗\bh, it “pulls” xi closer to x. For every xi ∈bh \ h∗, it “pushes” it farther from x; these push and pull refer to increase/decrease of Mahalanobis distance under the updated W. Any other xi, including any xi ∈h∗∩bh, has no influence on the update. This is a difference of our approach from 6 LMNN, MLR etc. This is illustrated in Figure 2. In particular h∗corresponds to points a, c and e, whereas bh corresponds to points c, e and f. Thus point a is pulled while point f is pushed. Since the update does not necessarily preserve W as a PSD matrix, we enforce it by projecting W onto the PSD cone, by zeroing negative eigenvalues. Note that since we update (or “downdate”) W each time by matrix of rank at most 2k, the eigendecomposition can be accomplished more efficiently than the na¨ıve O(d3) approach, e.g., as in [17]. Using first order methods, and in particular gradient methods for optimization of non-convex functions, has been common across machine learning, for instance in training deep neural networks. Despite lack (to our knowledge) of satisfactory guarantees of convergence, these methods are often successful in practice; we will show in the next section that this is true here as well. One might wonder if this method is valid for our objective that is not differentiable; we discuss this briefly before describing experiments. A given x imposes a Voronoi-type partition of the space of W into a finite number of cells; each cell is associated with a particular combination of bh(x) and h∗(x) under the values of W in that cell. The score SW is differentiable (actually linear) on the interior of the cell, but may be non-differentiable (though continuous) on the boundaries. Since the boundaries between a finite number of cells form a set of measure zero, we see that the score is differentiable almost everywhere. 6 Experiments We compare the error of kNN classifiers using metrics learned with our approach to that with other learned metrics. For this evaluation we replicate the protocol in [11], using the seven data sets in Table 1. For all data sets, we report error of kNN classifier for a range of values of k; for each k, we test the metric learned for that k. Competition to our method includes Euclidean Distance, LMNN [22], NCA, [8], ITML [5], MLR [14] and GB-LMNN [11]. The latter learns non-linear metrics rather than Mahalanobis. For each of the competing methods, we used the code provided by the authors. In each case we tuned the parameters of each method, including ours, in the same cross-validation protocol. We omit a few other methods that were consistently shown in literature to be dominated by the ones we compare to, such as χ2 distance, MLCC, M-LMNN. We also could not include χ2-LMNN since code for it is not available; however published results for k = 3 [11] indicate that our method would win against χ2-LMNN as well. Isolet and USPS have a standard training/test partition, for the other five data sets, we report the mean and standard errors of 5-fold cross validation (results for all methods are on the same folds). We experimented with different methods for initializing our method (given the non-convex objective), including the euclidean distance, all zeros etc. and found the euclidean initialization to be always worse. We initialize each fold with either the diagonal matrix learned by ReliefF [12] (which gives a scaled euclidean distance) or all zeros depending on whether the scaled euclidean distance obtained using ReliefF was better than unscaled euclidean distance. In each experiment, x are scaled by mean and standard deviation of the training portion.3 The value of C is tuned on on a 75%/25% split of the training portion. Results using different scaling methods are attached in the appendix. Our SGD algorithm stops when the running average of the surrogate loss over most recent epoch no longer descreases substantially, or after max. number of iterations. We use learning rate η(t) = 1/t. The results show that our method dominates other competitors, including non-linear metric learning methods, and in some cases achieves results significantly better than those of the competition. 7 Conclusion We propose a formulation of the metric learning for kNN classifier as a structured prediction problem, with discrete latent variables representing the selection of k neighbors. We give efficient algorithms for exact inference in this model, including loss-augmented inference, and devise a stochastic gradient algorithm for learning. This approach allows us to learn a Mahalanobis metric with an objective which is a more direct proxy for the stated goal (improvement of classification by kNN rule) 3For Isolet we also reduce dimensionality to 172 by PCA computed on the training portion. 7 k = 3 Dataset Isolet USPS letters DSLR Amazon Webcam Caltech d 170 256 16 800 800 800 800 N 7797 9298 20000 157 958 295 1123 C 26 10 26 10 10 10 10 Euclidean 8.66 6.18 4.79 ±0.2 75.20 ±3.0 60.13 ±1.9 56.27 ±2.5 80.5 ±4.6 LMNN 4.43 5.48 3.26 ±0.1 24.17 ±4.5 26.72 ±2.1 15.59 ±2.2 46.93 ±3.9 GB-LMNN 4.13 5.48 2.92 ±0.1 21.65 ±4.8 26.72 ±2.1 13.56 ±1.9 46.11 ±3.9 MLR 6.61 8.27 14.25 ±5.8 36.93 ±2.6 24.01 ±1.8 23.05 ±2.8 46.76 ±3.4 ITML 7.89 5.78 4.97 ±0.2 19.07 ±4.9 33.83 ±3.3 13.22 ±4.6 48.78 ±4.5 NCA 6.16 5.23 4.71 ±2.2 31.90 ±4.9 30.27 ±1.3 16.27 ±1.5 46.66 ±1.8 ours 4.87 5.18 2.32 ±0.1 17.18 ±4.7 21.34 ±2.5 10.85 ±3.1 43.37 ±2.4 k = 7 Dataset Isolet USPS letters DSLR Amazon Webcam Caltech Euclidean 7.44 6.08 5.40 ±0.3 76.45 ±6.2 62.21 ±2.2 57.29 ±6.3 80.76 ±3.7 LMNN 3.78 4.9 3.58 ±0.2 25.44 ±4.3 29.23 ±2.0 14.58 ±2.2 46.75 ±2.9 GB-LMNN 3.54 4.9 2.66 ±0.1 25.44 ±4.3 29.12 ±2.1 12.45 ±4.6 46.17 ±2.8 MLR 5.64 8.27 19.92 ±6.4 33.73 ±5.5 23.17 ±2.1 18.98 ±2.9 46.85 ±4.1 ITML 7.57 5.68 5.37 ±0.5 22.32 ±2.5 31.42 ±1.9 10.85 ±3.1 51.74 ±2.8 NCA 6.09 5.83 5.28 ±2.5 36.94 ±2.6 29.22 ±2.7 22.03 ±6.5 45.50 ±3.0 ours 4.61 4.9 2.54 ±0.1 21.61 ±5.9 22.44 ±1.3 11.19 ±3.3 41.61 ±2.6 k = 11 Dataset Isolet USPS letters DSLR Amazon Webcam Caltech Euclidean 8.02 6.88 5.89 ±0.4 73.87 ±2.8 64.61 ±4.2 59.66 ±5.5 81.39 ±4.2 LMNN 3.72 4.78 4.09 ±0.1 23.64 ±3.4 30.12 ±2.9 13.90 ±2.2 49.06 ±2.3 GB-LMNN 3.98 4.78 2.86 ±0.2 23.64 ±3.4 30.07 ±3.0 13.90 ±1.0 49.15 ±2.8 MLR 5.71 11.11 15.54 ±6.8 36.25 ±13.1 24.32 ±3.8 17.97 ±4.1 44.97 ±2.6 ITML 7.77 6.63 6.52 ±0.8 22.28 ±3.1 30.48 ±1.4 11.86 ±5.6 50.76 ±1.9 NCA 5.90 5.73 6.04 ±2.8 40.06 ±6.0 30.69 ±2.9 26.44 ±6.3 46.48 ±4.0 ours 4.11 4.98 3.05 ±0.1 22.28 ±4.9 24.11 ±3.2 11.19 ±4.4 40.76 ±1.8 Table 1: kNN error,for k=3, 7 and 11. Features were scaled by z-scoring. Mean and standard deviation are shown for data sets on which 5-fold partition was used. Best performing methods are shown in bold. Note that the only non-linear metric learning method in the above is GB-LMNN. than previously proposed similarity learning methods. Our learning algorithm is simple yet efficient, converging on all the data sets we have experimented upon in reasonable time as compared to the competing methods. Our choice of Frobenius regularizer is motivated by desire to control model complexity without biasing towards a particular form of the matrix. We have experimented with alternative regularizers, both the trace norm of W and the shrinkage towards Euclidean distance, ∥W −I∥2 F , but found both to be inferior to ∥W∥2 F . We suspect that often the optimal W corresponds to a highly anisotropic scaling of data dimensions, and thus bias towards I may be unhealthy. The results in this paper are restricted to Mahalanobis metric, which is an appealing choice for a number of reasons. In particular, learning such metrics is equivalent to learning linear embedding of the data, allowing very efficient methods for metric search. Still, one can consider non-linear embeddings x →φ(x; w) and define the distance D in terms of the embeddings, for example, as D(x, xi) = ∥φ(x) −φ(xi)∥or as −φ(x)T φ(xi). Learning S in the latter form can be seen as learning a kernel with discriminative objective of improving kNN performance. Such a model would be more expressive, but also more challenging to optimize. We are investigating this direction. Acknowledgments This work was partly supported by NSF award IIS-1409837. 8 References [1] S. Arya, D. M. Mount, N. S. Netanyahu, R. Silverman, and A. Y. Wu. An optimal algorithm for approximate nearest neighbor searching fixed dimensions. J. ACM, 45(6):891–923, 1998. [2] A. Beygelzimer, S. Kakade, and J. Langford. Cover trees for nearest neighbor. In ICML, pages 97–104. ACM, 2006. [3] B. E. Boser, I. M. Guyon, and V. N. Vapnik. A training algorithm for optimal margin classifiers. In COLT, pages 144–152. ACM Press, 1992. [4] M. Datar, N. Immorlica, P. Indyk, and V. S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In SoCG, pages 253–262. ACM, 2004. [5] J. V. Davis, B. Kulis, J. Prateek, S. Suvrit, and D. Inderjeet. Information-theoretic metric learning. pages 209–216, 2007. [6] P. F. Felzenszwalb, R. B. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part-based models. IEEE T. PAMI, 32(9):1627–1645, 2010. [7] A. Globerson and S. Roweis. Metric learning by collapsing classes. In Y. Weiss, B. Sch¨olkopf, and J. Platt, editors, NIPS, pages 451–458, Cambridge, MA, 2006. MIT Press. [8] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In NIPS, 2004. [9] Y. Gong and S. Lazebnik. Iterative quantization: A procrustean approach to learning binary codes. In CVPR, pages 817–824. IEEE, 2011. [10] T. Joachims. A support vector method for multivariate performance measures. In ICML, pages 377–384. ACM Press, 2005. [11] D. Kedem, S. Tyree, K. Weinberger, F. Sha, and G. Lanckriet. Non-linear metric learning. In NIPS, pages 2582–2590, 2012. [12] K. Kira and A. Rendell. The feature selection problem: Traditional methods and a new algorithm). AAAI, 2:129–134, 1992. [13] B. Kulis and T. Darrell. Learning to hash with binary reconstructive embeddings. NIPS, 22:1042–1050, 2009. [14] B. McFee and G. Lanckriet. Metric learning to rank. In ICML, 2010. [15] M. Norouzi, D. Fleet, and R. Salakhutdinov. Hamming distance metric learning. In NIPS, pages 1070–1078, 2012. [16] M. Norouzi and D. J. Fleet. Minimal loss hashing for compact binary codes. ICML, 1:2, 2011. [17] P. Stange. On the efficient update of the singular value decomposition. PAMM, 8(1):10827– 10828, 2008. [18] D. Tarlow, K. Swersky, I. Sutskever, and R. S. Zemel. Stochastic k-neighborhood selection for supervised and unsupervised learning. ICML, 28:199–207, 2013. [19] J. Wang, S. Kumar, and S.-F. Chang. Sequential projection learning for hashing with compact codes. In ICML, 2010. [20] J. Wang, A. Woznica, and A. Kalousis. Learning neighborhoods for metric learning. In ECMLPKDD, 2012. [21] K. Q. Weinberger and L. K. Saul. Fast solvers and efficient implementations for distance metric learning. In ICML, pages 1160–1167. ACM, 2008. [22] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. JMLR, 10:207–244, 2009. [23] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In NIPS, pages 505–512. MIT Press, 2002. [24] C.-N. J. Yu and T. Joachims. Learning structural svms with latent variables. In ICML, pages 1169–1176. ACM, 2009. [25] A. L. Yuille, A. Rangarajan, and A. Yuille. The concave-convex procedure (cccp). NIPS, 2:1033–1040, 2002. 9
2014
291
5,393
Learning on graphs using Orthonormal Representation is Statistically Consistent Rakesh S Department of Electrical Engineering Indian Institute of Science Bangalore, 560012, INDIA rakeshsmysore@gmail.com Chiranjib Bhattacharyya Department of CSA Indian Institute of Science Bangalore, 560012, INDIA chiru@csa.iisc.ernet.in Abstract Existing research [4] suggests that embedding graphs on a unit sphere can be beneficial in learning labels on the vertices of a graph. However the choice of optimal embedding remains an open issue. Orthonormal representation of graphs, a class of embeddings over the unit sphere, was introduced by Lov´asz [2]. In this paper, we show that there exists orthonormal representations which are statistically consistent over a large class of graphs, including power law and random graphs. This result is achieved by extending the notion of consistency designed in the inductive setting to graph transduction. As part of the analysis, we explicitly derive relationships between the Rademacher complexity measure and structural properties of graphs, such as the chromatic number. We further show the fraction of vertices of a graph G, on n nodes, that need to be labelled for the learning algorithm to be consistent, also known as labelled sample complexity, is Ω  ϑ(G) n  1 4 where ϑ(G) is the famous Lov´asz ϑ function of the graph. This, for the first time, relates labelled sample complexity to graph connectivity properties, such as the density of graphs. In the multiview setting, whenever individual views are expressed by a graph, it is a well known heuristic that a convex combination of Laplacians [7] tend to improve accuracy. The analysis presented here easily extends to Multiple graph transduction, and helps develop a sound statistical understanding of the heuristic, previously unavailable. 1 Introduction In this paper we study the problem of graph transduction on a simple, undirected graph G = (V, E), with vertex set V = [n] and edge set E ⊆V ×V . We consider individual vertices to be labelled with binary values, ±1. Without loss of generality we assume that the first fn vertices are labelled, i.e., the set of labelled vertices is given by S = [fn], where f ∈(0, 1). Let ¯S = V \S be the unlabelled vertex set, and let yS and y ¯S be the labels corresponding to subgraphs S and ¯S respectively. Given G and yS, the goal of graph transduction is to learn predictions ˆy ∈Rn, such that er0-1 ¯S [ˆy] = P j∈¯S 1  yj ̸= ¯yj  , ¯y = sgn(ˆy) is small. To aid further discussion we introduce some notations. Notation Let Sn−1 = {u ∈Rn|∥u∥2 = 1} denote a (n −1) dimensional sphere. Let Dn, Sn and S+ n denote a set of n × n diagonal, square symmetric and square symmetric positive semidefinite matrices respectively. Let Rn + be a non-negative orthant. Let 1n ∈Rn denote a vector of all 1’s. Let [n] := {1, . . . , n}. For any M ∈Sn, let λ1(M) ≥. . . ≥λn(M) denote the eigenvalues and Mi denote the ith row of M, ∀i ∈[n]. We denote the adjacency matrix of a graph G by A. Let di denote the degree of vertex i ∈[n], di := A⊤ i 1n. Let D ∈Dn, where 1 Dii = di, ∀i ∈[n]. We refer I −D−1 2 AD−1 2 as the Laplacian, where I denotes the identity matrix. Let ¯G denote the complement graph of G, with the adjacency matrix ¯A = 1n1n⊤−I −A. For K ∈S+ n and y ∈{±1}n, the dual formulation of Support vector machine (SVM) is given by ω(K, y) = maxα∈Rn + g(α, K, y)  = nP i=1 αi −1 2 nP i,j=1 αiαjyiyjKij  . Let Y = ¯Y = {±1}, bY ⊆R be the label, prediction and soft-prediction spaces over V . Given a graph G and labels y ∈Yn on V , let cut(A, y) := P yi̸=yj Aij. We use ℓ: Y × bY →R+ to denote any loss function. In particular, for a ∈Y, b ∈bY, let ℓ0-1(a, b) = 1[ab < 0], ℓhinge(a, b) = (1 −ab)+ 1 and ℓramp(a, b) = min(1, (1 −ab)+) denote the 0-1, hinge and ramp loss respectively. The notations O, o, Ω, Θ will denote standard measures defined in asymptotic analysis [14]. Motivation Regularization framework is a widely used tool for learning labels on the vertices of a graph [23, 4] min ˆy∈Yn 1 |S| X i∈S ℓ(yi, ˆyi) + λˆy⊤K−1ˆy (1) where K is a kernel matrix and λ > 0 is an appropriately chosen regularization parameter. It was shown in [4] that the optimal ˆy∗satisfies the following generalization bound ES  er0-1 ¯S [ˆy∗]  ≤c1 inf ˆy∈Yn  erV [ˆy] + λˆy⊤K−1ˆy + c2 trp(K) λ|S| p where er(·) H [ˆy] := 1 |H| P i∈H ℓ(·)(yi, ˆyi), H ⊆V 2; trp(K) = 1 n Pn i=1 Kp ii 1/p, p > 0 and c1, c2 are dependent on ℓ. [4] argued that for good generalization, trp(K) should be a constant, which motivated them to normalize the diagonal entries of K. It is important to note that the set of normalized kernels is quite big and the above presented analysis gives little insight in choosing the optimal kernel from such a set. The important problem of consistency er ¯S →0 as n →∞, to be formally defined in Section 3  of graph transduction algorithms was introduced in [5]. [5] showed that the formulation (1), when used with a laplacian dependent kernel, achieves a generalization error of ES [er ¯S [ˆy∗]] = O q q nf  , where q is the number of pure components3. Though [5]’s algorithm is consistent for a small number of pure components, they achieve the above convergence rate by choosing λ dependent on true labels of the unlabeled nodes, which is not practical [6]. In this paper, we formalize the notion of consistency of graph transduction algorithms and derive novel graph-dependent statistical estimates for the following formulation. ΛC(K, yS) = min ¯yj∈¯ Y,j∈¯S min α∈Rn + 1 2α⊤Kα + C X i∈S ℓ ˆyi, yi  + C X j∈¯S ℓ ˆyj, ¯yj  (2) where ˆyk = P i∈S Kikyiαi + P j∈¯S Kjk¯yjαj, ∀k ∈V . If all the labels are observed then [22] showed that the above formulation is equivalent to (1). We note that the normalization step considered by [4] is equivalent to finding an embedding of a graph on a sphere. Thus, we study orthonormal representations of graphs [2], which define a rich class of graph embeddings on an unit sphere. We show that the formulation (2) working with orthonormal representations of graphs is statistically consistent over a large class of graphs, including random and power law graphs. In the sequel, we apply Rademacher complexity to orthonormal representations of graphs and derive novel graph-dependent transductive error bound. We also extend our analysis to study multiple graph transduction. More specifically, we make the following contributions. Contributions The main contribution of this paper is that we show there exists orthonormal representations of graphs that are statistically consistent on a large class of graph families Gc. For a special orthonormal representation—LS labelling, we show consistency on Erd¨os R´enyi random graphs. Given a graph G ∈Gc, with a constant fraction of nodes labelled f = O(1), we derive 1(a)+ = max(a, 0). 2We drop the argument ˆy, when implicit from the context. 3Pure component is a connected subgraph, where all the nodes in the subgraph have the same label. 2 an error convergence rate of er0-1 ¯S = O  ϑ(G) n  1 4 , with high probability; where ϑ(G) is the Lov´asz ϑ function of the graph G. Existing work [5] showed an expected convergence rate of O p q n  , however q is dependent on the true labels of the unlabelled nodes. Hence their bound cannot be computed explicitly [6]. We also apply Rademacher complexity measure to the function class associated with orthonormal representations and derive a tight bound relating to χ(G), the chromatic number of the graph G. We show that the Laplacian inverse [4] has O(1) complexity on graphs with high connectivity, whereas LS labelling exhibits a complexity of Θ(n 1 4 ). Experiments demonstrate superior performance of LS labelling on several real world datasets. We derive novel transductive error bound, relating to graph structural measures. Using our analysis, we show that observing labels of Ω  ϑ(G) n  1 4 fraction of the nodes is sufficient to achieve consistency. We also propose an efficient Multiple Kernel Learning (MKL) based algorithm, with generalization guarantees for multiple graph transduction. Experiments demonstrate improved performance in combining multiple graphs. 2 Preliminaries Orthonormal Representation: [2] introduced the idea of orthonormal representations for the problem of embedding a graph on a unit sphere. More formally, an orthonormal representation of a simple, undirected graph G = (V, E) with V = [n], is a matrix U = [u1, . . . , un] ∈Rd×n such that uT i uj = 0 whenever (i, j) /∈E and ui ∈Sd−1 ∀i ∈[n]. Let Lab(G) denote the set of all possible orthonormal representations of the graph G given by Lab(G) :=  U|U is an Orthonormal Representation . [1] recently introduced the notion of graph embedding to Machine Learning community and showed connections to graph kernel matrices. Consider the set of graph kernels K(G) := {K ∈S+ n |Kii = 1, ∀i ∈[n]; Kij = 0, ∀(i, j) /∈E}. [1] showed that for every valid kernel K ∈K(G), there exists an orthonormal representation U ∈Lab(G); and it is easy to see the other way, K = U⊤U ∈K(G). Thus, the two sets, Lab(G) and K(G) are equivalent. Orthonormal representation is also associated with an interesting quantity, the Lov´asz number [2], defined as: ϑ(G) = 2 minK∈K(G) ω(K, 1n)  [1]. ϑ function is a fundamental tool for combinatorial optimization and approximation algorithms for graphs. Lov´asz Sandwich Theorem: [2] Given an undirected graph G = (V, E), I ¯G  ≤ϑ ¯G  ≤χ(G); where I ¯G  is the independent number of the complement graph ¯G. 3 Statistical Consistency of Graph Transduction Algorithms In this section, we formalize the notion of consistency of graph transduction algorithms. Given a graph Gn = (Vn, En) of n nodes, with labels of subgraph Sn ⊆Vn observable, let er∗ ¯Sn := inf ˜y∈¯ Yn er ¯Sn[˜y] denote the minimal unlabelled node set error. Consistency is a measure of the quality of the learning algorithm A, comparing er ¯Sn [ˆy] to er∗ ¯Sn, where ˆy are the predictions made by A. A related notion of loss consistency has been extensively studied in literature [3, 12], which only show that the difference er ¯Sn [ˆy] −erSn [ˆy] →0 as n →∞[6]. This does not confirm the optimality of A, that is er ¯Sn[ˆy] →er∗ ¯Sn. Hence, a notion stronger than loss consistency is needed. Let Gn belong to a graph family G, ∀n. Let Πf be the uniform distribution over the random draw of the labelled subgraph Sn ⊆Vn, such that |Sn| = fn, f ∈(0, 1). As discussed earlier, we want the ℓ-regret, RSn[A] = er ¯Sn[ˆy]−er∗ ¯Sn to be small. Since, the labelled nodes are drawn randomly, there is a small probability that one gets an unrepresentative subgraph Sn. However, for large n, we want ℓ-regret to be close to zero with high probability4. In other words, for every finite and fixed n, we want to have an estimate on the ℓ-regret, which decreases as n increases. We define the following notion of consistency of graph transduction algorithms to capture this requirement Definition 1. Let G be a graph family and f ∈(0, 1) be fixed. Let V = {(vi, yi, Ei)}∞ i=1 be an infinite sequence of labelled node set, where yi ∈Y and Ei is the edge information of node vi with the previously observed nodes v1, . . . , vi−1, ∀i ≥2. Let Vn be the first n nodes in V, and let 4If G is not deterministic (e.g., Erd¨os R´eyni), then there is small probability that one gets an unrepresentative graph, in which case we want the ℓ-regret to be close to zero with high probability over Gn ∼G. 3 Gn ∈G be the graph defined by (Vn, E1, . . . , En). Let Sn ⊆Vn, and let yn, ySn be the labels of Vn, Sn respectively. A learning algorithm A when given Gn and ySn returns soft-predictions ˆy is said to be ℓ-consistent w.r.t G if, when the labelled subgraph Sn are random drawn from Πf, the ℓ-regret converges in probability to zero, i.e., ∀ϵ > 0 PrSn∼Πf [RSn[A] ≥ϵ] →0 as n →∞ In Section 6 we show that the kernel learning style algorithm (2) working with orthonormal representations is consistent on a large class of graph families. To the best of our knowledge, we are not aware of any literature which provide an explicit empirical error convergence rate and prove consistency of the graph transduction algorithm considered. Before we prove our main result, we gather useful tools—a) complexity measure, which reacts to the structural properties of the graph (Section 4); b) generalization analysis to bound er ¯S (Section 5). In the interest of space, we defer most of the proofs to the supplementary material5. 4 Graph Complexity Measures In this section we apply Rademacher complexity to orthonormal representations of graphs, and relate to the chromatic number. In particular, we study LS labelling, whose class complexity can be shown to be greater than that of the Laplacian inverse on a large class of graphs. Let (2) be solved for K ∈K(G), and let U ∈Lab(G) be the orthonormal representation corresponding to K (Section 2). Then by Representer’s theorem, the classifier learnt by (2) is of the form h = Uβ, β ∈Rn. We define Rademacher complexity of the function class associated with orthonormal representations Definition 2 (Rademacher Complexity). Given a graph G = (V, E), with V = [n]; let U ∈Lab(G) and ¯HU =  h|h = Uβ, β ∈Rn be the function class associated with U. For p ∈(0, 1/2], let σ = (σ1, . . . , σn) be a vector of i.i.d. random variables such that σi ∼{+1, −1, 0} w.p. p, p and 1 −2p respectively. The Rademacher complexity of the graph G defined by U, ¯HU is given by R( ¯HU, p) = 1 nEσ h suph∈¯ HU nP i=1 σi ⟨h, ui⟩ i The above definition is motivated from [9, 3]. This is an empirical complexity measure, suited for the transductive settings. We derive the following novel tight Rademacher bound Theorem 4.1. Let G = (V, E) be a simple, undirected graph with V = [n], U ∈Lab(G) and p ∈  1/n, 1/2  . Let HU =  h h = Uβ, β ∈Rn, ∥β∥2 ≤tC√n , C > 0, t ∈[0, 1] and let K = U⊤U ∈K(G) be the graph-kernel corresponding to U. The Rademacher complexity of graph G defined by U is given by R(HU, p) = c0tC p pλ1(K), where 1/2 √ 2 ≤c0 ≤ √ 2 is a constant. The above result provides a lower bound for the Rademacher complexity for any unit sphere graph embedding. While upper-bounds maybe available [9, 3] but, to the best of our knowledge, this is the first attempt at establishing lower bounds. The use of orthonormal representations allow us to relate class complexity measure to graph-structural properties. Corollary 4.2. For C, t, p = O(1), R(HU, p) = O( p χ(G)). (Suppl.) Such connections between learning theory complexity measures and graph properties was previously unavailable [9, 3]. Corollary 4.2 suggests that there exists graph regularizers with class complexity as large as O( p χ(G)), which motivate us to find substantially better regularizers. In particular, we investigate LS labelling [16]; given a graph G, LS labelling KLS ∈K(G) is defined as KLS = A ρ + I, ρ ≥|λn(A)| (3) LS labellinghas high Rademacher complexity on a large class of graphs, in particular Corollary 4.3. For a random graph G(n, q), q ∈[0, 1), where each edge is present independently w.p. q; for C, t, q = O(1) the Rademacher complexity of the function class associated with LS labelling (3) is Θ(n 1 4 ), with high probability. (Suppl.) 5mllab.csa.iisc.ernet.in/rakeshs/nips14/suppl.pdf 4 For the limiting case of complete graphs, we can show that Laplacian inverse [4], the most widely used graph regularizer has O(1) complexity (Claim 2, Suppl.), thus indicating that it may be suboptimal for graphs with high connectivity. Experimental results illustrate our observation. We derive a class complexity measure for unit sphere graph embeddings, which indicates the richness of the function class, and helps the learning algorithm to choose an effective embedding. 5 Generalization Error Bound In the previous section, we applied Rademacher complexity to orthonormal representations. In this section we derive novel graph-dependent generalization error bounds, which will be used in Section 6. Following a similar proof technique as in [3], we propose the following error bound— Theorem 5.1. Given a graph G = (V, E), V = [n] with y ∈Yn being the unknown binary labels over V ; let U ∈Lab(G), and K ∈K(G) be the corresponding kernel. Let ˜HU = {h|h = Uβ, β ∈ Rn, ∥β∥∞≤C}, C > 0. Let ℓbe any loss function, bounded in [0, B] and L-Lipschitz in its second argument. For f ∈(0, 1/2]6, let labels of subgraph S ⊆V be observable, |S| = nf. Let ¯S = V \S. For any δ > 0 and h ∈˜HU, with probability ≥1 −δ over S ∼Πf er ¯S[ˆy] ≤erS[ˆy] + LC s 2λ1(K) f(1 −f) + c1B 1 −f r 1 nf log 1 δ (4) where ˆy = U⊤h and c1 > 0 is a constant. (Suppl.) Discussion Note that from [2], λ1(K) ≤χ(G) and χ(G) is in-turn bounded by the maximum degree of the graph [21]. Thus, if L, B, f = O(1), then for sparse, degree bounded graphs; for the choice of parameter C = Θ(1/√n), the slack term and the complexity term goes to zero as n increases. Thus, making the bound useful. Examples include tree, cycle, path, star and d-regular (with d = O(1)). Such connections relating generalization error to graph properties was not available before. We exploit this novel connection to analyze graph transduction algorithms in Section 6. Also, in Section 7, we extend the above result to the problem of multiple graph transduction. 5.1 Max-margin Orthonormal Representation To analyze er0-1 S relating to graph structural measure, the ϑ function, we study the maximum margin induced by any orthonormal representation, in an oracle setting. We study a fully ‘labelled graph’ G = (V, E, y), where y ∈Yn are the binary labels on the vertices V . Given any U ∈Lab(G), the maximum margin classifier is computed by solving ω(K, y) = g(α∗, K, y) where K = U⊤U ∈K(G). It is interesting to note that knowing all the labels, the max-margin orthonormal representation can be computed by solving an SDP. More formally Definition 3. Given a labelled graph G = (V, E, y), where V = [n] and y ∈Yn are the binary labels on V , let ¯H = S U∈Lab(G) ¯HU, where ¯HU = {h|h = Uβ, β ∈Rn}. Let K ∈K(G) be the kernel corresponding to U ∈Lab(G). The max-margin orthonormal representation associated with the kernel function is given by Kmm = argminK∈K(G) ω(K, y). By definition, Kmm induces the largest margin amongst other orthonormal representations, and hence is optimal. The optimal margin has interesting connections to the Lov´asz ϑ function — Theorem 5.2. Given a labelled graph G = (V, E, y), with V = [n] and y ∈Yn being the binary labels on vertices. Let Kmm be as in Definition 3, then ω(Kmm, y) = ϑ(G)/2. (Suppl.) Thus, knowing all the labels, computing Kmm is equivalent to solving the ϑ function. However, in the transductive setting, Kmm cannot be computed. Alternatively, we explore LS labelling (3), which gives a constant factor approximation to the optimal margin on a large class of graphs. Definition 4. A class of labelled graphs G = {G = (V, E, y)} is said to be a Labelled SVM-ϑ graph family, if there exist a constant γ > 1 such that ∀G ∈G, ω(KLS, y) ≤γω(Kmm, y). 6We can generalize our result for f ∈(0, 1), but for the simplicity of the proof we assume f ∈(0, 1/2]. This is also true in practice, where the number of labelled examples is usually very small. 5 Algorithm 1 Input: U, yS and C > 0. Get α∗, ¯y∗ ¯S by solving ΛC(K, yS) (2) for ℓhinge and K = U⊤U. Return: ˆy = U⊤hS, where hS = UYα∗; Y ∈Dn , Y = yi, if i ∈S, otherwise ¯y∗ i . Such class of graphs are interesting, because one can get a constant factor approximation to the optimal margin, without the knowledge of the true labels e.g., Mixture of random graphs: G = (V, E, y), with y⊤1n = 0, cut(A, y) ≤c√n, for c > 1 being a constant and the subgraphs corresponding to the two classes form G(n/2, 1/2) random graphs (Claim 3, Suppl.). We relate the maximum geometric margin induced by orthonormal representations to the ϑ function of the graph. This allows us to derive novel graph dependent learning theory estimates. 6 Consistency of Orthonormal Representation of Graphs Aggregating results from Section 4 and 5, we show that Algorithm 1 working with orthonormal representations of graphs is consistent on a large class of graph families. For every finite and fixed n, we derive an estimate on er0-1 ¯Sn . Theorem 6.1. For the setting as in Definition 1, let f ∈(0, 1/2] be fixed. Let ˆy be the predictions learnt by Algorithm 1 with inputs Un ∈Lab(Gn), ySn and C∗=  ϑ2(Gn)(1−f) 23n2fϑ( ¯ Gn)  1 4 . Then ∃Un ∈ Lab(Gn), ∀Gn such that with probability atleast 1 −1 n over Sn ∼Πf er0-1 ¯Sn [ˆy] = O  ϑ(Gn) f 3(1 −f)n  1 4 + 1 1 −f s log n nf ! Proof. Let Kn ∈K(Gn) be the max-margin kernel associated with Gn (Definition 3), and let Un ∈Lab(G) be the corresponding orthonormal representation. Since ℓramp is an upper bound on ℓ0-1, we concentrate on bounding erramp ¯Sn [ˆy]. Note that for any C > 0 C|Sn| · erramp Sn [ˆy] ≤C|Sn| · erhinge Sn [ˆy] ≤ΛC(Kn, ySn) ≤ΛC(Kn, yn) ≤ω(Kn, yn) = ϑ(Gn) 2 The last inequality follows from Theorem 5.2. Note that for ramp loss L = B = 1; using Theorem 5.1 for δ = 1 n, it follows that with probability atleast 1 −1 n over the random draw of Sn ∼Πf, erramp ¯Sn [ˆy] ≤ϑ(Gn) 2Cnf + C s 2λ1(Kn) f(1 −f) + c1 1 −f s log n nf (5) where c1 = O(1). Using λ1(Kn) ≤ϑ( ¯Gn) [2] and optimizing RHS for C, we get C∗=  ϑ2(Gn)(1−f) 23n2fϑ( ¯ Gn)  1 4 . Plugging back C∗and using ϑ(Gn)ϑ ¯Gn  = n [2] proves the claim. [5] showed that ES  er ¯Sn  = O p q n  . However, as noted in Section 1, the quantity q is dependent on y ¯Sn, and hence their bounds cannot be computed explicitly [6]. We assume that the graph does not contain duplicate nodes with opposite labels, er∗ ¯Sn = 0. Thus, consistency follows from the fact that ϑ(G) ≤n and for large families of graphs it is O(nc) where 0 ≤c < 1. This theorem points to the fact that if f = O(1), then by Definition 1, Algorithm 1 is ℓ0-1- consistency over such class of graph families. Examples include Power-law graphs: Graphs where the degree sequence follows a power law distribution. We show that ϑ( ¯G) = O(√n) for naturally occurring power law graphs (Claim 4, Suppl.). Thus, working with the complement graph ¯G  , makes Algorithm 1 consistent. 6 Random graphs: For G(n, q) graphs, q = O(1); with high probability ϑ(G(n, q)) = Θ(√n) [13]. Note that choosing Kn for various graph families is difficult. Alternatively, for Labelled SVM-ϑ graph family (Definition 4), if Lov´asz ϑ function is sub-linear, then for the choice of LS labelling, Algorithm 1 is ℓ0-1consistent. Examples include Mixture of random graphs (Section 5.1). Furthermore, we analyze the fraction of labelled nodes to be observed, such that Algorithm 1 is consistent. Corollary 6.2 (Labelled Sample Complexity). Given a graph family Gc, such that ϑ(Gn) = O(nc), ∀Gn ∈Gc where 0 ≤c < 1. For C = C∗as in Theorem 6.1; 1 2  ϑ(Gn) n 1/3−ε , ε > 0 fraction of labelled nodes is sufficient for Algorithm 1 to be ℓ0-1-consistent w.r.t. Gc. The proof directly follows from Theorem 6.1. As a consequence of the above result, we can argue that for sparse graphs (ϑ(G) is large) one would need a larger fraction of nodes labelled, but for denser graphs (ϑ(G) is small) even a smaller fraction of nodes being labelled suffices. Such connections relating sample complexity and graph properties was not available before. To end this section, we discuss on the possible extensions to the inductive setting (Claim 5, Suppl.)— we can show that that the uniform convergence of er ¯S to erS in the transductive setting (for f = 1/2) is a necessary and sufficient condition for the uniform convergence of erS to the generalization error. Thus, the results presented here can be extended to the supervised setting. Furthermore, combining Theorem 5.1 with the results of [9], we can also extend our results to the semi-supervised setting. 7 Multiple Graph Transduction Many real world problems can be posed as learning on multiple graphs [19, ?]. Existing algorithms for single graph transduction [10, 15] cannot be trivially extended to the new setting. It is a well known heuristic that taking a convex combination of Laplacian improves classification performance [7], however the underlying principle is not well understood. We propose an efficient MKL style algorithm with generalization guarantees. Formally, the problem of multiple graph transduction is— Problem 1. Given G = {G(1), . . . , G(m)} a set of simple, undirected graphs G(k) = V, E(k) , defined on a common vertex set V = [n]. Without loss of generality we assume that the first fn vertices are labelled, i.e., the set of labelled vertices is given by S = [fn], where f ∈(0, 1). Let ¯S = V \S be the unlabelled node set. Let yS, y ¯S be the labels of S, ¯S respectively. Given G and labels yS, the goal is to accurately predict the labels of y ¯S. Let K = {K(1), . . . , K(m)} be the set of kernels corresponding to graphs G; K(k) ∈K(G(k)), ∀k ∈ [m]. We propose the following MKL style formulation for multiple graph transduction ΨC(K, yS) = min η∈Rm + ,∥η∥1=1 min ¯yj∈¯ Y,∀j∈¯S max α∈Rn +,∥α∥∞≤C g  α, m X k=1 ηkK(k), [yS, ¯y ¯S]  (6) Extending our analysis from Section 5, we propose the following error bound Theorem 7.1. For the setting as in Problem 1, let f ∈ (0, 1/2]7 and K = {K(1), . . . , K(m)}, K(k) ∈K(G(k)), ∀k ∈[m]. Let α∗, η∗, ¯y∗ ¯S be the solution to ΨC(K, yS) (6). Let ˆy = m P i=1 η∗ kK(k) ¯Yα∗, where ¯Y ∈Dn, ¯Yii = yi if i ∈S, otherwise ¯y∗ i . Then, for any δ > 0, with probability ≥1 −δ over the choice of S ⊆V such that |S| = nf er0-1 ¯S [ˆy] ≤ ¯Ψ(K, y) Cnf + C s 2ϑ( ¯G∪) f(1 −f) + c1 1 −f r 1 nf log 1 δ where c1 = O(1), ¯Ψ(K, y) = mink∈[m] ω(K(k), y) and G∪is the union of graphs G8. (Suppl.) The above result gives us the ability for the first time to analyze generalization performance of multiple graph transduction algorithms. The expression ¯Ψ(K, y) suggests that combining multiple graphs should improve performance over considering individual graphs separately. Similar to Section 6, 7As in Theorem 5.1, we can generalize our results for f ∈(0, 1). 8G∪= (V, E∪), where (i, j) ∈E∪if edge (i, j) is present in atleast one of the graphs G(k) ∈G, k ∈[m]. 7 we can show that if one of the graph families G(l), l ∈[m] of G obey ϑ(G(l) n ) = O(nc), 0 ≤c < 1; G(l) n ∈G(l), then there exists orthonormal representations K, such that the MKL style algorithm optimizing for (6) is ℓ0-1-consistent over G (Claim 6, Suppl.). We can also show that combining graphs improves labelled sample complexity (Claim 7, Suppl.). This is a first attempt in developing a statistical understanding for the problem of multiple graph transduction. 8 Experimental results Table 1: Superior performance of LS labelling. Dataset LS-lab Un-Lap N-Lap KS-Lap AuralSonar∗ 76.5 68.1 66.7 69.2 Yeast-SW-5-7∗ 60.4 54.1 52.9 53.3 Yeast-SW-5-12∗ 78.6 61.2 60.5 64.3 Yeast-SW-7-12∗ 76.5 64.0 59.5 63.1 Diabetes† 73.1 68.3 68.6 68.5 Fourclass† 73.3 69.3 71.2 71.8 We conduct two sets of experiments9. Superior performance of LS labelling: We use two datasets—similarity matrices∗from [11] and RBF kernel10 as similarity matrices for the UCI datasets†[8]. We built an unweighted graph by thresholding the similarity matrices about the mean. Let L = D −A. For the regularized formulation (1), with 10% of labelled nodes observable, we test four types of kernel matrices—LS labelling(LS-lab), (λ1I + L)−1 (Un-Lap), (λ2I + D−1/2LD−1/2)−1 (N-Lap) and K-Scaling (KS-Lap) [4]. We choose the parameters λ, λ1 and λ2 by cross validation. Table 1 summarizes the results. Each entry is accuracy in % w.r.t. 0-1 loss, and the results were averaged over 100 iterations. Since we are thresholding by mean, the graphs have high connectivity. Thus, from Corollary 4.3, the function class associated with LS labellingis rich and expressive, and hence it outperforms previously proposed regularizers. Table 2: Multiple Graphs Transduction. Each entry is accuracy in %. Graph 1vs2 1vs3 1vs4 2vs3 2vs4 3vs4 Aud 62.8 64.8 68.3 59.3 50.8 61.5 Vis 68.9 65.6 68.9 69.1 70.3 75.1 Txt 68.7 59.2 64.8 64.6 60.9 65.4 Unn 69.7 60.3 52.7 62.7 67.4 62.5 Maj 72.7 75.2 80.5 65.4 62.6 77.4 Int 80.6 83.6 86.0 90.9 75.3 91.8 MV 98.9 93.4 95.6 97.7 87.7 98.8 Graph transduction across Multiple-views: Learning on mutli-view data has been of recent interest [18]. Following a similar line of attack, we pose the problem of classification on multi-view data as multiple graph transduction. We investigate the recently launched Google dataset [17], which contains multiple views of video game YouTube videos, consisting of 13 feature types of auditory (Aud), visual (Vis) and textual (Txt) description. Each video is labelled one of 30 classes. For each of the views we construct similarity matrices using cosine distance and threshold about the mean to obtain unweighted graphs. We considered 20% of the data to be labelled. We show results on pair-wise classification for the first four classes. As a natural way of combining graphs, we compared our algorithm (6) (MV) with union (Unn), intersection (Int) and majority (Maj)11 of graphs. We used LS labelling as the graph-kernel and (2) was used to solve single graph transduction. Table 2 summarizes the results, averaged over 20 iterations. We also state top accuracy in each of the views for comparison. As expected from our analysis in Theorem 7.1, we observe that combining multiple graphs significantly improves classification accuracy. 9 Conclusion For the problem of graph transduction, we show that there exists orthonormal representations that are consistent over a large class of graphs. We also note that the Laplacian inverse regularizer is suboptimal on graphs with high connectivity, and alternatively show that LS labellingis not only consistent, but also exhibits high Rademacher complexity on a large class of graphs. Using our analysis, we also develop a sound statistical understanding of the improved classification performance in combining multiple graphs. 9Relevant resources at: mllab.csa.iisc.ernet.in/rakeshs/nips14 10The (i, j)th entry of an RBF kernel is given by exp  −∥xi−xj∥2 2σ2  . We set σ to the mean distance. 11Majority graph is a graph where an edge (i, j) is present, if a majority of the graphs have the edge (i, j). 8 References [1] V. Jethava, A. Martinsson, C. Bhattacharyya, and D. P. Dubhashi The Lov´asz ϑ function, SVMs and finding large dense subgraphs. Neural Information Processing Systems , pages 1169–1177, 2012. [2] L. Lov´asz. On the shannon capacity of a graph. IEEE Transactions on Information Theory, 25(1):1–7, 1979. [3] R. El-Yaniv and D. Pechyony. Transductive Rademacher complexity and its applications. In Learning Theory, pages 151–171. Springer, 2007. [4] R. Ando, and T. Zhang. Learning on graph with Laplacian regularization. Neural Information Processing Systems , 2007. [5] R. Johnson and T. Zhang. On the effectiveness of Laplacian normalization for graph semi-supervised learning. Journal of Machine Learning Research, 8(4), 2007. [6] R. El-Yaniv and D. Pechyony. Transductive Rademacher complexity and its applications. Journal of Machine Learning Research, 35(1):193, 2009 [7] A. Argyriou, M. Herbster, and M. Pontil. Combining graph Laplacians for semi-supervised learning. Neural Information Processing Systems , 2005. [8] A. Asuncion, and D. Newman. UCI machine learning repository. 2000. [9] P. L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2003. [10] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. International Conference on Machine Learning, pages 19–26. Morgan Kaufmann Publishers Inc., 2001. [11] Y. Chen, M. Gupta, and B. Recht. Learning kernels from indefinite similarities. International Conference on Machine Learning, pages 145–152. ACM, 2009. [12] C. Cortes, M. Mohri, D. Pechyony and A. Rastogi. Stability Analysis and Learning Bounds for Transductive Regression Algorithms. arXiv preprint arXiv:0904.0814, 2009. [13] A. Coja-Oghlan. The Lov´asz number of random graphs. Combinatorics, Probability and Computing, 14 (04):439–465, 2005. [14] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 3rd edition, 2009. [15] M. Szummer and T. Jaakkola Partially labeled classification with Markov random walks. Neural Information Processing Systems , 14:945–952, 2002. [16] C. J. Luz and A. Schrijver. A convex quadratic characterization of the Lov´asz theta number. SIAM Journal on Discrete Mathematics, 19(2):382–387, 2005. [17] O. Madani, M. Georg, and D. A. Ross. On using nearly-independent feature families for high precision and confidence. Machine Learning, 92:457–477, 2013. [18] W. Tang, Z. Lu, and I. S. Dhillon. Clustering with multiple graphs. International Conference on Data Mining, pages 1016–1021. IEEE, 2009. [19] K. Tsuda, H. Shin, and B. Sch¨olkopf. Fast protein classification with multiple networks. Bioinformatics, 21(suppl 2):ii59–ii65, 2005. [20] V. N. Vapnik and A. J. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities Theory of Probability & Its Applications, 16(2):264–280. SIAM, 1971. [21] D. J. A. Welsh and M. B. Powell. An upper bound for the chromatic number of a graph and its application to timetabling problems. The Computer Journal, 10(1):85–86, 1967. [22] T. Zhang and R. Ando. Analysis of spectral kernel design based semi-supervised learning. Neural Information Processing Systems , 18:1601, 2006. [23] D. Zhou, O. Bousquet, T. N. Lal, J. Weston, and B. Sch¨olkopf. Learning with local and global consistency. Neural Information Processing Systems , 16(16):321–328, 2008. 9
2014
292
5,394
Generalized Unsupervised Manifold Alignment Zhen Cui1,2 Hong Chang1 Shiguang Shan1 Xilin Chen1 1 Key Lab of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing, China 2 School of Computer Science and Technology, Huaqiao University, Xiamen, China {zhen.cui,hong.chang}@vipl.ict.ac.cn; {sgshan,xlchen}@ict.ac.cn Abstract In this paper, we propose a Generalized Unsupervised Manifold Alignment (GUMA) method to build the connections between different but correlated datasets without any known correspondences. Based on the assumption that datasets of the same theme usually have similar manifold structures, GUMA is formulated into an explicit integer optimization problem considering the structure matching and preserving criteria, as well as the feature comparability of the corresponding points in the mutual embedding space. The main benefits of this model include: (1) simultaneous discovery and alignment of manifold structures; (2) fully unsupervised matching without any pre-specified correspondences; (3) efficient iterative alignment without computations in all permutation cases. Experimental results on dataset matching and real-world applications demonstrate the effectiveness and the practicability of our manifold alignment method. 1 Introduction In many machine learning applications, different datasets may reside on different but highly correlated manifolds. Representative scenarios include learning cross visual domains, cross visual views, cross languages, cross audio and video, and so on. Among them, a key problem in learning with such datasets is to build connections cross different datasets, or align the underlying (manifold) structures. By making full use of some priors, such as local geometry structures or manually annotated counterparts, manifold alignment tries to build or strengthen the relationships of different datasets and ultimately project samples into a mutual embedding space, where the embedded features can be compared directly. Since samples from different (even heterogeneous) datasets are usually located in different high dimensional spaces, direct alignment in the original spaces is very difficult. In contrast, it is easier to align manifolds of lower intrinsic dimensions. In recent years, manifold alignment becomes increasingly popular in machine learning and computer vision community. Generally, existing manifold alignment methods fall into two categories, (semi)supervised methods and unsupervised methods. The former methods [15, 26, 19, 33, 28, 30] usually require some known between-set counterparts as prerequisite for the transformation learning, e.g., labels or handcrafted correspondences. Thus they are difficult to generalize to new circumstances, where the counterparts are unknown or intractable to construct. In contrast, unsupervised manifold alignment learns from manifold structures and naturally avoids the above problem. With manifold structures characterized by local adjacent weight matrices , Wang et al. [29] define the distance between two points respectively from either manifold as the minimum matching scores of the corresponding weight matrices in all possible structure permutations. Therefore, when K neighbors are considered, the distance computation for any two points needs K! permutations, a really high computational cost even for a small K. To alleviate this problem, Pei et al. [21] use a B-spline curve to fit each sorted adjacent weight matrix and then compute matching scores of the curves across manifolds for the subsequent local alignment. Both methods 1 in [29] and [21] divide manifold alignment into two steps, the computation of matching similarities of data points across manifolds and the sequential counterparts finding. However, the two-step approaches might be defective, as they might lead to inaccurate alignment due to the evolutions of neighborhood relationships, i.e., the local neighborhood of one point computed in the first step may change if some of its original neighbors are not aligned in the second step. To address this problem, Cui et al. [7] propose an affine-invariant sets alignment method by modeling geometry structures with local reconstruction coefficients. In this paper, we propose a generalized unsupervised manifold alignment method, which can globally discover and align manifold structures without any pre-specified correspondences, as well as learn the mutual embedding subspace. In order to jointly learn the transforms into the mutual embedding space and the correspondences of two manifolds, we integrate the criteria of geometry structure matching, feature matching and geometry preserving into an explicit quadratic optimization model with 0-1 integer constraints. An efficient alternate optimization on the alignment and transformations is employed to solve the model. In optimizing the alignment, we extend the Frank-Wolfe (FW) algorithm [9] for the NP-hard integer quadratic programming. The algorithm approximately seeks for optima along the path of global convergence on a relaxed convex objective function. Extensive experiments demonstrate the effectiveness of our proposed method. Different from previous unsupervised alignment methods such as [29] and [21], our method can (i) simultaneously discover and align manifold structures without predefining the local neighborhood structures; (ii) perform structure matching globally; and (iii) conduct heterogeneous manifold alignment well by finding the embedding feature spaces. Besides, our work is partly related to other methods such as kernelized sorting [22], latent variable model [14], etc. However, they mostly discover counterparts in a latent space without considering geometric structures, although to some extend the constrained terms used in our model are formally similar to theirs. 2 Problem Description We first define the notations used in this paper. A lowercase/uppercase letter in bold denotes a vector/matrix, while non-bold letters denote scalars. Xi· (X·i) represents the ith row (column) of matrix X. xij or [X]ij denotes the element at the ith row and jth column of matrix X. 1m×n, 0m×n ∈Rm×n are matrices of ones and zeros. In ∈Rn×n is an identity matrix. The superscript ⊺means the transpose of a vector or matrix. tr(·) represents the trace norm. ∥X∥2 F = tr(X⊺X) designates the Frobenius norm. vec(X) denotes the vectorization of matrix X in columns. diag(X) is the diagonalization on matrix X, and diag(x) returns a diagonal matrix of the diagonal elements x. X ⊗Z and X ⊙Z denote the Kronecker and Hadamard products, respectively. Let X ∈Rdx×nx and Z ∈Rdz×nz denote two datasets, residing in two different manifolds Mx and Mz, where dx(dz) and nx(nz) are respectively the dimensionalities and cardinalities of the datasets. Without loss of generality, we suppose nx ≤nz. The goal of unsupervised manifold alignment is to build connections between X and Z without any pre-specified correspondences. To this end, we define a 0-1 integer matrix F ∈{0, 1}nx×nz to mark the correspondences between X and Z. [F]ij = 1 means that the ith point of X and the jth point of Z are a counterpart. If all counterparts are limited to one-to-one, the set of integer matrices F can be defined as Π = {F|F ∈{0, 1}nx×nz, F1nz = 1nx, 1⊺ nxF ≤1⊺ nz, nx ≤nz}. (1) nx ̸= nz means a partial permutation. Meanwhile, we expect to learn the lower dimensional intrinsic representations for both datasets through explicit linear projections, Px ∈Rd×dx and Pz ∈Rd×dz, from the two datasets to a mutual embedding space M. Therefore, the correspondence matrix F as well as the embedding projections Px and Pz are what we need to learn to achieve generalized unsupervised manifold alignment. 3 The Model Aligning two manifolds without any annotations is not a trivial work, especially for two heterogeneous datasets. Even so, we can still make use of the similarities between the manifolds in geometry structures and intrinsic representations to build the alignment. Specifically, we have three intuitive 2 observations to explore. First, manifolds under the same theme, e.g., the same action sequences of different persons, usually imply a certain similarity in geometry structures. Second, the embeddings of corresponding points from different manifolds should be as close as possible. Third, the geometry structures of both manifolds should be preserved respectively in the mutual embedding space. Based on these intuitions, we proposed an optimization objective for generalized unsupervised manifold alignment. Overall objective function Following the above analysis, we formulate unsupervised manifold alignment into an optimization problem with integer constraints, min Px,Pz,F Es + γfEf + γpEp (2) s.t. F ∈Π, Px, Pz ∈Θ, where γf, γp are the balance parameters, Θ is a constraint to avoid trivial solutions for Px and Pz, Es, Ef and Ep are three terms respectively measuring the degree of geometry matching, feature matching and geometry preserving, which will be detailed individually in the following text. Es: Geometry matching term To build correspondences between two manifolds, they should be first geometrically aligned. Therefore, discovering the geometrical structure of either manifold should be the first task. For this propose, graph with weighted edges can be exploited to characterize the topological structure of manifold, e.g., via graph adjacency matrices Kx, Kz of datasets X and Z, which are usually non-negative and symmetric if not considering directions of edges. In the literatures of manifold learning, many methods have been proposed to construct these adjacency matrices locally, e.g., via heat kernel function [2]. However, in the context of manifold alignment, there might be partial alignment cases, in which some points on one manifold might not be corresponded to any points on the other manifold. Thus these unmatched points should be detected out, and not involved in the computation of the geometry relationship. To address this problem, we attempt to characterizes the global manifold geometry structure by computing the full adjacency matrix, i.e., [K]ij = d(X·i, X·j), where d is geodesic distance for general cases or Euclidean distance for flat manifolds. Note that, in order to reduce the effect of data scales, X and Z are respectively normalized to have unit standard deviation. The degree of manifold matching in global geometry structures is then formulated as the following energy term, Es = ∥Kx −FKzF⊺∥2 F , (3) where F ∈Π is the (partial) correspondence matrix defined in Eqn.(1). Ef: Feature matching term Given two datasets X and Z, the aligned data points should have similar intrinsic feature representations in the mutual embedding space M. Thus we can formulate the feature matching term as, Ef = ∥P⊺ xX −P⊺ zZF⊺∥2 F , (4) where Px and Pz are the embedding projections respectively for X and Z. They can also be extended to implicit nonlinear projections through kernel tricks. This term penalizes the divergence of intrinsic features of aligned points in the embedding space M. Ep: Geometry preserving term In unrolling the manifold to the mutual embedding space, the local neighborhood relationship of either manifold is not expected to destroyed. In other words, the local geometry of either manifold should be well preserved to avoid information loss. As done in many manifold learning algorithms [23, 2], we construct the local adjacency weight matrices Wx and Wz respectively for the datasets X and Z. Then, the geometry preserving term is defined as Ep = ∑ i,j ∥P⊺ x(xi−xj)∥2wx ij+ ∑ i,j ∥P⊺ z(zi−zj)∥2wz ij =tr(P⊺ xXLxX⊺Px + PzZLzZ⊺Pz), (5) where wx ij(wz ij) is the weight between the ith point and the jth point in X (Z), Lx and Lz are the graph Laplacian matrices, with Lx = diag([∑ j wx 1j, . . . , ∑ j wx nxj]) −Wx and Lz = diag([∑ j wz 1j, . . . , ∑ j wz nzj]) −Wz. 3 4 Efficient Optimization Solving the objective function (2) is difficult due to multiple indecomposable variables and integer constraints. Here we propose an efficient approximate solution via alternate optimization. Specifically, the objective function (2) is decomposed into two submodels, corresponding to the optimizations of the integer matrix F and the projection matrices Px, Pz, respectively. With Px and Pz fixed, we can get a submodel by solving a non-convex quadratic integer programming, whose approximate solution is computed along the gradient-descent path of a relaxed convex model by extending the Frank-Wolfe algorithm [9]. When fixing F, an analytic solution can be obtained for Px and Pz. The two submodels are alternately optimized until convergence to get the final solution. 4.1 Learning Alignment When fixing Px Pz, the original problem reduces to minimize the following function, min F∈Π Ψ0(F) = Es + γfEf. (6) Let bX = P⊺ xX and bZ = P⊺ zZ denote the transformed features. After a series of derivation, the objective function can be rewritten as min F∈Π Ψ0(F) = ∥KxF −FKz∥2 F + tr(F⊺11⊺FKzz) + tr(F⊺B), (7) where Kzz = Kz ⊙Kz and B = γf(11⊺(bZ ⊙bZ) −2 bX⊺bZ) −11⊺Kzz. This quadratic alignment problem is NP-hard with n! enumerations under an exhaustive search strategy. To get effective and efficient solution, we relax this optimization problem under the framework of Frank-Wolfe (FW) algorithm [9], which is designed for convex models over a compact convex set. Concretely, we have following two modifications: (i) Relax Π into a compact convex set. As the set of 0-1 integer matrices Π is not closed, we can relax it to a compact closed set by using right stochastic matrices [3] as Π′ = {F|F ≥0, F1nz = 1nx, 1⊺ nxF ≤1⊺ nz, nx ≤nz}. (8) Obviously, Π′ is a compact convex set. (ii) Relax the objective function Ψ0 into a convex function. As Ψ0 is non-convex, its optimization easily suffers from local optima. To avoid local optima in the optimization, we can incorporate an auxiliary function ϕ(F) = λ tr(F⊺F), with λ = nx × max{−min(eig (Kzz)), 0}, into Ψ0 and get the new objective as Ψ(F) = ∥KxF −FKz∥2 + tr(F⊺11⊺FKzz + λF⊺F) + tr(F⊺B). (9) In Eqn.(9), the first term is positive definite quadratic form for variable vec(F), and the Hessian matrix of the second term is 2(K⊺ zz ⊗(11⊺) + λI) which is also positive definite. Therefore, the new objective function Ψ is convex over the convex set Π′. Moreover, the solutions from minimizing Ψ0 and Ψ over the integer constraint F ∈Π are consistent because ϕ(F) is a constant. The extended FW algorithm is summarized in Alg.1, which iteratively projects the one-order approximate solution of Ψ into Π. In step (4), the optimized solution is obtained using the KuhnCMunkres (KM) algorithm in the 0-1 integer space [20], which makes the solution of the relaxed objective function Ψ equal to that of the original objective Ψ0. Meanwhile, the continuous solution path is gradually descending in steps (5)∼(11) due to the convexity of function Ψ, thus local optima is avoided unlike the original non-convex function over the integer space Π. Furthermore, it can be proved that the objective value Ψ(Fk) is non-increasing at each iteration and {F1, F2, . . .} will converge into a fixed point. 4.2 Learning Transformations When fixing F, the embedding transforms can be obtained by minimizing the following function, Ec+γpEp =tr (P⊺ xX(γfI+γpLx)X⊺Px+P⊺ zZ(γfF⊺F+γpLz)Z⊺Pz−2γfP⊺ xXFZ⊺Pz) . (10) 4 Algorithm 1 Manifold alignment Input: Kx, Kz, bX, bZ, F0 1: Initialize: F⋆= F0, k = 0. 2: repeat 3: Computer the gradient of Ψ w.r.t. Fk: ∇(Fk) = 2(K⊺ xKxFk + FkKzK⊺ z −2K⊺ xFkKz + 11⊺FkKzz + λFk) + B; 4: Find an optimal alignment at the current solution Fk by minizing one-order Taylor expansion of the objective function Ψ, i.e., H = arg min F∈Π tr(∇(Fk)⊺F) using the KM algorithm; 5: if Ψ(H) < Ψ(Fk) then 6: F⋆= Fk+1 = H; 7: else 8: Find the optimal step δ = arg min 0≤δ≤1 Ψ(Fk + δ(H −Fk)); 9: Fk+1 = Fk + δ(H −Fk); 10: F⋆= arg min F∈{H,F⋆} Ψ(F); 11: end if 12: k = k + 1; 13: until ∥Ψ(Fk+1) −Ψ(Fk)∥< ϵ. Output: F⋆. To avoid trivial solutions of Px, Pz, we centralize X, Z and reformulate the optimization problem by considering the rotation-invariant constraints: max Px,Pz tr (P⊺ xXFZ⊺Pz) , (11) s.t. P⊺ xX(γfI + γpLx)X⊺Px = I, P⊺ zZ(γfF⊺F + γpLz)Z⊺Pz = I. The above problem can be solved analytically by eigenvalue decomposition like Canonical Correlation Analysis (CCA) [16]. 4.3 Algorithm Analysis By looping the above two steps, i.e., alternating optimization on the correspondence matrix F and the embedding maps Px, Pz, we can reach a feasible solution just like many block-coordinate descent methods. The computational cost mainly lies in learning alignment, i.e., the optimization steps in Alg.1. In Alg.1, the time complexity of KM algorithm for linear integer optimization is O(n3 z). As the Frank-Wolfe method has a convergence rate of O(1/k) with k iterations, the time cost of Alg.1 is about O( 1 ϵ n3 z), where ϵ is the threshold in step (13) of Alg.1. If the whole GUMA algorithm (please see the auxiliary file) needs to iterate t times, the cost of whole algorithm will be O( 1 ϵ tn3 z). In our experiments, only a few t and k iterations are required to achieve the satisfactory solution. 5 Experiment To validate the effectiveness of the proposed manifold alignment method, we first conduct two manifold alignment experiments on dataset matching, including the alignment of face image sets across different appearance variations and structure matching of protein sequences. Further applications are also performed on video face recognition and visual domain adaptation to demonstrate the practicability of the proposed method. The main parameters of our method are the balance parameters γf, γp, which are simply set to 1. In the geometry preserving term, we set the nearest neighbor number K = 5 and the heat kernel parameter to 1. The embedding dimension d is set to the minimal rank of two sets minus 1. 5.1 GUMA for Set Matching First, we perform alignment of face image sets containing different appearance variations in poses, expressions, illuminations and so on. In this experiment, the goal is to connect corresponding face 5 images of different persons but with the same poses/expression. Here we use Multi-PIE database [13]. We choose totally 29,400 face images of the first 100 subjects in the dataset, which cover 7 poses with yaw within [−45◦, +45◦](15◦intervals), different expressions and illuminations across 3 sessions. These faces are cropped and normalized into 60×40 pixels with eyes at fixed locations. To accelerate the alignment, their dimensions are further reduced by PCA with 90% energy preserved. The quantitative matching results1 on pose/expression matching are shown in Fig.1, which contains the matching accuracy2 of poses (Fig.1(a)), expressions (Fig.1(b)) and their combination (Fig.1(c)). We compare our method with two state-of-the-art methods, Wang’s [29] and Pei’s [21]. Moreover, the results of using only feature matching or structure matching are also reported respectively, which are actually special cases of our method. Here we briefly name them as GUMA(F)/GUMA(S), respectively corresponding to the feature/structure matching. As shown in Fig.1, we have the following observations: (1) Manifold alignment benefits from manifold structures as well as sample features. Although features contribute more to the performance in this dataset, manifold structures also play an important role in alignment. Actually, their relative contributions may be different with different datasets, as the following experiments on protein sequence alignment indicate that manifold structures alone can achieve a good performance. Anyway, combining both manifold structures and sample features promotes the performance more than 15%. (2) Compared with the other two manifold alignment methods, Wang’s [29] and Pei’s [21], the proposed method achieves better performance, which may be attributed to the synergy of global structure matching and feature matching. It is also clear that Wang’s method achieves relatively worse performance, which we conjecture can be ascribed to the use of only the geometric similarity. This might also account for its similar performance to GUMA(S), which also makes uses of structure information only. (3) Pose matching is easier than expression matching in the alignment task of face image sets. This also follows our intuition that poses usually vary more dramatic than subtle face expressions. Further, the task combining poses and expressions (as shown in Fig.1(c)) is more difficult than either single task. 0 20 40 60 80 100 matching accuracy (%) Wang’s Pei’s GUMA(F) GUMA(S) GUMA (a) Pose matching 0 10 20 30 40 50 60 70 80 matching accuracy (%) Wang’s Pei’s GUMA(F) GUMA(S) GUMA (b) Exp. matching 0 10 20 30 40 50 60 70 matching accuracy (%) Wang’s Pei’s GUMA(F) GUMA(S) GUMA (c) Pose & exp. matching Figure 1: Alignment accuracy of face image sets from Multi-PIE [13]. Besides, we also compare with two representative semi-supervised alignment methods [15, 28] to investigate“how much user labeling is need to reach a performance comparable to our GUMA method?”. In semi-supervised cases, we randomly choose some counterparts from two given sets as labeled data, and keep the remaining samples unlabeled. For both methods, 20%∼30% data is required to be labeled in pose matching, and 40%∼50% is required in expression and union matching. The high proportional labeling for the latter case may be attributed to the extremely subtle face expressions, for which first-order feature comparisons in both methods are not be effective enough. Next we illustrate how our method works by aligning the structures of two manifolds. We choose manifold data from bioinformatics domain [28]. The structure matching of Glutaredoxin protein PDB-1G7O is used to validate our method, where the protein molecule has 215 amino acids. As shown in Fig.2, we provide the alignment results in 3D subspace of two sequences, 1G7O-10 and 1G7O-21. More results can be found in the auxiliary file. Wang’s method [29] reaches a decent matching result by only using local structure matching, but our method can achieve even better performance by assorting to sample features and global manifold structures. 1Some aligned examples can be found in the auxiliary file. 2Matching accuracy = #(correct matching pairs in testing)⧸#(ground-truth matching pairs). 6 −50 0 50 −20 0 20 −20 −10 0 10 20 3D (a) Pei’s[21] −20 0 20 −20 0 20 −10 0 10 20 3D (b) Wang’s[29] −20 0 20 −20 0 20 −20 −10 0 10 20 3D (c) GUMA Figure 2: The structure alignment results of two protein sequences, 1G7O-10 and 1G7O-21. 5.2 GUMA for Video-based Face Verification In the task of video face verification, we need to judge whether a pair of videos are from the same person. Here we use the recent published YouTube faces dataset [32], which contains 3,425 clips downloaded from YouTube. It is usually used to validate the performance of video-based face recognition algorithms. Following the settings in [5], we normalize the face region sub-images to 40×24 pixels and then use histogram equalization to remove some lighting effect. For verification, we first align two videos by GUMA and then accumulate Euclidean distances of the counterparts as their dissimilarity. This method, without use of any label information, is named as GUMA(un). After alignment, CCA may be used to learn discriminant features by using training pairs, which is named as GUMA(su). Besides, we compare our algorithms with some classic video-based face recognition methods, including MSM[34], MMD[31], AHISD[4], CHISD[4], SANP[17] and DCC[18]. For the implementation of these methods, we use the source codes released by the authors and report the best results with parameter tuning as described in their papers. The accuracy comparisons are reported in Table 1. In the “Unaligned” case, we accumulate the similarities of all combinatorial pairs across two sequences as the distance. We can observe that the alignment process promotes the performance to 65.74% from 61.80%. In the supervised case, GUMA(su) significantly surpasses the most related DCC method, which learns discriminant features by using CCA from the view of subspace. Table 1: The comparisons on YouTube faces dataset (%). Method MSM[34]MMD[31]AHISD[4]CHISD[4]SANP[17]DCC[18] UnalignedGUMA(un)GUMA(su) Mean Accuracy 62.54 64.96 66.50 66.24 63.74 70.84 61.80 65.74 75.00 Standard Error ±1.47 ±1.00 ±2.03 ±1.70 ±1.69 ±1.57 ±2.29 ±1.81 ±1.56 5.3 GUMA for Visual Domain Adaptation To further validate the proposed method, we also apply it to visual domain adaptation task, which generally needs to discover the relationship between the samples of the source domain and those of the target domain. Here we consider unsupervised domain adaptation scenario, where the labels of all the target examples are unknown. Given a pair of source domain and target domain, we attempt to use GUMA to align two domains and meanwhile find their embedding space. In the embedding space, we classify the unlabeled examples of the target domain. We use four public datasets, Amazon, Webcam, and DSLR collected in [24], and Caltech-256 [12]. Following the protocol in [24, 11, 10, 6], we extract SURF features [1] and encode each image with 800-bin token frequency feature by using a pre-trained codebook from Amazon images. The features are further normalized and z-scored with zero mean and unit standard deviation per dimension. Each dataset is regarded as one domain, so in total 12 settings of domain adaptation are formed. In the source domain, 20 examples (resp. 8 examples) per class are selected randomly as labeled data from Amazon, Webcam and Caltech (resp. DSLR). All the examples in the target domain are used as unlabeled data and need to predict their labels as in [11, 10]. For all the settings, we conduct 20 rounds of experiments with different randomly selected examples. We compare the proposed method with five baselines, OriFea, Sampling Geodesic Flow (SGF) [11], Geodesic Flow Kernel (GFK) [10], Information Theoretical Learning (ITL) [25] and Subspace Alignment (SA) [8]. Among them, the latter four methods are the state-of-the-art unsupervised domain adaptation methods proposed recently. OriFea uses the original features; SGF and its extended version GFK try to learn invariant features by interpolating intermediate domains between source and target domains; ITL is a recently proposed unsupervised domain adaptation method; and 7 20 25 30 35 40 45 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (a) C→A 20 25 30 35 40 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (b) C→W 20 25 30 35 40 45 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (c) C→D 18 20 22 24 26 28 30 32 34 36 38 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (d) A→C 20 22 24 26 28 30 32 34 36 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (e) A→W 15 20 25 30 35 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (f) A→D 15 20 25 30 35 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (g) W→C 15 20 25 30 35 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (h) W→A 45 50 55 60 65 70 75 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (i) W→D 18 20 22 24 26 28 30 32 34 36 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (j) D→C 22 24 26 28 30 32 34 36 38 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (k) D→A 55 60 65 70 75 80 85 Accuracy(%) OriFea SGF(PCA) SGF(PLS) GFK(PCA) GFK(PLS) ITL SA GUMA (l) D→W Figure 3: Performance comparisons in unsupervised domain adaptation. (A: Amazon, C: Caltech, D: DSLR, W: Webcam) SA tries to align the principal directions of two domains by characterizing each domain as a subspace. Except ITL, we use the source codes released by the original authors. For fair comparison, the best parameters are tuned to report peak performance for all comparative methods. To compare intrinsically, we use the NN classifier to predict the sample labels of target domain. Note SGF(PLS) and GFK(PLS) use partial least square (PLS) to learn discriminant mappings according to their papers. In our method, to obtain stable sample points from space of high-dimensionality, we perform clustering on the data of each class for source domain, and then cluster all unlabeled samples of target domain, to get the representative points for subsequent manifold alignment, where the number of clusters is estimated using Jump method [27]. All comparisons are reported in Fig.3. Compared with the other methods, our method achieves more competitive performance, i.e., the best results in 9 out of 12 cases, which indicates manifold alignment can be properly applied to domain adaptation. It also implies that it can reduce the difference between domains by using manifold structures rather than the subspaces as in SGF, GFK and SA. Generally, domain adaptation methods are better than OriFea. In the average accuracy, our method is better than the second best result, 44.98% for ours v.s. 43.68% for GFK(PLS). 6 Conclusion In this paper, we propose a generalized unsupervised manifold alignment method, which seeks for the correspondences while finding the mutual embedding subspace of two manifolds. We formulate unsupervised manifold alignment as an explicit 0-1 integer optimization problem by considering the matching of global manifold structures as well as sample features. An efficient optimization algorithm is further proposed by alternately solving two submodels, one is learning alignment with integer constraints, and the other is learning transforms to get the mutual embedding subspace. In learning alignment, we extend Frank-Wolfe algorithm to approximately seek for optima along the descent path of the relaxed objective function. Experiments on set matching, video face recognition and visual domain adaptation demonstrate the effectiveness and practicability of our method. Next we will further generalize GUMA by relaxing the integer constraint and explore more applications. Acknowledgments This work is partially supported by Natural Science Foundation of China under contracts Nos. 61272319, 61222211, 61202297, and 61390510. 8 References [1] H. Bay, T. Tuytelaars, and L. Van Gool. Surf: Speeded up robust features. In ECCV, 2006. [2] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural computation, 15(6):1373–1396, 2003. [3] R. A. Brualdi. Combinatorial matrix classes. Cambridge University Press, 2006. [4] H. Cevikalp and B. Triggs. Face recognition based on image sets. In CVPR, 2010. [5] Z. Cui, W. Li, D. Xu, S. Shan, and X. Chen. Fusing robust face region descriptors via multiple metric learning for face recognition in the wild. In CVPR, 2013. [6] Z. Cui, W. Li, D. Xu, S. Shan, X. Chen, and X. Li. Flowing on Riemannian manifold: Domain adaptation by shifting covariance. IEEE Transactions on Cybernetics, Accepted in March 2014. [7] Z. Cui, S. Shan, H. Zhang, S. Lao, and X. Chen. Image sets alignment for video-based face recognition. In CVPR, 2012. [8] B. Fernando, A. Habrard, M. Sebban, T. Tuytelaars, et al. Unsupervised visual domain adaptation using subspace alignment. ICCV, 2013. [9] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval research logistics quarterly, 3(1-2):95–110, 1956. [10] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, 2012. [11] R. Gopalan, R. Li, and R. Chellappa. Domain adaptation for object recognition: An unsupervised approach. In ICCV, 2011. [12] G. Griffin, A. Holub, and P. Perona. Caltech-256 object category dataset. Technical report, California Institute of Technology, 2007. [13] R. Gross, I. Matthews, J. Cohn, T. Kanade, and S. Baker. Multi-pie. Image and Vision Computing, 28(5):807–813, 2010. [14] A. Haghighi, P. Liang, T. Berg-Kirkpatrick, and D. Klein. Learning bilingual lexicons from monolingual corpora. In ACL, volume 2008, pages 771–779, 2008. [15] J. Ham, D. Lee, and L. Saul. Semisupervised alignment of manifolds. In UAI, 2005. [16] D. R. Hardoon, S. Szedmak, and J. Shawe-Taylor. Canonical correlation analysis: An overview with application to learning methods. Neural computation, 16(12):2639–2664, 2004. [17] Y. Hu, A. S. Mian, and R. Owens. Sparse approximated nearest points for image set classification. In CVPR, 2011. [18] T. Kim, J. Kittler, and R. Cipolla. Discriminative learning and recognition of image set classes using canonical correlations. T-PAMI, 2007. [19] S. Lafon, Y. Keller, and R. R. Coifman. Data fusion and multicue data matching by diffusion maps. T-PAMI, 28(11):1784–1797, 2006. [20] J. Munkres. Algorithms for the assignment and transportation problems. Journal of the Society for Industrial & Applied Mathematics, 5(1):32–38, 1957. [21] Y. Pei, F. Huang, F. Shi, and H. Zha. Unsupervised image matching based on manifold alignment. T-PAMI, 34(8):1658–1664, 2012. [22] N. Quadrianto, L. Song, and A. J. Smola. Kernelized sorting. In NIPS, 2009. [23] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290(5500):2323–2326, 2000. [24] K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In ECCV. 2010. [25] Y. Shi and F. sha. Information-theoretical learning of discriminative clusters for unsupervised domain adaptation. In ICML, 2012. [26] A. Shon, K. Grochow, A. Hertzmann, and R. P. Rao. Learning shared latent structure for image synthesis and robotic imitation. In NIPS, 2005. [27] C. A. Sugar and G. M. James. Finding the number of clusters in a dataset. Journal of the American Statistical Association, 98(463), 2003. [28] C. Wang and S. Mahadevan. Manifold alignment using procrustes analysis. In ICML, 2008. [29] C. Wang and S. Mahadevan. Manifold alignment without correspondence. In IJCAI, 2009. [30] C. Wang and S. Mahadevan. Heterogeneous domain adaptation using manifold alignment. In IJCAI, 2011. [31] R. Wang, S. Shan, X. Chen, and W. Gao. Manifold-manifold distance with application to face recognition based on image set. In CVPR, 2008. [32] L. Wolf, T. Hassner, and I. Maoz. Face recognition in unconstrained videos with matched background similarity. In CVPR, 2011. [33] L. Xiong, F. Wang, and C. Zhang. Semi-definite manifold alignment. In ECML. 2007. [34] O. Yamaguchi, K. Fukui, and K. Maeda. Face recognition using temporal image sequence. In FGR, 1998. 9
2014
293
5,395
Grouping-Based Low-Rank Trajectory Completion and 3D Reconstruction Katerina Fragkiadaki EECS, University of California, Berkeley, CA 94720 katef@berkeley.edu Marta Salas Universidad de Zaragoza, Zaragoza, Spain msalasg@unizar.es Pablo Arbel´aez Universidad de los Andes, Bogot´a, Colombia pa.arbelaez@uniandes.edu.co Jitendra Malik EECS, University of California, Berkeley, CA 94720 malik@eecs.berkeley.edu Abstract Extracting 3D shape of deforming objects in monocular videos, a task known as non-rigid structure-from-motion (NRSfM), has so far been studied only on synthetic datasets and controlled environments. Typically, the objects to reconstruct are pre-segmented, they exhibit limited rotations and occlusions, or full-length trajectories are assumed. In order to integrate NRSfM into current video analysis pipelines, one needs to consider as input realistic -thus incomplete- tracking, and perform spatio-temporal grouping to segment the objects from their surroundings. Furthermore, NRSfM needs to be robust to noise in both segmentation and tracking, e.g., drifting, segmentation “leaking”, optical flow “bleeding” etc. In this paper, we make a first attempt towards this goal, and propose a method that combines dense optical flow tracking, motion trajectory clustering and NRSfM for 3D reconstruction of objects in videos. For each trajectory cluster, we compute multiple reconstructions by minimizing the reprojection error and the rank of the 3D shape under different rank bounds of the trajectory matrix. We show that dense 3D shape is extracted and trajectories are completed across occlusions and low textured regions, even under mild relative motion between the object and the camera. We achieve competitive results on a public NRSfM benchmark while using fixed parameters across all sequences and handling incomplete trajectories, in contrast to existing approaches. We further test our approach on popular video segmentation datasets. To the best of our knowledge, our method is the first to extract dense object models from realistic videos, such as those found in Youtube or Hollywood movies, without object-specific priors. 1 Introduction Structure-from-motion is the ability to perceive the 3D shape of objects solely from motion cues. It is considered the earliest form of depth perception in primates, and is believed to be used by animals that lack stereopsis, such as insects and fish [1]. In computer vision, non-rigid structure-from-motion (NRSfM) is the extraction of a time-varying 3D point cloud from its 2D point trajectories. The problem is under-constrained since many 3D time-varying shapes and camera poses give rise to the same 2D image projections. To tackle this ambiguity, early work of Bregler et al. [2] assumes the per frame 3D shapes lie in a low dimensional subspace. They recover the 3D shape basis and coefficients, along with camera rotations, using a 3K factorization of the 2D trajectory matrix, where K the dimension of the shape subspace, 1 Video sequence Trajectory clustering 3D Shape Depth Missing entries NRSfM Figure 1: Overview. Given a monocular video, we cluster dense flow trajectories using 2D motion similarities. Each trajectory cluster results in an incomplete trajectory matrix that is the input to our NRSfM algorithm. Present and missing trajectory entries for the chosen frames are shown in green and red respectively. The color of the points in the rightmost column represents depth values (red is close, blue is far). Notice the completion of the occluded trajectories on the belly dancer, that reside beyond the image border. extending the rank 3 factorization method for rigid SfM of Tomasi and Kanade [3]. Akhter et al.[4] observe that the 3D point trajectories admit a similar low-rank decomposition: they can be written as linear combinations over a 3D trajectory basis. This essentially reflects that 3D (and 2D) point trajectories are temporally smooth. Temporal smoothness is directly imposed using differentials over the 3D shape matrix in Dai et al. [5]. Further, rather than recovering the shape or trajectory basis and coefficients, the authors propose a direct rank minimization of the 3D shape matrix, and show superior reconstruction results. Despite such progress, NRSfM has been so far demonstrated only on a limited number of synthetic or lab acquired video sequences. Factors that limit the application of current approaches to realworld scenarios include: (i) Missing trajectory data. The aforementioned state-of-the-art NRSfM algorithms assume complete trajectories. This is an unrealistic assumption under object rotations, deformations or occlusions. Work of Torresani et al. [6] relaxes the full-length trajectory assumption. They impose a Gaussian prior over the 3D shape and use probabilistic PCA within a linear dynamical system for extracting 3D deformation modes and camera poses; however, their method is sensitive to initialization and degrades with the amount of missing data. Gotardo and Martinez [7] combine the shape and trajectory low-rank decompositions and can handle missing data; their method is one of our baselines in Section 3. Park et al. [8] use static background structure to estimate camera poses and handle missing data using a linear formulation over a predefined trajectory basis. Simon at al. [9] consider a probabilistic formulation of the bilinear basis model of Akhter et al. [10] over the non-rigid 3D shape deformations. This results in a matrix normal distribution for the time varying 3D shape with a Kronecker structured covariance matrix over the column and row covariances that describe shape and temporal correlations respectively. Our work makes no assumptions regarding temporal smoothness, in contrast to [8, 7, 9]. (ii) Requirement of accurate video segmentation. The low-rank priors typically used in NRSfM require the object to be segmented from its surroundings. Work of [11] is the only approach that attempts to combine video segmentation and reconstruction, rather than considering pre-segmented objects. The authors projectively reconstruct small trajectory clusters assuming they capture rigidly moving object parts. Reconstruction results are shown in three videos only, making it hard to judge the success of this locally rigid model. This paper aims at closing the gap between theory and application in object-agnostic NRSfM from realistic monocular videos. We build upon recent advances in tracking, video segmentation and low-rank matrix completion to extract 3D shapes of objects in videos under rigid and non-rigid motion. We assume a scaled orthographic camera model, as standard in the literature [12, 13], and low-rank object-independent shape priors for the moving objects. Our goal is a richer representation of the video segments in terms of rotations and 3D deformations, and temporal completion of their trajectories through occlusion gaps or tracking failures. 2 An overview of our approach is presented in Figure 1. Given a video sequence, we compute dense point trajectories and cluster them using 2D motion similarities. For each trajectory cluster, we first complete the 2D trajectory matrix using standard low-rank matrix completion. We then recover the camera poses through a rank 3 truncation of the trajectory matrix and Euclidean upgrade. Last, keeping the camera poses fixed, we minimize the reprojection error of the observed trajectory entries along with the nuclear norm of the 3D shape. A byproduct of affine NRSfM is trajectory completion. The recovered 3D time-varying shape is backprojected in the image and the resulting 2D trajectories are completed through deformations, occlusions or other tracking ambiguities, such as lack of texture. In summary, our contributions are: (i) Joint study of motion segmentation and structure-from-motion. We use as input to reconstruction dense trajectories from optical flow linking [14], as opposed to a) sparse corner trajectories [15], used in previous NRSfM works [4, 5], or b) subspace trajectories of [16, 17], that are full-length but cannot tolerate object occlusions. Reconstruction needs to be robust to segmentation mistakes. Motion trajectory clusters are inevitably polluted with “bleeding” trajectories that, although reside on the background, they anchor on occluding contours. We use morphological operations to discard such trajectories that do not belong to the shape subspace and confuse reconstruction. (ii) Multiple hypothesis 3D reconstruction through trajectory matrix completion under various rank bounds, for tackling the rank ambiguity. (iii) We show that, under high trajectory density, rank 3 factorization of the trajectory matrix, as opposed to 3K, is sufficient to recover the camera rotations in NRSfM. This allows the use of an easy, well-studied Euclidean upgrade for the camera rotations, similar to the one proposed for rigid SfM [3]. We present competitive results of our method on the recently proposed NRSfM benchmark of [17], under a fixed set of parameters and while handling incomplete trajectories, in contrast to existing approaches. Further, we present extensive reconstruction results in videos from two popular video segmentation benchmarks, VSB100 [18] and Moseg [19], that contain videos from Hollywood movies and Youtube. To the best of our knowledge, we are the first to show dense non-rigid reconstructions of objects from real videos, without employing object-specific shape priors [10, 20]. Our code is available at: www.eecs.berkeley.edu/∼katef/nrsfm. 2 Low-rank 3D video reconstruction 2.1 Video segmentation by multiscale trajectory clustering Given a video sequence, we want to segment the moving objects in the scene. Brox and Malik [19] propose spectral clustering of dense point trajectories from 2D motion similarities and achieve state-of-the-art performance on video segmentation benchmarks. We extend their method to produce multiscale (rather than single scale) trajectory clustering to deal with segmentation ambiguities caused by scale and motion variations of the objects in the video scene. Specifically, we first compute a spectral embedding from the top eigenvectors of the normalized trajectory affinity matrix. We then obtain discrete trajectory clusterings using the discretization method of [21], while varying the number of eigenvectors to be 10, 20, 30 and 40 in each video sequence. Ideally, each point trajectory corresponds to a sequence of 2D projections of a 3D physical point. However, each trajectory cluster is spatially surrounded by a thin layer of trajectories that reside outside the true object mask and do not represent projections of 3D physical points. They are the result of optical flow “bleeding ” to untextured surroundings [22], and anchor themselves on occluding contours of the object. Although “bleeding” trajectories do not drift across objects, they are a source of noise for reconstruction since they do not belong to the subspace spanned by the true object trajectories. We discard them by computing an open operation (erosion followed by dilation) and an additional erosion of the trajectory cluster mask in each frame. 2.2 Non-rigid structure-from-motion Given a trajectory cluster that captures an object in space and time, let Xt k ∈R3×1 denote the 3D coordinate [X Y Z]T of the kth object point at the tth frame. We represent 3D object shape with a 3 matrix S that contains the time varying coordinates of K object surface points in F frames: S3F ×P =   S1 ... SF  =   X1 1 X1 2 · · · X1 P ... ... XF 1 XF 2 · · · XF P  . For the special case of rigid objects, shape coordinates are constant and the shape matrix takes the simplified form: S3×P = [X1 X2 · · · XP ] . We adopt a scaled orthographic camera model for reconstruction [3]. Under orthography, the projection rays are perpendicular to the image plane and the projection equation takes the form: x = RX + t, where x = [x y]T is the vector of 2D pixel coordinates, R2×3 is a scaled truncated rotation matrix and t2×1 is the camera translation. Combining the projection equations for all object points in all fames, we obtain:   x1 1 x1 2 · · · x1 P ... ... ... ... xF 1 xF 2 · · · xF P  = R · S +   t1 ... tF  · 1P T , (1) where the camera pose matrix R takes the form: Rrigid 2F ×3 =   R1 ... RF  , Rnonrigid 2F ×3F =   R1 0 · · · 0 ... ... · · · ... 0 0 · · · RF  . (2) We subtract the camera translation tt from the pixel coordinates xt, t = 1 · · · F, fixing the origin of the coordinate system on the objects’s center of mass in each frame, and obtain the centered trajectory matrix W2F ×P for which W = R · S. Let ˜ W denote an incomplete trajectory matrix of a cluster obtained from our multiscale trajectory clustering. Let H ∈{0, 1}2F ×P denote a binary matrix that indicates presence or absence of entries in ˜ W. Given ˜ W, H, we solve for complete trajectories W, shape S and camera pose R by minimizing the camera reprojection error and 3D shape rank under various rank bounds for the trajectory matrix. Rather than minimizing the matrix rank which is intractable, we minimize the matrix nuclear norm instead (denoted by ∥·∥∗), that yields the best convex approximation for the matrix rank over the unit ball of matrices. Let ⊙denote Hadamard product and ∥·∥F denote the Frobenius matrix norm. Our cost function reads: NRSfM(K): min . W,R,S ∥H ⊙(W −˜ W)∥2 F + ∥W −R · S∥2 F + 1K>1 · µ∥Sv∥∗ subject to Rank(W) ≤3K, ∃αt, s.t. Rt(Rt)T = αtI2×2, t = 1 · · · F. (3) We compute multiple reconstructions with K ∈{1 · · · 9}. Sv denotes the re-arranged shape matrix where each row contains the vectorized 3D shape in that frame: Sv F ×3P =   X1 1 Y 1 1 Z1 1 · · · X1 P Y 1 P Z1 P ... ... ... · · · ... ... ... XF 1 Y F 1 ZF 1 · · · XF P Y F P ZF P  = [PX PY PZ] (I3 ⊗S), (4) where PX, PY , PZ are appropriate row selection matrices. Dai et al. [5] observe that Sv F ×3P has lower rank than the original S3F ×P since it admits a K-rank decomposition, instead of 3K, assuming per frame 3D shapes span a K dimensional subspace. Though S facilitates the writing of the projection equations, minimizing the rank of the re-arranged matrix Sv avoids spurious degrees of freedom. Minimization of the nuclear norm of Sv is used only in the non-rigid case (K > 1). In the rigid case, the shape does not change in time and Sv 1×3P has rank 1 by construction. We approximately solve Eq. 3 in three steps. Low-rank trajectory matrix completion We want to complete the 2D trajectory matrix under a rank bound constraint: min . W ∥H ⊙(W −˜ W)∥2 F subject to Rank(W) ≤3K. (5) 4 Due to its intractability, the rank bound constraint is typically imposed by a factorization, W = UV T , U2F ×r,VP ×r, for our case r = 3K. Work of [23] empirically shows that the following regularized problem is less prone to local minima than its non-regularized counterpart (λ = 0): min . W,U2F ×3K,VP ×3K ∥H ⊙(W −˜ W)∥2 F + λ 2 (∥U∥2 F + ∥V∥2 F ) subject to W = UVT . (6) We solve Eq. 6 using the method of Augmented Lagrange multipliers. We want to explicitly search over different rank bounds for the trajectory matrix W as we vary K. We do not choose to minimize the nuclear norm instead, despite being convex, since different weights for the nuclear term result in matrices of different ranks, thus is harder to control explicitly the rank bound. Prior work [24, 23] shows that the bilinear formulation of Eq. 6, despite being non-convex in comparison to the nuclear regularized objective (∥H⊙(W−˜ W)∥2 F +∥W∥∗), it returns the same optimum in cases r >= r∗, where r∗denotes the rank obtained by the unconstrained minimization of the nuclear regularized objective. We use the continuation strategy proposed in [23] over r to avoid local minima for r < r∗: starting from large values of r, we iteratively reduce it till the desired rank bound 3K is achieved. For details, please see [23, 24]. Euclidean upgrade Given a complete trajectory matrix, minimization of the reprojection error term of Eq. 3 under the orthonormality constraints is equivalent to a SfM or NRSfM problem in its standard form, previously studied in the seminal works of [3, 2]: min . R,S ∥W −R · S∥2 F subject to ∃αt, s.t. Rt(Rt)T = αtI2×2, t = 1 · · · F. (7) For rigid objects, Tomasi and Kanade [3] recover the camera pose and shape matrix via SVD of W truncated to rank 3: W = UDVT = (UD1/2)(D1/2VT) = ˆR · ˆS. The factorization is not unique since for any invertible matrix G3×3: ˆR · ˆS = ˆR · GG−1ˆS. We estimate G so that ˆRG satisfies the orthonormality constraints: orthogonality: ˆR2t−1GGT ˆRT 2t = 0, t = 1 · · · F same norm: ˆR2t−1GGT ˆRT 2t−1 = ˆR2tGGT ˆRT 2t, t = 1 · · · F. (8) The constraints of Eq. 8 form an overdetermined homogeneous linear system with respect to the elements of the gram matrix Q = GGT . We estimate Q using least-squares and factorize it using SVD to obtain G up to an arbitrary scaling and rotation of its row space [25]. Then, the rigid object shape is obtained by S3×P = G−1ˆS. For non-rigid objects, a similar Euclidean upgrade of the rotation matrices has been attempted using a rank 3K (rather than 3) decomposition of W [26]. In the non-rigid case, the corrective transformation G has size 3K × 3K. Each column triplet 3K × 3 is recovered independently since it contains the rotation information from all frames. For a long time, an overlooked rank 3 constraint on the Gram matrix Qk = GT k Gk spurred conjectures regarding the ambiguity of shape recovery under non-rigid motion [26]. This lead researchers to introduce additional priors for further constraining the problem, such as temporal smoothness [27]. Finally, the work of [4] showed that orthonormality constraints are sufficient to recover a unique non-rigid 3D shape. Dai et al. [5] proposed a practical algorithm for Euclidean upgrade using rank 3K decomposition of W that minimizes the nuclear norm of Qk under the orthonormality constraints. Surprisingly, we have found that in practice it is not necessary to go beyond rank 3 truncation of W to obtain the rotation matrices in the case of dense NRSfM. The large majority of trajectories span the rigid component of the object, and their information suffices to compute the objects’ rotations. This is not the case for synthetic NRSfM datasets, where the number of tracked points on the articulating links is similar to the points spanning the “torso-like” component, as in the famous “Dance” sequence [12]. In Section 3, we show dense face reconstruction results while varying the truncating rank κr of W for the Euclidean upgrade step, and verify that κr = 3 is more stable than κr > 3 for NRSfM of faces. Rank regularized least-squares for 3D shape recovery In the non-rigid case, given the recovered camera poses R, we minimize the reprojection error of the observed trajectory entries and 3D shape 5 sequence 2 10 frames long abrupt deform./rot. sequence 3 99 frames long mild deform./rot. complete trajectories incomplete trajectories rotated frontal view ours ours: frontal view ours ours: frontal view groundtruth 3D shape missing entries Figure 2: Qualitative results in the synthetic benchmark of [17]. High quality reconstructions are obtained with oracle (full-length) trajectories for both abrupt and smooth motion. For incomplete trajectories, in the 3rd column we show in red the missing and in green the present trajectory entries. The reconstruction result for the 2nd video sequence that has 30% missing data, though worse, is still recognizable. nuclear norm: min . S 1 2∥H ⊙( ˜ W −R · S)∥2 F + µ∥Sv∥∗ subject to Sv = [PX PY PZ] (I3 ⊗S). (9) Notice that we consider only the observed entries in ˜ W to constrain the 3D shape estimation; however, information from the complete W has been used for extracting the rotation matrices R. We solve the convex, non-smooth problem in Eq. 9 using the nuclear minimization algorithm proposed in [28]. It generalizes the accelerated proximal gradient method of [29] from l1 regularized leastsquares on vectors to nuclear norm regularized least-squares on matrices. It has a better iteration complexity than the Fixed Point Continuation (FPC) method of [30] and the Singular Value Thresholding (SVT) method [31]. Given camera pose R and shape S, we backproject to obtain complete centered trajectory matrix W = R·S. Though we can in principle iterate over the extraction of camera pose and 3D shape, we observed benefits from such iteration only in the rigid case. This observation agrees with the results of Marques and Costeira [32] for rigid SfM from incomplete trajectories. 3 Experiments The only available dense NRSfM benchmark has been recently introduced in Garg et al. [17]. They propose a dense NRSfM method that minimizes a robust discontinuity term over the recovered 3D depth along with 3D shape rank. However, their method assumes as input full-length trajectories obtained via the subspace flow tracking method of [16]. Unfortunately, the tracker of [16] can tolerate only very mild out-of-plane rotations or occlusions, which is a serious limitation for tracking in real videos. Our method does not impose the full-length trajectory requirement. Also, we show that the robust discontinuity term in [17] may not be necessary for high quality reconstructions. The benchmark contains four synthetic video sequences that depict a deforming face, and three real sequences that depict a deforming back, face and heart, respectively. Only the synthetic sequences have ground-truth 3D shapes available, since it is considerably more difficult to obtain ground-truth for NRSfM in non-synthetic environments. Dense full-length ground-truth 2D trajectories are provided for all sequences. For evaluation, we use the code supplied with the benchmark, that performs a pre-alignment step at each frame between St and St GT using Procrustes analysis. Reconstruction performance is measured by mean RMS error across all frames, where the per frame RMS error of a shape St with respect to ground-truth shape St GT is defined as: ∥St−St GT ∥F ∥St GT ∥F . Figure 2 presents our qualitative results and Table 1 compares our performance against previous state-of-the-art NRSfM methods: Trajectory Basis (TB) [12], Metric Projections (MP) [33], Variational Reconstruction (VR) [17] and CSF [7]. For CSF, we were not able to complete the experiment for sequences 3 and 4 due to the non-scalable nature of the algorithm. Next to the error of each 6 Figure 3: Reconstruction results in the “Back”, “Face” and “Heart” sequences of [17]. We show present and missing trajectory entries, per frame depth maps and retextured depth maps. method we show in parentheses the rank used, that is, the rank that gave the best error. Our method uses exactly the same parameters and K = 9 for all four sequences. Baseline VR [17] adapts the weight for the nuclear norm of S for each sequence. This shows robustness of our method under varying object deformations. κr is the truncated rank of W used for the Euclidean upgrade step. When κr > 3, we use the Euclidean upgrade proposed in [5]. κr = 3 gives the most stable face reconstruction results. Next, to imitate a more realistic setup, we introduce missing entries to the ground-truth 2D tracks by “hiding” trajectory entries that are occluded due to face rotations. The occluded points are shown in red in Figure 2 3rd column. From the “incomplete trajectories” section of Table 1, we see that the error increase for our method is small in comparison to the full-length trajectory case. In the real “Back”, “Face” and “Heart” sequences of the benchmark, the objects are pre-segmented. We keep all trajectories that are at least five frames long. This results in 29.29%, 30.54% and 52.71% missing data in the corresponding trajectory matrices ˜ W. We used K = 8 for all sequences. We show qualitative results in Figure 3. The present and missing entries are shown in green and red, respectively. The missing points occupy either occluded regions, or regions with ambiguous correspondence, e.g., under specularities in the Heart sequence. Next, we test our method on reconstructing objects from videos of two popular video segmentation datasets: VSB100 [18], that contains videos uploaded to Youtube, and Moseg [19], that contains videos from Hollywood movies. Each video is between 19 and 121 frames long. For all videos we use K ∈{1 · · · 5}. We keep all trajectories longer than five frames. This results in missing data varying from 20% to 70% across videos, with an average of 45% missing trajectory entries. We visualize reconstructions for the best trajectory clusters (the ones closest to the ground-truth segmentations supplied with the datasets) in Figure 4. Discussion Our 3D reconstruction results in real videos show that, under high trajectory density, small object rotations suffice to create the depth perception. We also observe the tracking quality to be crucial for reconstruction. Optical flow deteriorates as the spatial resolution decreases, and thus high video resolution is currently important for our method. The most important failure cases for our ground-truth full trajectories incomplete trajectories TB [12] MP [33] VR [17] ours κr = 3 ours κr = 6 ours κr = 9 ours κr = 3 CSF Seq.1 (10) 18.38 (2) 19.44 (3) 4.01 (9) 5.16 6.69 21.02 4.92 (8.93% occl) 15.6 Seq.2 (10) 7.47 (2) 4.87 (3) 3.45 (9) 3.71 5.20 25.6 9.44 (31.60% occl) 36.8 Seq.3 (99) 4.50 (4) 5.13 (6) 2.60 (9) 2.81 2.88 3.00 3.40 (14.07% occl) —— Seq.4 (99) 6.61 (4) 5.81 (4) 2.81 (9) 3.19 3.08 3.54 5.53 ( 13.63% occl) —— Table 1: Reconstruction results on the NRSfM benchmark of [17]. We show mean RMS error per cent (%). Numbers for TB, MP and VR baselines are from [17]. In the first column, we show in parentheses the number of frames. κr is the rank of W used for the Euclidean upgrade. The last two columns shows the performance of our algorithm and CSF baseline when occluded points in the ground-truth tracks are hidden. 7 K = 2 K = 1 K = 3 K = 1 K = 2 K = 4 K = 3 K = 3 K = 1 K = 2 Figure 4: Reconstruction results on the VSB and Moseg video segmentation datasets. For each example we show a) the trajectory cluster, b) the present and missing entries, and c) the depths of the visible (as estimated from ray casting) points, where red and blue denote close and far respectively. method are highly articulated objects, which violates the low-rank assumptions. 3D reconstruction of articulated bodies is the focus of our current work. 4 Conclusion We have presented a practical method for extracting dense 3D object models from monocular uncalibrated video without object-specific priors. Our method considers as input trajectory motion clusters obtained from automatic video segmentation that contain large amounts of missing data due to object occlusions and rotations. We have applied our NRSfM method on synthetic dense reconstruction benchmarks and on numerous videos from Youtube and Hollywood movies. We have shown that a richer object representation is achievable from video under mild conditions of camera motion and object deformation: small object rotations are sufficient to recover 3D shape. “We see because we move, we move because we see”, said Gibson in his “Perception of the Visual World” [34]. We believe this paper has made a step towards encompassing 3D perception from motion into general video analysis. Acknowledgments The authors would like to thank Philipos Modrohai for useful discussions. M.S. acknowledges funding from Direcci´on General de Investigaci´on of Spain under project DPI2012-32168 and the Ministerio de Educaci´on (scholarship FPU-AP2010-2906). References [1] Andersen, R.A., Bradley, D.C.: Perception of three-dimensional structure from motion. Trends in cognitive sciences 2 (1998) 222–228 [2] Bregler, C., Hertzmann, A., Biermann, H.: Recovering non-rigid 3d shape from image streams. In: CVPR. (2000) [3] Tomasi, C., Kanade, T.: shape and motion from image streams: a factorization method. Technical report, IJCV (1991) [4] Akhter, I., Sheikh, Y., Khan, S., Kanade, T.: Trajectory space: A dual representation for nonrigid structure from motion. IEEE Transactions on Pattern Analysis and Machine Intelligence 33 (2011) 1442–1456 8 [5] Dai, Y.: A simple prior-free method for non-rigid structure-from-motion factorization. In: IJCV. (2012) [6] Torresani, L., Hertzmann, A., Bregler, C.: Nonrigid structure-from-motion: Estimating shape and motion with hierarchical priors. TPAMI 30 (2008) [7] Gotardo, P.F.U., Martinez, A.M.: Computing smooth time trajectories for camera and deformable shape in structure from motion with occlusion. TPAMI 33 (2011) [8] Park, H.S., Shiratori, T., Matthews, I., Sheikh, Y.: 3d reconstruction of a moving point from a series of 2d projections. ECCV (2010) [9] Simon, T., Valmadre, J., Matthews, I., Sheikh, Y.: Separable spatiotemporal priors for convex reconstruction of time-varying 3d point clouds. In: ECCV. (2014) [10] Akhter, I., Simon, T., Khan, S., Matthews, I., Sheikh, Y.: Bilinear spatiotemporal basis models. In: ACM Transaction on graphics, Accepted with minor revisions. (2011) [11] Russell, C., Yu, R., Agapito, L.: Video pop-up: Monocular 3d reconstruction of dynamic scenes. In: ECCV. (2014) [12] Akhter, I., Sheikh, Y., Khan, S., Kanade, T.: Trajectory space: A dual representation for nonrigid structure from motion. IEEE Trans. Pattern Anal. Mach. Intell. 33 (2011) [13] Torresani, L., Bregler, C.: Space-time tracking. In: ECCV. (2002) [14] Sundaram, N., Brox, T., Keutzer, K.: Dense point trajectories by GPU-accelerated large displacement optical flow. In: ECCV. (2010) [15] Lucas, B.D., Kanade, T.: An iterative image registration technique with an application to stereo vision (darpa). In: Proceedings of the 1981 DARPA Image Understanding Workshop. (1981) [16] Garg, R., Roussos, A., de Agapito, L.: A variational approach to video registration with subspace constraints. International Journal of Computer Vision 104 (2013) 286–314 [17] Garg, R., Roussos, A., Agapito, L.: Dense variational reconstruction of non-rigid surfaces from monocular video. (2013) [18] Galasso, F., Nagaraja, N.S., Cardenas, T.J., Brox, T., Schiele, B.: A unified video segmentation benchmark: Annotation, metrics and analysis. In: ICCV. (2013) [19] Brox, T., Malik, J.: Object segmentation by long term analysis of point trajectories. In: ECCV. (2010) [20] Bao, S.Y.Z., Chandraker, M., Lin, Y., Savarese, S.: Dense object reconstruction with semantic priors. In: CVPR. (2013) 1264–1271 [21] Yu, S., Shi, J.: Multiclass spectral clustering. In: ICCV. (2003) [22] Thompson, W.B.: Exploiting discontinuities in optical flow. International Journal of Computer Vision 30 (1998) 17–4 [23] Cabral, R., de la Torre, F., Costeira, J., Bernardino, A.: Unifying nuclear norm and bilinear factorization approaches for low-rank matrix decomposition. In: ICCV. (2013) [24] Burer, S., Monteiro, R.D.C.: Local minima and convergence in low-rank semidefinite programming. Math. Program. 103 (2005) 427–444 [25] Brand, M.: A Direct Method for 3D Factorization of Nonrigid Motion Observed in 2D. In: CVPR. (2005) [26] Xiao, J., Chai, J., Kanade, T.: A closed-form solution to nonrigid shape and motion recovery. Technical Report CMU-RI-TR-03-16, Robotics Institute, Pittsburgh, PA (2003) [27] Torresani, L., Yang, D.B., Alexander, E.J., Bregler, C.: Tracking and modeling non-rigid objects with rank constraints. In: CVPR. (2001) [28] Toh, K.C., Yun, S.: An accelerated proximal gradient algorithm for nuclear norm regularized linear least squares problems. Pacific Journal of Optimization (2010) [29] Beck, A., Teboulle, M.: A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences 2 (2009) 183–202 [30] Ma, S., Goldfarb, D., Chen, L.: Fixed point and bregman iterative methods for matrix rank minimization. Math. Program. 128 (2011) 321–353 [31] Cai, J.F., Cand`es, E.J., Shen, Z.: A singular value thresholding algorithm for matrix completion. SIAM J. on Optimization 20 (2010) 1956–1982 [32] Marques, M., Costeira, J.: Estimating 3d shape from degenerate sequences with missing data. Computer Vision and Image Understanding 113 (2009) 261 – 272 [33] Paladini, M., Del Bue, A., Stoˇsic, M., Dodig, M., Xavier, J., Agapito, L.: Optimal metric projections for deformable and articulated structure-from-motion. IJCV 96 (2012) [34] Gibson, J.J.: The perception of the visual world. The American Journal of Psychology, 64 (1951) 622–625 9
2014
294
5,396
A statistical model for tensor PCA Andrea Montanari Statistics & Electrical Engineering Stanford University Emile Richard Electrical Engineering Stanford University Abstract We consider the Principal Component Analysis problem for large tensors of arbitrary order k under a single-spike (or rank-one plus noise) model. On the one hand, we use information theory, and recent results in probability theory, to establish necessary and sufficient conditions under which the principal component can be estimated using unbounded computational resources. It turns out that this is possible as soon as the signal-to-noise ratio β becomes larger than C√k log k (and in particular β can remain bounded as the problem dimensions increase). On the other hand, we analyze several polynomial-time estimation algorithms, based on tensor unfolding, power iteration and message passing ideas from graphical models. We show that, unless the signal-to-noise ratio diverges in the system dimensions, none of these approaches succeeds. This is possibly related to a fundamental limitation of computationally tractable estimators for this problem. We discuss various initializations for tensor power iteration, and show that a tractable initialization based on the spectrum of the unfolded tensor outperforms significantly baseline methods, statistically and computationally. Finally, we consider the case in which additional side information is available about the unknown signal. We characterize the amount of side information that allows the iterative algorithms to converge to a good estimate. 1 Introduction Given a data matrix X, Principal Component Analysis (PCA) can be regarded as a ‘denoising’ technique that replaces X by its closest rank-one approximation. This optimization problem can be solved efficiently, and its statistical properties are well-understood. The generalization of PCA to tensors is motivated by problems in which it is important to exploit higher order moments, or data elements are naturally given more than two indices. Examples include topic modeling, video processing, collaborative filtering in presence of temporal/context information, community detection [1], spectral hypergraph theory. Further, finding a rank-one approximation to a tensor is a bottleneck for tensor-valued optimization algorithms using conditional gradient type of schemes. While tensor factorization is NP-hard [11], this does not necessarily imply intractability for natural statistical models. Over the last ten years, it was repeatedly observed that either convex optimization or greedy methods yield optimal solutions to statistical problems that are intractable from a worst case perspective (well-known examples include sparse regression and low-rank matrix completion). In order to investigate the fundamental tradeoffs between computational resources and statistical power in tensor PCA, we consider the simplest possible model where this arises, whereby an unknown unit vector v0 is to be inferred from noisy multilinear measurements. Namely, for each unordered k-uple {i1, i2, . . . , ik} ⊆[n], we measure Xi1,i2,...,ik = β(v0)i1(v0)i2 · · · (v0)ik + Zi1,i2,...,ik , (1) with Z Gaussian noise (see below for a precise definition) and wish to reconstruct v0. In tensor notation, the observation model reads (see the end of this section for notations) X = β v0 ⊗k + Z . Spiked Tensor Model 1 This is analogous to the so called ‘spiked covariance model’ used to study matrix PCA in high dimensions [12]. It is immediate to see that maximum-likelihood estimator vML is given by a solution of the following problem maximize ⟨X, v⊗k⟩, Tensor PCA subject to ∥v∥2 = 1 . Solving it exactly is –in general– NP hard [11]. We next summarize our results. Note that, given a completely observed rank-one symmetric tensor v0⊗k (i.e. for β = ∞), it is easy to recover the vector v0 ∈Rn. It is therefore natural to ask the question for which signal-to-noise ratios can one still reliably estimate v0? The answer appears to depend dramatically on the computational resources1. Ideal estimation. Assuming unbounded computational resources, we can solve the Tensor PCA optimization problem and hence implement the maximum likelihood estimator bvML. We use recent results in probability theory to show that this approach is successful for β ≥µk = √k log k(1 + ok(1)). In particular, above this threshold2 we have, with high probability, ∥bvML −v0∥2 2 ≲2.01 µk β . (2) We use an information-theoretic argument to show that no approach can do significantly better, namely no procedure can estimate v0 accurately for β ≤c √ k (for c a universal constant). Tractable estimators: Unfolding. We consider two approaches to estimate v0 that can be implemented in polynomial time. The first approach is based on tensor unfolding: starting from the tensor X ∈Nk Rn, we produce a matrix Mat(X) of dimensions nq × nk−q. We then perform matrix PCA on Mat(X). We show that this method is successful for β ≳n(⌈k/2⌉−1)/2. A heuristics argument suggests that the necessary and sufficient condition for tensor unfolding to succeed is indeed β ≳n(k−2)/4 (which is below the rigorous bound by a factor n1/4 for k odd). We can indeed confirm this conjecture for k even and under an asymmetric noise model. Tractable estimators: Warm-start power iteration and Approximate Message Passing. We prove that, initializing power iteration uniformly at random, it converges very rapidly to an accurate estimate provided β ≳n(k−1)/2. A heuristic argument suggests that the correct necessary and sufficient threshold is given by β ≳n(k−2)/2. Motivated by the last observation, we consider a ‘warm-start’ power iteration algorithm, in which we initialize power iteration with the output of tensor unfolding. This approach appears to have the same threshold signal-to-noise ratio as simple unfolding, but significantly better accuracy above that threshold. We extend power iteration to an approximate message passing (AMP) algorithm [7, 4]. We show that the behavior of AMP is qualitatively similar to the one of naive power iteration. In particular, AMP fails for any β bounded as n →∞. Side information. Given the above computational complexity barrier, it is natural to study weaker version of the original problem. Here we assume that extra information about v0 is available. This can be provided by additional measurements or by approximately solving a related problem, for instance a matrix PCA problem as in [1]. We model this additional information as y = γv0 + g (with g an independent Gaussian noise vector), and incorporate it in the initial condition of AMP algorithm. We characterize exactly the threshold value γ∗= γ∗(β) above which AMP converges to an accurate estimator. The thresholds for various classes of algorithms are summarized below. 1Here we write F(n) ≲G(n) if there exists a constant c independent of n (but possibly dependent on n, such that F(n) ≤c G(n) 2Note that, for k even, v0 can only be recovered modulo sign. For the sake of simplicity, we assume here that this ambiguity is correctly resolved. 2 Method Required β (rigorous) Required β (heuristic) Tensor Unfolding O(n(⌈k/2⌉−1)/2) n(k−2)/4 Tensor Power Iteration (with random init.) O(n(k−1)/2) n(k−2)/2 Maximum Likelihood 1 – Information-theory lower bound 1 – We will conclude the paper with some insights that we believe provide useful guidance for tensor factorization heuristics. We illustrate these insights through simulations. 1.1 Notations Given X ∈Nk Rn a real k-th order tensor, we let {Xi1,...,ik}i1,...,ik denote its coordinates and define a map X : Rn →Rn, by letting, for v ∈Rn, X{v}i = X j1,··· ,jk−1∈[n] Xi,j1,··· ,jk−1 vj1 · · · vjk−1 . (3) The outer product of two tensors is X⊗Y, and, for v ∈Rn, we define v⊗k = v⊗· · ·⊗v ∈Nk Rn as the k-th outer power of v. We define the inner product of two tensors X, Y ∈Nk Rn as ⟨X, Y⟩= X i1,··· ,ik∈[n] Xi1,··· ,ikYi1,··· ,ik . (4) We define the Frobenius (Euclidean) norm of a tensor X, by ∥X∥F = p ⟨X, X⟩, and its operator norm by ∥X∥op ≡max{⟨X, u1 ⊗· · · ⊗uk⟩: ∀i ∈[k] , ∥ui∥2 ≤1}. (5) For the special case k = 2, it reduces to the ordinary ℓ2 matrix operator norm. For π ∈Sk, we will denote by Xπ the tensor with permuted indices Xπ i1,··· ,ik = Xπ(i1),··· ,π(ik). We call the tensor X symmetric if, for any permutation π ∈Sk, Xπ = X. It is proved [23] that, for symmetric tensors, the value of problem Tensor PCA coincides with ∥X∥op up to a sign. More precisely, for symmetric tensors we have the equivalent representation max{|⟨X, u⊗k⟩| : ∥u∥2 ≤1}. We denote by G ∈Nk Rn a tensor with independent and identically distributed entries Gi1,··· ,ik ∼N(0, 1) (note that this tensor is not symmetric). We define the symmetric standard normal noise tensor Z ∈Nk Rn by Z = 1 k! r k n X π∈Sk Gπ . (6) We use the loss function Loss(bv, v0) ≡min  ∥bv −v0∥2 2, ∥bv + v0∥2 2  = 2 −2|⟨bv, v0⟩| . (7) 2 Ideal estimation In this section we consider the problem of estimating v0 under the observation model Spiked Tensor Model, when no constraint is imposed on the complexity of the estimator. Our first result is a lower bound on the loss of any estimator. Theorem 1. For any estimator bv = bv(X) of v0 from data X, such that ∥bv(X)∥2 = 1 (i.e. bv : ⊗kRn →Sn−1), we have, for all n ≥4, β ≤ r k 10 ⇒ E Loss(bv, v0) ≥1 32 . (8) In order to establish a matching upper bound on the loss, we consider the maximum likelihood estimator bvML, obtained by solving the Tensor PCA problem. As in the case of matrix denoising, we expect the properties of this estimator to depend on signal to noise ratio β, and on the ‘norm’ of the noise ∥Z∥op (i.e. on the value of the optimization problem Tensor PCA in the case β = 0). For the 3 matrix case k = 2, this coincides with the largest eigenvalue of Z. Classical random matrix theory shows that –in this case– ∥Z∥op concentrates tightly around 2 [10, 6, 3]. It turns out that tight results for k ≥3 follow immediately from a technically sophisticated analysis of the stationary points of random Morse functions by Auffinger, Ben Arous and Cerny [2]. Lemma 2.1. There exists a sequence of real numbers {µk}k≥2, such that lim sup n→∞∥Z∥op ≤µk (k odd), (9) lim n→∞∥Z∥op = µk (k even). (10) Further ∥Z∥op concentrates tightly around its expectation. Namely, for any n, k P ∥Z∥op −E∥Z∥op ≥s  ≤2 e−ns2/(2k) . (11) Finally µk = √k log k(1 + ok(1)) for large k. For instance, a large order-3 Gaussian tensor should have ∥Z∥op ≈2.87, while a large order 10 tensor has ∥Z∥op ≈6.75. As a simple consequence of Lemma 2.1, we establish an upper bound on the error incurred by the maximum likelihood estimator. Theorem 2. Let µk be the sequence of real numbers introduced above. Letting bvML denote the maximum likelihood estimator (i.e. the solution of Tensor PCA), we have for n large enough, and all s > 0 β ≥µk ⇒Loss(bvML, v0) ≤2 β (µk + s) , (12) with probability at least 1 −2e−ns2/(16k). The following upper bound on the value of the Tensor PCA problem is proved using SudakovFernique inequality. While it is looser than Lemma 2.1 (corresponding to the case β = 0), we expect it to become sharp for β ≥βk a suitably large constant. Lemma 2.2. Under Spiked Tensor Model model, we have lim sup n→∞E∥Z∥op ≤max τ≥0 n β  τ √ 1 + τ 2 k + k √ 1 + τ 2 o . (13) Further, for any s ≥0, P ∥Z∥op −E∥Z∥op ≥s  ≤2 e−ns2/(2k) . (14) 3 Tensor Unfolding A simple and popular heuristics to obtain tractable estimators of v0 consists in constructing a suitable matrix with the entries of X, and performing PCA on this matrix. 3.1 Symmetric noise For an integer k ≥q ≥k/2, we introduce the unfolding (also referred to as matricization or reshape) operator Matq : ⊗kRn →Rnq×nk−q as follows. For any indices i1, i2, · · · , ik ∈[n], we let a = 1 + Pq j=1(ij −1)nj−1 and b = 1 + Pk j=q+1(ij −1)nj−q−1, and define [Matq(X)]a,b = Xi1,i2,··· ,ik . (15) Standard convex relaxations of low-rank tensor estimation problem compute factorizations of Matq(X)[22, 15, 17, 19]. Not all unfoldings (choices of q) are equivalent. It is natural to expect that this approach will be successful only if the signal-to-noise ratio exceeds the operator norm of the unfolded noise ∥Matq(Z)∥op. The next lemma suggests that the latter is minimal when Matq(Z) is ‘as square as possible’ . A similar phenomenon was observed in a different context in [17]. 4 Lemma 3.1. For any integer k/2 ≤q ≤k we have, for some universal constant Ck, 1 p (k −1)! n(q−1)/2  1 − Ck nmax(q,k−q))  ≤E∥Matq(Z)∥op ≤ √ k  n(q−1)/2 + n(k−q−1)/2 . (16) For all n large enough, both bounds are minimized for q = ⌈k/2⌉. Further P n ∥Matq(Z)∥op −E∥Matq(Z)∥op ≥t o ≤2 e−nt2/(2k) . (17) The last lemma suggests the choice q = ⌈k/2⌉, which we shall adopt in the following, unless stated otherwise. We will drop the subscript from Mat. Let us recall the following standard result derived directly from Wedin perturbation Theorem [24], and stated in the context of the spiked model. Theorem 3 (Wedin perturbation). Let M = βu0w0T + Ξ ∈Rm×p be a matrix with ∥u0∥2 = ∥w0∥2 = 1. Let bw denote the right singular vector of M. If β > 2∥Ξ∥op, then Loss(bw, w0) ≤8∥Ξ∥2 op β2 . (18) Theorem 4. Letting w = w(X) denote the top right singular vector of Mat(X), we have the following, for some universal constant C = Ck > 0, and b ≡(1/2)(⌈k/2⌉−1). If β ≥5 k1/2 nb then, with probability at least 1 −n−2, we have Loss  w, vec v0 ⊗⌊k/2⌋ ≤C kn2b β2 . (19) 3.2 Asymmetric noise and recursive unfolding A technical complication in analyzing the random matrix Matq(X) lies in the fact that its entries are not independent, because the noise tensor Z is assumed to be symmetric. In the next theorem we consider the case of non-symmetric noise and even k. This allows us to leverage upon known results in random matrix theory [18, 8, 5] to obtain: (i) Asymptotically sharp estimates on the critical signal-to-noise ratio; (ii) A lower bound on the loss below the critical signal-to-noise ratio. Namely, we consider observations eX = βv0 ⊗k + 1 √nG . (20) where G ∈⊗kRn is a standard Gaussian tensor (i.e. a tensor with i.i.d. standard normal entries). Let w = w( eX) ∈Rnk/2 denote the top right singular vector of Mat(X). For k ≥4 even, and define b ≡(k −2)/4, as above. By [18, Theorem 4], or [5, Theorem 2.3], we have the following almost sure limits β ≤(1 −ε)nb ⇒ lim n→∞⟨w( eX), vec(v0 ⊗(k/2))⟩= 0 , (21) β ≥(1 + ε)nb ⇒ lim inf n→∞ ⟨w( eX), vec(v0 ⊗(k/2))⟩ ≥ r ε 1 + ε . (22) In other words w( eX) is a good estimate of v0⊗(k/2) if and only if β is larger than nb. We can use w( eX) ∈R2b+1 to estimate v0 as follows. Construct the unfolding Mat1(w) ∈Rn×n2b (slight abuse of notation) of w by letting, for i ∈[n], and j ∈[n2b], Mat1(w)i,j = wi+(j−1)n , (23) we then let bv to be the left principal vector of Mat1(X). We refer to this algorithm as to recursive unfolding. 5 Theorem 5. Let eX be distributed according to the non-symmetric model (20) with k ≥4 even, define b ≡(k −2)/4. and let bv be the estimate obtained by two-steps recursive matricization. If β ≥(1 + ε)nb then, almost surely lim n→∞Loss(bv, v0) = 0 . (24) We conjecture that the weaker condition β ≳n(k−2)/4 is indeed sufficient also for our original symmetric noise model, both for k even and for k odd. 4 Power Iteration Iterating over (multi-) linear maps induced by a (tensor) matrix is a standard method for finding leading eigenpairs, see [14] and references therein for tensor-related results. In this section we will consider a simple power iteration, and then its possible uses in conjunction with tensor unfolding. Finally, we will compare our analysis with results available in the literature. 4.1 Naive power iteration The simplest iterative approach is defined by the following recursion v0 = y ∥y∥2 , and vt+1 = X{vt} ∥X{vt}∥2 . Power Iteration The following result establishes convergence criteria for this iteration, first for generic noise Z and then for standard normal noise (using Lemma 2.1). Theorem 6. Assume β ≥2 e(k −1) ∥Z∥op , (25) ⟨y, v0⟩ ∥y∥2 ≥ (k −1)∥Z∥op β 1/(k−1) . (26) Then for all t ≥t0(k), the power iteration estimator satisfies Loss(vt, v0) ≤2e∥Z∥op/β. If Z is a standard normal noise tensor, then conditions (25), (26) are satisfied with high probability provided β ≥2ek µk = 6 p k3 log k 1 + ok(1)  , (27) ⟨y, v0⟩ ∥y∥2 ≥ kµk β 1/(k−1) = β−1/(k−1) 1 + ok(1)  . (28) In Section 6 we discuss two aspects of this result: (i) The requirement of a positive correlation between initialization and ground truth ; (ii) Possible scenarios under which the assumptions of Theorem 6 are satisfied. 5 Asymptotics via Approximate Message Passing Approximate message passing (AMP) algorithms [7, 4] proved successful in several highdimensional estimation problems including compressed sensing, low rank matrix reconstruction, and phase retrieval [9, 13, 20, 21]. An appealing feature of this class of algorithms is that their highdimensional limit can be characterized exactly through a technique known as ‘state evolution.’ Here we develop an AMP algorithm for tensor data, and its state evolution analysis focusing on the fixed β, n →∞limit. Proofs follows the approach of [4] and will be presented in a journal publication. In a nutshell, our AMP for Tensor PCA can be viewed as a sophisticated version of the power iteration method of the last section. With the notation f(x) = x/∥x∥2, we define the AMP iteration over vectors vt ∈Rn by v0 = y, f(v−1) = 0, and ( vt+1 = X{f(vt)} −bt f(vt−1) , bt = (k −1) ⟨f(vt), f(vt−1)⟩ k−2 . AMP Our main conclusion is that the behavior of AMP is qualitatively similar to the one of power iteration. However, we can establish stronger results in two respects: 6 1. We can prove that, unless side information is provided about the signal v0, the AMP estimates remain essentially orthogonal to v0, for any fixed number of iterations. This corresponds to a converse to Theorem 6. 2. Since state evolution is asymptotically exact, we can prove sharp phase transition results with explicit characterization of their locations. We assume that the additional information takes the form of a noisy observation y = γ v0 + z, where z ∼N(0, In/n). Our next results summarize the state evolution analysis. Proposition 5.1. Let k ≥2 be a fixed integer. Let {v0(n)}n≥1 be a sequence of unit norm vectors v0(n) ∈Sn−1. Let also {X(n)}n≥1 denote a sequence of tensors X(n) ∈⊗kRn generated following Spiked Tensor Model. Finally, let vt denote the t-th iterate produced by AMP, and consider its orthogonal decomposition vt = vt ∥+ vt ⊥, (29) where vt ∥is proportional to v0, and vt ⊥is perpendicular. Then vt ⊥is uniformly random, conditional on its norm. Further, almost surely lim n→∞⟨vt, v0⟩= lim n→∞⟨vt ∥, v0⟩= τt , (30) lim n→∞∥vt ⊥∥2 = 1 , (31) where τt is given recursively by letting τ0 = γ and, for t ≥0 (we refer to this as to state evolution): τ 2 t+1 = β2  τ 2 t 1 + τ 2 t k−1 . (32) The following result characterizes the minimum required additional information γ to allow AMP to escape from those undesired local optima. We will say that {vt}t converges almost surely to a desired local optimum if, lim t→∞lim n→∞Loss(vt/∥vt∥2, v0) ≤4 β2 . Theorem 7. Consider the Tensor PCA problem with k ≥3 and β > ωk ≡ q (k −1)k−1/(k −2)k−2 ∼ √ ek . Then AMP converges almost surely to a desired local optimum if and only if γ > p 1/ϵk(β) −1 where ϵk(β) is the largest solution of (1 −ϵ)(k−2)ϵ = β−2, In the special case k = 3, and β > 2, assuming γ > β(1/2 − p 1/4 −1/β2), AMP tends to a desired local optimum. Numerically β > 2.69 is enough for AMP to achieve ⟨v0, bv⟩≥0.9 if γ > 0.45. As a final remark, we note that the methods of [16] can be used to show that, under the assumptions of Theorem 7, for β > βk a sufficiently large constant, AMP asymptotically solves the optimization problem Tensor PCA. Formally, we have, almost surely, lim t→∞lim n→∞ ⟨X, vt⊗k⟩−∥X∥op = 0. (33) 6 Numerical experiments 6.1 Comparison of different algorithms Our empirical results are reported in the appendix. The main findings are consistent with the theory developed above: • Tensor power iteration (with random initialization) performs poorly with respect to other approaches that use some form of tensor unfolding. The gap widens as the dimension n increases. 7 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 | <v0 , v> | n = 50 λ 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 | <v0 , v> | n = 200 λ 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 | <v0 , v> | n −> ∞ (theory) λ 0 0.5 1 1.5 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 | <v0 , v> | n = 500 λ Pow. It. (init. y) Pow. It. (random init.) y = Matrix PCA Pow. It. (unfold. init.) Figure 1: Simultaneous PCA at β = 3. Absolute correlation of the estimated principal component with the truth |⟨bv, v0⟩|, simultaneous PCA (black) compared with matrix (green) and tensor PCA (blue). • All algorithms based on initial unfolding (comprising PSD-constrained PCA and recursive unfolding) have essentially the same threshold. Above that threshold, those that process the singular vector (either by recursive unfolding or by tensor power iteration) have superior performances over simpler one-step algorithms. Our heuristic arguments suggest that tensor power iteration with random initialization will work for β ≳n1/2, while unfolding only requires β ≳n1/4 (our theorems guarantee this for, respectively, β ≳n and β ≳n1/2). We plot the average correlation |⟨bv, v0⟩| versus (respectively) β/n1/2 and β/n1/4. The curve superposition confirms that our prediction captures the correct behavior already for n of the order of 50. 6.2 The value of side information Our next experiment concerns a simultaneous matrix and tensor PCA task: we are given a tensor X ∈⊗3Rn of Spiked Tensor Model with k = 3 and the signal to noise ratio β = 3 is fixed. In addition, we observe M = λv0v0T + N where N ∈Rn×n is a symmetric noise matrix with upper diagonal elements i < j iid Ni,j ∼N(0, 1/n) and the value of λ ∈[0, 2] varies. This experiment mimics a rank-1 version of topic modeling method presented in [1] where M is a matrix representing pairwise co-occurences and X triples. The analysis in previous sections suggests to use the leading eigenvector of M as the initial point of AMP algorithm for tensor PCA on X. We performed the experiments on 100 randomly generated instances with n = 50, 200, 500 and report in Figure 1 the mean values of |⟨v0, bv(X)⟩| with confidence intervals. Random matrix theory predicts limn→∞⟨bv1(M), v0⟩= √ 1 −λ−2 [8]. Thus we can set γ = √ 1 −λ−2 and apply the theory of the previous section. In particular, Proposition 5.1 implies lim n→∞⟨bv(X), v0⟩= β  1/2 + p 1/4 −1/β2  if γ > β  1/2 − p 1/4 −1/β2  and limn→∞⟨bv(X), v0⟩= 0 otherwise Simultaneous PCA appears vastly superior to simple PCA. Our theory captures this difference quantitatively already for n = 500. Acknowledgements This work was partially supported by the NSF grant CCF-1319979 and the grants AFOSR/DARPA FA9550-12-1-0411 and FA9550-13-1-0036. References [1] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. arXiv:1210.7559, 2012. 8 [2] A. Auffinger, G. Ben Arous, and J. Cerny. Random matrices and complexity of spin glasses. Communications on Pure and Applied Mathematics, 66(2):165–201, 2013. [3] Z. Bai and J. Silverstein. Spectral Analysis of Large Dimensional Random Matrices (2nd edition). Springer, 2010. [4] M. Bayati and A. Montanari. The dynamics of message passing on dense graphs, with applications to compressed sensing. IEEE Trans. on Inform. Theory, 57:764–785, 2011. [5] Florent Benaych-Georges and Raj Rao Nadakuditi. The singular values and vectors of low rank perturbations of large rectangular random matrices. Journal of Multivariate Analysis, 111:120–135, 2012. [6] K. R. Davidson and S. J. Szarek. Local operator theory, random matrices and Banach spaces. In Handbook on the Geometry of Banach spaces, volume 1, pages 317–366. Elsevier Science, 2001. [7] D. L. Donoho, A. Maleki, and A. Montanari. Message Passing Algorithms for Compressed Sensing. Proceedings of the National Academy of Sciences, 106:18914–18919, 2009. [8] D. F´eral and S. P´ech´e. The largest eigenvalues of sample covariance matrices for a spiked population: diagonal case. Journal of Mathematical Physics, 50:073302, 2009. [9] A. K. Fletcher, S. Rangan, L. R. Varshney, and A. Bhargava. Neural reconstruction with approximate message passing (neuramp). In Neural Information Processing Systems (NIPS), pages 2555–2563, 2011. [10] S. Geman. A limit theorem for the norm of random matrices. Annals of Probability, 8:252–261, 1980. [11] C. Hillar and L. H. Lim. Most tensor problems are np-hard. Journal of the ACM, 6, 2009. [12] I. M Johnstone and A. Y. Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486), 2009. [13] U. Kamilov, S. Rangan, A. K. Fletcher, and M. Unser. Approximate message passing with consistent parameter estimation and applications to sparse learning. In Neural Information Processing Systems (NIPS), pages 2447–2455, 2012. [14] T. Kolda and J. Mayo. Shifted power method for computing tensor eigenpairs. SIAM Journal on Matrix Analysis and Applications, 32(4):1095–1124, 2011. [15] J. Liu, P. Musialski, P. Wonka, and J. Ye. Tensor completion for estimating missing values in visual data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(1):208–220, 2013. [16] A. Montanari and E. Richard. Non-negative principal component analysis: Message passing algorithms and sharp asymptotics. arXiv:1406.4775, 2014. [17] C. Mu, J. Huang, B. Wright, and D. Goldfarb. Square deal: Lower bounds and improved relaxations for tensor recovery. In International Conference in Machine Learning (ICML), 2013. [18] D. Paul. Asymptotics of sample eigenstructure for a large dimensional spiked covariance model. Statistica Sinica, 17(4):1617, 2007. [19] B. Romera-Paredes and M. Pontil. A new convex relaxation for tensor completion. In Neural Information Processing Systems (NIPS), 2013. [20] P. Schniter and V. Cevher. Approximate message passing for bilinear models. In Proc. Workshop Signal Process. Adaptive Sparse Struct. Repr.(SPARS), page 68, 2011. [21] P. Schniter and S. Rangan. Compressive phase retrieval via generalized approximate message passing. In Communication, Control, and Computing (Allerton), 2012 50th Annual Allerton Conference on, pages 815–822. IEEE, 2012. [22] R. Tomioka, T. Suzuki, K. Hayashi, and H. Kashima. Statistical performance of convex tensor decomposition. In Neural Information Processing Systems (NIPS), 2011. [23] W. C. Waterhouse. The absolute-value estimate for symmetric multilinear forms. Linear Algebra and its Applications, 128:97–105, 1990. [24] P. A. Wedin. Perturbation bounds in connection with singular value decomposition. BIT Numerical Mathematics, 12(1):99–111, 1972. 9
2014
295
5,397
Making Pairwise Binary Graphical Models Attractive Nicholas Ruozzi Institute for Data Sciences and Engineering Columbia University New York, NY 10027 nr2493@columbia.edu Tony Jebara Department of Computer Science Columbia University New York, NY 10027 jebara@cs.columbia.edu Abstract Computing the partition function (i.e., the normalizing constant) of a given pairwise binary graphical model is NP-hard in general. As a result, the partition function is typically estimated by approximate inference algorithms such as belief propagation (BP) and tree-reweighted belief propagation (TRBP). The former provides reasonable estimates in practice but has convergence issues. The later has better convergence properties but typically provides poorer estimates. In this work, we propose a novel scheme that has better convergence properties than BP and provably provides better partition function estimates in many instances than TRBP. In particular, given an arbitrary pairwise binary graphical model, we construct a specific “attractive” 2-cover. We explore the properties of this special cover and show that it can be used to construct an algorithm with the desired properties. 1 Introduction Graphical models provide a mechanism for expressing the relationships among a collection of variables. Many applications in computer vision, coding theory, and machine learning can be reduced to performing statistical inference, either computing the partition function or the most likely configuration, of specific graphical models. In general models, both of these problems are NP-hard. As a result, much effort has been invested in designing algorithms that can approximate, or in some special cases exactly solve, these inference problems. The belief propagation algorithm (BP) is an efficient message-passing algorithm that is often used to approximate the partition function of a given graphical model. However, BP does not always converge, and so-called convergent message-passing algorithms such as tree reweighted belief propagation (TRBP) have been proposed as alternatives to BP. Such convergent message passing algorithms can be viewed as dual coordinate-descent schemes on a particular convex upper bound on the partition function [1]. While TRBP-style message-passing algorithms guarantee convergence under suitable message-passing schedules, finding the optimal message-passing schedule can be cumbersome or impractical depending on the application, and TRBP often performs worse than BP in terms of estimating the partition function. The primary goal of this work is to study alternatives to BP and TRBP that have better convergence properties than BP and approximate the partition function better than TRBP. To that end, the socalled “attractive” graphical models (i.e., those models that do not contain frustrated cycles) stand out as a special case. Attractive graphical models have desirable computational properties: Weller and Jebara [2, 3] describe a polynomial time approximation scheme to minimize the Bethe free energy of attractive models (note that BP only guarantees convergence to a local optimum). In addition, BP has much better convergence properties on attractive models than on general pairwise binary models [4, 5]. 1 In this work, we show how to approximate the inference problem over a general pairwise binary graphical model as an inference problem over an attractive graphical model. Similar in spirit to the work of Bayati et al. [6] and Ruozzi and Tatikonda [7], we will use graph covers in order to better understand the behavior of the Bethe approximation with respect to the partition function. In particular, we will show that if a graphical model is strictly positive and contains even one frustrated cycle, then there exists a choice of external field and a 2-cover without frustrated cycles whose partition function provides a strict upper bound on the partition function of the original model. We then show that the computation of the Bethe partition function can approximated, or in some cases found exactly, by computing the Bethe partition function over this special cover. The required computations are easier on this “attractive” graph cover as computing the MAP assignment can be done in polynomial time and there exists a polynomial time approximation scheme for computing the Bethe partition function. We illustrate the theory through a series of experiments on small models, grid graphs, and vertex induced subgraphs of the Epinions social network1, . All of these models have frustrated cycles which make the computation of their partition functions, marginals, and most-likely configurations exceedingly difficult. In these experiments, the proposed scheme converges significantly more frequently than BP and provides a better estimate of the partition function than TRBP. 2 Prerequisites We begin by reviewing pairwise binary graphical models, graph covers, the Bethe and TRBP approximations, and recent work on lower bounds. 2.1 Pairwise Binary Graphical Models Let f : {0, 1}n →R≥0 be a non-negative function. A function f factors with respect to a graph G = (V, E), if there exist potential functions φi : {0, 1} →R≥0 for each i ∈V and ψij : {0, 1}2 → R≥0 for each (i, j) ∈E such that f(x1, . . . , xn) = Y i∈V φi(xi) Y (i,j)∈E ψij(xi, xj). The graph G together with the collection of potential functions φ and ψ define a graphical model that we will denote as (G; φ, ψ). For clarity, we will often denote the corresponding function as f (G;φ,ψ)(x). For a given graphical model (G; φ, ψ), we are interested in computing the partition function Z(G; φ, ψ) ≜P x∈{0,1}|V | Q i∈V φi(xi) Q (i,j)∈E ψij(xi, xj). We will also be interested in computing the maximum value of f, sometimes referred to as the MAP problem. The problem of computing the MAP solution can be converted into the problem of computing the partition function by adding a temperature parameter, T, and taking the limit as T →0. max x f (G;φ,ψ)(x) = lim T →0 Z(G; φ1/T , ψ1/T )T Here, φ1/T is the collection of potentials generated by taking each potential φi(xi) and raising it to the 1/T power for all i ∈V, xi ∈{0, 1}. 2.2 Graph Covers Graph covers have played an important role in our understanding of statistical inference in graphical models [8, 9]. Roughly speaking, if a graph H covers a graph G, then H looks locally the same as G. Definition 2.1. A graph H covers a graph G = (V, E) if there exists a graph homomorphism h : H →G such that for all vertices i ∈G and all j ∈h−1(i), h maps the neighborhood ∂j of j in H bijectively to the neighborhood ∂i of i in G. 1In the Epinions network, users are connected by agreement and disagreement edges and therefore frustrated cycles abound. By treating the network as a pairwise binary graphical model, we may compute the trustworthiness of a user by performing marginal inference over a variable representing if the user is trusted or not. 2 1 4 2 3 (a) A graph, G. 1 2 3 4 1 2 3 4 (b) One possible cover of G. Figure 1: An example of a graph cover. The nodes in the cover are labeled for the node that they copy in the base graph. If h(j) = i, then we say that j ∈H is a copy of i ∈G. Further, H is said to be an M-cover of G if every vertex of G has exactly M copies in H. For an example of a graph cover, see Figure 1. For a connected graph G = (V, E), each M-cover consists of M copies of each of the variable nodes of G with an edge joining each distinct copy of i ∈V to a distinct copy of j ∈V if and only if (i, j) ∈E. To any M-cover H = (V H, EH) of G given by the homomorphism h, we can associate a collection of potentials: the potential at node i ∈V H is equal to φh(i), the potential at node h(i) ∈G, and for each (i, j) ∈EH, we associate the potential ψh(i,j). In this way, we can construct a function f (H;φH,ψH) : {0, 1}M|V | →R≥0 such that f (H;φH,ψH) factorizes over H. We will say that the graphical model (H; φH, ψH) is an M-cover of the graphical model (G; φ, ψ) whenever H is an M-cover of G and φH and ψH are derived from φ and ψ as above. 2.3 The Bethe Partition Function The Bethe free energy is a standard approximation to the so-called Gibbs free energy that is motivated by ideas from statistical physics. TRBP and more general reweighted belief propagation algorithms take advantage of a similar approximation. For τ in the local marginal polytope, T ≜{τ ≥0 | ∀(i, j) ∈E, X xj τij(xi, xj) = τi(xi) and ∀i ∈V, X xi τi(xi) = 1}. the reweighted free energy approximation at temperature T = 1 is given by log FB,ρ(G, τ; φ, ψ) = U(τ; φ, ψ) −H(τ, ρ) where U is the energy, U(τ; φ, ψ) = − X i∈V X xi τi(xi) log φi(xi) − X (i,j)∈E X xi,xj τij(xi, xj) log ψij(xi, xj), and H is an entropy approximation, H(τ, ρ) = − X i∈V X xi τi(xi) log τi(xi) − X (i,j)∈E X xi,xj ρijτij(xi, xj) log τij(xi, xj) τi(xi)τj(xj). Here, ρij controls the reweighting over the edge (i, j) in the graphical model. If ρij = 1 for all (i, j) ∈E, then we call this the Bethe approximation and will typically drop the ρ writing ZB,⃗1 = ZB. The reweighted partition function is then expressed in terms of the minimum value achieved by this approximation over T as follows. ZB,ρ(G; φ, ψ) = e−minτ∈T FB,ρ(G,τ;φ,ψ) Similar to the exact partition function computation, the reweighted partition function at temperature T is given by ZB,ρ(G; φ1/T , ψ1/T )T . The zero temperature limit corresponds to minimizing the energy function over the local marginal polytope. In practice, local optima of these free energy approximations can be found by a reweighted version of belief propagation. The fixed points of this reweighted algorithm correspond to stationary points of log ZB(G, τ; φ, ψ) over T [10]. The TRBP algorithm chooses the vector ρ such that ρij corresponds to the edge appearance probability of (i, j) over a convex combination of spanning trees. For these choices of ρ, the reweighted free energy approximation is convex in τ, ZB,ρ(G; φ, ψ) is always larger than the true partition function and there exists an ordering of the message updates so that reweighted belief propagation is guaranteed to converge. 3 2.4 Log-Supermodularity and Lower Bounds A recent theorem of Vontobel [8] provides a combinatorial characterization of the Bethe partition function in terms of graph covers. Theorem 2.2 (8). ZB(G; φ, ψ) = lim sup M→∞ M v u u t X H∈CM(G) Z(H; φH, ψH) |CM(G)| where CM(G) is the set of all M-covers of G. This characterization suggests that bounds on the partition functions of individual graph covers can be used to bound the Bethe partition function. This approach has recently been used to prove that the Bethe partition function provides a lower bound on the true partition function in certain nice families of graphical models [8, 11, 12]. One such nice family is the family of so-called log-supermodular (aka attractive) graphical models. Definition 2.3. A function f : {0, 1}n →R≥0 is log-supermodular if for all x, y ∈{0, 1}n f(x)f(y) ≤f(x ∧y)f(x ∨y) where (x ∧y)i = min{xi, yi} and (x ∨y)i = max{xi, yi}. Similarly, f is log-submodular if the inequality is reversed for all x, y ∈{0, 1}n. Theorem 2.4 (Ruozzi [11]). If (G; φ, ψ) is a log-supermodular graphical model, then for any Mcover, (H; φH, ψH), of (G; φ, ψ), Z(H; φH, ψH) ≤Z(G; φ, ψ)M. Plugging this result into Theorem 2.2, we can conclude that the Bethe partition function always lower bounds the true partition function in log-supermodular models. 3 Switching Log-Supermodular Functions Let (G; φ, ψ) be a pairwise binary graphical model. Each ψij, in this model, is either logsupermodular, log-submodular, or both. In the case that each ψij is log-supermodular, Theorem 2.4 says that the partition function of the disconnected 2-cover of G provides an upper bound on the partition function of any other 2-cover of G. When the ψij are not all log-supermodular, this is not necessarily the case. As an example, if G is a 3-cycle, then, up to isomorphism, G has two distinct covers: the 6-cycle and the graph consisting of two disconnected 3-cycles. Consider the pairwise binary graphical model for the independent set problem on G = (V, E) given by the edge potentials ψij(xi, xj) = 1 −xixj for all (i, j) ∈E. We can easily check that the 6-cycle has 18 distinct independent sets while the disconnected cover has only 16 independent sets. That is, the disconnected 2-cover does not provide an upper bound on the number of independent sets in all 2-covers. Sometimes graphical models that are not log-supermodular can be converted into log-supermodular models by performing a simple change of variables (e.g., for a fixed I ⊆V , a change of variables that sends xi 7→1 −xi for each i ∈I and xi 7→xi for each i ∈V \ I). As a change of variables does not change the partition function, we can directly apply Theorem 2.4 to the new model. We will call such functions switching log-supermodular. These functions are the log-supermodular analog of the “switching supermodular” and “permuted submodular” functions considered by Crama and Hammer [13] and Schlesinger [14] respectively. The existence of a 2-cover whose partition function is larger than the disconnected one is not unique to the problem of counting independent sets. Such a cover exists whenever the base graphical model is not switching log-supermodular. In this section, we will describe one possible construction of a specific 2-cover that is distinct from the disconnected 2-cover whenever the given graphical model is not switching log-supermodular and will always provide an upper bound on the true partition function. 3.1 Signed Graphs In order to understand when a graphical model can be converted into a log-supermodular model by switching some of the variables, we introduce the notion of a signed graph. A signed graph is 4 1 2 3 4 (a) 1 2 3 4 1 2 3 4 (b) 1 2 3 4 (c) 1 2 3 4 1 2 3 4 (d) Figure 2: An example of the construction of the 2-cover G2 for the same graph with different edge potentials. Here, dashed lines represent edges with log-submodular potentials. The graph in (b) is the 2-cover construction of the graph in (a) and the graph in (d) is the 2-cover construction applied to the graph in (c). Note that the graph in (b) is connected while the graph in (d) is not. a graph in which each edge has an associated sign. For our graphical models, we will use a “+” to represent a log-supermodular edge and a “−” to represent a log-submodular edge. The sign of a cycle in the graph is positive if it has an even number of “−” edges and negative otherwise. A signed graph is said to be balanced if there are no negative cycles. Equivalently, a signed graph is balanced, if we can divide its vetices into two sets A and B such that all edges in the graph with one endpoint in set A and the other endpoint in the set B are negative and the remaining edges are positive [15]. Switching, or flipping, a variable as above has the effect of flipping the sign of all edges adjacent to the corresponding variable node in the graphical model: flipping a single variable converts an incident log-supermodular edge into a log-submodular edge and vice versa. A graphical model is switching log-supermodular if and only if its signed graph is balanced. Signed graphs have been studied before in the context of graphical models. Watanabe [16] characterized signed graphs for which belief propagation is guaranteed to have a unique fixed point. These results depend only on the graph structure and the signs on the edges and not on the strength of the potentials. 3.2 Switching Log-Supermodular 2-covers We can always construct a 2-cover of a pairwise binary graphical model that is switching logsupermodular. Definition 3.1. Given a pairwise binary graphical model (G; φ, ψ), construct a 2-cover, (G2; φG2, ψG2) where G2 = (V G2, EG2), as follows. • For each i ∈G, create two copies of i, denoted i1 and i2, in V G2. • For each edge (i, j) ∈E, if ψij is log-supermodular, then add the edges (i1, j1) and (i2, j2) to EG2. Otherwise, add the edges (i1, j2) and (i2, j1) to EG2. G2 is switching log-supermodular. This follows from the characterization of Harary [15] as G2 can be divided into two sets V1 and V2 with only negative edges between the two partitions and positive edges elsewhere. See Figure 2 for an example of this construction. If all of the potentials in (G; φ, ψ) are log-supermodular, then G2 is equal to the disconnected 2cover of G. If all of the potentials in (G; φ, ψ) are log-submodular, then G2 is a bipartite graph. Lemma 3.2. For a connected graph G, (G2; φG2, ψG2) is disconnected if and only if f (G;φ,ψ) is switching log-supermodular. Equivalently, G2 is disconnected if and only if the signed version of G is balanced. Returning to the example of counting independent sets on a 3-cycle at the beginning of this section, we can check that G2 for this graphical model corresponds to the 6-cycle. The observation that the 6-cycle has more independent sets than two disconnected copies of the 3-cycle is a special case of a general theorem. Theorem 3.3. For any pairwise binary graphical model (G; φ, ψ), Z(G2; φG2, ψG2) ≥ Z(G; φ, ψ)2. 5 The proof of Theorem 3.3 can be found in Appendix A of the supplementary material. Unlike Theorem 2.4 that provides lower bounds on the partition function, Theorem 3.3 provides an upper bound on the partition function. 4 Properties of the Cover G2 In this section, we study the implications that Theorem 2.4 and Theorem 3.3 have for characterizations of switching log-supermodular functions and the computation of the Bethe partition function. 4.1 Field Independence We begin with the simple observation that Theorem 3.3, like Theorem 2.4, does not depend on the choice of external field. In fact, in the case that all of the edge potentials are strictly larger than zero, this independence of external field completely characterizes switching log-supermodular graphical models. Theorem 4.1. For a pairwise binary graphical model (G; φ, ψ) with strictly positive edge potentials ψ, the following are equivalent. 1. f (G;φ,ψ)(x) is switching log-supermodular. 2. For all M ≥1, any external field bφ, and any M-cover (H; bφH, ψH) of (G; bφ, ψ), Z(H; bφH, ψH) ≤Z(G; bφ, ψ)M. 3. For all choices of the external field bφ and any 2-cover (H; bφH, ψH) of (G; bφ, ψ), Z(H; bφH, ψH) ≤Z(G; bφ, ψ)2. In other words, if all of the edge potentials are strictly positive, and the graphical model has even one negative cycle, then there exists an external field bφ and a 2-cover (H; bφH, ψH) of (G; bφ, ψ) such that Z(G; bφ, ψ)2 < Z(H; bφH, ψH). In particular, the proof of the theorem shows that there exists an external field bφ such that Z(G; bφ, ψ)2 < Z(G2; bφG2, ψG2). See Appendix B in the supplementary material for a proof of Theorem 4.1. 4.2 Bethe Partition Function of Graph Covers Although the true partition function of an arbitrary graph cover could overestimate or underestimate the true partition function of the base graphical model, the Bethe partition function on every cover always provides an upper bound on the Bethe partition function of the base graph. In addition, the reweighted free energy is always convex for an appropriate choice of parameters ρT RBP which means that ZB,ρT RBP (G; φ, ψ)2 = ZB,ρT RBP (G2; φG2, ψG2). Consequently, ZB,ρT RBP (G; φ, ψ)2 ≥Z(G2; φG2, ψG2) ≥ZB(G2; φG2, ψG2) ≥ZB(G; φ, ψ)2. (1) Because the graph cover G2 is switching log-supermodular, the convergence properties of BP are better [5], and we can always apply the PTAS of Weller and Jebara [3] to (G2; φG2, ψG2) in order to obtain an upper bound on the Bethe partition function of the original model. That is, by forming the special graph cover G2, we accomplished our stated goal of deriving an algorithm that produces better estimates of the partition function than TRBP but has better convergence properties than BP. We examine the convergence properties experimentally in Section 5. Before we evaluate the empirical properties of this strategy, observe that (1) holds for the MAP inference problem as well. In the zero temperature limit, computing the Bethe partition function is equivalent to minimizing the energy over the local marginal polytope. Many provably convergent message-passing algorithms have been designed for this specific task [17, 18, 19, 1]. By Theorem 3.3, the MAP solution on (G2; φG2, ψG2) is always at least as good as the MAP solution on the original graph. The problem of finding the MAP solution for a log-supermodular pairwise binary graphical model is exactly solvable in strongly polynomial time using max-flow 6 [20, 21]. We can show that the optimal solution to the Bethe approximation in the zero temperature limit is attained as an integral assignment on this specific 2-cover. The argument goes as follows. The graphical model (G2; φG2, ψG2) is switching log-supermodular. By Theorem 2.4, in the zero temperature limit, no MAP solution on any cover of (G2; φG2, ψG2) can attain a higher value of the objective function. This means that lim T →0 ZB(G2; (φG2)1/T ,(ψG2)1/T )T = max xG2 f (G2;φG2,ψG2)(xG2). By (1), the Bethe approximation on (G2; φG2, ψG2) is at least as good as the Bethe approximation on the original problem. In fact, they are equivalent in the zero temperature limit: the only part of the Bethe approximation that is not necessarily convex in τ is the entropy approximation, which becomes negligible as T →0. As a consequence, we can compute the optimum of the Bethe free energy in the zero temperature limit in polynomial time without relying on convergent message-passing algorithms. This is particularly interesting as the local marginal polytope for pairwise binary graphical models has an integer persistence property. Given any fractional optimum τ of the energy, U, over the local marginal polytope, if τi(0) > τi(1), then there exists an integer optimum τ ′ in the marginal polytope such that τ ′(0) > τ ′(1) [22]. A similar result holds when the strict inequality is reversed. Therefore, we can compute both the Bethe optimum and partial solutions to the exact MAP inference problem simply by solving a max-flow problem over (G2; φG2, ψG2). In this restricted setting, the two cover G2 is essentially the same as the graph construction produced as part of the quadratic pseudo-boolean optimization (QPBO) algorithm in the computer vision community [23]. In this sense, we can view the technique presented in this work as a generalization of QPBO to approximate the partition function of pairwise binary graphical models. 5 Experimental Results In this section, we present several experimental results for the above procedure. For the experiments, we used a standard implementation of reweighted, asynchronous message passing starting from a random initialization and a damping factor of .9. We test the performance of these algorithms on Ising models with a randomly selected external field and various interaction strengths on the edges. We do not use the convergent version of TRBP as the message update order is graph dependent and not as easily parallelizable as the reweighted message-passing algorithm [1]. In addition, alternative message-passing schemes that guarantee convergence tend to converge slower than damped reweighted message passing [24]. In some cases where the TRBP parameter choices do not converge, additional damping does help but does not allow convergence within the specified number of iterations. The first experiment was conducted on a complete cycle on four nodes. The convergence properties of BP have been studied both theoretically and empirically by Mooij and Kappen [5]. As expected, TRBP provides a looser bound on the partition function than BP on the 2-cover and both typically perform worse in terms of estimation than BP on the original graph (when BP converges there). The experimental results are described in Figure 3. In all cases, the algorithms were run until the messages in consecutive time steps differed by less than 10−8 or until more than 20, 000 iterations were performed (a single iteration consists of updating all of the messages in the model). In general, BP on the 2-cover construction converges more quickly than both BP and TRBP on the original graph. BP failed to converge as the interaction strength decreased past −.9. The number of iterations required for convergence of BP on the 2-cover has a spike at the first interaction strength such that ZB(G) ̸= p ZB(G2). Empirically, this occurs because of the appearance of new BP fixed points on the two cover that are close to the BP fixed point on the original graph. As the interaction strength increases past this point, the new fixed points further separate from the old fixed points and the algorithm converges significantly faster. Our second set of experiments evaluates the practical performance of these three message-passing schemes for Ising models on frustrated grid graphs (which arise in computer vision problems), subnetworks of the Epinions social network (the specific subnetworks tested can be found in Appendix D of the supplementary material), and simple four layer graphical models with five nodes per layer 7 0 0.5 1 1.5 2 5 10 −J log Z 0 0.5 1 1.5 2 0 1,000 2,000 −J Iterations BP 2-cover BP TRBP Figure 3: Plots of the log partition function and the number of iterations for the different algorithms to converge for a complete graph on four nodes with no external field as the strength of the negative edges goes from 0 to -2. For TRBP, ρij = .5 for all (i, j) ∈E. The dashed black line is the ground truth. a BP TRBP BP 2-cover BP Iter. TRBP Iter BP 2-cover Iter. Grid 1 100% 100% 95% 44.62 110.41 222.99 2 15% 30% 100% 210 815.3 44.14 4 1% 0% 100% 219 29.59 EPIN1 1 47% 0% 100% 63.53 21.12 2 37% 0% 100% 90.1 16.19 4 38% 0% 100% 93.63 15.9 EPIN1 1 41% 0% 100% 51.8 15.12 2 50% 0% 99% 42.46 14.84 4 53% 0% 100% 86.66 14.93 Deep Networks 1 61% 0% 100% 89.2 16.67 2 61% 0% 100% 30.66 16.82 4 60% 0% 100% 24.88 18.17 Figure 4: Percent of samples on which each algorithm converged within 1000 iterations and the average number of iterations for convergence for 100 samples of edges weights in [−a, a] for the designated graphs. For TRBP, performance was poor independent of the spanning trees selected. similar to those used to model “deep” belief networks (layer i and layer i + 1 form a complete bipartite graph and there are no intralayer edges). In the Epinions network, the pairwise interactions correspond to trust relationships. If our goal was to find the most trusted users in the network, then we could, for example, compute the marginal probability that each user is trusted and then rank the users by these probabilities. For each of these models, the edge weights are drawn uniformly at random from the interval [−a, a]. The performance of BP, TRBP, and BP on the 2-cover continue to behave as they did for the simple four node model: as a increases, BP fails to converge and BP on the 2-cover converges much faster and more frequently than the other methods. Here, convergence was required to an accuracy of 10−8 within 1, 000 iterations. The results for the different graphs appear in Figure 4. Notably, both BP and TRBP perform poorly on the real networks from the Epinions data set. Acknowledgments This work was supported in part by NSF grants IIS-1117631, CCF-1302269 and IIS-1451500. References [1] T. Meltzer, A. Globerson, and Y. Weiss. Convergent message passing algorithms: a unifying view. In Proc. 25th Uncertainty in Artifical Intelligence (UAI), Montreal, Canada, 2009. [2] A. Weller and T. Jebara. Bethe bounds and approximating the global optimum. In Sixteenth International Conference on Artificial Intelligence and Statistics (AISTATS), 2013. [3] A. Weller and T. Jebara. Approximating the Bethe partition function. In Uncertainty in Artifical Intelligence (UAI), 2014. [4] N. Taga and S. Mase. On the convergence of loopy belief propagation algorithm for different update rules. IEICE Trans. Fundam. Electron. Commun. Comput. Sci., E89-A(2):575–582, Feb. 2006. [5] J. M. Mooij and H. J. Kappen. Sufficient conditions for convergence of the sum-product algorithm. Information Theory, IEEE Transactions on, 53(12):4422–4437, Dec. 2007. 8 [6] M. Bayati, C. Borgs, J. Chayes, and R. Zecchina. Belief propagation for weighted b-matchings on arbitrary graphs and its relation to linear programs with integer solutions. SIAM Journal on Discrete Mathematics, 25(2):989–1011, 2011. [7] N. Ruozzi and S. Tatikonda. Message-passing algorithms for quadratic minimization. Journal of Machine Learning Research, 14:2287–2314, 2013. [8] P. O. Vontobel. Counting in graph covers: A combinatorial characterization of the Bethe entropy function. Information Theory, IEEE Transactions on, Jan. 2013. [9] P. O. Vontobel and R. Koetter. Graph-cover decoding and finite-length analysis of message-passing iterative decoding of LDPC codes. CoRR, abs/cs/0512078, 2005. [10] J. S. Yedidia, W. T. Freeman, and Y. Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. Information Theory, IEEE Transactions on, 51(7):2282 – 2312, July 2005. [11] N. Ruozzi. The Bethe partition function of log-supermodular graphical models. In Neural Information Processing Systems (NIPS), Lake Tahoe, NV, Dec. 2012. [12] N. Ruozzi. Beyond log-supermodularity: Lower bounds and the bethe partition function. In Proceedings of the Twenty-Ninth Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-13), pages 546–555, Corvallis, Oregon, 2013. AUAI Press. [13] Y. Crama and P. L. Hammer. Boolean functions: Theory, algorithms, and applications, volume 142. Cambridge University Press, 2011. [14] D. Schlesinger. Exact solution of permuted submodular minsum problems. In Energy Minimization Methods in Computer Vision and Pattern Recognition (EMMCVPR), pages 28–38. Springer, 2007. [15] F. Harary. On the notion of balance of a signed graph. The Michigan Mathematical Journal, 2(2):143–146, 1953. [16] Y. Watanabe. Uniqueness of belief propagation on signed graphs. In Advances in Neural Information Processing Systems, pages 1521–1529, 2011. [17] T. Werner. A linear programming approach to max-sum problem: A review. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 29(7):1165–1179, 2007. [18] A. Globerson and T. S. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. In Proc. 21st Neural Information Processing Systems (NIPS), Vancouver, B.C., Canada, 2007. [19] M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. MAP estimation via agreement on (hyper)trees: Message-passing and linear programming. Information Theory, IEEE Transactions on, 51(11):3697– 3717, Nov. 2005. ISSN 0018-9448. doi: 10.1109/TIT.2005.856938. [20] D. M. Greig, B. T. Porteous, and A. H. Seheult. Exact maximum a posteriori estimation for binary images. Journal of the Royal Statistical Society. Series B (Methodological), pages 271–279, 1989. [21] V. Kolmogorov and R. Zabih. What energy functions can be minimized via graph cuts? In Computer VisionECCV 2002, pages 65–81. Springer, 2002. [22] V. Kolmogorov and M. Wainwright. On the optimality of tree-reweighted max-product message-passing. In Proceedings of the Twenty-First Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-05), pages 316–323, Arlington, Virginia, 2005. AUAI Press. [23] V. Kolmogorov and C. Rother. Minimizing nonsubmodular functions with graph cuts-a review. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 29(7):1274–1279, July 2007. [24] A. Globerson and T. S. Jaakkola. Convergent propagation algorithms via oriented trees. In Proc. 23rd Uncertainty in Artifical Intelligence (UAI), 2007. [25] A. W. Marshall and I. Olkin. Inequalities: Theory of Majorization and its Applications. Academic Press, New York, 1979. [26] L. Lov´asz. Submodular functions and convexity. In A. Bachem, B. Korte, and M. Grtschel, editors, Mathematical Programming The State of the Art, pages 235–257. Springer Berlin Heidelberg, 1983. [27] M. Richardson, R. Agrawal, and P. Domingos. Trust management for the semantic web. In Dieter Fensel, Katia Sycara, and John Mylopoulos, editors, The Semantic Web - ISWC 2003, volume 2870 of Lecture Notes in Computer Science, pages 351–368. Springer Berlin Heidelberg, 2003. 9
2014
296
5,398
Subspace Embeddings for the Polynomial Kernel Haim Avron IBM T.J. Watson Research Center Yorktown Heights, NY 10598 haimav@us.ibm.com Huy L. Nguy˜ˆen Simons Institute, UC Berkeley Berkeley, CA 94720 hlnguyen@cs.princeton.edu David P. Woodruff IBM Almaden Research Center San Jose, CA 95120 dpwoodru@us.ibm.com Abstract Sketching is a powerful dimensionality reduction tool for accelerating statistical learning algorithms. However, its applicability has been limited to a certain extent since the crucial ingredient, the so-called oblivious subspace embedding, can only be applied to data spaces with an explicit representation as the column span or row span of a matrix, while in many settings learning is done in a high-dimensional space implicitly defined by the data matrix via a kernel transformation. We propose the first fast oblivious subspace embeddings that are able to embed a space induced by a non-linear kernel without explicitly mapping the data to the highdimensional space. In particular, we propose an embedding for mappings induced by the polynomial kernel. Using the subspace embeddings, we obtain the fastest known algorithms for computing an implicit low rank approximation of the higher-dimension mapping of the data matrix, and for computing an approximate kernel PCA of the data, as well as doing approximate kernel principal component regression. 1 Introduction Sketching has emerged as a powerful dimensionality reduction technique for accelerating statistical learning techniques such as ℓp-regression, low rank approximation, and principal component analysis (PCA) [12, 5, 14]. For natural settings of parameters, this technique has led to the first asymptotically optimal algorithms for a number of these problems, often providing considerable speedups over exact algorithms. Behind many of these remarkable algorithms is a mathematical apparatus known as an oblivious subspace embedding (OSE). An OSE is a data-independent random transform which is, with high probability, an approximate isometry over the embedded subspace, i.e. ∥Sx∥= (1 ± ϵ)∥x∥simultaneously for all x ∈V where S is the OSE, V is the embedded subspace and ∥· ∥is some norm of interest. For the OSE to be useful in applications, it is crucial that applying it to a vector or a collection of vectors (a matrix) can be done faster than the intended downstream use. So far, all OSEs proposed in the literature are for embedding subspaces that have a representation as the column space or row space of an explicitly provided matrix, or close variants of it that admit a fast multiplication given an explicit representation (e.g. [1]). This is quite unsatisfactory in many statistical learning settings. In many cases the input may be described by a moderately sized n-byd sample-by-feature matrix A, but the actual learning is done in a much higher (possibly infinite) dimensional space, by mapping each row of A to an high dimensional feature space. Using the kernel trick one can access the high dimensional mapped data points through an inner product space, 1 and thus avoid computing the mapping explicitly. This enables learning in the high-dimensional space even if explicitly computing the mapping (if at all possible) is prohibitive. In such a setting, computing the explicit mapping just to compute an OSE is usually unreasonable, if not impossible (e.g., if the feature space is infinite-dimensional). The main motivation for this paper is the following question: is it possible to design OSEs that operate on the high-dimensional space without explicitly mapping the data to that space? We propose the first fast oblivious subspace embeddings for spaces induced by a non-linear kernel without explicitly mapping the data to the high-dimensional space. In particular, we propose an OSE for mappings induced by the polynomial kernel. We then show that the OSE can be used to obtain faster algorithms for the polynomial kernel. Namely, we obtain faster algorithms for approximate kernel PCA and principal component regression. We now elaborate on these contributions. Subspace Embedding for Polynomial Kernel Maps. Let k(x, y) = (⟨x, y⟩+ c)q for some constant c ≥0 and positive integer q. This is the degree q polynomial kernel function. Without loss of generality we assume that c = 0 since a non-zero c can be handled by adding a coordinate of value √c to all of the data points. Let φ(x) denote the function that maps a d-dimensional vector x to the dq-dimensional vector formed by taking the product of all subsets of q coordinates of x, i.e. φ(v) = v ⊗. . .⊗v (doing ⊗q times), and let φ(A) denote the application of φ to the rows of A. φ is the map that corresponds to the polynomial kernel, that is k(x, y) = ⟨φ(x), φ(y)⟩, so learning with the data matrix A and the polynomial kernel corresponds to using φ(A) instead of A in a method that uses linear modeling. We describe a distribution over dq × O(3qn2/ϵ2) sketching matrices S so that the mapping φ(A) · S can be computed in O(nnz(A)q) + poly(3qn/ϵ) time, where nnz(A) denotes the number of nonzero entries of A. We show that with constant probability arbitrarily close to 1, simultaneously for all n-dimensional vectors z, ∥z · φ(A) · S∥2 = (1 ± ϵ)∥z · φ(A)∥2, that is, the entire row-space of φ(A) is approximately preserved. Additionally, the distribution does not depend on A, so it defines an OSE. It is important to note that while the literature has proposed transformations for non-linear kernels that generate an approximate isometry (e.g. Kernel PCA), or methods that are data independent (like the Random Fourier Features [17]), no method previously had both conditions, and thus they do not constitute an OSE. These conditions are crucial for the algorithmic applications we propose (which we discuss next). Applications: Approximate Kernel PCA, PCR. We say an n × k matrix V with orthonormal columns spans a rank-k (1 + ϵ)-approximation of an n × d matrix A if ∥A −V V T A∥F ≤(1 + ϵ)∥A−Ak∥F , where ∥A∥F is the Frobenius norm of A and Ak = arg minX of rank k ∥A−X∥F . We state our results for constant q. In O(nnz(A))+n·poly(k/ϵ) time an n×k matrix V with orthonormal columns can be computed, for which ∥φ(A)−V V T φ(A)∥F ≤(1+ϵ)∥φ(A)−[φ(A)]k∥F , where [φ(A)]k denotes the best rank-k approximation to φ(A). The k-dimensional subspace V of Rn can be thought of as an approximation to the top k left singular vectors of φ(A). The only alternative algorithm we are aware of, which doesn’t take time at least dq, would be to first compute the Gram matrix φ(A) · φ(A)T in O(n2d) time, and then compute a low rank approximation, which, while this computation can also exploit sparsity in A, is much slower since the Gram matrix is often dense and requires Ω(n2) time just to write down. Given V , we show how to obtain a low rank approximation to φ(A). Our algorithm computes three matrices V, U, and R, for which ∥φ(A) −V · U · φ(R)∥F ≤(1 + ϵ)∥φ(A) −[φ(A)]k∥F . This representation is useful, since given a point y ∈Rd, we can compute φ(R) · φ(y) quickly using the kernel trick. The total time to compute the low rank approximation is O(nnz(A)) + (n + d) · poly(k/ϵ). This is considerably faster than standard kernel PCA which first computes the Gram matrix of φ(A). We also show how the subspace V can be used to regularize and speed up various learning algorithms with the polynomial kernel. For example, we can use the subspace V to solve regression problems 2 of the form minx ∥V x −b∥2, an approximate form of principal component regression [8]. This can serve as a form of regularization, which is required as the problem minx ∥φ(A)x −b∥2 is usually underdetermined. A popular alternative form of regularization is to use kernel ridge regression, which requires O(n2d) operations. As nnz(A) ≤nd, our method is again faster. Our Techniques and Related Work. Pagh recently introduced the TENSORSKETCH algorithm [14], which combines the earlier COUNTSKETCH of Charikar et al. [3] with the Fast Fourier Transform (FFT) in a clever way. Pagh originally applied TENSORSKETCH for compressing matrix multiplication. Pham and Pagh then showed that TENSORSKETCH can also be used for statistical learning with the polynomial kernel [16]. However, it was unclear whether TENSORSKETCH can be used to approximately preserve entire subspaces of points (and thus can be used as an OSE). Indeed, Pham and Pagh show that a fixed point v ∈Rd has the property that for the TENSORSKETCH sketching matrix S, ∥φ(v) · S∥2 = (1 ± ϵ)∥φ(v)∥2 with constant probability. To obtain a high probability bound using their results, the authors take a median of several independent sketches. Given a high probability bound, one can use a net argument to show that the sketch is correct for all vectors v in an n-dimensional subspace of Rd. The median operation results in a non-convex embedding, and it is not clear how to efficiently solve optimization problems in the sketch space with such an embedding. Moreover, since n independent sketches are needed for probability 1 −exp(−n), the running time will be at least n · nnz(A), whereas we seek only nnz(A) time. Recently, Clarkson and Woodruff [5] showed that COUNTSKETCH can be used to provide a subspace embedding, that is, simultaneously for all v ∈V , ∥φ(v) · S∥2 = (1 ± ϵ)∥φ(v)∥2. TENSORSKETCH can be seen as a very restricted form of COUNTSKETCH, where the additional restrictions enable its fast running time on inputs which are tensor products. In particular, the hash functions in TENSORSKETCH are only 3-wise independent. Nelson and Nguyen [13] showed that COUNTSKETCH still provides a subspace embedding if the entries are chosen from a 4-wise independent distribution. We significantly extend their analysis, and in particular show that 3-wise independence suffices for COUNTSKETCH to provide an OSE, and that TENSORSKETCH indeed provides an OSE. We stress that all previous work on sketching the polynomial kernel suffers from the drawback described above, that is, it provides no provable guarantees for preserving an entire subspace, which is needed, e.g., for low rank approximation. This is true even of the sketching methods for polynomial kernels that do not use TENSORSKETCH [10, 7], as it only provides tail bounds for preserving the norm of a fixed vector, and has the aforementioned problems of extending it to a subspace, i.e., boosting the probability of error to be enough to union bound over net vectors in a subspace would require increasing the running time by a factor equal to the dimension of the subspace. After we show that TENSORSKETCH is an OSE, we need to show how to use it in applications. An unusual aspect is that for a TENSORSKETCH matrix S, we can compute φ(A) · S very efficiently, as shown by Pagh [14], but computing S · φ(A) is not known to be efficiently computable, and indeed, for degree-2 polynomial kernels this can be shown to be as hard as general rectangular matrix multiplication. In general, even writing down S · φ(A) would take a prohibitive dq amount of time. We thus need to design algorithms which only sketch on one side of φ(A). Another line of research related to ours is that on random features maps, pioneered in the seminal paper of Rahimi and Recht [17] and extended by several papers a recent fast variant [11]. The goal in this line of research is to construct randomized feature maps Ψ(·) so that the Euclidean inner product ⟨Ψ(u), Ψ(v)⟩closely approximates the value of k(u, v) where k is the kernel; the mapping Ψ(·) is dependent on the kernel. Theoretical analysis has focused so far on showing that ⟨Ψ(u), Ψ(v)⟩is indeed close to k(u, v). This is also the kind of approach that Pham and Pagh [16] use to analyze TENSORSKETCH. The problem with this kind of analysis is that it is hard to relate it to downstream metrics like generalization error and thus, in a sense, the algorithm remains a heuristic. In contrast, our approach based on OSEs provides a mathematical framework for analyzing the mappings, to reason about their downstream use, and to utilize various tools from numerical linear algebra in conjunction with them, as we show in this paper. We also note that in to contrary to random feature maps, TENSORSKETCH is attuned to taking advantage of possible input sparsity. e.g. Le et al. [11] method requires computing the Walsh-Hadamard transform, whose running time is independent of the sparsity. 3 2 Background: COUNTSKETCH and TENSORSKETCH We start by describing the COUNTSKETCH transform [3]. Let m be the target dimension. When applied to d-dimensional vectors, the transform is specified by a 2-wise independent hash function h : [d] →[m] and a 2-wise independent sign function s : [d] →{−1, +1}. When applied to v, the value at coordinate i of the output, i = 1, 2, . . . , m is P j|h(j)=i s(j)vj. Note that COUNTSKETCH can be represented as a m × d matrix in which the j-th column contains a single non-zero entry s(j) in the h(j)-th row. We now describe the TENSORSKETCH transform [14]. Suppose we are given a point v ∈Rd and so φ(v) ∈Rdq, and the target dimension is again m. The transform is specified using q 3wise independent hash functions h1, . . . , hq : [d] →[m], and q 4-wise independent sign functions s1, . . . , sq : [d] →{+1, −1}. TENSORSKETCH applied to v is then COUNTSKETCH applied to φ(v) with hash function H : [dq] →[m] and sign function S : [dq] →{+1, −1} defined as follows: H(i1, . . . , iq) = h1(i1) + h2(i2) + · · · + hq(iq) mod m, and S(i1, . . . , iq) = s1(i1) · s2(i1) · · · sq(iq). It is well-known that if H is constructed this way, then it is 3-wise independent [2, 15]. Unlike the work of Pham and Pagh [16], which only used that H was 2-wise independent, our analysis needs this stronger property of H. The TENSORSKETCH transform can be applied to v without computing φ(v) as follows. First, compute the polynomials pℓ(x) = B−1 X i=0 xi X j|hℓ(j)=i vj · sℓ(j), for ℓ= 1, 2, . . . , q. A calculation [14] shows q Y ℓ=1 pℓ(x) mod (xB −1) = B−1 X i=0 xi X (j1,...,jq)|H(j1,...,jq)=i vj1 · · · vjqS(j1, . . . , jq), that is, the coefficients of the product of the q polynomials mod (xm −1) form the value of TENSORSKETCH(v). Pagh observed that this product of polynomials can be computed in O(qm log m) time using the Fast Fourier Transform. As it takes O(q nnz(v)) time to form the q polynomials, the overall time to compute TENSORSKETCH(v) is O(q(nnz(v) + m log m)). 3 TENSORSKETCH is an Oblivious Subspace Embedding Let S be the dq × m matrix such that TENSORSKETCH(v) is φ(v) · S for a randomly selected TENSORSKETCH. Notice that S is a random matrix. In the rest of the paper, we refer to such a matrix as a TENSORSKETCH matrix with an appropriate number of columns i.e. the number of hash buckets. We will show that S is an oblivious subspace embedding for subspaces in Rdq for appropriate values of m. Notice that S has exactly one non-zero entry per row. The index of the non-zero in the row (i1, . . . , iq) is H(i1, . . . , iq) = Pq j=1 hj(ij) mod m. Let δa,b be the indicator random variable of whether Sa,b is non-zero. The sign of the non-zero entry in row (i1, . . . , iq) is S(i1, . . . , iq) = Qq j=1 sj(ij). Our main result is that the embedding matrix S of TENSORSKETCH can be used to approximate matrix product and is a subspace embedding (OSE). Theorem 1 (Main Theorem). Let S be the dq × m matrix such that TENSORSKETCH(v) is φ(v)S for a randomly selected TENSORSKETCH. The matrix S satisfies the following two properties. 1. (Approximate Matrix Product:) Let A and B be matrices with dq rows. For m ≥(2 + 3q)/(ϵ2δ), we have Pr[∥AT SST B −AT B∥2 F ≤ϵ2∥A∥2 F ∥B∥2 F ] ≥1 −δ 2. (Subspace Embedding:) Consider a fixed k-dimensional subspace V . If m ≥k2(2 + 3q)/(ϵ2δ), then with probability at least 1 −δ, ∥xS∥= (1 ± ϵ)∥x∥simultaneously for all x ∈V . 4 Algorithm 1 k-Space 1: Input: A ∈Rn×d, ϵ ∈(0, 1], integer k. 2: Output: V ∈Rn×k with orthonormal columns which spans a rank-k (1 + ϵ)-approximation to φ(A). 3: Set the parameters m = Θ(3qk2 + k/ϵ) and r = Θ(3qm2/ϵ2). 4: Let S be a dq × m TENSORSKETCH and T be an independent dq × r TENSORSKETCH. 5: Compute φ(A) · S and φ(A) · T. 6: Let U be an orthonormal basis for the column space of φ(A) · S. 7: Let W be the m × k matrix containing the top k left singular vectors of U T φ(A)T. 8: Output V = UW. We establish the theorem via two lemmas. The first lemma proves the approximate matrix product property via a careful second moment analysis. Due to space constraints, a proof is included only in the supplementary material version of the paper. Lemma 2. Let A and B be matrices with dq rows. For m ≥(2 + 3q)/(ϵ2δ), we have Pr[∥AT SST B −AT B∥2 F ≤ϵ2∥A∥2 F ∥B∥2 F ] ≥1 −δ The second lemma proves that the subspace embedding property follows from the approximate matrix product property. Lemma 3. Consider a fixed k-dimensional subspace V . If m ≥k2(2 + 3q)/(ϵ2δ), then with probability at least 1 −δ, ∥xS∥= (1 ± ϵ)∥x∥simultaneously for all x ∈V . Proof. Let B be a dq × k matrix whose columns form an orthonormal basis of V . Thus, we have BT B = Ik and ∥B∥2 F = k. The condition that ∥xS∥= (1 ± ϵ)∥x∥simultaneously for all x ∈V is equivalent to the condition that the singular values of BT S are bounded by 1 ± ϵ. By Lemma 2, for m ≥(2 + 3q)/((ϵ/k)2δ), with probability at least 1 −δ, we have ∥BT SST B −BT B∥2 F ≤(ϵ/k)2∥B∥4 F = ϵ2 Thus, we have ∥BT SST B −Ik∥2 ≤∥BT SST B −Ik∥F ≤ϵ. In other words, the squared singular values of BT S are bounded by 1 ± ϵ, implying that the singular values of BT S are also bounded by 1 ± ϵ. Note that ∥A∥2 for a matrix A denotes its operator norm. 4 Applications 4.1 Approximate Kernel PCA and Low Rank Approximation We say an n × k matrix V with orthonormal columns spans a rank-k (1 + ϵ)-approximation of an n × d matrix A if ∥A −V V T A∥F ≤(1 + ϵ)∥A −Ak∥F . Algorithm k-Space (Algorithm 1) finds an n × k matrix V which spans a rank-k (1 + ϵ)-approximation of φ(A). Before proving the correctness of the algorithm, we start with two key lemmas. Proofs are included only in the supplementary material version of the paper. Lemma 4. Let S ∈Rdq×m be a randomly chosen TENSORSKETCH matrix with m = Ω(3qk2 + k/ϵ). Let UU T be the n×n projection matrix onto the column space of φ(A)·S. Then if [U T φ(A)]k is the best rank-k approximation to matrix U T φ(A), we have ∥U[U T φ(A)]k −φ(A)∥F ≤(1 + O(ϵ))∥φ(A) −[φ(A)]k∥F . Lemma 5. Let UU T be as in Lemma 4. Let T ∈Rdq×r be a randomly chosen TENSORSKETCH matrix with r = O(3qm2/ϵ2), where m = Ω(3qk2 + k/ϵ). Suppose W is the m × k matrix whose columns are the top k left singular vectors of U T φ(A)T. Then, ∥UWW T U T φ(A) −φ(A)∥F ≤(1 + ϵ)∥φ(A) −[φ(A)]k∥F . Theorem 6. (Polynomial Kernel Rank-k Space.) For the polynomial kernel of degree q, in O(nnz(A)q) + n · poly(3qk/ϵ) time, Algorithm k-SPACE finds an n × k matrix V which spans a rank-k (1 + ϵ)-approximation of φ(A). 5 Proof. By Lemma 4 and Lemma 5, the output V = UW spans a rank-k (1 + ϵ)-approximation to φ(A). It only remains to argue the time complexity. The sketches φ(A) · S and φ(A) · T can be computed in O(nnz(A)q) + n · poly(3qk/ϵ) time. In n · poly(3qk/ϵ) time, the matrix U can be obtained from φ(A) · S and the product U T φ(A)T can be computed. Given U T φ(A)T, the matrix W of top k left singular vectors can be computed in poly(3qk/ϵ) time, and in n · poly(3qk/ϵ) time the product V = UW can be computed. Hence the overall time is O(nnz(A)q) + n · poly(3qk/ϵ), and the theorem follows. We now show how to find a low rank approximation to φ(A). A proof is included in the supplementary material version of the paper. Theorem 7. (Polynomial Kernel PCA and Low Rank Factorization) For the polynomial kernel of degree q, in O(nnz(A)q)+(n+d)·poly(3qk/ϵ) time, we can find an n×k matrix V , a k×poly(k/ϵ) matrix U, and a poly(k/ϵ) × d matrix R for which ∥V · U · φ(R) −A∥F ≤(1 + ϵ)∥φ(A) −[φ(A)]k∥F . The success probability of the algorithm is at least .6, which can be amplified with independent repetition. Note that Theorem 7 implies the rowspace of φ(R) contains a k-dimensional subspace L with dq×dq projection matrix LLT for which ∥φ(A)LLT −φ(A)∥F ≤(1 + ϵ)∥φ(A) −[φ(A)]k∥F , that is, L provides an approximation to the space spanned by the top k principal components of φ(A). 4.2 Regularizing Learning With the Polynomial Kernel Consider learning with the polynomial kernel. Even if d ≪n it might be that even for low values of q we have dq ≫n. This makes a number of learning algorithms underdetermined, and increases the chance of overfitting. The problem is even more severe if the input matrix A has a lot of redundancy in it (noisy features). To address this, many learning algorithms add a regularizer, e.g., ridge terms. Here we propose to regularize by using rank-k approximations to the matrix (where k is the regularization parameter that is controlled by the user). With the tools developed in the previous subsection, this not only serves as a regularization but also as a means of accelerating the learning. We now show that two different methods that can be regularized using this approach. 4.2.1 Approximate Kernel Principal Component Regression If dq > n the linear regression with φ(A) becomes underdetermined and exact fitting to the right hand side is possible, and in more than one way. One form of regularization is Principal Component Regression (PCR), which first uses PCA to project the data on the principal component, and then continues with linear regression in this space. We now introduce the following approximate version of PCR. Definition 8. In the Approximate Principal Component Regression Problem (Approximate PCR), we are given an n × d matrix A and an n × 1 vector b, and the goal is to find a vector x ∈Rk and an n × k matrix V with orthonormal columns spanning a rank-k (1 + ϵ)-approximation to A for which x = argminx∥V x −b∥2. Notice that if A is a rank-k matrix, then Approximate PCR coincides with ordinary least squares regression with respect to the column space of A. While PCR would require solving the regression problem with respect to the top k singular vectors of A, in general finding these k vectors exactly results in unstable computation, and cannot be found by an efficient linear sketch. This would occur, e.g., if the k-th singular value σk of A is very close (or equal) to σk+1. We therefore relax the definition to only require that the regression problem be solved with respect to some k vectors which span a rank-k (1 + ϵ)-approximation to A. The following is our main theorem for Approximate PCR. Theorem 9. (Polynomial Kernel Approximate PCR.) For the polynomial kernel of degree q, in O(nnz(A)q) + n · poly(3qk/ϵ) time one can solve the approximate PCR problem, namely, one 6 can output a vector x ∈Rk and an n × k matrix V with orthonormal columns spanning a rank-k (1 + ϵ)-approximation to φ(A), for which x = argminx∥V x −b∥2. Proof. Applying Theorem 6, we can find an n × k matrix V with orthonormal columns spanning a rank-k (1+ϵ)-approximation to φ(A) in O(nnz(A)q)+n·poly(3qk/ϵ) time. At this point, one can solve solve the regression problem argminx∥V x −b∥2 exactly in O(nk) time since the minimizer is x = V T b. 4.2.2 Approximate Kernel Canonical Correlation Analysis In Canonical Correlation Analysis (CCA) we are given two matrices A, B and we wish to find directions in which the spaces spanned by their columns are correlated. Due to space constraints, details appear only in the supplementary material version of the paper. 5 Experiments We report two sets of experiments whose goal is to demonstrate that the k-Space algorithm (Algorithm 1) is useful as a feature extraction algorithm. We use standard classification and regression datasets. In the first set of experiments, we compare ordinary ℓ2 regression to approximate principal component ℓ2 regression, where the approximate principal components are extracted using k-Space (we use RLSC for classification). Specifically, as explained in Section 4.2.1, we use k-Space to compute V and then use regression on V (in one dataset we also add an additional ridge regularization). To predict, we notice that V = φ(A) · S · R−1 · W, where R is the R factor of φ(A) · S, so S · R−1 · W defines a mapping to the approximate principal components. So, to predict on a matrix At we first compute φ(At) · S · R−1 · W (using TENSORSKETCH to compute φ(At) · S fast) and then multiply by the coefficients found by the regression. In all the experiments, φ(·) is defined using the kernel k(u, v) = (uT v + 1)3. While k-Space is efficient and gives an embedding in time that is faster than explicitly expanding the feature map, or using kernel PCA, there is still some non-negligible overhead in using it. Therefore, we also experimented with feature extraction using only a subset of the training set. Specifically, we first sample the dataset, and then use k-Space to compute the mapping S · R−1 · W. We apply this mapping to the entire dataset before doing regression. The results are reported in Table 1. Since k-Space is randomized, we report the mean and standard deviation of 5 runs. For all datasets, learning with the extracted features yields better generalized errors than learning with the original features. Extracting the features using only a sample of the training set results in only slightly worse generalization errors. With regards to the MNIST dataset, we caution the reader not to compare the generalization results to the ones obtained using the polynomial kernel (as reported in the literature). In our experiments we do not use the polynomial kernel on the entire dataset, but rather use it to extract features (i.e., do principal component regularization) using only a subset of the examples (only 5,000 examples out of 60,000). One can expect worse results, but this is a more realistic strategy for very large datasets. On very large datasets it is typically unrealistic to use the polynomial kernel on the entire dataset, and approximation techniques, like the ones we suggest, are necessary. We use a similar setup in the second set of experiments, now using linear SVM instead of regression (we run only on the classification datasets). The results are reported in Table 2. Although the gap is smaller, we see again that generally the extracted features lead to better generalization errors. We remark that it is not our goal to show that k-Space is the best feature extraction algorithm of the classification algorithms we considered (RLSC and SVM), or that it is the fastest, but rather that it can be used to extract features of higher quality than the original one. In fact, in our experiments, while for a fixed number of extracted features, k-Space produces better features than simply using TENSORSKETCH, it is also more expensive in terms of time. If that additional time is used to do learning or prediction with TENSORSKETCH with more features, we overall get better generalization error (we do not report the results of these experiments). However, feature extraction is widely applicable, and there can be cases where having fewer high quality features is beneficial, e.g. performing multiple learning on the same data, or a very expensive learning tasks. 7 Table 1: Comparison of testing error with using regression with original features and with features extracted using k-Space. In the table, n is number of training instances, d is the number of features per instance and nt is the number of instances in the test set. “Regression” stands for ordinary ℓ2 regression. “PCA Regression” stand for approximate principal component ℓ2 regression. “Sample PCA Regression” stands approximate principal component ℓ2 regression where only ns samples from the training set are used for computing the feature extraction. In “PCA Regression” and “Sample PCA Regression” k features are extracted. In k-Space we use m = O(k) and r = O(k) with the ratio between m and k and r and k as detailed in the table. For classification tasks, the percent of testing points incorrectly predicted is reported. For regression tasks, we report ∥yp −y∥2/∥y∥where yp is the predicted values and y is the ground truth. Dataset Regression PCA Regression Sampled PCA Regression MNIST 14% Out of 7.9% ± 0.06% classification Memory k = 500, ns = 5000 n = 60, 000, d = 784 m/k = 2 nt = 10, 000 r/k = 4 CPU 12% 4.3% ± 1.0% 3.6% ± 0.1% regression k = 200 k = 200, ns = 2000 n = 6, 554, d = 21 m/k = 4 m/k = 4 nt = 819 r/k = 8 r/k = 8 ADULT 15.3% 15.2% ± 0.1% 15.2% ± 0.03% classification k = 500 k = 500, ns = 5000 n = 32, 561, d = 123 m/k = 2 m/k = 2 nt = 16, 281 r/k = 4 r/k = 4 CENSUS 7.1% 6.5% ± 0.2% 6.8% ± 0.4% regression k = 500 k = 500, ns = 5000 n = 18, 186, d = 119 m/k = 4 m/k = 4 nt = 2, 273 r/k = 8 r/k = 8 λ = 0.001 λ = 0.001 USPS 13.1% 7.0% ± 0.2% 7.5% ± 0.3% classification k = 200 k = 200, ns = 2000 n = 7, 291, d = 256 m/k = 4 m/k = 4 nt = 2, 007 r/k = 8 r/k = 8 Table 2: Comparison of testing error with using SVM with original features and with features extracted using k-Space.. In the table, n is number of training instances, d is the number of features per instance and nt is the number of instances in the test set. “SVM” stands for linear SVM. “PCA SVM” stand for using k-Space to extract features, and then using linear SVM. “Sample PCA SVM” stands for using only ns samples from the training set are used for computing the feature extraction. In “PCA SVM” and “Sample PCA SVM” k features are extracted. In k-Space we use m = O(k) and r = O(k) with the ratio between m and k and r and k as detailed in the table. For classification tasks, the percent of testing points incorrectly predicted is reported. Dataset SVM PCA SVM Sampled PCA SVM MNIST 8.4% Out of 6.1% ± 0.1% classification Memory k = 500, ns = 5000 n = 60, 000, d = 784 m/k = 2 nt = 10, 000 r/k = 4 ADULT 15.0% 15.1% ± 0.1% 15.2% ± 0.1% classification k = 500 k = 500, ns = 5000 n = 32, 561, d = 123 m/k = 2 m/k = 2 nt = 16, 281 r/k = 4 r/k = 4 USPS 8.3% 7.2% ± 0.2% 7.5% ± 0.3% classification k = 200 k = 200, ns = 2000 n = 7, 291, d = 256 m/k = 4 m/k = 4 nt = 2, 007 r/k = 8 r/k = 8 6 Conclusions and Future Work Sketching based dimensionality reduction has so far been limited to linear models. In this paper, we describe the first oblivious subspace embeddings for a non-linear kernel expansion (the polynomial kernel), opening the door for sketching based algorithms for a multitude of problems involving kernel transformations. We believe this represents a significant expansion of the capabilities of sketching based algorithms. However, the polynomial kernel has a finite-expansion, and this finiteness is quite useful in the design of the embedding, while many popular kernels induce an infinitedimensional mapping. We propose that the next step in expanding the reach of sketching based methods for statistical learning is to design oblivious subspace embeddings for non-finite kernel expansions, e.g., the expansions induced by the Gaussian kernel. 8 References [1] H. Avron, V. Sindhawni, and D. P. Woodruff. Sketching structured matrices for faster nonlinear regression. In Advances in Neural Information Processing Systems (NIPS), 2013. [2] L. Carter and M. N. Wegman. Universal classes of hash functions. J. Comput. Syst. Sci., 18(2):143–154, 1979. [3] M. Charikar, K. Chen, and M. Farach-Colton. Finding frequent items in data streams. Theor. Comput. Sci., 312(1):3–15, 2004. [4] K. L. Clarkson and D. P. Woodruff. Numerical linear algebra in the streaming model. In Proceedings of the 41th Annual ACM Symposium on Theory of Computing (STOC), 2009. [5] K. L. Clarkson and D. P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the 45th Annual ACM Symposium on Theory of Computing (STOC), 2013. [6] P. Drineas, M. W. Mahoney, and S. Muthukrishnan. Relative-error CUR matrix decompositions. SIAM J. Matrix Analysis Applications, 30(2):844–881, 2008. [7] R. Hamid, Y. Xiao, A. Gittens, and D. DeCoste. Compact random feature maps. In Proc. of the 31th International Conference on Machine Learning (ICML), 2014. [8] I. T. Jolliffe. A note on the use of principal components in regression. Journal of the Royal Statistical Society, Series C, 31(3):300–303, 1982. [9] R. Kannan, S. Vempala, and D. P. Woodruff. Principal component analysis and higher correlations for distributed data. In Proceedings of the 27th Conference on Learning Theory (COLT), 2014. [10] P. Kar and H. Karnick. Random feature maps for dot product kernels. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [11] Q. Le, T. Sarl´os, and A. Smola. Fastfood – Approximating kernel expansions in loglinear time. In Proc. of the 30th International Conference on Machine Learning (ICML), 2013. [12] M. W. Mahoney. Randomized algorithms for matrices and data. Foundations and Trends in Machine Learning, 3(2):123–224, 2011. [13] J. Nelson and H. Nguyen. OSNAP: Faster numerical linear algebra algorithms via sparser subspace embeddings. In 54th IEEE Annual Symposium on Foundations of Computer Science (FOCS), 2013. [14] R. Pagh. Compressed matrix multiplication. ACM Trans. Comput. Theory, 5(3):9:1–9:17, 2013. [15] M. Patrascu and M. Thorup. The power of simple tabulation hashing. J. ACM, 59(3):14, 2012. [16] N. Pham and R. Pagh. Fast and scalable polynomial kernels via explicit feature maps. In Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’13, pages 239–247, New York, NY, USA, 2013. ACM. [17] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems (NIPS), 2007. 9
2014
297
5,399
On the Relationship Between LFP & Spiking Data David E. Carlson1, Jana Schaich Borg2, Kafui Dzirasa2, and Lawrence Carin1 1Department of Electrical and Computer Engineering 2Department of Psychiatry and Behavioral Sciences Duke University Duham, NC 27701 {david.carlson, jana.borg, kafui.dzirasa, lcarin}@duke.edu Abstract One of the goals of neuroscience is to identify neural networks that correlate with important behaviors, environments, or genotypes. This work proposes a strategy for identifying neural networks characterized by time- and frequency-dependent connectivity patterns, using convolutional dictionary learning that links spike-train data to local field potentials (LFPs) across multiple areas of the brain. Analytical contributions are: (i) modeling dynamic relationships between LFPs and spikes; (ii) describing the relationships between spikes and LFPs, by analyzing the ability to predict LFP data from one region based on spiking information from across the brain; and (iii) development of a clustering methodology that allows inference of similarities in neurons from multiple regions. Results are based on data sets in which spike and LFP data are recorded simultaneously from up to 16 brain regions in a mouse. 1 Introduction One of the most fundamental challenges in neuroscience is the “large-scale integration problem”: how does distributed neural activity lead to precise, unified cognitive moments [1]. This paper seeks to examine this challenge from the perspective of extracellular electrodes inserted into the brain. An extracellular electrode inserted into the brain picks up two types of signals: (1) the local field potential (LFP), which represents local oscillations in frequencies below 200 Hz; and (2) single neuron action potentials (also known as “spikes”), which typically occur in frequencies of 0.5 kHz. LFPs represent network activity summed over long distances, whereas action potentials represent the precise activity of cells near the tip of an electrode. Although action potentials are often treated as the “currency” of information transfer in the brain, relationships between behaviors and LFP activity can be equally precise, and sometimes even more precise, than those with the activity of individual neurons [2,3]. Further, LFP network disruptions are highly implicated in many forms of psychiatric disease [4]. This has led to much interest in understanding the mechanisms of how LFPs and action potentials interact to create specific types of behaviors. New multisite recording techniques that allow simultaneous recordings from a large number of brain regions provide unprecedented opportunities to study these interactions. However, this type of multi-dimensional data poses significant challenges that require new analysis techniques. Three of the most challenging characteristics of multisite recordings are that: 1) the networks they represent are dynamic in space and time, 2) subpopulations of neurons within a local area can have different functions and may therefore relate to LFP oscillations in specific ways, and 3) different frequencies of LFP oscillations often relate to single neurons in specific ways [5]. Here new models are proposed to examine the relationship between neurons and neural networks that accommodate these characteristics. First, each LFP in a brain region is modeled as convolutions between a bounded-time dictionary element and the observed spike trains. Critically, the convolutional factors are allowed to be dynamic, by binning the LFP and spike time series, and modeling the dictionary element for 1 each bin of the time series. Next, a clustering model is proposed making each neuron’s dictionary element a scaled version of an autoregressive template shared among all neurons in a cluster. This allows one to identify sub-populations of neurons that have similar dynamics over their functional connectivity to a brain region. Finally, we provide a strategy for exploring which frequency bands characterize spike-to-LFP functional connectivity. We show, using two novel multi-region electrophysiology datasets from mice, how these models can be used to identify coordinated interactions within and between different neuronal subsystems, defined jointly by the activity of single cells and LFPs. These methods may lead to better understanding of the relationship between brain activity and behavior, as well as the pathology underlying brain diseases. 2 Model 2.1 Data and notation The data used here consists of multiple LFP and spike-train time series, measured simultaneously from M regions of a mouse brain. Spike sorting is performed on the spiking data by a VB implementation of [6], from which J single units are assumed detected from across the multiple regions (henceforth we refer to single units as “neurons”); the number of observed neurons J depends on the data considered, and is inferred as discussed in [6]. Since multiple microwires are inserted into single brain regions in our experiments (described in [7]), we typically detect between 4-50 neurons for each of the M regions in which the microwires are inserted (discussed further when presenting results). The analysis objective is to examine the degree to which one may relate (predict) the LFP data from one brain region using the J-neuron spiking data from all brain regions. This analysis allows the identification of multi-site neural networks through the examination of the degree to which neurons in one region are predictive of LFPs in another. Let x ∈RT represent a time series of LFP data measured from a particular brain region. The T samples are recorded on a regular grid, with temporal interval ∆. The spike trains from J different neurons (after sorting) are represented by the set of vectors {y1, . . . , yJ}, binned in the same manner temporally as the LFP data. Each yj ∈ZT + is reflective of the number of times neuron j ∈{1, . . . , J} fired within each of the T time bins, where Z+ represents nonnegative integers. In the proposed model LFP data x are represented as a superposition of signals associated with each neuron yj, plus a residual that captures LFP signal unrelated to the spiking data. The contribution to x from information in yj is assumed generated by the convolution of yj with a bounded-time dictionary element dj (residing within the interval -L to L, with L ≪T). This model is related to convolutional dictionary learning [8], where the observed (after spike sorting) signal yj represents the signal we convolve the learned dictionary dj against. We model dj as time evolving, motivated by the expectation that neuron j may contribute differently to specified LFP data, based upon the latent state of the brain (which will be related to observed animal activity). The time series x is binned into a set of B equal-size contiguous windows, where x = vec([x1, . . . , xB]), and likewise y = vec([yj1, . . . , yjB]). The dictionary element for neuron j is similarly binned as {dj1, . . . , djB}, and the contribution of neuron j to xb is represented as a convolution of djb and yjb. This bin size is a trade-off between how finely time is discretized and the computational costs. In the experiments, in one example the bins are chosen to be 30 seconds wide (novel-environment data) and in the other 1 minute (sleep-cycle data), and these are principally chosen for computational convenience (the second data set is nine times longer). Similar results were found with windows as narrow as 10 second, or as wide as 2 minutes. 2.2 Modeling the LFP contribution of multiple neurons jointly Given {y1, . . . , yJ}, the LFP voltage at time window b is represented as xb = J X j=1 yjb ∗djb + ϵb (1) where ∗represents the convolution operator. Let Dj = [dj1, . . . , djB] ∈R(2L+1)×B represent the sequence of dictionary elements used to represent the LFP data over the B windows, from the perspective of neuron j. We impose the clustering prior Dj = ζjAj, Aj ∼G, G ∼DP(β, G0) (2) 2 where G is a draw from a Dirichlet process (DP) [9, 10], with scale parameter β > 0 and base probability measure G0. Note that we cluster the shape of the dictionary elements, and each neuron has its own scaling ζ ∈R. Concerning the base measure, we impose an autoregressive prior on the temporal dynamics, and therefore G0 is defined by an AR(α, γ) process ab = αab−1 + νt, νt ∼N(0, γ−1I) (3) where I is the identity matrix. This AR prior is used to constitute the B columns of the DP “atoms” A∗ h = (a∗ h1, . . . , a∗ hB), with G = P∞ k=1 πkδA∗ k. The elements of the vector π = (π1, π2, . . . ) are drawn from the “stick-breaking” [9] process πh = Vh Q i<h(1 −Vi) with Vh ∼Beta(1, β). We place the prior Gamma(aβ, bβ) on β, and priors Uniform(0,1) and Gamma(aγ, bγ) respectively on α and γ. To complete the model, we place the prior N(0, τ −1I) on ϵb, and ζj ∼N(0, 1). In the implementation, a truncated stick-breaking representation is employed for G, using K “sticks” (VK = 1), which simplifies the implementation and has been shown to be effective in practice [9] if K is made large enough, and the size of K is inferred during the inference algorithm. Special cases of this model are clear. For example, if the Aj are simply drawn i.i.d. from G0, rather than from the DP, each neuron is allowed to contribute its own unique dictionary shape to represent xb, called a non-clustering model in the results. In [11] the authors considered a similar model, but the time evolution of dj was not considered (each neuron was assumed to contribute in the same way to represent the LFP, independent of time). Further, in [11] only a single neuron was considered, and therefore no clustering was considered. A multi-neuron version of this model is inferred by setting B = 1. 3 Inference 3.1 Mean-field Variational Inference Letting Θ = {z, ζ, A1,...,K, V1,...,K, β, α, γ}, the full likelihood of the clustering model p(x, Θ) = B Y b=1 [p(xb|Θ)] J Y j=1 [p(zj|π)p(ζj)] K Y k=1 [p(A∗ k|α, γ)p(Vk|β)] p(β, α, γ) (4) The non-clustering model can be recovered by setting zj = δj and the truncation level in the stickbreaking process K to J. The time-invariant model is recovered by setting the number of bins B to 1, with or without clustering. The model of [11] is recovered by using a single bin and a single neuron. Many recent methods [12,13] have been proposed to provide quick approximations to the Dirichlet process mixture model. Critically, in these models the latent assignment variables are conditionally independent when the DP parameters are given. However, in the proposed model this assumption does not hold because the observation x is the superposition of the convolved draws from the Dirichlet process. A factorized variational distribution q is proposed to approximate the posterior distribution, and the non-clustering model arises as a special case of the clustering model. The inference to fit the distribution q is based on Bayesian Hierarchical Clustering [13] and the VB Dirichlet Process SplitMerge method [12]. The proposed model does not fit in either of these frameworks, so a method to learn K by merging clusters by adapting [12, 13] is presented in Section 3.1.1. The factorized distribution q takes the form: q(Θ) = Y j " q(zj) Y k q(ζjk) # q(β)q(α)q(γ) Y k [q(A∗ k)q(Vk)] (5) Standard forms on these distributions are assumed, with q(zj) = Categorical(rj), q(γ) = Gamma(a′ γ, b′ γ), q(α) = N(0,1)(ˆα, η−1 α ), q(Ak) = N(vec(Ak); vec(ˆak1, . . . , ˆakB), Λ−1 k ), Σk = Λk, and q(β) = Gamma(a′ β, b′ β). To facilitate inference, the distribution on ζj is split into q(ζjk) = N(µjk, η−1 jk ), the variational distribution for ζ on the jth spike train given that it is in cluster k. The non-clustering model can be represented as a special case of the clustering model where q(ζjk) = δ1, and q(zj) = δj. As noted in [12], this factorized posterior has the property that a q with K′ clusters is nested in a representation of q for K clusters for K ≥K′, so any number of clusters up to K′ is represented. 3 Variational algorithms find a q that minimizes the KL divergence from the true, intractable posterior [14], finding a q that locally maximizes the evidence lower bound (ELBO) objective: log p(x|Θ) ≥L(q) = Eq[log p(x, z, ζ, A∗ 1,...,K, β, α, γ|Θ) −log q(z, ζ, A∗ 1,...,K, β, α, γ)] (6) To facilitate inference, approximations to p(y|Θ) are developed. Let Tb be the number of time points in bin b, and define Rjib ∈R(2L+1)×(2L+1) with entries Rjib,ik = 1 Tb PTb t=1 yjb,tyib,t+k−i; yjb,t is yj at time point t in window/bin b. Let x−j b = xb −P j′̸=j yb ∗(P k rjkµjkˆakb), or the residual after all but the contribution from the jth neuron have been removed, and define let ν−j jb ∈R2L+1 with entries νj ji = 1 Tb PTb t=1 yjb,txb,t+i for i ∈{−L, . . . , L}. Both Rjb and νjb can be efficiently estimated with the FFT. For each time bin b, we can write: log p(x−j b |yjb, djb) = const −τ 2(x−j b,t −PL ℓ=−L yj,b,t+ℓdj,b,−ℓ)2 ≃const −τTb 2 (dT jbRjjbd −2(ν−j jb )T djb) To define the key updates, let y′ kb = P j rjkµjkyjb, and x−k b = xb−P j′̸=j y′ k ∗ˆakb. Σkbb′ denotes the block in Σk indexing the b and the b′ bins, which is efficiently calculated because Σ−1 k is a block tri-diagonal matrix from the first-order autoregressive process, and explicit equations exist. Letting ˆNk = P j rjk, then q(Vk) is updated by are ak = 1 + ˆN, bk = ˆβ + PK k′=k+1 ˆN ′ k. For q(ζjk), the parameters are updated ηjk = 1+P b trace(Rjb(ˆakbˆaT kb +Σkbb)), and µjk = η−1 jk P b ˆaT kbRjbν−j jb . The clustering latent variables are updated sequentially by: log(rjk) ∝−τ 2 X b [(µjk+η−1 jk )tr(Rjb(TbΣkbb+ˆakbˆaT kb))−2µjk(x−j b )T (ybRjbbˆakb))]+Eq[q(π)] x−k b and y−k b can be used to calculate q(A∗ k). The mean of the distribution q(Ak) is evaluated using the forward filtering-backward smoothing algorithm, and Σ−1 k is a block tridiagonal matrix, enabling efficient computations. Further details on updating q(A∗ k) are found in Section A of the Supplemental Material. Approximating distributions q(β), q(α) and q(γ) are standard [14,15]. 3.1.1 Merge steps The model is initialized to K = J clusters and the algorithm first finds q for the non-clustering model. This initialization is important because of the superposition measurement model. The algorithm proceeds to merge down to K′, where K′ is a local mode of the VB algorithm. The procedure is as follows: (i) Randomly choose two clusters k and k′ to merge. (ii) Propose a new variational distribution ˜q with K −1 clusters. (iii) Calculate the change in the variational lower bound, L(˜q) −L(q), and accept the merge if the variational lower bound increases. As in [12], intelligent sampling of k and k′ significantly improves performance. Here, we sample k and k′ with weight proportional to exp(−K(Ak, Ak′; c0)), where K(·, ·; c0) is the radial basis function. In [13] all pairwise clusterings were considered, but that is computationally infeasible in this problem. This approach for merging clusters is similar to that developed in [12]. This algorithm requires efficient estimation of the difference in the lower bound. For a proposed k and k′, a new variational distribution ˜q is proposed, with ˜q(zj = k) = q(zj = k) + q(zj = k′) and ˜q(zj = k′) = 0, ˜q(βk) = Beta(a0 + ˆNk + ˆNk′, b0 + PK,k⋆̸=k′ k⋆=k+1 ˆNk⋆), q(βk′) = δ0, and q(Ak) is calculated. Letting H(q) = −P j P k rjk log rjk, the difference in the lower bound can be calculated: L(˜q) −L(q) = E˜q  log p(y|A1,...,K, ζ, τ)p(Ak|α, γ) ˜q(Ak) p(βk)) q(βk)  −H(˜q) + H(˜p) (7) − Eq  log p(y|A1,...,K, ζ, τ)p(Ak|α, γ)p(A′ k|α, γ) q(Ak)q(A′ k) p(βk)p(βk′) q(βk)q(βk′)  + H(q) −H(p) Explicit details on the calculations of these variables are found in Section A of the Supplementary Material, and the block tridiagonal nature of Λk allows the complete calculation of this value in O(BTb(( ˆNk + ˆNk′) + L3)). This is linear in the amount of data used in the model. The algorithm is stopped after 10 merges in a row are rejected. 3.2 Integrated Nested Laplacian Approximation for the Non-Clustering Model The VB inference method assumes a separable posterior. In the non-clustering model, Integrated Nested Laplacian Approximation (INLA) [16] was used to estimate of the joint posterior, without 4 Animal Invariant Non-Cluster Clustering 1 0.1394 0.1968 0.2094 2 0.1465 0.2382 0.2340 3 0.2251 0.3050 0.3414 4 0.0867 0.1433 0.1434 5 0.1238 0.1867 0.1882 6 0.0675 0.1407 0.1351 Animal Invariant Non-Cluster Clustering 7 0.1385 0.2567 0.2442 8 0.0902 0.3440 0.3182 9 0.1597 0.1881 0.2362 10 0.0311 0.0803 0.0865 11 0.675 0.1064 0.1161 Table 1: Mean held-out RFE of the multi-cell models predicting the Hippocampus LFP. “Invariant” denotes the time-invariant model, “Non-cluster” and “clustering” denote the dynamic model without and with clustering. 0 0.01 0.02 0.03 0.04 0 0.01 0.02 0.03 0.04 Time-Invariant Dynamic Single Neuron Hold-out RFE −0.5 0 0.5 −0.1 −0.05 0 0.05 0.1 Time, seconds Amplitude, a.u. Dictionary Element of a VTA Cell 5 Min 15 Min 38 Min 0 10 20 30 40 0 0.1 0.2 0.3 0.4 0.5 Experiment Time, Minutes Hold-out RFE Joint Model Prediction in HP Invariant Non-Cluster Clustering Figure 1: (Left) Mean single-cell holdout RFE predicting mouse 3’s Nucleus Accumbens LFP comparing the dynamic and time-invariant model. Each point is a single neuron. (Middle) Convolutional dictionary for a VTA cell predicting mouse 3’s Nucleus Accumbens LFP at 5 minutes, 15 minutes, and 38 minutes after the experiment start. (Right) Hold-out RFE over experiment time with the time-invariant, non-clustering, and the clustering model to predict mouse 3’s Hippocampus LFP. assuming separability. Comparisons to INLA constitute an independent validation of VB, for inference in the non-clustering version of the model. The INLA inference procedure is detailed in Supplemental Section B. INLA inference was found to be significantly slower than the VB approximation, so experimental results below are shown for VB. The INLA and VB predictive performance were quantitatively similar for the non-clustering model, providing confidence in the VB results. 4 Experiments 4.1 Results on Mice Introduced to a Novel Environment This data set is from a group of 12 mice consisting of male Clock-∆19 (mouse numbers 7-12) and male wild-type littermate controls (mouse numbers 1-6) (further described in [7]). For each animal, 32-48 total microwires were implanted, with 6-16 wires in each of the Nucleus Accumbens, Hippocampus (HP), Prelimbic Cortex (PrL), Thalamus, and the Ventral Tegmental Area (VTA). LFPs were averaged over all electrodes in an area and filtered from 3-50Hz and sampled at 125 Hz. Neuronal activity was recorded using a Multi-Neuron Acquisition Processor (Plexon). 99-192 individual spike trains (single units) were detected per animal. In this dataset animals begin in their home cage, and after 10 minutes are placed in a novel environment for 30 minutes. For analysis, this 40 minute data sequence was binned into 30 second chunks, giving 80 bins. For all experiments we choose L such that the dictionary element covered 0.5 seconds before and after each spike event. Cross-validation was performed using leave-one-out analysis over time bins, using the error metric of reduction in fractional error (RFE), 1 −||xb −ˆxb||2 2/||xb||2 2. Figure 1(left) shows the average hold-out RFE for the time-invariant model and the dynamic model for single spike train predicting mouse 3’s Nucleus Accumbens, showing that the dynamic model can give strong improvements on the scale of a single cell (these results are typical). The dynamic model has a higher hold-out RFE on 98.4% of detected cells across all animals and all regions, indicating that the dynamic model generally outperforms the time-invariant model. A dynamic dictionary element from a VTA cell predicting mouse 3’s Nucleus Accumbens is shown in Figure 1(middle). At the beginning of the experiment, this cell is linked with a slow, high-amplitude oscillation. After the animal is initially placed into a new environment (illustrated by the 15-minute data point), the amplitude of the dictionary element drops close to zero. Once the animal becomes accustomed to its new environment (illustrated by the 38-minute data point), the cell’s original periodic dictionary element begins to appear again. This example shows how cells and LFPs clearly have time-evolving relationships. The leave-one-out performance of the time-invariant, non-clustering, and clustering models predicting animal 3’s Hippocampus LFP with 182 neurons is shown in Figure 1(right). These results show 5 Experiment Time, Minutes Dictionary, Seconds Cluster Factor Evolution 10 20 30 40 −0.4 −0.2 0 0.2 0.4 −0.02 0 0.02 Accumbens HP PrL Thalamus VTA 0 5 10 Number of Cells Cluster’s Cell Locations Experiment Time, Minutes Dictionary, Seconds Cluster Factor Evolution 10 20 30 40 −0.4 −0.2 0 0.2 0.4 −0.02 0 0.02 Accumbens HP PrL Thalamus VTA 0 2 4 6 Number of Cells Cluster’s Cell Locations Experiment Time, Minutes Dictionary, Seconds Cluster Factor Evolution 10 20 30 40 −0.4 −0.2 0 0.2 0.4 −0.05 0 0.05 Accumbens HP PrL Thalamus VTA 0 10 20 Number of Cells Cluster’s Cell Locations Figure 2: Example clusters predicting mouse 3’s Hippocampus LFP. The top part shows the convolutional factor throughout the duration of the experiment, and the bottom part shows the location of the cells in the cluster. Some of the clusters are dynamic whereas others were consistent through the duration of the experiment. Experimental Time, min Frequency, Hz Hippocampus Cells Predicting Thalamus LFP 10 20 30 40 8 13 18 23 28 33 38 43 RFE 0.1 0.2 0.3 0.4 0.5 0.6 0 10 20 30 40 0 100 200 300 400 500 600 Hippocampus Cells Predicting Thalamus LFP 25-35Hz Experimental Time, min Energy, a.u. Raw Energy Residual Experimental Time, min Frequency, Hz Cluster Contribution 10 20 30 40 8 13 18 23 28 33 38 43 RFE 0.05 0.1 0.15 0.2 Figure 3: (Left) RFE as a function of time bin and frequency bin for all Hippocampus cells predicting the Thalamus LFP. There is a change in the predictive properties around 10 minutes. (Middle) Total energy versus the unexplained residual for the Hippocampus cells predicting the Thalamus LFP for the frequency band 25-35 Hz. (Right) RFE using only the cluster of cells shown in Figure 2(right). that predictability changes over time, and indicate that there is a strong increase in LFP predictability when the mouse is placed in the novel environment. Using dynamics improves the results dramatically, and the clustering hold-out results showed further improvements in hold-out performance. The mean hold-out RFE results for the Hippocampus for 11 animals are shown in Table 1 (1 animal was missing this region recording). Results for other regions are shown in Supplemental Tables 1, 2, 3, and 4, and show similar results. In this dataset, there is little quantitative difference between the clustering and non-clustering models; however, the clustering result is much better for interpretation. One reason for this is that spike-sorting procedures are notoriously imprecise, and often under- or over-cluster. A clustering model with equivalent performance is evidence that many neurons have the same shapes and dynamics, and repeated dynamic patterns reduces concerns that dynamics are the result of failure to distinguish distinct neurons. Similarly, clustering of neuron shapes in a single electrode could be the result of over-clustering from the spike-sorting algorithm, but clustering across electrodes gives strong evidence that truly different neurons are clustering together. Additionally, neural action potential shapes drift over time [6,17], but since cells in a cluster come from different electrodes and regions, this is strong evidence that the dynamics are not due to over-sorting drifting neurons. Each cluster has both a dynamic shape result as well as well as a neural distribution over regions. Example clustering shapes and histogram cell locations for clusters predicting mouse 3’s Thalamus LFP are shown in Figure 2. The top part of this figure shows the base dictionary element evolution over the duration of the experiment. Note that both the (left) and (middle) plots show a dynamic effect around 10 minutes, and the cells primarily come from the Ventral Tegmental Area. The (right) plot shows a fairly stable factor, and its cells are mostly in the Hippocampus region. The ability to predict the LFP constitutes functional connectivity between a neuron and the neuronal circuit around the electrode for the LFP [18]. Neural circuits have been shown to transfer information through specific frequencies of oscillations, so it is of scientific interest to know the functional connectivity of a group of neurons as a function of frequency [5]. Frequency relationships were explored by filtering the LFP signal after the predicted signal has been removed, using a notch filter at 1 Hz intervals with a 1 Hz bandwidth, and the RFE was calculated for each held-out time bin and frequency bin. All cells in the Thalamus were used to predict each frequency band in mouse 3’s Hippocampus LFP, and this result is shown in Figure 3(left). This figure shows an increase in RFE of the 25-35 Hz band after the animal has been moved to a new location. The RFE on the band from 25-35 Hz is shown 6 Region PrLCx MOFCCx NAcShell NAcCore Amyg Hipp V1 VTA Time-Invariant 0.1055 0.1304 0.0904 0.1076 0.0883 0.2091 0.1366 0.1317 Non-Clustering 0.1686 0.1994 0.1599 0.1796 0.1422 0.2662 0.1972 0.1907 Clustering 0.1749 0.2029 0.1609 0.1814 0.1390 0.2798 0.2020 0.1923 Region Subnigra Thal LHb DLS DMS M1 OFC FrA Time-Invariant 0.1309 0.1550 0.1240 0.1237 0.1518 0.1350 0.1878 0.1164 Non-Clustering 0.1939 0.2188 0.1801 0.1973 0.2363 0.2034 0.2695 0.1894 Clustering 0.1950 0.2204 0.1813 0.2012 0.2378 0.2080 0.2723 0.1912 Table 2: Mean held-out RFE of the animal going through sleep cycles in each region. −0.5 0 0.5 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 Mean Factors for Cell in HP Time, Seconds Amplitude, a.u. V1 HP MDThal VTA −0.5 0 0.5 −0.08 −0.06 −0.04 −0.02 0 0.02 0.04 Mean Factors for Cell in V1 Time, Seconds Amplitude, a.u. V1 HP MDThal VTA −0.5 0 0.5 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 Mean Factors for Cell in NAcShell Time, Seconds Amplitude, a.u. V1 HP MDThal VTA Figure 4: The predictive patterns of individual neurons predicting multiple regions. (Left) A Hippocampus cell is the best single cell predictor of the V1 LFP (Middle) A V1 cell with a relationship only to the V1 LFP. (Right) A Nucleus Accumbens Shell cell that is equivalent in predictive ability to the best V1 cell. in Figure 3(middle), and shows that while the raw energy in this frequency band is much higher after the move to the novel environment, the cells from the Hippocampus can explain much of the additional energy in this band. In Figure 3(right), we show the same result using only the cluster in Figure 2. Note that there is a change around 10 minutes that is due to both a slight change in the convolutional dictionary and a change in the neural firing patterns. 4.2 Results on Sleep Data Set The second data set was recorded from one mouse going through different sleep cycles over 6 hours. 64 microwires were implanted in 16 different regions of the brain, using the Prelimbix Cortex (PrL), Medial Orbital Frontal Cortex (MOFCCx), the core and shell of the Nucleus Accumbens (NAc), Basal Amygdala (Amy), Hippocampus (Hipp), V1, Ventral Tegmental Area (VTA), Substantia nigra (Subnigra), Medial Dorsal Thalamus (MDThal), Lateral Habenula (LHb), Dorsolateral Striatum (DLS), Dorsomedial Striatum (DMS), Motor Cortex (M1), Orbital Frontal Cortex (OFC), and Frontal Association Cortex (FrA). LFPs were averaged over all electrodes in an area and filtered from 3-50Hz and sampled at 125Hz, and L was set to 0.5 seconds. 163 total neurons (single units) were detected using spike sorting, and the data were split into 360 1-minute time bins. The leaveone-out predictive performance was higher for the dynamic single cell model on 159 out of 163 neurons predicting the Hippocampus LFP. The mean hold-out RFEs for all recorded regions of the brain are shown in Table 2 for all models, and the clustering model is the best performing model in 15 of the 16 regions. Previously published work looked at the predictability of the V1 LFP signal from individual V1 neurons [11,18,19]. Our experiments find that the dictionary elements for all V1 cells (4 electrodes, 4 cells in this dataset) are time-invariant and match the single-cell time-invariant dictionary shape of [11]. The dictionary elements for a single V1 cell predicting multiple regions are shown in Figure 4(middle; for simplicity, only a subset of brain regions recorded from are shown). This suggests that the V1 cell has a connection to the V1 region, but no other brain region that was recorded from in this model. However, cells in other brain regions showed functional connectivity to V1. The best individual predictor is a cell in the Hippocampus shown in Figure 4(left). An additional example cell is a cell in the Nucleus Accumbens shell that has the same RFE as the best V1 cell, and its shape is shown in Figure 4(right). Sleep states are typically defined by dynamic changes in functional connectivity across brain regions as measured by EEG (LFPs recorded from the scalp) [20], but little is known about how single neurons contribute to, or interact with, these network changes. To get sleep covariates, each second of data was scored into “awake” or “sleep” states using the methods in [21], and the sleep state was averaged over the time bin. We defined a time bin to be a sleep state if ≥95% of the individual sec7 −0.4 −0.2 0 0.2 0.4 −0.1 −0.05 0 0.05 Time, s Amplitude, a.u. Cluster predicting V1 Region 0 2 4 MOFC Thal V1 Amyg VTA PrL Number of Cells −0.4 −0.2 0 0.2 0.4 −0.05 0 0.05 Dictionary Element, s Amplitude, a.u. Pro-Sleep Cluster Awake Sleep 0 5 10 HP Subnigra Number of Cells −0.4 −0.2 0 0.2 0.4 −0.04 −0.02 0 0.02 0.04 Dictionary Element, s Amplitude, a.u. Anti-Sleep Cluster Awake Sleep 0 2 4 6 DLS MOFC FrA PrL Number of Cells Figure 5: (Left) The cluster predicting the V1 region of the brain, matching known pattern for individual V1 cells [11,18]. (Middle,Right) Clusters predicting the motor cortex that show positive (pro) and negative (anti) relationships between amplitude and sleep. 0 10 20 30 40 50 0 0.005 0.01 0.015 0.02 0.025 Frequency, Hz Mean RFE Sleep-Neutral Cluster RFE by Frequency Awake Sleep 0 10 20 30 40 50 0 0.05 0.1 0.15 0.2 Frequency, Hz Mean RFE Sleep-Increased Cluster RFE by Frequency Awake Sleep 0 10 20 30 40 50 0 0.01 0.02 0.03 0.04 0.05 Frequency, Hz Mean RFE Sleep-Decreased Cluster RFE by Frequency Awake Sleep Figure 6: Mean RFE when the animal is awake and when it is asleep. (Left) Cluster’s convolution factor is stable, and shows only minor differences between sleep and awake prediction. (Middle and Right) Clusters shown in Figure 5 (left and right), depicting varying patterns with the mouse’s sleep state onds are scored as a sleep state, and the animal is awake if ≤5% of the individual seconds are scored as a sleep state. In Figure 5(middle) we show a cluster that is most strongly positively correlated with sleep (pro-sleep), and in Figure 5(right) we show a cluster that is most negatively correlated with sleep (pro-awake). Both figures show the neuron locations as well as the mean waveform shape during sleep and wake. In this case, the pro-sleep cluster is dominantly Hippocampus cells and the anti-sleep cluster comes from many different regions. There may be concern that because these are the maximally correlated clusters, that these results may be atypical. To address this concern, the p-value for finding a cluster this strongly correlated has a p-value 4 × 10−6 for Pearson correlation with the Bonferroni correction for multiple tests. Furthermore, 4 of the 25 clusters detected showed correlation above .4 between amplitude and sleep state, so this is not an isolated phenomena. The RFE changes as both a function of frequency and sleep state for some clusters of neurons. Using 1Hz bandwidth frequency bins, in Figure 6 (middle and right) we show the mean RFE using only the clusters in Figure 5 (middle and right). The cluster associated positively with sleeping shifts its frequency peak and increases its ability to predict when the animal is sleeping. Likewise, the sleep-decreased cluster performs worst at predicting when the animal is asleep. For comparison, in Figure 6 (left) we include the frequency results for cluster with a stable dictionary element. The total RFE is comparable and there is a not a dramatic shift in the peak frequency between the sleep and awake states. 5 Conclusions Novel models and methods are developed here to account for time-varying relationships between neurons and LFPs. Within the context of our experiments, significantly improved predictive performance is realized when one accounts for temporal dynamics in the neuron-LFP interrelationship. Further, the clustering model reveals which neurons have similar relationships to a specific brain region, and the frequencies that are predictable in the LFP change with known dynamics of the animal state. In future work, these ideas can be incorporated with attempts to learn network structure, and LFPs can be considered a common input when exploring networks of neurons [19, 22, 23]. Moreover, future experiments are being designed to place additional electrodes in a single brain region, with the goal of detecting 100 neurons in a single brain region while recording LFPs in up to 20 regions. The methods proposed here will facilitate exploration of both the diversity of neurons and the differences in functional connectivity on an individual neuron scale. Acknowlegements The research reported here was funded in part by ARO, DARPA, DOE, NGA and ONR. We thank the reviewers for their helpful comments. 8 References [1] F. Varela, J.P. Lachaux, E. Rodriguez, and J. Martinerie. The brainweb: phase synchronization and largescale integration. Nature Rev. Neuro., 2001. [2] B. Pesaran, J.S. Pezaris, M. Sahani, P.P. Mitra, and R.A. Andersen. Temporal structure in neuronal activity during working memory in macaque parietal cortex. Nature neuroscience, 5:805–811, 2002. [3] C. Mehring, J. Rickert, E. Vaadia, S. Cardosa de Oliveira, A. Aertsen, and S. Rotter. Inference of hand movements from local field potentials in monkey motor cortex. Nature neuroscience, 6(12):1253–1254, 2003. [4] P.J. Uhlhaas and W. Singer. Abnormal neural oscillations and synchrony in schizophrenia. Nature Rev. Neuro., 2010. [5] M. Le Van Quyen and A. Bragin. Analysis of dynamic brain oscillations: methodological advances. Trends in Neurosciences, 2007. [6] D.E. Carlson, J.T. Vogelstein, Q. Wu, W. Lian, M. Zhou, C.R. Stoetzner, D. Kipke, D. Weber, D.B. Dunson, and L. Carin. Multichannel Electrophysiological Spike Sorting via Joint Dictionary Learning & Mixture Modeling. IEEE TBME, 2013. [7] K Dzirasa, L Coque, MM Sidor, S Kumar, EA Dancy, JS Takahashi, C.A. McClung, and M.A.L. Nicolelis. Lithium ameliorates nucleus accumbens phase-signaling dysfunction in a genetic mouse model of mania. J. Neurosci., December 2010. [8] B. Chen, G. Polatkan, G. Sapiro, D. Dunson, and L. Carin. The hierarchical beta process for convolutional factor analysis and deep learning. ICML, 2011. [9] H. Ishwaran and L.F. James. Gibbs Sampling Methods for Stick-Breaking Priors. JASA, March 2001. [10] T.S. Ferguson. A Bayesian Analysis of Some Nonparametric Problems. Annals Stat., March 1973. [11] M. Rasch, N.K. Logothetis, and G. Kreiman. From neurons to circuits: linear estimation of local field potentials. J. Neurosci., November 2009. [12] M.C. Hughes and E.B. Sudderth. Memoized Online Variational Inference for Dirichlet Process Mixture Models. NIPS, 2013. [13] K.A. Heller and Z. Ghahramani. Bayesian Hierarchical Clustering. ICML, 2005. [14] D.M. Blei and M.I. Jordan. Variational inference for Dirichlet process mixtures. Bayesian Analysis, 2006. [15] S.J. Roberts and W.D. Penny. Variational Bayes for generalized autoregressive models. IEEE Trans. Signal Process., September 2002. [16] H. Rue, S. Martino, and N. Chopin. Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations. J. Royal Stat. Soc., 2009. [17] A. Calabrese and L. Paniski. Kalman filter mixture model for spike sorting of non-stationary data. J. Neurosci. Methods, 2010. [18] I. Nauhaus, L. Busse, M. Carandini, and D.L. Ringach. Stimulus contrast modulates functional connectivity in visual cortex. Nature Neuro., January 2009. [19] R.C. Kelly, M.A. Smith, R.E. Kass, and T.S. Lee. Local field potentials indicate network state and account for neuronal response variability. J. Comp. Neurosci., December 2010. [20] L.J. Larson-Prior, J.M. Zempel, T.S. Nolan, F.W. Prior, A.Z. Snyder, and M.E. Raichle. Cortical network functional connectivity in the descent to sleep. PNAS, March 2009. [21] K. Dzirasa, S. Ribeiro, R. Costa, L.M. Santos, S.-C. Lin, A. Grosmark, T.D. Sotnikova, R.R. Gainetdinov, M.G. Caron, and M.A.L. Nicolelis. Dopaminergic control of sleep-wake states. J. Neurosci., October 2006. [22] J.W. Pillow and P. Latham. Neural characterization in partially observed populations of spiking neurons. NIPS, 2007. [23] M.J. Rasch, A. Gretton, Y. Murayama, W. Maass, and N.K. Logothetis. Inferring spike trains from local field potentials. J. Neurophysiology, March 2008. [24] D.I. Kim, P. Gopalan, D.M. Blei, and E.B. Sudderth. Efficient Online Inference for Bayesian Nonparametric Relational Models. NIPS, 2012. 9
2014
298